diff options
author | Georgi Kodinov <Georgi.Kodinov@Oracle.com> | 2010-06-09 11:29:27 +0300 |
---|---|---|
committer | Georgi Kodinov <Georgi.Kodinov@Oracle.com> | 2010-06-09 11:29:27 +0300 |
commit | 5932330839daa3c211b7db81d0ce1b50b8b928f8 (patch) | |
tree | 19f359486b756ba2484cb3d73d7ab22800675688 | |
parent | 1de997d849e718a7080cf5eab6f8715beada8abf (diff) | |
parent | 257363e6c41d71c0ba3ce870614dfed1ff47676f (diff) | |
download | mariadb-git-5932330839daa3c211b7db81d0ce1b50b8b928f8.tar.gz |
Merge
-rw-r--r-- | mysql-test/r/loaddata.result | 7 | ||||
-rw-r--r-- | mysql-test/t/loaddata.test | 20 | ||||
-rw-r--r-- | sql/net_serv.cc | 8 | ||||
-rw-r--r-- | sql/sql_load.cc | 4 |
4 files changed, 38 insertions, 1 deletions
diff --git a/mysql-test/r/loaddata.result b/mysql-test/r/loaddata.result index b3487d376a1..665e80b8ba2 100644 --- a/mysql-test/r/loaddata.result +++ b/mysql-test/r/loaddata.result @@ -496,4 +496,11 @@ SELECT * FROM t1; col0 test DROP TABLE t1; +# +# Bug #52512 : Assertion `! is_set()' in +# Diagnostics_area::set_ok_status on LOAD DATA +# +CREATE TABLE t1 (id INT NOT NULL); +LOAD DATA LOCAL INFILE 'tb.txt' INTO TABLE t1; +DROP TABLE t1; End of 5.1 tests diff --git a/mysql-test/t/loaddata.test b/mysql-test/t/loaddata.test index 126bd5c8838..e24f0b16705 100644 --- a/mysql-test/t/loaddata.test +++ b/mysql-test/t/loaddata.test @@ -560,4 +560,24 @@ let $MYSQLD_DATADIR= `select @@datadir`; remove_file $MYSQLD_DATADIR/test/t1.txt; +--echo # +--echo # Bug #52512 : Assertion `! is_set()' in +--echo # Diagnostics_area::set_ok_status on LOAD DATA +--echo # + +connect (con1,localhost,root,,test); + +CREATE TABLE t1 (id INT NOT NULL); +--send LOAD DATA LOCAL INFILE 'tb.txt' INTO TABLE t1 +# please keep this is a spearate test file : it's important to have no +# commands after this one + +connection default; +dirty_close con1; + +connect (con1,localhost,root,,test); +DROP TABLE t1; +connection default; +disconnect con1; + --echo End of 5.1 tests diff --git a/sql/net_serv.cc b/sql/net_serv.cc index c55c4246750..38ab3a70136 100644 --- a/sql/net_serv.cc +++ b/sql/net_serv.cc @@ -902,7 +902,13 @@ my_real_read(NET *net, size_t *complen) ("Packets out of order (Found: %d, expected %u)", (int) net->buff[net->where_b + 3], net->pkt_nr)); -#ifdef EXTRA_DEBUG + /* + We don't make noise server side, since the client is expected + to break the protocol for e.g. --send LOAD DATA .. LOCAL where + the server expects the client to send a file, but the client + may reply with a new command instead. + */ +#if defined (EXTRA_DEBUG) && !defined (MYSQL_SERVER) fflush(stdout); fprintf(stderr,"Error: Packets out of order (Found: %d, expected %d)\n", (int) net->buff[net->where_b + 3], diff --git a/sql/sql_load.cc b/sql/sql_load.cc index 6628cc4e8bb..552473e4fc2 100644 --- a/sql/sql_load.cc +++ b/sql/sql_load.cc @@ -933,6 +933,10 @@ read_sep_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list, DBUG_RETURN(1); } } + + if (thd->is_error()) + read_info.error= 1; + if (read_info.error) break; if (skip_lines) |