| 1 |
# |
| 2 |
# Bug 11933790 - INNODB ASSERTS TRX->IN_MYSQL_TRX_LIST IN ANALYZE WITH |
| 3 |
# PERSISTENT STATS |
| 4 |
# |
| 5 |
|
| 6 |
|
| 7 |
# we are only interested that the below commands do not crash the server |
| 8 |
-- disable_query_log |
| 9 |
call mtr.add_suppression("\\[ERROR\\] .*MY-\\d+.* Cannot save table statistics for table `test`\.`bug11933790`: Lock wait timeout"); |
| 10 |
-- disable_result_log |
| 11 |
|
| 12 |
CREATE TABLE bug11933790 (c INT) ENGINE=INNODB STATS_PERSISTENT=1; |
| 13 |
|
| 14 |
# add some records to mysql.innodb_table_stats |
| 15 |
ANALYZE TABLE bug11933790; |
| 16 |
|
| 17 |
SET autocommit=0; |
| 18 |
|
| 19 |
# lock the records in mysql.innodb_table_stats |
| 20 |
SELECT * FROM mysql.innodb_table_stats FOR UPDATE; |
| 21 |
|
| 22 |
-- connect (con1,localhost,root,,) |
| 23 |
|
| 24 |
-- connection con1 |
| 25 |
|
| 26 |
# this will fail with lock wait timeout; if the bug is present then mysqld |
| 27 |
# crashes here |
| 28 |
-- enable_query_log |
| 29 |
-- enable_result_log |
| 30 |
ANALYZE TABLE bug11933790; |
| 31 |
|
| 32 |
-- connection default |
| 33 |
|
| 34 |
-- disconnect con1 |
| 35 |
|
| 36 |
COMMIT; |
| 37 |
|
| 38 |
DROP TABLE bug11933790; |