[Groonga-mysql-commit] mroonga/mroonga [fix-for-visual-studio] test: add a test for DECIMAL with fractional seconds for PRIMARY KEY.

Back to archive index

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


Kouhei Sutou	2012-02-17 16:55:54 +0900 (Fri, 17 Feb 2012)

  New Revision: 0bb1ea54e943545f24b163898a815ebf05a3caf6
  https://github.com/mroonga/mroonga/commit/0bb1ea54e943545f24b163898a815ebf05a3caf6

  Log:
    test: add a test for DECIMAL with fractional seconds for PRIMARY KEY.

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

  Added: test/sql/suite/mroonga_storage/r/primary_key_decimal_with_fractional_seconds.result (+25 -0) 100644
===================================================================
--- /dev/null
+++ test/sql/suite/mroonga_storage/r/primary_key_decimal_with_fractional_seconds.result    2012-02-17 16:55:54 +0900 (e6487b4)
@@ -0,0 +1,25 @@
+DROP TABLE IF EXISTS releases;
+CREATE TABLE releases (
+version DECIMAL(6, 3) PRIMARY KEY,
+message TEXT
+) DEFAULT CHARSET UTF8;
+SHOW CREATE TABLE releases;
+Table	Create Table
+releases	CREATE TABLE `releases` (
+  `version` decimal(6,3) NOT NULL,
+  `message` text,
+  PRIMARY KEY (`version`)
+) ENGINE=mroonga DEFAULT CHARSET=utf8
+INSERT INTO releases (version, message) VALUES (10.000, "10th release!");
+INSERT INTO releases (version, message) VALUES (10.001, "minor fix.");
+INSERT INTO releases (version, message) VALUES (999.999, "the last release!");
+SELECT * FROM releases;
+version	message
+10.000	10th release!
+10.001	minor fix.
+999.999	the last release!
+SELECT * FROM releases WHERE version BETWEEN "9.000" AND "10.001";
+version	message
+10.000	10th release!
+10.001	minor fix.
+DROP TABLE releases;

  Added: test/sql/suite/mroonga_storage/t/primary_key_decimal_with_fractional_seconds.test (+39 -0) 100644
===================================================================
--- /dev/null
+++ test/sql/suite/mroonga_storage/t/primary_key_decimal_with_fractional_seconds.test    2012-02-17 16:55:54 +0900 (438da1b)
@@ -0,0 +1,39 @@
+# Copyright(C) 2012 Kouhei Sutou <kou �� clear-code.com>
+#
+# 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 releases;
+--enable_warnings
+
+CREATE TABLE releases (
+  version DECIMAL(6, 3) PRIMARY KEY,
+  message TEXT
+) DEFAULT CHARSET UTF8;
+SHOW CREATE TABLE releases;
+
+INSERT INTO releases (version, message) VALUES (10.000, "10th release!");
+INSERT INTO releases (version, message) VALUES (10.001, "minor fix.");
+INSERT INTO releases (version, message) VALUES (999.999, "the last release!");
+
+SELECT * FROM releases;
+
+SELECT * FROM releases WHERE version BETWEEN "9.000" AND "10.001";
+
+DROP TABLE releases;
+
+--source include/have_mroonga_deinit.inc
-------------- next part --------------
HTML����������������������������...
Download 



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