mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 13:32:33 +01:00
60ddf6f2b7
If one compiles innodb_plugin, then the tests in suite/innodb_plugin will use the plugin. If not and xtradb is used, the tests will use xtradb. mysql-test/include/have_innodb_plugin.inc: Test both for innodb_plugin and xtradb mysql-test/include/have_real_innodb_plugin.inc: Test if we are using innodb_plugin (but not xtradb) mysql-test/include/have_xtradb.inc: Test if xtradb is used mysql-test/lib/mtr_cases.pm: Enable easy testing of innodb_plugin mysql-test/mysql-test-run.pl: Added supression for difference between xtradb & innodb_plugin mysql-test/suite/innodb_plugin/r/innodb-index-ip.result: Tests from innodb-index that gave different results for innodb_plugin and xtradb mysql-test/suite/innodb_plugin/r/innodb-index-xb.result: Tests from innodb-index that gave different results for innodb_plugin and xtradb mysql-test/suite/innodb_plugin/r/innodb-index.result: Move tests away that gave different results for innodb_plugin and xtradb mysql-test/suite/innodb_plugin/r/innodb-ip.result: Tests from innodb-index that gave different results for innodb_plugin and xtradb mysql-test/suite/innodb_plugin/r/innodb-xb.result: Tests from innodb-index that gave different results for innodb_plugin and xtradb mysql-test/suite/innodb_plugin/r/innodb.result: Move tests away that gave different results for innodb_plugin and xtradb mysql-test/suite/innodb_plugin/r/innodb_bug21704-xb.result: Test result differ for xtradb mysql-test/suite/innodb_plugin/r/innodb_bug46000.result: Remove (not needed) error message not given by MariaDB mysql-test/suite/innodb_plugin/r/innodb_bug49164-xb.result: Test result differs for xtradb mysql-test/suite/innodb_plugin/r/innodb_bug49164.result: Update results mysql-test/suite/innodb_plugin/r/innodb_bug53591.result: Remove (not needed) error message not given by MariaDB mysql-test/suite/innodb_plugin/r/innodb_bug54679.result: Updated result file mysql-test/suite/innodb_plugin/r/innodb_mysql.result: Updated result file mysql-test/suite/innodb_plugin/t/disabled.def: Disable some tests that depends on newer version of XtraDB mysql-test/suite/innodb_plugin/t/innodb-index-ip.test: Tests from innodb-index that gave different results for innodb_plugin and xtradb mysql-test/suite/innodb_plugin/t/innodb-index-xb.test: Tests from innodb-index that gave different results for innodb_plugin and xtradb mysql-test/suite/innodb_plugin/t/innodb-index.test: Move tests away that gave different results for innodb_plugin and xtradb mysql-test/suite/innodb_plugin/t/innodb-ip.test: Tests from innodb-index that gave different results for innodb_plugin and xtradb mysql-test/suite/innodb_plugin/t/innodb-xb.test: Tests from innodb-index that gave different results for innodb_plugin and xtradb mysql-test/suite/innodb_plugin/t/innodb.test: Move tests away that gave different results for innodb_plugin and xtradb mysql-test/suite/innodb_plugin/t/innodb_bug21704-xb.test: Test result differ for xtradb mysql-test/suite/innodb_plugin/t/innodb_bug21704.test: Test result differ for xtradb mysql-test/suite/innodb_plugin/t/innodb_bug53591.test: Test results only makes sence for innodb_plugin (things works ok for xtradb) sql/sql_table.cc: Don't set HA_CREATE_USED_ROW_FORMAT for create table (only for update_create_info) if ROW_FORMAT is not used. storage/innodb_plugin/handler/ha_innodb.cc: Fixed wrong error message from innodb. This is needed as MariaDB properly handles errors from ha_index_init() storage/xtradb/handler/ha_innodb.cc: Update base information for XtraDB so that one can use informationschema.plugins to check if one is using XtraDB
96 lines
2.6 KiB
Text
96 lines
2.6 KiB
Text
-- source include/have_innodb_plugin.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;
|