summaryrefslogtreecommitdiff
path: root/mysql-test/t/loadxml.test
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mysql.com>2010-05-05 14:34:20 +0400
committerAlexander Barkov <bar@mysql.com>2010-05-05 14:34:20 +0400
commit3c93a784d415efad81065bb5dcb3f3c897374019 (patch)
tree1abfd7db1feb7aa4fd379967e8d9010ec18e2b48 /mysql-test/t/loadxml.test
parentf90f341491d283e445795b6c21f3293146e6ed83 (diff)
downloadmariadb-git-3c93a784d415efad81065bb5dcb3f3c897374019.tar.gz
Bug#51571 load xml infile causes server crash
Problem: item->name was NULL for Item_user_var_as_out_param which made strcmp(something, item->name) crash in the LOAD XML code. Fix: - item_func.h: Adding set_name() in constuctor for Item_user_var_as_out_param - sql_load.cc: Changing the condition in write_execute_load_query_log_event() which distiguished between Item_user_var_as_out_param and Item_field from if (item->name == NULL) to if (item->type() == Item::FIELD_ITEM) - loadxml.result, loadxml.test: adding tests
Diffstat (limited to 'mysql-test/t/loadxml.test')
-rw-r--r--mysql-test/t/loadxml.test8
1 files changed, 8 insertions, 0 deletions
diff --git a/mysql-test/t/loadxml.test b/mysql-test/t/loadxml.test
index 84a89a332a0..6faf712b6ce 100644
--- a/mysql-test/t/loadxml.test
+++ b/mysql-test/t/loadxml.test
@@ -108,3 +108,11 @@ load xml infile '../../std_data/loadxml2.dat' into table t1;
select * from t1;
drop table t1;
+--echo #
+--echo # Bug#51571 load xml infile causes server crash
+--echo #
+CREATE TABLE t1 (a text, b text);
+LOAD XML INFILE '../../std_data/loadxml.dat' INTO TABLE t1
+ROWS IDENTIFIED BY '<row>' (a,@b) SET b=concat('!',@b);
+SELECT * FROM t1 ORDER BY a;
+DROP TABLE t1;