summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorGeorgi Kodinov <joro@sun.com>2010-04-07 18:17:56 +0300
committerGeorgi Kodinov <joro@sun.com>2010-04-07 18:17:56 +0300
commit287fa3caf532509d01d92e8d32f2149603914137 (patch)
tree42afe67eac2b3e22cea008dd1d7350903ceea474 /mysql-test
parentba229d799a0d3bd2499629bdd57212bcd7c98a38 (diff)
downloadmariadb-git-287fa3caf532509d01d92e8d32f2149603914137.tar.gz
Bug #52512: Assertion `! is_set()' in Diagnostics_area::set_ok_status
on LOAD DATA Two problems : 1. LOAD DATA was not checking for SQL errors and was sending an OK packet even when there were errors reported already. Fixed to check for SQL errors in addition to the error conditions already detected. 2. There was an over-ambitious assert() on the server to check if the protocol is always followed by the client. This can cause crashes on debug servers by clients not completing the protocol exchange for some reason (e.g. --send command in mysqltest). Fixed by keeping the assert only on client side, since the server always completes the protocol exchange.
Diffstat (limited to 'mysql-test')
-rw-r--r--[-rwxr-xr-x]mysql-test/r/loaddata.result7
-rw-r--r--mysql-test/t/loaddata.test20
2 files changed, 27 insertions, 0 deletions
diff --git a/mysql-test/r/loaddata.result b/mysql-test/r/loaddata.result
index ef206565db5..2f645187530 100755..100644
--- a/mysql-test/r/loaddata.result
+++ b/mysql-test/r/loaddata.result
@@ -502,4 +502,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 e5f0a1d7eba..1047cd0101a 100644
--- a/mysql-test/t/loaddata.test
+++ b/mysql-test/t/loaddata.test
@@ -554,4 +554,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