List:Commits« Previous MessageNext Message »
From:Mattias Jonsson Date:December 17 2010 12:50pm
Subject:bzr push into mysql-trunk branch (mattias.jonsson:3210 to 3211) WL#5217
View as plain text  
 3211 Mattias Jonsson	2010-12-17
      WL#5217: Add explicit partition selection
      
      pre-push test fixes
     @ mysql-test/suite/parts/t/partition_debug_myisam.test
        Disable the test on embedded, since restart does not work.
     @ mysql-test/t/wl5217.test
        Set the default storage engine to InnoDB, to pass on embedded.
     @ sql/partition_info.cc
        Wrong order of DBUG_ASSERT, and an assert that was not correct.

    added:
      mysql-test/collections/mysql-trunk-wl5217.push
    modified:
      mysql-test/r/wl5217.result
      mysql-test/suite/parts/t/partition_debug_myisam.test
      mysql-test/t/wl5217.test
      sql/partition_info.cc
 3210 Mattias Jonsson	2010-12-14 [merge]
      merge

    added:
      mysql-test/r/wl2682.result
      mysql-test/r/wl5217.result
      mysql-test/t/wl2682.test
      mysql-test/t/wl5217.test
    modified:
      include/my_base.h
      mysql-test/r/partition_exchange.result
      mysql-test/suite/parts/r/partition_exch_qa_13.result
      mysql-test/suite/parts/r/partition_exch_qa_2.result
      mysql-test/suite/parts/r/partition_mgm_lc0_archive.result
      mysql-test/suite/parts/r/partition_mgm_lc0_innodb.result
      mysql-test/suite/parts/r/partition_mgm_lc0_memory.result
      mysql-test/suite/parts/r/partition_mgm_lc0_myisam.result
      mysql-test/suite/parts/r/partition_mgm_lc1_archive.result
      mysql-test/suite/parts/r/partition_mgm_lc1_innodb.result
      mysql-test/suite/parts/r/partition_mgm_lc1_memory.result
      mysql-test/suite/parts/r/partition_mgm_lc1_myisam.result
      mysql-test/suite/parts/r/partition_mgm_lc2_archive.result
      mysql-test/suite/parts/r/partition_mgm_lc2_innodb.result
      mysql-test/suite/parts/r/partition_mgm_lc2_memory.result
      mysql-test/suite/parts/r/partition_mgm_lc2_myisam.result
      mysql-test/suite/parts/r/partition_repair_myisam.result
      mysql-test/suite/parts/t/partition_repair_myisam.test
      mysys/hash.c
      mysys/my_handler.c
      mysys/my_handler_errors.h
      sql/ha_partition.cc
      sql/ha_partition.h
      sql/handler.cc
      sql/handler.h
      sql/mysqld.cc
      sql/opt_range.cc
      sql/partition_info.cc
      sql/partition_info.h
      sql/share/errmsg-utf8.txt
      sql/sql_base.cc
      sql/sql_class.h
      sql/sql_lex.cc
      sql/sql_lex.h
      sql/sql_parse.cc
      sql/sql_partition.cc
      sql/sql_yacc.yy
      sql/table.cc
      sql/table.h
=== added file 'mysql-test/collections/mysql-trunk-wl5217.push'
--- a/mysql-test/collections/mysql-trunk-wl5217.push	1970-01-01 00:00:00 +0000
+++ b/mysql-test/collections/mysql-trunk-wl5217.push	2010-12-17 12:48:18 +0000
@@ -0,0 +1,8 @@
+perl mysql-test-run.pl --suite=main,sys_vars,binlog,federated,rpl,innodb,perfschema,parts --force --timer --parallel=auto --comment=normal  --skip-ndbcluster --report-features --experimental=collections/default.experimental
+perl mysql-test-run.pl --suite=main,sys_vars,binlog,federated,rpl,innodb,perfschema,parts --force --timer --parallel=auto --comment=ps --skip-ndbcluster --ps-protocol --experimental=collections/default.experimental
+perl mysql-test-run.pl --force --timer --parallel=auto --comment=funcs1+ps  --suite=funcs_1 --ps-protocol --experimental=collections/default.experimental
+perl mysql-test-run.pl --force --timer --parallel=auto --comment=funcs2     --suite=funcs_2 --experimental=collections/default.experimental
+perl mysql-test-run.pl --force --timer --parallel=auto --comment=stress     --suite=stress  --experimental=collections/default.experimental
+perl mysql-test-run.pl --force --timer --parallel=auto --comment=jp         --suite=jp      --experimental=collections/default.experimental
+perl mysql-test-run.pl --suite=main,sys_vars,binlog,federated,rpl,innodb,perfschema,parts --force --timer --parallel=auto --comment=embedded  --embedded-server --skip-rpl --skip-ndbcluster --experimental=collections/default.experimental
+perl mysql-test-run.pl --suite=main,sys_vars,binlog,federated,rpl,innodb,perfschema,parts --force --timer --parallel=auto --comment=debug --skip-ndbcluster --skip-rpl --report-features --experimental=collections/default.experimental

=== modified file 'mysql-test/r/wl5217.result'
--- a/mysql-test/r/wl5217.result	2010-12-14 15:13:57 +0000
+++ b/mysql-test/r/wl5217.result	2010-12-17 12:48:18 +0000
@@ -1,3 +1,7 @@
+# Must have InnoDB as engine to get the same statistics results.
+# embedded uses MyISAM as default. CREATE SELECT uses the default engine.
+SET @old_default_storage_engine = @@default_storage_engine;
+SET @@default_storage_engine = 'InnoDB';
 # Original tests for WL#5217
 # TODO: benchmark what value to use for MAX_PARTITIONS_BEFORE_HASH
 # Test to show if I_S affects HANDLER_ counts
@@ -1095,3 +1099,4 @@ HANDLER_WRITE	17
 SELECT * FROM t3 PARTITION (pNeg);
 ERROR HY000: PARTITION () clause on non partitioned table
 DROP TABLE t1, t2, t3;
+SET @@default_storage_engine = @old_default_storage_engine;

=== modified file 'mysql-test/suite/parts/t/partition_debug_myisam.test'
--- a/mysql-test/suite/parts/t/partition_debug_myisam.test	2010-08-13 07:50:25 +0000
+++ b/mysql-test/suite/parts/t/partition_debug_myisam.test	2010-12-17 12:48:18 +0000
@@ -4,6 +4,8 @@
 --source include/have_debug.inc
 --source include/have_partition.inc
 --source include/not_valgrind.inc
+# Crash tests don't work with embedded
+--source include/not_embedded.inc
 
 --disable_warnings
 DROP TABLE IF EXISTS t1;

=== modified file 'mysql-test/t/wl5217.test'
--- a/mysql-test/t/wl5217.test	2010-12-14 15:13:57 +0000
+++ b/mysql-test/t/wl5217.test	2010-12-17 12:48:18 +0000
@@ -1,24 +1,14 @@
 --source include/have_innodb.inc
 --source include/have_partition.inc
 
+--echo # Must have InnoDB as engine to get the same statistics results.
+--echo # embedded uses MyISAM as default. CREATE SELECT uses the default engine.
+SET @old_default_storage_engine = @@default_storage_engine;
+SET @@default_storage_engine = 'InnoDB';
+
 --echo # Original tests for WL#5217
 --echo # TODO: benchmark what value to use for MAX_PARTITIONS_BEFORE_HASH
 
-#let $get_handler_write_status_counts= SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
-#WHERE (VARIABLE_NAME = 'HANDLER_EXTERNAL_LOCK' OR
-#VARIABLE_NAME = 'HANDLER_WRITE') AND
-#VARIABLE_VALUE > 0;
-#let $get_handler_read_status_counts= SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
-#WHERE (VARIABLE_NAME = 'HANDLER_EXTERNAL_LOCK' OR
-#VARIABLE_NAME LIKE 'HANDLER_READ_%') AND
-#VARIABLE_VALUE > 0;
-#let $get_handler_status_counts= SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
-#WHERE (VARIABLE_NAME = 'HANDLER_EXTERNAL_LOCK' OR
-#VARIABLE_NAME = 'HANDLER_UPDATE' OR
-#VARIABLE_NAME = 'HANDLER_DELETE' OR
-#VARIABLE_NAME = 'HANDLER_WRITE' OR
-#VARIABLE_NAME LIKE 'HANDLER_READ_%') AND
-#VARIABLE_VALUE > 0;
 let $get_handler_status_counts= SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
 WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
 
@@ -504,3 +494,4 @@ eval $get_handler_status_counts;
 SELECT * FROM t3 PARTITION (pNeg);
 
 DROP TABLE t1, t2, t3;
+SET @@default_storage_engine = @old_default_storage_engine;

=== modified file 'sql/partition_info.cc'
--- a/sql/partition_info.cc	2010-12-14 20:03:21 +0000
+++ b/sql/partition_info.cc	2010-12-17 12:48:18 +0000
@@ -101,8 +101,8 @@ bool partition_info::prune_partition_bit
   DBUG_ENTER("partition_info::prune_partition_bitmaps");
 
   DBUG_ASSERT(table && table->s && table->s->ha_part_data);
-  DBUG_ASSERT(part_name_hash->records);
   part_name_hash= &table->s->ha_part_data->partition_name_hash;
+  DBUG_ASSERT(part_name_hash->records);
   if (num_names < 1)
     DBUG_RETURN(true);
 
@@ -645,12 +645,13 @@ char *partition_info::has_unique_names()
   partition_element *el;  
 
   DBUG_ENTER("partition_info::has_unique_names");
+  
   /*
-    Only called before the table is created.
-    If table->s exists one could use the partition_name_hash there instead.
+    TODO: If table->s->ha_part_data->partition_name_hash.elements is > 0,
+    then we could just return NULL, but that has not been verified.
+    And this only happens when in ALTER TABLE with full table copy.
   */
-  DBUG_ASSERT(!table || !table->s);
-  
+
   max_names= num_parts;
   if (is_sub_partitioned())
     max_names+= num_parts * num_subparts;

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (mattias.jonsson:3210 to 3211) WL#5217Mattias Jonsson17 Dec