List:Commits« Previous MessageNext Message »
From:msvensson Date:December 13 2005 5:07pm
Subject:bk commit into 5.0 tree (msvensson:1.1972)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.1972 05/12/13 18:07:13 msvensson@neptunus.(none) +3 -0
  Fix tests after merge
  Straighten out and comment behaviour for --require and --result in run_query

  mysql-test/t/mysqltest.test
    1.23 05/12/13 18:07:08 msvensson@neptunus.(none) +9 -9
    Fix up tests and results after merge

  mysql-test/r/mysqltest.result
    1.19 05/12/13 18:07:08 msvensson@neptunus.(none) +7 -8
    Fix up tests and results after merge

  client/mysqltest.c
    1.185 05/12/13 18:07:08 msvensson@neptunus.(none) +18 -14
     If --require or --result has been provided for a query command->record_file file be set.
    In that case it should either dump to file if recording or check with content in file if running.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	msvensson
# Host:	neptunus.(none)
# Root:	/home/msvensson/mysql/wl2930/my50-wl2930-integration

--- 1.18/mysql-test/r/mysqltest.result	2005-12-12 12:43:27 +01:00
+++ 1.19/mysql-test/r/mysqltest.result	2005-12-13 18:07:08 +01:00
@@ -396,20 +396,20 @@
 --------------------------------------------------------------------------------
 this will be executed
 this will be executed
+mysqltest: Result length mismatch
+mysqltest: The test didn't produce any output
+Failing multi statement query
 mysqltest: At line 3: query 'create table t1 (a int primary key);
 insert into t1 values (1);
 select 'select-me';
 insertz 'error query'' 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 'insertz 'error query'' at line 1
 drop table t1;
-drop table t1;
-create table t1 (a int primary key);
+mysqltest: At line 3: query 'create table t1 (a int primary key);
 insert into t1 values (1);
 select 'select-me';
-insertz error query||||
-select-me
-select-me
-ERROR 42000: 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 'insertz error query' at line 1
+insertz 'error query'' 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 'insertz 'error query'' at line 1
 drop table t1;
+Multi statement using expected error
 create table t1 (a int primary key);
 insert into t1 values (1);
 select 'select-me';
@@ -418,5 +418,4 @@
 select-me
 ERROR 42000: 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 'insertz error query' at line 1
 drop table t1;
-mysqltest: Result length mismatch
-mysqltest: The test didn't produce any output
+drop table t1;

--- 1.22/mysql-test/t/mysqltest.test	2005-12-12 12:43:27 +01:00
+++ 1.23/mysql-test/t/mysqltest.test	2005-12-13 18:07:08 +01:00
@@ -984,7 +984,7 @@
 #            non-1st queries
 #
 
-# Failing multi statement query
+echo Failing multi statement query;
 # PS does not support multi statement
 --exec echo "--disable_ps_protocol"                    > var/tmp/bug11731.sql
 --exec echo "delimiter ||||;"                         >> var/tmp/bug11731.sql
@@ -999,14 +999,13 @@
 drop table t1;
 
 --error 1
---exec $MYSQL_TEST --record -x $MYSQL_TEST_DIR/var/tmp/bug11731.sql -R $MYSQL_TEST_DIR/var/tmp/bug11731.out
-# The .out file should be empty, cat will fail!
---error 1
---exec cat $MYSQL_TEST_DIR/var/tmp/bug11731.out
+--exec $MYSQL_TEST --record -x $MYSQL_TEST_DIR/var/tmp/bug11731.sql -R $MYSQL_TEST_DIR/var/tmp/bug11731.out 2>&1
+# The .out file should be non existent
+--exec test ! -e $MYSQL_TEST_DIR/var/tmp/bug11731.out
 drop table t1;
 
 
-# Using expected error
+echo Multi statement using expected error;
 # PS does not support multi statement
 --exec echo "--disable_ps_protocol"                    > var/tmp/bug11731.sql
 --exec echo "delimiter ||||;"                         >> var/tmp/bug11731.sql
@@ -1018,11 +1017,12 @@
 --exec echo "delimiter ;||||"                         >> var/tmp/bug11731.sql
 
 # These two should work since the error is expected
---exec $MYSQL_TEST -x $MYSQL_TEST_DIR/var/tmp/bug11731.sql  2>&1
+--exec $MYSQL_TEST -x $MYSQL_TEST_DIR/var/tmp/bug11731.sql 2>&1
 drop table t1;
 
---exec $MYSQL_TEST --record -x $MYSQL_TEST_DIR/var/tmp/bug11731.sql -R $MYSQL_TEST_DIR/var/tmp/bug11731.out
---exec cat $MYSQL_TEST_DIR/var/tmp/bug11731.out
+--exec $MYSQL_TEST --record -x $MYSQL_TEST_DIR/var/tmp/bug11731.sql -R $MYSQL_TEST_DIR/var/tmp/bug11731.out 2>&1
+# The .out file should exist
+--exec test -s $MYSQL_TEST_DIR/var/tmp/bug11731.out
 drop table t1;
 
 

--- 1.184/client/mysqltest.c	2005-12-12 12:42:02 +01:00
+++ 1.185/client/mysqltest.c	2005-12-13 18:07:08 +01:00
@@ -3925,22 +3925,26 @@
 	  mysql_errno(mysql), mysql_error(mysql));
   }
 
-  if (record)
+  if (command->record_file[0])
   {
-    /* Recording in progress */
-    if (!command->record_file[0])
-      die("Missing result file");
 
-    /* Dump the output from _this_ query to the specified record_file */
-    str_to_file(command->record_file, ds->str, ds->length);
-  }
-  else if (command->record_file[0])
-  {
-    /*
-      The output from _this_ query should be checked against an already
-      existing file which has been specified using --require or --result
-     */
-    check_result(ds, command->record_file, command->require_file);
+    /* A result file was specified for _this_ query  */
+    if (record)
+    {
+      /*
+	 Recording in progress
+         Dump the output from _this_ query to the specified record_file
+      */
+      str_to_file(command->record_file, ds->str, ds->length);
+
+    } else {
+
+      /*
+	The output from _this_ query should be checked against an already
+	existing file which has been specified using --require or --result
+      */
+      check_result(ds, command->record_file, command->require_file);
+    }
   }
 
   dynstr_free(&ds_warnings);
Thread
bk commit into 5.0 tree (msvensson:1.1972)msvensson13 Dec