mirror of
https://github.com/MariaDB/server.git
synced 2025-08-24 14:48:09 +03:00
and small collateral changes mysql-test/lib/My/Test.pm: somehow with "print" we get truncated writes sometimes mysql-test/suite/perfschema/r/digest_table_full.result: md5 hashes of statement digests differ, because yacc token codes are different in mariadb mysql-test/suite/perfschema/r/dml_handler.result: host table is not ported over yet mysql-test/suite/perfschema/r/information_schema.result: host table is not ported over yet mysql-test/suite/perfschema/r/nesting.result: this differs, because we don't rewrite general log queries, and multi-statement packets are logged as a one entry. this result file is identical to what mysql-5.6.5 produces with the --log-raw option. mysql-test/suite/perfschema/r/relaylog.result: MariaDB modifies the binlog index file directly, while MySQL 5.6 has a feature "crash-safe binlog index" and modifies a special "crash-safe" shadow copy of the index file and then moves it over. That's why this test shows "NONE" index file writes in MySQL and "MANY" in MariaDB. mysql-test/suite/perfschema/r/server_init.result: MariaDB initializes the "manager" resources from the "manager" thread, and starts this thread only when --flush-time is not 0. MySQL 5.6 initializes "manager" resources unconditionally on server startup. mysql-test/suite/perfschema/r/stage_mdl_global.result: this differs, because MariaDB disables query cache when query_cache_size=0. MySQL does not do that, and this causes useless mutex locks and waits. mysql-test/suite/perfschema/r/statement_digest.result: md5 hashes of statement digests differ, because yacc token codes are different in mariadb mysql-test/suite/perfschema/r/statement_digest_consumers.result: md5 hashes of statement digests differ, because yacc token codes are different in mariadb mysql-test/suite/perfschema/r/statement_digest_long_query.result: md5 hashes of statement digests differ, because yacc token codes are different in mariadb mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result: will be updated to match 5.6 when alfranio.correia@oracle.com-20110512172919-c1b5kmum4h52g0ni and anders.song@greatopensource.com-20110105052107-zoab0bsf5a6xxk2y are merged mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result: will be updated to match 5.6 when anders.song@greatopensource.com-20110105052107-zoab0bsf5a6xxk2y is merged
83 lines
2.5 KiB
Plaintext
83 lines
2.5 KiB
Plaintext
--source include/have_innodb.inc
|
|
# Testcase for Bug #53592 - "crash replacing duplicates into
|
|
# table after fast alter table added unique key". The fix is to make
|
|
# sure index number lookup should go through "index translation table".
|
|
|
|
|
|
# Use FIC for index creation
|
|
set old_alter_table=0;
|
|
|
|
create table bug53592(a int) engine=innodb row_format=compact;
|
|
|
|
alter table bug53592 add column b text charset utf8;
|
|
|
|
alter table bug53592 add column c blob not null;
|
|
|
|
# Create a non-unique nonclustered index
|
|
create index bug53592_b on bug53592(b(81));
|
|
|
|
# Create a unique index, this unique index should have smaller
|
|
# index number than bug53592_b, since unique index ranks higher
|
|
# than regular index does
|
|
create unique index bug53592_c on bug53592(c(1));
|
|
|
|
# This will trigger a dup key error and will require fetching
|
|
# the index number through a index structure for the error reporting.
|
|
# To get the correct index number, the code should go through index
|
|
# translation table. Otherwise, it will get the wrong index
|
|
# number and later trigger a server crash.
|
|
replace into bug53592 values (),();
|
|
|
|
check table bug53592;
|
|
|
|
drop table bug53592;
|
|
|
|
# Running the same set of test when "old_alter_table" is turned on
|
|
set old_alter_table=1;
|
|
|
|
create table bug53592(a int) engine=innodb row_format=compact;
|
|
|
|
alter table bug53592 add column b text charset utf8;
|
|
|
|
alter table bug53592 add column c blob not null;
|
|
|
|
# Create a non-unique nonclustered index
|
|
create index bug53592_b on bug53592(b(81));
|
|
|
|
# Create a unique index
|
|
create unique index bug53592_c on bug53592(c(1));
|
|
|
|
# This will trigger a dup key error and will require fetching
|
|
# the index number through a index structure for the error reporting.
|
|
# To get the correct index number, the code should go through index
|
|
# translation table. Otherwise, it will get the wrong index
|
|
# number and later trigger a server crash.
|
|
replace into bug53592 values (),();
|
|
|
|
check table bug53592;
|
|
drop table bug53592;
|
|
|
|
# Test a dup key reported by foreign key constriant.
|
|
CREATE TABLE bug53592_1(
|
|
col1 int, col2 int,
|
|
PRIMARY KEY (col1, col2)
|
|
) ENGINE=InnoDB;
|
|
|
|
CREATE TABLE bug53592_2 (
|
|
col int PRIMARY KEY,
|
|
FOREIGN KEY (col) REFERENCES bug53592_1 (col1)
|
|
ON DELETE CASCADE ON UPDATE CASCADE
|
|
) ENGINE=InnoDB;
|
|
|
|
INSERT INTO bug53592_1 VALUES (1, 2);
|
|
INSERT INTO bug53592_1 VALUES (3, 4);
|
|
|
|
INSERT INTO bug53592_2 VALUES (1);
|
|
INSERT INTO bug53592_2 VALUES (3);
|
|
|
|
--error ER_FOREIGN_DUPLICATE_KEY_WITH_CHILD_INFO
|
|
UPDATE bug53592_1 SET col1 = 3 WHERE col2 = 2;
|
|
|
|
drop table bug53592_2;
|
|
drop table bug53592_1;
|