File tree Expand file tree Collapse file tree 4 files changed +27
-6
lines changed
mysql-test/suite/innodb_fts Expand file tree Collapse file tree 4 files changed +27
-6
lines changed Original file line number Diff line number Diff line change @@ -734,15 +734,21 @@ count(*)
734
734
DROP TABLE t1;
735
735
"----------Test27---------"
736
736
CREATE TABLE t1 (id INT,char_column VARCHAR(60));
737
+ CREATE TABLE t2 (FTS_DOC_ID BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, a TEXT)ENGINE=InnoDB;
738
+ ALTER TABLE t2 DROP a;
737
739
SET @@autocommit=0;
738
740
CREATE FULLTEXT INDEX i ON t1 (char_column);
739
741
INSERT INTO t1 values (1,'aaa');
740
742
"restart server..."
741
- # Restart the server
742
- --source include/restart_mysqld.inc
743
- DELETE FROM t1 WHERE MATCH(char_column) AGAINST ('bbb')
743
+ SHOW CREATE TABLE t2;
744
+ Table Create Table
745
+ t2 CREATE TABLE `t2` (
746
+ `FTS_DOC_ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
747
+ PRIMARY KEY (`FTS_DOC_ID`)
748
+ ) ENGINE=InnoDB DEFAULT CHARSET=latin1
749
+ DELETE FROM t1 WHERE MATCH(char_column) AGAINST ('bbb');
744
750
SET @@autocommit=1;
745
- DROP TABLE t1;
751
+ DROP TABLE t1, t2 ;
746
752
"----------Test28---------"
747
753
drop table if exists `fts_test`;
748
754
Warnings:
Original file line number Diff line number Diff line change @@ -667,15 +667,18 @@ DROP TABLE t1;
667
667
--echo "----------Test27---------"
668
668
#27 Crash after server restart
669
669
CREATE TABLE t1 (id INT,char_column VARCHAR(60));
670
+ CREATE TABLE t2 (FTS_DOC_ID BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, a TEXT)ENGINE=InnoDB;
671
+ ALTER TABLE t2 DROP a;
670
672
SET @@autocommit=0;
671
673
CREATE FULLTEXT INDEX i ON t1 (char_column);
672
674
INSERT INTO t1 values (1,'aaa');
673
- echo "restart server..."
675
+ echo "restart server...";
674
676
# Restart the server
675
677
--source include/restart_mysqld.inc
678
+ SHOW CREATE TABLE t2;
676
679
DELETE FROM t1 WHERE MATCH(char_column) AGAINST ('bbb');
677
680
SET @@autocommit=1;
678
- DROP TABLE t1;
681
+ DROP TABLE t1, t2 ;
679
682
680
683
--echo "----------Test28---------"
681
684
drop table if exists `fts_test`;
Original file line number Diff line number Diff line change @@ -2614,6 +2614,12 @@ UNIV_INTERN void fts_optimize_add_table(dict_table_t* table)
2614
2614
return ;
2615
2615
}
2616
2616
2617
+ /* If there is no fts index present then don't add to
2618
+ optimize queue. */
2619
+ if (!ib_vector_size (table->fts ->indexes )) {
2620
+ return ;
2621
+ }
2622
+
2617
2623
/* Make sure table with FTS index cannot be evicted */
2618
2624
if (table->can_be_evicted ) {
2619
2625
dict_table_move_from_lru_to_non_lru (table);
Original file line number Diff line number Diff line change @@ -2614,6 +2614,12 @@ UNIV_INTERN void fts_optimize_add_table(dict_table_t* table)
2614
2614
return ;
2615
2615
}
2616
2616
2617
+ /* If there is no fts index present then don't add to
2618
+ optimize queue. */
2619
+ if (!ib_vector_size (table->fts ->indexes )) {
2620
+ return ;
2621
+ }
2622
+
2617
2623
/* Make sure table with FTS index cannot be evicted */
2618
2624
if (table->can_be_evicted ) {
2619
2625
dict_table_move_from_lru_to_non_lru (table);
You can’t perform that action at this time.
0 commit comments