List:Commits« Previous MessageNext Message »
From:Alexey Botchkov Date:November 10 2009 8:56pm
Subject:bzr commit into mysql-5.5-next-mr branch (holyfoot:2916) Bug#42520
View as plain text  
#At file:///home/hf/work/mysql_common/51alik/ based on revid:mikael@stripped

 2916 Alexey Botchkov	2009-11-11
      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.

    modified:
      client/mysqltest.cc
      mysql-test/r/loadxml.result
      mysql-test/t/loadxml.test
=== modified file 'client/mysqltest.cc'
--- a/client/mysqltest.cc	2009-11-05 12:08:37 +0000
+++ b/client/mysqltest.cc	2009-11-10 20:55:05 +0000
@@ -281,7 +281,7 @@ enum enum_commands {
   Q_SEND_QUIT, Q_CHANGE_USER, Q_MKDIR, Q_RMDIR,
   Q_LIST_FILES, Q_LIST_FILES_WRITE_FILE, Q_LIST_FILES_APPEND_FILE,
   Q_SEND_SHUTDOWN, Q_SHUTDOWN_SERVER,
-  Q_MOVE_FILE,
+  Q_MOVE_FILE, Q_SEND_EVAL,
 
   Q_UNKNOWN,			       /* Unknown command.   */
   Q_COMMENT,			       /* Comments, ignored. */
@@ -376,6 +376,7 @@ const char *command_names[]=
   "send_shutdown",
   "shutdown_server",
   "move_file",
+  "send_eval",
 
   0
 };
@@ -7006,7 +7007,7 @@ void run_query(struct st_connection *cn,
   /*
     Evaluate query if this is an eval command
   */
-  if (command->type == Q_EVAL)
+  if (command->type == Q_EVAL || command->type == Q_SEND_EVAL)
   {
     init_dynamic_string(&eval_query, "", command->query_len+256, 1024);
     do_eval(&eval_query, command->query, command->end, FALSE);
@@ -7825,6 +7826,7 @@ int main(int argc, char **argv)
 	break;
       }
       case Q_SEND:
+      case Q_SEND_EVAL:
         if (!*command->first_argument)
         {
           /*

=== modified file 'mysql-test/r/loadxml.result'
--- a/mysql-test/r/loadxml.result	2009-10-14 12:10:22 +0000
+++ b/mysql-test/r/loadxml.result	2009-11-10 20:55:05 +0000
@@ -58,11 +58,11 @@ select 1 as xml;
 xml
 1
 create table t2(fl text);
-LOAD XML LOCAL INFILE "$MYSQLTEST_VARDIR/tmp/loadxml-dump.xml"  INTO TABLE t2 ROWS IDENTIFIED BY '<person>';;
+LOAD XML LOCAL INFILE "MYSQLTEST_VARDIR/tmp/loadxml-dump.xml"  INTO TABLE t2 ROWS IDENTIFIED BY '<person>';;
 show processlist;
 Id	User	Host	db	Command	Time	State	Info
 #	root	localhost	test	Query	#	NULL	show processlist
-#	root	localhost	test	Query	#	Reading from net	LOAD XML LOCAL INFILE "$MYSQLTEST_VARDIR/tmp/loadxml-dump.xml"  INTO TABLE t2 ROWS IDENTIFIED BY '<p
+#	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 
 drop table t1;
 drop table t2;
 create table t1 (

=== modified file 'mysql-test/t/loadxml.test'
--- a/mysql-test/t/loadxml.test	2009-10-14 12:10:22 +0000
+++ b/mysql-test/t/loadxml.test	2009-11-10 20:55:05 +0000
@@ -70,17 +70,20 @@ connection addconroot;
 create table t2(fl text);
 --let $PSEUDO_THREAD_ID=`select @@pseudo_thread_id    `
 
---send LOAD XML LOCAL INFILE "$MYSQLTEST_VARDIR/tmp/loadxml-dump.xml"  INTO TABLE t2 ROWS IDENTIFIED BY '<person>';
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--send_eval LOAD XML LOCAL INFILE "$MYSQLTEST_VARDIR/tmp/loadxml-dump.xml"  INTO TABLE t2 ROWS IDENTIFIED BY '<person>';
 
 sleep 3;
 
 
 connection default;
+sleep 1;
 --replace_column 1 # 3 localhost 6 #
 show processlist;
 
 --disable_query_log
 --eval kill $PSEUDO_THREAD_ID
+sleep 2;
 --enable_query_log
 
 disconnect addconroot;


Attachment: [text/bzr-bundle] bzr/holyfoot@mysql.com-20091110205505-y7odn5bvja1gau3s.bundle
Thread
bzr commit into mysql-5.5-next-mr branch (holyfoot:2916) Bug#42520Alexey Botchkov11 Nov