Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
00c46681
Commit
00c46681
authored
Oct 27, 2017
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge two innodb_fts tests from MySQL 5.7
parents
786a722e
b4f104c9
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
524 additions
and
0 deletions
+524
-0
mysql-test/suite/innodb_fts/r/sync.result
mysql-test/suite/innodb_fts/r/sync.result
+145
-0
mysql-test/suite/innodb_fts/r/sync_block.result
mysql-test/suite/innodb_fts/r/sync_block.result
+83
-0
mysql-test/suite/innodb_fts/t/sync.opt
mysql-test/suite/innodb_fts/t/sync.opt
+2
-0
mysql-test/suite/innodb_fts/t/sync.test
mysql-test/suite/innodb_fts/t/sync.test
+170
-0
mysql-test/suite/innodb_fts/t/sync_block.test
mysql-test/suite/innodb_fts/t/sync_block.test
+124
-0
No files found.
mysql-test/suite/innodb_fts/r/sync.result
0 → 100644
View file @
00c46681
connect con1,localhost,root,,;
connection default;
# 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');
connection con1;
SET @old_dbug = @@SESSION.debug_dbug;
SET debug_dbug = '+d,fts_instrument_sync_debug';
SET DEBUG_SYNC= 'fts_write_node SIGNAL written WAIT_FOR selected';
INSERT INTO t1(title) VALUES('mysql database');
connection default;
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
database 2 3 2 2 0
database 2 3 2 3 6
mysql 1 3 2 1 0
mysql 1 3 2 3 0
SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_TABLE;
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');
FTS_DOC_ID title
1 mysql
2 database
SET DEBUG_SYNC= 'now SIGNAL selected';
connection con1;
SET @old_dbug = @@SESSION.debug_dbug;
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
connection default;
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');
connection con1;
SET debug_dbug = '+d,fts_instrument_sync_debug';
SET DEBUG_SYNC= 'fts_write_node SIGNAL written WAIT_FOR inserted';
INSERT INTO t1(title) VALUES('mysql database');
connection default;
SET DEBUG_SYNC= 'now WAIT_FOR written';
INSERT INTO t1(title) VALUES('mysql database');
SET DEBUG_SYNC= 'now SIGNAL inserted';
connection con1;
SET debug_dbug = @old_dbug;
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
connection default;
disconnect con1;
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 debug_dbug = '+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 @old_dbug = @@SESSION.debug_dbug;
SET debug_dbug = '+d,fts_instrument_sync_debug';
INSERT INTO t1(title) VALUES('mysql');
SET debug_dbug = @old_dbug;
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 debug_dbug = '+d,fts_instrument_sync';
INSERT INTO t1(title) VALUES('mysql');
SET debug_dbug = @old_dbug;
SET @old_global_dbug = @@GLOBAL.debug_dbug;
SET @old_dbug = @@SESSION.debug_dbug;
SET GLOBAL debug_dbug='+d,fts_instrument_sync,fts_instrument_sync_interrupted';
INSERT INTO t1(title) VALUES('database');
SET GLOBAL debug_dbug = @old_global_dbug;
SET debug_dbug = '+d,fts_instrument_sync_debug';
INSERT INTO t1(title) VALUES('good');
SET debug_dbug = @old_dbug;
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;
mysql-test/suite/innodb_fts/r/sync_block.result
0 → 100644
View file @
00c46681
SET @old_log_output = @@global.log_output;
SET @old_slow_query_log = @@global.slow_query_log;
SET @old_general_log = @@global.general_log;
SET @old_long_query_time = @@global.long_query_time;
SET @old_debug = @@global.debug_dbug;
SET GLOBAL log_output = 'TABLE';
SET GLOBAL general_log = 1;
SET GLOBAL slow_query_log = 1;
SET GLOBAL long_query_time = 1;
connect con1,localhost,root,,;
connect con2,localhost,root,,;
connection default;
# Case 1: Sync blocks DML(insert) on the same table.
CREATE TABLE t1 (
FTS_DOC_ID BIGINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
title VARCHAR(200),
FULLTEXT(title)
) ENGINE = InnoDB;
connection con1;
SET GLOBAL debug_dbug='+d,fts_instrument_sync_debug,fts_instrument_sync_sleep';
SET DEBUG_SYNC= 'fts_sync_begin SIGNAL begin WAIT_FOR continue';
INSERT INTO t1(title) VALUES('mysql database');
connection con2;
SET DEBUG_SYNC= 'now WAIT_FOR begin';
SELECT * FROM t1 WHERE MATCH(title) AGAINST('mysql database');
connection default;
SET DEBUG_SYNC= 'now SIGNAL continue';
connection con1;
/* connection con1 */ INSERT INTO t1(title) VALUES('mysql database');
connection con2;
/* conneciton con2 */ SELECT * FROM t1 WHERE MATCH(title) AGAINST('mysql database');
FTS_DOC_ID title
connection default;
# make con1 & con2 show up in mysql.slow_log
SELECT SLEEP(2);
SLEEP(2)
0
# slow log results should only contain INSERT INTO t1.
SELECT sql_text FROM mysql.slow_log WHERE query_time >= '00:00:02';
sql_text
INSERT INTO t1(title) VALUES('mysql database')
SET GLOBAL debug_dbug = @old_debug_dbug;
TRUNCATE TABLE mysql.slow_log;
DROP TABLE t1;
# Case 2: Sync blocks DML(insert) on other tables.
CREATE TABLE t1 (
FTS_DOC_ID BIGINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
title VARCHAR(200),
FULLTEXT(title)
) ENGINE = InnoDB;
CREATE TABLE t2(id INT);
connection con1;
SET GLOBAL debug_dbug='+d,fts_instrument_sync_request,fts_instrument_sync_sleep';
SET DEBUG_SYNC= 'fts_instrument_sync_request SIGNAL begin WAIT_FOR continue';
INSERT INTO t1(title) VALUES('mysql database');
connection con2;
SET DEBUG_SYNC= 'now WAIT_FOR begin';
INSERT INTO t2 VALUES(1);
connection default;
SET DEBUG_SYNC= 'now SIGNAL continue';
connection con1;
/* connection con1 */ INSERT INTO t1(title) VALUES('mysql database');
connection con2;
/* conneciton con2 */ INSERT INTO t2 VALUES(1);
connection default;
SET DEBUG_SYNC = 'RESET';
# make con1 & con2 show up in mysql.slow_log
SELECT SLEEP(2);
SLEEP(2)
0
# slow log results should be empty here.
SELECT sql_text FROM mysql.slow_log WHERE query_time >= '00:00:02';
sql_text
SET GLOBAL debug_dbug = @old_debug_dbug;
TRUNCATE TABLE mysql.slow_log;
DROP TABLE t1,t2;
disconnect con1;
disconnect con2;
# Restore slow log settings.
SET GLOBAL log_output = @old_log_output;
SET GLOBAL general_log = @old_general_log;
SET GLOBAL slow_query_log = @old_slow_query_log;
SET GLOBAL long_query_time = @old_long_query_time;
mysql-test/suite/innodb_fts/t/sync.opt
0 → 100644
View file @
00c46681
--innodb-ft-index-cache
--innodb-ft-index-table
mysql-test/suite/innodb_fts/t/sync.test
0 → 100644
View file @
00c46681
#
# BUG#22516559 MYSQL INSTANCE STALLS WHEN SYNCING FTS INDEX
#
--
source
include
/
have_innodb
.
inc
--
source
include
/
have_debug_sync
.
inc
--
source
include
/
not_valgrind
.
inc
--
source
include
/
not_embedded
.
inc
--
source
include
/
not_crashrep
.
inc
connect
(
con1
,
localhost
,
root
,,);
connection
default
;
--
echo
# 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'
);
connection
con1
;
SET
@
old_dbug
=
@@
SESSION
.
debug_dbug
;
SET
debug_dbug
=
'+d,fts_instrument_sync_debug'
;
SET
DEBUG_SYNC
=
'fts_write_node SIGNAL written WAIT_FOR selected'
;
send
INSERT
INTO
t1
(
title
)
VALUES
(
'mysql database'
);
connection
default
;
SET
DEBUG_SYNC
=
'now WAIT_FOR written'
;
SET
GLOBAL
innodb_ft_aux_table
=
"test/t1"
;
SELECT
*
FROM
INFORMATION_SCHEMA
.
INNODB_FT_INDEX_CACHE
;
SELECT
*
FROM
INFORMATION_SCHEMA
.
INNODB_FT_INDEX_TABLE
;
SET
GLOBAL
innodb_ft_aux_table
=
default
;
SELECT
*
FROM
t1
WHERE
MATCH
(
title
)
AGAINST
(
'mysql database'
);
SET
DEBUG_SYNC
=
'now SIGNAL selected'
;
connection
con1
;
--
reap
SET
@
old_dbug
=
@@
SESSION
.
debug_dbug
;
SET
GLOBAL
innodb_ft_aux_table
=
"test/t1"
;
SELECT
*
FROM
INFORMATION_SCHEMA
.
INNODB_FT_INDEX_CACHE
;
SELECT
*
FROM
INFORMATION_SCHEMA
.
INNODB_FT_INDEX_TABLE
;
SET
GLOBAL
innodb_ft_aux_table
=
default
;
SELECT
*
FROM
t1
WHERE
MATCH
(
title
)
AGAINST
(
'mysql database'
);
connection
default
;
DROP
TABLE
t1
;
--
echo
# 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'
);
connection
con1
;
SET
debug_dbug
=
'+d,fts_instrument_sync_debug'
;
SET
DEBUG_SYNC
=
'fts_write_node SIGNAL written WAIT_FOR inserted'
;
send
INSERT
INTO
t1
(
title
)
VALUES
(
'mysql database'
);
connection
default
;
SET
DEBUG_SYNC
=
'now WAIT_FOR written'
;
INSERT
INTO
t1
(
title
)
VALUES
(
'mysql database'
);
SET
DEBUG_SYNC
=
'now SIGNAL inserted'
;
connection
con1
;
--
reap
SET
debug_dbug
=
@
old_dbug
;
SET
GLOBAL
innodb_ft_aux_table
=
"test/t1"
;
SELECT
*
FROM
INFORMATION_SCHEMA
.
INNODB_FT_INDEX_CACHE
;
SELECT
*
FROM
INFORMATION_SCHEMA
.
INNODB_FT_INDEX_TABLE
;
SET
GLOBAL
innodb_ft_aux_table
=
default
;
SELECT
*
FROM
t1
WHERE
MATCH
(
title
)
AGAINST
(
'mysql database'
);
connection
default
;
disconnect
con1
;
DROP
TABLE
t1
;
--
echo
# Case 3: Test insert crash recovery
--
let
$_expect_file_name
=
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
$_server_id
.
expect
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'
);
--
exec
echo
"restart"
>
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
SET
debug_dbug
=
'+d,fts_instrument_sync_debug,fts_write_node_crash'
;
--
error
2013
INSERT
INTO
t1
(
title
)
VALUES
(
'mysql'
);
--
source
include
/
start_mysqld
.
inc
--
echo
After
restart
SELECT
*
FROM
t1
WHERE
MATCH
(
title
)
AGAINST
(
'mysql database'
);
SET
@
old_dbug
=
@@
SESSION
.
debug_dbug
;
SET
debug_dbug
=
'+d,fts_instrument_sync_debug'
;
INSERT
INTO
t1
(
title
)
VALUES
(
'mysql'
);
SET
debug_dbug
=
@
old_dbug
;
SELECT
*
FROM
t1
WHERE
MATCH
(
title
)
AGAINST
(
'mysql database'
);
DROP
TABLE
t1
;
--
echo
# 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
debug_dbug
=
'+d,fts_instrument_sync'
;
INSERT
INTO
t1
(
title
)
VALUES
(
'mysql'
);
SET
debug_dbug
=
@
old_dbug
;
--
source
include
/
restart_mysqld
.
inc
SET
@
old_global_dbug
=
@@
GLOBAL
.
debug_dbug
;
SET
@
old_dbug
=
@@
SESSION
.
debug_dbug
;
SET
GLOBAL
debug_dbug
=
'+d,fts_instrument_sync,fts_instrument_sync_interrupted'
;
INSERT
INTO
t1
(
title
)
VALUES
(
'database'
);
SET
GLOBAL
debug_dbug
=
@
old_global_dbug
;
SET
debug_dbug
=
'+d,fts_instrument_sync_debug'
;
INSERT
INTO
t1
(
title
)
VALUES
(
'good'
);
SET
debug_dbug
=
@
old_dbug
;
SET
GLOBAL
innodb_ft_aux_table
=
"test/t1"
;
SELECT
*
FROM
INFORMATION_SCHEMA
.
INNODB_FT_INDEX_TABLE
;
SELECT
*
FROM
INFORMATION_SCHEMA
.
INNODB_FT_INDEX_CACHE
;
SET
GLOBAL
innodb_ft_aux_table
=
default
;
SELECT
*
FROM
t1
WHERE
MATCH
(
title
)
AGAINST
(
'mysql database good'
);
DROP
TABLE
t1
;
mysql-test/suite/innodb_fts/t/sync_block.test
0 → 100644
View file @
00c46681
#
# BUG#22516559 MYSQL INSTANCE STALLS WHEN SYNCING FTS INDEX
#
--
source
include
/
have_innodb
.
inc
--
source
include
/
have_debug
.
inc
--
source
include
/
have_debug_sync
.
inc
--
source
include
/
have_log_bin
.
inc
--
source
include
/
count_sessions
.
inc
SET
@
old_log_output
=
@@
global
.
log_output
;
SET
@
old_slow_query_log
=
@@
global
.
slow_query_log
;
SET
@
old_general_log
=
@@
global
.
general_log
;
SET
@
old_long_query_time
=
@@
global
.
long_query_time
;
SET
@
old_debug
=
@@
global
.
debug_dbug
;
SET
GLOBAL
log_output
=
'TABLE'
;
SET
GLOBAL
general_log
=
1
;
SET
GLOBAL
slow_query_log
=
1
;
SET
GLOBAL
long_query_time
=
1
;
connect
(
con1
,
localhost
,
root
,,);
connect
(
con2
,
localhost
,
root
,,);
connection
default
;
--
echo
# Case 1: Sync blocks DML(insert) on the same table.
CREATE
TABLE
t1
(
FTS_DOC_ID
BIGINT
UNSIGNED
AUTO_INCREMENT
NOT
NULL
PRIMARY
KEY
,
title
VARCHAR
(
200
),
FULLTEXT
(
title
)
)
ENGINE
=
InnoDB
;
connection
con1
;
SET
GLOBAL
debug_dbug
=
'+d,fts_instrument_sync_debug,fts_instrument_sync_sleep'
;
SET
DEBUG_SYNC
=
'fts_sync_begin SIGNAL begin WAIT_FOR continue'
;
send
INSERT
INTO
t1
(
title
)
VALUES
(
'mysql database'
);
connection
con2
;
SET
DEBUG_SYNC
=
'now WAIT_FOR begin'
;
send
SELECT
*
FROM
t1
WHERE
MATCH
(
title
)
AGAINST
(
'mysql database'
);
connection
default
;
SET
DEBUG_SYNC
=
'now SIGNAL continue'
;
connection
con1
;
--
echo
/* connection con1 */
INSERT
INTO
t1
(
title
)
VALUES
(
'mysql database'
);
--
reap
connection
con2
;
--
echo
/* conneciton con2 */
SELECT
*
FROM
t1
WHERE
MATCH
(
title
)
AGAINST
(
'mysql database'
);
--
reap
connection
default
;
--
echo
# make con1 & con2 show up in mysql.slow_log
SELECT
SLEEP
(
2
);
--
echo
# slow log results should only contain INSERT INTO t1.
SELECT
sql_text
FROM
mysql
.
slow_log
WHERE
query_time
>=
'00:00:02'
;
SET
GLOBAL
debug_dbug
=
@
old_debug_dbug
;
TRUNCATE
TABLE
mysql
.
slow_log
;
DROP
TABLE
t1
;
--
echo
# Case 2: Sync blocks DML(insert) on other tables.
CREATE
TABLE
t1
(
FTS_DOC_ID
BIGINT
UNSIGNED
AUTO_INCREMENT
NOT
NULL
PRIMARY
KEY
,
title
VARCHAR
(
200
),
FULLTEXT
(
title
)
)
ENGINE
=
InnoDB
;
CREATE
TABLE
t2
(
id
INT
);
connection
con1
;
SET
GLOBAL
debug_dbug
=
'+d,fts_instrument_sync_request,fts_instrument_sync_sleep'
;
SET
DEBUG_SYNC
=
'fts_instrument_sync_request SIGNAL begin WAIT_FOR continue'
;
send
INSERT
INTO
t1
(
title
)
VALUES
(
'mysql database'
);
connection
con2
;
SET
DEBUG_SYNC
=
'now WAIT_FOR begin'
;
send
INSERT
INTO
t2
VALUES
(
1
);
connection
default
;
SET
DEBUG_SYNC
=
'now SIGNAL continue'
;
connection
con1
;
--
echo
/* connection con1 */
INSERT
INTO
t1
(
title
)
VALUES
(
'mysql database'
);
--
reap
connection
con2
;
--
echo
/* conneciton con2 */
INSERT
INTO
t2
VALUES
(
1
);
--
reap
connection
default
;
SET
DEBUG_SYNC
=
'RESET'
;
--
echo
# make con1 & con2 show up in mysql.slow_log
SELECT
SLEEP
(
2
);
--
echo
# slow log results should be empty here.
SELECT
sql_text
FROM
mysql
.
slow_log
WHERE
query_time
>=
'00:00:02'
;
SET
GLOBAL
debug_dbug
=
@
old_debug_dbug
;
TRUNCATE
TABLE
mysql
.
slow_log
;
DROP
TABLE
t1
,
t2
;
disconnect
con1
;
disconnect
con2
;
--
source
include
/
wait_until_count_sessions
.
inc
--
echo
# Restore slow log settings.
SET
GLOBAL
log_output
=
@
old_log_output
;
SET
GLOBAL
general_log
=
@
old_general_log
;
SET
GLOBAL
slow_query_log
=
@
old_slow_query_log
;
SET
GLOBAL
long_query_time
=
@
old_long_query_time
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment