1# Copyright(C) 2012 Kentoku SHIBA 2# Copyright(C) 2012 Kouhei Sutou <kou@clear-code.com> 3# Copyright(C) 2014 Kenji Maruyama <mmmaru777@gmail.com> 4# 5# This library is free software; you can redistribute it and/or 6# modify it under the terms of the GNU Lesser General Public 7# License as published by the Free Software Foundation; either 8# version 2.1 of the License, or (at your option) any later version. 9# 10# This library is distributed in the hope that it will be useful, 11# but WITHOUT ANY WARRANTY; without even the implied warranty of 12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13# Lesser General Public License for more details. 14# 15# You should have received a copy of the GNU Lesser General Public 16# License along with this library; if not, write to the Free Software 17# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA 18 19--source ../../include/mroonga/skip_freebsd.inc 20--source ../../include/mroonga/have_signed_64bit_time_t.inc 21--source ../../include/mroonga/have_mroonga.inc 22 23--disable_warnings 24DROP TABLE IF EXISTS ranges; 25--enable_warnings 26 27CREATE TABLE ranges ( 28 id INT PRIMARY KEY, 29 start DATE, 30 end DATE, 31 UNIQUE KEY range_key(start, end) 32); 33 34INSERT INTO ranges VALUES (1, "2012-10-25", "9999-12-31"); 35INSERT INTO ranges VALUES (2, "1000-01-02", "2012-10-05"); 36INSERT INTO ranges VALUES (3, "9999-12-31", "1000-01-02"); 37INSERT INTO ranges VALUES (4, "1000-01-02", "9999-12-31"); 38 39SELECT * FROM ranges FORCE INDEX(range_key) 40 ORDER BY start, end; 41 42DROP TABLE ranges; 43 44--source ../../include/mroonga/have_mroonga_deinit.inc 45