List:Commits« Previous MessageNext Message »
From:Mattias Jonsson Date:November 16 2010 1:09am
Subject:bzr push into mysql-5.1-bugteam branch (mattias.jonsson:3504 to 3506)
View as plain text  
 3506 Mattias Jonsson	2010-11-15 [merge]
      merge

    modified:
      mysql-test/collections/default.weekly
      mysql-test/r/variables-big.result
      mysql-test/suite/parts/t/part_supported_sql_func_innodb.test
      mysql-test/suite/parts/t/partition_alter1_1_2_innodb.test
      mysql-test/suite/parts/t/partition_alter1_2_innodb.test
      mysql-test/suite/parts/t/partition_alter4_innodb.test
      mysql-test/t/disabled.def
      mysql-test/t/variables-big.test
 3505 Mattias Jonsson	2010-11-15 [merge]
      merge

    modified:
      mysql-test/suite/parts/inc/partition_auto_increment.inc
      mysql-test/suite/parts/r/partition_auto_increment_blackhole.result
      mysql-test/suite/parts/r/partition_auto_increment_innodb.result
      mysql-test/suite/parts/r/partition_auto_increment_memory.result
      mysql-test/suite/parts/r/partition_auto_increment_myisam.result
      sql/ha_partition.cc
 3504 Sergey Vojtovich	2010-11-11
      BUG#58079 - Remove the IBM DB2 storage engine

    removed:
      mysql-test/suite/ibmdb2i/
      mysql-test/suite/ibmdb2i/include/
      mysql-test/suite/ibmdb2i/include/have_i54.inc
      mysql-test/suite/ibmdb2i/include/have_i61.inc
      mysql-test/suite/ibmdb2i/include/have_ibmdb2i.inc
      mysql-test/suite/ibmdb2i/r/
      mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_44020.result
      mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_44025.result
      mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_44232.result
      mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_44610.result
      mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_45196.result
      mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_45793.result
      mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_45983.result
      mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_49329.result
      mysql-test/suite/ibmdb2i/r/ibmdb2i_collations.result
      mysql-test/suite/ibmdb2i/t/
      mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_44020.test
      mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_44025.test
      mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_44232.test
      mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_44610.test
      mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_45196.test
      mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_45793.test
      mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_45983.test
      mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_49329.test
      mysql-test/suite/ibmdb2i/t/ibmdb2i_collations.test
      storage/ibmdb2i/
      storage/ibmdb2i/CMakeLists.txt
      storage/ibmdb2i/Makefile.am
      storage/ibmdb2i/db2i_blobCollection.cc
      storage/ibmdb2i/db2i_blobCollection.h
      storage/ibmdb2i/db2i_charsetSupport.cc
      storage/ibmdb2i/db2i_charsetSupport.h
      storage/ibmdb2i/db2i_collationSupport.cc
      storage/ibmdb2i/db2i_collationSupport.h
      storage/ibmdb2i/db2i_constraints.cc
      storage/ibmdb2i/db2i_conversion.cc
      storage/ibmdb2i/db2i_errors.cc
      storage/ibmdb2i/db2i_errors.h
      storage/ibmdb2i/db2i_file.cc
      storage/ibmdb2i/db2i_file.h
      storage/ibmdb2i/db2i_global.h
      storage/ibmdb2i/db2i_iconv.h
      storage/ibmdb2i/db2i_ileBridge.cc
      storage/ibmdb2i/db2i_ileBridge.h
      storage/ibmdb2i/db2i_ioBuffers.cc
      storage/ibmdb2i/db2i_ioBuffers.h
      storage/ibmdb2i/db2i_misc.h
      storage/ibmdb2i/db2i_myconv.cc
      storage/ibmdb2i/db2i_myconv.h
      storage/ibmdb2i/db2i_rir.cc
      storage/ibmdb2i/db2i_safeString.h
      storage/ibmdb2i/db2i_sqlStatementStream.cc
      storage/ibmdb2i/db2i_sqlStatementStream.h
      storage/ibmdb2i/db2i_validatedPointer.h
      storage/ibmdb2i/ha_ibmdb2i.cc
      storage/ibmdb2i/ha_ibmdb2i.h
      storage/ibmdb2i/plug.in
=== modified file 'mysql-test/collections/default.weekly'
--- a/mysql-test/collections/default.weekly	2009-02-24 10:42:11 +0000
+++ b/mysql-test/collections/default.weekly	2010-11-15 15:17:38 +0000
@@ -0,0 +1,2 @@
+perl mysql-test-run.pl --timer --force --comment=1st       --experimental=collections/default.experimental 1st
+perl mysql-test-run.pl --timer --force --comment=big-tests --experimental=collections/default.experimental --vardir=var-big-tests --big-test --testcase-timeout=60 --suite-timeout=600 parts.partition_alter1_2_ndb parts.part_supported_sql_func_innodb parts.partition_alter1_2_innodb parts.partition_alter4_innodb parts.partition_alter1_1_2_ndb parts.partition_alter1_1_2_innodb parts.partition_alter1_1_ndb large_tests.alter_table rpl_ndb.rpl_truncate_7ndb_2 main.archive-big main.sum_distinct-big main.mysqlbinlog_row_big main.alter_table-big main.variables-big main.type_newdecimal-big main.read_many_rows_innodb main.log_tables-big main.count_distinct3 main.events_time_zone main.merge-big main.create-big main.events_stress main.ssl-big

=== modified file 'mysql-test/r/variables-big.result'
--- a/mysql-test/r/variables-big.result	2009-03-30 10:03:25 +0000
+++ b/mysql-test/r/variables-big.result	2010-11-15 15:17:38 +0000
@@ -1,20 +1,20 @@
 SET SESSION transaction_prealloc_size=1024*1024*1024*1;
 SHOW PROCESSLIST;
 Id	User	Host	db	Command	Time	State	Info
-<Id>	root	localhost	test	Query	<Time>	NULL	SHOW PROCESSLIST
+<Id>	root	<Host>	test	Query	<Time>	NULL	SHOW PROCESSLIST
 SET SESSION transaction_prealloc_size=1024*1024*1024*2;
 SHOW PROCESSLIST;
 Id	User	Host	db	Command	Time	State	Info
-<Id>	root	localhost	test	Query	<Time>	NULL	SHOW PROCESSLIST
+<Id>	root	<Host>	test	Query	<Time>	NULL	SHOW PROCESSLIST
 SET SESSION transaction_prealloc_size=1024*1024*1024*3;
 SHOW PROCESSLIST;
 Id	User	Host	db	Command	Time	State	Info
-<Id>	root	localhost	test	Query	<Time>	NULL	SHOW PROCESSLIST
+<Id>	root	<Host>	test	Query	<Time>	NULL	SHOW PROCESSLIST
 SET SESSION transaction_prealloc_size=1024*1024*1024*4;
 SHOW PROCESSLIST;
 Id	User	Host	db	Command	Time	State	Info
-<Id>	root	localhost	test	Query	<Time>	NULL	SHOW PROCESSLIST
+<Id>	root	<Host>	test	Query	<Time>	NULL	SHOW PROCESSLIST
 SET SESSION transaction_prealloc_size=1024*1024*1024*5;
 SHOW PROCESSLIST;
 Id	User	Host	db	Command	Time	State	Info
-<Id>	root	localhost	test	Query	<Time>	NULL	SHOW PROCESSLIST
+<Id>	root	<Host>	test	Query	<Time>	NULL	SHOW PROCESSLIST

=== modified file 'mysql-test/suite/parts/inc/partition_auto_increment.inc'
--- a/mysql-test/suite/parts/inc/partition_auto_increment.inc	2010-03-04 17:16:10 +0000
+++ b/mysql-test/suite/parts/inc/partition_auto_increment.inc	2010-11-11 10:34:55 +0000
@@ -105,6 +105,30 @@ OPTIMIZE TABLE t1;
 SHOW CREATE TABLE t1;
 DROP TABLE t1;
 
+if (!$skip_update)
+{
+eval CREATE TABLE t1
+(a INT NULL AUTO_INCREMENT,
+ UNIQUE KEY (a))
+ENGINE=$engine;
+SET LAST_INSERT_ID = 999;
+SET INSERT_ID = 0;
+INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL;
+SELECT LAST_INSERT_ID();
+SELECT * FROM t1;
+INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL;
+SELECT LAST_INSERT_ID();
+SELECT * FROM t1;
+UPDATE t1 SET a = 1 WHERE a IS NULL;
+SELECT LAST_INSERT_ID();
+SELECT * FROM t1;
+UPDATE t1 SET a = NULL WHERE a = 1;
+SELECT LAST_INSERT_ID();
+SELECT * FROM t1;
+DROP TABLE t1;
+SET INSERT_ID = 1;
+}
+
 -- echo # Simple test with NULL
 eval CREATE TABLE t1 (
   c1 INT NOT NULL AUTO_INCREMENT,
@@ -831,5 +855,30 @@ SELECT * FROM t ORDER BY c1 ASC;
 
 DROP TABLE t;
 
+if (!$skip_update)
+{ 
+eval CREATE TABLE t1
+(a INT NULL AUTO_INCREMENT,
+ UNIQUE KEY (a))
+ENGINE=$engine
+PARTITION BY KEY(a) PARTITIONS 2;
+SET LAST_INSERT_ID = 999;
+SET INSERT_ID = 0;
+INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL;
+SELECT LAST_INSERT_ID();
+SELECT * FROM t1;
+INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL;
+SELECT LAST_INSERT_ID();
+SELECT * FROM t1;
+UPDATE t1 SET a = 1 WHERE a IS NULL;
+SELECT LAST_INSERT_ID();
+SELECT * FROM t1;
+UPDATE t1 SET a = NULL WHERE a = 1;
+SELECT LAST_INSERT_ID();
+SELECT * FROM t1;
+DROP TABLE t1;
+}
+
+
 --echo ##############################################################################
 }

=== modified file 'mysql-test/suite/parts/r/partition_auto_increment_blackhole.result'
--- a/mysql-test/suite/parts/r/partition_auto_increment_blackhole.result	2010-03-04 17:16:10 +0000
+++ b/mysql-test/suite/parts/r/partition_auto_increment_blackhole.result	2010-11-11 10:34:55 +0000
@@ -120,6 +120,38 @@ t1	CREATE TABLE `t1` (
   PRIMARY KEY (`c1`)
 ) ENGINE=BLACKHOLE DEFAULT CHARSET=latin1
 DROP TABLE t1;
+CREATE TABLE t1
+(a INT NULL AUTO_INCREMENT,
+UNIQUE KEY (a))
+ENGINE='Blackhole';
+SET LAST_INSERT_ID = 999;
+SET INSERT_ID = 0;
+INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+UPDATE t1 SET a = 1 WHERE a IS NULL;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+UPDATE t1 SET a = NULL WHERE a = 1;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+DROP TABLE t1;
+SET INSERT_ID = 1;
 # Simple test with NULL
 CREATE TABLE t1 (
 c1 INT NOT NULL AUTO_INCREMENT,

=== modified file 'mysql-test/suite/parts/r/partition_auto_increment_innodb.result'
--- a/mysql-test/suite/parts/r/partition_auto_increment_innodb.result	2010-03-04 17:16:10 +0000
+++ b/mysql-test/suite/parts/r/partition_auto_increment_innodb.result	2010-11-11 10:34:55 +0000
@@ -136,6 +136,42 @@ t1	CREATE TABLE `t1` (
   PRIMARY KEY (`c1`)
 ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1
 DROP TABLE t1;
+CREATE TABLE t1
+(a INT NULL AUTO_INCREMENT,
+UNIQUE KEY (a))
+ENGINE='InnoDB';
+SET LAST_INSERT_ID = 999;
+SET INSERT_ID = 0;
+INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+1
+INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+0
+UPDATE t1 SET a = 1 WHERE a IS NULL;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+0
+UPDATE t1 SET a = NULL WHERE a = 1;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+0
+DROP TABLE t1;
+SET INSERT_ID = 1;
 # Simple test with NULL
 CREATE TABLE t1 (
 c1 INT NOT NULL AUTO_INCREMENT,
@@ -1023,4 +1059,40 @@ c1	c2
 2	20
 127	40
 DROP TABLE t;
+CREATE TABLE t1
+(a INT NULL AUTO_INCREMENT,
+UNIQUE KEY (a))
+ENGINE='InnoDB'
+PARTITION BY KEY(a) PARTITIONS 2;
+SET LAST_INSERT_ID = 999;
+SET INSERT_ID = 0;
+INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+1
+INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+0
+UPDATE t1 SET a = 1 WHERE a IS NULL;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+0
+UPDATE t1 SET a = NULL WHERE a = 1;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+0
+DROP TABLE t1;
 ##############################################################################

=== modified file 'mysql-test/suite/parts/r/partition_auto_increment_memory.result'
--- a/mysql-test/suite/parts/r/partition_auto_increment_memory.result	2010-03-04 17:16:10 +0000
+++ b/mysql-test/suite/parts/r/partition_auto_increment_memory.result	2010-11-11 10:34:55 +0000
@@ -136,6 +136,42 @@ t1	CREATE TABLE `t1` (
   PRIMARY KEY (`c1`)
 ) ENGINE=MEMORY AUTO_INCREMENT=102 DEFAULT CHARSET=latin1
 DROP TABLE t1;
+CREATE TABLE t1
+(a INT NULL AUTO_INCREMENT,
+UNIQUE KEY (a))
+ENGINE='Memory';
+SET LAST_INSERT_ID = 999;
+SET INSERT_ID = 0;
+INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+1
+INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+0
+UPDATE t1 SET a = 1 WHERE a IS NULL;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+0
+UPDATE t1 SET a = NULL WHERE a = 1;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+0
+DROP TABLE t1;
+SET INSERT_ID = 1;
 # Simple test with NULL
 CREATE TABLE t1 (
 c1 INT NOT NULL AUTO_INCREMENT,
@@ -1051,4 +1087,40 @@ c1	c2
 2	20
 127	40
 DROP TABLE t;
+CREATE TABLE t1
+(a INT NULL AUTO_INCREMENT,
+UNIQUE KEY (a))
+ENGINE='Memory'
+PARTITION BY KEY(a) PARTITIONS 2;
+SET LAST_INSERT_ID = 999;
+SET INSERT_ID = 0;
+INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+1
+INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+0
+UPDATE t1 SET a = 1 WHERE a IS NULL;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+0
+UPDATE t1 SET a = NULL WHERE a = 1;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+0
+DROP TABLE t1;
 ##############################################################################

=== modified file 'mysql-test/suite/parts/r/partition_auto_increment_myisam.result'
--- a/mysql-test/suite/parts/r/partition_auto_increment_myisam.result	2010-03-04 17:16:10 +0000
+++ b/mysql-test/suite/parts/r/partition_auto_increment_myisam.result	2010-11-11 10:34:55 +0000
@@ -136,6 +136,42 @@ t1	CREATE TABLE `t1` (
   PRIMARY KEY (`c1`)
 ) ENGINE=MyISAM AUTO_INCREMENT=102 DEFAULT CHARSET=latin1
 DROP TABLE t1;
+CREATE TABLE t1
+(a INT NULL AUTO_INCREMENT,
+UNIQUE KEY (a))
+ENGINE='MyISAM';
+SET LAST_INSERT_ID = 999;
+SET INSERT_ID = 0;
+INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+1
+INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+0
+UPDATE t1 SET a = 1 WHERE a IS NULL;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+0
+UPDATE t1 SET a = NULL WHERE a = 1;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+0
+DROP TABLE t1;
+SET INSERT_ID = 1;
 # Simple test with NULL
 CREATE TABLE t1 (
 c1 INT NOT NULL AUTO_INCREMENT,
@@ -1070,4 +1106,40 @@ c1	c2
 2	20
 127	40
 DROP TABLE t;
+CREATE TABLE t1
+(a INT NULL AUTO_INCREMENT,
+UNIQUE KEY (a))
+ENGINE='MyISAM'
+PARTITION BY KEY(a) PARTITIONS 2;
+SET LAST_INSERT_ID = 999;
+SET INSERT_ID = 0;
+INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+1
+INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+0
+UPDATE t1 SET a = 1 WHERE a IS NULL;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+0
+UPDATE t1 SET a = NULL WHERE a = 1;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+0
+DROP TABLE t1;
 ##############################################################################

=== modified file 'mysql-test/suite/parts/t/part_supported_sql_func_innodb.test'
--- a/mysql-test/suite/parts/t/part_supported_sql_func_innodb.test	2007-11-20 15:04:07 +0000
+++ b/mysql-test/suite/parts/t/part_supported_sql_func_innodb.test	2010-11-15 15:17:38 +0000
@@ -28,6 +28,9 @@ let $do_long_tests= 1;
 # The server must support partitioning.
 --source include/have_partition.inc
 
+# This test takes long time, so only run it with the --big mtr-flag.
+--source include/big_test.inc
+
 #------------------------------------------------------------------------------#
 # Engine specific settings and requirements
 

=== modified file 'mysql-test/suite/parts/t/partition_alter1_1_2_innodb.test'
--- a/mysql-test/suite/parts/t/partition_alter1_1_2_innodb.test	2008-05-16 16:03:50 +0000
+++ b/mysql-test/suite/parts/t/partition_alter1_1_2_innodb.test	2010-11-15 15:17:38 +0000
@@ -46,6 +46,9 @@ let $more_pk_ui_tests= 0;
 # The server must support partitioning.
 --source include/have_partition.inc
 
+# This test takes long time, so only run it with the --big mtr-flag.
+--source include/big_test.inc
+
 #------------------------------------------------------------------------------#
 # Engine specific settings and requirements
 

=== modified file 'mysql-test/suite/parts/t/partition_alter1_2_innodb.test'
--- a/mysql-test/suite/parts/t/partition_alter1_2_innodb.test	2008-05-16 16:03:50 +0000
+++ b/mysql-test/suite/parts/t/partition_alter1_2_innodb.test	2010-11-15 15:17:38 +0000
@@ -46,6 +46,9 @@ let $more_pk_ui_tests= 0;
 # The server must support partitioning.
 --source include/have_partition.inc
 
+# This test takes long time, so only run it with the --big mtr-flag.
+--source include/big_test.inc
+
 #------------------------------------------------------------------------------#
 # Engine specific settings and requirements
 

=== modified file 'mysql-test/suite/parts/t/partition_alter4_innodb.test'
--- a/mysql-test/suite/parts/t/partition_alter4_innodb.test	2007-11-20 15:04:07 +0000
+++ b/mysql-test/suite/parts/t/partition_alter4_innodb.test	2010-11-15 15:17:38 +0000
@@ -43,6 +43,9 @@ let $more_pk_ui_tests= 0;
 # The server must support partitioning.
 --source include/have_partition.inc
 
+# This test takes long time, so only run it with the --big mtr-flag.
+--source include/big_test.inc
+
 #------------------------------------------------------------------------------#
 # Engine specific settings and requirements
 

=== modified file 'mysql-test/t/disabled.def'
--- a/mysql-test/t/disabled.def	2010-10-27 13:39:22 +0000
+++ b/mysql-test/t/disabled.def	2010-11-15 15:17:38 +0000
@@ -13,3 +13,5 @@ kill                     : Bug#37780 200
 query_cache_28249        : Bug#43861 2009-03-25 main.query_cache_28249 fails sporadically
 main.mysqlhotcopy_myisam : Bug#56817 2010-10-21 anitha mysqlhotcopy* fails
 main.mysqlhotcopy_archive: Bug#56817 2010-10-21 anitha mysqlhotcopy* fails
+log_tables-big           : Bug#48646 2010-11-15 mattiasj report already exists
+read_many_rows_innodb    : Bug#37635 2010-11-15 mattiasj report already exists

=== modified file 'mysql-test/t/variables-big.test'
--- a/mysql-test/t/variables-big.test	2009-03-30 10:03:25 +0000
+++ b/mysql-test/t/variables-big.test	2010-11-15 15:17:38 +0000
@@ -37,19 +37,19 @@
 
 --disable_warnings
 SET SESSION transaction_prealloc_size=1024*1024*1024*1;
---replace_column 1 <Id> 6 <Time>
+--replace_column 1 <Id> 3 <Host> 6 <Time>
 SHOW PROCESSLIST;
 SET SESSION transaction_prealloc_size=1024*1024*1024*2;
---replace_column 1 <Id> 6 <Time>
+--replace_column 1 <Id> 3 <Host> 6 <Time>
 SHOW PROCESSLIST;
 SET SESSION transaction_prealloc_size=1024*1024*1024*3;
---replace_column 1 <Id> 6 <Time>
+--replace_column 1 <Id> 3 <Host> 6 <Time>
 SHOW PROCESSLIST;
 SET SESSION transaction_prealloc_size=1024*1024*1024*4;
---replace_column 1 <Id> 6 <Time>
+--replace_column 1 <Id> 3 <Host> 6 <Time>
 SHOW PROCESSLIST;
 SET SESSION transaction_prealloc_size=1024*1024*1024*5;
---replace_column 1 <Id> 6 <Time>
+--replace_column 1 <Id> 3 <Host> 6 <Time>
 SHOW PROCESSLIST;
 --enable_warnings
 

=== modified file 'sql/ha_partition.cc'
--- a/sql/ha_partition.cc	2010-10-01 13:41:27 +0000
+++ b/sql/ha_partition.cc	2010-11-11 10:34:55 +0000
@@ -3050,7 +3050,9 @@ int ha_partition::write_row(uchar * buf)
   my_bitmap_map *old_map;
   HA_DATA_PARTITION *ha_data= (HA_DATA_PARTITION*) table_share->ha_data;
   THD *thd= ha_thd();
-  timestamp_auto_set_type orig_timestamp_type= table->timestamp_field_type;
+  timestamp_auto_set_type saved_timestamp_type= table->timestamp_field_type;
+  ulong saved_sql_mode= thd->variables.sql_mode;
+  bool saved_auto_inc_field_not_null= table->auto_increment_field_not_null;
 #ifdef NOT_NEEDED
   uchar *rec0= m_rec0;
 #endif
@@ -3086,6 +3088,22 @@ int ha_partition::write_row(uchar * buf)
     */
     if (error)
       goto exit;
+
+    /*
+      Don't allow generation of auto_increment value the partitions handler.
+      If a partitions handler would change the value, then it might not
+      match the partition any longer.
+      This can occur if 'SET INSERT_ID = 0; INSERT (NULL)',
+      So allow this by adding 'MODE_NO_AUTO_VALUE_ON_ZERO' to sql_mode.
+      The partitions handler::next_insert_id must always be 0. Otherwise
+      we need to forward release_auto_increment, or reset it for all
+      partitions.
+    */
+    if (table->next_number_field->val_int() == 0)
+    {
+      table->auto_increment_field_not_null= TRUE;
+      thd->variables.sql_mode|= MODE_NO_AUTO_VALUE_ON_ZERO;
+    }
   }
 
   old_map= dbug_tmp_use_all_columns(table, table->read_set);
@@ -3119,7 +3137,9 @@ int ha_partition::write_row(uchar * buf)
     set_auto_increment_if_higher(table->next_number_field);
   reenable_binlog(thd);
 exit:
-  table->timestamp_field_type= orig_timestamp_type;
+  thd->variables.sql_mode= saved_sql_mode;
+  table->auto_increment_field_not_null= saved_auto_inc_field_not_null;
+  table->timestamp_field_type= saved_timestamp_type;
   DBUG_RETURN(error);
 }
 
@@ -3186,11 +3206,24 @@ int ha_partition::update_row(const uchar
   }
   else
   {
+    Field *saved_next_number_field= table->next_number_field;
+    /*
+      Don't allow generation of auto_increment value for update.
+      table->next_number_field is never set on UPDATE.
+      But is set for INSERT ... ON DUPLICATE KEY UPDATE,
+      and since update_row() does not generate or update an auto_inc value,
+      we cannot have next_number_field set when moving a row
+      to another partition with write_row(), since that could
+      generate/update the auto_inc value.
+      This gives the same behavior for partitioned vs non partitioned tables.
+    */
+    table->next_number_field= NULL;
     DBUG_PRINT("info", ("Update from partition %d to partition %d",
 			old_part_id, new_part_id));
     tmp_disable_binlog(thd); /* Do not replicate the low-level changes. */
     error= m_file[new_part_id]->ha_write_row(new_data);
     reenable_binlog(thd);
+    table->next_number_field= saved_next_number_field;
     if (error)
       goto exit;
 

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-bugteam branch (mattias.jonsson:3504 to 3506) Mattias Jonsson16 Nov