Navigation Menu

Skip to content

Commit

Permalink
[wrapper][test] use new database for repair test.
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Jan 24, 2012
1 parent 2dc14f0 commit d5c9039
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
9 changes: 7 additions & 2 deletions test/sql/suite/mroonga_wrapper/r/repair_table.result
@@ -1,3 +1,6 @@
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,
Expand All @@ -22,10 +25,10 @@ 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)
ERROR HY000: syscall error 'repair_test.mrn.0000101' (No such file or directory)
REPAIR TABLE diaries;
Table Op Msg_type Msg_text
test.diaries repair status OK
repair_test.diaries repair status OK
SELECT * FROM diaries;
id title body
1 survey will start groonga!
Expand All @@ -35,3 +38,5 @@ 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;
11 changes: 9 additions & 2 deletions test/sql/suite/mroonga_wrapper/t/repair_table.test
Expand Up @@ -18,6 +18,10 @@
--source include/have_mroonga_helper.inc

--disable_warnings
DROP DATABASE IF EXISTS repair_test;
CREATE DATABASE repair_test;
USE repair_test;

DROP TABLE IF EXISTS diaries;
--enable_warnings

Expand All @@ -35,11 +39,11 @@ INSERT INTO diaries (title, body) VALUES ("groonga (2)", "started groonga.");

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

--remove_file $MYSQLD_DATADIR/test.mrn.0000101
--remove_file $MYSQLD_DATADIR/repair_test.mrn.0000101

FLUSH TABLES;

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

Expand All @@ -51,4 +55,7 @@ SELECT * FROM diaries WHERE MATCH(body) AGAINST("starting");

DROP TABLE diaries;

DROP DATABASE repair_test;
USE test;

--source include/have_mroonga_deinit.inc

0 comments on commit d5c9039

Please sign in to comment.