summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test9
-rw-r--r--mysql-test/include/have_multi_ndb.inc32
-rwxr-xr-xmysql-test/mysql-test-run.pl26
-rw-r--r--mysql-test/suite/ndb/r/ndb_auto_increment.result445
-rw-r--r--mysql-test/suite/ndb/r/ndb_basic.result24
-rw-r--r--mysql-test/suite/ndb/r/ndb_blob.result21
-rw-r--r--mysql-test/suite/ndb/r/ndb_charset.result8
-rw-r--r--mysql-test/suite/ndb/r/ndb_index_unique.result14
-rw-r--r--mysql-test/suite/ndb/r/ndb_insert.result169
-rw-r--r--mysql-test/suite/ndb/r/ndb_multi.result1
-rw-r--r--mysql-test/suite/ndb/r/ndb_multi_row.result1
-rw-r--r--mysql-test/suite/ndb/r/ndb_update.result6
-rw-r--r--mysql-test/suite/ndb/t/disabled.def3
-rw-r--r--mysql-test/suite/ndb/t/ndb_auto_increment.test293
-rw-r--r--mysql-test/suite/ndb/t/ndb_basic.test22
-rw-r--r--mysql-test/suite/ndb/t/ndb_blob.test20
-rw-r--r--mysql-test/suite/ndb/t/ndb_insert.test138
-rw-r--r--mysql-test/suite/ndb/t/ndb_multi.test4
-rw-r--r--mysql-test/suite/ndb/t/ndb_multi_row.test3
-rw-r--r--mysql-test/suite/ndb_team/r/ndb_backup_print.result (renamed from mysql-test/suite/ndb/r/ndb_backup_print.result)0
-rw-r--r--mysql-test/suite/ndb_team/r/ndb_dd_backuprestore.result (renamed from mysql-test/suite/ndb/r/ndb_dd_backuprestore.result)0
-rw-r--r--mysql-test/suite/ndb_team/t/ndb_backup_print.test (renamed from mysql-test/suite/ndb/t/ndb_backup_print.test)0
-rw-r--r--mysql-test/suite/ndb_team/t/ndb_dd_backuprestore.test (renamed from mysql-test/suite/ndb/t/ndb_dd_backuprestore.test)0
-rw-r--r--mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result15
-rw-r--r--mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result15
-rw-r--r--mysql-test/suite/rpl_ndb/r/rpl_ndb_ddl.result40
-rw-r--r--mysql-test/suite/rpl_ndb/r/rpl_ndb_extraColMaster.result10
-rw-r--r--mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result4
-rw-r--r--mysql-test/suite/rpl_ndb/t/disabled.def1
29 files changed, 943 insertions, 381 deletions
diff --git a/mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test b/mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test
index cdd828305dc..efca53d5698 100644
--- a/mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test
+++ b/mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test
@@ -973,14 +973,7 @@ SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1;
--echo
--echo ** update from master **
connection master;
-#######################################
-# This test should be uncommented
-# once bug30674 is patched
-#######################################
-
-#***************************
-#UPDATE t18 SET c5 = 'TEST' WHERE c6 = 3;
-#***************************
+UPDATE t18 SET c5 = 'TEST' WHERE c6 = 3;
--replace_column 5 CURRENT_TIMESTAMP
SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1;
diff --git a/mysql-test/include/have_multi_ndb.inc b/mysql-test/include/have_multi_ndb.inc
index deda22b64c0..9779f181191 100644
--- a/mysql-test/include/have_multi_ndb.inc
+++ b/mysql-test/include/have_multi_ndb.inc
@@ -5,10 +5,6 @@ connect (server2,127.0.0.1,root,,test,$MASTER_MYPORT1,);
# Check that server1 has NDB support
connection server1;
disable_query_log;
---disable_warnings
-drop table if exists t1, t2;
---enable_warnings
-flush tables;
--require r/true.require
select (support = 'YES' or support = 'DEFAULT') as `TRUE` from information_schema.engines where engine = 'ndbcluster';
--source include/ndb_not_readonly.inc
@@ -17,14 +13,32 @@ enable_query_log;
# Check that server2 has NDB support
connection server2;
disable_query_log;
---disable_warnings
-drop table if exists t1, t2;
---enable_warnings
-flush tables;
--require r/true.require
select (support = 'YES' or support = 'DEFAULT') as `TRUE` from information_schema.engines where engine = 'ndbcluster';
--source include/ndb_not_readonly.inc
enable_query_log;
-# Set the default connection to 'server1'
+# cleanup
+
+connection server1;
+disable_query_log;
+disable_warnings;
+--error 0,1051
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
+flush tables;
+flush status;
+enable_warnings;
+enable_query_log;
+
+connection server2;
+disable_query_log;
+disable_warnings;
+--error 0,1051
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
+flush tables;
+flush status;
+enable_warnings;
+enable_query_log;
+
+# Set the default connection
connection server1;
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 1a8c18f7d27..18633d095b0 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -129,7 +129,15 @@ our $opt_vs_config = $ENV{'MTR_VS_CONFIG'};
our $default_vardir;
our $opt_usage;
-our $opt_suites= "main,binlog,rpl,rpl_ndb,ndb"; # Default suites to run
+our $opt_suites;
+our $opt_suites_default= "main,binlog,rpl,rpl_ndb,ndb"; # Default suites to run
+our @extra_suites=
+(
+ ["mysql-5.1-new-ndb", "ndb_team"],
+ ["mysql-5.1-telco-6.2", "ndb_team"],
+ ["mysql-5.1-telco-6.3", "ndb_team"],
+);
+
our $opt_script_debug= 0; # Script debugging, enable with --script-debug
our $opt_verbose= 0; # Verbose output, enable with --verbose
@@ -397,6 +405,20 @@ sub main () {
else
{
# Figure out which tests we are going to run
+ if (!$opt_suites)
+ {
+ # use default and add any extra_suites as defined
+ $opt_suites= $opt_suites_default;
+ my $ddd= basename(dirname($glob_mysql_test_dir));
+ foreach my $extra_suite (@extra_suites)
+ {
+ if ($extra_suite->[0] eq "$ddd")
+ {
+ $opt_suites= "$extra_suite->[1],$opt_suites";
+ }
+ }
+ }
+
my $tests= collect_test_cases($opt_suites);
# Turn off NDB and other similar options if no tests use it
@@ -5195,7 +5217,7 @@ Options to control what test suites or cases to run
start-from=PREFIX Run test cases starting from test prefixed with PREFIX
suite[s]=NAME1,..,NAMEN Collect tests in suites from the comma separated
list of suite names.
- The default is: "$opt_suites"
+ The default is: "$opt_suites_default"
skip-rpl Skip the replication test cases.
skip-im Don't start IM, and skip the IM test cases
big-test Set the environment variable BIG_TEST, which can be
diff --git a/mysql-test/suite/ndb/r/ndb_auto_increment.result b/mysql-test/suite/ndb/r/ndb_auto_increment.result
new file mode 100644
index 00000000000..5740ed38242
--- /dev/null
+++ b/mysql-test/suite/ndb/r/ndb_auto_increment.result
@@ -0,0 +1,445 @@
+DROP TABLE IF EXISTS t1,t2;
+DROP TABLE IF EXISTS t1;
+set @old_auto_increment_offset = @@session.auto_increment_offset;
+set @old_auto_increment_increment = @@session.auto_increment_increment;
+set @old_ndb_autoincrement_prefetch_sz = @@session.ndb_autoincrement_prefetch_sz;
+flush status;
+create table t1 (a int not null auto_increment primary key) engine ndb;
+insert into t1 values (NULL);
+select * from t1 order by a;
+a
+1
+update t1 set a = 5 where a = 1;
+insert into t1 values (NULL);
+select * from t1 order by a;
+a
+5
+6
+insert into t1 values (7);
+insert into t1 values (NULL);
+select * from t1 order by a;
+a
+5
+6
+7
+8
+insert into t1 values (2);
+insert into t1 values (NULL);
+select * from t1 order by a;
+a
+2
+5
+6
+7
+8
+9
+update t1 set a = 4 where a = 2;
+insert into t1 values (NULL);
+select * from t1 order by a;
+a
+4
+5
+6
+7
+8
+9
+10
+delete from t1 where a = 10;
+insert into t1 values (NULL);
+select * from t1 order by a;
+a
+4
+5
+6
+7
+8
+9
+11
+replace t1 values (NULL);
+select * from t1 order by a;
+a
+4
+5
+6
+7
+8
+9
+11
+12
+replace t1 values (15);
+select * from t1 order by a;
+a
+4
+5
+6
+7
+8
+9
+11
+12
+15
+replace into t1 values (NULL);
+select * from t1 order by a;
+a
+4
+5
+6
+7
+8
+9
+11
+12
+15
+16
+replace t1 values (15);
+select * from t1 order by a;
+a
+4
+5
+6
+7
+8
+9
+11
+12
+15
+16
+insert ignore into t1 values (NULL);
+select * from t1 order by a;
+a
+4
+5
+6
+7
+8
+9
+11
+12
+15
+16
+17
+insert ignore into t1 values (15), (NULL);
+select * from t1 order by a;
+a
+4
+5
+6
+7
+8
+9
+11
+12
+15
+16
+17
+18
+insert into t1 values (15)
+on duplicate key update a = 20;
+insert into t1 values (NULL);
+select * from t1 order by a;
+a
+4
+5
+6
+7
+8
+9
+11
+12
+16
+17
+18
+20
+21
+insert into t1 values (NULL) on duplicate key update a = 30;
+select * from t1 order by a;
+a
+4
+5
+6
+7
+8
+9
+11
+12
+16
+17
+18
+20
+21
+22
+insert into t1 values (30) on duplicate key update a = 40;
+select * from t1 order by a;
+a
+4
+5
+6
+7
+8
+9
+11
+12
+16
+17
+18
+20
+21
+22
+30
+insert ignore into t1 values(600),(NULL),(NULL),(610),(NULL);
+select * from t1 order by a;
+a
+4
+5
+6
+7
+8
+9
+11
+12
+16
+17
+18
+20
+21
+22
+30
+600
+601
+602
+610
+611
+drop table t1;
+create table t1 (a int not null primary key,
+b int not null unique auto_increment) engine ndb;
+insert into t1 values (1, NULL);
+insert into t1 values (3, NULL);
+update t1 set b = 3 where a = 3;
+insert into t1 values (4, NULL);
+select * from t1 order by a;
+a b
+1 1
+3 3
+4 4
+drop table t1;
+CREATE TABLE t1 (
+pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
+b INT NOT NULL,
+c INT NOT NULL UNIQUE
+) ENGINE=NDBCLUSTER;
+CREATE TABLE t2 (
+pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
+b INT NOT NULL,
+c INT NOT NULL UNIQUE
+) ENGINE=MYISAM;
+SET @@session.auto_increment_increment=10;
+INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
+INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
+SELECT * FROM t1 ORDER BY pk;
+pk b c
+1 1 0
+11 2 1
+21 3 2
+SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
+COUNT(t1.pk)
+3
+TRUNCATE t1;
+TRUNCATE t2;
+SET @@session.auto_increment_offset=5;
+INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
+INSERT INTO t1 (pk,b,c) VALUES (27,4,3),(NULL,5,4),(99,6,5),(NULL,7,6);
+INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
+INSERT INTO t2 (pk,b,c) VALUES (27,4,3),(NULL,5,4),(99,6,5),(NULL,7,6);
+SELECT * FROM t1 ORDER BY pk;
+pk b c
+5 1 0
+15 2 1
+25 3 2
+27 4 3
+35 5 4
+99 6 5
+105 7 6
+SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
+COUNT(t1.pk)
+7
+TRUNCATE t1;
+TRUNCATE t2;
+SET @@session.auto_increment_increment=2;
+INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
+INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
+SELECT * FROM t1 ORDER BY pk;
+pk b c
+1 1 0
+3 2 1
+5 3 2
+SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
+COUNT(t1.pk)
+3
+DROP TABLE t1, t2;
+CREATE TABLE t1 (
+pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
+b INT NOT NULL,
+c INT NOT NULL UNIQUE
+) ENGINE=NDBCLUSTER AUTO_INCREMENT = 7;
+CREATE TABLE t2 (
+pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
+b INT NOT NULL,
+c INT NOT NULL UNIQUE
+) ENGINE=MYISAM AUTO_INCREMENT = 7;
+SET @@session.auto_increment_offset=1;
+SET @@session.auto_increment_increment=1;
+INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
+INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
+SELECT * FROM t1 ORDER BY pk;
+pk b c
+7 1 0
+8 2 1
+9 3 2
+SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
+COUNT(t1.pk)
+3
+DROP TABLE t1, t2;
+CREATE TABLE t1 (
+pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
+b INT NOT NULL,
+c INT NOT NULL UNIQUE
+) ENGINE=NDBCLUSTER AUTO_INCREMENT = 3;
+CREATE TABLE t2 (
+pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
+b INT NOT NULL,
+c INT NOT NULL UNIQUE
+) ENGINE=MYISAM AUTO_INCREMENT = 3;
+SET @@session.auto_increment_offset=5;
+SET @@session.auto_increment_increment=10;
+INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
+INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
+SELECT * FROM t1 ORDER BY pk;
+pk b c
+5 1 0
+15 2 1
+25 3 2
+SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
+COUNT(t1.pk)
+3
+DROP TABLE t1, t2;
+CREATE TABLE t1 (
+pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
+b INT NOT NULL,
+c INT NOT NULL UNIQUE
+) ENGINE=NDBCLUSTER AUTO_INCREMENT = 7;
+CREATE TABLE t2 (
+pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
+b INT NOT NULL,
+c INT NOT NULL UNIQUE
+) ENGINE=MYISAM AUTO_INCREMENT = 7;
+SET @@session.auto_increment_offset=5;
+SET @@session.auto_increment_increment=10;
+INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
+INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
+SELECT * FROM t1 ORDER BY pk;
+pk b c
+15 1 0
+25 2 1
+35 3 2
+SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
+COUNT(t1.pk)
+3
+DROP TABLE t1, t2;
+CREATE TABLE t1 (
+pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
+b INT NOT NULL,
+c INT NOT NULL UNIQUE
+) ENGINE=NDBCLUSTER AUTO_INCREMENT = 5;
+CREATE TABLE t2 (
+pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
+b INT NOT NULL,
+c INT NOT NULL UNIQUE
+) ENGINE=MYISAM AUTO_INCREMENT = 5;
+SET @@session.auto_increment_offset=5;
+SET @@session.auto_increment_increment=10;
+INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
+INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
+SELECT * FROM t1 ORDER BY pk;
+pk b c
+5 1 0
+15 2 1
+25 3 2
+SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
+COUNT(t1.pk)
+3
+DROP TABLE t1, t2;
+CREATE TABLE t1 (
+pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
+b INT NOT NULL,
+c INT NOT NULL UNIQUE
+) ENGINE=NDBCLUSTER AUTO_INCREMENT = 100;
+CREATE TABLE t2 (
+pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
+b INT NOT NULL,
+c INT NOT NULL UNIQUE
+) ENGINE=MYISAM AUTO_INCREMENT = 100;
+SET @@session.auto_increment_offset=5;
+SET @@session.auto_increment_increment=10;
+INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
+INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
+SELECT * FROM t1 ORDER BY pk;
+pk b c
+105 1 0
+115 2 1
+125 3 2
+SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
+COUNT(t1.pk)
+3
+DROP TABLE t1, t2;
+SET @@session.auto_increment_offset=1;
+SET @@session.auto_increment_increment=1;
+set ndb_autoincrement_prefetch_sz = 32;
+drop table if exists t1;
+SET @@session.auto_increment_offset=1;
+SET @@session.auto_increment_increment=1;
+set ndb_autoincrement_prefetch_sz = 32;
+create table t1 (a int not null auto_increment primary key) engine ndb;
+insert into t1 values (NULL);
+insert into t1 values (NULL);
+select * from t1 order by a;
+a
+1
+33
+insert into t1 values (20);
+insert into t1 values (NULL);
+select * from t1 order by a;
+a
+1
+20
+33
+34
+insert into t1 values (35);
+insert into t1 values (NULL);
+insert into t1 values (NULL);
+ERROR 23000: Duplicate entry '35' for key 'PRIMARY'
+select * from t1 order by a;
+a
+1
+20
+21
+33
+34
+35
+insert into t1 values (100);
+insert into t1 values (NULL);
+insert into t1 values (NULL);
+select * from t1 order by a;
+a
+1
+20
+21
+22
+33
+34
+35
+100
+101
+set auto_increment_offset = @old_auto_increment_offset;
+set auto_increment_increment = @old_auto_increment_increment;
+set ndb_autoincrement_prefetch_sz = @old_ndb_autoincrement_prefetch_sz;
+drop table t1;
diff --git a/mysql-test/suite/ndb/r/ndb_basic.result b/mysql-test/suite/ndb/r/ndb_basic.result
index 4eddaeb1227..9f4f8c0755c 100644
--- a/mysql-test/suite/ndb/r/ndb_basic.result
+++ b/mysql-test/suite/ndb/r/ndb_basic.result
@@ -869,6 +869,30 @@ a b
3 30
4 1
drop table t1,t2;
+create table t1 (a varchar(100) primary key, b varchar(100)) engine = NDB;
+insert into t1 values
+('a', 'a'),('b','b'),('c', 'c'),('aa', 'aa'),('bb', 'bb'),('cc', 'cc');
+replace into t1 values ('a', '-a');
+replace into t1 values ('b', '-b');
+replace into t1 values ('c', '-c');
+replace into t1 values ('aa', '-aa');
+replace into t1 values ('bb', '-bb');
+replace into t1 values ('cc', '-cc');
+replace into t1 values ('aaa', '-aaa');
+replace into t1 values ('bbb', '-bbb');
+replace into t1 values ('ccc', '-ccc');
+select * from t1 order by 1,2;
+a b
+a -a
+aa -aa
+aaa -aaa
+b -b
+bb -bb
+bbb -bbb
+c -c
+cc -cc
+ccc -ccc
+drop table t1;
End of 5.0 tests
CREATE TABLE t1 (a VARCHAR(255) NOT NULL,
CONSTRAINT pk_a PRIMARY KEY (a))engine=ndb;
diff --git a/mysql-test/suite/ndb/r/ndb_blob.result b/mysql-test/suite/ndb/r/ndb_blob.result
index 34f2c5fdd66..31ce36864af 100644
--- a/mysql-test/suite/ndb/r/ndb_blob.result
+++ b/mysql-test/suite/ndb/r/ndb_blob.result
@@ -568,3 +568,24 @@ select count(*) from t1;
count(*)
0
drop table t1;
+create table t1(
+a int,
+blob_nn blob not null,
+text_nn text not null,
+blob_nl blob,
+text_nl text,
+primary key(a)
+) engine=ndb;
+insert into t1(a) values (1);
+Warnings:
+Warning 1364 Field 'blob_nn' doesn't have a default value
+Warning 1364 Field 'text_nn' doesn't have a default value
+insert into t1(a, text_nl) values (2, 'MySQL Cluster NDB');
+Warnings:
+Warning 1364 Field 'blob_nn' doesn't have a default value
+Warning 1364 Field 'text_nn' doesn't have a default value
+select a, length(blob_nn), length(text_nn), blob_nl, text_nl from t1 order by a;
+a length(blob_nn) length(text_nn) blob_nl text_nl
+1 0 0 NULL NULL
+2 0 0 NULL MySQL Cluster NDB
+drop table t1;
diff --git a/mysql-test/suite/ndb/r/ndb_charset.result b/mysql-test/suite/ndb/r/ndb_charset.result
index 1c65a380039..e84c906dd7e 100644
--- a/mysql-test/suite/ndb/r/ndb_charset.result
+++ b/mysql-test/suite/ndb/r/ndb_charset.result
@@ -112,9 +112,9 @@ unique key(a)
) engine=ndb;
insert into t1 values(1, 'aAa');
insert into t1 values(2, 'aaa');
-ERROR 23000: Duplicate entry '' for key '*UNKNOWN*'
+ERROR 23000: Duplicate entry 'aaa' for key 'a'
insert into t1 values(3, 'AAA');
-ERROR 23000: Duplicate entry '' for key '*UNKNOWN*'
+ERROR 23000: Duplicate entry 'AAA' for key 'a'
select * from t1 order by p;
p a
1 aAa
@@ -138,9 +138,9 @@ unique key(a)
) engine=ndb;
insert into t1 values (1,'A'),(2,'b '),(3,'C '),(4,'d '),(5,'E'),(6,'f');
insert into t1 values(99,'b');
-ERROR 23000: Duplicate entry '' for key '*UNKNOWN*'
+ERROR 23000: Duplicate entry 'b' for key 'a'
insert into t1 values(99,'a ');
-ERROR 23000: Duplicate entry '' for key '*UNKNOWN*'
+ERROR 23000: Duplicate entry 'a ' for key 'a'
select a,length(a) from t1 order by a;
a length(a)
A 1
diff --git a/mysql-test/suite/ndb/r/ndb_index_unique.result b/mysql-test/suite/ndb/r/ndb_index_unique.result
index cc63ce69760..bfc0c5a2e56 100644
--- a/mysql-test/suite/ndb/r/ndb_index_unique.result
+++ b/mysql-test/suite/ndb/r/ndb_index_unique.result
@@ -22,7 +22,7 @@ select * from t1 where b = 4 order by a;
a b c
3 4 6
insert into t1 values(8, 2, 3);
-ERROR 23000: Duplicate entry '' for key '*UNKNOWN*'
+ERROR 23000: Duplicate entry '2' for key 'ib'
select * from t1 order by a;
a b c
1 2 3
@@ -93,7 +93,7 @@ a b c
1 1 1
4 4 NULL
insert into t1 values(5,1,1);
-ERROR 23000: Duplicate entry '' for key '*UNKNOWN*'
+ERROR 23000: Duplicate entry '1-1' for key 'bc'
drop table t1;
CREATE TABLE t2 (
a int unsigned NOT NULL PRIMARY KEY,
@@ -116,7 +116,7 @@ select * from t2 where b = 4 order by a;
a b c
3 4 6
insert into t2 values(8, 2, 3);
-ERROR 23000: Duplicate entry '' for key '*UNKNOWN*'
+ERROR 23000: Duplicate entry '2-3' for key 'b'
select * from t2 order by a;
a b c
1 2 3
@@ -139,7 +139,7 @@ a b c
8 2 3
create unique index bi using hash on t2(b);
insert into t2 values(9, 3, 1);
-ERROR 23000: Duplicate entry '' for key '*UNKNOWN*'
+ERROR 23000: Duplicate entry '3' for key 'bi'
alter table t2 drop index bi;
insert into t2 values(9, 3, 1);
select * from t2 order by a;
@@ -229,7 +229,7 @@ pk a
3 NULL
4 4
insert into t1 values (5,0);
-ERROR 23000: Duplicate entry '' for key '*UNKNOWN*'
+ERROR 23000: Duplicate entry '0' for key 'a'
select * from t1 order by pk;
pk a
-1 NULL
@@ -262,7 +262,7 @@ pk a b c
0 NULL 18 NULL
1 3 19 abc
insert into t2 values(2,3,19,'abc');
-ERROR 23000: Duplicate entry '' for key '*UNKNOWN*'
+ERROR 23000: Duplicate entry '3-abc' for key 'si'
select * from t2 order by pk;
pk a b c
-1 1 17 NULL
@@ -682,7 +682,7 @@ create table t1 (a int primary key, b varchar(1000) not null, unique key (b))
engine=ndb charset=utf8;
insert into t1 values (1, repeat(_utf8 0xe288ab6474, 200));
insert into t1 values (2, repeat(_utf8 0xe288ab6474, 200));
-ERROR 23000: Duplicate entry '' for key '*UNKNOWN*'
+ERROR 23000: Duplicate entry '∫dt∫dt∫dt∫dt∫dt∫dt∫dt∫dt∫dt∫dt∫dt∫dt∫d' for key 'b'
select a, sha1(b) from t1;
a sha1(b)
1 08f5d02c8b8bc244f275bdfc22c42c5cab0d9d7d
diff --git a/mysql-test/suite/ndb/r/ndb_insert.result b/mysql-test/suite/ndb/r/ndb_insert.result
index 51b346bbf7b..7551dc71823 100644
--- a/mysql-test/suite/ndb/r/ndb_insert.result
+++ b/mysql-test/suite/ndb/r/ndb_insert.result
@@ -657,172 +657,3 @@ a b
2 NULL
3 NULL
drop table t1;
-CREATE TABLE t1 (
-pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
-b INT NOT NULL,
-c INT NOT NULL UNIQUE
-) ENGINE=NDBCLUSTER;
-CREATE TABLE t2 (
-pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
-b INT NOT NULL,
-c INT NOT NULL UNIQUE
-) ENGINE=MYISAM;
-SET @@session.auto_increment_increment=10;
-INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
-INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
-SELECT * FROM t1 ORDER BY pk;
-pk b c
-1 1 0
-11 2 1
-21 3 2
-SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
-COUNT(t1.pk)
-3
-TRUNCATE t1;
-TRUNCATE t2;
-SET @@session.auto_increment_offset=5;
-INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
-INSERT INTO t1 (pk,b,c) VALUES (27,4,3),(NULL,5,4),(99,6,5),(NULL,7,6);
-INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
-INSERT INTO t2 (pk,b,c) VALUES (27,4,3),(NULL,5,4),(99,6,5),(NULL,7,6);
-SELECT * FROM t1 ORDER BY pk;
-pk b c
-5 1 0
-15 2 1
-25 3 2
-27 4 3
-35 5 4
-99 6 5
-105 7 6
-SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
-COUNT(t1.pk)
-7
-TRUNCATE t1;
-TRUNCATE t2;
-SET @@session.auto_increment_increment=2;
-INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
-INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
-SELECT * FROM t1 ORDER BY pk;
-pk b c
-1 1 0
-3 2 1
-5 3 2
-SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
-COUNT(t1.pk)
-3
-DROP TABLE t1, t2;
-CREATE TABLE t1 (
-pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
-b INT NOT NULL,
-c INT NOT NULL UNIQUE
-) ENGINE=NDBCLUSTER AUTO_INCREMENT = 7;
-CREATE TABLE t2 (
-pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
-b INT NOT NULL,
-c INT NOT NULL UNIQUE
-) ENGINE=MYISAM AUTO_INCREMENT = 7;
-SET @@session.auto_increment_offset=1;
-SET @@session.auto_increment_increment=1;
-INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
-INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
-SELECT * FROM t1 ORDER BY pk;
-pk b c
-7 1 0
-8 2 1
-9 3 2
-SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
-COUNT(t1.pk)
-3
-DROP TABLE t1, t2;
-CREATE TABLE t1 (
-pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
-b INT NOT NULL,
-c INT NOT NULL UNIQUE
-) ENGINE=NDBCLUSTER AUTO_INCREMENT = 3;
-CREATE TABLE t2 (
-pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
-b INT NOT NULL,
-c INT NOT NULL UNIQUE
-) ENGINE=MYISAM AUTO_INCREMENT = 3;
-SET @@session.auto_increment_offset=5;
-SET @@session.auto_increment_increment=10;
-INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
-INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
-SELECT * FROM t1 ORDER BY pk;
-pk b c
-5 1 0
-15 2 1
-25 3 2
-SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
-COUNT(t1.pk)
-3
-DROP TABLE t1, t2;
-CREATE TABLE t1 (
-pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
-b INT NOT NULL,
-c INT NOT NULL UNIQUE
-) ENGINE=NDBCLUSTER AUTO_INCREMENT = 7;
-CREATE TABLE t2 (
-pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
-b INT NOT NULL,
-c INT NOT NULL UNIQUE
-) ENGINE=MYISAM AUTO_INCREMENT = 7;
-SET @@session.auto_increment_offset=5;
-SET @@session.auto_increment_increment=10;
-INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
-INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
-SELECT * FROM t1 ORDER BY pk;
-pk b c
-15 1 0
-25 2 1
-35 3 2
-SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
-COUNT(t1.pk)
-3
-DROP TABLE t1, t2;
-CREATE TABLE t1 (
-pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
-b INT NOT NULL,
-c INT NOT NULL UNIQUE
-) ENGINE=NDBCLUSTER AUTO_INCREMENT = 5;
-CREATE TABLE t2 (
-pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
-b INT NOT NULL,
-c INT NOT NULL UNIQUE
-) ENGINE=MYISAM AUTO_INCREMENT = 5;
-SET @@session.auto_increment_offset=5;
-SET @@session.auto_increment_increment=10;
-INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
-INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
-SELECT * FROM t1 ORDER BY pk;
-pk b c
-5 1 0
-15 2 1
-25 3 2
-SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
-COUNT(t1.pk)
-3
-DROP TABLE t1, t2;
-CREATE TABLE t1 (
-pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
-b INT NOT NULL,
-c INT NOT NULL UNIQUE
-) ENGINE=NDBCLUSTER AUTO_INCREMENT = 100;
-CREATE TABLE t2 (
-pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
-b INT NOT NULL,
-c INT NOT NULL UNIQUE
-) ENGINE=MYISAM AUTO_INCREMENT = 100;
-SET @@session.auto_increment_offset=5;
-SET @@session.auto_increment_increment=10;
-INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
-INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
-SELECT * FROM t1 ORDER BY pk;
-pk b c
-105 1 0
-115 2 1
-125 3 2
-SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
-COUNT(t1.pk)
-3
-DROP TABLE t1, t2;
diff --git a/mysql-test/suite/ndb/r/ndb_multi.result b/mysql-test/suite/ndb/r/ndb_multi.result
index 17380b10fd7..40483887919 100644
--- a/mysql-test/suite/ndb/r/ndb_multi.result
+++ b/mysql-test/suite/ndb/r/ndb_multi.result
@@ -1,4 +1,5 @@
drop table if exists t1, t2, t3, t4;
+flush status;
drop table if exists t1, t2, t3, t4;
flush status;
create table t1 (a int) engine=ndbcluster;
diff --git a/mysql-test/suite/ndb/r/ndb_multi_row.result b/mysql-test/suite/ndb/r/ndb_multi_row.result
index cf5a76d6f01..3d34b16a1a8 100644
--- a/mysql-test/suite/ndb/r/ndb_multi_row.result
+++ b/mysql-test/suite/ndb/r/ndb_multi_row.result
@@ -1,4 +1,5 @@
drop table if exists t1, t2, t3, t4;
+flush status;
drop table if exists t1, t2, t3, t4;
flush status;
create table t1 (a int) engine=ndbcluster;
diff --git a/mysql-test/suite/ndb/r/ndb_update.result b/mysql-test/suite/ndb/r/ndb_update.result
index ed51daee5cb..fa083587956 100644
--- a/mysql-test/suite/ndb/r/ndb_update.result
+++ b/mysql-test/suite/ndb/r/ndb_update.result
@@ -28,7 +28,7 @@ pk1 b c
2 2 2
4 1 1
UPDATE t1 set pk1 = 1, c = 2 where pk1 = 4;
-ERROR 23000: Duplicate entry '' for key '*UNKNOWN*'
+ERROR 23000: Duplicate entry '2' for key 'c'
UPDATE IGNORE t1 set pk1 = 1, c = 2 where pk1 = 4;
select * from t1 order by pk1;
pk1 b c
@@ -62,9 +62,9 @@ INSERT INTO t3 VALUES (2, 2);
UPDATE t1 SET a = 1;
UPDATE t1 SET a = 1 ORDER BY a;
UPDATE t2 SET a = 1;
-ERROR 23000: Duplicate entry '' for key '*UNKNOWN*'
+ERROR 23000: Duplicate entry '1-2' for key 'a'
UPDATE t2 SET a = 1 ORDER BY a;
-ERROR 23000: Duplicate entry '' for key '*UNKNOWN*'
+ERROR 23000: Duplicate entry '1-2' for key 'a'
UPDATE t3 SET a = 1;
ERROR 23000: Duplicate entry '1-2' for key 'PRIMARY'
UPDATE t3 SET a = 1 ORDER BY a;
diff --git a/mysql-test/suite/ndb/t/disabled.def b/mysql-test/suite/ndb/t/disabled.def
index 1752314ea47..f876039a042 100644
--- a/mysql-test/suite/ndb/t/disabled.def
+++ b/mysql-test/suite/ndb/t/disabled.def
@@ -12,10 +12,7 @@
partition_03ndb : BUG#16385 2006-03-24 mikael Partitions: crash when updating a range partitioned NDB table
ndb_partition_error2 : HF is not sure if the test can work as internded on all the platforms
-ndb_binlog_basic : Bug #32759 2007-11-27 mats ndb_binlog_basic assert failure 'thd->transaction.stmt.modified_non_trans_table'
# 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_binlog_discover : bug#21806 2006-08-24
-ndb_backup_print : Bug#32357: ndb_backup_print test fails sometimes in pushbuild
-ndb_dd_backuprestore : Bug#32659 ndb_dd_backuprestore.test fails randomly
diff --git a/mysql-test/suite/ndb/t/ndb_auto_increment.test b/mysql-test/suite/ndb/t/ndb_auto_increment.test
new file mode 100644
index 00000000000..14e7ae7ca7b
--- /dev/null
+++ b/mysql-test/suite/ndb/t/ndb_auto_increment.test
@@ -0,0 +1,293 @@
+-- source include/have_multi_ndb.inc
+-- source include/not_embedded.inc
+
+--disable_warnings
+connection server1;
+DROP TABLE IF EXISTS t1,t2;
+connection server2;
+DROP TABLE IF EXISTS t1;
+connection server1;
+--enable_warnings
+
+set @old_auto_increment_offset = @@session.auto_increment_offset;
+set @old_auto_increment_increment = @@session.auto_increment_increment;
+set @old_ndb_autoincrement_prefetch_sz = @@session.ndb_autoincrement_prefetch_sz;
+
+flush status;
+
+create table t1 (a int not null auto_increment primary key) engine ndb;
+
+# Step 1: Verify simple insert
+insert into t1 values (NULL);
+select * from t1 order by a;
+
+# Step 2: Verify simple update with higher than highest value causes
+# next insert to use updated_value + 1
+update t1 set a = 5 where a = 1;
+insert into t1 values (NULL);
+select * from t1 order by a;
+
+# Step 3: Verify insert that inserts higher than highest value causes
+# next insert to use inserted_value + 1
+insert into t1 values (7);
+insert into t1 values (NULL);
+select * from t1 order by a;
+
+# Step 4: Verify that insert into hole, lower than highest value doesn't
+# affect next insert
+insert into t1 values (2);
+insert into t1 values (NULL);
+select * from t1 order by a;
+
+# Step 5: Verify that update into hole, lower than highest value doesn't
+# affect next insert
+update t1 set a = 4 where a = 2;
+insert into t1 values (NULL);
+select * from t1 order by a;
+
+# Step 6: Verify that delete of highest value doesn't cause the next
+# insert to reuse this value
+delete from t1 where a = 10;
+insert into t1 values (NULL);
+select * from t1 order by a;
+
+# Step 7: Verify that REPLACE has the same effect as INSERT
+replace t1 values (NULL);
+select * from t1 order by a;
+replace t1 values (15);
+select * from t1 order by a;
+replace into t1 values (NULL);
+select * from t1 order by a;
+
+# Step 8: Verify that REPLACE has the same effect as UPDATE
+replace t1 values (15);
+select * from t1 order by a;
+
+# Step 9: Verify that IGNORE doesn't affect auto_increment
+insert ignore into t1 values (NULL);
+select * from t1 order by a;
+insert ignore into t1 values (15), (NULL);
+select * from t1 order by a;
+
+# Step 10: Verify that on duplicate key as UPDATE behaves as an
+# UPDATE
+insert into t1 values (15)
+on duplicate key update a = 20;
+insert into t1 values (NULL);
+select * from t1 order by a;
+
+# Step 11: Verify that on duplicate key as INSERT behaves as INSERT
+insert into t1 values (NULL) on duplicate key update a = 30;
+select * from t1 order by a;
+insert into t1 values (30) on duplicate key update a = 40;
+select * from t1 order by a;
+
+#Step 12: Vefify INSERT IGNORE (bug#32055)
+insert ignore into t1 values(600),(NULL),(NULL),(610),(NULL);
+select * from t1 order by a;
+drop table t1;
+
+#Step 13: Verify auto_increment of unique key
+create table t1 (a int not null primary key,
+ b int not null unique auto_increment) engine ndb;
+insert into t1 values (1, NULL);
+insert into t1 values (3, NULL);
+update t1 set b = 3 where a = 3;
+insert into t1 values (4, NULL);
+select * from t1 order by a;
+drop table t1;
+
+#Step 14: Verify that auto_increment_increment and auto_increment_offset
+# work as expected
+
+CREATE TABLE t1 (
+ pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
+ b INT NOT NULL,
+ c INT NOT NULL UNIQUE
+) ENGINE=NDBCLUSTER;
+
+CREATE TABLE t2 (
+ pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
+ b INT NOT NULL,
+ c INT NOT NULL UNIQUE
+) ENGINE=MYISAM;
+
+SET @@session.auto_increment_increment=10;
+INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
+INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
+SELECT * FROM t1 ORDER BY pk;
+SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
+TRUNCATE t1;
+TRUNCATE t2;
+SET @@session.auto_increment_offset=5;
+INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
+INSERT INTO t1 (pk,b,c) VALUES (27,4,3),(NULL,5,4),(99,6,5),(NULL,7,6);
+INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
+INSERT INTO t2 (pk,b,c) VALUES (27,4,3),(NULL,5,4),(99,6,5),(NULL,7,6);
+SELECT * FROM t1 ORDER BY pk;
+SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
+TRUNCATE t1;
+TRUNCATE t2;
+SET @@session.auto_increment_increment=2;
+INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
+INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
+SELECT * FROM t1 ORDER BY pk;
+SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
+DROP TABLE t1, t2;
+
+CREATE TABLE t1 (
+ pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
+ b INT NOT NULL,
+ c INT NOT NULL UNIQUE
+) ENGINE=NDBCLUSTER AUTO_INCREMENT = 7;
+
+CREATE TABLE t2 (
+ pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
+ b INT NOT NULL,
+ c INT NOT NULL UNIQUE
+) ENGINE=MYISAM AUTO_INCREMENT = 7;
+
+SET @@session.auto_increment_offset=1;
+SET @@session.auto_increment_increment=1;
+INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
+INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
+SELECT * FROM t1 ORDER BY pk;
+SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
+DROP TABLE t1, t2;
+
+CREATE TABLE t1 (
+ pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
+ b INT NOT NULL,
+ c INT NOT NULL UNIQUE
+) ENGINE=NDBCLUSTER AUTO_INCREMENT = 3;
+
+CREATE TABLE t2 (
+ pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
+ b INT NOT NULL,
+ c INT NOT NULL UNIQUE
+) ENGINE=MYISAM AUTO_INCREMENT = 3;
+
+SET @@session.auto_increment_offset=5;
+SET @@session.auto_increment_increment=10;
+INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
+INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
+SELECT * FROM t1 ORDER BY pk;
+SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
+DROP TABLE t1, t2;
+
+CREATE TABLE t1 (
+ pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
+ b INT NOT NULL,
+ c INT NOT NULL UNIQUE
+) ENGINE=NDBCLUSTER AUTO_INCREMENT = 7;
+
+CREATE TABLE t2 (
+ pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
+ b INT NOT NULL,
+ c INT NOT NULL UNIQUE
+) ENGINE=MYISAM AUTO_INCREMENT = 7;
+
+SET @@session.auto_increment_offset=5;
+SET @@session.auto_increment_increment=10;
+INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
+INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
+SELECT * FROM t1 ORDER BY pk;
+SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
+DROP TABLE t1, t2;
+
+CREATE TABLE t1 (
+ pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
+ b INT NOT NULL,
+ c INT NOT NULL UNIQUE
+) ENGINE=NDBCLUSTER AUTO_INCREMENT = 5;
+
+CREATE TABLE t2 (
+ pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
+ b INT NOT NULL,
+ c INT NOT NULL UNIQUE
+) ENGINE=MYISAM AUTO_INCREMENT = 5;
+
+SET @@session.auto_increment_offset=5;
+SET @@session.auto_increment_increment=10;
+INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
+INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
+SELECT * FROM t1 ORDER BY pk;
+SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
+DROP TABLE t1, t2;
+
+CREATE TABLE t1 (
+ pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
+ b INT NOT NULL,
+ c INT NOT NULL UNIQUE
+) ENGINE=NDBCLUSTER AUTO_INCREMENT = 100;
+
+CREATE TABLE t2 (
+ pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
+ b INT NOT NULL,
+ c INT NOT NULL UNIQUE
+) ENGINE=MYISAM AUTO_INCREMENT = 100;
+
+SET @@session.auto_increment_offset=5;
+SET @@session.auto_increment_increment=10;
+INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
+INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
+SELECT * FROM t1 ORDER BY pk;
+SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
+DROP TABLE t1, t2;
+
+#Step 15: Now verify that behaviour on multiple MySQL Servers behave
+# properly. Start by dropping table and recreating it to start
+# counters and id caches from zero again.
+--disable_warnings
+connection server2;
+SET @@session.auto_increment_offset=1;
+SET @@session.auto_increment_increment=1;
+set ndb_autoincrement_prefetch_sz = 32;
+drop table if exists t1;
+connection server1;
+SET @@session.auto_increment_offset=1;
+SET @@session.auto_increment_increment=1;
+set ndb_autoincrement_prefetch_sz = 32;
+--enable_warnings
+
+
+create table t1 (a int not null auto_increment primary key) engine ndb;
+# Basic test, ensure that the second server gets a new range.
+#Generate record with key = 1
+insert into t1 values (NULL);
+connection server2;
+#Generate record with key = 33
+insert into t1 values (NULL);
+connection server1;
+select * from t1 order by a;
+
+#This insert should not affect the range of the second server
+insert into t1 values (20);
+connection server2;
+insert into t1 values (NULL);
+select * from t1 order by a;
+
+connection server1;
+#This insert should remove cached values but also skip values already
+#taken by server2, given that there is no method of communicating with
+#the other server it should also cause a conflict
+connection server1;
+
+insert into t1 values (35);
+insert into t1 values (NULL);
+connection server2;
+--error ER_DUP_ENTRY
+insert into t1 values (NULL);
+select * from t1 order by a;
+
+insert into t1 values (100);
+insert into t1 values (NULL);
+connection server1;
+insert into t1 values (NULL);
+select * from t1 order by a;
+
+set auto_increment_offset = @old_auto_increment_offset;
+set auto_increment_increment = @old_auto_increment_increment;
+set ndb_autoincrement_prefetch_sz = @old_ndb_autoincrement_prefetch_sz;
+
+drop table t1;
diff --git a/mysql-test/suite/ndb/t/ndb_basic.test b/mysql-test/suite/ndb/t/ndb_basic.test
index b9ccdf9fd0d..2fc140288ca 100644
--- a/mysql-test/suite/ndb/t/ndb_basic.test
+++ b/mysql-test/suite/ndb/t/ndb_basic.test
@@ -800,9 +800,27 @@ update ignore t1,t2 set a = 1, c = 1 where a = 3 and c = 3;
select * from t1 order by a;
drop table t1,t2;
-# End of 5.0 tests
---echo End of 5.0 tests
+#
+# Bug#31635
+#
+create table t1 (a varchar(100) primary key, b varchar(100)) engine = NDB;
+insert into t1 values
+ ('a', 'a'),('b','b'),('c', 'c'),('aa', 'aa'),('bb', 'bb'),('cc', 'cc');
+replace into t1 values ('a', '-a');
+replace into t1 values ('b', '-b');
+replace into t1 values ('c', '-c');
+
+replace into t1 values ('aa', '-aa');
+replace into t1 values ('bb', '-bb');
+replace into t1 values ('cc', '-cc');
+
+replace into t1 values ('aaa', '-aaa');
+replace into t1 values ('bbb', '-bbb');
+replace into t1 values ('ccc', '-ccc');
+select * from t1 order by 1,2;
+drop table t1;
+--echo End of 5.0 tests
#
# Bug #18483 Cannot create table with FK constraint
diff --git a/mysql-test/suite/ndb/t/ndb_blob.test b/mysql-test/suite/ndb/t/ndb_blob.test
index b9a8c7e20ee..0388913df8b 100644
--- a/mysql-test/suite/ndb/t/ndb_blob.test
+++ b/mysql-test/suite/ndb/t/ndb_blob.test
@@ -497,3 +497,23 @@ select count(*) from t1;
drop table t1;
# End of 4.1 tests
+
+
+# bug # 30674 :
+# NOT NULL Blobs should default to zero-length. Not NULL TEXT
+# should default to zero-chars
+create table t1(
+ a int,
+ blob_nn blob not null,
+ text_nn text not null,
+ blob_nl blob,
+ text_nl text,
+ primary key(a)
+) engine=ndb;
+
+insert into t1(a) values (1);
+insert into t1(a, text_nl) values (2, 'MySQL Cluster NDB');
+
+select a, length(blob_nn), length(text_nn), blob_nl, text_nl from t1 order by a;
+
+drop table t1;
diff --git a/mysql-test/suite/ndb/t/ndb_insert.test b/mysql-test/suite/ndb/t/ndb_insert.test
index 5b74cc9202c..d659f8357f2 100644
--- a/mysql-test/suite/ndb/t/ndb_insert.test
+++ b/mysql-test/suite/ndb/t/ndb_insert.test
@@ -638,142 +638,4 @@ create table t1(a int primary key, b int, unique key(b)) engine=ndb;
insert ignore into t1 values (1,0), (2,0), (2,null), (3,null);
select * from t1 order by a;
drop table t1;
-
-# Bug#26342 auto_increment_increment AND auto_increment_offset REALLY REALLY anger NDB cluster
-
-CREATE TABLE t1 (
- pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
- b INT NOT NULL,
- c INT NOT NULL UNIQUE
-) ENGINE=NDBCLUSTER;
-
-CREATE TABLE t2 (
- pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
- b INT NOT NULL,
- c INT NOT NULL UNIQUE
-) ENGINE=MYISAM;
-
-SET @@session.auto_increment_increment=10;
-INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
-INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
-SELECT * FROM t1 ORDER BY pk;
-SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
-TRUNCATE t1;
-TRUNCATE t2;
-SET @@session.auto_increment_offset=5;
-INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
-INSERT INTO t1 (pk,b,c) VALUES (27,4,3),(NULL,5,4),(99,6,5),(NULL,7,6);
-INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
-INSERT INTO t2 (pk,b,c) VALUES (27,4,3),(NULL,5,4),(99,6,5),(NULL,7,6);
-SELECT * FROM t1 ORDER BY pk;
-SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
-TRUNCATE t1;
-TRUNCATE t2;
-SET @@session.auto_increment_increment=2;
-INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
-INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
-SELECT * FROM t1 ORDER BY pk;
-SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
-DROP TABLE t1, t2;
-
-CREATE TABLE t1 (
- pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
- b INT NOT NULL,
- c INT NOT NULL UNIQUE
-) ENGINE=NDBCLUSTER AUTO_INCREMENT = 7;
-
-CREATE TABLE t2 (
- pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
- b INT NOT NULL,
- c INT NOT NULL UNIQUE
-) ENGINE=MYISAM AUTO_INCREMENT = 7;
-
-SET @@session.auto_increment_offset=1;
-SET @@session.auto_increment_increment=1;
-INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
-INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
-SELECT * FROM t1 ORDER BY pk;
-SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
-DROP TABLE t1, t2;
-
-CREATE TABLE t1 (
- pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
- b INT NOT NULL,
- c INT NOT NULL UNIQUE
-) ENGINE=NDBCLUSTER AUTO_INCREMENT = 3;
-
-CREATE TABLE t2 (
- pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
- b INT NOT NULL,
- c INT NOT NULL UNIQUE
-) ENGINE=MYISAM AUTO_INCREMENT = 3;
-
-SET @@session.auto_increment_offset=5;
-SET @@session.auto_increment_increment=10;
-INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
-INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
-SELECT * FROM t1 ORDER BY pk;
-SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
-DROP TABLE t1, t2;
-
-CREATE TABLE t1 (
- pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
- b INT NOT NULL,
- c INT NOT NULL UNIQUE
-) ENGINE=NDBCLUSTER AUTO_INCREMENT = 7;
-
-CREATE TABLE t2 (
- pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
- b INT NOT NULL,
- c INT NOT NULL UNIQUE
-) ENGINE=MYISAM AUTO_INCREMENT = 7;
-
-SET @@session.auto_increment_offset=5;
-SET @@session.auto_increment_increment=10;
-INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
-INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
-SELECT * FROM t1 ORDER BY pk;
-SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
-DROP TABLE t1, t2;
-
-CREATE TABLE t1 (
- pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
- b INT NOT NULL,
- c INT NOT NULL UNIQUE
-) ENGINE=NDBCLUSTER AUTO_INCREMENT = 5;
-
-CREATE TABLE t2 (
- pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
- b INT NOT NULL,
- c INT NOT NULL UNIQUE
-) ENGINE=MYISAM AUTO_INCREMENT = 5;
-
-SET @@session.auto_increment_offset=5;
-SET @@session.auto_increment_increment=10;
-INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
-INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
-SELECT * FROM t1 ORDER BY pk;
-SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
-DROP TABLE t1, t2;
-
-CREATE TABLE t1 (
- pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
- b INT NOT NULL,
- c INT NOT NULL UNIQUE
-) ENGINE=NDBCLUSTER AUTO_INCREMENT = 100;
-
-CREATE TABLE t2 (
- pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
- b INT NOT NULL,
- c INT NOT NULL UNIQUE
-) ENGINE=MYISAM AUTO_INCREMENT = 100;
-
-SET @@session.auto_increment_offset=5;
-SET @@session.auto_increment_increment=10;
-INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
-INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
-SELECT * FROM t1 ORDER BY pk;
-SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
-DROP TABLE t1, t2;
-
# End of 4.1 tests
diff --git a/mysql-test/suite/ndb/t/ndb_multi.test b/mysql-test/suite/ndb/t/ndb_multi.test
index c2217b51d08..e033ad1e479 100644
--- a/mysql-test/suite/ndb/t/ndb_multi.test
+++ b/mysql-test/suite/ndb/t/ndb_multi.test
@@ -4,11 +4,11 @@
--disable_warnings
connection server2;
drop table if exists t1, t2, t3, t4;
+flush status;
connection server1;
drop table if exists t1, t2, t3, t4;
---enable_warnings
-
flush status;
+--enable_warnings
# Create test tables on server1
create table t1 (a int) engine=ndbcluster;
diff --git a/mysql-test/suite/ndb/t/ndb_multi_row.test b/mysql-test/suite/ndb/t/ndb_multi_row.test
index c82307839f4..26953093ed0 100644
--- a/mysql-test/suite/ndb/t/ndb_multi_row.test
+++ b/mysql-test/suite/ndb/t/ndb_multi_row.test
@@ -6,11 +6,12 @@
--disable_warnings
connection server2;
drop table if exists t1, t2, t3, t4;
+flush status;
connection server1;
drop table if exists t1, t2, t3, t4;
+flush status;
--enable_warnings
-flush status;
# Create test tables on server1
create table t1 (a int) engine=ndbcluster;
diff --git a/mysql-test/suite/ndb/r/ndb_backup_print.result b/mysql-test/suite/ndb_team/r/ndb_backup_print.result
index 7fa073bafb5..7fa073bafb5 100644
--- a/mysql-test/suite/ndb/r/ndb_backup_print.result
+++ b/mysql-test/suite/ndb_team/r/ndb_backup_print.result
diff --git a/mysql-test/suite/ndb/r/ndb_dd_backuprestore.result b/mysql-test/suite/ndb_team/r/ndb_dd_backuprestore.result
index c82fe560121..c82fe560121 100644
--- a/mysql-test/suite/ndb/r/ndb_dd_backuprestore.result
+++ b/mysql-test/suite/ndb_team/r/ndb_dd_backuprestore.result
diff --git a/mysql-test/suite/ndb/t/ndb_backup_print.test b/mysql-test/suite/ndb_team/t/ndb_backup_print.test
index cf869fd56f5..cf869fd56f5 100644
--- a/mysql-test/suite/ndb/t/ndb_backup_print.test
+++ b/mysql-test/suite/ndb_team/t/ndb_backup_print.test
diff --git a/mysql-test/suite/ndb/t/ndb_dd_backuprestore.test b/mysql-test/suite/ndb_team/t/ndb_dd_backuprestore.test
index 48db8ec3e0b..48db8ec3e0b 100644
--- a/mysql-test/suite/ndb/t/ndb_dd_backuprestore.test
+++ b/mysql-test/suite/ndb_team/t/ndb_dd_backuprestore.test
diff --git a/mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result b/mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result
index af460ded1e7..ad67f96db71 100644
--- a/mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result
+++ b/mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result
@@ -1089,18 +1089,19 @@ c1 hex(c4) c5
3 62316231623162316231623162316231 QA
** update from master **
+UPDATE t18 SET c5 = 'TEST' WHERE c6 = 3;
SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1;
c1 hex(c4) c5 c6 c7
1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP
2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP
-3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP
+3 62316231623162316231623162316231 TEST 3 CURRENT_TIMESTAMP
** Check slave **
SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1;
c1 hex(c4) c5
1 62316231623162316231623162316231 Kyle
2 62316231623162316231623162316231 JOE
-3 62316231623162316231623162316231 QA
+3 62316231623162316231623162316231 TEST
DROP TABLE t18;
@@ -2229,18 +2230,19 @@ c1 hex(c4) c5
3 62316231623162316231623162316231 QA
** update from master **
+UPDATE t18 SET c5 = 'TEST' WHERE c6 = 3;
SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1;
c1 hex(c4) c5 c6 c7
1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP
2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP
-3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP
+3 62316231623162316231623162316231 TEST 3 CURRENT_TIMESTAMP
** Check slave **
SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1;
c1 hex(c4) c5
1 62316231623162316231623162316231 Kyle
2 62316231623162316231623162316231 JOE
-3 62316231623162316231623162316231 QA
+3 62316231623162316231623162316231 TEST
DROP TABLE t18;
@@ -3369,18 +3371,19 @@ c1 hex(c4) c5
3 62316231623162316231623162316231 QA
** update from master **
+UPDATE t18 SET c5 = 'TEST' WHERE c6 = 3;
SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1;
c1 hex(c4) c5 c6 c7
1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP
2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP
-3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP
+3 62316231623162316231623162316231 TEST 3 CURRENT_TIMESTAMP
** Check slave **
SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1;
c1 hex(c4) c5
1 62316231623162316231623162316231 Kyle
2 62316231623162316231623162316231 JOE
-3 62316231623162316231623162316231 QA
+3 62316231623162316231623162316231 TEST
DROP TABLE t18;
diff --git a/mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result b/mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result
index f0613c16825..8859a8e24e3 100644
--- a/mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result
+++ b/mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result
@@ -1089,18 +1089,19 @@ c1 hex(c4) c5
3 62316231623162316231623162316231 QA
** update from master **
+UPDATE t18 SET c5 = 'TEST' WHERE c6 = 3;
SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1;
c1 hex(c4) c5 c6 c7
1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP
2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP
-3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP
+3 62316231623162316231623162316231 TEST 3 CURRENT_TIMESTAMP
** Check slave **
SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1;
c1 hex(c4) c5
1 62316231623162316231623162316231 Kyle
2 62316231623162316231623162316231 JOE
-3 62316231623162316231623162316231 QA
+3 62316231623162316231623162316231 TEST
DROP TABLE t18;
@@ -2229,18 +2230,19 @@ c1 hex(c4) c5
3 62316231623162316231623162316231 QA
** update from master **
+UPDATE t18 SET c5 = 'TEST' WHERE c6 = 3;
SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1;
c1 hex(c4) c5 c6 c7
1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP
2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP
-3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP
+3 62316231623162316231623162316231 TEST 3 CURRENT_TIMESTAMP
** Check slave **
SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1;
c1 hex(c4) c5
1 62316231623162316231623162316231 Kyle
2 62316231623162316231623162316231 JOE
-3 62316231623162316231623162316231 QA
+3 62316231623162316231623162316231 TEST
DROP TABLE t18;
@@ -3369,18 +3371,19 @@ c1 hex(c4) c5
3 62316231623162316231623162316231 QA
** update from master **
+UPDATE t18 SET c5 = 'TEST' WHERE c6 = 3;
SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1;
c1 hex(c4) c5 c6 c7
1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP
2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP
-3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP
+3 62316231623162316231623162316231 TEST 3 CURRENT_TIMESTAMP
** Check slave **
SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1;
c1 hex(c4) c5
1 62316231623162316231623162316231 Kyle
2 62316231623162316231623162316231 JOE
-3 62316231623162316231623162316231 QA
+3 62316231623162316231623162316231 TEST
DROP TABLE t18;
diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_ddl.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_ddl.result
index aeaca1e7de0..e668b57293e 100644
--- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_ddl.result
+++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_ddl.result
@@ -1086,6 +1086,9 @@ Modified #
Created #
Security_type DEFINER
Comment
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
-------- switch to slave --------
SHOW PROCEDURE STATUS LIKE 'p1';
@@ -1097,6 +1100,9 @@ Modified #
Created #
Security_type DEFINER
Comment
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
-------- switch to master -------
@@ -1149,6 +1155,9 @@ Modified #
Created #
Security_type DEFINER
Comment I have been altered
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
-------- switch to slave --------
SHOW PROCEDURE STATUS LIKE 'p1';
@@ -1160,6 +1169,9 @@ Modified #
Created #
Security_type DEFINER
Comment I have been altered
+character_set_client latin1
+collation_connection latin1_swedish_ci
+Database Collation latin1_swedish_ci
-------- switch to master -------
@@ -1251,13 +1263,13 @@ TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
-------- switch to master -------
SHOW CREATE VIEW v1;
-View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1`
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` latin1 latin1_swedish_ci
-------- switch to slave --------
SHOW CREATE VIEW v1;
-View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1`
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` latin1 latin1_swedish_ci
-------- switch to master -------
@@ -1302,13 +1314,13 @@ TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
-------- switch to master -------
SHOW CREATE VIEW v1;
-View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1`
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` latin1 latin1_swedish_ci
-------- switch to slave --------
SHOW CREATE VIEW v1;
-View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1`
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` latin1 latin1_swedish_ci
-------- switch to master -------
@@ -1402,13 +1414,13 @@ TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
-------- switch to master -------
SHOW TRIGGERS;
-Trigger Event Table Statement Timing Created sql_mode Definer
-trg1 INSERT t1 SET @a:=1 BEFORE NULL root@localhost
+Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
+trg1 INSERT t1 SET @a:=1 BEFORE NULL root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
-------- switch to slave --------
SHOW TRIGGERS;
-Trigger Event Table Statement Timing Created sql_mode Definer
-trg1 INSERT t1 SET @a:=1 BEFORE NULL root@localhost
+Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
+trg1 INSERT t1 SET @a:=1 BEFORE NULL root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
-------- switch to master -------
@@ -1453,11 +1465,11 @@ TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
-------- switch to master -------
SHOW TRIGGERS;
-Trigger Event Table Statement Timing Created sql_mode Definer
+Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
-------- switch to slave --------
SHOW TRIGGERS;
-Trigger Event Table Statement Timing Created sql_mode Definer
+Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
-------- switch to master -------
diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraColMaster.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraColMaster.result
index d5d4658c01f..194e6a375f3 100644
--- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraColMaster.result
+++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraColMaster.result
@@ -1089,18 +1089,19 @@ c1 hex(c4) c5
3 62316231623162316231623162316231 QA
** update from master **
+UPDATE t18 SET c5 = 'TEST' WHERE c6 = 3;
SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1;
c1 hex(c4) c5 c6 c7
1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP
2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP
-3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP
+3 62316231623162316231623162316231 TEST 3 CURRENT_TIMESTAMP
** Check slave **
SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1;
c1 hex(c4) c5
1 62316231623162316231623162316231 Kyle
2 62316231623162316231623162316231 JOE
-3 62316231623162316231623162316231 QA
+3 62316231623162316231623162316231 TEST
DROP TABLE t18;
@@ -2229,18 +2230,19 @@ c1 hex(c4) c5
3 62316231623162316231623162316231 QA
** update from master **
+UPDATE t18 SET c5 = 'TEST' WHERE c6 = 3;
SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1;
c1 hex(c4) c5 c6 c7
1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP
2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP
-3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP
+3 62316231623162316231623162316231 TEST 3 CURRENT_TIMESTAMP
** Check slave **
SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1;
c1 hex(c4) c5
1 62316231623162316231623162316231 Kyle
2 62316231623162316231623162316231 JOE
-3 62316231623162316231623162316231 QA
+3 62316231623162316231623162316231 TEST
DROP TABLE t18;
diff --git a/mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result b/mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result
index abd5bad8e49..f176d4eb52a 100644
--- a/mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result
+++ b/mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result
@@ -389,9 +389,9 @@ INSERT INTO t8 VALUES (99,99,99);
INSERT INTO t8 VALUES (99,22,33);
ERROR 23000: Duplicate entry '99' for key 'PRIMARY'
INSERT INTO t8 VALUES (11,99,33);
-ERROR 23000: Duplicate entry '' for key '*UNKNOWN*'
+ERROR 23000: Duplicate entry '99' for key 'b'
INSERT INTO t8 VALUES (11,22,99);
-ERROR 23000: Duplicate entry '' for key '*UNKNOWN*'
+ERROR 23000: Duplicate entry '99' for key 'c'
SELECT * FROM t8 ORDER BY a;
a b c
99 99 99
diff --git a/mysql-test/suite/rpl_ndb/t/disabled.def b/mysql-test/suite/rpl_ndb/t/disabled.def
index 60bfa559953..bb701b9dc3e 100644
--- a/mysql-test/suite/rpl_ndb/t/disabled.def
+++ b/mysql-test/suite/rpl_ndb/t/disabled.def
@@ -14,7 +14,6 @@
rpl_ndb_2innodb : Bug #32648 Test failure between NDB Cluster and other engines
rpl_ndb_2myisam : Bug #32648 Test failure between NDB Cluster and other engines
rpl_ndb_2other : Bug #32648 Test failure between NDB Cluster and other engines
-rpl_ndb_ddl : BUG#28798 2007-05-31 lars Valgrind failure in NDB
rpl_ndb_ctype_ucs2_def : BUG#27404 util thd mysql_parse sig11 when mysqld default multibyte charset
rpl_ndb_extraColMaster : BUG#30854 : Tables name show as binary in slave err msg on vm-win2003-64-b and Solaris
rpl_ndb_mix_innodb : Bug #32720 Test rpl_ndb_mix_innodb fails on SPARC and PowerPC