Navigation Menu

Skip to content

Commit

Permalink
test: alter table with fulltext index which refer to table causes mys…
Browse files Browse the repository at this point in the history
…qld crash

[groonga-dev,02130]

Reported by Naoya Murakami. Thanks!!!
  • Loading branch information
kenhys committed Feb 13, 2014
1 parent 01fd196 commit f606f9f
Showing 1 changed file with 53 additions and 0 deletions.
@@ -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

0 comments on commit f606f9f

Please sign in to comment.