#
# MDEV-3940 Server crash or assertion `item->type() == Item::STRING_ITEM' failure on LOAD DATA through a view with statement binary logging
#

--source include/have_binlog_format_statement.inc

--write_file $MYSQLTEST_VARDIR/3940.data 
1
EOF

create table t1 (i int, j int);
create view v1 as select i from t1;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--eval LOAD DATA LOCAL INFILE '$MYSQLTEST_VARDIR/3940.data' INTO TABLE v1 (i)
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--eval LOAD DATA LOCAL INFILE '$MYSQLTEST_VARDIR/3940.data' INTO TABLE v1
select * from v1;
--source include/show_binlog_events.inc
drop view v1;
drop table t1;
