List:Commits« Previous MessageNext Message »
From:Mattias Jonsson Date:January 26 2011 8:15pm
Subject:bzr push into mysql-trunk branch (mattias.jonsson:3555 to 3556)
View as plain text  
 3556 Mattias Jonsson	2011-01-26 [merge]
      merge

    modified:
      client/mysqltest.cc
      mysql-test/r/partition_error.result
      mysql-test/t/partition_error.test
 3555 Marc Alff	2011-01-26
      Used the correct test name in default.experimental for debug_env

    modified:
      mysql-test/collections/default.experimental
=== modified file 'client/mysqltest.cc'
--- a/client/mysqltest.cc	2011-01-18 11:09:49 +0000
+++ b/client/mysqltest.cc	2011-01-26 20:13:31 +0000
@@ -7563,8 +7563,12 @@ void run_query_stmt(MYSQL *mysql, struct
 
       mysql_free_result(res);     /* Free normal result set with meta data */
 
-      /* Clear prepare warnings */
-      dynstr_set(&ds_prepare_warnings, NULL);
+      /*
+        Clear prepare warnings if there are execute warnings,
+        since they are probably duplicated.
+      */
+      if (ds_execute_warnings.length || mysql->warning_count)
+        dynstr_set(&ds_prepare_warnings, NULL);
     }
     else
     {

=== modified file 'mysql-test/r/partition_error.result'
--- a/mysql-test/r/partition_error.result	2011-01-10 16:37:47 +0000
+++ b/mysql-test/r/partition_error.result	2011-01-26 20:13:31 +0000
@@ -1,5 +1,18 @@
 drop table if exists t1, t2;
 #
+# Bug#57924: crash when creating partitioned table with
+#            multiple columns in the partition key
+#
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a,b))
+PARTITION BY KEY(a, b, a);
+ERROR HY000: Duplicate partition field name 'a'
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a,b))
+PARTITION BY KEY(A, b);
+DROP TABLE t1;
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a,b))
+PARTITION BY KEY(a, b, A);
+ERROR HY000: Duplicate partition field name 'a'
+#
 # Bug#54483: valgrind errors when making warnings for multiline inserts
 #            into partition
 #

=== modified file 'mysql-test/t/partition_error.test'
--- a/mysql-test/t/partition_error.test	2011-01-10 16:37:47 +0000
+++ b/mysql-test/t/partition_error.test	2011-01-26 20:13:31 +0000
@@ -11,6 +11,21 @@ drop table if exists t1, t2;
 let $MYSQLD_DATADIR= `SELECT @@datadir`;
 
 --echo #
+--echo # Bug#57924: crash when creating partitioned table with
+--echo #            multiple columns in the partition key
+--echo #
+--error ER_SAME_NAME_PARTITION_FIELD
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a,b))
+PARTITION BY KEY(a, b, a);
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a,b))
+PARTITION BY KEY(A, b);
+DROP TABLE t1;
+--error ER_SAME_NAME_PARTITION_FIELD
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a,b))
+PARTITION BY KEY(a, b, A);
+
+
+--echo #
 --echo # Bug#54483: valgrind errors when making warnings for multiline inserts
 --echo #            into partition
 --echo #
@@ -670,7 +685,6 @@ PARTITION BY HASH (TIME_TO_SEC(a));
 CREATE TABLE t1 (a INT)
 PARTITION BY HASH (TIME_TO_SEC(a));
 
-
 --echo #
 --echo # Bug#50036: Inconsistent errors when using TIMESTAMP
 --echo #            columns/expressions

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (mattias.jonsson:3555 to 3556) Mattias Jonsson26 Jan