summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/include/have_innodb_plugin.inc2
-rw-r--r--mysql-test/include/have_real_innodb_plugin.inc4
-rw-r--r--mysql-test/include/have_xtradb.inc4
-rw-r--r--mysql-test/lib/mtr_cases.pm44
-rwxr-xr-xmysql-test/mysql-test-run.pl1
-rw-r--r--mysql-test/suite/innodb_plugin/r/innodb-index-ip.result18
-rw-r--r--mysql-test/suite/innodb_plugin/r/innodb-index-xb.result18
-rw-r--r--mysql-test/suite/innodb_plugin/r/innodb-index.result18
-rw-r--r--mysql-test/suite/innodb_plugin/r/innodb-ip.result31
-rw-r--r--mysql-test/suite/innodb_plugin/r/innodb-xb.result30
-rw-r--r--mysql-test/suite/innodb_plugin/r/innodb.result36
-rw-r--r--mysql-test/suite/innodb_plugin/r/innodb_bug21704-xb.result55
-rw-r--r--mysql-test/suite/innodb_plugin/r/innodb_bug46000.result1
-rw-r--r--mysql-test/suite/innodb_plugin/r/innodb_bug49164-xb.result42
-rw-r--r--mysql-test/suite/innodb_plugin/r/innodb_bug49164.result2
-rw-r--r--mysql-test/suite/innodb_plugin/r/innodb_bug53591.result1
-rw-r--r--mysql-test/suite/innodb_plugin/r/innodb_bug54679.result4
-rw-r--r--mysql-test/suite/innodb_plugin/r/innodb_mysql.result4
-rw-r--r--mysql-test/suite/innodb_plugin/t/disabled.def11
-rw-r--r--mysql-test/suite/innodb_plugin/t/innodb-index-ip.test18
-rw-r--r--mysql-test/suite/innodb_plugin/t/innodb-index-xb.test18
-rw-r--r--mysql-test/suite/innodb_plugin/t/innodb-index.test12
-rw-r--r--mysql-test/suite/innodb_plugin/t/innodb-ip.test35
-rw-r--r--mysql-test/suite/innodb_plugin/t/innodb-xb.test35
-rw-r--r--mysql-test/suite/innodb_plugin/t/innodb.test10
-rw-r--r--mysql-test/suite/innodb_plugin/t/innodb_bug21704-xb.test96
-rw-r--r--mysql-test/suite/innodb_plugin/t/innodb_bug21704.test2
-rw-r--r--mysql-test/suite/innodb_plugin/t/innodb_bug53591.test5
28 files changed, 479 insertions, 78 deletions
diff --git a/mysql-test/include/have_innodb_plugin.inc b/mysql-test/include/have_innodb_plugin.inc
index 99a79465f52..6b5fc29d459 100644
--- a/mysql-test/include/have_innodb_plugin.inc
+++ b/mysql-test/include/have_innodb_plugin.inc
@@ -1,4 +1,4 @@
disable_query_log;
--require r/true.require
-SELECT (plugin_library LIKE 'ha_innodb_plugin%') AS `TRUE` FROM information_schema.plugins WHERE LOWER(plugin_name) = 'innodb' AND LOWER(plugin_status) = 'active';
+SELECT (plugin_library LIKE 'ha_innodb_plugin%' OR plugin_description LIKE '%xtradb%') AS `TRUE` FROM information_schema.plugins WHERE LOWER(plugin_name) = 'innodb' AND LOWER(plugin_status) = 'active';
enable_query_log;
diff --git a/mysql-test/include/have_real_innodb_plugin.inc b/mysql-test/include/have_real_innodb_plugin.inc
new file mode 100644
index 00000000000..99a79465f52
--- /dev/null
+++ b/mysql-test/include/have_real_innodb_plugin.inc
@@ -0,0 +1,4 @@
+disable_query_log;
+--require r/true.require
+SELECT (plugin_library LIKE 'ha_innodb_plugin%') AS `TRUE` FROM information_schema.plugins WHERE LOWER(plugin_name) = 'innodb' AND LOWER(plugin_status) = 'active';
+enable_query_log;
diff --git a/mysql-test/include/have_xtradb.inc b/mysql-test/include/have_xtradb.inc
new file mode 100644
index 00000000000..6c2fc5155a9
--- /dev/null
+++ b/mysql-test/include/have_xtradb.inc
@@ -0,0 +1,4 @@
+disable_query_log;
+--require r/true.require
+SELECT (plugin_description LIKE '%xtradb%') AS `TRUE` FROM information_schema.plugins WHERE LOWER(plugin_name) = 'innodb' AND LOWER(plugin_status) = 'active';
+enable_query_log;
diff --git a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm
index d794de2e92d..b068b2e542e 100644
--- a/mysql-test/lib/mtr_cases.pm
+++ b/mysql-test/lib/mtr_cases.pm
@@ -68,9 +68,22 @@ require "mtr_misc.pl";
my $do_test_reg;
my $skip_test_reg;
+# Related to adding InnoDB plugin combinations
+my $lib_innodb_plugin;
+
# If "Quick collect", set to 1 once a test to run has been found.
my $some_test_found;
+sub find_innodb_plugin {
+ $lib_innodb_plugin=
+ my_find_file($::basedir,
+ ["storage/innodb_plugin", "storage/innodb_plugin/.libs",
+ "lib/mysql/plugin", "lib/plugin"],
+ ["ha_innodb_plugin.dll", "ha_innodb_plugin.so",
+ "ha_innodb_plugin.sl"],
+ NOT_REQUIRED);
+}
+
sub init_pattern {
my ($from, $what)= @_;
return undef unless defined $from;
@@ -103,6 +116,8 @@ sub collect_test_cases ($$$) {
$do_test_reg= init_pattern($do_test, "--do-test");
$skip_test_reg= init_pattern($skip_test, "--skip-test");
+ &find_innodb_plugin;
+
# If not reordering, we also shouldn't group by suites, unless
# no test cases were named.
# This also effects some logic in the loop following this.
@@ -953,6 +968,30 @@ sub collect_one_test_case {
return $tinfo;
}
}
+ elsif ( $tinfo->{'innodb_plugin_test'} )
+ {
+ # This is a test that needs the innodb plugin
+ if (&find_innodb_plugin)
+ {
+ my $sep= (IS_WINDOWS) ? ';' : ':';
+ my $plugin_filename= basename($lib_innodb_plugin);
+ my $plugin_list=
+ "innodb=$plugin_filename$sep" .
+ "innodb_trx=$plugin_filename$sep" .
+ "innodb_locks=$plugin_filename$sep" .
+ "innodb_lock_waits=$plugin_filename$sep" .
+ "innodb_cmp=$plugin_filename$sep" .
+ "innodb_cmp_reset=$plugin_filename$sep" .
+ "innodb_cmpmem=$plugin_filename$sep" .
+ "innodb_cmpmem_reset=$plugin_filename";
+
+ foreach my $k ('master_opt', 'slave_opt') {
+ push(@{$tinfo->{$k}}, '--ignore-builtin-innodb');
+ push(@{$tinfo->{$k}}, '--plugin-dir=' . dirname($lib_innodb_plugin));
+ push(@{$tinfo->{$k}}, "--plugin-load=$plugin_list");
+ }
+ }
+ }
else
{
push(@{$tinfo->{'master_opt'}}, "--loose-skip-innodb");
@@ -1121,8 +1160,11 @@ my @tags=
["include/have_log_bin.inc", "need_binlog", 1],
["include/have_innodb.inc", "innodb_test", 1],
+ ["include/have_innodb_plugin.inc", "innodb_plugin_test", 1],
+ ["include/have_real.inc", "innodb_test", 1],
+ ["include/have_real_innodb_plugin.inc", "innodb_plugin_test", 1],
+ ["include/have_xtradb.inc", "innodb_test", 1],
["include/have_pbxt.inc", "pbxt_test", 1],
- ["include/have_innodb_plugin.inc", "innodb_test", 1],
["include/big_test.inc", "big_test", 1],
["include/have_debug.inc", "need_debug", 1],
["include/have_ndb.inc", "ndb_test", 1],
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 5fcee4d8861..1ebf554e1fd 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -4044,6 +4044,7 @@ sub extract_warning_lines ($) {
qr/Slave: Can't drop database.* database doesn't exist/,
qr/Slave: Operation DROP USER failed for 'create_rout_db'/,
qr|Checking table: '\./mtr/test_suppressions'|,
+ qr|Table \./test/bug53592 has a primary key in InnoDB data dictionary, but not in MySQL|,
qr|mysqld: Table '\./mtr/test_suppressions' is marked as crashed and should be repaired|
);
diff --git a/mysql-test/suite/innodb_plugin/r/innodb-index-ip.result b/mysql-test/suite/innodb_plugin/r/innodb-index-ip.result
new file mode 100644
index 00000000000..765399e7f96
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/r/innodb-index-ip.result
@@ -0,0 +1,18 @@
+drop table if exists t1;
+drop database if exists mysqltest;
+create table t1(a int not null, b int, c char(10), d varchar(20), primary key (a)) engine = innodb;
+insert into t1 values (1,1,'ab','ab'),(2,2,'ac','ac'),(3,3,'ac','ac'),(4,4,'afe','afe'),(5,4,'affe','affe');
+alter table t1 add unique index (b), add unique index (c), add unique index (d);
+ERROR 23000: Duplicate entry '4' for key 'b'
+alter table t1 add unique index (c), add unique index (b), add index (d);
+ERROR 23000: Duplicate entry 'ac' for key 'c'
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) NOT NULL,
+ `b` int(11) DEFAULT NULL,
+ `c` char(10) DEFAULT NULL,
+ `d` varchar(20) DEFAULT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+drop table t1;
diff --git a/mysql-test/suite/innodb_plugin/r/innodb-index-xb.result b/mysql-test/suite/innodb_plugin/r/innodb-index-xb.result
new file mode 100644
index 00000000000..ff6dcd9a561
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/r/innodb-index-xb.result
@@ -0,0 +1,18 @@
+drop table if exists t1;
+drop database if exists mysqltest;
+create table t1(a int not null, b int, c char(10), d varchar(20), primary key (a)) engine = innodb;
+insert into t1 values (1,1,'ab','ab'),(2,2,'ac','ac'),(3,3,'ac','ac'),(4,4,'afe','afe'),(5,4,'affe','affe');
+alter table t1 add unique index (b), add unique index (c), add unique index (d);
+ERROR 23000: Duplicate entry 'ac' for key 'c'
+alter table t1 add unique index (c), add unique index (b), add index (d);
+ERROR 23000: Duplicate entry 'ac' for key 'c'
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) NOT NULL,
+ `b` int(11) DEFAULT NULL,
+ `c` char(10) DEFAULT NULL,
+ `d` varchar(20) DEFAULT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+drop table t1;
diff --git a/mysql-test/suite/innodb_plugin/r/innodb-index.result b/mysql-test/suite/innodb_plugin/r/innodb-index.result
index f86fcd4a8ef..29ca50beb4d 100644
--- a/mysql-test/suite/innodb_plugin/r/innodb-index.result
+++ b/mysql-test/suite/innodb_plugin/r/innodb-index.result
@@ -440,8 +440,6 @@ t3 CREATE TABLE `t3` (
PRIMARY KEY (`a`),
KEY `c` (`c`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
-alter table t2 drop index b, add index (b);
-ERROR 42000: Incorrect index name 'b'
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -625,22 +623,6 @@ t1 CREATE TABLE `t1` (
KEY `b` (`b`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t1;
-create table t1(a int not null, b int, c char(10), d varchar(20), primary key (a)) engine = innodb;
-insert into t1 values (1,1,'ab','ab'),(2,2,'ac','ac'),(3,3,'ac','ac'),(4,4,'afe','afe'),(5,4,'affe','affe');
-alter table t1 add unique index (b), add unique index (c), add unique index (d);
-ERROR 23000: Duplicate entry '4' for key 'b'
-alter table t1 add unique index (c), add unique index (b), add index (d);
-ERROR 23000: Duplicate entry 'ac' for key 'c'
-show create table t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) NOT NULL,
- `b` int(11) DEFAULT NULL,
- `c` char(10) DEFAULT NULL,
- `d` varchar(20) DEFAULT NULL,
- PRIMARY KEY (`a`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
-drop table t1;
create table t1(a int not null, b int not null, c int, primary key (a), key(c)) engine=innodb;
insert into t1 values (5,1,5),(4,2,4),(3,3,3),(2,4,2),(1,5,1);
alter table t1 add unique index (b);
diff --git a/mysql-test/suite/innodb_plugin/r/innodb-ip.result b/mysql-test/suite/innodb_plugin/r/innodb-ip.result
new file mode 100644
index 00000000000..fa779aa05a5
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/r/innodb-ip.result
@@ -0,0 +1,31 @@
+drop table if exists t1;
+drop database if exists mysqltest;
+CREATE TABLE t1 (
+sca_code char(6) NOT NULL,
+cat_code char(6) NOT NULL,
+sca_desc varchar(50),
+lan_code char(2) NOT NULL,
+sca_pic varchar(100),
+sca_sdesc varchar(50),
+sca_sch_desc varchar(16),
+PRIMARY KEY (sca_code, cat_code, lan_code),
+INDEX sca_pic (sca_pic)
+) engine = innodb ;
+INSERT INTO t1 ( sca_code, cat_code, sca_desc, lan_code, sca_pic, sca_sdesc, sca_sch_desc) VALUES ( 'PD', 'J', 'PENDANT', 'EN', NULL, NULL, 'PENDANT'),( 'RI', 'J', 'RING', 'EN', NULL, NULL, 'RING'),( 'QQ', 'N', 'RING', 'EN', 'not null', NULL, 'RING');
+alter table t1 drop index sca_pic, add index (sca_pic, cat_code);
+ERROR 42000: Incorrect index name 'sca_pic'
+alter table t1 drop index sca_pic;
+alter table t1 add index (sca_pic, cat_code);
+select count(*) from t1 where sca_code='PD' and sca_pic is null;
+count(*)
+1
+select count(*) from t1 where sca_pic >= 'n';
+count(*)
+1
+select sca_pic from t1 where sca_pic is null;
+sca_pic
+NULL
+NULL
+update t1 set sca_pic="test" where sca_pic is null;
+delete from t1 where sca_code='pd';
+drop table t1;
diff --git a/mysql-test/suite/innodb_plugin/r/innodb-xb.result b/mysql-test/suite/innodb_plugin/r/innodb-xb.result
new file mode 100644
index 00000000000..ffee100f3b6
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/r/innodb-xb.result
@@ -0,0 +1,30 @@
+drop table if exists t1;
+drop database if exists mysqltest;
+CREATE TABLE t1 (
+sca_code char(6) NOT NULL,
+cat_code char(6) NOT NULL,
+sca_desc varchar(50),
+lan_code char(2) NOT NULL,
+sca_pic varchar(100),
+sca_sdesc varchar(50),
+sca_sch_desc varchar(16),
+PRIMARY KEY (sca_code, cat_code, lan_code),
+INDEX sca_pic (sca_pic)
+) engine = innodb ;
+INSERT INTO t1 ( sca_code, cat_code, sca_desc, lan_code, sca_pic, sca_sdesc, sca_sch_desc) VALUES ( 'PD', 'J', 'PENDANT', 'EN', NULL, NULL, 'PENDANT'),( 'RI', 'J', 'RING', 'EN', NULL, NULL, 'RING'),( 'QQ', 'N', 'RING', 'EN', 'not null', NULL, 'RING');
+alter table t1 drop index sca_pic, add index (sca_pic, cat_code);
+alter table t1 drop index sca_pic;
+alter table t1 add index (sca_pic, cat_code);
+select count(*) from t1 where sca_code='PD' and sca_pic is null;
+count(*)
+1
+select count(*) from t1 where sca_pic >= 'n';
+count(*)
+1
+select sca_pic from t1 where sca_pic is null;
+sca_pic
+NULL
+NULL
+update t1 set sca_pic="test" where sca_pic is null;
+delete from t1 where sca_code='pd';
+drop table t1;
diff --git a/mysql-test/suite/innodb_plugin/r/innodb.result b/mysql-test/suite/innodb_plugin/r/innodb.result
index 75a7023f9d0..c691f6bf208 100644
--- a/mysql-test/suite/innodb_plugin/r/innodb.result
+++ b/mysql-test/suite/innodb_plugin/r/innodb.result
@@ -700,22 +700,6 @@ count(*)
select count(*) from t1 where cat_code='E';
count(*)
0
-alter table t1 drop index sca_pic, add index (sca_pic, cat_code);
-ERROR 42000: Incorrect index name 'sca_pic'
-alter table t1 drop index sca_pic;
-alter table t1 add index (sca_pic, cat_code);
-select count(*) from t1 where sca_code='PD' and sca_pic is null;
-count(*)
-1
-select count(*) from t1 where sca_pic >= 'n';
-count(*)
-1
-select sca_pic from t1 where sca_pic is null;
-sca_pic
-NULL
-NULL
-update t1 set sca_pic="test" where sca_pic is null;
-delete from t1 where sca_code='pd';
drop table t1;
set @a:=now();
CREATE TABLE t1 (a int not null, b timestamp not null, primary key (a)) engine=innodb;
@@ -1362,7 +1346,7 @@ insert t2 select * from t1;
insert t3 select * from t1;
checksum table t1, t2, t3, t4 quick;
Table Checksum
-test.t1 2948697075
+test.t1 3442722830
test.t2 NULL
test.t3 NULL
test.t4 NULL
@@ -1370,17 +1354,17 @@ Warnings:
Error 1146 Table 'test.t4' doesn't exist
checksum table t1, t2, t3, t4;
Table Checksum
-test.t1 2948697075
-test.t2 2948697075
-test.t3 2948697075
+test.t1 3442722830
+test.t2 3442722830
+test.t3 3442722830
test.t4 NULL
Warnings:
Error 1146 Table 'test.t4' doesn't exist
checksum table t1, t2, t3, t4 extended;
Table Checksum
-test.t1 2948697075
-test.t2 2948697075
-test.t3 2948697075
+test.t1 3442722830
+test.t2 3442722830
+test.t3 3442722830
test.t4 NULL
Warnings:
Error 1146 Table 'test.t4' doesn't exist
@@ -1673,13 +1657,13 @@ variable_value
16384
SELECT variable_value - @innodb_rows_deleted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_deleted';
variable_value - @innodb_rows_deleted_orig
-71
+70
SELECT variable_value - @innodb_rows_inserted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_inserted';
variable_value - @innodb_rows_inserted_orig
-1066
+1063
SELECT variable_value - @innodb_rows_updated_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_updated';
variable_value - @innodb_rows_updated_orig
-865
+863
SELECT variable_value - @innodb_row_lock_waits_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_waits';
variable_value - @innodb_row_lock_waits_orig
0
diff --git a/mysql-test/suite/innodb_plugin/r/innodb_bug21704-xb.result b/mysql-test/suite/innodb_plugin/r/innodb_bug21704-xb.result
new file mode 100644
index 00000000000..b8e0b15d50d
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/r/innodb_bug21704-xb.result
@@ -0,0 +1,55 @@
+#
+# Bug#21704: Renaming column does not update FK definition.
+#
+
+# Test that it's not possible to rename columns participating in a
+# foreign key (either in the referencing or referenced table).
+
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t2;
+DROP TABLE IF EXISTS t3;
+CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ROW_FORMAT=COMPACT ENGINE=INNODB;
+CREATE TABLE t2 (a INT PRIMARY KEY, b INT,
+CONSTRAINT fk1 FOREIGN KEY (a) REFERENCES t1(a))
+ROW_FORMAT=COMPACT ENGINE=INNODB;
+CREATE TABLE t3 (a INT PRIMARY KEY, b INT, KEY(b), C INT,
+CONSTRAINT fk2 FOREIGN KEY (b) REFERENCES t3 (a))
+ROW_FORMAT=COMPACT ENGINE=INNODB;
+INSERT INTO t1 VALUES (1,1),(2,2),(3,3);
+INSERT INTO t2 VALUES (1,1),(2,2),(3,3);
+INSERT INTO t3 VALUES (1,1,1),(2,2,2),(3,3,3);
+
+# Test renaming the column in the referenced table.
+
+ALTER TABLE t1 CHANGE a c INT;
+ERROR HY000: Error on rename of '#sql-temporary' to './test/t1' (errno: 150)
+# Ensure that online column rename works.
+ALTER TABLE t1 CHANGE b c INT;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+
+# Test renaming the column in the referencing table
+
+ALTER TABLE t2 CHANGE a c INT;
+ERROR HY000: Error on rename of '#sql-temporary' to './test/t2' (errno: 150)
+# Ensure that online column rename works.
+ALTER TABLE t2 CHANGE b c INT;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+
+# Test with self-referential constraints
+
+ALTER TABLE t3 CHANGE a d INT;
+ERROR HY000: Error on rename of '#sql-temporary' to './test/t3' (errno: 150)
+ALTER TABLE t3 CHANGE b d INT;
+ERROR HY000: Error on rename of '#sql-temporary' to './test/t3' (errno: 150)
+# Ensure that online column rename works.
+ALTER TABLE t3 CHANGE c d INT;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+
+# Cleanup.
+
+DROP TABLE t3;
+DROP TABLE t2;
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb_plugin/r/innodb_bug46000.result b/mysql-test/suite/innodb_plugin/r/innodb_bug46000.result
index c8e3db8d641..b27b3d7443b 100644
--- a/mysql-test/suite/innodb_plugin/r/innodb_bug46000.result
+++ b/mysql-test/suite/innodb_plugin/r/innodb_bug46000.result
@@ -14,6 +14,5 @@ show warnings;
Level Code Message
Warning 1280 Cannot Create Index with name 'GEN_CLUST_INDEX'. The name is reserved for the system default primary index.
Error 1280 Incorrect index name 'GEN_CLUST_INDEX'
-Error 1030 Got error -1 from storage engine
create index idx on bug46000(id);
drop table bug46000;
diff --git a/mysql-test/suite/innodb_plugin/r/innodb_bug49164-xb.result b/mysql-test/suite/innodb_plugin/r/innodb_bug49164-xb.result
new file mode 100644
index 00000000000..9456702e1d0
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/r/innodb_bug49164-xb.result
@@ -0,0 +1,42 @@
+SET tx_isolation = 'READ-COMMITTED';
+CREATE TABLE bug49164 (a INT, b BIGINT, c TINYINT, PRIMARY KEY (a, b))
+ENGINE=InnoDB;
+insert into bug49164 values (1,1,1), (2,2,2), (3,3,3);
+begin;
+update bug49164 set c=7;
+select * from bug49164;
+a b c
+1 1 7
+2 2 7
+3 3 7
+rollback;
+select * from bug49164;
+a b c
+1 1 1
+2 2 2
+3 3 3
+begin;
+update bug49164 set c=7;
+SET tx_isolation = 'READ-COMMITTED';
+begin;
+select * from bug49164;
+a b c
+1 1 1
+2 2 2
+3 3 3
+commit;
+begin;
+update bug49164 set c=6 where a=1 and b=1;
+rollback;
+select * from bug49164;
+a b c
+1 1 1
+2 2 2
+3 3 3
+commit;
+select * from bug49164;
+a b c
+1 1 6
+2 2 2
+3 3 3
+drop table bug49164;
diff --git a/mysql-test/suite/innodb_plugin/r/innodb_bug49164.result b/mysql-test/suite/innodb_plugin/r/innodb_bug49164.result
index 9456702e1d0..6241509b7e7 100644
--- a/mysql-test/suite/innodb_plugin/r/innodb_bug49164.result
+++ b/mysql-test/suite/innodb_plugin/r/innodb_bug49164.result
@@ -36,7 +36,7 @@ a b c
commit;
select * from bug49164;
a b c
-1 1 6
+1 1 1
2 2 2
3 3 3
drop table bug49164;
diff --git a/mysql-test/suite/innodb_plugin/r/innodb_bug53591.result b/mysql-test/suite/innodb_plugin/r/innodb_bug53591.result
index 1f05b6d2a57..99dd0d837ae 100644
--- a/mysql-test/suite/innodb_plugin/r/innodb_bug53591.result
+++ b/mysql-test/suite/innodb_plugin/r/innodb_bug53591.result
@@ -9,7 +9,6 @@ SHOW WARNINGS;
Level Code Message
Error 139 Too big row
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. You have to change some columns to TEXT or BLOBs
-Error 1030 Got error 139 from storage engine
DROP TABLE bug53591;
SET GLOBAL innodb_file_format=Antelope;
SET GLOBAL innodb_file_format_check=Antelope;
diff --git a/mysql-test/suite/innodb_plugin/r/innodb_bug54679.result b/mysql-test/suite/innodb_plugin/r/innodb_bug54679.result
index 14fd32ca469..f98f0474233 100644
--- a/mysql-test/suite/innodb_plugin/r/innodb_bug54679.result
+++ b/mysql-test/suite/innodb_plugin/r/innodb_bug54679.result
@@ -21,7 +21,7 @@ ALTER TABLE bug54679 KEY_BLOCK_SIZE=1;
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
WHERE TABLE_NAME='bug54679';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-bug54679 Compressed KEY_BLOCK_SIZE=1
+bug54679 Compressed key_block_size=1
ALTER TABLE bug54679 ROW_FORMAT=REDUNDANT;
ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
SHOW WARNINGS;
@@ -38,7 +38,7 @@ ALTER TABLE bug54679 KEY_BLOCK_SIZE=2;
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
WHERE TABLE_NAME='bug54679';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-bug54679 Compressed row_format=REDUNDANT KEY_BLOCK_SIZE=2
+bug54679 Compressed row_format=REDUNDANT key_block_size=2
SET GLOBAL innodb_file_format=Antelope;
ALTER TABLE bug54679 KEY_BLOCK_SIZE=4;
ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
diff --git a/mysql-test/suite/innodb_plugin/r/innodb_mysql.result b/mysql-test/suite/innodb_plugin/r/innodb_mysql.result
index b4ac88fc1c3..53e979c350f 100644
--- a/mysql-test/suite/innodb_plugin/r/innodb_mysql.result
+++ b/mysql-test/suite/innodb_plugin/r/innodb_mysql.result
@@ -2311,8 +2311,8 @@ select_type SIMPLE
table t1
type index
possible_keys NULL
-key b
-key_len 10
+key PRIMARY
+key_len 4
ref NULL
rows 10
Extra Using index
diff --git a/mysql-test/suite/innodb_plugin/t/disabled.def b/mysql-test/suite/innodb_plugin/t/disabled.def
index 87cf2454f81..58de79e4afb 100644
--- a/mysql-test/suite/innodb_plugin/t/disabled.def
+++ b/mysql-test/suite/innodb_plugin/t/disabled.def
@@ -10,4 +10,13 @@
#
##############################################################################
-innodb-use-sys-malloc : Waiting for buyfix from Percona for LP#612600
+innodb-use-sys-malloc : Waiting for bugfix from Percona for LP#612600
+innodb_plugin.innodb-autoinc-44030 : Waiting for merge with XtraDB
+innodb_bug48024 : Waiting for merge with XtraDB
+innodb_bug49164 : Waiting for merge with XtraDB
+innodb_bug51378 : Waiting for merge with XtraDB
+innodb_bug51920 : Waiting for merge with XtraDB
+innodb_bug52663 : Waiting for merge with XtraDB
+innodb_bug54044 : Waiting for merge with XtraDB
+innodb_bug52745 : Waiting for merge with XtraDB
+innodb_bug54679 : Waiting for merge with XtraDB
diff --git a/mysql-test/suite/innodb_plugin/t/innodb-index-ip.test b/mysql-test/suite/innodb_plugin/t/innodb-index-ip.test
new file mode 100644
index 00000000000..d7775cbabc0
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/t/innodb-index-ip.test
@@ -0,0 +1,18 @@
+#
+# Tests from innodb.test that has different results for innodb_plugin & xtradb.
+
+-- source include/have_real_innodb_plugin.inc
+
+--disable_warnings
+drop table if exists t1;
+drop database if exists mysqltest;
+--enable_warnings
+
+create table t1(a int not null, b int, c char(10), d varchar(20), primary key (a)) engine = innodb;
+insert into t1 values (1,1,'ab','ab'),(2,2,'ac','ac'),(3,3,'ac','ac'),(4,4,'afe','afe'),(5,4,'affe','affe');
+--error ER_DUP_ENTRY
+alter table t1 add unique index (b), add unique index (c), add unique index (d);
+--error ER_DUP_ENTRY
+alter table t1 add unique index (c), add unique index (b), add index (d);
+show create table t1;
+drop table t1;
diff --git a/mysql-test/suite/innodb_plugin/t/innodb-index-xb.test b/mysql-test/suite/innodb_plugin/t/innodb-index-xb.test
new file mode 100644
index 00000000000..c82ff7c2024
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/t/innodb-index-xb.test
@@ -0,0 +1,18 @@
+#
+# Tests from innodb.test that has different results for innodb_plugin & xtradb.
+
+-- source include/have_xtradb.inc
+
+--disable_warnings
+drop table if exists t1;
+drop database if exists mysqltest;
+--enable_warnings
+
+create table t1(a int not null, b int, c char(10), d varchar(20), primary key (a)) engine = innodb;
+insert into t1 values (1,1,'ab','ab'),(2,2,'ac','ac'),(3,3,'ac','ac'),(4,4,'afe','afe'),(5,4,'affe','affe');
+--error ER_DUP_ENTRY
+alter table t1 add unique index (b), add unique index (c), add unique index (d);
+--error ER_DUP_ENTRY
+alter table t1 add unique index (c), add unique index (b), add index (d);
+show create table t1;
+drop table t1;
diff --git a/mysql-test/suite/innodb_plugin/t/innodb-index.test b/mysql-test/suite/innodb_plugin/t/innodb-index.test
index 717c7d4e032..e6f39bab216 100644
--- a/mysql-test/suite/innodb_plugin/t/innodb-index.test
+++ b/mysql-test/suite/innodb_plugin/t/innodb-index.test
@@ -141,9 +141,6 @@ show create table t4;
--error ER_CANT_CREATE_TABLE
alter table t3 add constraint dc foreign key (a) references t1(a);
show create table t3;
-# this should be fixed by MySQL (see Bug #51451)
---error ER_WRONG_NAME_FOR_INDEX
-alter table t2 drop index b, add index (b);
show create table t2;
--error ER_ROW_IS_REFERENCED_2
delete from t1;
@@ -186,15 +183,6 @@ alter table t1 add index (b);
show create table t1;
drop table t1;
-create table t1(a int not null, b int, c char(10), d varchar(20), primary key (a)) engine = innodb;
-insert into t1 values (1,1,'ab','ab'),(2,2,'ac','ac'),(3,3,'ac','ac'),(4,4,'afe','afe'),(5,4,'affe','affe');
---error ER_DUP_ENTRY
-alter table t1 add unique index (b), add unique index (c), add unique index (d);
---error ER_DUP_ENTRY
-alter table t1 add unique index (c), add unique index (b), add index (d);
-show create table t1;
-drop table t1;
-
create table t1(a int not null, b int not null, c int, primary key (a), key(c)) engine=innodb;
insert into t1 values (5,1,5),(4,2,4),(3,3,3),(2,4,2),(1,5,1);
alter table t1 add unique index (b);
diff --git a/mysql-test/suite/innodb_plugin/t/innodb-ip.test b/mysql-test/suite/innodb_plugin/t/innodb-ip.test
new file mode 100644
index 00000000000..e6dd2e99a95
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/t/innodb-ip.test
@@ -0,0 +1,35 @@
+#
+# Tests from innodb.test that has different results for innodb_plugin.
+
+-- source include/have_real_innodb_plugin.inc
+
+--disable_warnings
+drop table if exists t1;
+drop database if exists mysqltest;
+--enable_warnings
+
+CREATE TABLE t1 (
+ sca_code char(6) NOT NULL,
+ cat_code char(6) NOT NULL,
+ sca_desc varchar(50),
+ lan_code char(2) NOT NULL,
+ sca_pic varchar(100),
+ sca_sdesc varchar(50),
+ sca_sch_desc varchar(16),
+ PRIMARY KEY (sca_code, cat_code, lan_code),
+ INDEX sca_pic (sca_pic)
+) engine = innodb ;
+
+INSERT INTO t1 ( sca_code, cat_code, sca_desc, lan_code, sca_pic, sca_sdesc, sca_sch_desc) VALUES ( 'PD', 'J', 'PENDANT', 'EN', NULL, NULL, 'PENDANT'),( 'RI', 'J', 'RING', 'EN', NULL, NULL, 'RING'),( 'QQ', 'N', 'RING', 'EN', 'not null', NULL, 'RING');
+
+# this should be fixed by MySQL (see Bug #51451)
+--error ER_WRONG_NAME_FOR_INDEX
+alter table t1 drop index sca_pic, add index (sca_pic, cat_code);
+alter table t1 drop index sca_pic;
+alter table t1 add index (sca_pic, cat_code);
+select count(*) from t1 where sca_code='PD' and sca_pic is null;
+select count(*) from t1 where sca_pic >= 'n';
+select sca_pic from t1 where sca_pic is null;
+update t1 set sca_pic="test" where sca_pic is null;
+delete from t1 where sca_code='pd';
+drop table t1;
diff --git a/mysql-test/suite/innodb_plugin/t/innodb-xb.test b/mysql-test/suite/innodb_plugin/t/innodb-xb.test
new file mode 100644
index 00000000000..37b5414ce64
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/t/innodb-xb.test
@@ -0,0 +1,35 @@
+#
+# Tests from innodb.test that has different results for innodb_plugin.
+
+-- source include/have_xtradb.inc
+
+--disable_warnings
+drop table if exists t1;
+drop database if exists mysqltest;
+--enable_warnings
+
+CREATE TABLE t1 (
+ sca_code char(6) NOT NULL,
+ cat_code char(6) NOT NULL,
+ sca_desc varchar(50),
+ lan_code char(2) NOT NULL,
+ sca_pic varchar(100),
+ sca_sdesc varchar(50),
+ sca_sch_desc varchar(16),
+ PRIMARY KEY (sca_code, cat_code, lan_code),
+ INDEX sca_pic (sca_pic)
+) engine = innodb ;
+
+INSERT INTO t1 ( sca_code, cat_code, sca_desc, lan_code, sca_pic, sca_sdesc, sca_sch_desc) VALUES ( 'PD', 'J', 'PENDANT', 'EN', NULL, NULL, 'PENDANT'),( 'RI', 'J', 'RING', 'EN', NULL, NULL, 'RING'),( 'QQ', 'N', 'RING', 'EN', 'not null', NULL, 'RING');
+
+# this should be fixed by MySQL (see Bug #51451)
+#--error ER_WRONG_NAME_FOR_INDEX
+alter table t1 drop index sca_pic, add index (sca_pic, cat_code);
+alter table t1 drop index sca_pic;
+alter table t1 add index (sca_pic, cat_code);
+select count(*) from t1 where sca_code='PD' and sca_pic is null;
+select count(*) from t1 where sca_pic >= 'n';
+select sca_pic from t1 where sca_pic is null;
+update t1 set sca_pic="test" where sca_pic is null;
+delete from t1 where sca_code='pd';
+drop table t1;
diff --git a/mysql-test/suite/innodb_plugin/t/innodb.test b/mysql-test/suite/innodb_plugin/t/innodb.test
index 60ba7d1e3bf..5be5e6c4837 100644
--- a/mysql-test/suite/innodb_plugin/t/innodb.test
+++ b/mysql-test/suite/innodb_plugin/t/innodb.test
@@ -437,16 +437,6 @@ alter table t1 add index sca_pic (cat_code, sca_pic);
select count(*) from t1 where sca_code='PD' and sca_pic is null;
select count(*) from t1 where cat_code='E';
-# this should be fixed by MySQL (see Bug #51451)
---error ER_WRONG_NAME_FOR_INDEX
-alter table t1 drop index sca_pic, add index (sca_pic, cat_code);
-alter table t1 drop index sca_pic;
-alter table t1 add index (sca_pic, cat_code);
-select count(*) from t1 where sca_code='PD' and sca_pic is null;
-select count(*) from t1 where sca_pic >= 'n';
-select sca_pic from t1 where sca_pic is null;
-update t1 set sca_pic="test" where sca_pic is null;
-delete from t1 where sca_code='pd';
drop table t1;
#
diff --git a/mysql-test/suite/innodb_plugin/t/innodb_bug21704-xb.test b/mysql-test/suite/innodb_plugin/t/innodb_bug21704-xb.test
new file mode 100644
index 00000000000..1015eed334f
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/t/innodb_bug21704-xb.test
@@ -0,0 +1,96 @@
+-- source include/have_xtradb.inc
+
+--echo #
+--echo # Bug#21704: Renaming column does not update FK definition.
+--echo #
+
+--echo
+--echo # Test that it's not possible to rename columns participating in a
+--echo # foreign key (either in the referencing or referenced table).
+--echo
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t2;
+DROP TABLE IF EXISTS t3;
+--enable_warnings
+
+CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ROW_FORMAT=COMPACT ENGINE=INNODB;
+
+CREATE TABLE t2 (a INT PRIMARY KEY, b INT,
+ CONSTRAINT fk1 FOREIGN KEY (a) REFERENCES t1(a))
+ROW_FORMAT=COMPACT ENGINE=INNODB;
+
+CREATE TABLE t3 (a INT PRIMARY KEY, b INT, KEY(b), C INT,
+ CONSTRAINT fk2 FOREIGN KEY (b) REFERENCES t3 (a))
+ROW_FORMAT=COMPACT ENGINE=INNODB;
+
+INSERT INTO t1 VALUES (1,1),(2,2),(3,3);
+INSERT INTO t2 VALUES (1,1),(2,2),(3,3);
+INSERT INTO t3 VALUES (1,1,1),(2,2,2),(3,3,3);
+
+--echo
+--echo # Test renaming the column in the referenced table.
+--echo
+
+# mysqltest first does replace_regex, then replace_result
+--replace_regex /'[^']*test\/#sql-[0-9a-f_]*'/'#sql-temporary'/
+# Embedded server doesn't chdir to data directory
+--replace_result $MYSQLTEST_VARDIR . mysqld.1/data/ ''
+--error ER_ERROR_ON_RENAME
+ALTER TABLE t1 CHANGE a c INT;
+
+--echo # Ensure that online column rename works.
+
+--enable_info
+ALTER TABLE t1 CHANGE b c INT;
+--disable_info
+
+--echo
+--echo # Test renaming the column in the referencing table
+--echo
+
+# mysqltest first does replace_regex, then replace_result
+--replace_regex /'[^']*test\/#sql-[0-9a-f_]*'/'#sql-temporary'/
+# Embedded server doesn't chdir to data directory
+--replace_result $MYSQLTEST_VARDIR . mysqld.1/data/ ''
+--error ER_ERROR_ON_RENAME
+ALTER TABLE t2 CHANGE a c INT;
+
+--echo # Ensure that online column rename works.
+
+--enable_info
+ALTER TABLE t2 CHANGE b c INT;
+--disable_info
+
+--echo
+--echo # Test with self-referential constraints
+--echo
+
+# mysqltest first does replace_regex, then replace_result
+--replace_regex /'[^']*test\/#sql-[0-9a-f_]*'/'#sql-temporary'/
+# Embedded server doesn't chdir to data directory
+--replace_result $MYSQLTEST_VARDIR . mysqld.1/data/ ''
+--error ER_ERROR_ON_RENAME
+ALTER TABLE t3 CHANGE a d INT;
+
+# mysqltest first does replace_regex, then replace_result
+--replace_regex /'[^']*test\/#sql-[0-9a-f_]*'/'#sql-temporary'/
+# Embedded server doesn't chdir to data directory
+--replace_result $MYSQLTEST_VARDIR . mysqld.1/data/ ''
+--error ER_ERROR_ON_RENAME
+ALTER TABLE t3 CHANGE b d INT;
+
+--echo # Ensure that online column rename works.
+
+--enable_info
+ALTER TABLE t3 CHANGE c d INT;
+--disable_info
+
+--echo
+--echo # Cleanup.
+--echo
+
+DROP TABLE t3;
+DROP TABLE t2;
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb_plugin/t/innodb_bug21704.test b/mysql-test/suite/innodb_plugin/t/innodb_bug21704.test
index 9adf3239dcd..318c5e6f84b 100644
--- a/mysql-test/suite/innodb_plugin/t/innodb_bug21704.test
+++ b/mysql-test/suite/innodb_plugin/t/innodb_bug21704.test
@@ -1,4 +1,4 @@
--- source include/have_innodb_plugin.inc
+-- source include/have_real_innodb_plugin.inc
--echo #
--echo # Bug#21704: Renaming column does not update FK definition.
diff --git a/mysql-test/suite/innodb_plugin/t/innodb_bug53591.test b/mysql-test/suite/innodb_plugin/t/innodb_bug53591.test
index 760b4630383..7220633f7aa 100644
--- a/mysql-test/suite/innodb_plugin/t/innodb_bug53591.test
+++ b/mysql-test/suite/innodb_plugin/t/innodb_bug53591.test
@@ -1,4 +1,7 @@
--- source include/have_innodb_plugin.inc
+#
+# XtraDB doesn't have this problem
+#
+-- source include/have_real_innodb_plugin.inc
let $file_format=`select @@innodb_file_format`;
let $file_format_check=`select @@innodb_file_format_check`;