Kouhei Sutou
null+****@clear*****
Tue Oct 8 15:18:42 JST 2013
Kouhei Sutou 2013-10-08 15:18:42 +0900 (Tue, 08 Oct 2013) New Revision: a626c8950db9cba84be4ed0851c0af5f7f47f201 https://github.com/mroonga/mroonga/commit/a626c8950db9cba84be4ed0851c0af5f7f47f201 Message: test: support XX.YY style version such as 10.4 Modified files: test/sql/include/mroonga/check_version.inc Modified: test/sql/include/mroonga/check_version.inc (+10 -12) =================================================================== --- test/sql/include/mroonga/check_version.inc 2013-10-08 14:55:20 +0900 (4db5645) +++ test/sql/include/mroonga/check_version.inc 2013-10-08 15:18:42 +0900 (52505f0) @@ -1,4 +1,4 @@ -# Copyright(C) 2012 Kouhei Sutou <kou �� clear-code.com> +# Copyright(C) 2012-2013 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 @@ -15,16 +15,14 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --disable_query_log -let $version_55_or_later = `SELECT @@global.version >= '5.5'`; -let $version_56_or_later = `SELECT @@global.version >= '5.6'`; ---enable_query_log +let $version_major_minor = + `SELECT CAST(SUBSTRING_INDEX(@@global.version, '.', 2) AS DECIMAL(4, 2))`; -if ($version_55_or_later) { - if (!$version_56_or_later) { - let $version_55 = 1; - } -} +let $version_55 = `SELECT $version_major_minor = 5.5`; +let $version_56 = `SELECT $version_major_minor = 5.6`; +let $version_10_0 = `SELECT $version_major_minor = 10.0`; -if ($version_56_or_later) { - let $version_56 = 1; -} +let $version_55_or_later = `SELECT $version_major_minor >= 5.5`; +let $version_56_or_later = `SELECT $version_major_minor >= 5.6`; +let $version_10_0_or_later = `SELECT $version_major_minor >= 10.0`; +--enable_query_log -------------- next part -------------- HTML����������������������������... Download