List:Commits« Previous MessageNext Message »
From:Bjorn Munch Date:September 20 2010 9:11am
Subject:bzr commit into mysql-next-mr-mtr branch (bjorn.munch:2979)
View as plain text  
#At file:///home/bm136801/my/mtr-nx/ based on revid:bjorn.munch@stripped

 2979 Bjorn Munch	2010-09-20 [merge]
      upmerge 56753,56787

    modified:
      client/mysqltest.cc
      mysql-test/lib/mtr_report.pm
      mysql-test/r/mysqltest.result
      mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test
      mysql-test/suite/sys_vars/t/div_precision_increment_func.test
      mysql-test/t/mysqltest.test
=== modified file 'client/mysqltest.cc'
--- a/client/mysqltest.cc	2010-09-14 12:49:32 +0000
+++ b/client/mysqltest.cc	2010-09-20 09:11:31 +0000
@@ -2185,8 +2185,14 @@ void var_query_set(VAR *var, const char
   DBUG_ENTER("var_query_set");
   LINT_INIT(res);
 
+  /* Only white space or ) allowed past ending ` */
   while (end > query && *end != '`')
+  {
+    if (*end && (*end != ' ' && *end != '\t' && *end != '\n' && *end != ')'))
+      die("Spurious text after `query` expression");
     --end;
+  }
+
   if (query == end)
     die("Syntax error in query, missing '`'");
   ++query;

=== 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	2010-09-20 08:12:39 +0000
@@ -229,7 +229,8 @@ sub mtr_report_stats ($$;$) {
   # Find out how we where doing
   # ----------------------------------------------------------------------
 
-  my $tot_skiped= 0;
+  my $tot_skipped= 0;
+  my $tot_skipdetect= 0;
   my $tot_passed= 0;
   my $tot_failed= 0;
   my $tot_tests=  0;
@@ -246,8 +247,9 @@ sub mtr_report_stats ($$;$) {
     }
     elsif ( $tinfo->{'result'} eq 'MTR_RES_SKIPPED' )
     {
-      # Test was skipped
-      $tot_skiped++;
+      # Test was skipped (disabled not counted)
+      $tot_skipped++ unless $tinfo->{'disable'};
+      $tot_skipdetect++ if $tinfo->{'skip_detected_by_test'};
     }
     elsif ( $tinfo->{'result'} eq 'MTR_RES_PASSED' )
     {
@@ -376,6 +378,9 @@ sub mtr_report_stats ($$;$) {
     print "All $tot_tests tests were successful.\n\n";
   }
 
+  print "$tot_skipped tests were skipped, ".
+    "$tot_skipdetect by the test itself.\n\n" if $tot_skipped;
+
   if ( $tot_failed != 0 || $found_problems)
   {
     mtr_error("there were failing test cases") unless $dont_error;

=== modified file 'mysql-test/r/mysqltest.result'
--- a/mysql-test/r/mysqltest.result	2010-09-02 08:06:12 +0000
+++ b/mysql-test/r/mysqltest.result	2010-09-20 09:11:31 +0000
@@ -177,6 +177,9 @@ mysqltest: At line 1: End of line junk d
 "
 mysqltest: At line 1: Extra delimiter ";" found
 mysqltest: At line 1: Extra delimiter ";" found
+mysqltest: At line 1: Spurious text after `query` expression
+mysqltest: At line 1: Spurious text after `query` expression
+mysqltest: At line 2: Spurious text after `query` expression
 mysqltest: At line 1: Missing argument(s) to 'error'
 mysqltest: At line 1: Missing argument(s) to 'error'
 mysqltest: At line 1: The sqlstate definition must start with an uppercase S

=== modified file 'mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test'
--- a/mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test	2010-01-14 10:49:40 +0000
+++ b/mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test	2010-09-15 12:56:22 +0000
@@ -205,7 +205,7 @@ DROP TABLE `t1`;
 
 -- echo === Using mysqlbinlog to detect failure. Before the patch mysqlbinlog would find a corrupted event, thence would fail.
 
--- let $MYSQLD_DATADIR= `SELECT @@datadir`;
+-- let $MYSQLD_DATADIR= `SELECT @@datadir`
 -- exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug42749.binlog
 -- remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug42749.binlog
 
@@ -330,7 +330,7 @@ while($ntables)
 -- echo ### assertion: check that binlog is not corrupt. Using mysqlbinlog to 
 -- echo ###            detect failure. Before the patch mysqlbinlog would find 
 -- echo ###            a corrupted event, thence would fail.
--- let $MYSQLD_DATADIR= `SELECT @@datadir`;
+-- let $MYSQLD_DATADIR= `SELECT @@datadir`
 -- exec $MYSQL_BINLOG -v --hex $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug50018.binlog
 
 ## clean up

=== modified file 'mysql-test/suite/sys_vars/t/div_precision_increment_func.test'
--- a/mysql-test/suite/sys_vars/t/div_precision_increment_func.test	2009-12-22 09:35:56 +0000
+++ b/mysql-test/suite/sys_vars/t/div_precision_increment_func.test	2010-09-20 08:21:55 +0000
@@ -19,7 +19,7 @@
 #                                                                              #
 ################################################################################
 
-let $save_div_precision_increment = `SELECT @@global.div_precision_increment`
+let $save_div_precision_increment = `SELECT @@global.div_precision_increment`;
  
 #SET @save_div_precision_increment = @@global.div_precision_increment;
 

=== modified file 'mysql-test/t/mysqltest.test'
--- a/mysql-test/t/mysqltest.test	2010-09-02 08:06:12 +0000
+++ b/mysql-test/t/mysqltest.test	2010-09-20 09:11:31 +0000
@@ -494,6 +494,23 @@ remove_file $MYSQLTEST_VARDIR/tmp/mysqlt
 --error 1
 --exec echo "--disable_query_log;" | $MYSQL_TEST 2>&1
 
+#
+# Extra text after ``
+#
+--error 1
+-- exec echo "let \$x= \`select 1\` BOO ;" | $MYSQL_TEST 2>&1
+--error 1
+-- exec echo "--let \$x= \`select 1\`;" | $MYSQL_TEST 2>&1
+--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
+# Missing ; in next line should be detected and cause failure
+let $x= `select 1`
+let $x= 2;
+echo $x;
+EOF
+--error 1
+--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1
+remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql;
+
 
 # Allow trailing # comment
 --sleep 1 # Wait for insert delayed to be executed.


Attachment: [text/bzr-bundle] bzr/bjorn.munch@oracle.com-20100920091131-z7ygz1a2nftixufd.bundle
Thread
bzr commit into mysql-next-mr-mtr branch (bjorn.munch:2979) Bjorn Munch20 Sep