[Groonga-mysql-commit] mroonga/mroonga [master] [test][wrapper] add expected result for REPAIR TABLE but it doesn't work yet.

アーカイブの一覧に戻る

null+****@clear***** null+****@clear*****
2011年 12月 8日 (木) 10:03:38 JST


Kouhei Sutou	2011-12-08 01:03:38 +0000 (Thu, 08 Dec 2011)

  New Revision: e52631d262fc4f1a637bc6a9002b42cab71702eb

  Log:
    [test][wrapper] add expected result for REPAIR TABLE but it doesn't work yet.
    
    refs #1191

  Added files:
    test/sql/suite/groonga_wrapper/r/repair_table.result
  Modified files:
    test/sql/suite/groonga_wrapper/t/repair_table.test

  Added: test/sql/suite/groonga_wrapper/r/repair_table.result (+33 -0) 100644
===================================================================
--- /dev/null
+++ test/sql/suite/groonga_wrapper/r/repair_table.result    2011-12-08 01:03:38 +0000 (92483d7)
@@ -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;

  Modified: test/sql/suite/groonga_wrapper/t/repair_table.test (+3 -3)
===================================================================
--- test/sql/suite/groonga_wrapper/t/repair_table.test    2011-12-07 18:11:04 +0000 (a6d1797)
+++ test/sql/suite/groonga_wrapper/t/repair_table.test    2011-12-08 01:03:38 +0000 (44d2e97)
@@ -33,7 +33,7 @@ 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
 
@@ -41,11 +41,11 @@ 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;
 




Groonga-mysql-commit メーリングリストの案内
アーカイブの一覧に戻る