mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
Merge branch '11.2' into 11.4
This commit is contained in:
@@ -42,7 +42,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select "test"."t1"."a" AS "a","__2"."b" AS "b" from "test"."t1" join (/* select#2 */ select max("test"."t2"."a") AS "b" from "test"."t2") "__2"
|
||||
select * from (select tt.* from (select * from t1) as tt) where tt.a > 0;
|
||||
ERROR 42S22: Unknown column 'tt.a' in 'where clause'
|
||||
ERROR 42S22: Unknown column 'tt.a' in 'WHERE'
|
||||
select * from (select tt.* from (select * from t1) as tt) where a > 0;
|
||||
a
|
||||
2
|
||||
|
@@ -6,9 +6,9 @@ SET sql_mode=ORACLE;
|
||||
# Using SQLCODE and SQLERRM outside of an SP
|
||||
#
|
||||
SELECT SQLCODE;
|
||||
ERROR 42S22: Unknown column 'SQLCODE' in 'field list'
|
||||
ERROR 42S22: Unknown column 'SQLCODE' in 'SELECT'
|
||||
SELECT SQLERRM;
|
||||
ERROR 42S22: Unknown column 'SQLERRM' in 'field list'
|
||||
ERROR 42S22: Unknown column 'SQLERRM' in 'SELECT'
|
||||
CREATE TABLE t1 (SQLCODE INT, SQLERRM VARCHAR(10));
|
||||
INSERT INTO t1 VALUES (10, 'test');
|
||||
SELECT SQLCODE, SQLERRM FROM t1;
|
||||
|
@@ -186,9 +186,9 @@ ERROR 42000: EXECUTE IMMEDIATE does not support subqueries or stored functions
|
||||
PREPARE stmt FROM (SELECT 'SELECT 1');
|
||||
ERROR 42000: PREPARE..FROM does not support subqueries or stored functions
|
||||
EXECUTE IMMEDIATE a;
|
||||
ERROR 42S22: Unknown column 'a' in 'field list'
|
||||
ERROR 42S22: Unknown column 'a' in 'EXECUTE IMMEDIATE'
|
||||
PREPARE stmt FROM a;
|
||||
ERROR 42S22: Unknown column 'a' in 'field list'
|
||||
ERROR 42S22: Unknown column 'a' in 'PREPARE..FROM'
|
||||
EXECUTE IMMEDIATE NULL;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'NULL' at line 1
|
||||
PREPARE stmt FROM NULL;
|
||||
|
@@ -1200,7 +1200,7 @@ END LOOP;
|
||||
END;
|
||||
$$
|
||||
CALL p1;
|
||||
ERROR 42S22: Unknown column 'rec' in 'field list'
|
||||
ERROR 42S22: Unknown column 'rec' in 'SELECT'
|
||||
DROP PROCEDURE p1;
|
||||
CREATE PROCEDURE p1 AS
|
||||
BEGIN
|
||||
@@ -1211,7 +1211,7 @@ END LOOP;
|
||||
END;
|
||||
$$
|
||||
CALL p1;
|
||||
ERROR 42S02: Unknown table 'rec' in field list
|
||||
ERROR 42S02: Unknown table 'rec' in SELECT
|
||||
DROP PROCEDURE p1;
|
||||
# Totally confusing name mixture
|
||||
CREATE TABLE rec (rec INT);
|
||||
|
@@ -2473,7 +2473,7 @@ NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL NULL Using filesort
|
||||
Warnings:
|
||||
Note 1003 (/* select#1 */ select "tvc_0"."5" AS "5" from (values (5),(7),(1),(3),(4)) "tvc_0" order by 1 limit 1,3) union all /* select#2 */ select 3 AS "3" order by 1 limit 1,2
|
||||
values (5,90), (7,20), (1,70), (3,50), (4,10) order by 3;
|
||||
ERROR 42S22: Unknown column '3' in 'order clause'
|
||||
ERROR 42S22: Unknown column '3' in 'ORDER BY'
|
||||
create view v1 as values (5), (7), (1), (3), (4) order by 1 limit 2;
|
||||
show create view v1;
|
||||
View Create View character_set_client collation_connection
|
||||
@@ -2497,9 +2497,9 @@ select * from v1;
|
||||
3
|
||||
drop view v1;
|
||||
create view v1 as values (5,90), (7,20), (1,70), (3,50), (4,10) order by 3;
|
||||
ERROR 42S22: Unknown column '3' in 'order clause'
|
||||
ERROR 42S22: Unknown column '3' in 'ORDER BY'
|
||||
create view v1 as
|
||||
( values (5), (7), (1), (3), (4) limit 2 offset 1 )
|
||||
union
|
||||
( values (5), (7), (1), (3), (4) order by 2 limit 2 );
|
||||
ERROR 42S22: Unknown column '2' in 'order clause'
|
||||
ERROR 42S22: Unknown column '2' in 'ORDER BY'
|
||||
|
@@ -3,8 +3,10 @@ call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t[12]` has an unreadable root page");
|
||||
call mtr.add_suppression("Table .*t[12].* is corrupted");
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[12]\\.ibd' cannot be decrypted; key_version=1");
|
||||
call mtr.add_suppression("failed to read \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
call mtr.add_suppression("InnoDB: Failed to read page [1-9][0-9]* from file '.*test/t[12]\\.ibd'");
|
||||
call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=3\\] in file .*test.t1.ibd looks corrupted; key_version=1");
|
||||
call mtr.add_suppression("InnoDB: File '.*test/t[12]\\.ibd' is corrupted");
|
||||
call mtr.add_suppression("Table `test`\\.`t[12]` is corrupted");
|
||||
call mtr.add_suppression("File '.*mysql-test.std_data.keysbad3\\.txt' not found");
|
||||
call mtr.add_suppression("File '.*mariadb-test.std_data.keysbad3\\.txt' not found");
|
||||
call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot decrypt \\[page id: space=");
|
||||
|
@@ -3,7 +3,9 @@ call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page n
|
||||
call mtr.add_suppression("InnoDB: Recovery failed to read page");
|
||||
call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
|
||||
call mtr.add_suppression("InnoDB: Tablespace for table \`test\`.\`t1\` is set as discarded\\.");
|
||||
call mtr.add_suppression("Table .*t1.* is corrupted");
|
||||
call mtr.add_suppression("InnoDB: Failed to read page 3 from file '.*test/t1\\.ibd'");
|
||||
call mtr.add_suppression("InnoDB: File '.*test/t1\\.ibd' is corrupted");
|
||||
call mtr.add_suppression("Table `test`\\.`t1` is corrupted");
|
||||
call mtr.add_suppression("InnoDB: Cannot delete tablespace .* because it is not found in the tablespace memory cache");
|
||||
call mtr.add_suppression("InnoDB: ALTER TABLE `test`\\.`t1` DISCARD TABLESPACE failed to find tablespace");
|
||||
call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot decrypt \\[page id: space=");
|
||||
|
@@ -1,7 +1,7 @@
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted; key_version=1");
|
||||
call mtr.add_suppression("InnoDB: Recovery failed to read page");
|
||||
call mtr.add_suppression("InnoDB: Unable to decompress ..test.t[12]\\.ibd\\[page id: space=[1-9][0-9]*, page number=[0-9]+\\]");
|
||||
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*test/t[12]\\.ibd' page \\[page id: space=[1-9][0-9]*, page number=3\\]");
|
||||
call mtr.add_suppression("InnoDB: Failed to read page 3 from file '.*test/t[12]\\.ibd'");
|
||||
call mtr.add_suppression("InnoDB: File '.*test/t[12]\\.ibd' is corrupted");
|
||||
call mtr.add_suppression("Table `test`\\.`t[12]` is corrupted");
|
||||
# Restart mysqld --file-key-management-filename=keys2.txt
|
||||
|
@@ -2,6 +2,8 @@ call mtr.add_suppression("Table `test`\\.`t[15]` (has an unreadable root page|is
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[15]\\.ibd' cannot be decrypted\\.");
|
||||
call mtr.add_suppression("InnoDB: Recovery failed to read page");
|
||||
call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=3\\] in file .*test.t[15].ibd looks corrupted; key_version=1");
|
||||
call mtr.add_suppression("InnoDB: Failed to read page 3 from file '.*test/t[15]\\.ibd'");
|
||||
call mtr.add_suppression("InnoDB: File '.*test/t[15]\\.ibd' is corrupted");
|
||||
call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
|
||||
# restart: --innodb-encrypt-tables=ON --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
|
||||
create table t5 (
|
||||
|
@@ -1,7 +1,10 @@
|
||||
call mtr.add_suppression("Table `test`\\.`t[13]` (has an unreadable root page|is corrupted)");
|
||||
call mtr.add_suppression("Table `test`\\.`t[123]` (has an unreadable root page|is corrupted)");
|
||||
call mtr.add_suppression("InnoDB: File '.*test/t[123]\\.ibd' is corrupted");
|
||||
call mtr.add_suppression("InnoDB: Failed to read page 3 from file '.*test/t[13]\\.ibd'");
|
||||
call mtr.add_suppression("InnoDB: Failed to read page 6 from file '.*test/t2\\.ibd'");
|
||||
call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=\\d+, page number=[36]\\] in file .*test.t[123]\\.ibd looks corrupted; key_version=");
|
||||
call mtr.add_suppression("\\[ERROR\\] InnoDB: We detected index corruption in an InnoDB type table");
|
||||
call mtr.add_suppression("\\[ERROR\\] (mysqld|mariadbd).*: Index for table 't2' is corrupt; try to repair it");
|
||||
call mtr.add_suppression("\\[ERROR\\] mariadbd.*: Index for table 't2' is corrupt; try to repair it");
|
||||
set global innodb_compression_algorithm = 1;
|
||||
# Create and populate tables to be corrupted
|
||||
CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT,c char(200)) ENGINE=InnoDB encrypted=yes;
|
||||
|
@@ -2,7 +2,9 @@ call mtr.add_suppression("InnoDB: Table `test`\\.`t1` has an unreadable root pag
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted\\.");
|
||||
call mtr.add_suppression("InnoDB: Recovery failed to read page");
|
||||
call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file .*test.t[12].ibd looks corrupted; key_version=1");
|
||||
call mtr.add_suppression("Table .*t1.* is corrupted");
|
||||
call mtr.add_suppression("InnoDB: Failed to read page 3 from file '.*test/t1\\.ibd'");
|
||||
call mtr.add_suppression("InnoDB: File '.*test/t1\\.ibd' is corrupted");
|
||||
call mtr.add_suppression("Table `test`\\.`t1` is corrupted");
|
||||
# Start server with keys2.txt
|
||||
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
|
||||
CREATE TABLE t1(a int not null primary key auto_increment, b varchar(128)) engine=innodb ENCRYPTED=YES ENCRYPTION_KEY_ID=19;
|
||||
|
@@ -23,6 +23,7 @@ insert into t2 select * from t1;
|
||||
insert into t3 select * from t1;
|
||||
insert into t4 select * from t1;
|
||||
commit;
|
||||
set global innodb_log_checkpoint_now=on;
|
||||
SET GLOBAL innodb_flush_log_at_trx_commit=1;
|
||||
begin;
|
||||
update t1 set c = repeat('secret3', 20);
|
||||
|
@@ -5,11 +5,11 @@
|
||||
call mtr.add_suppression("InnoDB: Plugin initialization aborted");
|
||||
call mtr.add_suppression("Plugin 'InnoDB' init function returned error");
|
||||
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed");
|
||||
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*test.t1\\.ibd' page");
|
||||
call mtr.add_suppression("InnoDB: Failed to read page [123] from file '.*test.t1\\.ibd': Table is compressed or encrypted but uncompress or decrypt failed");
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=\\d+, page number=3\\] in file '.*test.t1\\.ibd' cannot be decrypted");
|
||||
call mtr.add_suppression("InnoDB: File '.*test/t1\\.ibd' is corrupted");
|
||||
call mtr.add_suppression("InnoDB: Table in tablespace \\d+ encrypted. However key management plugin or used key_version \\d+ is not found or used encryption algorithm or method does not match. Can't continue opening the table.");
|
||||
call mtr.add_suppression("InnoDB: (Unable to apply log to|Discarding log for) corrupted page ");
|
||||
call mtr.add_suppression("InnoDB: Unable to apply log to corrupted page ");
|
||||
--enable_query_log
|
||||
|
||||
let INNODB_PAGE_SIZE=`select @@innodb_page_size`;
|
||||
|
@@ -13,8 +13,10 @@ call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t[12]` has an unreadable root page");
|
||||
call mtr.add_suppression("Table .*t[12].* is corrupted");
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[12]\\.ibd' cannot be decrypted; key_version=1");
|
||||
call mtr.add_suppression("failed to read \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
call mtr.add_suppression("InnoDB: Failed to read page [1-9][0-9]* from file '.*test/t[12]\\.ibd'");
|
||||
call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=3\\] in file .*test.t1.ibd looks corrupted; key_version=1");
|
||||
call mtr.add_suppression("InnoDB: File '.*test/t[12]\\.ibd' is corrupted");
|
||||
call mtr.add_suppression("Table `test`\\.`t[12]` is corrupted");
|
||||
call mtr.add_suppression("File '.*mysql-test.std_data.keysbad3\\.txt' not found");
|
||||
call mtr.add_suppression("File '.*mariadb-test.std_data.keysbad3\\.txt' not found");
|
||||
# for innodb_checksum_algorithm=full_crc32 only
|
||||
|
@@ -14,7 +14,9 @@ call mtr.add_suppression("InnoDB: Recovery failed to read page");
|
||||
# Suppression for builds where file_key_management plugin is linked statically
|
||||
call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
|
||||
call mtr.add_suppression("InnoDB: Tablespace for table \`test\`.\`t1\` is set as discarded\\.");
|
||||
call mtr.add_suppression("Table .*t1.* is corrupted");
|
||||
call mtr.add_suppression("InnoDB: Failed to read page 3 from file '.*test/t1\\.ibd'");
|
||||
call mtr.add_suppression("InnoDB: File '.*test/t1\\.ibd' is corrupted");
|
||||
call mtr.add_suppression("Table `test`\\.`t1` is corrupted");
|
||||
call mtr.add_suppression("InnoDB: Cannot delete tablespace .* because it is not found in the tablespace memory cache");
|
||||
call mtr.add_suppression("InnoDB: ALTER TABLE `test`\\.`t1` DISCARD TABLESPACE failed to find tablespace");
|
||||
# for innodb_checksum_algorithm=full_crc32 only
|
||||
|
@@ -7,7 +7,7 @@
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted; key_version=1");
|
||||
call mtr.add_suppression("InnoDB: Recovery failed to read page");
|
||||
call mtr.add_suppression("InnoDB: Unable to decompress ..test.t[12]\\.ibd\\[page id: space=[1-9][0-9]*, page number=[0-9]+\\]");
|
||||
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*test/t[12]\\.ibd' page \\[page id: space=[1-9][0-9]*, page number=3\\]");
|
||||
call mtr.add_suppression("InnoDB: Failed to read page 3 from file '.*test/t[12]\\.ibd'");
|
||||
call mtr.add_suppression("InnoDB: File '.*test/t[12]\\.ibd' is corrupted");
|
||||
call mtr.add_suppression("Table `test`\\.`t[12]` is corrupted");
|
||||
|
||||
|
@@ -11,6 +11,8 @@ call mtr.add_suppression("Table `test`\\.`t[15]` (has an unreadable root page|is
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[15]\\.ibd' cannot be decrypted\\.");
|
||||
call mtr.add_suppression("InnoDB: Recovery failed to read page");
|
||||
call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=3\\] in file .*test.t[15].ibd looks corrupted; key_version=1");
|
||||
call mtr.add_suppression("InnoDB: Failed to read page 3 from file '.*test/t[15]\\.ibd'");
|
||||
call mtr.add_suppression("InnoDB: File '.*test/t[15]\\.ibd' is corrupted");
|
||||
|
||||
# Suppression for builds where file_key_management plugin is linked statically
|
||||
call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
|
||||
|
@@ -7,10 +7,13 @@
|
||||
# Don't test under embedded
|
||||
-- source include/not_embedded.inc
|
||||
|
||||
call mtr.add_suppression("Table `test`\\.`t[13]` (has an unreadable root page|is corrupted)");
|
||||
call mtr.add_suppression("Table `test`\\.`t[123]` (has an unreadable root page|is corrupted)");
|
||||
call mtr.add_suppression("InnoDB: File '.*test/t[123]\\.ibd' is corrupted");
|
||||
call mtr.add_suppression("InnoDB: Failed to read page 3 from file '.*test/t[13]\\.ibd'");
|
||||
call mtr.add_suppression("InnoDB: Failed to read page 6 from file '.*test/t2\\.ibd'");
|
||||
call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=\\d+, page number=[36]\\] in file .*test.t[123]\\.ibd looks corrupted; key_version=");
|
||||
call mtr.add_suppression("\\[ERROR\\] InnoDB: We detected index corruption in an InnoDB type table");
|
||||
call mtr.add_suppression("\\[ERROR\\] (mysqld|mariadbd).*: Index for table 't2' is corrupt; try to repair it");
|
||||
call mtr.add_suppression("\\[ERROR\\] mariadbd.*: Index for table 't2' is corrupt; try to repair it");
|
||||
|
||||
set global innodb_compression_algorithm = 1;
|
||||
|
||||
|
@@ -11,7 +11,9 @@ call mtr.add_suppression("InnoDB: Table `test`\\.`t1` has an unreadable root pag
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted\\.");
|
||||
call mtr.add_suppression("InnoDB: Recovery failed to read page");
|
||||
call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file .*test.t[12].ibd looks corrupted; key_version=1");
|
||||
call mtr.add_suppression("Table .*t1.* is corrupted");
|
||||
call mtr.add_suppression("InnoDB: Failed to read page 3 from file '.*test/t1\\.ibd'");
|
||||
call mtr.add_suppression("InnoDB: File '.*test/t1\\.ibd' is corrupted");
|
||||
call mtr.add_suppression("Table `test`\\.`t1` is corrupted");
|
||||
|
||||
--echo # Start server with keys2.txt
|
||||
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
|
||||
|
@@ -52,6 +52,8 @@ insert into t3 select * from t1;
|
||||
insert into t4 select * from t1;
|
||||
commit;
|
||||
|
||||
set global innodb_log_checkpoint_now=on;
|
||||
|
||||
--source ../../suite/innodb/include/no_checkpoint_start.inc
|
||||
|
||||
#
|
||||
|
@@ -1171,14 +1171,14 @@ abc
|
||||
abc
|
||||
# Check handling of incorrect ORDER BY clause
|
||||
SELECT a FROM federated.t1 UNION SELECT a FROM federated.t2 ORDER BY 2;
|
||||
ERROR 42S22: Unknown column '2' in 'order clause'
|
||||
ERROR 42S22: Unknown column '2' in 'ORDER BY'
|
||||
PREPARE stmt FROM
|
||||
"SELECT a FROM federated.t1 UNION ALL SELECT a FROM federated.t2 ORDER BY 2";
|
||||
ERROR 42S22: Unknown column '2' in 'order clause'
|
||||
ERROR 42S22: Unknown column '2' in 'ORDER BY'
|
||||
SELECT a FROM federated.t1 UNION ALL SELECT a FROM federated.t2 ORDER BY 2,1,3;
|
||||
ERROR 42S22: Unknown column '2' in 'order clause'
|
||||
ERROR 42S22: Unknown column '2' in 'ORDER BY'
|
||||
SELECT a FROM federated.t1 UNION ALL SELECT a FROM federated.t2 ORDER BY t1.a;
|
||||
ERROR 42000: Table 't1' from one of the SELECTs cannot be used in order clause
|
||||
ERROR 42000: Table 't1' from one of the SELECTs cannot be used in ORDER BY
|
||||
SELECT * from federated.t1 INTERSECT
|
||||
SELECT * from federated.t2 UNION ALL
|
||||
SELECT * from federated.t2 EXCEPT
|
||||
@@ -1192,7 +1192,7 @@ SELECT * from federated.t2 UNION ALL
|
||||
SELECT * from federated.t2 EXCEPT
|
||||
SELECT * from federated.t1
|
||||
ORDER BY 3;
|
||||
ERROR 42S22: Unknown column '3' in 'order clause'
|
||||
ERROR 42S22: Unknown column '3' in 'ORDER BY'
|
||||
# UNION of mixed Federated/MyISAM tables, pushing parts of UNIONs
|
||||
SELECT * FROM federated.t1 UNION SELECT * FROM t3 ORDER BY a;
|
||||
a
|
||||
@@ -1203,7 +1203,7 @@ t3_myisam1
|
||||
t3_myisam2
|
||||
t3_myisam3
|
||||
SELECT * FROM federated.t1 UNION SELECT * FROM t3 ORDER BY 2;
|
||||
ERROR 42S22: Unknown column '2' in 'order clause'
|
||||
ERROR 42S22: Unknown column '2' in 'ORDER BY'
|
||||
#
|
||||
# MDEV-32382 FederatedX error on pushdown of statement having CTE
|
||||
#
|
||||
|
@@ -4209,14 +4209,14 @@ Create view v1_1
|
||||
as Select test.tb2.f59 as NewNameF1, test.tb2.f60 as NewNameF2
|
||||
from tb2 limit 0,100 ;
|
||||
SELECT NewNameF1,f60 FROM test.v1_1 ;
|
||||
ERROR 42S22: Unknown column 'f60' in 'field list'
|
||||
ERROR 42S22: Unknown column 'f60' in 'SELECT'
|
||||
SELECT NewNameF1, v1_1.f60 FROM test.v1_1 ;
|
||||
ERROR 42S22: Unknown column 'v1_1.f60' in 'field list'
|
||||
ERROR 42S22: Unknown column 'v1_1.f60' in 'SELECT'
|
||||
SELECT f59, f60 FROM test.v1 ;
|
||||
ERROR 42S22: Unknown column 'f59' in 'field list'
|
||||
ERROR 42S22: Unknown column 'f59' in 'SELECT'
|
||||
Use test ;
|
||||
SELECT F59 FROM v1 ;
|
||||
ERROR 42S22: Unknown column 'F59' in 'field list'
|
||||
ERROR 42S22: Unknown column 'F59' in 'SELECT'
|
||||
|
||||
Testcase 3.3.1.19
|
||||
--------------------------------------------------------------------------------
|
||||
@@ -22453,7 +22453,7 @@ INSERT INTO t1 SET f1 = 0, f4x = 'ABC', report = 't1 1';
|
||||
INSERT INTO v1 SET f1 = 0, f4 = 'ABC', report = 'v1 1';
|
||||
ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||
INSERT INTO v1 SET f1 = 0, f4x = 'ABC', report = 'v1 1a';
|
||||
ERROR 42S22: Unknown column 'f4x' in 'field list'
|
||||
ERROR 42S22: Unknown column 'f4x' in 'INSERT INTO'
|
||||
INSERT INTO v1 SET f1 = 0, report = 'v1 1b';
|
||||
ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||
DESCRIBE t1;
|
||||
@@ -22756,7 +22756,7 @@ INSERT INTO t1 SET f1 = 'ABC', f2 = -3.3E-4,
|
||||
f3 = -2.2, f4 = '<------ 20 -------->', report = 't1 9';
|
||||
INSERT INTO v1 SET f1 = 'ABC', f2 = -3.3E-4,
|
||||
f3 = -2.2, f4 = '<------ 20 -------->', report = 'v1 9';
|
||||
ERROR 42S22: Unknown column 'f3' in 'field list'
|
||||
ERROR 42S22: Unknown column 'f3' in 'INSERT INTO'
|
||||
INSERT INTO v1 SET f1 = 'ABC', f2 = -3.3E-4,
|
||||
f4 = '<------ 20 -------->', report = 'v1 9a';
|
||||
DESCRIBE t1;
|
||||
|
@@ -262,7 +262,7 @@ GRANT USAGE ON *.* TO `testuser1`@`localhost`
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
|
||||
GRANT SELECT (`f3`, `f1`), UPDATE (`f1`) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
|
||||
SELECT f1, f3 FROM db_datadict.my_table;
|
||||
ERROR 42S22: Unknown column 'f3' in 'field list'
|
||||
ERROR 42S22: Unknown column 'f3' in 'SELECT'
|
||||
connection default;
|
||||
ALTER TABLE db_datadict.my_table CHANGE COLUMN f1 my_col BIGINT;
|
||||
SELECT * FROM information_schema.column_privileges
|
||||
|
@@ -4210,14 +4210,14 @@ Create view v1_1
|
||||
as Select test.tb2.f59 as NewNameF1, test.tb2.f60 as NewNameF2
|
||||
from tb2 limit 0,100 ;
|
||||
SELECT NewNameF1,f60 FROM test.v1_1 ;
|
||||
ERROR 42S22: Unknown column 'f60' in 'field list'
|
||||
ERROR 42S22: Unknown column 'f60' in 'SELECT'
|
||||
SELECT NewNameF1, v1_1.f60 FROM test.v1_1 ;
|
||||
ERROR 42S22: Unknown column 'v1_1.f60' in 'field list'
|
||||
ERROR 42S22: Unknown column 'v1_1.f60' in 'SELECT'
|
||||
SELECT f59, f60 FROM test.v1 ;
|
||||
ERROR 42S22: Unknown column 'f59' in 'field list'
|
||||
ERROR 42S22: Unknown column 'f59' in 'SELECT'
|
||||
Use test ;
|
||||
SELECT F59 FROM v1 ;
|
||||
ERROR 42S22: Unknown column 'F59' in 'field list'
|
||||
ERROR 42S22: Unknown column 'F59' in 'SELECT'
|
||||
|
||||
Testcase 3.3.1.19
|
||||
--------------------------------------------------------------------------------
|
||||
@@ -22455,7 +22455,7 @@ INSERT INTO t1 SET f1 = 0, f4x = 'ABC', report = 't1 1';
|
||||
INSERT INTO v1 SET f1 = 0, f4 = 'ABC', report = 'v1 1';
|
||||
ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||
INSERT INTO v1 SET f1 = 0, f4x = 'ABC', report = 'v1 1a';
|
||||
ERROR 42S22: Unknown column 'f4x' in 'field list'
|
||||
ERROR 42S22: Unknown column 'f4x' in 'INSERT INTO'
|
||||
INSERT INTO v1 SET f1 = 0, report = 'v1 1b';
|
||||
ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||
DESCRIBE t1;
|
||||
@@ -22758,7 +22758,7 @@ INSERT INTO t1 SET f1 = 'ABC', f2 = -3.3E-4,
|
||||
f3 = -2.2, f4 = '<------ 20 -------->', report = 't1 9';
|
||||
INSERT INTO v1 SET f1 = 'ABC', f2 = -3.3E-4,
|
||||
f3 = -2.2, f4 = '<------ 20 -------->', report = 'v1 9';
|
||||
ERROR 42S22: Unknown column 'f3' in 'field list'
|
||||
ERROR 42S22: Unknown column 'f3' in 'INSERT INTO'
|
||||
INSERT INTO v1 SET f1 = 'ABC', f2 = -3.3E-4,
|
||||
f4 = '<------ 20 -------->', report = 'v1 9a';
|
||||
DESCRIBE t1;
|
||||
|
@@ -4679,14 +4679,14 @@ Create view v1_1
|
||||
as Select test.tb2.f59 as NewNameF1, test.tb2.f60 as NewNameF2
|
||||
from tb2 limit 0,100 ;
|
||||
SELECT NewNameF1,f60 FROM test.v1_1 ;
|
||||
ERROR 42S22: Unknown column 'f60' in 'field list'
|
||||
ERROR 42S22: Unknown column 'f60' in 'SELECT'
|
||||
SELECT NewNameF1, v1_1.f60 FROM test.v1_1 ;
|
||||
ERROR 42S22: Unknown column 'v1_1.f60' in 'field list'
|
||||
ERROR 42S22: Unknown column 'v1_1.f60' in 'SELECT'
|
||||
SELECT f59, f60 FROM test.v1 ;
|
||||
ERROR 42S22: Unknown column 'f59' in 'field list'
|
||||
ERROR 42S22: Unknown column 'f59' in 'SELECT'
|
||||
Use test ;
|
||||
SELECT F59 FROM v1 ;
|
||||
ERROR 42S22: Unknown column 'F59' in 'field list'
|
||||
ERROR 42S22: Unknown column 'F59' in 'SELECT'
|
||||
|
||||
Testcase 3.3.1.19
|
||||
--------------------------------------------------------------------------------
|
||||
@@ -24157,7 +24157,7 @@ INSERT INTO t1 SET f1 = 0, f4x = 'ABC', report = 't1 1';
|
||||
INSERT INTO v1 SET f1 = 0, f4 = 'ABC', report = 'v1 1';
|
||||
ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||
INSERT INTO v1 SET f1 = 0, f4x = 'ABC', report = 'v1 1a';
|
||||
ERROR 42S22: Unknown column 'f4x' in 'field list'
|
||||
ERROR 42S22: Unknown column 'f4x' in 'INSERT INTO'
|
||||
INSERT INTO v1 SET f1 = 0, report = 'v1 1b';
|
||||
ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||
DESCRIBE t1;
|
||||
@@ -24460,7 +24460,7 @@ INSERT INTO t1 SET f1 = 'ABC', f2 = -3.3E-4,
|
||||
f3 = -2.2, f4 = '<------ 20 -------->', report = 't1 9';
|
||||
INSERT INTO v1 SET f1 = 'ABC', f2 = -3.3E-4,
|
||||
f3 = -2.2, f4 = '<------ 20 -------->', report = 'v1 9';
|
||||
ERROR 42S22: Unknown column 'f3' in 'field list'
|
||||
ERROR 42S22: Unknown column 'f3' in 'INSERT INTO'
|
||||
INSERT INTO v1 SET f1 = 'ABC', f2 = -3.3E-4,
|
||||
f4 = '<------ 20 -------->', report = 'v1 9a';
|
||||
DESCRIBE t1;
|
||||
|
@@ -3893,7 +3893,7 @@ SELECT count(*) into cnt from t2;
|
||||
set @count = cnt;
|
||||
SELECT @count;
|
||||
END//
|
||||
ERROR 42S22: Unknown column 'cnt' in 'field list'
|
||||
ERROR 42S22: Unknown column 'cnt' in 'SET'
|
||||
CALL sp1( 10 );
|
||||
DROP PROCEDURE sp1;
|
||||
CREATE PROCEDURE sp1( cnt int(20) )
|
||||
@@ -15599,7 +15599,7 @@ END;
|
||||
END loop label1;
|
||||
END//
|
||||
CALL sp4();
|
||||
ERROR 42S22: Unknown column 'idummy2' in 'field list'
|
||||
ERROR 42S22: Unknown column 'idummy2' in 'SELECT'
|
||||
DROP PROCEDURE sp4;
|
||||
|
||||
Testcase 4.3.5:
|
||||
|
@@ -11,7 +11,6 @@
|
||||
##############################################################################
|
||||
|
||||
galera_as_slave_ctas : MDEV-28378 timeout
|
||||
galera_pc_recovery : MDEV-25199 cluster fails to start up
|
||||
galera_sequences : MDEV-32561 WSREP FSM failure: no such a transition REPLICATING -> COMMITTED
|
||||
galera_concurrent_ctas : MDEV-32779 galera_concurrent_ctas: assertion in the galera::ReplicatorSMM::finish_cert()
|
||||
galera_as_slave_replay : MDEV-32780 galera_as_slave_replay: assertion in the wsrep::transaction::before_rollback()
|
||||
|
@@ -10,6 +10,7 @@ wsrep-provider=@ENV.WSREP_PROVIDER
|
||||
# enforce read-committed characteristics across the cluster
|
||||
# wsrep-causal-reads=ON
|
||||
wsrep-sync-wait=15
|
||||
wsrep-debug=1
|
||||
|
||||
[mysqld.1]
|
||||
wsrep-on=1
|
||||
@@ -17,7 +18,7 @@ wsrep-on=1
|
||||
#ist_port=@OPT.port
|
||||
#sst_port=@OPT.port
|
||||
wsrep_cluster_address=gcomm://
|
||||
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;gcache.size=10M'
|
||||
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT25S'
|
||||
wsrep_node_address='127.0.0.1:@mysqld.1.#galera_port'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
|
||||
@@ -29,7 +30,7 @@ wsrep-on=1
|
||||
#ist_port=@OPT.port
|
||||
#sst_port=@OPT.port
|
||||
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;gcache.size=10M'
|
||||
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT25S'
|
||||
wsrep_node_address='127.0.0.1:@mysqld.2.#galera_port'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
|
||||
@@ -41,7 +42,7 @@ wsrep-on=1
|
||||
#ist_port=@OPT.port
|
||||
#sst_port=@OPT.port
|
||||
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.3.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;gcache.size=10M'
|
||||
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.3.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT25S'
|
||||
wsrep_node_address='127.0.0.1:@mysqld.3.#galera_port'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.3.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.3.#sst_port'
|
||||
@@ -53,7 +54,7 @@ wsrep-on=1
|
||||
#ist_port=@OPT.port
|
||||
#sst_port=@OPT.port
|
||||
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.4.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;gcache.size=10M'
|
||||
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.4.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT25S'
|
||||
wsrep_node_address='127.0.0.1:@mysqld.4.#galera_port'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.4.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.4.#sst_port'
|
||||
|
@@ -8,7 +8,7 @@ connection node_1;
|
||||
SET @@enforce_storage_engine=INNODB;
|
||||
CREATE TABLE t1(i INT) ENGINE=INNODB;
|
||||
CREATE TABLE t2(i INT) ENGINE=MYISAM;
|
||||
ERROR 42000: Unknown storage engine 'MyISAM'
|
||||
ERROR HY000: The MariaDB server is running with the NO_ENGINE_SUBSTITUTION option so it cannot execute this statement
|
||||
INSERT INTO t1 VALUES(1);
|
||||
connection node_2;
|
||||
SHOW TABLES;
|
||||
|
@@ -6,6 +6,8 @@ connection node_1;
|
||||
connection node_2;
|
||||
connection node_3;
|
||||
connection node_4;
|
||||
connection node_1;
|
||||
SET GLOBAL wsrep_provider_options = 'pc.weight=2';
|
||||
connection node_3;
|
||||
SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1';
|
||||
connection node_1;
|
||||
@@ -44,7 +46,8 @@ COUNT(*) = 0
|
||||
1
|
||||
CALL mtr.add_suppression("mariadbd: Can't find record in 't1'");
|
||||
CALL mtr.add_suppression("Slave SQL: Could not execute Delete_rows");
|
||||
CALL mtr.add_suppression("WSREP: Event 3 Delete_rows_v1 apply failed: 120, seqno [0-9]*");
|
||||
CALL mtr.add_suppression("WSREP: Event 3 Delete_rows_v1 apply failed: 120, seqno ");
|
||||
SET GLOBAL wsrep_provider_options = 'pc.weight=1';
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'A';
|
||||
COUNT(*) = 1
|
||||
@@ -54,7 +57,7 @@ COUNT(*) = 0
|
||||
1
|
||||
CALL mtr.add_suppression("mariadbd: Can't find record in 't1'");
|
||||
CALL mtr.add_suppression("Slave SQL: Could not execute Delete_rows");
|
||||
CALL mtr.add_suppression("WSREP: Event 3 Delete_rows_v1 apply failed: 120, seqno [0-9]*");
|
||||
CALL mtr.add_suppression("WSREP: Event 3 Delete_rows_v1 apply failed: 120, seqno ");
|
||||
connection node_3;
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'A';
|
||||
COUNT(*) = 1
|
||||
|
@@ -8,16 +8,30 @@ SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_N
|
||||
VARIABLE_VALUE = 4
|
||||
1
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER);
|
||||
CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=INNODB;
|
||||
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
|
||||
connection node_3;
|
||||
SELECT COUNT(*) AS EXPECT_0 FROM t1;
|
||||
EXPECT_0
|
||||
0
|
||||
INSERT INTO t1 VALUES (1);
|
||||
SELECT COUNT(*) AS EXPECT_1 FROM t1;
|
||||
EXPECT_1
|
||||
1
|
||||
connection node_2;
|
||||
SELECT COUNT(*) AS EXPECT_1 FROM t1;
|
||||
EXPECT_1
|
||||
1
|
||||
connection node_1;
|
||||
SELECT COUNT(*) AS EXPECT_1 FROM t1;
|
||||
EXPECT_1
|
||||
1
|
||||
connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4;
|
||||
connection node_4;
|
||||
SELECT COUNT(*) AS EXPECT_1 FROM t1;
|
||||
EXPECT_1
|
||||
1
|
||||
SELECT VARIABLE_VALUE LIKE '%gmcast.segment = 3%' FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME = 'wsrep_provider_options';
|
||||
VARIABLE_VALUE LIKE '%gmcast.segment = 3%'
|
||||
1
|
||||
SELECT COUNT(*) = 1 FROM t1;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
DROP TABLE t1;
|
||||
|
64
mysql-test/suite/galera/r/mdev-30653.result
Normal file
64
mysql-test/suite/galera/r/mdev-30653.result
Normal file
@@ -0,0 +1,64 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
create table t1 (id serial, val int) engine=innodb;
|
||||
create table t2 (id serial, val int) engine=aria;
|
||||
insert into t1 values(1, 23);
|
||||
insert into t2 values(2, 42);
|
||||
call mtr.add_suppression("WSREP: Replication of non-transactional engines is experimental. Storage engine Aria for table 'test'.'t2' is not supported in Galera");
|
||||
begin;
|
||||
update t1 set val=24 where id=1;
|
||||
update t2 set val=41 where id=2;
|
||||
commit;
|
||||
ERROR HY000: Transactional commit not supported by involved engine(s)
|
||||
select * from t1;
|
||||
id val
|
||||
1 23
|
||||
select * from t2;
|
||||
id val
|
||||
2 41
|
||||
connection node_2;
|
||||
select * from t1;
|
||||
id val
|
||||
1 23
|
||||
select * from t2;
|
||||
id val
|
||||
connection node_1;
|
||||
drop table t1, t2;
|
||||
SET GLOBAL wsrep_mode=REPLICATE_ARIA;
|
||||
create table t1 (id serial, val int) engine=innodb;
|
||||
create table t2 (id serial, val int) engine=aria;
|
||||
insert into t1 values(1, 23);
|
||||
insert into t2 values(2, 42);
|
||||
begin;
|
||||
update t1 set val=24 where id=1;
|
||||
update t2 set val=41 where id=2;
|
||||
ERROR HY000: Transactional commit not supported by involved engine(s)
|
||||
commit;
|
||||
select * from t1;
|
||||
id val
|
||||
1 24
|
||||
select * from t2;
|
||||
id val
|
||||
2 42
|
||||
connection node_2;
|
||||
select * from t1;
|
||||
id val
|
||||
1 23
|
||||
select * from t2;
|
||||
id val
|
||||
2 42
|
||||
connection node_1;
|
||||
drop table t1, t2;
|
||||
create table t2 (id serial, val int) engine=aria;
|
||||
INSERT INTO t2 values(1,1);
|
||||
UPDATE t2 set id=5,val=6 where id = 1;
|
||||
SELECT * from t2;
|
||||
id val
|
||||
5 6
|
||||
connection node_2;
|
||||
SELECT * from t2;
|
||||
id val
|
||||
5 6
|
||||
DROP TABLE t2;
|
||||
connection node_1;
|
||||
SET GLOBAL wsrep_mode=DEFAULT;
|
@@ -13,7 +13,7 @@
|
||||
--connection node_1
|
||||
SET @@enforce_storage_engine=INNODB;
|
||||
CREATE TABLE t1(i INT) ENGINE=INNODB;
|
||||
--error ER_UNKNOWN_STORAGE_ENGINE
|
||||
--error ER_OPTION_PREVENTS_STATEMENT
|
||||
CREATE TABLE t2(i INT) ENGINE=MYISAM;
|
||||
|
||||
INSERT INTO t1 VALUES(1);
|
||||
|
@@ -33,8 +33,8 @@ SELECT COUNT(*) = 1 FROM t1;
|
||||
|
||||
# Perform --wsrep-recover and preserve the positions into variables by placing them in $MYSQL_TMP_DIR/galera_wsrep_start_position.inc and then --source'ing it
|
||||
|
||||
--exec $MYSQLD --defaults-group-suffix=.1 --defaults-file=$MYSQLTEST_VARDIR/my.cnf --wsrep-recover --log-error=$MYSQL_TMP_DIR/galera_wsrep_recover.1.log > $MYSQL_TMP_DIR/galera_wsrep_recover.1.log 2>&1
|
||||
--exec $MYSQLD --defaults-group-suffix=.2 --defaults-file=$MYSQLTEST_VARDIR/my.cnf --wsrep-recover --log-error=$MYSQL_TMP_DIR/galera_wsrep_recover.2.log > $MYSQL_TMP_DIR/galera_wsrep_recover.2.log 2>&1
|
||||
--exec $MYSQLD --defaults-group-suffix=.1 --defaults-file=$MYSQLTEST_VARDIR/my.cnf --innodb --wsrep-recover --log-error=$MYSQL_TMP_DIR/galera_wsrep_recover.1.log > $MYSQL_TMP_DIR/galera_wsrep_recover.1.log 2>&1
|
||||
--exec $MYSQLD --defaults-group-suffix=.2 --defaults-file=$MYSQLTEST_VARDIR/my.cnf --innodb --wsrep-recover --log-error=$MYSQL_TMP_DIR/galera_wsrep_recover.2.log > $MYSQL_TMP_DIR/galera_wsrep_recover.2.log 2>&1
|
||||
|
||||
--perl
|
||||
use strict;
|
||||
|
@@ -2,6 +2,7 @@
|
||||
|
||||
[mysqld]
|
||||
wsrep-ignore-apply-errors=0
|
||||
loose-galera-vote-rejoin-dml=0
|
||||
|
||||
[ENV]
|
||||
galera_cluster_size=4
|
||||
|
@@ -5,6 +5,10 @@
|
||||
|
||||
--source include/galera_cluster.inc
|
||||
--source include/big_test.inc
|
||||
--source include/force_restart.inc
|
||||
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
--let $node_1=node_1
|
||||
--let $node_2=node_2
|
||||
@@ -12,6 +16,9 @@
|
||||
--let $node_4=node_4
|
||||
--source include/auto_increment_offset_save.inc
|
||||
|
||||
--connection node_1
|
||||
SET GLOBAL wsrep_provider_options = 'pc.weight=2';
|
||||
|
||||
# Isolate node #3
|
||||
--connection node_3
|
||||
SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1';
|
||||
@@ -30,6 +37,7 @@ INSERT INTO t1 VALUES (1, 'A');
|
||||
SET SESSION wsrep_on=OFF;
|
||||
INSERT INTO t1 VALUES (2, 'B');
|
||||
SET SESSION wsrep_on=ON;
|
||||
--source include/galera_wait_ready.inc
|
||||
DELETE FROM t1 WHERE f1 = 2;
|
||||
|
||||
# Wait for node #4 to be voted out
|
||||
@@ -75,14 +83,15 @@ SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'A';
|
||||
SELECT COUNT(*) = 0 FROM t1 WHERE f2 = 'B';
|
||||
CALL mtr.add_suppression("mariadbd: Can't find record in 't1'");
|
||||
CALL mtr.add_suppression("Slave SQL: Could not execute Delete_rows");
|
||||
CALL mtr.add_suppression("WSREP: Event 3 Delete_rows_v1 apply failed: 120, seqno [0-9]*");
|
||||
CALL mtr.add_suppression("WSREP: Event 3 Delete_rows_v1 apply failed: 120, seqno ");
|
||||
SET GLOBAL wsrep_provider_options = 'pc.weight=1';
|
||||
|
||||
--connection node_2
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'A';
|
||||
SELECT COUNT(*) = 0 FROM t1 WHERE f2 = 'B';
|
||||
CALL mtr.add_suppression("mariadbd: Can't find record in 't1'");
|
||||
CALL mtr.add_suppression("Slave SQL: Could not execute Delete_rows");
|
||||
CALL mtr.add_suppression("WSREP: Event 3 Delete_rows_v1 apply failed: 120, seqno [0-9]*");
|
||||
CALL mtr.add_suppression("WSREP: Event 3 Delete_rows_v1 apply failed: 120, seqno ");
|
||||
|
||||
--connection node_3
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'A';
|
||||
|
@@ -1,5 +1,8 @@
|
||||
!include ../galera_4nodes.cnf
|
||||
|
||||
[mysqld]
|
||||
loose-galera-wan=1
|
||||
|
||||
[mysqld.1]
|
||||
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M;gmcast.segment=1'
|
||||
|
||||
|
@@ -8,31 +8,35 @@
|
||||
|
||||
--source include/galera_cluster.inc
|
||||
--source include/have_innodb.inc
|
||||
--source include/force_restart.inc
|
||||
|
||||
CALL mtr.add_suppression("WSREP: Stray state UUID msg:");
|
||||
CALL mtr.add_suppression("Sending JOIN failed: ");
|
||||
CALL mtr.add_suppression("WSREP: .* sending install message failed: Socket is not connected");
|
||||
CALL mtr.add_suppression("There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside");
|
||||
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
--source include/wait_condition.inc
|
||||
SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
|
||||
--connection node_1
|
||||
CREATE TABLE t1 (f1 INTEGER);
|
||||
CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=INNODB;
|
||||
|
||||
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
|
||||
--connection node_3
|
||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t1';
|
||||
--source include/wait_condition.inc
|
||||
SELECT COUNT(*) AS EXPECT_0 FROM t1;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
SELECT COUNT(*) AS EXPECT_1 FROM t1;
|
||||
|
||||
--connection node_2
|
||||
SELECT COUNT(*) AS EXPECT_1 FROM t1;
|
||||
|
||||
--connection node_1
|
||||
SELECT COUNT(*) AS EXPECT_1 FROM t1;
|
||||
|
||||
--connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4
|
||||
--connection node_4
|
||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t1';
|
||||
--source include/wait_condition.inc
|
||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM t1;
|
||||
--source include/wait_condition.inc
|
||||
SELECT COUNT(*) AS EXPECT_1 FROM t1;
|
||||
|
||||
SELECT VARIABLE_VALUE LIKE '%gmcast.segment = 3%' FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME = 'wsrep_provider_options';
|
||||
|
||||
SELECT COUNT(*) = 1 FROM t1;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
@@ -1,5 +1,8 @@
|
||||
!include ../galera_4nodes.cnf
|
||||
|
||||
[mysqld]
|
||||
loose-galera-wan-restart-ist=1
|
||||
|
||||
[mysqld.1]
|
||||
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gmcast.segment=1'
|
||||
|
||||
|
@@ -15,6 +15,9 @@
|
||||
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
|
||||
--connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4
|
||||
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
|
||||
--source include/wait_condition.inc
|
||||
|
||||
# Save original auto_increment_offset values.
|
||||
--let $node_1=node_1
|
||||
--let $node_2=node_2
|
||||
@@ -22,9 +25,6 @@
|
||||
--let $node_4=node_4
|
||||
--source include/auto_increment_offset_save.inc
|
||||
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
|
||||
--source include/wait_condition.inc
|
||||
|
||||
SELECT VARIABLE_VALUE AS EXPECT_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
|
||||
--connection node_1
|
||||
|
@@ -1,5 +1,8 @@
|
||||
!include ../galera_4nodes.cnf
|
||||
|
||||
[mysqld]
|
||||
loose-galera-wan-restart-sst=1
|
||||
|
||||
[mysqld.1]
|
||||
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gmcast.segment=1'
|
||||
|
||||
|
@@ -16,6 +16,9 @@
|
||||
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
|
||||
--connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4
|
||||
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
# Save original auto_increment_offset values.
|
||||
--let $node_1=node_1
|
||||
--let $node_2=node_2
|
||||
@@ -23,8 +26,6 @@
|
||||
--let $node_4=node_4
|
||||
--source include/auto_increment_offset_save.inc
|
||||
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
--source include/wait_condition.inc
|
||||
SELECT VARIABLE_VALUE AS EXPECT_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
|
||||
--connection node_1
|
||||
|
62
mysql-test/suite/galera/t/mdev-30653.test
Normal file
62
mysql-test/suite/galera/t/mdev-30653.test
Normal file
@@ -0,0 +1,62 @@
|
||||
--source include/galera_cluster.inc
|
||||
--source include/have_aria.inc
|
||||
|
||||
create table t1 (id serial, val int) engine=innodb;
|
||||
create table t2 (id serial, val int) engine=aria;
|
||||
|
||||
insert into t1 values(1, 23);
|
||||
insert into t2 values(2, 42);
|
||||
call mtr.add_suppression("WSREP: Replication of non-transactional engines is experimental. Storage engine Aria for table 'test'.'t2' is not supported in Galera");
|
||||
|
||||
begin;
|
||||
update t1 set val=24 where id=1;
|
||||
update t2 set val=41 where id=2;
|
||||
--error ER_ERROR_DURING_COMMIT
|
||||
commit;
|
||||
|
||||
select * from t1;
|
||||
select * from t2;
|
||||
|
||||
--connection node_2
|
||||
select * from t1;
|
||||
select * from t2;
|
||||
|
||||
--connection node_1
|
||||
drop table t1, t2;
|
||||
|
||||
# case 2
|
||||
SET GLOBAL wsrep_mode=REPLICATE_ARIA;
|
||||
create table t1 (id serial, val int) engine=innodb;
|
||||
create table t2 (id serial, val int) engine=aria;
|
||||
|
||||
insert into t1 values(1, 23);
|
||||
insert into t2 values(2, 42);
|
||||
|
||||
begin;
|
||||
update t1 set val=24 where id=1;
|
||||
--error ER_ERROR_DURING_COMMIT
|
||||
update t2 set val=41 where id=2;
|
||||
commit;
|
||||
|
||||
select * from t1;
|
||||
select * from t2;
|
||||
|
||||
--connection node_2
|
||||
select * from t1;
|
||||
select * from t2;
|
||||
|
||||
--connection node_1
|
||||
drop table t1, t2;
|
||||
|
||||
# case 3
|
||||
create table t2 (id serial, val int) engine=aria;
|
||||
INSERT INTO t2 values(1,1);
|
||||
UPDATE t2 set id=5,val=6 where id = 1;
|
||||
SELECT * from t2;
|
||||
|
||||
--connection node_2
|
||||
SELECT * from t2;
|
||||
DROP TABLE t2;
|
||||
|
||||
--connection node_1
|
||||
SET GLOBAL wsrep_mode=DEFAULT;
|
@@ -400,7 +400,7 @@ create table t1(a int, index using btree (a));
|
||||
insert into t1 values (1), (2), (3);
|
||||
handler t1 open;
|
||||
handler t1 read a=(W);
|
||||
ERROR 42S22: Unknown column 'W' in 'field list'
|
||||
ERROR 42S22: Unknown column 'W' in 'HANDLER ... READ'
|
||||
handler t1 read a=(a);
|
||||
ERROR HY000: Incorrect arguments to HANDLER ... READ
|
||||
drop table t1;
|
||||
@@ -597,11 +597,11 @@ handler t1 open as t1_alias;
|
||||
handler t1_alias read a next;
|
||||
ERROR 42000: Key 'a' doesn't exist in table 't1_alias'
|
||||
handler t1_alias READ a next where inexistent > 0;
|
||||
ERROR 42S22: Unknown column 'inexistent' in 'field list'
|
||||
ERROR 42S22: Unknown column 'inexistent' in 'WHERE'
|
||||
handler t1_alias read a next;
|
||||
ERROR 42000: Key 'a' doesn't exist in table 't1_alias'
|
||||
handler t1_alias READ a next where inexistent > 0;
|
||||
ERROR 42S22: Unknown column 'inexistent' in 'field list'
|
||||
ERROR 42S22: Unknown column 'inexistent' in 'WHERE'
|
||||
handler t1_alias close;
|
||||
drop table t1;
|
||||
create temporary table t1 (a int, b char(1), key a using btree (a), key b using btree (a,b));
|
||||
|
@@ -400,7 +400,7 @@ create table t1(a int, index using btree (a));
|
||||
insert into t1 values (1), (2), (3);
|
||||
handler t1 open;
|
||||
handler t1 read a=(W);
|
||||
ERROR 42S22: Unknown column 'W' in 'field list'
|
||||
ERROR 42S22: Unknown column 'W' in 'HANDLER ... READ'
|
||||
handler t1 read a=(a);
|
||||
ERROR HY000: Incorrect arguments to HANDLER ... READ
|
||||
drop table t1;
|
||||
@@ -597,11 +597,11 @@ handler t1 open as t1_alias;
|
||||
handler t1_alias read a next;
|
||||
ERROR 42000: Key 'a' doesn't exist in table 't1_alias'
|
||||
handler t1_alias READ a next where inexistent > 0;
|
||||
ERROR 42S22: Unknown column 'inexistent' in 'field list'
|
||||
ERROR 42S22: Unknown column 'inexistent' in 'WHERE'
|
||||
handler t1_alias read a next;
|
||||
ERROR 42000: Key 'a' doesn't exist in table 't1_alias'
|
||||
handler t1_alias READ a next where inexistent > 0;
|
||||
ERROR 42S22: Unknown column 'inexistent' in 'field list'
|
||||
ERROR 42S22: Unknown column 'inexistent' in 'WHERE'
|
||||
handler t1_alias close;
|
||||
drop table t1;
|
||||
create temporary table t1 (a int, b char(1), key a using btree (a), key b using btree (a,b));
|
||||
|
@@ -400,7 +400,7 @@ create table t1(a int, index using btree (a));
|
||||
insert into t1 values (1), (2), (3);
|
||||
handler t1 open;
|
||||
handler t1 read a=(W);
|
||||
ERROR 42S22: Unknown column 'W' in 'field list'
|
||||
ERROR 42S22: Unknown column 'W' in 'HANDLER ... READ'
|
||||
handler t1 read a=(a);
|
||||
ERROR HY000: Incorrect arguments to HANDLER ... READ
|
||||
drop table t1;
|
||||
@@ -598,11 +598,11 @@ handler t1 open as t1_alias;
|
||||
handler t1_alias read a next;
|
||||
ERROR 42000: Key 'a' doesn't exist in table 't1_alias'
|
||||
handler t1_alias READ a next where inexistent > 0;
|
||||
ERROR 42S22: Unknown column 'inexistent' in 'field list'
|
||||
ERROR 42S22: Unknown column 'inexistent' in 'WHERE'
|
||||
handler t1_alias read a next;
|
||||
ERROR 42000: Key 'a' doesn't exist in table 't1_alias'
|
||||
handler t1_alias READ a next where inexistent > 0;
|
||||
ERROR 42S22: Unknown column 'inexistent' in 'field list'
|
||||
ERROR 42S22: Unknown column 'inexistent' in 'WHERE'
|
||||
handler t1_alias close;
|
||||
drop table t1;
|
||||
create temporary table t1 (a int, b char(1), key a using btree (a), key b using btree (a,b));
|
||||
|
@@ -338,9 +338,9 @@ CREATE TABLE t1 (g GEOMETRY NOT NULL, SPATIAL gi(g));
|
||||
INSERT INTO t1 VALUES (POINT(0,0));
|
||||
HANDLER t1 OPEN AS h;
|
||||
HANDLER h READ `gi`= (10);
|
||||
ERROR HY000: SPATIAL index `gi` does not support this operation
|
||||
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
|
||||
HANDLER h READ `gi`> (10);
|
||||
ERROR HY000: SPATIAL index `gi` does not support this operation
|
||||
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
|
||||
HANDLER h CLOSE;
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (w VARCHAR(100), FULLTEXT fk(w));
|
||||
@@ -352,3 +352,12 @@ HANDLER h READ `fk`> (10);
|
||||
ERROR HY000: FULLTEXT index `fk` does not support this operation
|
||||
HANDLER h CLOSE;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-35082 HANDLER with FULLTEXT keys is not always rejected
|
||||
#
|
||||
create table t (a int primary key, v text not null, fulltext(v));
|
||||
handler t open;
|
||||
handler t read v next;
|
||||
ERROR HY000: FULLTEXT index `v` does not support this operation
|
||||
drop table t;
|
||||
# End of 10.5 tests
|
||||
|
@@ -385,9 +385,9 @@ DROP TABLE t1;
|
||||
CREATE TABLE t1 (g GEOMETRY NOT NULL, SPATIAL gi(g));
|
||||
INSERT INTO t1 VALUES (POINT(0,0));
|
||||
HANDLER t1 OPEN AS h;
|
||||
--error ER_KEY_DOESNT_SUPPORT
|
||||
--error ER_CANT_CREATE_GEOMETRY_OBJECT
|
||||
HANDLER h READ `gi`= (10);
|
||||
--error ER_KEY_DOESNT_SUPPORT
|
||||
--error ER_CANT_CREATE_GEOMETRY_OBJECT
|
||||
HANDLER h READ `gi`> (10);
|
||||
HANDLER h CLOSE;
|
||||
DROP TABLE t1;
|
||||
@@ -401,3 +401,14 @@ HANDLER h READ `fk`= (10);
|
||||
HANDLER h READ `fk`> (10);
|
||||
HANDLER h CLOSE;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-35082 HANDLER with FULLTEXT keys is not always rejected
|
||||
--echo #
|
||||
create table t (a int primary key, v text not null, fulltext(v));
|
||||
handler t open;
|
||||
--error ER_KEY_DOESNT_SUPPORT
|
||||
handler t read v next;
|
||||
drop table t;
|
||||
|
||||
--echo # End of 10.5 tests
|
||||
|
@@ -400,7 +400,7 @@ create table t1(a int, index using btree (a));
|
||||
insert into t1 values (1), (2), (3);
|
||||
handler t1 open;
|
||||
handler t1 read a=(W);
|
||||
ERROR 42S22: Unknown column 'W' in 'field list'
|
||||
ERROR 42S22: Unknown column 'W' in 'HANDLER ... READ'
|
||||
handler t1 read a=(a);
|
||||
ERROR HY000: Incorrect arguments to HANDLER ... READ
|
||||
drop table t1;
|
||||
@@ -597,11 +597,11 @@ handler t1 open as t1_alias;
|
||||
handler t1_alias read a next;
|
||||
ERROR 42000: Key 'a' doesn't exist in table 't1_alias'
|
||||
handler t1_alias READ a next where inexistent > 0;
|
||||
ERROR 42S22: Unknown column 'inexistent' in 'field list'
|
||||
ERROR 42S22: Unknown column 'inexistent' in 'WHERE'
|
||||
handler t1_alias read a next;
|
||||
ERROR 42000: Key 'a' doesn't exist in table 't1_alias'
|
||||
handler t1_alias READ a next where inexistent > 0;
|
||||
ERROR 42S22: Unknown column 'inexistent' in 'field list'
|
||||
ERROR 42S22: Unknown column 'inexistent' in 'WHERE'
|
||||
handler t1_alias close;
|
||||
drop table t1;
|
||||
create temporary table t1 (a int, b char(1), key a using btree (a), key b using btree (a,b));
|
||||
|
@@ -50,4 +50,20 @@ ALTER TABLE t2 ALGORITHM=COPY, FORCE;
|
||||
affected rows: 1
|
||||
info: Records: 1 Duplicates: 0 Warnings: 0
|
||||
DROP TABLE t2, t1;
|
||||
#
|
||||
# MDEV-35237 Bulk insert fails to apply buffered
|
||||
# operation during copy alter
|
||||
#
|
||||
CREATE TABLE t1 (f1 int NOT NULL, f2 tinyint(1) NOT NULL,
|
||||
f3 varchar(80) NOT NULL, PRIMARY KEY(f1),
|
||||
KEY(f2), KEY(f3))ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES(1,1,''),(2,0,''), (4,1,'e');
|
||||
CREATE TABLE t2 (f1 int NOT NULL, f2 int NOT NULL,KEY(f1))ENGINE=InnoDB;
|
||||
INSERT INTO t2 VALUES (1,0),(1,0);
|
||||
CREATE TABLE t engine=innodb
|
||||
SELECT t2.f2 FROM t2 JOIN t1 ON t1.f1 = t2.f1 AND t1.f3 = '' AND t1.f2=1 ;
|
||||
SELECT COUNT(*) FROM t;
|
||||
COUNT(*)
|
||||
2
|
||||
DROP TABLE t1, t2, t;
|
||||
SET GLOBAL innodb_stats_persistent=@default_stats_persistent;
|
||||
|
@@ -8,8 +8,10 @@ INSERT INTO t2 VALUES(1);
|
||||
# Corrupt the pages
|
||||
SELECT * FROM t1;
|
||||
ERROR 42000: Unknown storage engine 'InnoDB'
|
||||
FOUND 1 /InnoDB: Page \[page id: space=[1-9][0-9]*, page number=3\] log sequence number 1311768467463790320 is in the future!/ in mysqld.1.err
|
||||
SELECT * FROM t1;
|
||||
Got one of the listed errors
|
||||
a
|
||||
1
|
||||
SELECT * FROM t2;
|
||||
a
|
||||
1
|
||||
@@ -27,7 +29,7 @@ SET GLOBAL innodb_flush_log_at_trx_commit=1;
|
||||
DELETE FROM t1 WHERE pk=3;
|
||||
# Kill the server
|
||||
disconnect con1;
|
||||
# Corrupt the pages
|
||||
# Corrupt the page
|
||||
SELECT * FROM t1;
|
||||
pk
|
||||
1
|
||||
|
21
mysql-test/suite/innodb/r/create_like.result
Normal file
21
mysql-test/suite/innodb/r/create_like.result
Normal file
@@ -0,0 +1,21 @@
|
||||
#
|
||||
# MDEV-35144 CREATE TABLE ... LIKE uses current innodb_compression_default instead of the create value
|
||||
#
|
||||
set innodb_compression_default= off;
|
||||
create table t1 (a int, b blob) engine=innodb;
|
||||
set innodb_compression_default= on;
|
||||
create table s_import like t1;
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`b` blob DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||
show create table s_import;
|
||||
Table Create Table
|
||||
s_import CREATE TABLE `s_import` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`b` blob DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||
DROP TABLE t1,s_import;
|
||||
# End of 10.5 tests
|
@@ -8,3 +8,13 @@ connection default;
|
||||
ERROR 70100: Query execution was interrupted
|
||||
CREATE TABLE t1 (a SERIAL) ENGINE=InnoDB;
|
||||
DROP TABLE t1;
|
||||
# End of 10.2 tests
|
||||
#
|
||||
# MDEV-35236 Assertion `(mem_root->flags & 4) == 0' failed in safe_lexcstrdup_root
|
||||
#
|
||||
prepare stmt from 'create or replace table t engine=innodb select 1 as f';
|
||||
set innodb_compression_default=on;
|
||||
execute stmt;
|
||||
execute stmt;
|
||||
drop table t;
|
||||
# End of 10.5 tests
|
||||
|
@@ -21,8 +21,8 @@ connection default;
|
||||
flush table t1 for export;
|
||||
# Kill the server
|
||||
# restart
|
||||
FOUND 1 /InnoDB: Restoring page \[page id: space=[1-9][0-9]*, page number=0\] of datafile/ in mysqld.1.err
|
||||
FOUND 1 /InnoDB: Recovered page \[page id: space=[1-9][0-9]*, page number=3\]/ in mysqld.1.err
|
||||
FOUND 1 /InnoDB: Recovered page \[page id: space=[1-9][0-9]*, page number=0\]/ in mysqld.1.err
|
||||
# restart
|
||||
XA ROLLBACK 'x';
|
||||
check table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
@@ -44,7 +44,7 @@ connection default;
|
||||
flush table t1 for export;
|
||||
# Kill the server
|
||||
# restart
|
||||
FOUND 1 /InnoDB: Restoring page \[page id: space=[1-9][0-9]*, page number=0\] of datafile/ in mysqld.1.err
|
||||
FOUND 4 /InnoDB: Recovered page \[page id: space=[1-9][0-9]*, page number=[03]\]/ in mysqld.1.err
|
||||
XA ROLLBACK 'x';
|
||||
check table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
|
@@ -37,7 +37,7 @@ set global innodb_buf_flush_list_now = 1;
|
||||
# Make the 1st page (page_no=0) and 2nd page (page_no=1)
|
||||
# of the system tablespace all zeroes.
|
||||
# restart
|
||||
FOUND 1 /InnoDB: Restoring page \[page id: space=0, page number=0\] of datafile/ in mysqld.1.err
|
||||
FOUND 1 /InnoDB: Recovered page \[page id: space=0, page number=0\]/ in mysqld.1.err
|
||||
FOUND 1 /InnoDB: Recovered page \[page id: space=0, page number=1\]/ in mysqld.1.err
|
||||
check table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
@@ -66,7 +66,7 @@ set global innodb_buf_flush_list_now = 1;
|
||||
# Kill the server
|
||||
# Corrupt the 1st page (page_no=0) and 2nd page of the system tablespace.
|
||||
# restart
|
||||
FOUND 2 /InnoDB: Restoring page \[page id: space=0, page number=0\] of datafile/ in mysqld.1.err
|
||||
FOUND 2 /InnoDB: Recovered page \[page id: space=0, page number=0\]/ in mysqld.1.err
|
||||
FOUND 2 /InnoDB: Recovered page \[page id: space=0, page number=1\]/ in mysqld.1.err
|
||||
check table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
|
@@ -9,8 +9,8 @@ call mtr.add_suppression("InnoDB: Page for tablespace ");
|
||||
call mtr.add_suppression("InnoDB: Invalid FSP_SPACE_FLAGS=");
|
||||
call mtr.add_suppression("InnoDB: Unknown index id .* on page");
|
||||
call mtr.add_suppression("InnoDB: Cannot save statistics for table `test`\\.`t1` because the \\.ibd file is missing");
|
||||
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*ibdata1' page");
|
||||
call mtr.add_suppression("InnoDB: File '.*ibdata1' is corrupted");
|
||||
call mtr.add_suppression("InnoDB: Failed to read page \\d+ from file '.*test/t1\\.ibd'");
|
||||
call mtr.add_suppression("InnoDB: File '.*(ibdata1|t1\\.ibd)' is corrupted");
|
||||
FLUSH TABLES;
|
||||
CREATE TABLE t1 (c1 INT) ENGINE = InnoDB;
|
||||
INSERT INTO t1 VALUES(1),(2),(3);
|
||||
|
@@ -1305,7 +1305,7 @@ ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fail
|
||||
update t1,t2,t3 set t3.id=5, t2.id=6, t1.id=7 where t1.id =1 and t2.id = t1.id and t3.id = t2.id;
|
||||
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`))
|
||||
update t3 set t3.id=7 where t1.id =1 and t2.id = t1.id and t3.id = t2.id;
|
||||
ERROR 42S22: Unknown column 't1.id' in 'where clause'
|
||||
ERROR 42S22: Unknown column 't1.id' in 'WHERE'
|
||||
drop table t3,t2,t1;
|
||||
CREATE TABLE t1 (
|
||||
c1 VARCHAR(8), c2 VARCHAR(8),
|
||||
|
@@ -2556,7 +2556,7 @@ INSERT INTO t1 VALUES (1),(2),(3),(4);
|
||||
INSERT INTO t3 SELECT * FROM t1;
|
||||
** An error in a trigger causes rollback of the statement.
|
||||
DELETE t1 FROM t3 LEFT JOIN t1 ON t1.i=t3.i;
|
||||
ERROR 42S22: Unknown column 'error_happens_here' in 'field list'
|
||||
ERROR 42S22: Unknown column 'error_happens_here' in 'SET'
|
||||
SELECT @a,@b;
|
||||
@a @b
|
||||
EXECUTED TRIGGER
|
||||
@@ -2570,7 +2570,7 @@ i i
|
||||
4 4
|
||||
** Same happens with the IGNORE option
|
||||
DELETE IGNORE t1 FROM t3 LEFT JOIN t1 ON t1.i=t3.i;
|
||||
ERROR 42S22: Unknown column 'error_happens_here' in 'field list'
|
||||
ERROR 42S22: Unknown column 'error_happens_here' in 'SET'
|
||||
SELECT * FROM t2;
|
||||
a
|
||||
SELECT * FROM t1 LEFT JOIN t3 ON t1.i=t3.i;
|
||||
|
@@ -552,18 +552,18 @@ ALTER TABLE t1 MODIFY b TEXT FIRST, ALGORITHM=INSTANT;
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_alter_column_allowed=never. Try ALGORITHM=INPLACE
|
||||
SET GLOBAL innodb_instant_alter_column_allowed = add_last;
|
||||
ALTER TABLE t1 MODIFY b TEXT FIRST, ALGORITHM=INSTANT;
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_atler_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_alter_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ALTER TABLE t1 ADD d TEXT AFTER a, ALGORITHM=INSTANT;
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_atler_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_alter_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
SET GLOBAL innodb_instant_alter_column_allowed = add_drop_reorder;
|
||||
ALTER TABLE t1 MODIFY b TEXT FIRST, ALGORITHM=INSTANT;
|
||||
SET GLOBAL innodb_instant_alter_column_allowed = add_last;
|
||||
ALTER TABLE t1 MODIFY a INT DEFAULT 1, ALGORITHM=INSTANT;
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_atler_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_alter_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ALTER TABLE t1 ADD d TEXT AFTER a, ALGORITHM=INSTANT;
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_atler_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_alter_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ALTER TABLE t1 MODIFY a INT DEFAULT 0, ALGORITHM=INSTANT;
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_atler_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_alter_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ALTER TABLE t1 MODIFY a INT DEFAULT 0;
|
||||
affected rows: 0
|
||||
info: Records: 0 Duplicates: 0 Warnings: 0
|
||||
@@ -1486,18 +1486,18 @@ ALTER TABLE t1 MODIFY b TEXT FIRST, ALGORITHM=INSTANT;
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_alter_column_allowed=never. Try ALGORITHM=INPLACE
|
||||
SET GLOBAL innodb_instant_alter_column_allowed = add_last;
|
||||
ALTER TABLE t1 MODIFY b TEXT FIRST, ALGORITHM=INSTANT;
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_atler_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_alter_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ALTER TABLE t1 ADD d TEXT AFTER a, ALGORITHM=INSTANT;
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_atler_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_alter_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
SET GLOBAL innodb_instant_alter_column_allowed = add_drop_reorder;
|
||||
ALTER TABLE t1 MODIFY b TEXT FIRST, ALGORITHM=INSTANT;
|
||||
SET GLOBAL innodb_instant_alter_column_allowed = add_last;
|
||||
ALTER TABLE t1 MODIFY a INT DEFAULT 1, ALGORITHM=INSTANT;
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_atler_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_alter_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ALTER TABLE t1 ADD d TEXT AFTER a, ALGORITHM=INSTANT;
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_atler_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_alter_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ALTER TABLE t1 MODIFY a INT DEFAULT 0, ALGORITHM=INSTANT;
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_atler_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_alter_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ALTER TABLE t1 MODIFY a INT DEFAULT 0;
|
||||
affected rows: 0
|
||||
info: Records: 0 Duplicates: 0 Warnings: 0
|
||||
@@ -2420,18 +2420,18 @@ ALTER TABLE t1 MODIFY b TEXT FIRST, ALGORITHM=INSTANT;
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_alter_column_allowed=never. Try ALGORITHM=INPLACE
|
||||
SET GLOBAL innodb_instant_alter_column_allowed = add_last;
|
||||
ALTER TABLE t1 MODIFY b TEXT FIRST, ALGORITHM=INSTANT;
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_atler_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_alter_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ALTER TABLE t1 ADD d TEXT AFTER a, ALGORITHM=INSTANT;
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_atler_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_alter_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
SET GLOBAL innodb_instant_alter_column_allowed = add_drop_reorder;
|
||||
ALTER TABLE t1 MODIFY b TEXT FIRST, ALGORITHM=INSTANT;
|
||||
SET GLOBAL innodb_instant_alter_column_allowed = add_last;
|
||||
ALTER TABLE t1 MODIFY a INT DEFAULT 1, ALGORITHM=INSTANT;
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_atler_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_alter_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ALTER TABLE t1 ADD d TEXT AFTER a, ALGORITHM=INSTANT;
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_atler_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_alter_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ALTER TABLE t1 MODIFY a INT DEFAULT 0, ALGORITHM=INSTANT;
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_atler_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_alter_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ALTER TABLE t1 MODIFY a INT DEFAULT 0;
|
||||
affected rows: 0
|
||||
info: Records: 0 Duplicates: 0 Warnings: 0
|
||||
|
@@ -526,6 +526,15 @@ c INT as (b) VIRTUAL)ENGINE=InnoDB CHARACTER SET utf32;
|
||||
ALTER TABLE t1 DROP COLUMN a;
|
||||
ALTER TABLE t1 DROP COLUMN c;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-35122 Incorrect NULL value handling for instantly
|
||||
# dropped BLOB columns
|
||||
#
|
||||
CREATE TABLE t1 (c1 INT, c2 BLOB, c3 BLOB NOT NULL) ROW_FORMAT=REDUNDANT,ENGINE=InnoDB;
|
||||
ALTER TABLE t1 DROP c2;
|
||||
ALTER TABLE t1 DROP c3;
|
||||
INSERT INTO t1 VALUES(1);
|
||||
DROP TABLE t1;
|
||||
# End of 10.5 tests
|
||||
# End of 10.6 tests
|
||||
SET GLOBAL innodb_stats_persistent = @save_stats_persistent;
|
||||
|
@@ -134,8 +134,10 @@ BEGIN;
|
||||
INSERT INTO t SET a=2;
|
||||
connection consistent;
|
||||
START TRANSACTION WITH CONSISTENT SNAPSHOT;
|
||||
SAVEPOINT sp1;
|
||||
SELECT * FROM t FORCE INDEX (b) FOR UPDATE;
|
||||
ERROR HY000: Record has changed since last read in table 't'
|
||||
SAVEPOINT sp1;
|
||||
connection con_weird;
|
||||
START TRANSACTION WITH CONSISTENT SNAPSHOT;
|
||||
SELECT * FROM t FORCE INDEX (b) FOR UPDATE;
|
||||
@@ -155,3 +157,4 @@ a b
|
||||
disconnect consistent;
|
||||
connection default;
|
||||
DROP TABLE t;
|
||||
# End of 10.6 tests
|
||||
|
@@ -49,6 +49,7 @@ SELECT * FROM INFORMATION_SCHEMA.ENGINES
|
||||
WHERE engine = 'innodb'
|
||||
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
||||
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
|
||||
FOUND 1 /InnoDB: Could not measure the size of single-table tablespace file '.*test/t2\.ibd'/ in mysqld.1.err
|
||||
# restart
|
||||
SELECT * FROM INFORMATION_SCHEMA.ENGINES
|
||||
WHERE engine = 'innodb'
|
||||
|
@@ -15,6 +15,7 @@ FROM INFORMATION_SCHEMA.GLOBAL_STATUS
|
||||
WHERE VARIABLE_NAME='Innodb_buffer_pool_pages_dirty';
|
||||
set debug_dbug="d,trigger_garbage_collection";
|
||||
SET GLOBAL innodb_buffer_pool_size=@@innodb_buffer_pool_size;
|
||||
FOUND 1 /[Mm]emory pressure.*/ in mysqld.1.err
|
||||
SELECT CAST(VARIABLE_VALUE AS INTEGER) < @dirty_prev AS LESS_DIRTY_IS_GOOD
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_STATUS
|
||||
WHERE VARIABLE_NAME='Innodb_buffer_pool_pages_dirty';
|
||||
|
@@ -0,0 +1,6 @@
|
||||
create table t_compressed(b longblob) engine=InnoDB page_compressed=1;
|
||||
insert into t_compressed values(repeat(1,1000000));
|
||||
select allocated_size < file_size from information_schema.innodb_sys_tablespaces where name='test/t_compressed';
|
||||
allocated_size < file_size
|
||||
1
|
||||
drop table t_compressed;
|
@@ -6,3 +6,4 @@ FOUND 1 /page id mismatch/ in result.log
|
||||
InnoDB 0 transactions not purged
|
||||
drop table t1;
|
||||
call mtr.add_suppression("InnoDB: Failed to read page 3 from file '.*test/t1\\.ibd': Page read from tablespace is corrupted\\.");
|
||||
call mtr.add_suppression("InnoDB: File '.*t1\\.ibd' is corrupted");
|
||||
|
@@ -1,5 +1,6 @@
|
||||
FLUSH TABLES;
|
||||
call mtr.add_suppression("Found 1 prepared XA transactions");
|
||||
call mtr.add_suppression("InnoDB: Cannot free the unused segments in system tablespace because a previous shutdown was not with innodb_fast_shutdown=0 or XA PREPARE transactions exist");
|
||||
#
|
||||
# MDEV-13797 InnoDB may hang if shutdown is initiated soon after startup
|
||||
# while rolling back recovered incomplete transactions
|
||||
|
@@ -19,13 +19,20 @@ InnoDB 0 transactions not purged
|
||||
SELECT NAME, FILE_SIZE FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES WHERE SPACE = 0;
|
||||
NAME FILE_SIZE
|
||||
innodb_system 540016640
|
||||
# restart: --debug_dbug=+d,shrink_buffer_pool_full
|
||||
# restart: --debug_dbug=+d,traversal_extent_fail
|
||||
FOUND 1 /\[Warning\] InnoDB: Cannot shrink the system tablespace/ in mysqld.1.err
|
||||
SELECT * FROM INFORMATION_SCHEMA.ENGINES
|
||||
WHERE engine = 'innodb'
|
||||
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
||||
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
|
||||
InnoDB YES Supports transactions, row-level locking, foreign keys and encryption for tables YES YES YES
|
||||
# restart: --debug_dbug=+d,shrink_buffer_pool_full
|
||||
FOUND 2 /\[Warning\] InnoDB: Cannot shrink the system tablespace/ in mysqld.1.err
|
||||
SELECT * FROM INFORMATION_SCHEMA.ENGINES
|
||||
WHERE engine = 'innodb'
|
||||
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
||||
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
|
||||
InnoDB YES Supports transactions, row-level locking, foreign keys and encryption for tables YES YES YES
|
||||
# restart: --debug_dbug=+d,mtr_log_max_size
|
||||
FOUND 1 /\[ERROR\] InnoDB: Cannot shrink the system tablespace/ in mysqld.1.err
|
||||
SELECT * FROM INFORMATION_SCHEMA.ENGINES
|
||||
|
@@ -151,7 +151,7 @@ t1 CREATE TEMPORARY TABLE `t1` (
|
||||
UNIQUE KEY `pri_index` (`t1_i`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||
select * from t1 where t1_f >= 2.5;
|
||||
ERROR 42S22: Unknown column 't1_f' in 'where clause'
|
||||
ERROR 42S22: Unknown column 't1_f' in 'WHERE'
|
||||
alter table t1 add index sec_index2(t1_c), algorithm=inplace;
|
||||
ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY
|
||||
drop table t1;
|
||||
|
25
mysql-test/suite/innodb/r/undo_leak.result
Normal file
25
mysql-test/suite/innodb/r/undo_leak.result
Normal file
@@ -0,0 +1,25 @@
|
||||
# restart: --debug_dbug=d,undo_segment_leak
|
||||
SET GLOBAL INNODB_FILE_PER_TABLE=0;
|
||||
Warnings:
|
||||
Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
|
||||
CREATE TABLE t1(f1 INT NOT NULL, f2 INT NOT NULL)ENGINE=InnoDB;
|
||||
INSERT INTO t1 SELECT seq, seq FROM seq_1_to_4096;
|
||||
INSERT INTO t1 SELECT seq, seq FROM seq_1_to_4096;
|
||||
INSERT INTO t1 SELECT seq, seq FROM seq_1_to_4096;
|
||||
INSERT INTO t1 SELECT seq, seq FROM seq_1_to_4096;
|
||||
INSERT INTO t1 SELECT seq, seq FROM seq_1_to_4096;
|
||||
INSERT INTO t1 SELECT seq, seq FROM seq_1_to_4096;
|
||||
UPDATE t1 SET f1 = f1 + 1 WHERE f1 > 1000;
|
||||
UPDATE t1 SET f2 = f2 + 1 WHERE f1 > 1000;
|
||||
UPDATE t1 SET f1 = f2 + 1 WHERE f1 > 1000;
|
||||
UPDATE t1 SET f2 = f1 + 1 WHERE f1 > 1000;
|
||||
DELETE FROM t1;
|
||||
DROP TABLE t1;
|
||||
set GLOBAL innodb_fast_shutdown=0;
|
||||
SELECT NAME, FILE_SIZE FROM information_schema.innodb_sys_tablespaces WHERE SPACE = 0;
|
||||
NAME FILE_SIZE
|
||||
innodb_system 79691776
|
||||
# restart
|
||||
SELECT NAME, FILE_SIZE FROM information_schema.innodb_sys_tablespaces WHERE SPACE = 0;
|
||||
NAME FILE_SIZE
|
||||
innodb_system 12582912
|
94
mysql-test/suite/innodb/r/undo_leak_fail.result
Normal file
94
mysql-test/suite/innodb/r/undo_leak_fail.result
Normal file
@@ -0,0 +1,94 @@
|
||||
call mtr.add_suppression("InnoDB: Cannot free the unused segments in system tablespace because a previous shutdown was not with innodb_fast_shutdown=0");
|
||||
call mtr.add_suppression("InnoDB: :autoshrink failed to read the used segment");
|
||||
call mtr.add_suppression("InnoDB: :autoshrink failed due to .* in FSP_SEG_INODES_FULL list");
|
||||
call mtr.add_suppression("InnoDB: :autoshrink failed due to .* in FSP_SEG_INODES_FREE list");
|
||||
call mtr.add_suppression("InnoDB: :autoshrink failed to free the segment");
|
||||
call mtr.add_suppression("Found .* prepared XA transactions");
|
||||
SELECT NAME, FILE_SIZE FROM information_schema.innodb_sys_tablespaces WHERE SPACE = 0;
|
||||
NAME FILE_SIZE
|
||||
innodb_system 10485760
|
||||
SET GLOBAL INNODB_FILE_PER_TABLE=0;
|
||||
Warnings:
|
||||
Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
|
||||
CREATE TABLE t1(f1 INT NOT NULL, f2 INT NOT NULL)STATS_PERSISTENT=0, ENGINE=InnoDB;
|
||||
XA START 'x';
|
||||
insert into t1 values (1, 1);
|
||||
XA END 'x';
|
||||
XA PREPARE 'x';
|
||||
set GLOBAL innodb_fast_shutdown=0;
|
||||
# restart
|
||||
# Fail to free the segment due to XA PREPARE transaction
|
||||
FOUND 2 /InnoDB: Cannot free the unused segments in system tablespace because a previous shutdown was not with innodb_fast_shutdown=0/ in mysqld.1.err
|
||||
XA COMMIT 'x';
|
||||
DROP TABLE t1;
|
||||
# restart: --debug_dbug=d,undo_segment_leak
|
||||
SET GLOBAL INNODB_FILE_PER_TABLE=0;
|
||||
Warnings:
|
||||
Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
|
||||
CREATE TABLE t1(f1 INT NOT NULL, f2 INT NOT NULL)STATS_PERSISTENT=0, ENGINE=InnoDB;
|
||||
INSERT INTO t1 SELECT seq, seq FROM seq_1_to_4096;
|
||||
INSERT INTO t1 SELECT seq, seq FROM seq_1_to_4096;
|
||||
INSERT INTO t1 SELECT seq, seq FROM seq_1_to_4096;
|
||||
INSERT INTO t1 SELECT seq, seq FROM seq_1_to_4096;
|
||||
INSERT INTO t1 SELECT seq, seq FROM seq_1_to_4096;
|
||||
INSERT INTO t1 SELECT seq, seq FROM seq_1_to_4096;
|
||||
UPDATE t1 SET f1 = f1 + 1 WHERE f1 > 1000;
|
||||
UPDATE t1 SET f2 = f2 + 1 WHERE f1 > 1000;
|
||||
UPDATE t1 SET f1 = f2 + 1 WHERE f1 > 1000;
|
||||
UPDATE t1 SET f2 = f1 + 1 WHERE f1 > 1000;
|
||||
DELETE FROM t1;
|
||||
DROP TABLE t1;
|
||||
SELECT NAME, FILE_SIZE FROM information_schema.innodb_sys_tablespaces WHERE SPACE = 0;
|
||||
NAME FILE_SIZE
|
||||
innodb_system 77594624
|
||||
# restart: --debug_dbug=d,unused_undo_free_fail_1
|
||||
# Fail to free the segment due to previous shutdown
|
||||
FOUND 4 /InnoDB: Cannot free the unused segments in system tablespace because a previous shutdown was not with innodb_fast_shutdown=0/ in mysqld.1.err
|
||||
SELECT NAME, FILE_SIZE FROM information_schema.innodb_sys_tablespaces WHERE SPACE = 0;
|
||||
NAME FILE_SIZE
|
||||
innodb_system 15728640
|
||||
SET GLOBAL innodb_fast_shutdown= 0;
|
||||
# Fail to free the segment while finding the used segments
|
||||
# restart: --debug_dbug=d,unused_undo_free_fail_2
|
||||
SELECT IF(file_size>10485760,'ok',file_size) FROM information_schema.innodb_sys_tablespaces WHERE space=0;
|
||||
IF(file_size>10485760,'ok',file_size)
|
||||
ok
|
||||
FOUND 1 /InnoDB: :autoshrink failed to read the used segment/ in mysqld.1.err
|
||||
FOUND 1 /InnoDB: :autoshrink failed due to .* in FSP_SEG_INODES_FULL list/ in mysqld.1.err
|
||||
SET GLOBAL innodb_fast_shutdown= 0;
|
||||
# Fail to free the segment while finding the used segments
|
||||
# restart: --debug_dbug=d,unused_undo_free_fail_3
|
||||
SELECT IF(file_size>10485760,'ok',file_size) FROM information_schema.innodb_sys_tablespaces WHERE space=0;
|
||||
IF(file_size>10485760,'ok',file_size)
|
||||
ok
|
||||
FOUND 1 /InnoDB: :autoshrink failed due to .* in FSP_SEG_INODES_FREE list/ in mysqld.1.err
|
||||
SET GLOBAL innodb_fast_shutdown= 0;
|
||||
# Fail to free the segment while freeing the unused segments
|
||||
# restart: --debug_dbug=d,unused_undo_free_fail_4
|
||||
SELECT IF(file_size>10485760,'ok',file_size) FROM information_schema.innodb_sys_tablespaces WHERE space=0;
|
||||
IF(file_size>10485760,'ok',file_size)
|
||||
ok
|
||||
FOUND 1 /InnoDB: :autoshrink failed to free the segment .* in page .*/ in mysqld.1.err
|
||||
SET GLOBAL innodb_fast_shutdown= 0;
|
||||
# Fail to free the segment while freeing the used segments
|
||||
# restart: --debug_dbug=d,unused_undo_free_fail_5
|
||||
SELECT IF(file_size>10485760,'ok',file_size) FROM information_schema.innodb_sys_tablespaces WHERE space=0;
|
||||
IF(file_size>10485760,'ok',file_size)
|
||||
ok
|
||||
FOUND 1 /InnoDB: :autoshrink failed to free the segment .* in page .*/ in mysqld.1.err
|
||||
SET GLOBAL innodb_fast_shutdown= 0;
|
||||
# restart
|
||||
SELECT NAME, FILE_SIZE FROM information_schema.innodb_sys_tablespaces WHERE SPACE = 0;
|
||||
NAME FILE_SIZE
|
||||
innodb_system 10485760
|
||||
# Fail to reset the TRX_SYS_FSEG_HEADER during undo tablespace
|
||||
# reinitialization. garbage_collect() shouldn't free the
|
||||
# TRX_SYS_FSEG_HEADER index node
|
||||
set global innodb_fast_shutdown=0;
|
||||
# restart: --innodb_undo_tablespaces=2 --debug_dbug=d,sys_fseg_header_fail
|
||||
FOUND 1 /InnoDB: :autoshrink freed the segment .* in page .*/ in mysqld.1.err
|
||||
set global innodb_fast_shutdown=0;
|
||||
# restart
|
||||
SELECT NAME, FILE_SIZE FROM information_schema.innodb_sys_tablespaces WHERE SPACE = 0;
|
||||
NAME FILE_SIZE
|
||||
innodb_system 10485760
|
@@ -12,7 +12,7 @@ set global innodb_fil_make_page_dirty_debug = 1;
|
||||
SET GLOBAL innodb_buf_flush_list_now = 1;
|
||||
# Kill the server
|
||||
# restart: --debug_dbug=+d,ib_log_checkpoint_avoid_hard --innodb_flush_sync=0
|
||||
FOUND 1 /Restoring page \[page id: space=1, page number=0\] of datafile '.*undo001' from the doublewrite buffer./ in mysqld.1.err
|
||||
FOUND 1 /Recovered page \[page id: space=1, page number=0\] to '.*undo001' from the doublewrite buffer\./ in mysqld.1.err
|
||||
check table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
|
@@ -0,0 +1,66 @@
|
||||
SET @old_innodb_enable_xap_unlock_unmodified_for_primary_debug=
|
||||
@@GLOBAL.innodb_enable_xap_unlock_unmodified_for_primary_debug;
|
||||
SET GLOBAL innodb_enable_xap_unlock_unmodified_for_primary_debug= 1;
|
||||
BEGIN NOT ATOMIC
|
||||
DECLARE c TEXT DEFAULT(
|
||||
SELECT CONCAT(
|
||||
'CREATE TABLE t1(pk',
|
||||
GROUP_CONCAT(seq SEPARATOR ' INT, pk'), ' INT, a',
|
||||
GROUP_CONCAT(seq SEPARATOR ' INT, a'), ' INT, b',
|
||||
GROUP_CONCAT(seq SEPARATOR ' INT, b'), ' INT, c INT, PRIMARY KEY(pk',
|
||||
GROUP_CONCAT(seq SEPARATOR ', pk'), '), INDEX i1(a',
|
||||
GROUP_CONCAT(seq SEPARATOR ', a'), '), INDEX i2(b',
|
||||
GROUP_CONCAT(seq SEPARATOR ', b'), ')) ENGINE=InnoDB;')
|
||||
FROM seq_1_to_32);
|
||||
EXECUTE IMMEDIATE c;
|
||||
END;
|
||||
$$
|
||||
BEGIN NOT ATOMIC
|
||||
DECLARE c TEXT DEFAULT(
|
||||
SELECT CONCAT(
|
||||
'INSERT INTO t1 VALUES (',
|
||||
GROUP_CONCAT('1' SEPARATOR ','), ',',
|
||||
GROUP_CONCAT('1' SEPARATOR ','), ',',
|
||||
GROUP_CONCAT('1' SEPARATOR ','), ',0), (',
|
||||
GROUP_CONCAT('2' SEPARATOR ','), ',',
|
||||
GROUP_CONCAT('1' SEPARATOR ','), ',',
|
||||
GROUP_CONCAT('2' SEPARATOR ','), ',0), (',
|
||||
GROUP_CONCAT('3' SEPARATOR ','), ',',
|
||||
GROUP_CONCAT('2' SEPARATOR ','), ',',
|
||||
GROUP_CONCAT('1' SEPARATOR ','), ',0), (',
|
||||
GROUP_CONCAT('4' SEPARATOR ','), ',',
|
||||
GROUP_CONCAT('2' SEPARATOR ','), ',',
|
||||
GROUP_CONCAT('2' SEPARATOR ','), ',0);')
|
||||
FROM seq_1_to_32);
|
||||
EXECUTE IMMEDIATE c;
|
||||
END;
|
||||
$$
|
||||
SET @old_timeout= @@GLOBAL.innodb_lock_wait_timeout;
|
||||
SET GLOBAL innodb_lock_wait_timeout= 1;
|
||||
XA START "t1";
|
||||
UPDATE t1 FORCE INDEX (i2) SET c=c+1 WHERE a1=1 AND b1=1;
|
||||
XA END "t1";
|
||||
XA PREPARE "t1";
|
||||
connect con1,localhost,root,,;
|
||||
SELECT a1, b1, c FROM t1 FORCE INDEX (i1) WHERE a1=2 AND b1=1 FOR UPDATE;
|
||||
a1 b1 c
|
||||
2 1 0
|
||||
disconnect con1;
|
||||
connection default;
|
||||
XA COMMIT "t1";
|
||||
SET GLOBAL innodb_enable_xap_unlock_unmodified_for_primary_debug=
|
||||
@old_innodb_enable_xap_unlock_unmodified_for_primary_debug;
|
||||
SET GLOBAL innodb_lock_wait_timeout= @old_timeout;
|
||||
BEGIN NOT ATOMIC
|
||||
DECLARE c TEXT DEFAULT(
|
||||
SELECT CONCAT(
|
||||
'ALTER TABLE t1 ADD COLUMN d',
|
||||
GROUP_CONCAT(seq SEPARATOR ' INT, ADD COLUMN d'),
|
||||
' INT, ADD INDEX i3(d',
|
||||
GROUP_CONCAT(seq SEPARATOR ', d'), ');')
|
||||
FROM seq_1_to_33);
|
||||
EXECUTE IMMEDIATE c;
|
||||
END;
|
||||
$$
|
||||
ERROR 42000: Too many key parts specified; max 32 parts allowed
|
||||
DROP TABLE t1;
|
68
mysql-test/suite/innodb/r/xa_unlock_unmodified.result
Normal file
68
mysql-test/suite/innodb/r/xa_unlock_unmodified.result
Normal file
@@ -0,0 +1,68 @@
|
||||
SET @old_innodb_enable_xap_unlock_unmodified_for_primary_debug=
|
||||
@@GLOBAL.innodb_enable_xap_unlock_unmodified_for_primary_debug;
|
||||
SET GLOBAL innodb_enable_xap_unlock_unmodified_for_primary_debug= 1;
|
||||
SET @saved_dbug = @@GLOBAL.debug_dbug;
|
||||
CREATE TABLE t(id INT PRIMARY KEY) ENGINE=InnoDB STATS_PERSISTENT=0;
|
||||
InnoDB 0 transactions not purged
|
||||
INSERT INTO t VALUES (10), (20), (30);
|
||||
connect prevent_purge,localhost,root,,;
|
||||
start transaction with consistent snapshot;
|
||||
connection default;
|
||||
DELETE FROM t WHERE id = 20;
|
||||
SET @@GLOBAL.debug_dbug=
|
||||
"+d,enable_row_purge_remove_clust_if_poss_low_sync_point";
|
||||
XA START '1';
|
||||
UPDATE t SET id=40 WHERE id=30;
|
||||
XA END '1';
|
||||
connection prevent_purge;
|
||||
COMMIT;
|
||||
SET DEBUG_SYNC=
|
||||
'now WAIT_FOR row_purge_remove_clust_if_poss_low_before_delete';
|
||||
SET @@GLOBAL.debug_dbug=
|
||||
"-d,enable_row_purge_remove_clust_if_poss_low_sync_point";
|
||||
connection default;
|
||||
SET DEBUG_SYNC=
|
||||
"lock_rec_unlock_unmodified_start SIGNAL lock_sys_latched WAIT_FOR cont";
|
||||
XA PREPARE '1';
|
||||
connection prevent_purge;
|
||||
SET DEBUG_SYNC= 'now SIGNAL row_purge_remove_clust_if_poss_low_cont';
|
||||
SET DEBUG_SYNC= 'now SIGNAL cont';
|
||||
disconnect prevent_purge;
|
||||
connection default;
|
||||
XA COMMIT '1';
|
||||
SET DEBUG_SYNC="RESET";
|
||||
TRUNCATE TABLE t;
|
||||
InnoDB 0 transactions not purged
|
||||
INSERT INTO t VALUES (10), (20), (30);
|
||||
connect prevent_purge,localhost,root,,;
|
||||
start transaction with consistent snapshot;
|
||||
connection default;
|
||||
DELETE FROM t WHERE id = 20;
|
||||
SET @@GLOBAL.debug_dbug=
|
||||
"+d,enable_row_purge_remove_clust_if_poss_low_sync_point";
|
||||
SET @@GLOBAL.debug_dbug="+d,skip_lock_release_on_prepare_try";
|
||||
XA START '1';
|
||||
UPDATE t SET id=40 WHERE id=30;
|
||||
XA END '1';
|
||||
connection prevent_purge;
|
||||
COMMIT;
|
||||
SET DEBUG_SYNC=
|
||||
'now WAIT_FOR row_purge_remove_clust_if_poss_low_before_delete';
|
||||
SET @@GLOBAL.debug_dbug=
|
||||
"-d,enable_row_purge_remove_clust_if_poss_low_sync_point";
|
||||
connection default;
|
||||
SET DEBUG_SYNC=
|
||||
"lock_rec_unlock_unmodified_start SIGNAL lock_sys_latched WAIT_FOR cont";
|
||||
XA PREPARE '1';
|
||||
connection prevent_purge;
|
||||
SET DEBUG_SYNC= 'now SIGNAL row_purge_remove_clust_if_poss_low_cont';
|
||||
SET DEBUG_SYNC= 'now SIGNAL cont';
|
||||
disconnect prevent_purge;
|
||||
connection default;
|
||||
XA COMMIT '1';
|
||||
SET DEBUG_SYNC="RESET";
|
||||
TRUNCATE TABLE t;
|
||||
SET @@GLOBAL.debug_dbug = @saved_dbug;
|
||||
DROP TABLE t;
|
||||
SET GLOBAL innodb_enable_xap_unlock_unmodified_for_primary_debug=
|
||||
@old_innodb_enable_xap_unlock_unmodified_for_primary_debug;
|
@@ -68,4 +68,19 @@ ALTER TABLE t1 ALGORITHM=COPY, FORCE;
|
||||
ALTER TABLE t2 ALGORITHM=COPY, FORCE;
|
||||
--disable_info
|
||||
DROP TABLE t2, t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-35237 Bulk insert fails to apply buffered
|
||||
--echo # operation during copy alter
|
||||
--echo #
|
||||
CREATE TABLE t1 (f1 int NOT NULL, f2 tinyint(1) NOT NULL,
|
||||
f3 varchar(80) NOT NULL, PRIMARY KEY(f1),
|
||||
KEY(f2), KEY(f3))ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES(1,1,''),(2,0,''), (4,1,'e');
|
||||
CREATE TABLE t2 (f1 int NOT NULL, f2 int NOT NULL,KEY(f1))ENGINE=InnoDB;
|
||||
INSERT INTO t2 VALUES (1,0),(1,0);
|
||||
CREATE TABLE t engine=innodb
|
||||
SELECT t2.f2 FROM t2 JOIN t1 ON t1.f1 = t2.f1 AND t1.f3 = '' AND t1.f2=1 ;
|
||||
SELECT COUNT(*) FROM t;
|
||||
DROP TABLE t1, t2, t;
|
||||
SET GLOBAL innodb_stats_persistent=@default_stats_persistent;
|
||||
|
@@ -4,15 +4,18 @@
|
||||
call mtr.add_suppression("InnoDB: Plugin initialization aborted");
|
||||
call mtr.add_suppression("Plugin 'InnoDB' init function returned error");
|
||||
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed");
|
||||
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*test.t1\\.ibd' page");
|
||||
call mtr.add_suppression("InnoDB: Failed to read page 3 from file '.*test.t1\\.ibd': Page read from tablespace is corrupted.");
|
||||
call mtr.add_suppression("InnoDB: (Unable to apply log to|Discarding log for) corrupted page .*, page number=3\\]");
|
||||
call mtr.add_suppression("Table `test`.`t1` is corrupted. Please drop the table and recreate.");
|
||||
call mtr.add_suppression("InnoDB: Unable to apply log to corrupted page 3 in file .*test.t1\\.ibd");
|
||||
call mtr.add_suppression("Table `test`.`t1` is corrupted. Please drop the table and recreate\\.");
|
||||
call mtr.add_suppression("InnoDB: File '.*test/t1\\.ibd' is corrupted");
|
||||
call mtr.add_suppression("InnoDB: A long wait .* was observed for dict_sys");
|
||||
call mtr.add_suppression("InnoDB: Page \\[page id: space=[1-9][0-9]*, page number=3\\] log sequence number 1311768467463790320 is in the future!");
|
||||
call mtr.add_suppression("InnoDB: Your database may be corrupt");
|
||||
call mtr.add_suppression("InnoDB: MySQL-8\\.0 tablespace in .*test/t2\\.ibd");
|
||||
call mtr.add_suppression("InnoDB: Restart in MySQL for migration/recovery\\.");
|
||||
--enable_query_log
|
||||
|
||||
let INNODB_PAGE_SIZE=`select @@innodb_page_size`;
|
||||
let ALGO=`select @@innodb_checksum_algorithm`;
|
||||
CREATE TABLE t1(a BIGINT PRIMARY KEY) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES(1);
|
||||
# Force a redo log checkpoint.
|
||||
@@ -30,15 +33,32 @@ INSERT INTO t2 VALUES(1);
|
||||
--echo # Corrupt the pages
|
||||
|
||||
perl;
|
||||
do "$ENV{MTR_SUITE_DIR}/include/crc32.pl";
|
||||
my $polynomial = 0x82f63b78; # CRC-32C
|
||||
my $algo = $ENV{ALGO};
|
||||
my $ps = $ENV{INNODB_PAGE_SIZE};
|
||||
|
||||
my $file = "$ENV{MYSQLD_DATADIR}/test/t1.ibd";
|
||||
open(FILE, "+<$file") || die "Unable to open $file";
|
||||
binmode FILE;
|
||||
sysseek(FILE, 3*$ps, 0) || die "Unable to seek $file\n";
|
||||
die "Unable to read $file" unless sysread(FILE, $page, $ps) == $ps;
|
||||
# Replace the a=1 with a=0.
|
||||
$page =~ s/\x80\x0\x0\x0\x0\x0\x0\x1/\x80\x0\x0\x0\x0\x0\x0\x0/;
|
||||
# Assign a future FIL_PAGE_LSN
|
||||
substr($page, 16, 8) = pack("NN", 0x12345678, 0x9abcdef0);
|
||||
substr($page, $ps - 8, 8) = pack("NN", 0x9abcdef0, 0x9abcdef0);
|
||||
if ($algo =~ /full_crc32/)
|
||||
{
|
||||
my $ck = mycrc32(substr($page, 0, $ps - 4), 0, $polynomial);
|
||||
substr($page, $ps - 4, 4) = pack("N", $ck);
|
||||
}
|
||||
else
|
||||
{
|
||||
# Replace the innodb_checksum_algorithm=crc32 checksum
|
||||
my $ck= pack("N",
|
||||
mycrc32(substr($page, 4, 22), 0, $polynomial) ^
|
||||
mycrc32(substr($page, 38, $ps - 38 - 8), 0, $polynomial));
|
||||
substr ($page, 0, 4) = $ck;
|
||||
substr ($page, $ps - 8, 4) = $ck;
|
||||
}
|
||||
sysseek(FILE, 3*$ps, 0) || die "Unable to seek $file\n";
|
||||
syswrite(FILE, $page, $ps)==$ps || die "Unable to write $file\n";
|
||||
close FILE or die "close";
|
||||
@@ -46,20 +66,23 @@ close FILE or die "close";
|
||||
$file = "$ENV{MYSQLD_DATADIR}/test/t2.ibd";
|
||||
open(FILE, "+<$file") || die "Unable to open $file";
|
||||
binmode FILE;
|
||||
# Corrupt pages 1 to 3. MLOG_INIT_FILE_PAGE2 should protect us!
|
||||
# Unfortunately, we are not immune to page 0 corruption.
|
||||
seek (FILE, $ps, SEEK_SET) or die "seek";
|
||||
print FILE chr(0xff) x ($ps * 3);
|
||||
# Corrupt pages 0 to 3. INIT_PAGE should protect us!
|
||||
print FILE chr(0xff) x ($ps * 4);
|
||||
close FILE or die "close";
|
||||
EOF
|
||||
|
||||
--source include/start_mysqld.inc
|
||||
--error ER_UNKNOWN_STORAGE_ENGINE
|
||||
SELECT * FROM t1;
|
||||
|
||||
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
|
||||
let SEARCH_PATTERN=InnoDB: Page \\[page id: space=[1-9][0-9]*, page number=3\\] log sequence number 1311768467463790320 is in the future!;
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
let $restart_parameters=--innodb_force_recovery=1;
|
||||
--source include/restart_mysqld.inc
|
||||
|
||||
--error ER_NO_SUCH_TABLE_IN_ENGINE,ER_TABLE_CORRUPT
|
||||
--error 0,ER_NO_SUCH_TABLE_IN_ENGINE
|
||||
SELECT * FROM t1;
|
||||
SELECT * FROM t2;
|
||||
CHECK TABLE t2;
|
||||
@@ -81,13 +104,36 @@ DELETE FROM t1 WHERE pk=3;
|
||||
--source ../include/no_checkpoint_end.inc
|
||||
disconnect con1;
|
||||
|
||||
--echo # Corrupt the pages
|
||||
--echo # Corrupt the page
|
||||
perl;
|
||||
do "$ENV{MTR_SUITE_DIR}/include/crc32.pl";
|
||||
my $polynomial = 0x82f63b78; # CRC-32C
|
||||
my $algo = $ENV{ALGO};
|
||||
my $ps = $ENV{INNODB_PAGE_SIZE};
|
||||
my $file = "$ENV{MYSQLD_DATADIR}/test/t1.ibd";
|
||||
open(FILE, "+<$file") || die "Unable to open $file";
|
||||
binmode FILE;
|
||||
seek (FILE, $ENV{INNODB_PAGE_SIZE} * 3, SEEK_SET) or die "seek";
|
||||
print FILE "junk";
|
||||
sysseek(FILE, $ps * 3, SEEK_SET) or die "seek";
|
||||
sysread(FILE, $page, $ps)==$ps||die "Unable to read $file\n";
|
||||
# Set FIL_PAGE_LSN to the maximum
|
||||
substr($page, 16, 8) = chr(255) x 8;
|
||||
substr($page, $ps - 8, 8) = chr(255) x 8;
|
||||
if ($algo =~ /full_crc32/)
|
||||
{
|
||||
my $ck = mycrc32(substr($page, 0, $ps - 4), 0, $polynomial);
|
||||
substr($page, $ps - 4, 4) = pack("N", $ck);
|
||||
}
|
||||
else
|
||||
{
|
||||
# Replace the innodb_checksum_algorithm=crc32 checksum
|
||||
my $ck= pack("N",
|
||||
mycrc32(substr($page, 4, 22), 0, $polynomial) ^
|
||||
mycrc32(substr($page_, 38, $ps - 38 - 8), 0, $polynomial));
|
||||
substr ($page, 0, 4) = $ck;
|
||||
substr ($page, $ps - 8, 4) = $ck;
|
||||
}
|
||||
sysseek(FILE, $ps * 3, SEEK_SET) or die "seek";
|
||||
syswrite(FILE, $page);
|
||||
close FILE or die "close";
|
||||
EOF
|
||||
--source include/start_mysqld.inc
|
||||
|
16
mysql-test/suite/innodb/t/create_like.test
Normal file
16
mysql-test/suite/innodb/t/create_like.test
Normal file
@@ -0,0 +1,16 @@
|
||||
--source include/have_innodb.inc
|
||||
--echo #
|
||||
--echo # MDEV-35144 CREATE TABLE ... LIKE uses current innodb_compression_default instead of the create value
|
||||
--echo #
|
||||
|
||||
set innodb_compression_default= off;
|
||||
create table t1 (a int, b blob) engine=innodb;
|
||||
set innodb_compression_default= on;
|
||||
create table s_import like t1;
|
||||
|
||||
show create table t1;
|
||||
show create table s_import;
|
||||
|
||||
DROP TABLE t1,s_import;
|
||||
|
||||
--echo # End of 10.5 tests
|
@@ -26,3 +26,16 @@ reap;
|
||||
CREATE TABLE t1 (a SERIAL) ENGINE=InnoDB;
|
||||
DROP TABLE t1;
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
||||
--echo # End of 10.2 tests
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-35236 Assertion `(mem_root->flags & 4) == 0' failed in safe_lexcstrdup_root
|
||||
--echo #
|
||||
prepare stmt from 'create or replace table t engine=innodb select 1 as f';
|
||||
set innodb_compression_default=on;
|
||||
execute stmt;
|
||||
execute stmt;
|
||||
drop table t;
|
||||
|
||||
--echo # End of 10.5 tests
|
||||
|
@@ -18,6 +18,9 @@ call mtr.add_suppression("InnoDB: Checksum mismatch in datafile: ");
|
||||
call mtr.add_suppression("InnoDB: Inconsistent tablespace ID in .*t1\\.ibd");
|
||||
call mtr.add_suppression("\\[Warning\\] Found 1 prepared XA transactions");
|
||||
call mtr.add_suppression("InnoDB: Header page consists of zero bytes in datafile:");
|
||||
call mtr.add_suppression("InnoDB: Page \\[page id: space=[1-9][0-9]*, page number=3\\] log sequence number 18446744073709551615 is in the future!");
|
||||
call mtr.add_suppression("InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the ib_logfile0");
|
||||
call mtr.add_suppression("InnoDB: Plugin initialization aborted");
|
||||
--enable_query_log
|
||||
|
||||
let INNODB_PAGE_SIZE=`select @@innodb_page_size`;
|
||||
@@ -71,7 +74,26 @@ syswrite(FILE, chr(0) x ($page_size/2));
|
||||
sysseek(FILE, 3*$page_size, 0);
|
||||
sysread(FILE, $page, $page_size)==$page_size||die "Unable to read $name\n";
|
||||
sysseek(FILE, 3*$page_size, 0)||die "Unable to seek $fname\n";
|
||||
syswrite(FILE, chr(0) x ($page_size/2));
|
||||
my $corrupted = $page;
|
||||
# Set FIL_PAGE_LSN to the maximum
|
||||
substr($corrupted, 16, 8) = chr(255) x 8;
|
||||
substr($corrupted, $page_size - 8, 8) = chr(255) x 8;
|
||||
if ($algo =~ /full_crc32/)
|
||||
{
|
||||
my $ck = mycrc32(substr($corrupted, 0, $page_size - 4), 0, $polynomial);
|
||||
substr($corrupted, $page_size - 4, 4) = pack("N", $ck);
|
||||
}
|
||||
else
|
||||
{
|
||||
# Replace the innodb_checksum_algorithm=crc32 checksum
|
||||
my $ck= pack("N",
|
||||
mycrc32(substr($corrupted, 4, 22), 0, $polynomial) ^
|
||||
mycrc32(substr($corrupted_, 38, $page_size - 38 - 8), 0,
|
||||
$polynomial));
|
||||
substr ($corrupted, 0, 4) = $ck;
|
||||
substr ($corrupted, $page_size - 8, 4) = $ck;
|
||||
}
|
||||
syswrite(FILE, $corrupted);
|
||||
close FILE;
|
||||
|
||||
# Change the flag offset of page 0 in doublewrite buffer
|
||||
@@ -113,10 +135,28 @@ die "Did not find the page in the doublewrite buffer ($d1,$d2)\n";
|
||||
EOF
|
||||
|
||||
--source include/start_mysqld.inc
|
||||
let SEARCH_PATTERN=InnoDB: Restoring page \[page id: space=[1-9][0-9]*, page number=0\] of datafile;
|
||||
let SEARCH_PATTERN=InnoDB: Recovered page \\[page id: space=[1-9][0-9]*, page number=0\\];
|
||||
--source include/search_pattern_in_file.inc
|
||||
let SEARCH_PATTERN=InnoDB: Recovered page \[page id: space=[1-9][0-9]*, page number=3\];
|
||||
let SEARCH_PATTERN=InnoDB: The log was only scanned up to \\d+, while the current LSN at the time of the latest checkpoint \\d+ was 0 and the maximum LSN on a data page was 18446744073709551615!
|
||||
--source include/search_pattern_in_file.inc
|
||||
--error ER_XAER_NOTA
|
||||
XA ROLLBACK 'x';
|
||||
let $shutdown_timeout=0;
|
||||
--source include/shutdown_mysqld.inc
|
||||
let $shutdown_timeout=;
|
||||
# Corrupt the file in a better way.
|
||||
perl;
|
||||
use IO::Handle;
|
||||
my $fname= "$ENV{'MYSQLD_DATADIR'}test/t1.ibd";
|
||||
my $page_size = $ENV{INNODB_PAGE_SIZE};
|
||||
open(FILE, "+<", $fname) or die;
|
||||
sysseek(FILE, ($page_size/2), 0);
|
||||
syswrite(FILE, chr(0) x ($page_size/2));
|
||||
sysseek(FILE, 3*$page_size, 0);
|
||||
syswrite(FILE, chr(0) x ($page_size/2));
|
||||
close FILE;
|
||||
EOF
|
||||
--source include/start_mysqld.inc
|
||||
XA ROLLBACK 'x';
|
||||
check table t1;
|
||||
select f1, f2 from t1;
|
||||
@@ -144,7 +184,7 @@ close FILE;
|
||||
EOF
|
||||
|
||||
--source include/start_mysqld.inc
|
||||
let SEARCH_PATTERN=InnoDB: Restoring page \[page id: space=[1-9][0-9]*, page number=0\] of datafile;
|
||||
let SEARCH_PATTERN=InnoDB: Recovered page \\[page id: space=[1-9][0-9]*, page number=[03]\\];
|
||||
--source include/search_pattern_in_file.inc
|
||||
XA ROLLBACK 'x';
|
||||
check table t1;
|
||||
|
@@ -81,10 +81,10 @@ EOF
|
||||
let $restart_parameters=;
|
||||
--source include/start_mysqld.inc
|
||||
|
||||
let SEARCH_PATTERN=InnoDB: Restoring page \[page id: space=0, page number=0\] of datafile;
|
||||
let SEARCH_PATTERN=InnoDB: Recovered page \\[page id: space=0, page number=0\\];
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
let SEARCH_PATTERN=InnoDB: Recovered page \[page id: space=0, page number=1\];
|
||||
let SEARCH_PATTERN=InnoDB: Recovered page \\[page id: space=0, page number=1\\];
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
check table t1;
|
||||
@@ -129,10 +129,10 @@ EOF
|
||||
let $restart_parameters=;
|
||||
--source include/start_mysqld.inc
|
||||
|
||||
let SEARCH_PATTERN=InnoDB: Restoring page \[page id: space=0, page number=0\] of datafile;
|
||||
let SEARCH_PATTERN=InnoDB: Recovered page \\[page id: space=0, page number=0\\];
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
let SEARCH_PATTERN=InnoDB: Recovered page \[page id: space=0, page number=1\];
|
||||
let SEARCH_PATTERN=InnoDB: Recovered page \\[page id: space=0, page number=1\\];
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
check table t1;
|
||||
|
@@ -29,8 +29,8 @@ call mtr.add_suppression("InnoDB: Page for tablespace ");
|
||||
call mtr.add_suppression("InnoDB: Invalid FSP_SPACE_FLAGS=");
|
||||
call mtr.add_suppression("InnoDB: Unknown index id .* on page");
|
||||
call mtr.add_suppression("InnoDB: Cannot save statistics for table `test`\\.`t1` because the \\.ibd file is missing");
|
||||
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*ibdata1' page");
|
||||
call mtr.add_suppression("InnoDB: File '.*ibdata1' is corrupted");
|
||||
call mtr.add_suppression("InnoDB: Failed to read page \\d+ from file '.*test/t1\\.ibd'");
|
||||
call mtr.add_suppression("InnoDB: File '.*(ibdata1|t1\\.ibd)' is corrupted");
|
||||
FLUSH TABLES;
|
||||
|
||||
let MYSQLD_DATADIR =`SELECT @@datadir`;
|
||||
|
@@ -9,7 +9,7 @@
|
||||
|
||||
--disable_query_log
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` is corrupted\\. Please drop the table and recreate\\.");
|
||||
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*test.t1\\.ibd' page");
|
||||
call mtr.add_suppression("InnoDB: Failed to read page [1-9][0-9]* from file '.*test.t1\\.ibd'");
|
||||
call mtr.add_suppression("InnoDB: We detected index corruption in an InnoDB type table");
|
||||
call mtr.add_suppression("Index for table 't1' is corrupt; try to repair it");
|
||||
call mtr.add_suppression("InnoDB: File '.*test/t1\\.ibd' is corrupted");
|
||||
|
@@ -567,6 +567,16 @@ ALTER TABLE t1 DROP COLUMN a;
|
||||
ALTER TABLE t1 DROP COLUMN c;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-35122 Incorrect NULL value handling for instantly
|
||||
--echo # dropped BLOB columns
|
||||
--echo #
|
||||
CREATE TABLE t1 (c1 INT, c2 BLOB, c3 BLOB NOT NULL) ROW_FORMAT=REDUNDANT,ENGINE=InnoDB;
|
||||
ALTER TABLE t1 DROP c2;
|
||||
ALTER TABLE t1 DROP c3;
|
||||
INSERT INTO t1 VALUES(1);
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo # End of 10.5 tests
|
||||
|
||||
--echo # End of 10.6 tests
|
||||
|
@@ -2,9 +2,8 @@
|
||||
--source include/have_debug.inc
|
||||
|
||||
--disable_query_log
|
||||
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*test.t1\\.ibd' page");
|
||||
call mtr.add_suppression("\\[ERROR\\] InnoDB: Failed to read page 19 from file '.*test.t1\\.ibd': Page read from tablespace is corrupted\\.");
|
||||
call mtr.add_suppression("InnoDB: (Unable to apply log to|Discarding log for) corrupted page .*, page number=19\\]");
|
||||
call mtr.add_suppression("InnoDB: Unable to apply log to corrupted page 19 in file .*t1\\.ibd");
|
||||
call mtr.add_suppression("\\[ERROR\\] InnoDB: Plugin initialization aborted at srv0start\\.cc.* with error Data structure corruption");
|
||||
call mtr.add_suppression("\\[ERROR\\] Plugin 'InnoDB' (init function|registration)");
|
||||
call mtr.add_suppression("\\[ERROR\\] InnoDB: We detected index corruption");
|
||||
|
@@ -152,10 +152,12 @@ BEGIN; INSERT INTO t SET a=2;
|
||||
|
||||
--connection consistent
|
||||
START TRANSACTION WITH CONSISTENT SNAPSHOT;
|
||||
SAVEPOINT sp1;
|
||||
--disable_ps2_protocol
|
||||
--error ER_CHECKREAD
|
||||
SELECT * FROM t FORCE INDEX (b) FOR UPDATE;
|
||||
--enable_ps2_protocol
|
||||
SAVEPOINT sp1;
|
||||
|
||||
--connection con_weird
|
||||
START TRANSACTION WITH CONSISTENT SNAPSHOT;
|
||||
@@ -181,3 +183,5 @@ SELECT * FROM t FORCE INDEX (b) FOR UPDATE;
|
||||
|
||||
--connection default
|
||||
DROP TABLE t;
|
||||
|
||||
--echo # End of 10.6 tests
|
||||
|
@@ -92,6 +92,7 @@ let SEARCH_PATTERN= InnoDB: Set innodb_force_recovery=1 to ignore this and to pe
|
||||
|
||||
--source include/start_mysqld.inc
|
||||
eval $check_no_innodb;
|
||||
--let $on_linux= `select @@version_compile_os LIKE 'Linux%'`
|
||||
--source include/shutdown_mysqld.inc
|
||||
|
||||
let SEARCH_PATTERN= InnoDB: Tablespace \d+ was not found at .*t[12].ibd.
|
||||
@@ -105,9 +106,18 @@ let SEARCH_PATTERN= InnoDB: Tablespace \d+ was not found at .*t[12].ibd.
|
||||
--source include/start_mysqld.inc
|
||||
eval $check_no_innodb;
|
||||
--source include/shutdown_mysqld.inc
|
||||
# On Windows, this error message is not output when t2.ibd is a directory!
|
||||
#let SEARCH_PATTERN= \[Note\] InnoDB: Cannot read first page of .*t2.ibd;
|
||||
#--source include/search_pattern_in_file.inc
|
||||
|
||||
--let SEARCH_PATTERN= InnoDB: Could not measure the size of single-table tablespace file '.*test/t2\\.ibd'
|
||||
if (!$on_linux)
|
||||
{
|
||||
# os_file_get_size() would succeed on a directory.
|
||||
--echo FOUND 1 /$SEARCH_PATTERN/ in mysqld.1.err
|
||||
}
|
||||
if ($on_linux)
|
||||
{
|
||||
# lseek() reports EINVAL when invoked on a directory.
|
||||
--source include/search_pattern_in_file.inc
|
||||
}
|
||||
|
||||
--rmdir $MYSQLD_DATADIR/test/t2.ibd
|
||||
|
||||
@@ -150,6 +160,7 @@ call mtr.add_suppression("InnoDB: Error number \\d+ means");
|
||||
call mtr.add_suppression("InnoDB: Cannot create file '.*t0.ibd'");
|
||||
call mtr.add_suppression("InnoDB: The file '.*t0\.ibd' already exists");
|
||||
call mtr.add_suppression("InnoDB: Cannot open datafile for read-write: '.*t2\.ibd'");
|
||||
call mtr.add_suppression("InnoDB: Could not measure the size of single-table tablespace file '.*test/t2\\.ibd'");
|
||||
# The following are for aborted startup without --innodb-force-recovery:
|
||||
call mtr.add_suppression("InnoDB: Tablespace .* was not found at .*test");
|
||||
call mtr.add_suppression("InnoDB: Cannot read first page of '.*test.[tu]2.ibd': I/O error");
|
||||
|
@@ -1,5 +1,5 @@
|
||||
--source include/have_debug.inc
|
||||
--source include/linux.inc
|
||||
--source include/have_cgroupv2.inc
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_sequence.inc
|
||||
@@ -33,12 +33,21 @@ WHERE VARIABLE_NAME='Innodb_buffer_pool_pages_dirty';
|
||||
set debug_dbug="d,trigger_garbage_collection";
|
||||
SET GLOBAL innodb_buffer_pool_size=@@innodb_buffer_pool_size;
|
||||
|
||||
SELECT CAST(VARIABLE_VALUE AS INTEGER) < @dirty_prev AS LESS_DIRTY_IS_GOOD
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_STATUS
|
||||
WHERE VARIABLE_NAME='Innodb_buffer_pool_pages_dirty';
|
||||
|
||||
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
|
||||
# either a fail or the pressure event
|
||||
let SEARCH_PATTERN= [Mm]emory pressure.*;
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
# The garbage collection happens asynchronously after trigger, in a background
|
||||
# thread. So wait for it to happen to avoid sporadic failure.
|
||||
let $wait_condition=
|
||||
SELECT CAST(VARIABLE_VALUE AS INTEGER) < @dirty_prev AS LESS_DIRTY_IS_GOOD
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_STATUS
|
||||
WHERE VARIABLE_NAME='Innodb_buffer_pool_pages_dirty';
|
||||
--source include/wait_condition.inc
|
||||
eval $wait_condition;
|
||||
let SEARCH_PATTERN= InnoDB: Memory pressure event freed.*;
|
||||
let SEARCH_WAIT= FOUND;
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
set debug_dbug=@save_dbug;
|
||||
|
1
mysql-test/suite/innodb/t/page_compression_windows.opt
Normal file
1
mysql-test/suite/innodb/t/page_compression_windows.opt
Normal file
@@ -0,0 +1 @@
|
||||
--innodb-sys-tablespaces
|
7
mysql-test/suite/innodb/t/page_compression_windows.test
Normal file
7
mysql-test/suite/innodb/t/page_compression_windows.test
Normal file
@@ -0,0 +1,7 @@
|
||||
--source include/have_innodb.inc
|
||||
--source include/windows.inc
|
||||
create table t_compressed(b longblob) engine=InnoDB page_compressed=1;
|
||||
insert into t_compressed values(repeat(1,1000000));
|
||||
# Check that compression worked, i.e allocated size (physical file size) < logical file size
|
||||
select allocated_size < file_size from information_schema.innodb_sys_tablespaces where name='test/t_compressed';
|
||||
drop table t_compressed;
|
@@ -66,5 +66,6 @@ let $restart_parameters=--innodb-force-recovery=1;
|
||||
--source include/wait_all_purged.inc
|
||||
drop table t1;
|
||||
call mtr.add_suppression("InnoDB: Failed to read page 3 from file '.*test/t1\\.ibd': Page read from tablespace is corrupted\\.");
|
||||
call mtr.add_suppression("InnoDB: File '.*t1\\.ibd' is corrupted");
|
||||
let $restart_parameters=;
|
||||
--source include/restart_mysqld.inc
|
||||
|
@@ -6,6 +6,7 @@
|
||||
# Flush any open myisam tables from previous tests
|
||||
FLUSH TABLES;
|
||||
call mtr.add_suppression("Found 1 prepared XA transactions");
|
||||
call mtr.add_suppression("InnoDB: Cannot free the unused segments in system tablespace because a previous shutdown was not with innodb_fast_shutdown=0 or XA PREPARE transactions exist");
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-13797 InnoDB may hang if shutdown is initiated soon after startup
|
||||
|
@@ -23,6 +23,18 @@ DROP TABLE t1;
|
||||
--source include/wait_all_purged.inc
|
||||
SELECT NAME, FILE_SIZE FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES WHERE SPACE = 0;
|
||||
|
||||
# Corruption during traversal of extent
|
||||
let $restart_parameters=--debug_dbug=+d,traversal_extent_fail;
|
||||
--source include/restart_mysqld.inc
|
||||
|
||||
--let SEARCH_PATTERN= \[Warning\] InnoDB: Cannot shrink the system tablespace
|
||||
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
SELECT * FROM INFORMATION_SCHEMA.ENGINES
|
||||
WHERE engine = 'innodb'
|
||||
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
||||
|
||||
# Ran out of buffer pool
|
||||
let $restart_parameters=--debug_dbug=+d,shrink_buffer_pool_full;
|
||||
--source include/restart_mysqld.inc
|
||||
|
2
mysql-test/suite/innodb/t/undo_leak.opt
Normal file
2
mysql-test/suite/innodb/t/undo_leak.opt
Normal file
@@ -0,0 +1,2 @@
|
||||
--innodb_undo_tablespaces=0
|
||||
--innodb_sys_tablespaces
|
26
mysql-test/suite/innodb/t/undo_leak.test
Normal file
26
mysql-test/suite/innodb/t/undo_leak.test
Normal file
@@ -0,0 +1,26 @@
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_sequence.inc
|
||||
--source include/have_debug.inc
|
||||
--source include/not_embedded.inc
|
||||
|
||||
let $restart_parameters=--debug_dbug=d,undo_segment_leak;
|
||||
--source include/restart_mysqld.inc
|
||||
SET GLOBAL INNODB_FILE_PER_TABLE=0;
|
||||
CREATE TABLE t1(f1 INT NOT NULL, f2 INT NOT NULL)ENGINE=InnoDB;
|
||||
INSERT INTO t1 SELECT seq, seq FROM seq_1_to_4096;
|
||||
INSERT INTO t1 SELECT seq, seq FROM seq_1_to_4096;
|
||||
INSERT INTO t1 SELECT seq, seq FROM seq_1_to_4096;
|
||||
INSERT INTO t1 SELECT seq, seq FROM seq_1_to_4096;
|
||||
INSERT INTO t1 SELECT seq, seq FROM seq_1_to_4096;
|
||||
INSERT INTO t1 SELECT seq, seq FROM seq_1_to_4096;
|
||||
UPDATE t1 SET f1 = f1 + 1 WHERE f1 > 1000;
|
||||
UPDATE t1 SET f2 = f2 + 1 WHERE f1 > 1000;
|
||||
UPDATE t1 SET f1 = f2 + 1 WHERE f1 > 1000;
|
||||
UPDATE t1 SET f2 = f1 + 1 WHERE f1 > 1000;
|
||||
DELETE FROM t1;
|
||||
DROP TABLE t1;
|
||||
set GLOBAL innodb_fast_shutdown=0;
|
||||
SELECT NAME, FILE_SIZE FROM information_schema.innodb_sys_tablespaces WHERE SPACE = 0;
|
||||
let $restart_parameters=;
|
||||
--source include/restart_mysqld.inc
|
||||
SELECT NAME, FILE_SIZE FROM information_schema.innodb_sys_tablespaces WHERE SPACE = 0;
|
3
mysql-test/suite/innodb/t/undo_leak_fail.opt
Normal file
3
mysql-test/suite/innodb/t/undo_leak_fail.opt
Normal file
@@ -0,0 +1,3 @@
|
||||
--innodb_data_file_path=ibdata1:10M:autoextend:autoshrink
|
||||
--innodb_undo_tablespaces=0
|
||||
--innodb_sys_tablespaces
|
119
mysql-test/suite/innodb/t/undo_leak_fail.test
Normal file
119
mysql-test/suite/innodb/t/undo_leak_fail.test
Normal file
@@ -0,0 +1,119 @@
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_sequence.inc
|
||||
--source include/have_debug.inc
|
||||
--source include/not_embedded.inc
|
||||
|
||||
call mtr.add_suppression("InnoDB: Cannot free the unused segments in system tablespace because a previous shutdown was not with innodb_fast_shutdown=0");
|
||||
call mtr.add_suppression("InnoDB: :autoshrink failed to read the used segment");
|
||||
call mtr.add_suppression("InnoDB: :autoshrink failed due to .* in FSP_SEG_INODES_FULL list");
|
||||
call mtr.add_suppression("InnoDB: :autoshrink failed due to .* in FSP_SEG_INODES_FREE list");
|
||||
call mtr.add_suppression("InnoDB: :autoshrink failed to free the segment");
|
||||
call mtr.add_suppression("Found .* prepared XA transactions");
|
||||
SELECT NAME, FILE_SIZE FROM information_schema.innodb_sys_tablespaces WHERE SPACE = 0;
|
||||
|
||||
SET GLOBAL INNODB_FILE_PER_TABLE=0;
|
||||
CREATE TABLE t1(f1 INT NOT NULL, f2 INT NOT NULL)STATS_PERSISTENT=0, ENGINE=InnoDB;
|
||||
XA START 'x';
|
||||
insert into t1 values (1, 1);
|
||||
XA END 'x';
|
||||
XA PREPARE 'x';
|
||||
set GLOBAL innodb_fast_shutdown=0;
|
||||
--source include/restart_mysqld.inc
|
||||
--echo # Fail to free the segment due to XA PREPARE transaction
|
||||
let SEARCH_PATTERN= InnoDB: Cannot free the unused segments in system tablespace because a previous shutdown was not with innodb_fast_shutdown=0;
|
||||
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
|
||||
--source include/search_pattern_in_file.inc
|
||||
XA COMMIT 'x';
|
||||
DROP TABLE t1;
|
||||
|
||||
let $restart_parameters=--debug_dbug=d,undo_segment_leak;
|
||||
--source include/restart_mysqld.inc
|
||||
SET GLOBAL INNODB_FILE_PER_TABLE=0;
|
||||
CREATE TABLE t1(f1 INT NOT NULL, f2 INT NOT NULL)STATS_PERSISTENT=0, ENGINE=InnoDB;
|
||||
INSERT INTO t1 SELECT seq, seq FROM seq_1_to_4096;
|
||||
INSERT INTO t1 SELECT seq, seq FROM seq_1_to_4096;
|
||||
INSERT INTO t1 SELECT seq, seq FROM seq_1_to_4096;
|
||||
INSERT INTO t1 SELECT seq, seq FROM seq_1_to_4096;
|
||||
INSERT INTO t1 SELECT seq, seq FROM seq_1_to_4096;
|
||||
INSERT INTO t1 SELECT seq, seq FROM seq_1_to_4096;
|
||||
UPDATE t1 SET f1 = f1 + 1 WHERE f1 > 1000;
|
||||
UPDATE t1 SET f2 = f2 + 1 WHERE f1 > 1000;
|
||||
UPDATE t1 SET f1 = f2 + 1 WHERE f1 > 1000;
|
||||
UPDATE t1 SET f2 = f1 + 1 WHERE f1 > 1000;
|
||||
DELETE FROM t1;
|
||||
DROP TABLE t1;
|
||||
SELECT NAME, FILE_SIZE FROM information_schema.innodb_sys_tablespaces WHERE SPACE = 0;
|
||||
let $shutdown_timeout=0;
|
||||
let $restart_parameters=--debug_dbug=d,unused_undo_free_fail_1;
|
||||
--source include/restart_mysqld.inc
|
||||
|
||||
let $shutdown_timeout=;
|
||||
--echo # Fail to free the segment due to previous shutdown
|
||||
--let SEARCH_PATTERN= InnoDB: Cannot free the unused segments in system tablespace because a previous shutdown was not with innodb_fast_shutdown=0
|
||||
|
||||
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
SELECT NAME, FILE_SIZE FROM information_schema.innodb_sys_tablespaces WHERE SPACE = 0;
|
||||
SET GLOBAL innodb_fast_shutdown= 0;
|
||||
|
||||
--echo # Fail to free the segment while finding the used segments
|
||||
let $restart_parameters=--debug_dbug=d,unused_undo_free_fail_2;
|
||||
--source include/restart_mysqld.inc
|
||||
SELECT IF(file_size>10485760,'ok',file_size) FROM information_schema.innodb_sys_tablespaces WHERE space=0;
|
||||
let SEARCH_PATTERN= InnoDB: :autoshrink failed to read the used segment;
|
||||
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
let SEARCH_PATTERN= InnoDB: :autoshrink failed due to .* in FSP_SEG_INODES_FULL list;
|
||||
--source include/search_pattern_in_file.inc
|
||||
SET GLOBAL innodb_fast_shutdown= 0;
|
||||
|
||||
--echo # Fail to free the segment while finding the used segments
|
||||
let $restart_parameters=--debug_dbug=d,unused_undo_free_fail_3;
|
||||
--source include/restart_mysqld.inc
|
||||
SELECT IF(file_size>10485760,'ok',file_size) FROM information_schema.innodb_sys_tablespaces WHERE space=0;
|
||||
|
||||
let SEARCH_PATTERN= InnoDB: :autoshrink failed due to .* in FSP_SEG_INODES_FREE list;
|
||||
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
|
||||
--source include/search_pattern_in_file.inc
|
||||
SET GLOBAL innodb_fast_shutdown= 0;
|
||||
|
||||
--echo # Fail to free the segment while freeing the unused segments
|
||||
let $restart_parameters=--debug_dbug=d,unused_undo_free_fail_4;
|
||||
--source include/restart_mysqld.inc
|
||||
SELECT IF(file_size>10485760,'ok',file_size) FROM information_schema.innodb_sys_tablespaces WHERE space=0;
|
||||
|
||||
let SEARCH_PATTERN= InnoDB: :autoshrink failed to free the segment .* in page .*;
|
||||
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
SET GLOBAL innodb_fast_shutdown= 0;
|
||||
|
||||
--echo # Fail to free the segment while freeing the used segments
|
||||
let $restart_parameters=--debug_dbug=d,unused_undo_free_fail_5;
|
||||
--source include/restart_mysqld.inc
|
||||
SELECT IF(file_size>10485760,'ok',file_size) FROM information_schema.innodb_sys_tablespaces WHERE space=0;
|
||||
|
||||
let SEARCH_PATTERN= InnoDB: :autoshrink failed to free the segment .* in page .*;
|
||||
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
SET GLOBAL innodb_fast_shutdown= 0;
|
||||
let $restart_parameters=;
|
||||
--source include/restart_mysqld.inc
|
||||
SELECT NAME, FILE_SIZE FROM information_schema.innodb_sys_tablespaces WHERE SPACE = 0;
|
||||
|
||||
--echo # Fail to reset the TRX_SYS_FSEG_HEADER during undo tablespace
|
||||
--echo # reinitialization. garbage_collect() shouldn't free the
|
||||
--echo # TRX_SYS_FSEG_HEADER index node
|
||||
set global innodb_fast_shutdown=0;
|
||||
let $restart_parameters=--innodb_undo_tablespaces=2 --debug_dbug=d,sys_fseg_header_fail;
|
||||
--source include/restart_mysqld.inc
|
||||
let SEARCH_PATTERN= InnoDB: :autoshrink freed the segment .* in page .*;
|
||||
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
|
||||
--source include/search_pattern_in_file.inc
|
||||
let $restart_parameters=;
|
||||
set global innodb_fast_shutdown=0;
|
||||
--source include/restart_mysqld.inc
|
||||
SELECT NAME, FILE_SIZE FROM information_schema.innodb_sys_tablespaces WHERE SPACE = 0;
|
@@ -39,7 +39,7 @@ EOF
|
||||
|
||||
--source include/start_mysqld.inc
|
||||
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
|
||||
let SEARCH_PATTERN= Restoring page \[page id: space=1, page number=0\] of datafile '.*undo001' from the doublewrite buffer.;
|
||||
let SEARCH_PATTERN= Recovered page \\[page id: space=1, page number=0\\] to '.*undo001' from the doublewrite buffer\\.;
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
check table t1;
|
||||
|
98
mysql-test/suite/innodb/t/xa_prepare_unlock_unmodified.test
Normal file
98
mysql-test/suite/innodb/t/xa_prepare_unlock_unmodified.test
Normal file
@@ -0,0 +1,98 @@
|
||||
--source include/have_innodb.inc
|
||||
--source include/count_sessions.inc
|
||||
--source include/have_debug.inc
|
||||
--source include/have_sequence.inc
|
||||
|
||||
SET @old_innodb_enable_xap_unlock_unmodified_for_primary_debug=
|
||||
@@GLOBAL.innodb_enable_xap_unlock_unmodified_for_primary_debug;
|
||||
SET GLOBAL innodb_enable_xap_unlock_unmodified_for_primary_debug= 1;
|
||||
|
||||
# Make sure there is no dynamic memory allocation during getting offsets for
|
||||
# 32 columns of secondary index with 32 columns of primary index in
|
||||
# lock_rec_unlock_unmodified().
|
||||
DELIMITER $$;
|
||||
BEGIN NOT ATOMIC
|
||||
DECLARE c TEXT DEFAULT(
|
||||
SELECT CONCAT(
|
||||
'CREATE TABLE t1(pk',
|
||||
GROUP_CONCAT(seq SEPARATOR ' INT, pk'), ' INT, a',
|
||||
GROUP_CONCAT(seq SEPARATOR ' INT, a'), ' INT, b',
|
||||
GROUP_CONCAT(seq SEPARATOR ' INT, b'), ' INT, c INT, PRIMARY KEY(pk',
|
||||
GROUP_CONCAT(seq SEPARATOR ', pk'), '), INDEX i1(a',
|
||||
GROUP_CONCAT(seq SEPARATOR ', a'), '), INDEX i2(b',
|
||||
GROUP_CONCAT(seq SEPARATOR ', b'), ')) ENGINE=InnoDB;')
|
||||
FROM seq_1_to_32);
|
||||
EXECUTE IMMEDIATE c;
|
||||
END;
|
||||
$$
|
||||
BEGIN NOT ATOMIC
|
||||
DECLARE c TEXT DEFAULT(
|
||||
SELECT CONCAT(
|
||||
'INSERT INTO t1 VALUES (',
|
||||
GROUP_CONCAT('1' SEPARATOR ','), ',',
|
||||
GROUP_CONCAT('1' SEPARATOR ','), ',',
|
||||
GROUP_CONCAT('1' SEPARATOR ','), ',0), (',
|
||||
|
||||
GROUP_CONCAT('2' SEPARATOR ','), ',',
|
||||
GROUP_CONCAT('1' SEPARATOR ','), ',',
|
||||
GROUP_CONCAT('2' SEPARATOR ','), ',0), (',
|
||||
|
||||
GROUP_CONCAT('3' SEPARATOR ','), ',',
|
||||
GROUP_CONCAT('2' SEPARATOR ','), ',',
|
||||
GROUP_CONCAT('1' SEPARATOR ','), ',0), (',
|
||||
|
||||
GROUP_CONCAT('4' SEPARATOR ','), ',',
|
||||
GROUP_CONCAT('2' SEPARATOR ','), ',',
|
||||
GROUP_CONCAT('2' SEPARATOR ','), ',0);')
|
||||
FROM seq_1_to_32);
|
||||
EXECUTE IMMEDIATE c;
|
||||
END;
|
||||
$$
|
||||
DELIMITER ;$$
|
||||
|
||||
SET @old_timeout= @@GLOBAL.innodb_lock_wait_timeout;
|
||||
SET GLOBAL innodb_lock_wait_timeout= 1;
|
||||
|
||||
XA START "t1";
|
||||
UPDATE t1 FORCE INDEX (i2) SET c=c+1 WHERE a1=1 AND b1=1;
|
||||
XA END "t1";
|
||||
# If there is dynamic memory allocation during getting offsets for
|
||||
# 32 columns of secondary index with 32 columns of primary index in
|
||||
# lock_rec_unlock_unmodified(), the following statement will cause assertion
|
||||
# failure in debug build.
|
||||
XA PREPARE "t1";
|
||||
|
||||
--connect(con1,localhost,root,,)
|
||||
# (pk, 2, 1, 0) record is X-locked but not modified in clustered index with the
|
||||
# above XA transaction, if the bug is not fixed, the following SELECT will be
|
||||
# blocked by the XA transaction if XA PREPARE does not release the unmodified
|
||||
# record.
|
||||
SELECT a1, b1, c FROM t1 FORCE INDEX (i1) WHERE a1=2 AND b1=1 FOR UPDATE;
|
||||
--disconnect con1
|
||||
|
||||
--connection default
|
||||
XA COMMIT "t1";
|
||||
|
||||
SET GLOBAL innodb_enable_xap_unlock_unmodified_for_primary_debug=
|
||||
@old_innodb_enable_xap_unlock_unmodified_for_primary_debug;
|
||||
|
||||
SET GLOBAL innodb_lock_wait_timeout= @old_timeout;
|
||||
|
||||
# Check that we can't create secondary index with more than 32 columns.
|
||||
DELIMITER $$;
|
||||
--error ER_TOO_MANY_KEY_PARTS
|
||||
BEGIN NOT ATOMIC
|
||||
DECLARE c TEXT DEFAULT(
|
||||
SELECT CONCAT(
|
||||
'ALTER TABLE t1 ADD COLUMN d',
|
||||
GROUP_CONCAT(seq SEPARATOR ' INT, ADD COLUMN d'),
|
||||
' INT, ADD INDEX i3(d',
|
||||
GROUP_CONCAT(seq SEPARATOR ', d'), ');')
|
||||
FROM seq_1_to_33);
|
||||
EXECUTE IMMEDIATE c;
|
||||
END;
|
||||
$$
|
||||
DELIMITER ;$$
|
||||
|
||||
DROP TABLE t1;
|
||||
--source include/wait_until_count_sessions.inc
|
1
mysql-test/suite/innodb/t/xa_unlock_unmodified.opt
Normal file
1
mysql-test/suite/innodb/t/xa_unlock_unmodified.opt
Normal file
@@ -0,0 +1 @@
|
||||
--innodb_purge_threads=1
|
86
mysql-test/suite/innodb/t/xa_unlock_unmodified.test
Normal file
86
mysql-test/suite/innodb/t/xa_unlock_unmodified.test
Normal file
@@ -0,0 +1,86 @@
|
||||
--source include/have_innodb.inc
|
||||
--source include/count_sessions.inc
|
||||
--source include/have_debug.inc
|
||||
--source include/have_debug_sync.inc
|
||||
|
||||
SET @old_innodb_enable_xap_unlock_unmodified_for_primary_debug=
|
||||
@@GLOBAL.innodb_enable_xap_unlock_unmodified_for_primary_debug;
|
||||
SET GLOBAL innodb_enable_xap_unlock_unmodified_for_primary_debug= 1;
|
||||
|
||||
SET @saved_dbug = @@GLOBAL.debug_dbug;
|
||||
|
||||
CREATE TABLE t(id INT PRIMARY KEY) ENGINE=InnoDB STATS_PERSISTENT=0;
|
||||
|
||||
--let $i = 2
|
||||
|
||||
while ($i) {
|
||||
--source include/wait_all_purged.inc
|
||||
|
||||
INSERT INTO t VALUES (10), (20), (30);
|
||||
|
||||
--connect(prevent_purge,localhost,root,,)
|
||||
start transaction with consistent snapshot;
|
||||
|
||||
--connection default
|
||||
DELETE FROM t WHERE id = 20;
|
||||
|
||||
SET @@GLOBAL.debug_dbug=
|
||||
"+d,enable_row_purge_remove_clust_if_poss_low_sync_point";
|
||||
|
||||
# Cover both lock_release_on_prepare() and lock_release_on_prepare_try()
|
||||
# functions
|
||||
if ($i == 1) {
|
||||
SET @@GLOBAL.debug_dbug="+d,skip_lock_release_on_prepare_try";
|
||||
}
|
||||
|
||||
XA START '1';
|
||||
UPDATE t SET id=40 WHERE id=30;
|
||||
XA END '1';
|
||||
|
||||
--connection prevent_purge
|
||||
COMMIT;
|
||||
|
||||
# stop purge worker after it requested page X-latch, but before
|
||||
# lock_update_delete() call
|
||||
SET DEBUG_SYNC=
|
||||
'now WAIT_FOR row_purge_remove_clust_if_poss_low_before_delete';
|
||||
SET @@GLOBAL.debug_dbug=
|
||||
"-d,enable_row_purge_remove_clust_if_poss_low_sync_point";
|
||||
|
||||
--connection default
|
||||
# lock_rec_unlock_unmodified() is executed either under lock_sys.wr_lock() or
|
||||
# under a combination of lock_sys.rd_lock() + record locks hash table cell
|
||||
# latch. Stop it before page latch request.
|
||||
SET DEBUG_SYNC=
|
||||
"lock_rec_unlock_unmodified_start SIGNAL lock_sys_latched WAIT_FOR cont";
|
||||
--send XA PREPARE '1'
|
||||
|
||||
--connection prevent_purge
|
||||
# let purge thread to continue execution and invoke lock_update_delete(),
|
||||
# which, in turns, requests locks_sys related latches.
|
||||
SET DEBUG_SYNC= 'now SIGNAL row_purge_remove_clust_if_poss_low_cont';
|
||||
SET DEBUG_SYNC= 'now SIGNAL cont';
|
||||
--disconnect prevent_purge
|
||||
|
||||
--connection default
|
||||
# deadlock if the bug is not fixed, as lock_rec_unlock_unmodified() requests
|
||||
# page latch acquired by purge worker, and the purge worker requests lock_sys
|
||||
# related latches in lock_update_delete() call, acquired by the current XA
|
||||
# in lock_rec_unlock_unmodified() caller.
|
||||
--reap
|
||||
XA COMMIT '1';
|
||||
|
||||
SET DEBUG_SYNC="RESET";
|
||||
|
||||
TRUNCATE TABLE t;
|
||||
|
||||
--dec $i
|
||||
}
|
||||
|
||||
SET @@GLOBAL.debug_dbug = @saved_dbug;
|
||||
DROP TABLE t;
|
||||
|
||||
SET GLOBAL innodb_enable_xap_unlock_unmodified_for_primary_debug=
|
||||
@old_innodb_enable_xap_unlock_unmodified_for_primary_debug;
|
||||
|
||||
--source include/wait_until_count_sessions.inc
|
@@ -644,9 +644,9 @@ ERROR 42000: syntax error, unexpected $end, expecting FTS_TERM or FTS_NUMB or '*
|
||||
SELECT 1 FROM q WHERE (SELECT MATCH(b) AGAINST ('*') FROM z);
|
||||
ERROR 42000: syntax error, unexpected $end, expecting FTS_TERM or FTS_NUMB or '*'
|
||||
EXPLAIN SELECT MATCH(b) AGAINST ('*') FROM z;
|
||||
ERROR 42S22: Unknown column 'b' in 'field list'
|
||||
ERROR 42S22: Unknown column 'b' in 'SELECT'
|
||||
SELECT MATCH(b) AGAINST ('*') FROM z;
|
||||
ERROR 42S22: Unknown column 'b' in 'field list'
|
||||
ERROR 42S22: Unknown column 'b' in 'SELECT'
|
||||
EXPLAIN SELECT MATCH(a) AGAINST ('*') FROM z;
|
||||
ERROR HY000: Can't find FULLTEXT index matching the column list
|
||||
SELECT MATCH(a) AGAINST ('*') FROM z;
|
||||
@@ -791,3 +791,28 @@ f1 MATCH(f1) AGAINST ("test" IN BOOLEAN MODE)
|
||||
test 0.000000001885928302414186
|
||||
DROP TABLE t1;
|
||||
# End of 10.3 tests
|
||||
#
|
||||
# MDEV-35183 ADD FULLTEXT INDEX unnecessarily DROPS FTS
|
||||
# COMMON TABLES
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
ID INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
|
||||
title VARCHAR(200), book VARCHAR(200),
|
||||
FULLTEXT fidx(title)) ENGINE = InnoDB;
|
||||
INSERT INTO t1(title) VALUES('database');
|
||||
ALTER TABLE t1 DROP INDEX fidx;
|
||||
select space into @common_space from information_schema.innodb_sys_tables where name like "test/FTS_%_CONFIG";
|
||||
ALTER TABLE t1 ADD FULLTEXT fidx_1(book);
|
||||
select space=@common_space from information_schema.innodb_sys_tables where name like "test/FTS_%_CONFIG";
|
||||
space=@common_space
|
||||
1
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`ID` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`title` varchar(200) DEFAULT NULL,
|
||||
`book` varchar(200) DEFAULT NULL,
|
||||
PRIMARY KEY (`ID`),
|
||||
FULLTEXT KEY `fidx_1` (`book`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||
DROP TABLE t1;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user