mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 11:27:39 +02:00
Merge trunk-bugfixing -> trunk-runtime.
This commit is contained in:
commit
d85c628180
133 changed files with 2448 additions and 2417 deletions
|
|
@ -12775,3 +12775,29 @@ a
|
|||
1
|
||||
2
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#45377: ARCHIVE tables aren't discoverable after OPTIMIZE
|
||||
#
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (a int) ENGINE=ARCHIVE;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
|
||||
INSERT INTO t1 VALUES (1);
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize status OK
|
||||
FLUSH TABLES;
|
||||
INSERT INTO t1 VALUES (2);
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a
|
||||
1
|
||||
2
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
|
|
|
|||
|
|
@ -382,3 +382,14 @@ INSERT INTO t1 VALUES('A ', 'A ');
|
|||
ERROR 23000: Duplicate entry 'A -A ' for key 'key1'
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
#
|
||||
# Bug #55472: Assertion failed in heap_rfirst function of hp_rfirst.c
|
||||
# on DELETE statement
|
||||
#
|
||||
CREATE TABLE t1 (col_int_nokey INT,
|
||||
col_int_key INT,
|
||||
INDEX(col_int_key) USING HASH) ENGINE = HEAP;
|
||||
INSERT INTO t1 (col_int_nokey, col_int_key) VALUES (3, 0), (4, 0), (3, 1);
|
||||
DELETE FROM t1 WHERE col_int_nokey = 5 ORDER BY col_int_key LIMIT 2;
|
||||
DROP TABLE t1;
|
||||
End of 5.5 tests
|
||||
|
|
|
|||
5
mysql-test/suite/innodb/r/innodb_bug52199.result
Normal file
5
mysql-test/suite/innodb/r/innodb_bug52199.result
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
CREATE TABLE bug52199 (a INT NOT NULL,
|
||||
b CHAR(125) CHARACTER SET utf32 COLLATE utf32_bin NOT NULL
|
||||
)ENGINE=InnoDB;
|
||||
CREATE UNIQUE INDEX idx ON bug52199(a);
|
||||
DROP TABLE bug52199;
|
||||
88
mysql-test/suite/innodb/r/innodb_bug54679.result
Normal file
88
mysql-test/suite/innodb/r/innodb_bug54679.result
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
SET GLOBAL innodb_file_format='Barracuda';
|
||||
SET GLOBAL innodb_file_per_table=ON;
|
||||
SET innodb_strict_mode=ON;
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
|
||||
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=COMPRESSED
|
||||
ALTER TABLE bug54679 ADD COLUMN b INT;
|
||||
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=COMPRESSED
|
||||
DROP TABLE bug54679;
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
|
||||
WHERE TABLE_NAME='bug54679';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
bug54679 Compact
|
||||
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
|
||||
ALTER TABLE bug54679 ROW_FORMAT=REDUNDANT;
|
||||
ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE.
|
||||
Error 1005 Can't create table '#sql-temporary' (errno: 1478)
|
||||
DROP TABLE bug54679;
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
|
||||
WHERE TABLE_NAME='bug54679';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
bug54679 Redundant row_format=REDUNDANT
|
||||
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
|
||||
SET GLOBAL innodb_file_format=Antelope;
|
||||
ALTER TABLE bug54679 KEY_BLOCK_SIZE=4;
|
||||
ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Error 1005 Can't create table '#sql-temporary' (errno: 1478)
|
||||
ALTER TABLE bug54679 ROW_FORMAT=DYNAMIC;
|
||||
ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope.
|
||||
Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE.
|
||||
Error 1005 Can't create table '#sql-temporary' (errno: 1478)
|
||||
DROP TABLE bug54679;
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
|
||||
ERROR HY000: Can't create table 'test.bug54679' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope.
|
||||
Error 1005 Can't create table 'test.bug54679' (errno: 1478)
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB;
|
||||
SET GLOBAL innodb_file_format=Barracuda;
|
||||
SET GLOBAL innodb_file_per_table=OFF;
|
||||
ALTER TABLE bug54679 KEY_BLOCK_SIZE=4;
|
||||
ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
|
||||
Error 1005 Can't create table '#sql-temporary' (errno: 1478)
|
||||
ALTER TABLE bug54679 ROW_FORMAT=DYNAMIC;
|
||||
ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table.
|
||||
Error 1005 Can't create table '#sql-temporary' (errno: 1478)
|
||||
DROP TABLE bug54679;
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
|
||||
ERROR HY000: Can't create table 'test.bug54679' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table.
|
||||
Error 1005 Can't create table 'test.bug54679' (errno: 1478)
|
||||
SET GLOBAL innodb_file_per_table=ON;
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
|
||||
DROP TABLE bug54679;
|
||||
|
|
@ -42,21 +42,7 @@ trx_isolation_level varchar(16) NO
|
|||
trx_unique_checks int(1) NO 0
|
||||
trx_foreign_key_checks int(1) NO 0
|
||||
trx_last_foreign_key_error varchar(256) YES NULL
|
||||
trx_apative_hash_latched int(1) NO 0
|
||||
trx_adaptive_hash_timeout bigint(21) unsigned NO 0
|
||||
trx_operation_state varchar(64) YES NULL
|
||||
trx_tables_in_use bigint(21) unsigned NO 0
|
||||
trx_tables_locked bigint(21) unsigned NO 0
|
||||
trx_lock_structs bigint(21) unsigned NO 0
|
||||
trx_lock_memory_bytes bigint(21) unsigned NO 0
|
||||
trx_rows_locked bigint(21) unsigned NO 0
|
||||
trx_rows_modified bigint(21) unsigned NO 0
|
||||
trx_concurrency_tickets bigint(21) unsigned NO 0
|
||||
trx_isolation_level varchar(16) NO
|
||||
trx_unique_checks int(1) NO 0
|
||||
trx_foreign_key_checks int(1) NO 0
|
||||
trx_last_foreign_key_error varchar(256) YES NULL
|
||||
trx_apative_hash_latched int(1) NO 0
|
||||
trx_adaptive_hash_latched int(1) NO 0
|
||||
trx_adaptive_hash_timeout bigint(21) unsigned NO 0
|
||||
trx_state trx_weight trx_tables_in_use trx_tables_locked trx_rows_locked trx_rows_modified trx_concurrency_tickets trx_isolation_level trx_unique_checks trx_foreign_key_checks
|
||||
RUNNING 4 0 0 7 1 0 REPEATABLE READ 1 1
|
||||
|
|
|
|||
7
mysql-test/suite/innodb/t/innodb_bug52199.test
Normal file
7
mysql-test/suite/innodb/t/innodb_bug52199.test
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
-- source include/have_innodb.inc
|
||||
|
||||
CREATE TABLE bug52199 (a INT NOT NULL,
|
||||
b CHAR(125) CHARACTER SET utf32 COLLATE utf32_bin NOT NULL
|
||||
)ENGINE=InnoDB;
|
||||
CREATE UNIQUE INDEX idx ON bug52199(a);
|
||||
DROP TABLE bug52199;
|
||||
101
mysql-test/suite/innodb/t/innodb_bug54679.test
Normal file
101
mysql-test/suite/innodb/t/innodb_bug54679.test
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
# Test Bug #54679 alter table causes compressed row_format to revert to compact
|
||||
|
||||
--source include/have_innodb.inc
|
||||
|
||||
let $file_format=`select @@innodb_file_format`;
|
||||
let $file_format_max=`select @@innodb_file_format_max`;
|
||||
let $file_per_table=`select @@innodb_file_per_table`;
|
||||
SET GLOBAL innodb_file_format='Barracuda';
|
||||
SET GLOBAL innodb_file_per_table=ON;
|
||||
SET innodb_strict_mode=ON;
|
||||
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
|
||||
WHERE TABLE_NAME='bug54679';
|
||||
|
||||
# The ROW_FORMAT of the table should be preserved when it is not specified
|
||||
# in ALTER TABLE.
|
||||
ALTER TABLE bug54679 ADD COLUMN b INT;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
|
||||
WHERE TABLE_NAME='bug54679';
|
||||
|
||||
DROP TABLE bug54679;
|
||||
|
||||
# Check that the ROW_FORMAT conversion to/from COMPRESSED works.
|
||||
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
|
||||
WHERE TABLE_NAME='bug54679';
|
||||
|
||||
# KEY_BLOCK_SIZE implies COMPRESSED.
|
||||
ALTER TABLE bug54679 KEY_BLOCK_SIZE=1;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
|
||||
WHERE TABLE_NAME='bug54679';
|
||||
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
ALTER TABLE bug54679 ROW_FORMAT=REDUNDANT;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
DROP TABLE bug54679;
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
|
||||
WHERE TABLE_NAME='bug54679';
|
||||
|
||||
ALTER TABLE bug54679 KEY_BLOCK_SIZE=2;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
|
||||
WHERE TABLE_NAME='bug54679';
|
||||
|
||||
# This prevents other than REDUNDANT or COMPACT ROW_FORMAT for new tables.
|
||||
SET GLOBAL innodb_file_format=Antelope;
|
||||
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
ALTER TABLE bug54679 KEY_BLOCK_SIZE=4;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
ALTER TABLE bug54679 ROW_FORMAT=DYNAMIC;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
DROP TABLE bug54679;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB;
|
||||
|
||||
SET GLOBAL innodb_file_format=Barracuda;
|
||||
# This will prevent ROW_FORMAT=COMPRESSED, because the system tablespace
|
||||
# cannot be compressed.
|
||||
SET GLOBAL innodb_file_per_table=OFF;
|
||||
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
ALTER TABLE bug54679 KEY_BLOCK_SIZE=4;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
ALTER TABLE bug54679 ROW_FORMAT=DYNAMIC;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
DROP TABLE bug54679;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
SET GLOBAL innodb_file_per_table=ON;
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
|
||||
DROP TABLE bug54679;
|
||||
|
||||
# restore original values, quietly so the test does not fail if those
|
||||
# defaults are changed
|
||||
-- disable_query_log
|
||||
EVAL SET GLOBAL innodb_file_format=$file_format;
|
||||
EVAL SET GLOBAL innodb_file_format_max=$file_format_max;
|
||||
EVAL SET GLOBAL innodb_file_per_table=$file_per_table;
|
||||
-- enable_query_log
|
||||
|
|
@ -1 +1 @@
|
|||
--sync-relay-log-info=1 --relay-log-recovery=1 --innodb_file_format_check='ON' --default-storage-engine=MyISAM --innodb-file-per-table=0
|
||||
--sync-relay-log-info=1 --relay-log-recovery=1 --innodb_file_format_check=1 --default-storage-engine=MyISAM --innodb-file-per-table=0
|
||||
|
|
|
|||
|
|
@ -1701,3 +1701,24 @@ SELECT * FROM t1;
|
|||
REPAIR TABLE t1 EXTENDED;
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Bug#45377: ARCHIVE tables aren't discoverable after OPTIMIZE
|
||||
--echo #
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE t1 (a int) ENGINE=ARCHIVE;
|
||||
SHOW CREATE TABLE t1;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
OPTIMIZE TABLE t1;
|
||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||
remove_file $MYSQLD_DATADIR/test/t1.frm;
|
||||
FLUSH TABLES;
|
||||
INSERT INTO t1 VALUES (2);
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
SHOW CREATE TABLE t1;
|
||||
DROP TABLE t1;
|
||||
|
|
|
|||
|
|
@ -284,3 +284,20 @@ INSERT INTO t1 VALUES('A ', 'A ');
|
|||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
||||
--echo #
|
||||
--echo # Bug #55472: Assertion failed in heap_rfirst function of hp_rfirst.c
|
||||
--echo # on DELETE statement
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (col_int_nokey INT,
|
||||
col_int_key INT,
|
||||
INDEX(col_int_key) USING HASH) ENGINE = HEAP;
|
||||
INSERT INTO t1 (col_int_nokey, col_int_key) VALUES (3, 0), (4, 0), (3, 1);
|
||||
|
||||
DELETE FROM t1 WHERE col_int_nokey = 5 ORDER BY col_int_key LIMIT 2;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.5 tests
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue