1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Percona-Server-5.6.14-rel62.0 merge

support ha_innodb.so as a dynamic plugin.
* remove obsolete *,innodb_plugin.rdiff files
* s/--plugin-load=/--plugin-load-add=/
* MYSQL_PLUGIN_IMPORT glob_hostname[]
* use my_error instead of push_warning_printf(ER_DEFAULT)
* don't use tdc_size and tc_size in a module

update test cases (XtraDB is 5.6.14, InnoDB is 5.6.10)
* copy new tests over
* disable some tests for (old) InnoDB
* delete XtraDB tests that no longer apply

small compatibility changes:
* s/HTON_EXTENDED_KEYS/HTON_SUPPORTS_EXTENDED_KEYS/
* revert unnecessary InnoDB changes to make it a bit closer to the upstream

fix XtraDB to compile on Windows (both as a static and a dynamic plugin)

disable XtraDB on Windows (deadlocks) and where no atomic ops are available (e.g. CentOS 5)


storage/innobase/handler/ha_innodb.cc:
  revert few unnecessary changes to make it a bit closer to the original InnoDB
storage/innobase/include/univ.i:
  correct the version to match what it was merged from
This commit is contained in:
Sergei Golubchik
2013-12-22 17:06:50 +01:00
506 changed files with 138702 additions and 54084 deletions

View File

@ -1,4 +1,3 @@
drop table if exists t1;
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (null);
@ -14,14 +13,15 @@ d1
2
INSERT INTO t1 VALUES(null);
ALTER TABLE t1 AUTO_INCREMENT = 3;
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`d1` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`d1`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES(null);
ERROR 23000: Duplicate entry '3' for key 'PRIMARY'
INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
d1
@ -29,4 +29,5 @@ d1
2
3
4
5
DROP TABLE t1;

View File

@ -967,12 +967,8 @@ ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
FOREIGN KEY (c3,c2) REFERENCES t1(c1,c2);
ERROR HY000: Failed to add the foreign key constaint. Missing index for constraint 'fk_t2_ca' in the referenced table 't1'
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
FOREIGN KEY (c3,c2) REFERENCES t1(c2,c1);
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
ALTER TABLE t2 DROP FOREIGN KEY fk_t2_ca;
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
FOREIGN KEY (c3,c2) REFERENCES t1(c2,c1), ALGORITHM=INPLACE;
ERROR HY000: Failed to add the foreign key constraint on table 't2'. Incorrect options in FOREIGN KEY constraint 'test/fk_t2_ca'
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
FOREIGN KEY (c3,c2) REFERENCES t1(c2,c1), ALGORITHM=COPY;
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")

View File

@ -1,10 +1,11 @@
-- source include/have_innodb.inc
# embedded server ignores 'delayed', so skip this
# embedded server does not support restarting
-- source include/not_embedded.inc
--disable_warnings
drop table if exists t1;
--enable_warnings
if (`select plugin_auth_version <= "5.6.10" from information_schema.plugins where plugin_name='innodb'`)
{
--skip Not fixed in InnoDB 5.6.10 or earlier
}
#
# 44030: Error: (1500) Couldn't read the MAX(ID) autoinc value from
@ -31,9 +32,12 @@ INSERT INTO t1 VALUES(null);
# and effectively set AUTO_INCREMENT to 4, because while copying
# it would write values 1,2,3 to the column.
# WL#5534 makes this an in-place ALTER, setting AUTO_INCREMENT=3 for real.
# However, to keep compatibility with ALGORITHM=COPY MySQL 5.6.11 will
# go back to the original behaviour, setting AUTO_INCREMENT to 4.
--enable_info
ALTER TABLE t1 AUTO_INCREMENT = 3;
--disable_info
SHOW CREATE TABLE t1;
-- error ER_DUP_ENTRY
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
SELECT * FROM t1;

View File

@ -1,5 +1,10 @@
-- source include/have_innodb.inc
if (`select plugin_auth_version <= "5.6.10" from information_schema.plugins where plugin_name='innodb'`)
{
--skip Not fixed in InnoDB 5.6.10 or earlier
}
let $innodb_file_format_orig=`select @@innodb_file_format`;
let $innodb_file_format_max_orig=`select @@innodb_file_format_max`;
@ -445,10 +450,9 @@ ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
FOREIGN KEY (c3,c2) REFERENCES t1(c1,c2);
# FIXME (WL#6251 problem): this should fail, like the ALGORITHM=COPY below
--error ER_FK_INCORRECT_OPTION
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
FOREIGN KEY (c3,c2) REFERENCES t1(c2,c1);
ALTER TABLE t2 DROP FOREIGN KEY fk_t2_ca;
FOREIGN KEY (c3,c2) REFERENCES t1(c2,c1), ALGORITHM=INPLACE;
# mysqltest first does replace_regex, then replace_result
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/