diff options
Diffstat (limited to 'storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_smallint.test')
-rw-r--r-- | storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_smallint.test | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_smallint.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_smallint.test new file mode 100644 index 00000000000..055f2b20f22 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_smallint.test @@ -0,0 +1,53 @@ +# Copyright(C) 2013 Kentoku SHIBA +# +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +CREATE TABLE t1 ( + id INT PRIMARY KEY AUTO_INCREMENT, + c1 SMALLINT, + c2 SMALLINT, + KEY idx1(c1, c2) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE t1; + +INSERT INTO t1 (c1, c2) VALUES + (1999, 12), + (2000, 11), + (2001, 10), + (2002, 9), + (2003, 8), + (2004, 7), + (2005, 6), + (2006, 5), + (2007, 4), + (2008, 3), + (2009, 2), + (2010, 1); + +SELECT * FROM t1 WHERE c1 > 2005; +SELECT * FROM t1 WHERE c1 >= 2005; +SELECT * FROM t1 WHERE c1 = 2005; +SELECT * FROM t1 WHERE c1 <= 2005; +SELECT * FROM t1 WHERE c1 < 2005; + +DROP TABLE t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc |