blob: 3813b320562b977a89efc1dccda357a881e22d66 (
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
|
CREATE DATABASE repair_test;
USE repair_test;
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 DEFAULT NULL,
`body` text DEFAULT NULL,
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: syscall error 'repair_test.mrn.0000106' (No such file or directory)
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;
|