[Groonga-mysql-commit] mroonga/mroonga [fix-for-visual-studio] [test][truncate][storage] add expected result. refs #1151

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Oct 4 10:32:10 JST 2012


Kouhei Sutou	2011-11-21 16:32:48 +0900 (Mon, 21 Nov 2011)

  New Revision: 602f41fbfb0783484ed29c1979c96c9aa8fa401b
  https://github.com/mroonga/mroonga/commit/602f41fbfb0783484ed29c1979c96c9aa8fa401b

  Log:
    [test][truncate][storage] add expected result. refs #1151

  Added files:
    test/sql/suite/groonga_storage/r/truncate.result

  Added: test/sql/suite/groonga_storage/r/truncate.result (+45 -0) 100644
===================================================================
--- /dev/null
+++ test/sql/suite/groonga_storage/r/truncate.result    2011-11-21 16:32:48 +0900 (4562681)
@@ -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;
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-mysql-commit mailing list
Back to archive index