Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: alter table with fulltext index which refer to table causes mys…
…qld crash add test result [groonga-dev,02130] Reported by Naoya Murakami. Thanks!!!
- Loading branch information
Showing
1 changed file
with
50 additions
and
0 deletions.
There are no files selected for viewing
50 changes: 50 additions & 0 deletions
50
mysql-test/mroonga/storage/alter_table/fulltext/r/add_reference_table.result
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| DROP TABLE IF EXISTS tags; | ||
| DROP TABLE IF EXISTS bugs; | ||
| CREATE TABLE tags ( | ||
| name VARCHAR(64) PRIMARY KEY | ||
| ) DEFAULT CHARSET=utf8 COMMENT='default_tokenizer "TokenDelimit"'; | ||
| CREATE TABLE bugs ( | ||
| id INT UNSIGNED PRIMARY KEY, | ||
| tags VARCHAR(40) COMMENT 'type "tags"' | ||
| ) DEFAULT CHARSET=utf8; | ||
| INSERT INTO tags (name) VALUES ("Groonga"); | ||
| INSERT INTO bugs (id, tags) VALUES (1, "Groonga Mroonga"); | ||
| SHOW CREATE TABLE tags; | ||
| Table Create Table | ||
| tags CREATE TABLE `tags` ( | ||
| `name` varchar(64) NOT NULL, | ||
| PRIMARY KEY (`name`) | ||
| ) ENGINE=mroonga DEFAULT CHARSET=utf8 COMMENT='default_tokenizer "TokenDelimit"' | ||
| SHOW CREATE TABLE bugs; | ||
| Table Create Table | ||
| bugs CREATE TABLE `bugs` ( | ||
| `id` int(10) unsigned NOT NULL, | ||
| `tags` varchar(40) DEFAULT NULL COMMENT 'type "tags"', | ||
| PRIMARY KEY (`id`), | ||
| CONSTRAINT `tags` FOREIGN KEY (`tags`) REFERENCES `test`.`tags` (`name`) ON DELETE RESTRICT ON UPDATE RESTRICT | ||
| ) ENGINE=mroonga DEFAULT CHARSET=utf8 | ||
| SELECT * FROM bugs; | ||
| id tags | ||
| 1 groonga mroonga | ||
| ALTER TABLE bugs ADD FULLTEXT INDEX bugs_tags_index (tags) COMMENT 'table "tags"'; | ||
| SELECT * FROM bugs | ||
| WHERE MATCH(tags) AGAINST("Groonga"); | ||
| id tags | ||
| 1 groonga mroonga | ||
| SHOW CREATE TABLE tags; | ||
| Table Create Table | ||
| tags CREATE TABLE `tags` ( | ||
| `name` varchar(64) NOT NULL, | ||
| PRIMARY KEY (`name`) | ||
| ) ENGINE=mroonga DEFAULT CHARSET=utf8 COMMENT='default_tokenizer "TokenDelimit"' | ||
| SHOW CREATE TABLE bugs; | ||
| Table Create Table | ||
| bugs CREATE TABLE `bugs` ( | ||
| `id` int(10) unsigned NOT NULL, | ||
| `tags` varchar(40) DEFAULT NULL COMMENT 'type "tags"', | ||
| PRIMARY KEY (`id`), | ||
| FULLTEXT KEY `bugs_tags_index` (`tags`) COMMENT 'table "tags"', | ||
| CONSTRAINT `tags` FOREIGN KEY (`tags`) REFERENCES `test`.`tags` (`name`) ON DELETE RESTRICT ON UPDATE RESTRICT | ||
| ) ENGINE=mroonga DEFAULT CHARSET=utf8 | ||
| DROP TABLE bugs; | ||
| DROP TABLE tags; |