Navigation Menu

Skip to content

Commit

Permalink
[test][wrapper] add expected result for REPAIR TABLE but it doesn't w…
Browse files Browse the repository at this point in the history
…ork yet.

refs #1191
  • Loading branch information
kou committed Dec 8, 2011
1 parent 28308db commit e52631d
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 3 deletions.
33 changes: 33 additions & 0 deletions test/sql/suite/groonga_wrapper/r/repair_table.result
@@ -0,0 +1,33 @@
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=groonga 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 'test.mrn.0000101' (No such file or directory)
REPAIR TABLE diaries;
Table Op Msg_type Msg_text
test.diaries repair note Table does not support optimize, doing recreate + analyze instead
test.diaries repair status OK
SELECT * FROM diaries WHERE MATCH(body) AGAINST("starting");
id title body
2 groonga (1) starting groonga...
DROP TABLE diaries;
6 changes: 3 additions & 3 deletions test/sql/suite/groonga_wrapper/t/repair_table.test
Expand Up @@ -33,19 +33,19 @@ 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("groonga");
SELECT * FROM diaries WHERE MATCH(body) AGAINST("starting");

--remove_file $MYSQLD_DATADIR/test.mrn.0000101

FLUSH TABLES;

# Error 1016 syscall error 'test.mrn.0000101' (No such file or directory)
--error 1016
SELECT * FROM diaries WHERE MATCH(body) AGAINST("groonga");
SELECT * FROM diaries WHERE MATCH(body) AGAINST("starting");

REPAIR TABLE diaries;

SELECT * FROM diaries WHERE MATCH(body) AGAINST("groonga");
SELECT * FROM diaries WHERE MATCH(body) AGAINST("starting");

DROP TABLE diaries;

Expand Down

0 comments on commit e52631d

Please sign in to comment.