List:Commits« Previous MessageNext Message »
From:Bjorn Munch Date:January 12 2011 10:27am
Subject:bzr push into mysql-5.1-mtr branch (bjorn.munch:2963 to 2967) Bug#59002
View as plain text  
 2967 Bjorn Munch	2011-01-11
      Bug #59002 Please make mtr print correct file and line number when tests fail
      Followup: had forgotten to update mysqltest.test due to changed output - duh!

    modified:
      mysql-test/r/mysqltest.result
 2966 Bjorn Munch	2011-01-11
      Bug #58900 query_get_value crashes when result begins with dollar sign
      Generalized fix for recursive backtick
      Optional arg to eval_expr telling it not to interpret

    modified:
      client/mysqltest.cc
      mysql-test/r/mysqltest.result
      mysql-test/t/mysqltest.test
 2965 Bjorn Munch	2011-01-11
      Bug #58896 MTR should recognise combinations as experimental without needing wildcards
      Added a pattern match to cover combinations
      Added to readme file

    modified:
      mysql-test/collections/README.experimental
      mysql-test/collections/default.experimental
      mysql-test/lib/mtr_report.pm
 2964 Bjorn Munch	2011-01-11
      Bug #59002 Please make mtr print correct file and line number when tests fail
      This patchs adds printing of a file stack (with line numbers)
      It does not fix the problem of a failure in the non-first iteration of a loop

    modified:
      client/mysqltest.cc
 2963 Bjorn Munch	2011-01-10 [merge]
      merge from 5.1 main

    added:
      mysql-test/suite/innodb_plugin/r/innodb-autoinc-18274.result
      mysql-test/suite/innodb_plugin/t/innodb-autoinc-18274.test
    renamed:
      mysql-test/suite/funcs_1/r/myisam_views.result => mysql-test/suite/funcs_1/r/myisam_views-big.result
      mysql-test/suite/funcs_1/t/myisam_views.test => mysql-test/suite/funcs_1/t/myisam_views-big.test
    modified:
      include/my_pthread.h
      include/my_sys.h
      mysql-test/collections/default.weekly*
      mysql-test/r/auto_increment.result
      mysql-test/suite/engines/funcs/r/rpl_000015.result
      mysql-test/suite/engines/funcs/r/rpl_REDIRECT.result
      mysql-test/suite/engines/funcs/r/rpl_change_master.result
      mysql-test/suite/engines/funcs/r/rpl_empty_master_crash.result
      mysql-test/suite/engines/funcs/r/rpl_flushlog_loop.result
      mysql-test/suite/engines/funcs/r/rpl_loaddata_s.result
      mysql-test/suite/engines/funcs/r/rpl_log_pos.result
      mysql-test/suite/engines/funcs/r/rpl_rbr_to_sbr.result
      mysql-test/suite/engines/funcs/r/rpl_row_drop.result
      mysql-test/suite/engines/funcs/r/rpl_row_inexist_tbl.result
      mysql-test/suite/engines/funcs/r/rpl_row_until.result
      mysql-test/suite/engines/funcs/r/rpl_server_id1.result
      mysql-test/suite/engines/funcs/r/rpl_server_id2.result
      mysql-test/suite/engines/funcs/r/rpl_slave_status.result
      mysql-test/suite/engines/funcs/r/rpl_sp.result
      mysql-test/suite/engines/funcs/r/rpl_switch_stm_row_mixed.result
      mysql-test/suite/engines/funcs/t/disabled.def
      mysql-test/suite/engines/funcs/t/rpl_000015.test
      mysql-test/suite/engines/funcs/t/rpl_REDIRECT.test
      mysql-test/suite/engines/funcs/t/rpl_change_master.test
      mysql-test/suite/engines/funcs/t/rpl_empty_master_crash.test
      mysql-test/suite/engines/funcs/t/rpl_flushlog_loop.test
      mysql-test/suite/engines/funcs/t/rpl_loaddata_s.test
      mysql-test/suite/engines/funcs/t/rpl_log_pos.test
      mysql-test/suite/engines/funcs/t/rpl_rbr_to_sbr.test
      mysql-test/suite/engines/funcs/t/rpl_row_drop.test
      mysql-test/suite/engines/funcs/t/rpl_row_inexist_tbl.test
      mysql-test/suite/engines/funcs/t/rpl_row_until.test
      mysql-test/suite/engines/funcs/t/rpl_server_id1.test
      mysql-test/suite/engines/funcs/t/rpl_server_id2.test
      mysql-test/suite/engines/funcs/t/rpl_slave_status.test
      mysql-test/suite/engines/funcs/t/rpl_switch_stm_row_mixed.test
      mysql-test/suite/engines/iuds/t/insert_year.test
      mysql-test/suite/innodb/t/innodb_bug57255.test
      mysql-test/suite/innodb_plugin/r/innodb.result
      mysql-test/suite/innodb_plugin/t/innodb.test
      mysql-test/suite/innodb_plugin/t/innodb_bug57255.test
      mysql-test/suite/rpl/t/disabled.def
      mysql-test/t/auto_increment.test
      mysys/my_fopen.c
      sql/log.cc
      sql/sql_show.cc
      storage/innobase/btr/btr0btr.c
      storage/innobase/buf/buf0buf.c
      storage/innobase/dict/dict0dict.c
      storage/innobase/dict/dict0mem.c
      storage/innobase/fsp/fsp0fsp.c
      storage/innobase/include/buf0buf.ic
      storage/innobase/log/log0recv.c
      storage/innobase/row/row0mysql.c
      storage/innobase/ut/ut0dbg.c
      storage/innodb_plugin/ChangeLog
      storage/innodb_plugin/btr/btr0btr.c
      storage/innodb_plugin/btr/btr0cur.c
      storage/innodb_plugin/buf/buf0buf.c
      storage/innodb_plugin/buf/buf0lru.c
      storage/innodb_plugin/dict/dict0dict.c
      storage/innodb_plugin/fsp/fsp0fsp.c
      storage/innodb_plugin/handler/ha_innodb.cc
      storage/innodb_plugin/handler/i_s.cc
      storage/innodb_plugin/include/btr0cur.h
      storage/innodb_plugin/include/data0data.h
      storage/innodb_plugin/include/data0data.ic
      storage/innodb_plugin/include/row0upd.h
      storage/innodb_plugin/include/trx0i_s.h
      storage/innodb_plugin/include/univ.i
      storage/innodb_plugin/log/log0recv.c
      storage/innodb_plugin/plug.in
      storage/innodb_plugin/row/row0mysql.c
      storage/innodb_plugin/row/row0purge.c
      storage/innodb_plugin/row/row0umod.c
      storage/innodb_plugin/row/row0upd.c
      storage/innodb_plugin/trx/trx0i_s.c
      storage/innodb_plugin/ut/ut0dbg.c
      mysql-test/suite/funcs_1/t/myisam_views-big.test
=== modified file 'client/mysqltest.cc'
--- a/client/mysqltest.cc	2010-12-29 15:01:07 +0000
+++ b/client/mysqltest.cc	2011-01-11 09:54:42 +0000
@@ -474,7 +474,7 @@ VAR* var_init(VAR* v, const char *name,
 void var_free(void* v);
 VAR* var_get(const char *var_name, const char** var_name_end,
              my_bool raw, my_bool ignore_not_existing);
-void eval_expr(VAR* v, const char *p, const char** p_end, bool backtick= true);
+void eval_expr(VAR* v, const char *p, const char** p_end, bool do_eval= true);
 my_bool match_delimiter(int c, const char *delim, uint length);
 void dump_result_to_reject_file(char *buf, int size);
 void dump_warning_messages();
@@ -1238,6 +1238,17 @@ static void cleanup_and_exit(int exit_co
   exit(exit_code);
 }
 
+void print_file_stack()
+{
+  for (struct st_test_file* err_file= cur_file;
+       err_file != file_stack;
+       err_file--)
+  {
+    fprintf(stderr, "included from %s at line %d:\n",
+            err_file->file_name, err_file->lineno);
+  }
+}
+
 void die(const char *fmt, ...)
 {
   static int dying= 0;
@@ -1257,8 +1268,12 @@ void die(const char *fmt, ...)
   /* Print the error message */
   fprintf(stderr, "mysqltest: ");
   if (cur_file && cur_file != file_stack)
-    fprintf(stderr, "In included file \"%s\": ",
+  {
+    fprintf(stderr, "In included file \"%s\": \n",
             cur_file->file_name);
+    print_file_stack();
+  }
+  
   if (start_lineno > 0)
     fprintf(stderr, "At line %u: ", start_lineno);
   if (fmt)
@@ -1288,20 +1303,14 @@ void die(const char *fmt, ...)
 void abort_not_supported_test(const char *fmt, ...)
 {
   va_list args;
-  struct st_test_file* err_file= cur_file;
   DBUG_ENTER("abort_not_supported_test");
 
   /* Print include filestack */
   fprintf(stderr, "The test '%s' is not supported by this installation\n",
           file_stack->file_name);
   fprintf(stderr, "Detected in file %s at line %d\n",
-          err_file->file_name, err_file->lineno);
-  while (err_file != file_stack)
-  {
-    err_file--;
-    fprintf(stderr, "included from %s at line %d\n",
-            err_file->file_name, err_file->lineno);
-  }
+          cur_file->file_name, cur_file->lineno);
+  print_file_stack();
 
   /* Print error message */
   va_start(args, fmt);
@@ -2362,7 +2371,7 @@ void var_set_query_get_value(struct st_c
         break;
       }
     }
-    eval_expr(var, value, 0);
+    eval_expr(var, value, 0, false);
   }
   dynstr_free(&ds_query);
   mysql_free_result(res);
@@ -2392,12 +2401,16 @@ void var_copy(VAR *dest, VAR *src)
 }
 
 
-void eval_expr(VAR *v, const char *p, const char **p_end, bool backtick)
+void eval_expr(VAR *v, const char *p, const char **p_end, bool do_eval)
 {
 
   DBUG_ENTER("eval_expr");
   DBUG_PRINT("enter", ("p: '%s'", p));
 
+  /* Skip to treat as pure string if no evaluation */
+  if (! do_eval)
+    goto NO_EVAL;
+  
   if (*p == '$')
   {
     VAR *vp;
@@ -2417,7 +2430,7 @@ void eval_expr(VAR *v, const char *p, co
     DBUG_VOID_RETURN;
   }
 
-  if (*p == '`' && backtick)
+  if (*p == '`')
   {
     var_query_set(v, p, p_end);
     DBUG_VOID_RETURN;
@@ -2440,6 +2453,7 @@ void eval_expr(VAR *v, const char *p, co
     }
   }
 
+ NO_EVAL:
   {
     int new_val_len = (p_end && *p_end) ?
       (int) (*p_end - p) : (int) strlen(p);

=== modified file 'mysql-test/collections/README.experimental'
--- a/mysql-test/collections/README.experimental	2009-08-13 13:29:19 +0000
+++ b/mysql-test/collections/README.experimental	2011-01-11 09:53:22 +0000
@@ -15,9 +15,13 @@ The syntax is as follows:
    and any subsequent characters are ignored.
 
 4) The full test case name including the suite and execution mode
-   must be specified, for example:
+   may be specified, for example:
         main.alias 'row'     # bug#00000
 
+4b) Now, combinations will also be covered if only the test name is
+    specified, for example:
+        rpl.rpl_ps       # Covers 'row', 'mix' and 'stmt'
+
 5) As an exception to item 4, the last character of the test case
    specification may be an asterisk (*). In that case, all test cases that
    start with the same characters up to the last letter before the asterisk

=== modified file 'mysql-test/collections/default.experimental'
--- a/mysql-test/collections/default.experimental	2010-10-27 04:24:04 +0000
+++ b/mysql-test/collections/default.experimental	2011-01-11 09:53:22 +0000
@@ -21,7 +21,7 @@ main.outfile_loaddata @solaris
 
 ndb.*                                    # joro : NDB tests marked as experimental as agreed with bochklin
 
-rpl.rpl_innodb_bug28430*  @solaris       # Bug#46029
+rpl.rpl_innodb_bug28430   @solaris       # Bug#46029
 rpl.rpl_row_sp011         @solaris       # Joro : Bug #54138
 
 rpl_ndb.*                                # joro : NDB tests marked as experimental as agreed with bochklin

=== modified file 'mysql-test/lib/mtr_report.pm'
--- a/mysql-test/lib/mtr_report.pm	2010-06-10 08:34:16 +0000
+++ b/mysql-test/lib/mtr_report.pm	2011-01-11 09:53:22 +0000
@@ -129,7 +129,8 @@ sub mtr_report_test ($) {
       # Find out if this test case is an experimental one, so we can treat
       # the failure as an expected failure instead of a regression.
       for my $exp ( @$::experimental_test_cases ) {
-        if ( $exp ne $test_name ) {
+	# Include pattern match for combinations
+        if ( $exp ne $test_name && $test_name !~ /^$exp / ) {
           # if the expression is not the name of this test case, but has
           # an asterisk at the end, determine if the characters up to
           # but excluding the asterisk are the same

=== modified file 'mysql-test/r/mysqltest.result'
--- a/mysql-test/r/mysqltest.result	2010-12-16 14:40:52 +0000
+++ b/mysql-test/r/mysqltest.result	2011-01-11 14:00:21 +0000
@@ -311,12 +311,33 @@ failing query in let
 create table t1 (a varchar(100));
 insert into t1 values ('`select 42`');
 `select 42`
+insert into t1 values ('$dollar');
+$dollar
+`select 42`
 drop table t1;
 mysqltest: At line 1: Error running query 'failing query': 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'failing query' at line 1
 mysqltest: At line 1: Missing required argument 'filename' to command 'source'
 mysqltest: At line 1: Could not open './non_existingFile' for reading, errno: 2
-mysqltest: In included file "MYSQLTEST_VARDIR/tmp/recursive.sql": At line 1: Source directives are nesting too deep
-mysqltest: In included file "MYSQLTEST_VARDIR/tmp/error.sql": At line 1: query 'garbage ' failed: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1
+mysqltest: In included file "MYSQLTEST_VARDIR/tmp/recursive.sql": 
+included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
+included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
+included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
+included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
+included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
+included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
+included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
+included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
+included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
+included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
+included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
+included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
+included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
+included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
+included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
+At line 1: Source directives are nesting too deep
+mysqltest: In included file "MYSQLTEST_VARDIR/tmp/error.sql": 
+included from MYSQLTEST_VARDIR/tmp/error.sql at line 1:
+At line 1: query 'garbage ' failed: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1
 
 2 = outer loop variable after while
 here is the sourced script
@@ -410,7 +431,9 @@ Beta is true
 while with string, only once
 1
 Testing while with not
-mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest_while.inc": At line 64: Nesting too deeply
+mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest_while.inc": 
+included from MYSQLTEST_VARDIR/tmp/mysqltest_while.inc at line 65:
+At line 64: Nesting too deeply
 mysqltest: At line 1: missing '(' in while
 mysqltest: At line 1: missing ')' in while
 mysqltest: At line 1: Missing '{' after while. Found "dec $i"
@@ -459,8 +482,12 @@ mysqltest: At line 1: query 'connect  co
 mysqltest: At line 1: Illegal argument for port: 'illegal_port'
 mysqltest: At line 1: Illegal option to connect: SMTP
 200 connects succeeded
-mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql": At line 3: connection 'test_con1' not found in connection pool
-mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql": At line 2: Connection test_con1 already exists
+mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql": 
+included from MYSQLTEST_VARDIR/tmp/mysqltest.sql at line 3:
+At line 3: connection 'test_con1' not found in connection pool
+mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql": 
+included from MYSQLTEST_VARDIR/tmp/mysqltest.sql at line 2:
+At line 2: Connection test_con1 already exists
 show tables;
 ERROR 3D000: No database selected
 connect  con1,localhost,root,,;

=== modified file 'mysql-test/t/mysqltest.test'
--- a/mysql-test/t/mysqltest.test	2010-12-16 14:40:52 +0000
+++ b/mysql-test/t/mysqltest.test	2011-01-11 09:54:42 +0000
@@ -859,6 +859,12 @@ insert into t1 values ('`select 42`');
 let $a= `select * from t1`;
 # This should output `select 42`, not evaluate it again to 42
 echo $a;
+insert into t1 values ('$dollar');
+# These should also output the string without evaluating it.
+let $a= query_get_value(select * from t1 order by a, a, 1);
+echo $a;
+let $a= query_get_value(select * from t1 order by a, a, 2);
+echo $a;
 drop table t1;
 
 --error 1

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-mtr branch (bjorn.munch:2963 to 2967) Bug#59002Bjorn Munch12 Jan