1# Copyright(C) 2012-2017 Kouhei Sutou <kou@clear-code.com>
2#
3# This library is free software; you can redistribute it and/or
4# modify it under the terms of the GNU Lesser General Public
5# License as published by the Free Software Foundation; either
6# version 2.1 of the License, or (at your option) any later version.
7#
8# This library is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11# Lesser General Public License for more details.
12#
13# You should have received a copy of the GNU Lesser General Public
14# License along with this library; if not, write to the Free Software
15# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1335  USA
16
17--disable_query_log
18let $version_major_minor =
19  `SELECT CAST(SUBSTRING_INDEX(@@global.version, '.', 2) AS DECIMAL(4, 2))`;
20
21let $version_5_5           = `SELECT $version_major_minor = 5.5`;
22let $version_5_6           = `SELECT $version_major_minor = 5.6`;
23let $version_5_7           = `SELECT $version_major_minor = 5.7`;
24let $version_10_0          = `SELECT $version_major_minor = 10.0`;
25let $version_10_1          = `SELECT $version_major_minor = 10.1`;
26let $version_10_2          = `SELECT $version_major_minor = 10.2`;
27
28let $version_5_5_or_later  = `SELECT $version_major_minor >= 5.5`;
29let $version_5_6_or_later  = `SELECT $version_major_minor >= 5.6`;
30let $version_5_7_or_later  = `SELECT $version_major_minor >= 5.7`;
31let $version_10_0_or_later = `SELECT $version_major_minor >= 10.0`;
32let $version_10_2_or_later = `SELECT $version_major_minor >= 10.2`;
33--enable_query_log
34