summaryrefslogtreecommitdiff
path: root/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_fulltext.result
diff options
context:
space:
mode:
Diffstat (limited to 'storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_fulltext.result')
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_fulltext.result52
1 files changed, 52 insertions, 0 deletions
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_fulltext.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_fulltext.result
new file mode 100644
index 00000000000..cc64daac30a
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_fulltext.result
@@ -0,0 +1,52 @@
+DROP TABLE IF EXISTS diaries;
+CREATE TABLE diaries (
+id INT PRIMARY KEY AUTO_INCREMENT,
+title TEXT,
+FULLTEXT INDEX title_index (title)
+) DEFAULT CHARSET UTF8 COMMENT = 'ENGINE "InnoDB"';
+SHOW CREATE TABLE diaries;
+Table Create Table
+diaries CREATE TABLE `diaries` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `title` text,
+ PRIMARY KEY (`id`),
+ FULLTEXT KEY `title_index` (`title`)
+) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"'
+INSERT INTO diaries (title) VALUES ("survey");
+SELECT * FROM diaries;
+id title
+1 survey
+ALTER TABLE diaries ADD COLUMN body TEXT;
+UPDATE diaries SET body = "will start groonga!";
+SELECT * FROM diaries;
+id title body
+1 survey will start groonga!
+INSERT INTO diaries (title, body) values ("groonga (1)", "starting groonga...");
+INSERT INTO diaries (title, body) values ("groonga (2)", "started groonga.");
+SELECT * FROM diaries;
+id title body
+1 survey will start groonga!
+2 groonga (1) starting groonga...
+3 groonga (2) started groonga.
+ALTER TABLE diaries ADD FULLTEXT INDEX body_index (body);
+SELECT * FROM diaries
+WHERE MATCH(title) AGAINST("survey") AND
+MATCH(body) AGAINST("groonga");
+id title body
+1 survey will start groonga!
+SELECT * FROM diaries
+WHERE MATCH(title) AGAINST("groonga") AND
+MATCH(body) AGAINST("starting");
+id title body
+2 groonga (1) starting groonga...
+SHOW CREATE TABLE diaries;
+Table Create Table
+diaries CREATE TABLE `diaries` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `title` text,
+ `body` text,
+ PRIMARY KEY (`id`),
+ FULLTEXT KEY `title_index` (`title`),
+ FULLTEXT KEY `body_index` (`body`)
+) ENGINE=Mroonga AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"'
+DROP TABLE diaries;