summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-09-27 13:58:01 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-09-27 14:05:39 +0300
commit4ec0c346b80901c27a25aae0adb805d8aab4e81d (patch)
tree028e3dad6c997b7cabc2cee5d76a7cd610227b37
parentca9e0089d5d9c8777c58b1e44ff97e7bcb1bdddf (diff)
downloadmariadb-git-4ec0c346b80901c27a25aae0adb805d8aab4e81d.tar.gz
Remove a useless large test, and add a debug assertion
The test innodb_fts.fulltext_table_evict was only creating 1000 tables with fulltext indexes, only to check that no tables with fulltext indexes are being evicted. The reason why tables containing fulltext indexes cannot be evicted is that fts_optimize_init() invokes dict_table_prevent_eviction().
-rw-r--r--mysql-test/suite/innodb_fts/r/fulltext_table_evict.result19
-rw-r--r--mysql-test/suite/innodb_fts/t/fulltext_table_evict.test49
-rw-r--r--mysql-test/unstable-tests1
-rw-r--r--storage/innobase/dict/dict0dict.cc9
4 files changed, 1 insertions, 77 deletions
diff --git a/mysql-test/suite/innodb_fts/r/fulltext_table_evict.result b/mysql-test/suite/innodb_fts/r/fulltext_table_evict.result
deleted file mode 100644
index d9d329aa6c0..00000000000
--- a/mysql-test/suite/innodb_fts/r/fulltext_table_evict.result
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Bug Bug #27304661 MYSQL CRASH DOING SYNC INDEX ]
-# [FATAL] INNODB: SEMAPHORE WAIT HAS LASTED > 600
-#
-CREATE TABLE t1 (
-id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
-f1 TEXT(500),
-FULLTEXT idx (f1)
-) ENGINE=InnoDB;
-insert into t1 (f1) values ('fjdhfsjhf'),('dhjfhjshfj'),('dhjafjhfj');
-set @save_table_definition_cache=@@global.table_definition_cache;
-set @save_table_open_cache=@@global.table_open_cache;
-set global table_definition_cache=400;
-set global table_open_cache= 1024;
-SET @save_dbug = @@GLOBAL.debug_dbug;
-SET GLOBAL DEBUG_DBUG="+d,crash_if_fts_table_is_evicted";
-set @@global.table_definition_cache=@save_table_definition_cache;
-set @@global.table_open_cache=@save_table_open_cache;
-drop table t1;
diff --git a/mysql-test/suite/innodb_fts/t/fulltext_table_evict.test b/mysql-test/suite/innodb_fts/t/fulltext_table_evict.test
deleted file mode 100644
index eaf50856c55..00000000000
--- a/mysql-test/suite/innodb_fts/t/fulltext_table_evict.test
+++ /dev/null
@@ -1,49 +0,0 @@
---source include/have_innodb.inc
---source include/have_debug.inc
---source include/big_test.inc
---source include/have_64bit.inc
-
---echo #
---echo # Bug Bug #27304661 MYSQL CRASH DOING SYNC INDEX ]
---echo # [FATAL] INNODB: SEMAPHORE WAIT HAS LASTED > 600
---echo #
-
-CREATE TABLE t1 (
- id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
- f1 TEXT(500),
- FULLTEXT idx (f1)
- ) ENGINE=InnoDB;
-insert into t1 (f1) values ('fjdhfsjhf'),('dhjfhjshfj'),('dhjafjhfj');
-
---source include/restart_mysqld.inc
-
-set @save_table_definition_cache=@@global.table_definition_cache;
-set @save_table_open_cache=@@global.table_open_cache;
-
-set global table_definition_cache=400;
-set global table_open_cache= 1024;
-
-SET @save_dbug = @@GLOBAL.debug_dbug;
-SET GLOBAL DEBUG_DBUG="+d,crash_if_fts_table_is_evicted";
-#Create 1000 tables, try the best to evict t1 .
-
---disable_query_log
-let $loop=1000;
-while($loop)
-{
- eval create table t_$loop(id int, name text(100), fulltext idxt_$loop(name) )engine=innodb;
- dec $loop;
-}
-
-let $loop=1000;
-while($loop)
-{
- eval drop table t_$loop;
- dec $loop;
-}
-
-SET GLOBAL DEBUG_DBUG = @save_dbug;
---enable_query_log
-set @@global.table_definition_cache=@save_table_definition_cache;
-set @@global.table_open_cache=@save_table_open_cache;
-drop table t1;
diff --git a/mysql-test/unstable-tests b/mysql-test/unstable-tests
index 79d278b5bff..556ae663b1e 100644
--- a/mysql-test/unstable-tests
+++ b/mysql-test/unstable-tests
@@ -519,7 +519,6 @@ innodb.xa_recovery : MDEV-15279 - mysqld got exception
#-----------------------------------------------------------------------
innodb_fts.fulltext2 : Modified in 10.2.26
-innodb_fts.fulltext_table_evict : Modified in 10.2.27
innodb_fts.innodb_fts_misc : Modified in 10.2.27
innodb_fts.innodb_fts_misc_debug : MDEV-14156 - Unexpected warning
innodb_fts.innodb_fts_plugin : MDEV-13888 - Errors in server log
diff --git a/storage/innobase/dict/dict0dict.cc b/storage/innobase/dict/dict0dict.cc
index 5d636f59225..7103ee974d7 100644
--- a/storage/innobase/dict/dict0dict.cc
+++ b/storage/innobase/dict/dict0dict.cc
@@ -1442,14 +1442,7 @@ dict_make_room_in_cache(
prev_table = UT_LIST_GET_PREV(table_LRU, table);
if (dict_table_can_be_evicted(table)) {
-
- DBUG_EXECUTE_IF("crash_if_fts_table_is_evicted",
- {
- if (table->fts &&
- dict_table_has_fts_index(table)) {
- ut_ad(0);
- }
- };);
+ ut_ad(!table->fts);
dict_table_remove_from_cache_low(table, TRUE);
++n_evicted;