Navigation Menu

Skip to content

Commit

Permalink
[test][truncate][storage] add expected result. refs #1151
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Nov 21, 2011
1 parent fd8f057 commit 602f41f
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions test/sql/suite/groonga_storage/r/truncate.result
@@ -0,0 +1,45 @@
DROP TABLE IF EXISTS diaries;
SET NAMES UTF8;
CREATE TABLE diaries (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
year INT UNSIGNED,
month INT UNSIGNED,
day INT UNSIGNED,
title VARCHAR(255),
content TEXT,
FULLTEXT INDEX(content),
KEY(day)
) DEFAULT CHARSET UTF8;
SHOW CREATE TABLE diaries;
Table Create Table
diaries CREATE TABLE `diaries` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`year` int(10) unsigned DEFAULT NULL,
`month` int(10) unsigned DEFAULT NULL,
`day` int(10) unsigned DEFAULT NULL,
`title` varchar(255) DEFAULT NULL,
`content` text,
PRIMARY KEY (`id`),
KEY `day` (`day`),
FULLTEXT KEY `content` (`content`)
) ENGINE=groonga DEFAULT CHARSET=utf8
INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日からはじめました。");
INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日の富士山の天気について");
INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気がよくてきれいに見える。");
TRUNCATE TABLE diaries;
SELECT * FROM diaries;
id year month day title content
SELECT * FROM diaries WHERE MATCH(content) AGAINST("今日 天気" IN BOOLEAN MODE);
id year month day title content
INSERT INTO diaries VALUES(1, 2011, 11, 11, "帰り道", "つかれたー");
INSERT INTO diaries VALUES(2, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。");
INSERT INTO diaries VALUES(3, 2011, 12, 2, "初雪", "今年はじめての雪!");
SELECT * FROM diaries;
id year month day title content
1 2011 11 11 帰り道 つかれたー
2 2011 12 1 久しぶり 天気が悪いからずっと留守番。
3 2011 12 2 初雪 今年はじめての雪!
SELECT * FROM diaries WHERE MATCH(content) AGAINST("今日 天気" IN BOOLEAN MODE);
id year month day title content
2 2011 12 1 久しぶり 天気が悪いからずっと留守番。
DROP TABLE diaries;

0 comments on commit 602f41f

Please sign in to comment.