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 [groonga-dev,02130] Reported by Naoya Murakami. Thanks!!!
- Loading branch information
Showing
1 changed file
with
53 additions
and
0 deletions.
There are no files selected for viewing
53 changes: 53 additions & 0 deletions
53
mysql-test/mroonga/storage/alter_table/t/fulltext_with_reference_table.test
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,53 @@ | ||
| # Copyright(C) 2014 HAYASHI Kentaro <hayashi@clear-code.com> | ||
| # | ||
| # This library is free software; you can redistribute it and/or | ||
| # modify it under the terms of the GNU Lesser General Public | ||
| # License as published by the Free Software Foundation; either | ||
| # version 2.1 of the License, or (at your option) any later version. | ||
| # | ||
| # This library is distributed in the hope that it will be useful, | ||
| # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| # Lesser General Public License for more details. | ||
| # | ||
| # You should have received a copy of the GNU Lesser General Public | ||
| # License along with this library; if not, write to the Free Software | ||
| # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
|
|
||
| --source include/not_embedded.inc | ||
| --source ../../../include/mroonga/have_mroonga.inc | ||
|
|
||
| --disable_warnings | ||
| DROP TABLE IF EXISTS tags; | ||
| DROP TABLE IF EXISTS bugs; | ||
| --enable_warnings | ||
|
|
||
| CREATE TABLE tags ( | ||
| name VARCHAR(64) PRIMARY KEY | ||
| ) ENGINE=mroonga DEFAULT CHARSET=utf8 COMMENT='default_tokenizer "TokenDelimit"'; | ||
|
|
||
| CREATE TABLE bugs ( | ||
| id INT UNSIGNED PRIMARY KEY, | ||
| tags VARCHAR(40) COMMENT 'type "tags"' | ||
| ) ENGINE=mroonga DEFAULT CHARSET=utf8; | ||
|
|
||
| INSERT INTO tags (name) VALUES ("Groonga"); | ||
| INSERT INTO bugs (id, tags) VALUES (1, "Groonga Mroonga"); | ||
|
|
||
| SHOW CREATE TABLE tags; | ||
| SHOW CREATE TABLE bugs; | ||
|
|
||
| SELECT * FROM bugs; | ||
|
|
||
| ALTER TABLE bugs ADD FULLTEXT INDEX bugs_tags_index (tags) COMMENT 'table "tags"'; | ||
|
|
||
| SELECT * FROM bugs | ||
| WHERE MATCH(tags) AGAINST("Groonga"); | ||
|
|
||
| SHOW CREATE TABLE tags; | ||
| SHOW CREATE TABLE bugs; | ||
|
|
||
| DROP TABLE bugs; | ||
| DROP TABLE tags; | ||
|
|
||
| --source ../../../include/mroonga/have_mroonga_deinit.inc |