⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.124
Server IP:
50.28.103.30
Server:
Linux host.jcukjv-lwsites.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
Server Software:
nginx/1.28.0
PHP Version:
8.3.12
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
www
/
server
/
mysql
/
mysql-test
/
suite
/
innodb_fts
/
r
/
View File Name :
sync.result
# Case 1: Test select and insert(row in both disk and cache) CREATE TABLE t1 ( FTS_DOC_ID BIGINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, title VARCHAR(200), FULLTEXT(title) ) ENGINE = InnoDB; INSERT INTO t1(title) VALUES('mysql'); INSERT INTO t1(title) VALUES('database'); SET SESSION debug="+d,fts_instrument_sync_debug"; SET DEBUG_SYNC= 'fts_write_node SIGNAL written WAIT_FOR selected'; INSERT INTO t1(title) VALUES('mysql database'); SET DEBUG_SYNC= 'now WAIT_FOR written'; SET GLOBAL innodb_ft_aux_table="test/t1"; SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_CACHE; WORD FIRST_DOC_ID LAST_DOC_ID DOC_COUNT DOC_ID POSITION SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_TABLE; WORD FIRST_DOC_ID LAST_DOC_ID DOC_COUNT DOC_ID POSITION database 2 3 2 2 0 database 2 3 2 3 6 mysql 1 3 2 1 0 mysql 1 3 2 3 0 SET GLOBAL innodb_ft_aux_table=default; SELECT * FROM t1 WHERE MATCH(title) AGAINST('mysql database'); FTS_DOC_ID title 3 mysql database 1 mysql 2 database SET DEBUG_SYNC= 'now SIGNAL selected'; /* connection con1 */ INSERT INTO t1(title) VALUES('mysql database'); SET SESSION debug="-d,fts_instrument_sync_debug"; SET GLOBAL innodb_ft_aux_table="test/t1"; SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_CACHE; WORD FIRST_DOC_ID LAST_DOC_ID DOC_COUNT DOC_ID POSITION SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_TABLE; WORD FIRST_DOC_ID LAST_DOC_ID DOC_COUNT DOC_ID POSITION database 2 3 2 2 0 database 2 3 2 3 6 mysql 1 3 2 1 0 mysql 1 3 2 3 0 SET GLOBAL innodb_ft_aux_table=default; SELECT * FROM t1 WHERE MATCH(title) AGAINST('mysql database'); FTS_DOC_ID title 3 mysql database 1 mysql 2 database DROP TABLE t1; # Case 2: Test insert and insert(sync) CREATE TABLE t1 ( FTS_DOC_ID BIGINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, title VARCHAR(200), FULLTEXT(title) ) ENGINE = InnoDB; INSERT INTO t1(title) VALUES('mysql'); INSERT INTO t1(title) VALUES('database'); SET SESSION debug="+d,fts_instrument_sync_debug"; SET DEBUG_SYNC= 'fts_write_node SIGNAL written WAIT_FOR inserted'; INSERT INTO t1(title) VALUES('mysql database'); SET DEBUG_SYNC= 'now WAIT_FOR written'; INSERT INTO t1(title) VALUES('mysql database'); SET DEBUG_SYNC= 'now SIGNAL inserted'; /* connection con1 */ INSERT INTO t1(title) VALUES('mysql database'); SET SESSION debug="-d,fts_instrument_sync_debug"; SET GLOBAL innodb_ft_aux_table="test/t1"; SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_CACHE; WORD FIRST_DOC_ID LAST_DOC_ID DOC_COUNT DOC_ID POSITION SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_TABLE; WORD FIRST_DOC_ID LAST_DOC_ID DOC_COUNT DOC_ID POSITION database 2 3 2 2 0 database 2 3 2 3 6 database 4 4 1 4 6 mysql 1 4 3 1 0 mysql 1 4 3 3 0 mysql 1 4 3 4 0 SET GLOBAL innodb_ft_aux_table=default; SELECT * FROM t1 WHERE MATCH(title) AGAINST('mysql database'); FTS_DOC_ID title 3 mysql database 4 mysql database 1 mysql 2 database DROP TABLE t1; # Case 3: Test insert crash recovery CREATE TABLE t1 ( FTS_DOC_ID BIGINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, title VARCHAR(200), FULLTEXT(title) ) ENGINE = InnoDB; INSERT INTO t1(title) VALUES('database'); SET SESSION debug="+d,fts_instrument_sync_debug,fts_write_node_crash"; INSERT INTO t1(title) VALUES('mysql'); ERROR HY000: Lost connection to MySQL server during query # restart After restart SELECT * FROM t1 WHERE MATCH(title) AGAINST ('mysql database'); FTS_DOC_ID title 1 database SET SESSION debug="+d,fts_instrument_sync_debug"; INSERT INTO t1(title) VALUES('mysql'); SET SESSION debug="-d,fts_instrument_sync_debug"; SELECT * FROM t1 WHERE MATCH(title) AGAINST ('mysql database'); FTS_DOC_ID title 1 database 2 mysql DROP TABLE t1; # Case 4: Test sync commit & rollback in background CREATE TABLE t1( id INT AUTO_INCREMENT, title VARCHAR(100), FULLTEXT(title), PRIMARY KEY(id)) ENGINE=InnoDB; SET SESSION debug="+d,fts_instrument_sync"; INSERT INTO t1(title) VALUES('mysql'); SET SESSION debug="-d,fts_instrument_sync"; # restart SET GLOBAL debug="+d,fts_instrument_sync,fts_instrument_sync_interrupted"; INSERT INTO t1(title) VALUES('database'); SET GLOBAL debug="-d,fts_instrument_sync,fts_instrument_sync_interrupted"; SET SESSION debug="+d,fts_instrument_sync_debug"; INSERT INTO t1(title) VALUES('good'); SET SESSION debug="-d,fts_instrument_sync_debug"; SET GLOBAL innodb_ft_aux_table="test/t1"; SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_TABLE; WORD FIRST_DOC_ID LAST_DOC_ID DOC_COUNT DOC_ID POSITION database 4 4 1 4 0 good 5 5 1 5 0 mysql 2 2 1 2 0 SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_CACHE; WORD FIRST_DOC_ID LAST_DOC_ID DOC_COUNT DOC_ID POSITION SET GLOBAL innodb_ft_aux_table=default; SELECT * FROM t1 WHERE MATCH(title) AGAINST ('mysql database good'); id title 1 mysql 2 database 3 good DROP TABLE t1; # # Bug #31310404 I_S_FTS_INDEX_CACHE_FILL_ONE_INDEX() IS NOT PROTECTED BY THE +LOCK # CREATE TABLE t1 ( FTS_DOC_ID BIGINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, title VARCHAR(200), FULLTEXT(title) ) ENGINE = InnoDB; INSERT INTO t1(title) VALUES('mysql'); INSERT INTO t1(title) VALUES('database'); SET SESSION debug="+d,fts_instrument_sync_request"; INSERT INTO t1(title) VALUES('mysql database'); SET SESSION debug="-d,fts_instrument_sync_request"; SET GLOBAL innodb_ft_aux_table="test/t1"; SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_CACHE; WORD FIRST_DOC_ID LAST_DOC_ID DOC_COUNT DOC_ID POSITION SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_TABLE; WORD FIRST_DOC_ID LAST_DOC_ID DOC_COUNT DOC_ID POSITION database 2 3 2 2 0 database 2 3 2 3 6 mysql 1 3 2 1 0 mysql 1 3 2 3 0 SET GLOBAL innodb_ft_aux_table=default; SELECT * FROM t1 WHERE MATCH(title) AGAINST('mysql database'); FTS_DOC_ID title 3 mysql database 1 mysql 2 database DROP TABLE t1;