blob: 61c8e18b17d4946246756ebb6f9c72941078fc7c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
DROP DATABASE IF EXISTS repair_test;
CREATE DATABASE repair_test;
USE repair_test;
DROP TABLE IF EXISTS diaries;
CREATE TABLE diaries (
id INT PRIMARY KEY AUTO_INCREMENT,
title TEXT,
body TEXT,
FULLTEXT INDEX body_index (body)
) COMMENT = 'engine "innodb"' DEFAULT CHARSET UTF8;
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 `body_index` (`body`)
) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"'
INSERT INTO diaries (title, body) VALUES ("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 WHERE MATCH(body) AGAINST("starting");
id title body
2 groonga (1) starting groonga...
FLUSH TABLES;
SELECT * FROM diaries WHERE MATCH(body) AGAINST("starting");
ERROR HY000: mroonga: failed to open table: <diaries>
REPAIR TABLE diaries;
Table Op Msg_type Msg_text
repair_test.diaries repair status OK
SELECT * FROM diaries;
id title body
1 survey will start groonga!
2 groonga (1) starting groonga...
3 groonga (2) started groonga.
SELECT * FROM diaries WHERE MATCH(body) AGAINST("starting");
id title body
2 groonga (1) starting groonga...
DROP TABLE diaries;
DROP DATABASE repair_test;
USE test;
|