[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@18.119.135.67: ~ $
# 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
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";
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	2	2	1	2	0
good	3	3	1	3	0
mysql	1	1	1	1	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 PROTECT 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;

Filemanager

Name Type Size Permission Actions
fts_compatibility.result File 9.7 KB 0644
fts_compatibility_win.result File 9.71 KB 0644
fulltext.result File 24.9 KB 0644
fulltext2.result File 7.42 KB 0644
fulltext3.result File 304 B 0644
fulltext_cache.result File 2.77 KB 0644
fulltext_distinct.result File 1.25 KB 0644
fulltext_left_join.result File 4.27 KB 0644
fulltext_misc.result File 10.42 KB 0644
fulltext_multi.result File 965 B 0644
fulltext_order_by.result File 6.18 KB 0644
fulltext_update.result File 946 B 0644
fulltext_var.result File 1.33 KB 0644
innobase_drop_fts_index_table.result File 209 B 0644
innodb-fts-basic.result File 12.32 KB 0644
innodb-fts-ddl.result File 10.25 KB 0644
innodb-fts-fic.result File 7.78 KB 0644
innodb-fts-stopword.result File 31.63 KB 0644
innodb_fts_index_table.result File 6.84 KB 0644
innodb_fts_large_records.result File 9.04 KB 0644
innodb_fts_misc.result File 61.3 KB 0644
innodb_fts_misc_1.result File 38.11 KB 0644
innodb_fts_misc_debug.result File 3.99 KB 0644
innodb_fts_multiple_index.result File 9.16 KB 0644
innodb_fts_opt.result File 22.86 KB 0644
innodb_fts_plugin.result File 1.04 KB 0644
innodb_fts_proximity.result File 7.39 KB 0644
innodb_fts_result_cache_limit.result File 1.48 KB 0644
innodb_fts_savepoint.result File 8.69 KB 0644
innodb_fts_stopword_charset.result File 10.29 KB 0644
innodb_fts_transaction.result File 41.6 KB 0644
phrase.result File 2.09 KB 0644
subexpr.result File 3.88 KB 0644
sync.result File 5.54 KB 0644
sync_block.result File 2.64 KB 0644