List:Commits« Previous MessageNext Message »
From:Tomas Ulin Date:February 16 2009 2:20pm
Subject:bzr commit into mysql-6.0-telco-6.3 branch (tomas.ulin:2849)
View as plain text  
#At file:///home/tomas/mysql_src/mysql-6.0-telco-6.3-2/

 2849 Tomas Ulin	2009-02-16 [merge]
      merge
      added:
        mysql-test/r/outfile.result
      renamed:
        mysql-test/r/outfile.result => mysql-test/r/outfile.result.moved
      modified:
        cmd-line-utils/libedit/makelist.sh
        cmd-line-utils/libedit/readline.c
        cmd-line-utils/libedit/readline/readline.h
        cmd-line-utils/libedit/vi.c
        configure.in
        mysql-test/Makefile.am
        mysql-test/mysql-test-run.pl
        mysql-test/suite/ndb/r/ndb_alter_table_online.result
        mysql-test/suite/ndb/r/ndb_dd_alter.result
        mysql-test/suite/ndb/t/disabled.def
        mysql-test/suite/ndb/t/ndb_alter_table_online.test
        mysql-test/suite/ndb_team/r/rpl_ndb_extraColMaster.result
        mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result
        mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result
        mysql-test/suite/rpl/t/disabled.def
        mysql-test/suite/rpl_ndb_big/r/rpl_ndb_auto_inc.result
        mysql-test/suite/rpl_ndb_big/r/rpl_ndb_circular_simplex.result
        mysql-test/suite/rpl_ndb_big/t/rpl_ndb_auto_inc.test
        mysql-test/suite/rpl_ndb_big/t/rpl_ndb_circular_simplex.test
        sql/ha_ndbcluster.cc
        sql/sql_table.cc
        storage/ndb/src/ndbapi/Ndb.cpp
        storage/ndb/tools/ndb_error_reporter

=== modified file 'cmd-line-utils/libedit/makelist.sh'
--- a/cmd-line-utils/libedit/makelist.sh	2009-02-10 12:39:14 +0000
+++ b/cmd-line-utils/libedit/makelist.sh	2009-02-12 15:01:38 +0000
@@ -84,7 +84,7 @@ case $FLAG in
     cat $FILES | $AWK '
 	BEGIN {
 	    printf("/* Automatically generated file, do not edit */\n");
-	    printf("#include \"sys.h\"\n#include \"el.h\"\n");
+	    printf("#include \"config.h\"\n#include \"el.h\"\n");
 	    printf("private const struct el_bindings_t el_func_help[] = {\n");
 	    low = "abcdefghijklmnopqrstuvwxyz_";
 	    high = "ABCDEFGHIJKLMNOPQRSTUVWXYZ_";
@@ -169,7 +169,7 @@ case $FLAG in
     cat $FILES | $AWK '/el_action_t/ { print $3 }' | sort | $AWK '
 	BEGIN {
 	    printf("/* Automatically generated file, do not edit */\n");
-	    printf("#include \"sys.h\"\n#include \"el.h\"\n");
+	    printf("#include \"config.h\"\n#include \"el.h\"\n");
 	    printf("private const el_func_t el_func[] = {");
 	    maxlen = 80;
 	    needn = 1;

=== modified file 'cmd-line-utils/libedit/readline.c'
--- a/cmd-line-utils/libedit/readline.c	2009-02-10 12:39:14 +0000
+++ b/cmd-line-utils/libedit/readline.c	2009-02-12 15:01:38 +0000
@@ -51,13 +51,10 @@
 #else
 #include "np/vis.h"
 #endif
-#ifdef HAVE_ALLOCA_H
-#include <alloca.h>
-#endif
+#include "readline/readline.h"
 #include "el.h"
 #include "fcns.h"		/* for EL_NUM_FCNS */
 #include "histedit.h"
-#include "readline/readline.h"
 #include "filecomplete.h"
 
 void rl_prep_terminal(int);

=== modified file 'cmd-line-utils/libedit/readline/readline.h'
--- a/cmd-line-utils/libedit/readline/readline.h	2009-02-10 12:39:14 +0000
+++ b/cmd-line-utils/libedit/readline/readline.h	2009-02-12 02:31:31 +0000
@@ -66,7 +66,7 @@ typedef KEYMAP_ENTRY *Keymap;
 
 #ifndef CTRL
 #include <sys/ioctl.h>
-#if !defined(__sun__) && !defined(__hpux__)
+#if !defined(__sun) && !defined(__hpux) && !defined(_AIX)
 #include <sys/ttydefaults.h>
 #endif
 #ifndef CTRL

=== modified file 'cmd-line-utils/libedit/vi.c'
--- a/cmd-line-utils/libedit/vi.c	2009-02-10 12:39:14 +0000
+++ b/cmd-line-utils/libedit/vi.c	2009-02-14 00:43:21 +0000
@@ -914,14 +914,14 @@ vi_comment_out(EditLine *el, int c)
  * NB: posix implies that we should enter insert mode, however
  * this is against historical precedent...
  */
-#ifdef __weak_reference
+#if defined(__weak_reference) && !defined(__FreeBSD__)
 extern char *get_alias_text(const char *) __weak_reference(get_alias_text);
 #endif
 protected el_action_t
 /*ARGSUSED*/
 vi_alias(EditLine *el, int c)
 {
-#ifdef __weak_reference
+#if defined(__weak_reference) && !defined(__FreeBSD__)
 	char alias_name[3];
 	char *alias_text;
 

=== modified file 'configure.in'
--- a/configure.in	2009-02-16 10:51:56 +0000
+++ b/configure.in	2009-02-16 14:18:22 +0000
@@ -2110,7 +2110,8 @@ AC_CHECK_FUNCS(alarm bcmp bfill bmove bs
   mkstemp mlockall perror poll pread pthread_attr_create mmap mmap64 getpagesize \
   pthread_attr_getstacksize pthread_attr_setprio pthread_attr_setschedparam \
   pthread_attr_setstacksize pthread_condattr_create pthread_getsequence_np \
-  pthread_key_delete pthread_rwlock_rdlock pthread_setprio pthread_setschedprio \
+  pthread_key_delete pthread_rwlock_rdlock pthread_setprio \
+  pthread_setschedprio \
   pthread_self sched_get_priority_min sched_get_priority_max \
   sched_setaffinity processor_bind sched_setscheduler \
   pthread_setprio_np pthread_setschedparam pthread_sigmask \

=== modified file 'mysql-test/Makefile.am'
--- a/mysql-test/Makefile.am	2009-02-16 10:49:53 +0000
+++ b/mysql-test/Makefile.am	2009-02-16 14:18:22 +0000
@@ -84,7 +84,7 @@ TEST_DIRS = t r include std_data std_dat
 	extra/binlog_tests/ extra/rpl_tests \
 	suite/backup suite/backup/t suite/backup/r suite/backup/include \
 	suite/binlog suite/binlog/t suite/binlog/r suite/binlog/std_data \
-	suite/bugs/data suite/bugs/t suite/bugs/r \
+	suite/bugs suite/bugs/data suite/bugs/t suite/bugs/r \
 	suite/federated \
 	suite/funcs_1 suite/funcs_1/bitdata \
 	suite/funcs_1/include suite/funcs_1/lib suite/funcs_1/r \
@@ -93,7 +93,7 @@ TEST_DIRS = t r include std_data std_dat
 	suite/funcs_2 suite/funcs_2/charset suite/funcs_2/data \
 	suite/funcs_2/include suite/funcs_2/lib suite/funcs_2/r \
 	suite/funcs_2/t \
-	suite/jp suite/jp/t suite/jp/r suite/jp/std_data \
+	suite/jp suite/jp/t suite/jp/r suite/jp/std_data suite/jp/include \
 	suite/manual/t suite/manual/r \
 	suite/rpl suite/rpl/data suite/rpl/include suite/rpl/r \
 	suite/rpl/t \

=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl	2009-02-16 10:49:53 +0000
+++ b/mysql-test/mysql-test-run.pl	2009-02-16 14:18:22 +0000
@@ -107,6 +107,17 @@ our $default_vardir;
 our $opt_vardir;                # Path to use for var/ dir
 my $path_vardir_trace;          # unix formatted opt_vardir for trace files
 my $opt_tmpdir;                 # Path to use for tmp/ dir
+my $opt_tmpdir_pid;
+
+END {
+  if ( defined $opt_tmpdir_pid and $opt_tmpdir_pid == $$ )
+  {
+    # Remove the tempdir this process has created
+    mtr_verbose("Removing tmpdir '$opt_tmpdir");
+    rmtree($opt_tmpdir);
+  }
+}
+
 my $path_config_file;           # The generated config file, var/my.cnf
 
 # Visual Studio produces executables in different sub-directories based on the
@@ -1081,8 +1092,11 @@ sub command_line_setup {
 		 " creating a shorter one...");
 
       # Create temporary directory in standard location for temporary files
-      $opt_tmpdir= tempdir( TMPDIR => 1, CLEANUP => 1 );
+      $opt_tmpdir= tempdir( TMPDIR => 1, CLEANUP => 0 );
       mtr_report(" - using tmpdir: '$opt_tmpdir'\n");
+
+      # Remember pid that created dir so it's removed by correct process
+      $opt_tmpdir_pid= $$;
     }
   }
   $opt_tmpdir =~ s,/+$,,;       # Remove ending slash if any

=== added file 'mysql-test/r/outfile.result'
Binary files /tmp/bzr-diff-old-gAuAn5 and /tmp/bzr-diff-new-EtXUR3 differ

=== renamed file 'mysql-test/r/outfile.result' => 'mysql-test/r/outfile.result.moved'
=== modified file 'mysql-test/suite/ndb/r/ndb_alter_table_online.result'
--- a/mysql-test/suite/ndb/r/ndb_alter_table_online.result	2009-02-05 12:22:39 +0000
+++ b/mysql-test/suite/ndb/r/ndb_alter_table_online.result	2009-02-16 14:18:22 +0000
@@ -653,6 +653,15 @@ ERROR 42000: This version of MySQL doesn
 ALTER ONLINE TABLE t1 ADD COLUMN h VARBINARY(20) COLUMN_FORMAT DYNAMIC;
 ERROR 42000: This version of MySQL doesn't yet support 'ALTER ONLINE TABLE t1 ADD COLUMN h VARBINARY(20) COLUMN_FORMAT DYNAMIC'
 DROP TABLE t1;
+create table t1 (a int primary key, b int) storage disk tablespace ts1 engine = ndb;
+alter online table t1 add column c0 int null column_format DYNAMIC;
+ERROR 42000: This version of MySQL doesn't yet support 'alter online table t1 add column c0 int null column_format DYNAMIC'
+alter online table t1 add column c1 int null column_format DYNAMIC storage memory;
+drop table t1;
+create table t1 (a int primary key, b int storage disk) tablespace ts1 engine = ndb;
+alter online table t1 add column c0 int null column_format DYNAMIC;
+alter online table t1 add column c1 int null column_format DYNAMIC storage memory;
+drop table t1;
 ALTER TABLESPACE ts1
 DROP DATAFILE 'datafile.dat'
 ENGINE = NDB;

=== modified file 'mysql-test/suite/ndb/r/ndb_dd_alter.result'
--- a/mysql-test/suite/ndb/r/ndb_dd_alter.result	2007-12-10 09:42:39 +0000
+++ b/mysql-test/suite/ndb/r/ndb_dd_alter.result	2009-02-16 14:18:22 +0000
@@ -316,9 +316,6 @@ SELECT * FROM information_schema.partiti
 TABLE_CATALOG	TABLE_SCHEMA	TABLE_NAME	PARTITION_NAME	SUBPARTITION_NAME	PARTITION_ORDINAL_POSITION	SUBPARTITION_ORDINAL_POSITION	PARTITION_METHOD	SUBPARTITION_METHOD	PARTITION_EXPRESSION	SUBPARTITION_EXPRESSION	PARTITION_DESCRIPTION	TABLE_ROWS	AVG_ROW_LENGTH	DATA_LENGTH	MAX_DATA_LENGTH	INDEX_LENGTH	DATA_FREE	CREATE_TIME	UPDATE_TIME	CHECK_TIME	CHECKSUM	PARTITION_COMMENT	NODEGROUP	TABLESPACE_NAME
 NULL	test	t1	p0	NULL	1	NULL	KEY	NULL		NULL	NULL	0	0	0	NULL	0	0	NULL	NULL	NULL	NULL		default	ts
 ALTER TABLE test.t1 ADD a2 FLOAT, ADD a3 DOUBLE;
-Warnings:
-Warning	1478	Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
-Warning	1478	Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
 SELECT * FROM information_schema.partitions WHERE table_name= 't1' AND partition_name = 'p0';
 TABLE_CATALOG	TABLE_SCHEMA	TABLE_NAME	PARTITION_NAME	SUBPARTITION_NAME	PARTITION_ORDINAL_POSITION	SUBPARTITION_ORDINAL_POSITION	PARTITION_METHOD	SUBPARTITION_METHOD	PARTITION_EXPRESSION	SUBPARTITION_EXPRESSION	PARTITION_DESCRIPTION	TABLE_ROWS	AVG_ROW_LENGTH	DATA_LENGTH	MAX_DATA_LENGTH	INDEX_LENGTH	DATA_FREE	CREATE_TIME	UPDATE_TIME	CHECK_TIME	CHECKSUM	PARTITION_COMMENT	NODEGROUP	TABLESPACE_NAME
 NULL	test	t1	p0	NULL	1	NULL	KEY	NULL		NULL	NULL	0	0	0	NULL	0	0	NULL	NULL	NULL	NULL		default	ts
@@ -345,12 +342,6 @@ a1	a2	a3
 19	20.2345	20000019
 20	21.2345	20000020
 ALTER TABLE test.t1  ADD a4 BIT, ADD a5 TINYINT, ADD a6 BIGINT, ADD a7 DATE, ADD a8 TIME;
-Warnings:
-Warning	1478	Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
-Warning	1478	Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
-Warning	1478	Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
-Warning	1478	Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
-Warning	1478	Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
 SELECT a1,a2,a3,hex(a4), a5,a6,a7,a8 FROM test.t1 ORDER BY a1;
 a1	a2	a3	hex(a4)	a5	a6	a7	a8
 1	2.2345	20000001	0	1	23457	2006-01-01	07:04:00

=== modified file 'mysql-test/suite/ndb/t/disabled.def'
--- a/mysql-test/suite/ndb/t/disabled.def	2009-02-05 11:03:46 +0000
+++ b/mysql-test/suite/ndb/t/disabled.def	2009-02-16 14:18:22 +0000
@@ -12,6 +12,4 @@
 
 ndb_partition_error2	  : Bug#40989 msvensson 2007-06-27 HF is not sure if the test can work as internded on all the platforms
 # the below testcase have been reworked to avoid the bug, test contains comment, keep bug open
-#ndb_binlog_ddl_multi     : BUG#18976 2006-04-10 kent    CRBR: multiple binlog, second binlog may miss schema log events
-ndb_discover_db2          : BUG#41858 2009-01-09 lsoares This has been fixed already by the ndb team. Test should be re-enabled once the fix reaches main tree and merge into rpl tream trees takes place.
 ndb_cache_trans           : Bug#42197 Query cache and autocommit

=== modified file 'mysql-test/suite/ndb/t/ndb_alter_table_online.test'
--- a/mysql-test/suite/ndb/t/ndb_alter_table_online.test	2009-02-05 12:22:39 +0000
+++ b/mysql-test/suite/ndb/t/ndb_alter_table_online.test	2009-02-16 14:18:22 +0000
@@ -684,6 +684,20 @@ ALTER ONLINE TABLE t1 ADD COLUMN h BINAR
 ALTER ONLINE TABLE t1 ADD COLUMN h VARBINARY(20) COLUMN_FORMAT DYNAMIC;
 DROP TABLE t1;
 
+#
+# bug#42549
+#
+create table t1 (a int primary key, b int) storage disk tablespace ts1 engine = ndb;
+--error ER_NOT_SUPPORTED_YET
+alter online table t1 add column c0 int null column_format DYNAMIC;
+alter online table t1 add column c1 int null column_format DYNAMIC storage memory;
+drop table t1;
+
+create table t1 (a int primary key, b int storage disk) tablespace ts1 engine = ndb;
+alter online table t1 add column c0 int null column_format DYNAMIC;
+alter online table t1 add column c1 int null column_format DYNAMIC storage memory;
+drop table t1;
+
 ALTER TABLESPACE ts1
 DROP DATAFILE 'datafile.dat'
 ENGINE = NDB;

=== modified file 'mysql-test/suite/ndb_team/r/rpl_ndb_extraColMaster.result'
--- a/mysql-test/suite/ndb_team/r/rpl_ndb_extraColMaster.result	2009-02-05 11:03:46 +0000
+++ b/mysql-test/suite/ndb_team/r/rpl_ndb_extraColMaster.result	2009-02-16 14:18:22 +0000
@@ -457,7 +457,9 @@ f1	f2	f3	f4
 update t31 set f5=555555555555555 where f3=6;
 update t31 set f2=2 where f3=2;
 update t31 set f1=NULL where f3=1;
-update t31 set f3=0, f27=NULL, f35='f35 new value' where f3=3;
+update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3;
+Warnings:
+Warning	1048	Column 'f3' cannot be null
 
 ** Delete from Master **
 
@@ -1617,7 +1619,9 @@ f1	f2	f3	f4
 update t31 set f5=555555555555555 where f3=6;
 update t31 set f2=2 where f3=2;
 update t31 set f1=NULL where f3=1;
-update t31 set f3=0, f27=NULL, f35='f35 new value' where f3=3;
+update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3;
+Warnings:
+Warning	1048	Column 'f3' cannot be null
 
 ** Delete from Master **
 

=== modified file 'mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result'
--- a/mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result	2009-02-05 10:05:23 +0000
+++ b/mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result	2009-02-16 14:18:22 +0000
@@ -133,6 +133,7 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	0
 Last_SQL_Error	
+Master_Bind	
 Replicate_Ignore_Server_Ids	
 Master_Server_Id	1
 
@@ -511,6 +512,7 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	0
 Last_SQL_Error	
+Master_Bind	
 Replicate_Ignore_Server_Ids	
 Master_Server_Id	1
 
@@ -587,6 +589,7 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	1535
 Last_SQL_Error	Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
+Master_Bind	
 Replicate_Ignore_Server_Ids	
 Master_Server_Id	1
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
@@ -664,6 +667,7 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	1535
 Last_SQL_Error	Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
+Master_Bind	
 Replicate_Ignore_Server_Ids	
 Master_Server_Id	1
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
@@ -817,6 +821,7 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	1091
 Last_SQL_Error	Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
+Master_Bind	
 Replicate_Ignore_Server_Ids	
 Master_Server_Id	1
 STOP SLAVE;
@@ -905,6 +910,7 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	1054
 Last_SQL_Error	Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
+Master_Bind	
 Replicate_Ignore_Server_Ids	
 Master_Server_Id	1
 STOP SLAVE;
@@ -993,6 +999,7 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	1072
 Last_SQL_Error	Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
+Master_Bind	
 Replicate_Ignore_Server_Ids	
 Master_Server_Id	1
 STOP SLAVE;
@@ -1288,6 +1295,7 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	0
 Last_SQL_Error	
+Master_Bind	
 Replicate_Ignore_Server_Ids	
 Master_Server_Id	1
 
@@ -1666,6 +1674,7 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	0
 Last_SQL_Error	
+Master_Bind	
 Replicate_Ignore_Server_Ids	
 Master_Server_Id	1
 
@@ -1742,6 +1751,7 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	1535
 Last_SQL_Error	Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
+Master_Bind	
 Replicate_Ignore_Server_Ids	
 Master_Server_Id	1
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
@@ -1819,6 +1829,7 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	1535
 Last_SQL_Error	Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
+Master_Bind	
 Replicate_Ignore_Server_Ids	
 Master_Server_Id	1
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
@@ -1972,6 +1983,7 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	1091
 Last_SQL_Error	Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
+Master_Bind	
 Replicate_Ignore_Server_Ids	
 Master_Server_Id	1
 STOP SLAVE;
@@ -2060,6 +2072,7 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	1054
 Last_SQL_Error	Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
+Master_Bind	
 Replicate_Ignore_Server_Ids	
 Master_Server_Id	1
 STOP SLAVE;
@@ -2148,6 +2161,7 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	1072
 Last_SQL_Error	Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
+Master_Bind	
 Replicate_Ignore_Server_Ids	
 Master_Server_Id	1
 STOP SLAVE;
@@ -2443,6 +2457,7 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	0
 Last_SQL_Error	
+Master_Bind	
 Replicate_Ignore_Server_Ids	
 Master_Server_Id	1
 
@@ -2821,6 +2836,7 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	0
 Last_SQL_Error	
+Master_Bind	
 Replicate_Ignore_Server_Ids	
 Master_Server_Id	1
 
@@ -2897,6 +2913,7 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	1535
 Last_SQL_Error	Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
+Master_Bind	
 Replicate_Ignore_Server_Ids	
 Master_Server_Id	1
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
@@ -2974,6 +2991,7 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	1535
 Last_SQL_Error	Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
+Master_Bind	
 Replicate_Ignore_Server_Ids	
 Master_Server_Id	1
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
@@ -3127,6 +3145,7 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	1091
 Last_SQL_Error	Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
+Master_Bind	
 Replicate_Ignore_Server_Ids	
 Master_Server_Id	1
 STOP SLAVE;
@@ -3215,6 +3234,7 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	1054
 Last_SQL_Error	Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
+Master_Bind	
 Replicate_Ignore_Server_Ids	
 Master_Server_Id	1
 STOP SLAVE;
@@ -3303,6 +3323,7 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	1072
 Last_SQL_Error	Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
+Master_Bind	
 Replicate_Ignore_Server_Ids	
 Master_Server_Id	1
 STOP SLAVE;

=== modified file 'mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result'
--- a/mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result	2009-02-05 10:05:23 +0000
+++ b/mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result	2009-02-16 14:18:22 +0000
@@ -133,6 +133,7 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	0
 Last_SQL_Error	
+Master_Bind	
 Replicate_Ignore_Server_Ids	
 Master_Server_Id	1
 
@@ -511,6 +512,7 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	0
 Last_SQL_Error	
+Master_Bind	
 Replicate_Ignore_Server_Ids	
 Master_Server_Id	1
 
@@ -587,6 +589,7 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	1535
 Last_SQL_Error	Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
+Master_Bind	
 Replicate_Ignore_Server_Ids	
 Master_Server_Id	1
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
@@ -664,6 +667,7 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	1535
 Last_SQL_Error	Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
+Master_Bind	
 Replicate_Ignore_Server_Ids	
 Master_Server_Id	1
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
@@ -817,6 +821,7 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	1091
 Last_SQL_Error	Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
+Master_Bind	
 Replicate_Ignore_Server_Ids	
 Master_Server_Id	1
 STOP SLAVE;
@@ -905,6 +910,7 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	1054
 Last_SQL_Error	Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
+Master_Bind	
 Replicate_Ignore_Server_Ids	
 Master_Server_Id	1
 STOP SLAVE;
@@ -993,6 +999,7 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	1072
 Last_SQL_Error	Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
+Master_Bind	
 Replicate_Ignore_Server_Ids	
 Master_Server_Id	1
 STOP SLAVE;
@@ -1288,6 +1295,7 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	0
 Last_SQL_Error	
+Master_Bind	
 Replicate_Ignore_Server_Ids	
 Master_Server_Id	1
 
@@ -1666,6 +1674,7 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	0
 Last_SQL_Error	
+Master_Bind	
 Replicate_Ignore_Server_Ids	
 Master_Server_Id	1
 
@@ -1742,6 +1751,7 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	1535
 Last_SQL_Error	Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
+Master_Bind	
 Replicate_Ignore_Server_Ids	
 Master_Server_Id	1
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
@@ -1819,6 +1829,7 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	1535
 Last_SQL_Error	Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
+Master_Bind	
 Replicate_Ignore_Server_Ids	
 Master_Server_Id	1
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
@@ -1972,6 +1983,7 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	1091
 Last_SQL_Error	Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
+Master_Bind	
 Replicate_Ignore_Server_Ids	
 Master_Server_Id	1
 STOP SLAVE;
@@ -2060,6 +2072,7 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	1054
 Last_SQL_Error	Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
+Master_Bind	
 Replicate_Ignore_Server_Ids	
 Master_Server_Id	1
 STOP SLAVE;
@@ -2148,6 +2161,7 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	1072
 Last_SQL_Error	Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
+Master_Bind	
 Replicate_Ignore_Server_Ids	
 Master_Server_Id	1
 STOP SLAVE;
@@ -2443,6 +2457,7 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	0
 Last_SQL_Error	
+Master_Bind	
 Replicate_Ignore_Server_Ids	
 Master_Server_Id	1
 
@@ -2821,6 +2836,7 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	0
 Last_SQL_Error	
+Master_Bind	
 Replicate_Ignore_Server_Ids	
 Master_Server_Id	1
 
@@ -2897,6 +2913,7 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	1535
 Last_SQL_Error	Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
+Master_Bind	
 Replicate_Ignore_Server_Ids	
 Master_Server_Id	1
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
@@ -2974,6 +2991,7 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	1535
 Last_SQL_Error	Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
+Master_Bind	
 Replicate_Ignore_Server_Ids	
 Master_Server_Id	1
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
@@ -3127,6 +3145,7 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	1091
 Last_SQL_Error	Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
+Master_Bind	
 Replicate_Ignore_Server_Ids	
 Master_Server_Id	1
 STOP SLAVE;
@@ -3215,6 +3234,7 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	1054
 Last_SQL_Error	Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
+Master_Bind	
 Replicate_Ignore_Server_Ids	
 Master_Server_Id	1
 STOP SLAVE;
@@ -3303,6 +3323,7 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	1072
 Last_SQL_Error	Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
+Master_Bind	
 Replicate_Ignore_Server_Ids	
 Master_Server_Id	1
 STOP SLAVE;

=== modified file 'mysql-test/suite/rpl/t/disabled.def'
--- a/mysql-test/suite/rpl/t/disabled.def	2009-01-30 14:13:39 +0000
+++ b/mysql-test/suite/rpl/t/disabled.def	2009-02-16 14:18:22 +0000
@@ -10,11 +10,8 @@
 #
 ##############################################################################
 
-rpl_ndb_multi              : Bug#30751: rpl_ndb_multi missing row in output
-rpl_log_pos                : Bug#8693 Test 'rpl_log_pos' fails sometimes
-rpl_extraColmaster_innodb  : BUG#41097 2008-12-12 sven result files for rpl_extraColmaster_myisam, rpl_extraColmaster_innodb are gone
-rpl_extraColmaster_myisam  : BUG#41097 2008-12-12 sven result files for rpl_extraColmaster_myisam, rpl_extraColmaster_innodb are gone
 rpl_row_until              : BUG#41423 2008-12-12 sven rpl_row_until needs maintenance
-rpl_binlog_corruption : BUG#41793 2008-12-30 sven rpl_binlog_corruption disabled in main (needs new mtr)
+rpl_binlog_corruption      : BUG#41793 2008-12-30 sven rpl_binlog_corruption disabled in main (needs new mtr)
 rpl_extraCol_falcon        : Bug#40930 2008-11-21 johnemb rpl.rpl_extraCol_falcon fails doing STOP SLAVE (on Windows PB2)
-rpl_cross_version	   : Bug #42311 2009-01-23 aelkin
+rpl_cross_version	   : Bug#42311 2009-01-23 aelkin
+rpl_log_pos                : Bug#42858 2009-02-14 alik rpl.rpl_log_pos fails, thus was disabled

=== modified file 'mysql-test/suite/rpl_ndb_big/r/rpl_ndb_auto_inc.result'
--- a/mysql-test/suite/rpl_ndb_big/r/rpl_ndb_auto_inc.result	2009-01-27 13:03:36 +0000
+++ b/mysql-test/suite/rpl_ndb_big/r/rpl_ndb_auto_inc.result	2009-02-16 14:18:22 +0000
@@ -168,3 +168,31 @@ a
 32
 42
 drop table t1;
+set @old_ndb_autoincrement_prefetch_sz = @@session.ndb_autoincrement_prefetch_sz;
+set ndb_autoincrement_prefetch_sz = 32;
+CREATE TABLE t1 (id INT NOT NULL AUTO_INCREMENT KEY) ENGINE=ndb;
+INSERT INTO t1 () VALUES (),(),();
+set @old_ndb_autoincrement_prefetch_sz = @@session.ndb_autoincrement_prefetch_sz;
+set ndb_autoincrement_prefetch_sz = 32;
+select * from t1 order by id;
+id
+1
+2
+3
+INSERT INTO t1 () VALUES (),(),();
+select * from t1 order by id;
+id
+1
+2
+3
+4
+5
+6
+set ndb_autoincrement_prefetch_sz = @old_ndb_autoincrement_prefetch_sz;
+select * from t1 order by id;
+id
+1
+2
+3
+drop table t1;
+set ndb_autoincrement_prefetch_sz = @old_ndb_autoincrement_prefetch_sz;

=== modified file 'mysql-test/suite/rpl_ndb_big/r/rpl_ndb_circular_simplex.result'
--- a/mysql-test/suite/rpl_ndb_big/r/rpl_ndb_circular_simplex.result	2009-02-05 12:22:39 +0000
+++ b/mysql-test/suite/rpl_ndb_big/r/rpl_ndb_circular_simplex.result	2009-02-16 14:18:22 +0000
@@ -104,3 +104,4 @@ Last_IO_Error	#
 Last_SQL_Errno	0
 Last_SQL_Error	
 Master_Bind	0.0.0.0
+DROP TABLE t1;

=== modified file 'mysql-test/suite/rpl_ndb_big/t/rpl_ndb_auto_inc.test'
--- a/mysql-test/suite/rpl_ndb_big/t/rpl_ndb_auto_inc.test	2008-09-11 08:01:28 +0000
+++ b/mysql-test/suite/rpl_ndb_big/t/rpl_ndb_auto_inc.test	2009-02-16 14:18:22 +0000
@@ -111,8 +111,26 @@ sync_slave_with_master;
 --echo
 select * from t1 ORDER BY a;
 connection master;
-
 drop table t1;
 
+#
+# Bug #42232 Cluster to cluster replication is not setting auto_increment
+# on slave cluster
+#
+set @old_ndb_autoincrement_prefetch_sz = @@session.ndb_autoincrement_prefetch_sz;
+set ndb_autoincrement_prefetch_sz = 32;
+CREATE TABLE t1 (id INT NOT NULL AUTO_INCREMENT KEY) ENGINE=ndb;
+INSERT INTO t1 () VALUES (),(),();
+sync_slave_with_master;
+set @old_ndb_autoincrement_prefetch_sz = @@session.ndb_autoincrement_prefetch_sz;
+set ndb_autoincrement_prefetch_sz = 32;
+select * from t1 order by id;
+INSERT INTO t1 () VALUES (),(),();
+select * from t1 order by id;
+set ndb_autoincrement_prefetch_sz = @old_ndb_autoincrement_prefetch_sz;
+connection master;
+select * from t1 order by id;
+drop table t1;
+set ndb_autoincrement_prefetch_sz = @old_ndb_autoincrement_prefetch_sz;
 # End cleanup
 sync_slave_with_master;

=== modified file 'mysql-test/suite/rpl_ndb_big/t/rpl_ndb_circular_simplex.test'
--- a/mysql-test/suite/rpl_ndb_big/t/rpl_ndb_circular_simplex.test	2008-10-29 08:45:14 +0000
+++ b/mysql-test/suite/rpl_ndb_big/t/rpl_ndb_circular_simplex.test	2009-02-16 14:18:22 +0000
@@ -47,6 +47,9 @@ sync_with_master;
 
 #SHOW BINLOG EVENTS;
 
+# Wait for slave threads to start before SHOWing status
+--source include/wait_for_slave_to_start.inc
+
 # Check that there is no error in replication
 --replace_result $SLAVE_MYPORT SLAVE_PORT
 --replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
@@ -74,7 +77,15 @@ START SLAVE;
 sync_with_master;
 SELECT * FROM t1 ORDER BY a;
 
+# Wait for slave threads to start before SHOWing status
+--source include/wait_for_slave_to_start.inc
+
 # Check that there is no error in replication
 --replace_result $MASTER_MYPORT MASTER_PORT
 --replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
 query_vertical SHOW SLAVE STATUS;
+
+# cleanup
+connection master;
+DROP TABLE t1;
+sync_slave_with_master;

=== modified file 'sql/ha_ndbcluster.cc'
--- a/sql/ha_ndbcluster.cc	2009-02-10 18:39:11 +0000
+++ b/sql/ha_ndbcluster.cc	2009-02-16 14:18:22 +0000
@@ -5225,8 +5225,11 @@ THR_LOCK_DATA **ha_ndbcluster::store_loc
     /* Since NDB does not currently have table locks
        this is treated as a ordinary lock */
 
+    const bool in_lock_tables = thd_in_lock_tables(thd);
+    const uint sql_command = thd_sql_command(thd);
     if ((lock_type >= TL_WRITE_CONCURRENT_INSERT &&
-         lock_type <= TL_WRITE) && !thd->in_lock_tables)      
+         lock_type <= TL_WRITE) &&
+        !(in_lock_tables && sql_command == SQLCOM_LOCK_TABLES))
       lock_type= TL_WRITE_ALLOW_WRITE;
     
     /* In queries of type INSERT INTO t1 SELECT ... FROM t2 ...
@@ -9516,7 +9519,9 @@ ndbcluster_cache_retrieval_allowed(THD *
   {
     /* Don't allow qc to be used if table has been previously
        modified in transaction */
-    Thd_ndb *thd_ndb= get_thd_ndb(thd);
+    if (!check_ndb_in_thd(thd))
+      DBUG_RETURN(FALSE);
+   Thd_ndb *thd_ndb= get_thd_ndb(thd);
     if (!thd_ndb->changed_tables.is_empty())
     {
       NDB_SHARE* share;
@@ -12198,6 +12203,16 @@ int ha_ndbcluster::check_if_supported_al
      /*
         Check that we are only adding columns
      */
+     /*
+       HA_COLUMN_STORAGE & HA_COLUMN_FORMAT
+       are set if they are specified in an later cmd
+       even if they're no change. This is probably a bug
+       conclusion: add them to add_column-mask, so that we silently "accept" them
+       In case of someone trying to change a column, the HA_CHANGE_COLUMN would be set
+       which we don't support, so we will still return HA_ALTER_NOT_SUPPORTED in those cases
+     */
+     add_column.set_bit(HA_COLUMN_STORAGE);
+     add_column.set_bit(HA_COLUMN_FORMAT);     
      if ((*alter_flags & ~add_column).is_set())
      {
        DBUG_PRINT("info", ("Only add column exclusively can be performed on-line"));
@@ -12272,6 +12287,22 @@ int ha_ndbcluster::check_if_supported_al
     const NDBCOL *col= tab->getColumn(i);
 
     create_ndb_column(0, new_col, field, create_info);
+
+    /**
+     * This is a "copy" of code in ::create()
+     *   that "auto-converts" columns with keys into memory
+     *   (unless storage disk is explicitly added)
+     * This is needed to check if getStorageType() == getStorageType() further down
+     */
+    if (field->flags & (PRI_KEY_FLAG | UNIQUE_KEY_FLAG | MULTIPLE_KEY_FLAG))
+    {
+      if (field->field_storage_type() == HA_SM_DISK)
+      {
+        DBUG_RETURN(HA_ALTER_NOT_SUPPORTED);
+      }
+      new_col.setStorageType(NdbDictionary::Column::StorageTypeMemory);
+    }
+
     if (col->getStorageType() != new_col.getStorageType())
     {
       DBUG_PRINT("info", ("Column storage media is changed"));

=== modified file 'sql/sql_table.cc'
--- a/sql/sql_table.cc	2009-02-11 12:11:20 +0000
+++ b/sql/sql_table.cc	2009-02-16 14:18:22 +0000
@@ -5852,21 +5852,6 @@ int create_temporary_table(THD *thd,
   else
     create_info->data_file_name=create_info->index_file_name=0;
 
-  if (new_db_type == old_db_type)
-  {
-    /*
-       Table has not changed storage engine.
-       If STORAGE and TABLESPACE have not been changed than copy them
-       from the original table
-    */
-    if (!create_info->tablespace &&
-        table->s->tablespace &&
-        create_info->default_storage_media == HA_SM_DEFAULT)
-      create_info->tablespace= table->s->tablespace;
-    if (create_info->default_storage_media == HA_SM_DEFAULT)
-      create_info->default_storage_media= table->s->default_storage_media;
-   }
-
   /*
     Create a table with a temporary name.
     With create_info->frm_only == 1 this creates a .frm file only.
@@ -6522,6 +6507,22 @@ mysql_prepare_alter_table(THD *thd, TABL
 
   if (table->s->tmp_table)
     create_info->options|=HA_LEX_CREATE_TMP_TABLE;
+
+  if (create_info->db_type == table->s->db_type())
+  {
+    /*
+       Table has not changed storage engine.
+       If STORAGE and TABLESPACE have not been changed than copy them
+       from the original table
+    */
+    if (!create_info->tablespace &&
+        table->s->tablespace &&
+        create_info->default_storage_media == HA_SM_DEFAULT)
+      create_info->tablespace= table->s->tablespace;
+
+    if (create_info->default_storage_media == HA_SM_DEFAULT)
+      create_info->default_storage_media= table->s->default_storage_media;
+  }
 
   rc= FALSE;
   alter_info->create_list.swap(new_create_list);

=== modified file 'storage/ndb/src/ndbapi/Ndb.cpp'
--- a/storage/ndb/src/ndbapi/Ndb.cpp	2009-01-27 13:03:36 +0000
+++ b/storage/ndb/src/ndbapi/Ndb.cpp	2009-02-16 14:18:22 +0000
@@ -1408,7 +1408,10 @@ Ndb::opTupleIdOnNdb(const NdbTableImpl* 
   if (initAutoIncrement() == -1)
     goto error_handler;
 
-  tConnection = this->startTransaction();
+  // Start transaction with table id as hint
+  tConnection = this->startTransaction(table,
+                                       (const char *) &aTableId,
+                                       sizeof(Uint32));
   if (tConnection == NULL)
     goto error_handler;
 

=== modified file 'storage/ndb/tools/ndb_error_reporter'
--- a/storage/ndb/tools/ndb_error_reporter	2007-06-13 13:34:36 +0000
+++ b/storage/ndb/tools/ndb_error_reporter	2009-02-12 08:29:00 +0000
@@ -75,12 +75,12 @@ my $outfile;
 if($r==0)
 {
     $outfile= "$reportdir.tar.bz2";
-    system "tar c $reportdir|bzip2 > $outfile";
+    system "tar cf - $reportdir|bzip2 > $outfile";
 }
 else
 {
     $outfile= "$reportdir.tar.gz";
-    system "tar c $reportdir|gzip > $outfile";
+    system "tar cf - $reportdir|gzip > $outfile";
 }
 
 system "rm -rf $reportdir";

Thread
bzr commit into mysql-6.0-telco-6.3 branch (tomas.ulin:2849) Tomas Ulin16 Feb