[Groonga-mysql-commit] mroonga/mroonga [master] [test][storage] add a test for insert/select decimal column value.

Zurück zum Archiv-Index

null+****@clear***** null+****@clear*****
2012年 1月 14日 (土) 12:26:16 JST


Kouhei Sutou	2012-01-14 12:26:16 +0900 (Sat, 14 Jan 2012)

  New Revision: 9c7587b8e501f0a2343580c90e65854e532c51de

  Log:
    [test][storage] add a test for insert/select decimal column value.
    
    refs #1249

  Added files:
    test/sql/suite/mroonga_storage/r/column_decimal.result
    test/sql/suite/mroonga_storage/t/column_decimal.test

  Added: test/sql/suite/mroonga_storage/r/column_decimal.result (+23 -0) 100644
===================================================================
--- /dev/null
+++ test/sql/suite/mroonga_storage/r/column_decimal.result    2012-01-14 12:26:16 +0900 (c41bcc6)
@@ -0,0 +1,23 @@
+DROP TABLE IF EXISTS diaries;
+CREATE TABLE diaries (
+id INT PRIMARY KEY AUTO_INCREMENT,
+title TEXT,
+temperature DECIMAL(6, 3)
+) DEFAULT CHARSET UTF8;
+SHOW CREATE TABLE diaries;
+Table	Create Table
+diaries	CREATE TABLE `diaries` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `title` text,
+  `temperature` decimal(6,3) DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=mroonga DEFAULT CHARSET=utf8
+INSERT INTO diaries (title, temperature) VALUES ("clear day", 21.281);
+INSERT INTO diaries (title, temperature) VALUES ("rainy day", 14.213);
+INSERT INTO diaries (title, temperature) VALUES ("cloudy day", 17.821);
+SELECT * FROM diaries;
+id	title	temperature
+1	clear day	21.281
+2	rainy day	14.213
+3	cloudy day	17.821
+DROP TABLE diaries;

  Added: test/sql/suite/mroonga_storage/t/column_decimal.test (+37 -0) 100644
===================================================================
--- /dev/null
+++ test/sql/suite/mroonga_storage/t/column_decimal.test    2012-01-14 12:26:16 +0900 (bd395f0)
@@ -0,0 +1,37 @@
+# Copyright(C) 2012 Kouhei Sutou <kou****@clear*****>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+--source include/have_mroonga.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS diaries;
+--enable_warnings
+
+CREATE TABLE diaries (
+  id INT PRIMARY KEY AUTO_INCREMENT,
+  title TEXT,
+  temperature DECIMAL(6, 3)
+) DEFAULT CHARSET UTF8;
+SHOW CREATE TABLE diaries;
+
+INSERT INTO diaries (title, temperature) VALUES ("clear day", 21.281);
+INSERT INTO diaries (title, temperature) VALUES ("rainy day", 14.213);
+INSERT INTO diaries (title, temperature) VALUES ("cloudy day", 17.821);
+SELECT * FROM diaries;
+
+DROP TABLE diaries;
+
+--source include/have_mroonga_deinit.inc




Groonga-mysql-commit メーリングリストの案内
Zurück zum Archiv-Index