Skip to content

Commit 6d9aa9e

Browse files
author
Alexey Botchkov
committed
Bug#42520 killing load .. infile Assertion failed: ! is_set(), file .\sql_error.cc, line 8
The additional patch. That 'loadxml.test' failure was actually about our testing system, not the code. Firstly we need a new mysqltest command, wich i called 'send_eval'. So the expression can be evaluated, then started in a parallel thread. We only have separane 'send' and 'eval' commands at the moment. Then we need to add the waiting code after the 'KILL' to our test, so the thread will be killed before the test goes further. The present 'reap' command doesn't handle the killed threads well. per-file comments: client/mysqltest.cc Bug#42520 killing load .. infile Assertion failed: ! is_set(), file .\sql_error.cc, line 8 The 'send_eval' command implemented. mysql-test/r/loadxml.result Bug#42520 killing load .. infile Assertion failed: ! is_set(), file .\sql_error.cc, line 8 test result updated. mysql-test/t/loadxml.test Bug#42520 killing load .. infile Assertion failed: ! is_set(), file .\sql_error.cc, line 8 test case added.
1 parent 52beed0 commit 6d9aa9e

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

client/mysqltest.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ enum enum_commands {
281281
Q_SEND_QUIT, Q_CHANGE_USER, Q_MKDIR, Q_RMDIR,
282282
Q_LIST_FILES, Q_LIST_FILES_WRITE_FILE, Q_LIST_FILES_APPEND_FILE,
283283
Q_SEND_SHUTDOWN, Q_SHUTDOWN_SERVER,
284-
Q_MOVE_FILE,
284+
Q_MOVE_FILE, Q_SEND_EVAL,
285285

286286
Q_UNKNOWN, /* Unknown command. */
287287
Q_COMMENT, /* Comments, ignored. */
@@ -376,6 +376,7 @@ const char *command_names[]=
376376
"send_shutdown",
377377
"shutdown_server",
378378
"move_file",
379+
"send_eval",
379380

380381
0
381382
};
@@ -7006,7 +7007,7 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags)
70067007
/*
70077008
Evaluate query if this is an eval command
70087009
*/
7009-
if (command->type == Q_EVAL)
7010+
if (command->type == Q_EVAL || command->type == Q_SEND_EVAL)
70107011
{
70117012
init_dynamic_string(&eval_query, "", command->query_len+256, 1024);
70127013
do_eval(&eval_query, command->query, command->end, FALSE);
@@ -7825,6 +7826,7 @@ int main(int argc, char **argv)
78257826
break;
78267827
}
78277828
case Q_SEND:
7829+
case Q_SEND_EVAL:
78287830
if (!*command->first_argument)
78297831
{
78307832
/*

mysql-test/r/loadxml.result

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ select 1 as xml;
5858
xml
5959
1
6060
create table t2(fl text);
61-
LOAD XML LOCAL INFILE "$MYSQLTEST_VARDIR/tmp/loadxml-dump.xml" INTO TABLE t2 ROWS IDENTIFIED BY '<person>';;
61+
LOAD XML LOCAL INFILE "MYSQLTEST_VARDIR/tmp/loadxml-dump.xml" INTO TABLE t2 ROWS IDENTIFIED BY '<person>';;
6262
show processlist;
6363
Id User Host db Command Time State Info
6464
# root localhost test Query # NULL show processlist
65-
# root localhost test Query # Reading from net LOAD XML LOCAL INFILE "$MYSQLTEST_VARDIR/tmp/loadxml-dump.xml" INTO TABLE t2 ROWS IDENTIFIED BY '<p
65+
# root localhost test Query # Reading from net LOAD XML LOCAL INFILE "/home/hf/work/mysql_common/51alik/mysql-test/var/tmp/loadxml-dump.xml" INTO
6666
drop table t1;
6767
drop table t2;
6868
create table t1 (

mysql-test/t/loadxml.test

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,17 +70,20 @@ connection addconroot;
7070
create table t2(fl text);
7171
--let $PSEUDO_THREAD_ID=`select @@pseudo_thread_id `
7272

73-
--send LOAD XML LOCAL INFILE "$MYSQLTEST_VARDIR/tmp/loadxml-dump.xml" INTO TABLE t2 ROWS IDENTIFIED BY '<person>';
73+
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
74+
--send_eval LOAD XML LOCAL INFILE "$MYSQLTEST_VARDIR/tmp/loadxml-dump.xml" INTO TABLE t2 ROWS IDENTIFIED BY '<person>';
7475

7576
sleep 3;
7677

7778

7879
connection default;
80+
sleep 1;
7981
--replace_column 1 # 3 localhost 6 #
8082
show processlist;
8183

8284
--disable_query_log
8385
--eval kill $PSEUDO_THREAD_ID
86+
sleep 2;
8487
--enable_query_log
8588

8689
disconnect addconroot;

0 commit comments

Comments
 (0)