diff options
Diffstat (limited to 'storage/mroonga/mysql-test')
996 files changed, 46477 insertions, 0 deletions
diff --git a/storage/mroonga/mysql-test/Makefile.am b/storage/mroonga/mysql-test/Makefile.am new file mode 100644 index 00000000000..9ea677b579a --- /dev/null +++ b/storage/mroonga/mysql-test/Makefile.am @@ -0,0 +1,8 @@ +dist-hook: + if [ -n "`find mroonga -name '*.reject'`" ]; then \ + echo "reject files exist"; \ + exit 1; \ + fi + +EXTRA_DIST = \ + mroonga diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_freebsd.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_freebsd.inc new file mode 100644 index 00000000000..89700a87cff --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_freebsd.inc @@ -0,0 +1,19 @@ +# Copyright(C) 2014 Kenji Maruyama <mmmaru777@gmail.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 + +--disable_query_log +let $VERSION_COMPILE_OS_FREEBSD=`SELECT IF(@@version_compile_os like 'FREEBSD%', 1, 0);`; +--enable_query_log diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_ha_mroonga_so.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_ha_mroonga_so.inc new file mode 100644 index 00000000000..94cf42dd5ab --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_ha_mroonga_so.inc @@ -0,0 +1,26 @@ +# Copyright(C) 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 +# 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/check_windows.inc + +--disable_query_log +if ($VERSION_COMPILE_OS_WIN) { + let ha_mroonga_so='ha_mroonga.dll'; +} +if (!$VERSION_COMPILE_OS_WIN) { + let ha_mroonga_so='ha_mroonga.so'; +} +--enable_query_log diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_mariadb.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_mariadb.inc new file mode 100644 index 00000000000..13b2f3439e1 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_mariadb.inc @@ -0,0 +1,19 @@ +# 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 + +--disable_query_log +let $mariadb = `SELECT LOCATE('MariaDB', @@global.version) > 0`; +--enable_query_log diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_osx.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_osx.inc new file mode 100644 index 00000000000..8b8387a74fb --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_osx.inc @@ -0,0 +1,19 @@ +# Copyright(C) 2014 Toshihisa Tashiro +# +# 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 + +--disable_query_log +let $VERSION_COMPILE_OS_OSX=`SELECT IF(@@version_compile_os like 'osx%', 1, 0);`; +--enable_query_log diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_version.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_version.inc new file mode 100644 index 00000000000..b59a981d822 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_version.inc @@ -0,0 +1,28 @@ +# 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 +# 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 + +--disable_query_log +let $version_major_minor = + `SELECT CAST(SUBSTRING_INDEX(@@global.version, '.', 2) AS DECIMAL(4, 2))`; + +let $version_55 = `SELECT $version_major_minor = 5.5`; +let $version_56 = `SELECT $version_major_minor = 5.6`; +let $version_100 = `SELECT $version_major_minor = 10.0`; + +let $version_55_or_later = `SELECT $version_major_minor >= 5.5`; +let $version_56_or_later = `SELECT $version_major_minor >= 5.6`; +let $version_100_or_later = `SELECT $version_major_minor >= 10.0`; +--enable_query_log diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_windows.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_windows.inc new file mode 100644 index 00000000000..21e61000a06 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_windows.inc @@ -0,0 +1,20 @@ +# Copyright(C) 2013 Kentoku SHIBA +# Copyright(C) 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 +# 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 + +--disable_query_log +let $VERSION_COMPILE_OS_WIN=`SELECT IF(@@version_compile_os like 'Win%', 1, 0)`; +--enable_query_log diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_32bit.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_32bit.inc new file mode 100644 index 00000000000..41ab6bf4899 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_32bit.inc @@ -0,0 +1,28 @@ +# Copyright(C) 2013 Kentoku SHIBA +# Copyright(C) 2014 Toshihisa Tashiro +# +# 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/skip_osx.inc + +disable_query_log; +disable_warnings; +let $VERSION_COMPILE_64BIT= + `SELECT IF(@@version_compile_machine like '%64%', 1, 0)`; +enable_warnings; +enable_query_log; +if ($VERSION_COMPILE_64BIT) { + skip Need a 32 bit machine/binary; +} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_64bit.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_64bit.inc new file mode 100644 index 00000000000..3774de2f479 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_64bit.inc @@ -0,0 +1,25 @@ +# 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 + +disable_query_log; +disable_warnings; +let $VERSION_COMPILE_64BIT= + `SELECT IF(@@version_compile_machine like '%64%', 1, 0)`; +enable_warnings; +enable_query_log; +if (!$VERSION_COMPILE_64BIT) { + skip Need a 64 binary; +} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_fractional_seconds.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_fractional_seconds.inc new file mode 100644 index 00000000000..c4764b83c8a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_fractional_seconds.inc @@ -0,0 +1,32 @@ +# 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/mroonga/check_mariadb.inc +--source ../../include/mroonga/check_version.inc + +if ($mariadb) { + let $fractional_seconds = 1; +} + +if (!$mariadb) { + if ($version_56) { + let $fractional_seconds = `SELECT @@global.version >= '5.6'`; + } +} + +if (!$fractional_seconds) { + skip fractional seconds in time values are available in MySQL version 5.6 or later or MariaDB; +} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_freebsd.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_freebsd.inc new file mode 100644 index 00000000000..dfe198ca9ba --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_freebsd.inc @@ -0,0 +1,21 @@ +# Copyright(C) 2014 Kenji Maruyama <mmmaru777@gmail.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/mroonga/check_freebsd.inc + +if (!$VERSION_COMPILE_OS_FREEBSD) { + skip Need OS FreeBSD; +} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_fulltext_index_comment.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_fulltext_index_comment.inc new file mode 100644 index 00000000000..e8c79936cc6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_fulltext_index_comment.inc @@ -0,0 +1,25 @@ +# 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/mroonga/check_version.inc + +if ($version_55_or_later) { + let $fulltext_index_comment = 1; +} + +if (!$fulltext_index_comment) { + skip Fulltext index comment is available in version 5.5 or later; +} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mroonga.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mroonga.inc new file mode 100644 index 00000000000..2ebec2df8c4 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mroonga.inc @@ -0,0 +1,44 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# Copyright(C) 2013-2014 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/check_ha_mroonga_so.inc + +disable_query_log; + +let have_mroonga_storage_engine=`SELECT 1 FROM information_schema.plugins WHERE plugin_name = "mroonga"`; +if (!$have_mroonga_storage_engine) { + eval INSTALL PLUGIN mroonga SONAME $ha_mroonga_so; + eval INSTALL PLUGIN mroonga_stats SONAME $ha_mroonga_so; +} + +let have_default_storage_engine_variable=`SELECT 1 FROM information_schema.global_variables WHERE variable_name = "default_storage_engine"`; +if ($have_default_storage_engine_variable) { + let original_default_storage_engine=`SELECT variable_value FROM information_schema.global_variables WHERE variable_name = "default_storage_engine"`; + set default_storage_engine=Mroonga; +} +if (!$have_default_storage_engine_variable) { + let original_storage_engine=`SELECT variable_value FROM information_schema.global_variables WHERE variable_name = "storage_engine"`; + set storage_engine=Mroonga; +} + +let have_default_tmp_storage_engine_variable=`SELECT 1 FROM information_schema.global_variables WHERE variable_name = "default_tmp_storage_engine"`; +if ($have_default_tmp_storage_engine_variable) { + let original_default_tmp_storage_engine=`SELECT variable_value FROM information_schema.global_variables WHERE variable_name = "default_tmp_storage_engine"`; + set default_tmp_storage_engine=Mroonga; +} + +enable_query_log; diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mroonga_deinit.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mroonga_deinit.inc new file mode 100644 index 00000000000..0b6b7081d00 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mroonga_deinit.inc @@ -0,0 +1,36 @@ +# Copyright(C) 2010-2014 Kentoku SHIBA +# Copyright(C) 2011 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 + +disable_query_log; + +if ($have_default_storage_engine_variable) { + eval set default_storage_engine=$original_default_storage_engine; +} +if (!$have_default_storage_engine_variable) { + eval set storage_engine=$original_storage_engine; +} + +if ($have_default_tmp_storage_engine_variable) { + eval set default_tmp_storage_engine=$original_default_tmp_storage_engine; +} + +if (!$have_mroonga_storage_engine) { + UNINSTALL PLUGIN mroonga_stats; + UNINSTALL PLUGIN mroonga; +} + +enable_query_log; diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mroonga_helper.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mroonga_helper.inc new file mode 100644 index 00000000000..1a7ec750288 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mroonga_helper.inc @@ -0,0 +1,17 @@ +# Copyright(C) 2011 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 + +let $MYSQLD_DATADIR= `select @@datadir`; diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mysql.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mysql.inc new file mode 100644 index 00000000000..d054f0a9afd --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mysql.inc @@ -0,0 +1,21 @@ +# 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/mroonga/check_mariadb.inc + +if ($mariadb) { + skip This test is for MySQL; +} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_100.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_100.inc new file mode 100644 index 00000000000..5643d8c8c2d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_100.inc @@ -0,0 +1,21 @@ +# Copyright(C) 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 +# 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/check_version.inc + +if (!$version_100) { + skip This test is for MariaDB version 10.0.x; +} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_100_or_later.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_100_or_later.inc new file mode 100644 index 00000000000..9c9faa00ea2 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_100_or_later.inc @@ -0,0 +1,21 @@ +# Copyright(C) 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 +# 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/check_version.inc + +if (!$version_100_or_later) { + skip This test is for MariaDB version 10.0.x or later; +} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_55.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_55.inc new file mode 100644 index 00000000000..b34f7876ed8 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_55.inc @@ -0,0 +1,21 @@ +# 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/mroonga/check_version.inc + +if (!$version_55) { + skip This test is for MySQL version 5.5.x; +} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_56.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_56.inc new file mode 100644 index 00000000000..4ecff3e4466 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_56.inc @@ -0,0 +1,21 @@ +# 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/mroonga/check_version.inc + +if (!$version_56) { + skip This test is for MySQL version 5.6.x; +} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_56_or_later.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_56_or_later.inc new file mode 100644 index 00000000000..ef166fcf590 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_56_or_later.inc @@ -0,0 +1,21 @@ +# Copyright(C) 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 +# 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/check_version.inc + +if (!$version_56_or_later) { + skip This test is for MySQL version 5.6.x or later; +} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/load_mroonga_functions.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/load_mroonga_functions.inc new file mode 100644 index 00000000000..6df4e88ffc8 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/load_mroonga_functions.inc @@ -0,0 +1,24 @@ +# Copyright(C) 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 +# 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/check_ha_mroonga_so.inc + +--disable_query_log +eval CREATE FUNCTION last_insert_grn_id RETURNS INTEGER SONAME $ha_mroonga_so; +eval CREATE FUNCTION mroonga_snippet RETURNS STRING SONAME $ha_mroonga_so; +eval CREATE FUNCTION mroonga_command RETURNS STRING SONAME $ha_mroonga_so; +eval CREATE FUNCTION mroonga_escape RETURNS STRING SONAME $ha_mroonga_so; +--enable_query_log diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_freebsd.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_freebsd.inc new file mode 100644 index 00000000000..0c48adfee92 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_freebsd.inc @@ -0,0 +1,21 @@ +# Copyright(C) 2014 Kenji Maruyama <mmmaru777@gmail.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/mroonga/check_freebsd.inc + +if ($VERSION_COMPILE_OS_FREEBSD) { + skip This test is not for FreeBSD; +} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_55.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_55.inc new file mode 100644 index 00000000000..8b46d606eec --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_55.inc @@ -0,0 +1,24 @@ +# 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 +# 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/check_version.inc +--source ../../include/mroonga/check_mariadb.inc + +if ($version_55) { + if ($mariadb) { + skip This test is not for MariaDB 5.5.x; + } +} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_osx.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_osx.inc new file mode 100644 index 00000000000..a8f4409f7e7 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_osx.inc @@ -0,0 +1,21 @@ +# Copyright(C) 2014 Toshihisa Tashiro +# +# 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/check_osx.inc + +if ($VERSION_COMPILE_OS_OSX) { + skip This test is not for OSX; +} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/unload_mroonga_functions.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/unload_mroonga_functions.inc new file mode 100644 index 00000000000..881aa47c629 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/unload_mroonga_functions.inc @@ -0,0 +1,22 @@ +# Copyright(C) 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 +# 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 + +--disable_query_log +DROP FUNCTION last_insert_grn_id; +DROP FUNCTION mroonga_snippet; +DROP FUNCTION mroonga_command; +DROP FUNCTION mroonga_escape; +--enable_query_log diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_after.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_after.result new file mode 100644 index 00000000000..52a72155af3 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_after.result @@ -0,0 +1,26 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +body TEXT +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `body` text, + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +ALTER TABLE diaries ADD title TEXT AFTER id; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `body` text, + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, body) values ("groonga (1)", "starting groonga."); +SELECT * FROM diaries; +id title body +1 groonga (1) starting groonga. +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_first.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_first.result new file mode 100644 index 00000000000..81feeefc589 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_first.result @@ -0,0 +1,26 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +body TEXT +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `body` text, + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +ALTER TABLE diaries ADD title TEXT FIRST; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `title` text, + `id` int(11) NOT NULL AUTO_INCREMENT, + `body` text, + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, body) values ("groonga (1)", "starting groonga."); +SELECT * FROM diaries; +title id body +groonga (1) 1 starting groonga. +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_multiple.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_multiple.result new file mode 100644 index 00000000000..bb157539ac9 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_multiple.result @@ -0,0 +1,44 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (title) VALUES ("survey"); +SELECT * FROM diaries; +id title +1 survey +ALTER TABLE diaries +ADD COLUMN body TEXT FIRST, +ADD COLUMN published BOOLEAN AFTER id, +ADD COLUMN created_at DATETIME; +UPDATE diaries SET body = "will start groonga!"; +SELECT * FROM diaries; +body id published title created_at +will start groonga! 1 0 survey 1970-01-01 00:00:00 +INSERT INTO diaries (title, body, published, created_at) +VALUES ("groonga (1)", "starting groonga...", TRUE, "2014-2-9 02:09:00"); +INSERT INTO diaries (title, body, published, created_at) +VALUES ("groonga (2)", "started groonga.", FALSE, "2014-2-9 12:19:00"); +SELECT * FROM diaries; +body id published title created_at +will start groonga! 1 0 survey 1970-01-01 00:00:00 +starting groonga... 2 1 groonga (1) 2014-02-09 02:09:00 +started groonga. 3 0 groonga (2) 2014-02-09 12:19:00 +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `body` text, + `id` int(11) NOT NULL AUTO_INCREMENT, + `published` tinyint(1) DEFAULT NULL, + `title` text, + `created_at` datetime DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=Mroonga AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_plain.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_plain.result new file mode 100644 index 00000000000..df5a15568d8 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_plain.result @@ -0,0 +1,37 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (title) VALUES ("survey"); +SELECT * FROM diaries; +id title +1 survey +ALTER TABLE diaries ADD COLUMN body TEXT; +UPDATE diaries SET body = "will start groonga!"; +SELECT * FROM diaries; +id title body +1 survey will start groonga! +INSERT INTO diaries (title, body) values ("groonga (1)", "starting groonga..."); +INSERT INTO diaries (title, body) values ("groonga (2)", "started groonga."); +SELECT * FROM diaries; +id title body +1 survey will start groonga! +2 groonga (1) starting groonga... +3 groonga (2) started groonga. +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `body` text, + PRIMARY KEY (`id`) +) ENGINE=Mroonga AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_with_flags.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_with_flags.result new file mode 100644 index 00000000000..1bc15c6efe2 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_with_flags.result @@ -0,0 +1,10 @@ +CREATE TABLE tags ( +id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY +) DEFAULT CHARSET=utf8; +ALTER TABLE tags ADD COLUMN name VARCHAR(64) COMMENT 'flags "COLUMN_VECTOR"'; +SELECT mroonga_command("dump"); +mroonga_command("dump") +table_create tags TABLE_PAT_KEY UInt32 +column_create tags id COLUMN_SCALAR UInt32 +column_create tags name COLUMN_VECTOR ShortText +DROP TABLE tags; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_with_type.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_with_type.result new file mode 100644 index 00000000000..6ff92ec8e99 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_with_type.result @@ -0,0 +1,16 @@ +CREATE TABLE tags ( +id INT UNSIGNED PRIMARY KEY +) DEFAULT CHARSET=utf8; +CREATE TABLE bugs ( +id INT UNSIGNED PRIMARY KEY +) DEFAULT CHARSET=utf8; +ALTER TABLE bugs ADD COLUMN name VARCHAR(64) COMMENT 'type "tags"'; +SELECT mroonga_command("dump"); +mroonga_command("dump") +table_create tags TABLE_PAT_KEY UInt32 +column_create tags id COLUMN_SCALAR UInt32 +table_create bugs TABLE_PAT_KEY UInt32 +column_create bugs id COLUMN_SCALAR UInt32 +column_create bugs name COLUMN_SCALAR tags +DROP TABLE bugs; +DROP TABLE tags; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_key_multiple_column_with_data.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_key_multiple_column_with_data.result new file mode 100644 index 00000000000..73fb6a7abe3 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_key_multiple_column_with_data.result @@ -0,0 +1,31 @@ +DROP TABLE IF EXISTS scores; +SET NAMES UTF8; +CREATE TABLE scores ( +id BIGINT(20) PRIMARY KEY AUTO_INCREMENT NOT NULL, +name CHAR(30) NOT NULL, +score INT NOT NULL +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE scores; +Table Create Table +scores CREATE TABLE `scores` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` char(30) NOT NULL, + `score` int(11) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO scores (name, score) VALUES("Taro Yamada", 29); +INSERT INTO scores (name, score) VALUES("Taro Yamada", -12); +INSERT INTO scores (name, score) VALUES("Jiro Yamada", 27); +INSERT INTO scores (name, score) VALUES("Taro Yamada", 10); +SELECT * FROM scores +WHERE name = "Taro Yamada" AND (score >= -12 AND score < 29); +id name score +2 Taro Yamada -12 +4 Taro Yamada 10 +ALTER TABLE scores ADD KEY property (name, score); +SELECT * FROM scores +WHERE name = "Taro Yamada" AND (score >= -12 AND score < 29); +id name score +2 Taro Yamada -12 +4 Taro Yamada 10 +DROP TABLE scores; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_comment_not_for_mroonga.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_comment_not_for_mroonga.result new file mode 100644 index 00000000000..a993756ad62 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_comment_not_for_mroonga.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS bugs; +CREATE TABLE bugs ( +id INT UNSIGNED PRIMARY KEY, +tag VARCHAR(64) +) DEFAULT CHARSET=utf8; +ALTER TABLE bugs +CHANGE COLUMN +tag +tag VARCHAR(64) COMMENT 'It must consist of only alphabet and number.'; +SHOW CREATE TABLE bugs; +Table Create Table +bugs CREATE TABLE `bugs` ( + `id` int(10) unsigned NOT NULL, + `tag` varchar(64) DEFAULT NULL COMMENT 'It must consist of only alphabet and number.', + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +DROP TABLE bugs; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_have_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_have_index.result new file mode 100644 index 00000000000..c51c10b6da3 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_have_index.result @@ -0,0 +1,16 @@ +DROP TABLE IF EXISTS bugs; +CREATE TABLE bugs ( +id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, +title VARCHAR(32), +FULLTEXT KEY (title) +) DEFAULT CHARSET=utf8; +ALTER TABLE bugs CHANGE COLUMN title title VARCHAR(64); +SHOW CREATE TABLE bugs; +Table Create Table +bugs CREATE TABLE `bugs` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(64) DEFAULT NULL, + PRIMARY KEY (`id`), + FULLTEXT KEY `title` (`title`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +DROP TABLE bugs; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_after.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_after.result new file mode 100644 index 00000000000..19d5d017fb2 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_after.result @@ -0,0 +1,28 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +body TEXT +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `body` text, + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +ALTER TABLE diaries CHANGE body description TEXT AFTER id; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `description` text, + `title` text, + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, description) values ("groonga (1)", "starting groonga."); +SELECT * FROM diaries; +id description title +1 starting groonga. groonga (1) +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_first.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_first.result new file mode 100644 index 00000000000..cf2bcc0fc2c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_first.result @@ -0,0 +1,28 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +body TEXT +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `body` text, + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +ALTER TABLE diaries CHANGE body description TEXT FIRST; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `description` text, + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, description) values ("groonga (1)", "starting groonga."); +SELECT * FROM diaries; +description id title +starting groonga. 1 groonga (1) +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_multiple.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_multiple.result new file mode 100644 index 00000000000..bc5b0132e43 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_multiple.result @@ -0,0 +1,32 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +body TEXT +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `body` text, + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +ALTER TABLE diaries +CHANGE body description TEXT FIRST, +CHANGE title subject TEXT AFTER internal_id, +CHANGE id internal_id INT; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `description` text, + `internal_id` int(11) NOT NULL DEFAULT '0', + `subject` text, + PRIMARY KEY (`internal_id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (subject, description) +VALUES ("groonga (1)", "starting groonga."); +SELECT * FROM diaries; +description internal_id subject +starting groonga. 0 groonga (1) +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_no_order.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_no_order.result new file mode 100644 index 00000000000..6d60200e5ce --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_no_order.result @@ -0,0 +1,28 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +body TEXT +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `body` text, + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +ALTER TABLE diaries CHANGE body description TEXT; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `description` text, + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, description) values ("groonga (1)", "starting groonga."); +SELECT * FROM diaries; +id title description +1 groonga (1) starting groonga. +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_engine.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_engine.result new file mode 100644 index 00000000000..3a7413e389b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_engine.result @@ -0,0 +1,49 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +body TEXT, +FULLTEXT INDEX title_index (title), +FULLTEXT INDEX body_index (body) +) ENGINE MyISAM DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `body` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `title_index` (`title`), + FULLTEXT KEY `body_index` (`body`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); +INSERT INTO diaries (title, body) VALUES ("groonga (1)", "starting groonga..."); +SELECT * FROM diaries +WHERE MATCH(title) AGAINST("survey" IN BOOLEAN MODE) AND +MATCH(body) AGAINST("groonga" IN BOOLEAN MODE); +id title body +1 survey will start groonga! +ALTER TABLE diaries ENGINE = mroonga; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `body` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `title_index` (`title`), + FULLTEXT KEY `body_index` (`body`) +) ENGINE=Mroonga AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 +SELECT * FROM diaries +WHERE MATCH(title) AGAINST("survey" IN BOOLEAN MODE) AND +MATCH(body) AGAINST("groonga" IN BOOLEAN MODE); +id title body +1 survey will start groonga! +INSERT INTO diaries (title, body) VALUES ("groonga (2)", "started groonga."); +SELECT * FROM diaries +WHERE MATCH(title) AGAINST("groonga" IN BOOLEAN MODE) AND +MATCH(body) AGAINST("groonga" IN BOOLEAN MODE); +id title body +2 groonga (1) starting groonga... +3 groonga (2) started groonga. +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_disable_keys_create_fulltext.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_disable_keys_create_fulltext.result new file mode 100644 index 00000000000..6127df61cb4 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_disable_keys_create_fulltext.result @@ -0,0 +1,27 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES utf8; +CREATE TABLE diaries ( +id int PRIMARY KEY, +title varchar(255) +) DEFAULT CHARSET=utf8; +INSERT INTO diaries VALUES (1, "Hello"); +INSERT INTO diaries VALUES (2, "天気"); +INSERT INTO diaries VALUES (3, "富士山"); +SELECT * +FROM diaries +WHERE MATCH (title) AGAINST ("富士山"); +ERROR HY000: Can't find FULLTEXT index matching the column list +CREATE FULLTEXT INDEX title_index on diaries (title); +SELECT * +FROM diaries +FORCE INDEX (title_index) +WHERE MATCH (title) AGAINST ("富士山"); +id title +3 富士山 +ALTER TABLE diaries DISABLE KEYS; +SELECT * +FROM diaries +FORCE INDEX (title_index) +WHERE MATCH (title) AGAINST ("富士山"); +ERROR HY000: Can't find FULLTEXT index matching the column list +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_disable_keys_fulltext_ujis.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_disable_keys_fulltext_ujis.result new file mode 100644 index 00000000000..ff7bc5e7cea --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_disable_keys_fulltext_ujis.result @@ -0,0 +1,23 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES ujis; +CREATE TABLE diaries ( +id int PRIMARY KEY, +title varchar(255), +FULLTEXT KEY title_index (title) +) DEFAULT CHARSET=ujis; +INSERT INTO diaries VALUES (1, "Hello"); +INSERT INTO diaries VALUES (2, "ŷ"); +INSERT INTO diaries VALUES (3, "ٻλ"); +SELECT * +FROM diaries +FORCE INDEX (title_index) +WHERE MATCH (title) AGAINST ("ٻλ"); +id title +3 ٻλ +ALTER TABLE diaries DISABLE KEYS; +SELECT * +FROM diaries +FORCE INDEX (title_index) +WHERE MATCH (title) AGAINST ("ٻλ"); +ERROR HY000: Can't find FULLTEXT index matching the column list +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_disable_keys_fulltext_utf8.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_disable_keys_fulltext_utf8.result new file mode 100644 index 00000000000..cbaa8d62c98 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_disable_keys_fulltext_utf8.result @@ -0,0 +1,23 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES utf8; +CREATE TABLE diaries ( +id int PRIMARY KEY, +title varchar(255), +FULLTEXT KEY title_index (title) +) DEFAULT CHARSET=utf8; +INSERT INTO diaries VALUES (1, "Hello"); +INSERT INTO diaries VALUES (2, "天気"); +INSERT INTO diaries VALUES (3, "富士山"); +SELECT * +FROM diaries +FORCE INDEX (title_index) +WHERE MATCH (title) AGAINST ("富士山"); +id title +3 富士山 +ALTER TABLE diaries DISABLE KEYS; +SELECT * +FROM diaries +FORCE INDEX (title_index) +WHERE MATCH (title) AGAINST ("富士山"); +ERROR HY000: Can't find FULLTEXT index matching the column list +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_disable_keys_multiple_column.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_disable_keys_multiple_column.result new file mode 100644 index 00000000000..9d6cdcd9ba8 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_disable_keys_multiple_column.result @@ -0,0 +1,27 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES utf8; +CREATE TABLE diaries ( +id int PRIMARY KEY, +title varchar(255), +created_at datetime, +KEY title_and_created_at_index (title, created_at) +) DEFAULT CHARSET=utf8; +INSERT INTO diaries VALUES (1, "Hello", "2012-04-30 20:00:00"); +INSERT INTO diaries VALUES (2, "天気" , "2012-04-30 23:00:00"); +INSERT INTO diaries VALUES (3, "富士山", "2012-04-30 19:00:00"); +SELECT * +FROM diaries +FORCE INDEX (title_and_created_at_index) +WHERE title = "天気" AND +created_at = "2012-04-30 23:00:00"; +id title created_at +2 天気 2012-04-30 23:00:00 +ALTER TABLE diaries DISABLE KEYS; +SELECT * +FROM diaries +FORCE INDEX (title_and_created_at_index) +WHERE title = "天気" AND +created_at = "2012-04-30 23:00:00"; +id title created_at +2 天気 2012-04-30 23:00:00 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_disable_keys_normal.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_disable_keys_normal.result new file mode 100644 index 00000000000..09399c12a3e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_disable_keys_normal.result @@ -0,0 +1,25 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES utf8; +CREATE TABLE diaries ( +id int PRIMARY KEY, +title varchar(255), +created_at datetime, +KEY created_at_index (created_at) +) DEFAULT CHARSET=utf8; +INSERT INTO diaries VALUES (1, "Hello", "2012-04-30 20:00:00"); +INSERT INTO diaries VALUES (2, "天気" , "2012-04-30 23:00:00"); +INSERT INTO diaries VALUES (3, "富士山", "2012-04-30 19:00:00"); +SELECT * +FROM diaries +FORCE INDEX (created_at_index) +WHERE created_at = "2012-04-30 20:00:00"; +id title created_at +1 Hello 2012-04-30 20:00:00 +ALTER TABLE diaries DISABLE KEYS; +SELECT * +FROM diaries +FORCE INDEX (created_at_index) +WHERE created_at = "2012-04-30 20:00:00"; +id title created_at +1 Hello 2012-04-30 20:00:00 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_disable_keys_primary.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_disable_keys_primary.result new file mode 100644 index 00000000000..f94c98ff9b2 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_disable_keys_primary.result @@ -0,0 +1,23 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES utf8; +CREATE TABLE diaries ( +id int PRIMARY KEY, +title varchar(255) +) DEFAULT CHARSET=utf8; +INSERT INTO diaries VALUES (1, "Hello"); +INSERT INTO diaries VALUES (2, "天気"); +INSERT INTO diaries VALUES (3, "富士山"); +SELECT * +FROM diaries +FORCE INDEX (PRIMARY) +WHERE id = 2; +id title +2 天気 +ALTER TABLE diaries DISABLE KEYS; +SELECT * +FROM diaries +FORCE INDEX (PRIMARY) +WHERE id = 2; +id title +2 天気 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_disable_keys_truncate.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_disable_keys_truncate.result new file mode 100644 index 00000000000..7b71832b84f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_disable_keys_truncate.result @@ -0,0 +1,20 @@ +DROP TABLE IF EXISTS users; +SET NAMES utf8; +CREATE TABLE users ( +first_name VARCHAR(32) NOT NULL, +last_name VARCHAR(32) NOT NULL, +KEY (first_name, last_name) +); +INSERT INTO users VALUES("Taro", "Yamada"); +INSERT INTO users VALUES("Hanako", "Tanaka"); +INSERT INTO users VALUES("Joe", "Honda"); +SELECT * FROM users; +first_name last_name +Taro Yamada +Hanako Tanaka +Joe Honda +ALTER TABLE users DISABLE KEYS; +TRUNCATE users; +SELECT * FROM users; +first_name last_name +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_disable_keys_updating.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_disable_keys_updating.result new file mode 100644 index 00000000000..8b6f94c0cb5 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_disable_keys_updating.result @@ -0,0 +1,18 @@ +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( +c1 int NOT NULL, +c2 text NOT NULL, +c3 int NOT NULL, +c4 int NOT NULL, +PRIMARY KEY(c1), +KEY idx1(c3,c4), +FULLTEXT KEY ft1(c2) +); +INSERT INTO t1 VALUES(1, 'test1', 1, 1); +INSERT INTO t1 VALUES(2, 'test2', 2, 2); +INSERT INTO t1 VALUES(3, 'test3', 1, 3); +ALTER TABLE t1 DISABLE KEYS; +DELETE FROM t1 WHERE c1 = 2; +UPDATE t1 SET c4 = 4 WHERE c1 = 1; +INSERT INTO t1 VALUES(4, 'test4', 2, 4); +DROP TABLE t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_drop_column_multiple.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_drop_column_multiple.result new file mode 100644 index 00000000000..6475de51b21 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_drop_column_multiple.result @@ -0,0 +1,36 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +body TEXT +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `body` text, + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); +SELECT * FROM diaries; +id title body +1 survey will start groonga! +ALTER TABLE diaries +DROP COLUMN title, +DROP COLUMN body; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (`id`) +) ENGINE=Mroonga AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 +SELECT * FROM diaries; +id +1 +INSERT INTO diaries () VALUES (); +SELECT * FROM diaries; +id +1 +2 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_drop_column_one.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_drop_column_one.result new file mode 100644 index 00000000000..cbc94cebccf --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_drop_column_one.result @@ -0,0 +1,37 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +body TEXT +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `body` text, + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); +SELECT * FROM diaries; +id title body +1 survey will start groonga! +ALTER TABLE diaries DROP COLUMN body; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + PRIMARY KEY (`id`) +) ENGINE=Mroonga AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 +SELECT * FROM diaries; +id title +1 survey +INSERT INTO diaries (title) values ("groonga (1)"); +INSERT INTO diaries (title) values ("groonga (2)"); +SELECT * FROM diaries; +id title +1 survey +2 groonga (1) +3 groonga (2) +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_drop_key_multiple_column_with_data.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_drop_key_multiple_column_with_data.result new file mode 100644 index 00000000000..b0aa59a20b5 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_drop_key_multiple_column_with_data.result @@ -0,0 +1,33 @@ +DROP TABLE IF EXISTS scores; +SET NAMES UTF8; +CREATE TABLE scores ( +id BIGINT(20) PRIMARY KEY AUTO_INCREMENT NOT NULL, +name CHAR(30) NOT NULL, +score INT NOT NULL, +KEY property (name, score) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE scores; +Table Create Table +scores CREATE TABLE `scores` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` char(30) NOT NULL, + `score` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `property` (`name`,`score`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO scores (name, score) VALUES("Taro Yamada", 29); +INSERT INTO scores (name, score) VALUES("Taro Yamada", -12); +INSERT INTO scores (name, score) VALUES("Jiro Yamada", 27); +INSERT INTO scores (name, score) VALUES("Taro Yamada", 10); +SELECT * FROM scores +WHERE name = "Taro Yamada" AND (score >= -12 AND score < 29); +id name score +2 Taro Yamada -12 +4 Taro Yamada 10 +ALTER TABLE scores DROP KEY property; +SELECT * FROM scores +WHERE name = "Taro Yamada" AND (score >= -12 AND score < 29); +id name score +2 Taro Yamada -12 +4 Taro Yamada 10 +DROP TABLE scores; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_enable_keys_fulltext.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_enable_keys_fulltext.result new file mode 100644 index 00000000000..e5c8a34901f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_enable_keys_fulltext.result @@ -0,0 +1,24 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES utf8; +CREATE TABLE diaries ( +id int PRIMARY KEY, +title varchar(255), +FULLTEXT KEY title_index (title) +) DEFAULT CHARSET=utf8; +ALTER TABLE diaries DISABLE KEYS; +INSERT INTO diaries VALUES (1, "Hello"); +INSERT INTO diaries VALUES (2, "天気"); +INSERT INTO diaries VALUES (3, "富士山"); +SELECT * +FROM diaries +FORCE INDEX (title_index) +WHERE MATCH (title) AGAINST ("富士山"); +ERROR HY000: Can't find FULLTEXT index matching the column list +ALTER TABLE diaries ENABLE KEYS; +SELECT * +FROM diaries +FORCE INDEX (title_index) +WHERE MATCH (title) AGAINST ("富士山"); +id title +3 富士山 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_enable_keys_fulltext_ujis.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_enable_keys_fulltext_ujis.result new file mode 100644 index 00000000000..3853cc849fb --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_enable_keys_fulltext_ujis.result @@ -0,0 +1,24 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES ujis; +CREATE TABLE diaries ( +id int PRIMARY KEY, +title varchar(255), +FULLTEXT KEY title_index (title) +) DEFAULT CHARSET=ujis; +ALTER TABLE diaries DISABLE KEYS; +INSERT INTO diaries VALUES (1, "Hello"); +INSERT INTO diaries VALUES (2, "ŷ"); +INSERT INTO diaries VALUES (3, "ٻλ"); +SELECT * +FROM diaries +FORCE INDEX (title_index) +WHERE MATCH (title) AGAINST ("ٻλ"); +ERROR HY000: Can't find FULLTEXT index matching the column list +ALTER TABLE diaries ENABLE KEYS; +SELECT * +FROM diaries +FORCE INDEX (title_index) +WHERE MATCH (title) AGAINST ("ٻλ"); +id title +3 ٻλ +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_enable_keys_fulltext_utf8.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_enable_keys_fulltext_utf8.result new file mode 100644 index 00000000000..e5c8a34901f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_enable_keys_fulltext_utf8.result @@ -0,0 +1,24 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES utf8; +CREATE TABLE diaries ( +id int PRIMARY KEY, +title varchar(255), +FULLTEXT KEY title_index (title) +) DEFAULT CHARSET=utf8; +ALTER TABLE diaries DISABLE KEYS; +INSERT INTO diaries VALUES (1, "Hello"); +INSERT INTO diaries VALUES (2, "天気"); +INSERT INTO diaries VALUES (3, "富士山"); +SELECT * +FROM diaries +FORCE INDEX (title_index) +WHERE MATCH (title) AGAINST ("富士山"); +ERROR HY000: Can't find FULLTEXT index matching the column list +ALTER TABLE diaries ENABLE KEYS; +SELECT * +FROM diaries +FORCE INDEX (title_index) +WHERE MATCH (title) AGAINST ("富士山"); +id title +3 富士山 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_enable_keys_multiple_column.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_enable_keys_multiple_column.result new file mode 100644 index 00000000000..e252061d109 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_enable_keys_multiple_column.result @@ -0,0 +1,28 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES utf8; +CREATE TABLE diaries ( +id int PRIMARY KEY, +title varchar(255), +created_at datetime, +KEY title_and_created_at_index (title, created_at) +) DEFAULT CHARSET=utf8; +ALTER TABLE diaries DISABLE KEYS; +INSERT INTO diaries VALUES (1, "Hello", "2012-04-30 20:00:00"); +INSERT INTO diaries VALUES (2, "天気" , "2012-04-30 23:00:00"); +INSERT INTO diaries VALUES (3, "富士山", "2012-04-30 19:00:00"); +SELECT * +FROM diaries +FORCE INDEX (title_and_created_at_index) +WHERE title = "天気" AND +created_at = "2012-04-30 23:00:00"; +id title created_at +2 天気 2012-04-30 23:00:00 +ALTER TABLE diaries ENABLE KEYS; +SELECT * +FROM diaries +FORCE INDEX (title_and_created_at_index) +WHERE title = "天気" AND +created_at = "2012-04-30 23:00:00"; +id title created_at +2 天気 2012-04-30 23:00:00 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_enable_keys_normal.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_enable_keys_normal.result new file mode 100644 index 00000000000..0e56e78d0c6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_enable_keys_normal.result @@ -0,0 +1,26 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES utf8; +CREATE TABLE diaries ( +id int PRIMARY KEY, +title varchar(255), +created_at datetime, +KEY created_at_index (created_at) +) DEFAULT CHARSET=utf8; +ALTER TABLE diaries DISABLE KEYS; +INSERT INTO diaries VALUES (1, "Hello", "2012-04-30 20:00:00"); +INSERT INTO diaries VALUES (2, "天気" , "2012-04-30 23:00:00"); +INSERT INTO diaries VALUES (3, "富士山", "2012-04-30 19:00:00"); +SELECT * +FROM diaries +FORCE INDEX (created_at_index) +WHERE created_at = "2012-04-30 20:00:00"; +id title created_at +1 Hello 2012-04-30 20:00:00 +ALTER TABLE diaries ENABLE KEYS; +SELECT * +FROM diaries +FORCE INDEX (created_at_index) +WHERE created_at = "2012-04-30 20:00:00"; +id title created_at +1 Hello 2012-04-30 20:00:00 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_enable_keys_primary.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_enable_keys_primary.result new file mode 100644 index 00000000000..722e62f966b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_enable_keys_primary.result @@ -0,0 +1,24 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES utf8; +CREATE TABLE diaries ( +id int PRIMARY KEY, +title varchar(255) +) DEFAULT CHARSET=utf8; +ALTER TABLE diaries DISABLE KEYS; +INSERT INTO diaries VALUES (1, "Hello"); +INSERT INTO diaries VALUES (2, "天気"); +INSERT INTO diaries VALUES (3, "富士山"); +SELECT * +FROM diaries +FORCE INDEX (PRIMARY) +WHERE id = 2; +id title +2 天気 +ALTER TABLE diaries ENABLE KEYS; +SELECT * +FROM diaries +FORCE INDEX (PRIMARY) +WHERE id = 2; +id title +2 天気 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_engine_decimal.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_engine_decimal.result new file mode 100644 index 00000000000..6bbedd41e95 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_engine_decimal.result @@ -0,0 +1,38 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +temperature DECIMAL(6, 3) +) ENGINE InnoDB DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `temperature` decimal(6,3) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, temperature) VALUES ("clear day", 21.281); +SELECT * FROM diaries; +id title temperature +1 clear day 21.281 +ALTER TABLE diaries ENGINE = mroonga; +SELECT * FROM diaries; +id title temperature +1 clear day 21.281 +INSERT INTO diaries (title, temperature) VALUES ("rainy day", 14.213); +INSERT INTO diaries (title, temperature) VALUES ("cloudy day", 17.821); +SELECT * FROM diaries; +id title temperature +1 clear day 21.281 +2 rainy day 14.213 +3 cloudy day 17.821 +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `temperature` decimal(6,3) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=Mroonga AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_fulltext_add_no_primary_key.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_fulltext_add_no_primary_key.result new file mode 100644 index 00000000000..bf7593f78eb --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_fulltext_add_no_primary_key.result @@ -0,0 +1,19 @@ +DROP TABLE IF EXISTS memos; +CREATE TABLE memos ( +content varchar(32) +) DEFAULT CHARSET="utf8"; +INSERT INTO memos (content) values ("Starting Groonga..."); +INSERT INTO memos (content) values ("Started Groonga."); +INSERT INTO memos (content) values ("Starting Mroonga..."); +ALTER TABLE memos ADD FULLTEXT INDEX content_index (content); +SHOW CREATE TABLE memos; +Table Create Table +memos CREATE TABLE `memos` ( + `content` varchar(32) DEFAULT NULL, + FULLTEXT KEY `content_index` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +SELECT * FROM memos WHERE MATCH(content) AGAINST("groonga"); +content +Starting Groonga... +Started Groonga. +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_fulltext_add_normal.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_fulltext_add_normal.result new file mode 100644 index 00000000000..d98dc431a0b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_fulltext_add_normal.result @@ -0,0 +1,22 @@ +DROP TABLE IF EXISTS memos; +CREATE TABLE memos ( +id INT PRIMARY KEY AUTO_INCREMENT, +content TEXT +) DEFAULT CHARSET="utf8"; +INSERT INTO memos (content) values ("Starting Groonga..."); +INSERT INTO memos (content) values ("Started Groonga."); +INSERT INTO memos (content) values ("Starting Mroonga..."); +ALTER TABLE memos ADD FULLTEXT INDEX content_index (content); +SHOW CREATE TABLE memos; +Table Create Table +memos CREATE TABLE `memos` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `content` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `content_index` (`content`) +) ENGINE=Mroonga AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 +SELECT * FROM memos WHERE MATCH(content) AGAINST("groonga"); +id content +1 Starting Groonga... +2 Started Groonga. +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_fulltext_add_table.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_fulltext_add_table.result new file mode 100644 index 00000000000..705d2f70126 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_fulltext_add_table.result @@ -0,0 +1,21 @@ +DROP TABLE IF EXISTS tags; +DROP TABLE IF EXISTS bugs; +CREATE TABLE tags ( +name VARCHAR(64) PRIMARY KEY +) DEFAULT CHARSET=utf8 COMMENT='default_tokenizer "TokenDelimit"'; +CREATE TABLE bugs ( +id INT UNSIGNED PRIMARY KEY, +tags VARCHAR(40) COMMENT 'type "tags"' +) DEFAULT CHARSET=utf8; +INSERT INTO tags (name) VALUES ("Groonga"); +INSERT INTO bugs (id, tags) VALUES (1, "Groonga Mroonga"); +SELECT * FROM bugs; +id tags +1 GROONGA MROONGA +ALTER TABLE bugs ADD FULLTEXT INDEX bugs_tags_index (tags) COMMENT 'table "tags"'; +SELECT * FROM bugs +WHERE MATCH(tags) AGAINST("Groonga"); +id tags +1 GROONGA MROONGA +DROP TABLE bugs; +DROP TABLE tags; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_fulltext_drop_table.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_fulltext_drop_table.result new file mode 100644 index 00000000000..2d5e3d55ca7 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_fulltext_drop_table.result @@ -0,0 +1,21 @@ +DROP TABLE IF EXISTS tags; +DROP TABLE IF EXISTS bugs; +CREATE TABLE tags ( +name VARCHAR(64) PRIMARY KEY +) DEFAULT CHARSET=utf8 COMMENT='default_tokenizer "TokenDelimit"'; +CREATE TABLE bugs ( +id INT UNSIGNED PRIMARY KEY, +tags VARCHAR(40) COMMENT 'type "tags"', +FULLTEXT INDEX bugs_tags_index (tags) COMMENT 'table "tags"' +) DEFAULT CHARSET=utf8; +INSERT INTO tags (name) VALUES ("Groonga"); +INSERT INTO bugs (id, tags) VALUES (1, "Groonga Mroonga"); +ALTER TABLE bugs DROP INDEX bugs_tags_index; +ALTER TABLE bugs +ADD FULLTEXT INDEX bugs_tags_index (tags) COMMENT 'table "tags"'; +SELECT * FROM bugs +WHERE MATCH(tags) AGAINST("Groonga"); +id tags +1 GROONGA MROONGA +DROP TABLE bugs; +DROP TABLE tags; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_modify_column_after.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_modify_column_after.result new file mode 100644 index 00000000000..d831d02d76a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_modify_column_after.result @@ -0,0 +1,33 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +body TEXT +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `body` text, + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, body) values ("groonga (1)", "starting groonga."); +SELECT * FROM diaries; +id title body +1 groonga (1) starting groonga. +ALTER TABLE diaries MODIFY body TEXT AFTER id; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `body` text, + `title` text, + PRIMARY KEY (`id`) +) ENGINE=Mroonga AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, body) values ("groonga (2)", "started groonga."); +SELECT * FROM diaries; +id body title +1 starting groonga. groonga (1) +2 started groonga. groonga (2) +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_modify_column_first.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_modify_column_first.result new file mode 100644 index 00000000000..bd936507211 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_modify_column_first.result @@ -0,0 +1,33 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +body TEXT +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `body` text, + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, body) values ("groonga (1)", "starting groonga."); +SELECT * FROM diaries; +id title body +1 groonga (1) starting groonga. +ALTER TABLE diaries MODIFY body TEXT FIRST; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `body` text, + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + PRIMARY KEY (`id`) +) ENGINE=Mroonga AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, body) values ("groonga (2)", "started groonga."); +SELECT * FROM diaries; +body id title +starting groonga. 1 groonga (1) +started groonga. 2 groonga (2) +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_modify_column_no_order.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_modify_column_no_order.result new file mode 100644 index 00000000000..d8d963d87b4 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_modify_column_no_order.result @@ -0,0 +1,33 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +body TEXT +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `body` text, + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, body) values ("groonga (1)", "starting groonga."); +SELECT * FROM diaries; +id title body +1 groonga (1) starting groonga. +ALTER TABLE diaries MODIFY title VARCHAR(100); +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` varchar(100) DEFAULT NULL, + `body` text, + PRIMARY KEY (`id`) +) ENGINE=Mroonga AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, body) values ("groonga (2)", "started groonga."); +SELECT * FROM diaries; +id title body +1 groonga (1) starting groonga. +2 groonga (2) started groonga. +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_recreate_anonymous_index_at_once.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_recreate_anonymous_index_at_once.result new file mode 100644 index 00000000000..64f524de06c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_recreate_anonymous_index_at_once.result @@ -0,0 +1,47 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +body TEXT, +FULLTEXT INDEX (body) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `body` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `body` (`body`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); +INSERT INTO diaries (title, body) VALUES ("survey", "will start mroonga!"); +SELECT * FROM diaries; +id title body +1 survey will start groonga! +2 survey will start mroonga! +SELECT * FROM diaries +WHERE MATCH (body) AGAINST ("+groonga" IN BOOLEAN MODE); +id title body +1 survey will start groonga! +ALTER TABLE diaries +DROP INDEX body, +ADD FULLTEXT INDEX (body); +SELECT * FROM diaries; +id title body +1 survey will start groonga! +2 survey will start mroonga! +SELECT * FROM diaries +WHERE MATCH (body) AGAINST ("+groonga" IN BOOLEAN MODE); +id title body +1 survey will start groonga! +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `body` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `body` (`body`) +) ENGINE=Mroonga AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_rename_table.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_rename_table.result new file mode 100644 index 00000000000..eac322ceb26 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_rename_table.result @@ -0,0 +1,45 @@ +DROP TABLE IF EXISTS diaries, memos; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +body TEXT, +FULLTEXT INDEX title_index (title), +FULLTEXT INDEX body_index (body) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `body` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `title_index` (`title`), + FULLTEXT KEY `body_index` (`body`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); +SELECT * FROM diaries; +id title body +1 survey will start groonga! +SELECT * FROM diaries +WHERE MATCH(title) AGAINST("groonga") AND +MATCH(body) AGAINST("starting"); +id title body +ALTER TABLE diaries RENAME memos; +SELECT * FROM memos; +id title body +1 survey will start groonga! +SELECT * FROM memos +WHERE MATCH(title) AGAINST("groonga") AND +MATCH(body) AGAINST("starting"); +id title body +SHOW CREATE TABLE memos; +Table Create Table +memos CREATE TABLE `memos` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `body` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `title_index` (`title`), + FULLTEXT KEY `body_index` (`body`) +) ENGINE=Mroonga AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_spatial.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_spatial.result new file mode 100644 index 00000000000..d8ed80a157d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_spatial.result @@ -0,0 +1,132 @@ +DROP TABLE IF EXISTS shops; +CREATE TABLE shops ( +id INT PRIMARY KEY AUTO_INCREMENT, +name TEXT, +location GEOMETRY NOT NULL +); +INSERT INTO shops (name, location) +VALUES ('nezu-no-taiyaki', +GeomFromText('POINT(139.762573 35.720253)')); +INSERT INTO shops (name, location) +VALUES ('taiyaki-kataoka', +GeomFromText('POINT(139.715591 35.712521)')); +INSERT INTO shops (name, location) +VALUES ('soba-taiyaki-ku', +GeomFromText('POINT(139.659088 35.683712)')); +INSERT INTO shops (name, location) +VALUES ('kuruma', +GeomFromText('POINT(139.706207 35.721516)')); +INSERT INTO shops (name, location) +VALUES ('hirose-ya', +GeomFromText('POINT(139.685608 35.714844)')); +INSERT INTO shops (name, location) +VALUES ('sazare', +GeomFromText('POINT(139.685043 35.714653)')); +INSERT INTO shops (name, location) +VALUES ('omede-taiyaki', +GeomFromText('POINT(139.817154 35.700516)')); +INSERT INTO shops (name, location) +VALUES ('onaga-ya', +GeomFromText('POINT(139.81105 35.698254)')); +INSERT INTO shops (name, location) +VALUES ('shiro-ya', +GeomFromText('POINT(139.638611 35.705517)')); +INSERT INTO shops (name, location) +VALUES ('fuji-ya', +GeomFromText('POINT(139.637115 35.703938)')); +INSERT INTO shops (name, location) +VALUES ('miyoshi', +GeomFromText('POINT(139.537323 35.644539)')); +INSERT INTO shops (name, location) +VALUES ('juju-ya', +GeomFromText('POINT(139.695755 35.628922)')); +INSERT INTO shops (name, location) +VALUES ('tatsumi-ya', +GeomFromText('POINT(139.638657 35.665501)')); +INSERT INTO shops (name, location) +VALUES ('tetsuji', +GeomFromText('POINT(139.76857 35.680912)')); +INSERT INTO shops (name, location) +VALUES ('gazuma-ya', +GeomFromText('POINT(139.647598 35.700817)')); +INSERT INTO shops (name, location) +VALUES ('honma-mon', +GeomFromText('POINT(139.652573 35.722736)')); +INSERT INTO shops (name, location) +VALUES ('naniwa-ya', +GeomFromText('POINT(139.796234 35.730061)')); +INSERT INTO shops (name, location) +VALUES ('kuro-dai', +GeomFromText('POINT(139.704834 35.650345)')); +INSERT INTO shops (name, location) +VALUES ('daruma', +GeomFromText('POINT(139.770599 35.681461)')); +INSERT INTO shops (name, location) +VALUES ('yanagi-ya', +GeomFromText('POINT(139.783981 35.685341)')); +INSERT INTO shops (name, location) +VALUES ('sharaku', +GeomFromText('POINT(139.794846 35.716969)')); +INSERT INTO shops (name, location) +VALUES ('takane', +GeomFromText('POINT(139.560913 35.698601)')); +INSERT INTO shops (name, location) +VALUES ('chiyoda', +GeomFromText('POINT(139.652817 35.642601)')); +INSERT INTO shops (name, location) +VALUES ('da-ka-po', +GeomFromText('POINT(139.727356 35.627346)')); +INSERT INTO shops (name, location) +VALUES ('matsushima-ya', +GeomFromText('POINT(139.737381 35.640556)')); +INSERT INTO shops (name, location) +VALUES ('kazuya', +GeomFromText('POINT(139.760895 35.673508)')); +INSERT INTO shops (name, location) +VALUES ('furuya-kogane-an', +GeomFromText('POINT(139.676071 35.680603)')); +INSERT INTO shops (name, location) +VALUES ('hachi-no-ie', +GeomFromText('POINT(139.668106 35.608021)')); +INSERT INTO shops (name, location) +VALUES ('azuki-chan', +GeomFromText('POINT(139.673203 35.64151)')); +INSERT INTO shops (name, location) +VALUES ('kuriko-an', +GeomFromText('POINT(139.796829 35.712013)')); +INSERT INTO shops (name, location) +VALUES ('yume-no-aru-machi-no-taiyaki-ya-san', +GeomFromText('POINT(139.712524 35.616199)')); +INSERT INTO shops (name, location) +VALUES ('naze-ya', +GeomFromText('POINT(139.665833 35.609039)')); +INSERT INTO shops (name, location) +VALUES ('sanoki-ya', +GeomFromText('POINT(139.770721 35.66592)')); +INSERT INTO shops (name, location) +VALUES ('shigeta', +GeomFromText('POINT(139.780273 35.672626)')); +INSERT INTO shops (name, location) +VALUES ('nishimi-ya', +GeomFromText('POINT(139.774628 35.671825)')); +INSERT INTO shops (name, location) +VALUES ('hiiragi', +GeomFromText('POINT(139.711517 35.647701)')); +ALTER TABLE shops ADD SPATIAL KEY location_index (location); +SELECT id, name, AsText(location) AS location_text FROM shops +WHERE MBRContains(GeomFromText('LineString(139.7727 35.6684, 139.7038 35.7121)'), location) +ORDER BY id; +id name location_text +14 tetsuji POINT(139.76857 35.680911944444446) +19 daruma POINT(139.7705988888889 35.68146111111111) +26 kazuya POINT(139.760895 35.67350805555556) +SHOW CREATE TABLE shops; +Table Create Table +shops CREATE TABLE `shops` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` text, + `location` geometry NOT NULL, + PRIMARY KEY (`id`), + SPATIAL KEY `location_index` (`location`) +) ENGINE=Mroonga AUTO_INCREMENT=37 DEFAULT CHARSET=latin1 +DROP TABLE shops; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/auto_increment_TODO_SPLIT_ME.result b/storage/mroonga/mysql-test/mroonga/storage/r/auto_increment_TODO_SPLIT_ME.result new file mode 100644 index 00000000000..6a5729af023 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/auto_increment_TODO_SPLIT_ME.result @@ -0,0 +1,53 @@ +drop table if exists t1; +create table t1 (c1 int auto_increment, primary key(c1)); +insert into t1 values(null); +select c1 from t1 order by c1 desc limit 1; +c1 +1 +insert into t1 values(null); +select c1 from t1 order by c1 desc limit 1; +c1 +2 +insert into t1 values(10); +select c1 from t1 order by c1 desc limit 1; +c1 +10 +insert into t1 values(null); +select c1 from t1 order by c1 desc limit 1; +c1 +11 +insert into t1 values(6); +select c1 from t1 order by c1 desc limit 1; +c1 +11 +insert into t1 values(null); +select c1 from t1 order by c1 desc limit 1; +c1 +12 +drop table t1; +create table t1 (c1 int, c2 int auto_increment, primary key(c1), key idx1(c2)); +insert into t1 values(1, null); +select * from t1 order by c2 desc limit 1; +c1 c2 +1 1 +insert into t1 values(2, null); +select * from t1 order by c2 desc limit 1; +c1 c2 +2 2 +insert into t1 values(3, 10); +select * from t1 order by c2 desc limit 1; +c1 c2 +3 10 +insert into t1 values(4, null); +select * from t1 order by c2 desc limit 1; +c1 c2 +4 11 +insert into t1 values(5, 6); +select * from t1 order by c2 desc limit 1; +c1 c2 +4 11 +insert into t1 values(6, null); +select * from t1 order by c2 desc limit 1; +c1 c2 +6 12 +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/auto_increment_table_param.result b/storage/mroonga/mysql-test/mroonga/storage/r/auto_increment_table_param.result new file mode 100644 index 00000000000..f89b74e571a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/auto_increment_table_param.result @@ -0,0 +1,70 @@ +drop table if exists t1; +create table t1 (c1 int auto_increment, primary key(c1)) auto_increment=34129; +insert into t1 values(null); +select c1 from t1 order by c1 desc; +c1 +34129 +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (`c1`) +) ENGINE=Mroonga AUTO_INCREMENT=34130 DEFAULT CHARSET=latin1 +insert into t1 values(null); +select c1 from t1 order by c1 desc; +c1 +34130 +34129 +insert into t1 values(10); +select c1 from t1 order by c1 desc; +c1 +34130 +34129 +10 +insert into t1 values(null); +select c1 from t1 order by c1 desc; +c1 +34131 +34130 +34129 +10 +insert into t1 values(6); +select c1 from t1 order by c1 desc; +c1 +34131 +34130 +34129 +10 +6 +insert into t1 values(null); +select c1 from t1 order by c1 desc; +c1 +34132 +34131 +34130 +34129 +10 +6 +truncate table t1; +insert into t1 values(null); +select c1 from t1 order by c1 desc; +c1 +1 +delete from t1; +insert into t1 values(null); +select c1 from t1 order by c1 desc; +c1 +2 +rename table t1 to t2; +insert into t2 values(null); +select c1 from t2 order by c1 desc; +c1 +3 +2 +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `c1` int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (`c1`) +) ENGINE=Mroonga AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 +drop table t2; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/auto_increment_text.result b/storage/mroonga/mysql-test/mroonga/storage/r/auto_increment_text.result new file mode 100644 index 00000000000..fe5e6409abe --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/auto_increment_text.result @@ -0,0 +1,15 @@ +drop table if exists diaries; +create table diaries ( +id int primary key auto_increment, +body text +); +insert into diaries (body) values ("started groonga (long text)"); +select * from diaries; +id body +1 started groonga (long text) +insert into diaries (body) values ("sleeping... (short text)"); +select * from diaries; +id body +1 started groonga (long text) +2 sleeping... (short text) +drop table diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/binlog_TODO_SPLIT_ME.result b/storage/mroonga/mysql-test/mroonga/storage/r/binlog_TODO_SPLIT_ME.result new file mode 100644 index 00000000000..340509f6e53 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/binlog_TODO_SPLIT_ME.result @@ -0,0 +1,34 @@ +drop table if exists t1; +show variables like 'log_bin'; +Variable_name Value +log_bin ON +set binlog_format="STATEMENT"; +create table t1 (c1 int primary key, c2 int) engine = mroonga; +insert into t1 values(1,100); +insert into t1 values(2,100); +commit; +select * from t1; +c1 c2 +1 100 +2 100 +drop table t1; +set binlog_format="ROW"; +create table t1 (c1 int primary key, c2 int) engine = mroonga; +insert into t1 values(1,100); +insert into t1 values(2,100); +commit; +select * from t1; +c1 c2 +1 100 +2 100 +drop table t1; +set binlog_format="MIXED"; +create table t1 (c1 int primary key, c2 int) engine = mroonga; +insert into t1 values(1,100); +insert into t1 values(2,100); +commit; +select * from t1; +c1 c2 +1 100 +2 100 +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/collation_utf8_general_ci_french.result b/storage/mroonga/mysql-test/mroonga/storage/r/collation_utf8_general_ci_french.result new file mode 100644 index 00000000000..880092f46fb --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/collation_utf8_general_ci_french.result @@ -0,0 +1,11 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES utf8; +CREATE TABLE diaries ( +content varchar(256) COLLATE utf8_general_ci, +FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8; +INSERT INTO diaries VALUES ("Je suis un garçon."); +SELECT * FROM diaries WHERE MATCH (content) AGAINST ("garcon"); +content +Je suis un garçon. +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/collation_utf8_unicode_ci_french.result b/storage/mroonga/mysql-test/mroonga/storage/r/collation_utf8_unicode_ci_french.result new file mode 100644 index 00000000000..3f24de87035 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/collation_utf8_unicode_ci_french.result @@ -0,0 +1,11 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES utf8; +CREATE TABLE diaries ( +content varchar(256) COLLATE utf8_unicode_ci, +FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8; +INSERT INTO diaries VALUES ("Je suis un garçon."); +SELECT * FROM diaries WHERE MATCH (content) AGAINST ("garcon"); +content +Je suis un garçon. +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/collation_utf8_unicode_ci_japanese.result b/storage/mroonga/mysql-test/mroonga/storage/r/collation_utf8_unicode_ci_japanese.result new file mode 100644 index 00000000000..94ef2608b81 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/collation_utf8_unicode_ci_japanese.result @@ -0,0 +1,11 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES utf8; +CREATE TABLE diaries ( +content varchar(256) COLLATE utf8_unicode_ci, +FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8; +INSERT INTO diaries VALUES ("ひらがなとカタカナを覚えました。"); +SELECT * FROM diaries WHERE MATCH (content) AGAINST ("かたかな"); +content +ひらがなとカタカナを覚えました。 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_comment_index_not_for_mroonga.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_comment_index_not_for_mroonga.result new file mode 100644 index 00000000000..94b3a603389 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_comment_index_not_for_mroonga.result @@ -0,0 +1,12 @@ +DROP TABLE IF EXISTS bugs; +CREATE TABLE bugs ( +id INT UNSIGNED, +INDEX (id) COMMENT 'ID search is required.' +) DEFAULT CHARSET=utf8; +SHOW CREATE TABLE bugs; +Table Create Table +bugs CREATE TABLE `bugs` ( + `id` int(10) unsigned DEFAULT NULL, + KEY `id` (`id`) COMMENT 'ID search is required.' +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +DROP TABLE bugs; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_comment_normal_not_for_mroonga.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_comment_normal_not_for_mroonga.result new file mode 100644 index 00000000000..162b515d898 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_comment_normal_not_for_mroonga.result @@ -0,0 +1,13 @@ +DROP TABLE IF EXISTS bugs; +CREATE TABLE bugs ( +id INT UNSIGNED PRIMARY KEY, +tag VARCHAR(64) COMMENT 'It must consist of only alphabet and number.' +) DEFAULT CHARSET=utf8; +SHOW CREATE TABLE bugs; +Table Create Table +bugs CREATE TABLE `bugs` ( + `id` int(10) unsigned NOT NULL, + `tag` varchar(64) DEFAULT NULL COMMENT 'It must consist of only alphabet and number.', + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +DROP TABLE bugs; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_date_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_date_with_index.result new file mode 100644 index 00000000000..e24a56be3a2 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_date_with_index.result @@ -0,0 +1,29 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +created_at DATE, +KEY (created_at) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `created_at` date DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `created_at` (`created_at`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, created_at) VALUES ("clear day", "2012-01-29"); +INSERT INTO diaries (title, created_at) VALUES ("rainy day", "2012-01-30"); +INSERT INTO diaries (title, created_at) VALUES ("cloudy day", "2012-01-31"); +SELECT * FROM diaries; +id title created_at +1 clear day 2012-01-29 +2 rainy day 2012-01-30 +3 cloudy day 2012-01-31 +SELECT * FROM diaries WHERE created_at BETWEEN "2012-01-29" AND "2012-01-30"; +id title created_at +1 clear day 2012-01-29 +2 rainy day 2012-01-30 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_date_without_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_date_without_index.result new file mode 100644 index 00000000000..018ee8eb5b8 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_date_without_index.result @@ -0,0 +1,27 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +created_at DATE +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `created_at` date DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, created_at) VALUES ("clear day", "2012-01-29"); +INSERT INTO diaries (title, created_at) VALUES ("rainy day", "2012-01-30"); +INSERT INTO diaries (title, created_at) VALUES ("cloudy day", "2012-01-31"); +SELECT * FROM diaries; +id title created_at +1 clear day 2012-01-29 +2 rainy day 2012-01-30 +3 cloudy day 2012-01-31 +SELECT * FROM diaries WHERE created_at BETWEEN "2012-01-29" AND "2012-01-30"; +id title created_at +1 clear day 2012-01-29 +2 rainy day 2012-01-30 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_date_zero_date.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_date_zero_date.result new file mode 100644 index 00000000000..b2364e1158e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_date_zero_date.result @@ -0,0 +1,27 @@ +DROP TABLE IF EXISTS timestamps; +CREATE TABLE timestamps ( +id INT PRIMARY KEY AUTO_INCREMENT, +create_dt DATE +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE timestamps; +Table Create Table +timestamps CREATE TABLE `timestamps` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `create_dt` date DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO timestamps (create_dt) VALUES ("2012-00-01"); +Warnings: +Warning 1265 Data truncated for column 'create_dt' at row 1 +INSERT INTO timestamps (create_dt) VALUES ("2012-01-00"); +Warnings: +Warning 1265 Data truncated for column 'create_dt' at row 1 +SELECT * FROM timestamps; +id create_dt +1 2012-01-01 +2 2012-01-01 +SELECT * FROM timestamps WHERE create_dt = "2012-01-01"; +id create_dt +1 2012-01-01 +2 2012-01-01 +DROP TABLE timestamps; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_2038.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_2038.result new file mode 100644 index 00000000000..453f641968b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_2038.result @@ -0,0 +1,25 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +created_at DATETIME +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `created_at` datetime DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, created_at) +VALUES ('2038-01-18 03:14:07', '2038-01-18 03:14:07'); +INSERT INTO diaries (title, created_at) +VALUES ('2038-01-20 03:14:08', '2038-01-20 03:14:08'); +Warnings: +Warning 1265 Data truncated for column 'created_at' at row 1 +SELECT * FROM diaries; +id title created_at +1 2038-01-18 03:14:07 2038-01-18 03:14:07 +2 2038-01-20 03:14:08 1970-01-01 00:00:00 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_before_unix_epoch.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_before_unix_epoch.result new file mode 100644 index 00000000000..10824d7c28d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_before_unix_epoch.result @@ -0,0 +1,22 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +created_at DATETIME +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `created_at` datetime DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, created_at) +VALUES ('1000-01-01 00:00:00', '1000-01-01 00:00:00'); +Warnings: +Warning 1265 Data truncated for column 'created_at' at row 1 +SELECT * FROM diaries; +id title created_at +1 1000-01-01 00:00:00 1970-01-01 00:00:00 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_max.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_max.result new file mode 100644 index 00000000000..f3a7b27f342 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_max.result @@ -0,0 +1,22 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +created_at DATETIME +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `created_at` datetime DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, created_at) +VALUES ('9999-12-31 23:59:59', '9999-12-31 23:59:59'); +Warnings: +Warning 1265 Data truncated for column 'created_at' at row 1 +SELECT * FROM diaries; +id title created_at +1 9999-12-31 23:59:59 1970-01-01 00:00:00 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_out_of_range.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_out_of_range.result new file mode 100644 index 00000000000..d7acad79bab --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_out_of_range.result @@ -0,0 +1,23 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +created_at DATETIME +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `created_at` datetime DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, created_at) +VALUES ('2012', '2012'); +Warnings: +Warning 1265 Data truncated for column 'created_at' at row 1 +Warning 1265 Data truncated for column 'created_at' at row 1 +SELECT * FROM diaries; +id title created_at +1 2012 1970-01-01 00:00:00 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_2038.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_2038.result new file mode 100644 index 00000000000..56e38902f28 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_2038.result @@ -0,0 +1,23 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +created_at DATETIME +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `created_at` datetime DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, created_at) +VALUES ('2038-01-19 03:14:07', '2038-01-19 03:14:07'); +INSERT INTO diaries (title, created_at) +VALUES ('2038-01-19 03:14:08', '2038-01-19 03:14:08'); +SELECT * FROM diaries; +id title created_at +1 2038-01-19 03:14:07 2038-01-19 03:14:07 +2 2038-01-19 03:14:08 2038-01-19 03:14:08 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_before_unix_epoch.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_before_unix_epoch.result new file mode 100644 index 00000000000..c3ca2628bca --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_before_unix_epoch.result @@ -0,0 +1,20 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +created_at DATETIME +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `created_at` datetime DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, created_at) +VALUES ('1000-01-01 00:00:00', '1000-01-01 00:00:00'); +SELECT * FROM diaries; +id title created_at +1 1000-01-01 00:00:00 1000-01-01 00:00:00 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_max.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_max.result new file mode 100644 index 00000000000..0373d17530e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_max.result @@ -0,0 +1,20 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +created_at DATETIME +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `created_at` datetime DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, created_at) +VALUES ('9999-12-31 23:59:59', '9999-12-31 23:59:59'); +SELECT * FROM diaries; +id title created_at +1 9999-12-31 23:59:59 9999-12-31 23:59:59 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_version_55_out_of_range.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_version_55_out_of_range.result new file mode 100644 index 00000000000..733217fda85 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_version_55_out_of_range.result @@ -0,0 +1,23 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +created_at DATETIME +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `created_at` datetime DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, created_at) +VALUES ('2012', '2012'); +Warnings: +Warning 1264 Out of range value for column 'created_at' at row 1 +Warning 1265 Data truncated for column 'created_at' at row 1 +SELECT * FROM diaries; +id title created_at +1 2012 0000-01-01 00:00:00 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_version_56_or_later_out_of_range.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_version_56_or_later_out_of_range.result new file mode 100644 index 00000000000..962212c86f8 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_version_56_or_later_out_of_range.result @@ -0,0 +1,23 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +created_at DATETIME +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `created_at` datetime DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, created_at) +VALUES ('2012', '2012'); +Warnings: +Warning 1265 Data truncated for column 'created_at' at row 1 +Warning 1265 Data truncated for column 'created_at' at row 1 +SELECT * FROM diaries; +id title created_at +1 2012 0000-01-01 00:00:00 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_fractional_seconds_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_fractional_seconds_with_index.result new file mode 100644 index 00000000000..a31042f768d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_fractional_seconds_with_index.result @@ -0,0 +1,34 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +created_at DATETIME(6), +KEY (created_at) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `created_at` datetime(6) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `created_at` (`created_at`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, created_at) +VALUES ("clear day", "2012-01-29 21:51:01.111111"); +INSERT INTO diaries (title, created_at) +VALUES ("rainy day", "2012-01-30 01:23:45.333"); +INSERT INTO diaries (title, created_at) +VALUES ("cloudy day", "2012-01-31 08:32:10.5555"); +SELECT * FROM diaries; +id title created_at +1 clear day 2012-01-29 21:51:01.111111 +2 rainy day 2012-01-30 01:23:45.333000 +3 cloudy day 2012-01-31 08:32:10.555500 +SELECT * FROM diaries +WHERE created_at BETWEEN "2012-01-29 00:00:00.123456" AND +"2012-01-31 00:00:00.999999"; +id title created_at +1 clear day 2012-01-29 21:51:01.111111 +2 rainy day 2012-01-30 01:23:45.333000 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_fractional_seconds_without_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_fractional_seconds_without_index.result new file mode 100644 index 00000000000..0b1bf0f0eb4 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_fractional_seconds_without_index.result @@ -0,0 +1,32 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +created_at DATETIME(6) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `created_at` datetime(6) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, created_at) +VALUES ("clear day", "2012-01-29 21:51:01.111111"); +INSERT INTO diaries (title, created_at) +VALUES ("rainy day", "2012-01-30 01:23:45.333"); +INSERT INTO diaries (title, created_at) +VALUES ("cloudy day", "2012-01-31 08:32:10.5555"); +SELECT * FROM diaries; +id title created_at +1 clear day 2012-01-29 21:51:01.111111 +2 rainy day 2012-01-30 01:23:45.333000 +3 cloudy day 2012-01-31 08:32:10.555500 +SELECT * FROM diaries +WHERE created_at BETWEEN "2012-01-29 00:00:00.123456" AND +"2012-01-31 00:00:00.999999"; +id title created_at +1 clear day 2012-01-29 21:51:01.111111 +2 rainy day 2012-01-30 01:23:45.333000 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_freebsd_before_unix_epoch.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_freebsd_before_unix_epoch.result new file mode 100644 index 00000000000..10824d7c28d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_freebsd_before_unix_epoch.result @@ -0,0 +1,22 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +created_at DATETIME +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `created_at` datetime DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, created_at) +VALUES ('1000-01-01 00:00:00', '1000-01-01 00:00:00'); +Warnings: +Warning 1265 Data truncated for column 'created_at' at row 1 +SELECT * FROM diaries; +id title created_at +1 1000-01-01 00:00:00 1970-01-01 00:00:00 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_null.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_null.result new file mode 100644 index 00000000000..82f01b9f237 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_null.result @@ -0,0 +1,20 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +created_at DATETIME +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `created_at` datetime DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, created_at) +VALUES ('NULL', NULL); +SELECT * FROM diaries; +id title created_at +1 NULL 1970-01-01 00:00:00 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_with_index.result new file mode 100644 index 00000000000..b205031dec1 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_with_index.result @@ -0,0 +1,33 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +created_at DATETIME, +KEY (created_at) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `created_at` datetime DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `created_at` (`created_at`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, created_at) +VALUES ("clear day", "2012-01-29 21:51:01"); +INSERT INTO diaries (title, created_at) +VALUES ("rainy day", "2012-01-30 01:23:45"); +INSERT INTO diaries (title, created_at) +VALUES ("cloudy day", "2012-01-31 08:32:10"); +SELECT * FROM diaries; +id title created_at +1 clear day 2012-01-29 21:51:01 +2 rainy day 2012-01-30 01:23:45 +3 cloudy day 2012-01-31 08:32:10 +SELECT * FROM diaries +WHERE created_at BETWEEN "2012-01-29 00:00:00" AND "2012-01-31 00:00:00"; +id title created_at +1 clear day 2012-01-29 21:51:01 +2 rainy day 2012-01-30 01:23:45 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_without_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_without_index.result new file mode 100644 index 00000000000..6592df35fcb --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_without_index.result @@ -0,0 +1,31 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +created_at DATETIME +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `created_at` datetime DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, created_at) +VALUES ("clear day", "2012-01-29 21:51:01"); +INSERT INTO diaries (title, created_at) +VALUES ("rainy day", "2012-01-30 01:23:45"); +INSERT INTO diaries (title, created_at) +VALUES ("cloudy day", "2012-01-31 08:32:10"); +SELECT * FROM diaries; +id title created_at +1 clear day 2012-01-29 21:51:01 +2 rainy day 2012-01-30 01:23:45 +3 cloudy day 2012-01-31 08:32:10 +SELECT * FROM diaries +WHERE created_at BETWEEN "2012-01-29 00:00:00" AND "2012-01-31 00:00:00"; +id title created_at +1 clear day 2012-01-29 21:51:01 +2 rainy day 2012-01-30 01:23:45 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_zero_date.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_zero_date.result new file mode 100644 index 00000000000..c22a63f9744 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_zero_date.result @@ -0,0 +1,27 @@ +DROP TABLE IF EXISTS timestamps; +CREATE TABLE timestamps ( +id INT PRIMARY KEY AUTO_INCREMENT, +create_dt DATETIME +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE timestamps; +Table Create Table +timestamps CREATE TABLE `timestamps` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `create_dt` datetime DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO timestamps (create_dt) VALUES ("2012-00-01 00:00:00"); +Warnings: +Warning 1265 Data truncated for column 'create_dt' at row 1 +INSERT INTO timestamps (create_dt) VALUES ("2012-01-00 00:00:00"); +Warnings: +Warning 1265 Data truncated for column 'create_dt' at row 1 +SELECT * FROM timestamps; +id create_dt +1 2012-01-01 00:00:00 +2 2012-01-01 00:00:00 +SELECT * FROM timestamps WHERE create_dt = "2012-01-01 00:00:00"; +id create_dt +1 2012-01-01 00:00:00 +2 2012-01-01 00:00:00 +DROP TABLE timestamps; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_decimal_fractional_seconds_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_decimal_fractional_seconds_with_index.result new file mode 100644 index 00000000000..4a21d62dd14 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_decimal_fractional_seconds_with_index.result @@ -0,0 +1,29 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +temperature DECIMAL(6, 3), +KEY (temperature) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `temperature` decimal(6,3) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `temperature` (`temperature`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, temperature) VALUES ("clear day", 21.281); +INSERT INTO diaries (title, temperature) VALUES ("rainy day", 14.213); +INSERT INTO diaries (title, temperature) VALUES ("cloudy day", 17.821); +SELECT * FROM diaries; +id title temperature +1 clear day 21.281 +2 rainy day 14.213 +3 cloudy day 17.821 +SELECT * FROM diaries WHERE temperature BETWEEN "14.213" AND "17.821"; +id title temperature +2 rainy day 14.213 +3 cloudy day 17.821 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_decimal_fractional_seconds_without_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_decimal_fractional_seconds_without_index.result new file mode 100644 index 00000000000..cd939fa5483 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_decimal_fractional_seconds_without_index.result @@ -0,0 +1,27 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +temperature DECIMAL(6, 3) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `temperature` decimal(6,3) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, temperature) VALUES ("clear day", 21.281); +INSERT INTO diaries (title, temperature) VALUES ("rainy day", 14.213); +INSERT INTO diaries (title, temperature) VALUES ("cloudy day", 17.821); +SELECT * FROM diaries; +id title temperature +1 clear day 21.281 +2 rainy day 14.213 +3 cloudy day 17.821 +SELECT * FROM diaries WHERE temperature BETWEEN "14.213" AND "17.821"; +id title temperature +2 rainy day 14.213 +3 cloudy day 17.821 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_decimal_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_decimal_with_index.result new file mode 100644 index 00000000000..56a6a360dc9 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_decimal_with_index.result @@ -0,0 +1,29 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +temperature DECIMAL, +KEY (temperature) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `temperature` decimal(10,0) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `temperature` (`temperature`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, temperature) VALUES ("clear day", 21); +INSERT INTO diaries (title, temperature) VALUES ("rainy day", 14); +INSERT INTO diaries (title, temperature) VALUES ("cloudy day", 17); +SELECT * FROM diaries; +id title temperature +1 clear day 21 +2 rainy day 14 +3 cloudy day 17 +SELECT * FROM diaries WHERE temperature BETWEEN "14" AND "17"; +id title temperature +2 rainy day 14 +3 cloudy day 17 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_decimal_without_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_decimal_without_index.result new file mode 100644 index 00000000000..06162f76ddd --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_decimal_without_index.result @@ -0,0 +1,27 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +temperature DECIMAL +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `temperature` decimal(10,0) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, temperature) VALUES ("clear day", 21); +INSERT INTO diaries (title, temperature) VALUES ("rainy day", 14); +INSERT INTO diaries (title, temperature) VALUES ("cloudy day", 17); +SELECT * FROM diaries; +id title temperature +1 clear day 21 +2 rainy day 14 +3 cloudy day 17 +SELECT * FROM diaries WHERE temperature BETWEEN "14" AND "17"; +id title temperature +2 rainy day 14 +3 cloudy day 17 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_enum_less_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_enum_less_with_index.result new file mode 100644 index 00000000000..28c80dcc6f8 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_enum_less_with_index.result @@ -0,0 +1,28 @@ +DROP TABLE IF EXISTS items; +CREATE TABLE items ( +name VARCHAR(255), +size ENUM("small", "medium", "large"), +INDEX (size) +) ENGINE=Mroonga DEFAULT CHARSET=utf8; +SHOW CREATE TABLE items; +Table Create Table +items CREATE TABLE `items` ( + `name` varchar(255) DEFAULT NULL, + `size` enum('small','medium','large') DEFAULT NULL, + KEY `size` (`size`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO items VALUES ("t-shart for child", "small"); +INSERT INTO items VALUES ("leadies' coat", "medium"); +INSERT INTO items VALUES ("parka", "large"); +INSERT INTO items VALUES ("hat", "medium"); +SELECT * FROM items; +name size +t-shart for child small +leadies' coat medium +parka large +hat medium +SELECT * FROM items WHERE size = "medium"; +name size +leadies' coat medium +hat medium +DROP TABLE items; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_enum_many_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_enum_many_with_index.result new file mode 100644 index 00000000000..731a9690702 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_enum_many_with_index.result @@ -0,0 +1,287 @@ +DROP TABLE IF EXISTS items; +CREATE TABLE items ( +name VARCHAR(255), +size ENUM("size1", +"size2", +"size3", +"size4", +"size5", +"size6", +"size7", +"size8", +"size9", +"size10", +"size11", +"size12", +"size13", +"size14", +"size15", +"size16", +"size17", +"size18", +"size19", +"size20", +"size21", +"size22", +"size23", +"size24", +"size25", +"size26", +"size27", +"size28", +"size29", +"size30", +"size31", +"size32", +"size33", +"size34", +"size35", +"size36", +"size37", +"size38", +"size39", +"size40", +"size41", +"size42", +"size43", +"size44", +"size45", +"size46", +"size47", +"size48", +"size49", +"size50", +"size51", +"size52", +"size53", +"size54", +"size55", +"size56", +"size57", +"size58", +"size59", +"size60", +"size61", +"size62", +"size63", +"size64", +"size65", +"size66", +"size67", +"size68", +"size69", +"size70", +"size71", +"size72", +"size73", +"size74", +"size75", +"size76", +"size77", +"size78", +"size79", +"size80", +"size81", +"size82", +"size83", +"size84", +"size85", +"size86", +"size87", +"size88", +"size89", +"size90", +"size91", +"size92", +"size93", +"size94", +"size95", +"size96", +"size97", +"size98", +"size99", +"size100", +"size101", +"size102", +"size103", +"size104", +"size105", +"size106", +"size107", +"size108", +"size109", +"size110", +"size111", +"size112", +"size113", +"size114", +"size115", +"size116", +"size117", +"size118", +"size119", +"size120", +"size121", +"size122", +"size123", +"size124", +"size125", +"size126", +"size127", +"size128", +"size129", +"size130", +"size131", +"size132", +"size133", +"size134", +"size135", +"size136", +"size137", +"size138", +"size139", +"size140", +"size141", +"size142", +"size143", +"size144", +"size145", +"size146", +"size147", +"size148", +"size149", +"size150", +"size151", +"size152", +"size153", +"size154", +"size155", +"size156", +"size157", +"size158", +"size159", +"size160", +"size161", +"size162", +"size163", +"size164", +"size165", +"size166", +"size167", +"size168", +"size169", +"size170", +"size171", +"size172", +"size173", +"size174", +"size175", +"size176", +"size177", +"size178", +"size179", +"size180", +"size181", +"size182", +"size183", +"size184", +"size185", +"size186", +"size187", +"size188", +"size189", +"size190", +"size191", +"size192", +"size193", +"size194", +"size195", +"size196", +"size197", +"size198", +"size199", +"size200", +"size201", +"size202", +"size203", +"size204", +"size205", +"size206", +"size207", +"size208", +"size209", +"size210", +"size211", +"size212", +"size213", +"size214", +"size215", +"size216", +"size217", +"size218", +"size219", +"size220", +"size221", +"size222", +"size223", +"size224", +"size225", +"size226", +"size227", +"size228", +"size229", +"size230", +"size231", +"size232", +"size233", +"size234", +"size235", +"size236", +"size237", +"size238", +"size239", +"size240", +"size241", +"size242", +"size243", +"size244", +"size245", +"size246", +"size247", +"size248", +"size249", +"size250", +"size251", +"size252", +"size253", +"size254", +"size255", +"size256"), +INDEX (size) +) ENGINE=Mroonga DEFAULT CHARSET=utf8; +SHOW CREATE TABLE items; +Table Create Table +items CREATE TABLE `items` ( + `name` varchar(255) DEFAULT NULL, + `size` enum('size1','size2','size3','size4','size5','size6','size7','size8','size9','size10','size11','size12','size13','size14','size15','size16','size17','size18','size19','size20','size21','size22','size23','size24','size25','size26','size27','size28','size29','size30','size31','size32','size33','size34','size35','size36','size37','size38','size39','size40','size41','size42','size43','size44','size45','size46','size47','size48','size49','size50','size51','size52','size53','size54','size55','size56','size57','size58','size59','size60','size61','size62','size63','size64','size65','size66','size67','size68','size69','size70','size71','size72','size73','size74','size75','size76','size77','size78','size79','size80','size81','size82','size83','size84','size85','size86','size87','size88','size89','size90','size91','size92','size93','size94','size95','size96','size97','size98','size99','size100','size101','size102','size103','size104','size105','size106','size107','size108','size109','size110','size111','size112','size113','size114','size115','size116','size117','size118','size119','size120','size121','size122','size123','size124','size125','size126','size127','size128','size129','size130','size131','size132','size133','size134','size135','size136','size137','size138','size139','size140','size141','size142','size143','size144','size145','size146','size147','size148','size149','size150','size151','size152','size153','size154','size155','size156','size157','size158','size159','size160','size161','size162','size163','size164','size165','size166','size167','size168','size169','size170','size171','size172','size173','size174','size175','size176','size177','size178','size179','size180','size181','size182','size183','size184','size185','size186','size187','size188','size189','size190','size191','size192','size193','size194','size195','size196','size197','size198','size199','size200','size201','size202','size203','size204','size205','size206','size207','size208','size209','size210','size211','size212','size213','size214','size215','size216','size217','size218','size219','size220','size221','size222','size223','size224','size225','size226','size227','size228','size229','size230','size231','size232','size233','size234','size235','size236','size237','size238','size239','size240','size241','size242','size243','size244','size245','size246','size247','size248','size249','size250','size251','size252','size253','size254','size255','size256') DEFAULT NULL, + KEY `size` (`size`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO items VALUES ("t-shart for child", "size1"); +INSERT INTO items VALUES ("leadies' coat", "size1"); +INSERT INTO items VALUES ("parka", "size256"); +INSERT INTO items VALUES ("hat", "size256"); +SELECT * FROM items; +name size +t-shart for child size1 +leadies' coat size1 +parka size256 +hat size256 +SELECT * FROM items WHERE size = "size1"; +name size +t-shart for child size1 +leadies' coat size1 +SELECT * FROM items WHERE size = "size256"; +name size +parka size256 +hat size256 +DROP TABLE items; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga__id__id.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga__id__id.result new file mode 100644 index 00000000000..33f31ed38df --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga__id__id.result @@ -0,0 +1,13 @@ +DROP TABLE IF EXISTS contents; +CREATE TABLE contents ( +_id INT, +content TEXT NOT NULL, +FULLTEXT INDEX(content) +) DEFAULT CHARSET=utf8; +INSERT INTO contents (content) VALUES ('first'); +INSERT INTO contents (content) VALUES ('second'); +SELECT _id, content FROM contents; +_id content +1 first +2 second +DROP TABLE contents; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga__id_invalid_id.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga__id_invalid_id.result new file mode 100644 index 00000000000..903e3a85cab --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga__id_invalid_id.result @@ -0,0 +1,8 @@ +DROP TABLE IF EXISTS contents; +CREATE TABLE contents ( +_i INT, +content TEXT NOT NULL, +FULLTEXT INDEX(content) +) DEFAULT CHARSET=utf8; +ERROR HY000: [column][create] name can't start with '_' and contains only 0-9, A-Z, a-z, #, @, - or _: <_i> +DROP TABLE IF EXISTS contents; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_index_fulltext_other_table.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_index_fulltext_other_table.result new file mode 100644 index 00000000000..87c14a98f15 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_index_fulltext_other_table.result @@ -0,0 +1,42 @@ +DROP DATABASE IF EXISTS mroonga; +CREATE DATABASE mroonga; +USE mroonga; +CREATE TABLE tags ( +name VARCHAR(64) PRIMARY KEY +) DEFAULT CHARSET=utf8 +COLLATE=utf8_bin +COMMENT='default_tokenizer "TokenDelimit"'; +CREATE TABLE bugs ( +id INT UNSIGNED PRIMARY KEY, +tags TEXT COMMENT 'flags "COLUMN_VECTOR", type "tags"', +FULLTEXT INDEX bugs_tags_index (tags) COMMENT 'table "tags"' +) DEFAULT CHARSET=utf8; +INSERT INTO bugs (id, tags) VALUES (1, "Linux MySQL groonga"); +SELECT mroonga_command("dump"); +mroonga_command("dump") +table_create tags TABLE_PAT_KEY ShortText --default_tokenizer TokenDelimit +column_create tags name COLUMN_SCALAR ShortText +table_create bugs TABLE_PAT_KEY UInt32 +column_create bugs id COLUMN_SCALAR UInt32 +column_create bugs tags COLUMN_VECTOR tags +column_create tags bugs_tags_index COLUMN_INDEX|WITH_POSITION bugs tags +load --table tags +[ +["_key","name"], +["Linux",""], +["MySQL",""], +["groonga",""] +] +load --table bugs +[ +["_key","id","tags"], +[1,1,["Linux","MySQL","groonga"]] +] +SELECT *, MATCH (tags) AGAINST ("MySQL" IN BOOLEAN MODE) AS score +FROM bugs +WHERE MATCH (tags) AGAINST ("MySQL" IN BOOLEAN MODE); +id tags score +1 Linux MySQL groonga 1 +DROP TABLE bugs; +DROP TABLE tags; +DROP DATABASE mroonga; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_index_int_other_table.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_index_int_other_table.result new file mode 100644 index 00000000000..e46ed71d0fe --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_index_int_other_table.result @@ -0,0 +1,45 @@ +DROP DATABASE IF EXISTS mroonga; +CREATE DATABASE mroonga; +USE mroonga; +CREATE TABLE priorities ( +id INT PRIMARY KEY +) DEFAULT CHARSET=utf8 +COLLATE=utf8_bin; +CREATE TABLE bugs ( +id INT UNSIGNED PRIMARY KEY, +priority INT COMMENT 'type "priorities"', +INDEX bugs_priority_index (priority) COMMENT 'table "priorities"' +) DEFAULT CHARSET=utf8; +INSERT INTO bugs (id, priority) VALUES (1, 10); +INSERT INTO bugs (id, priority) VALUES (2, 3); +INSERT INTO bugs (id, priority) VALUES (3, -2); +SELECT mroonga_command("dump"); +mroonga_command("dump") +table_create priorities TABLE_PAT_KEY Int32 +column_create priorities id COLUMN_SCALAR Int32 +table_create bugs TABLE_PAT_KEY UInt32 +column_create bugs id COLUMN_SCALAR UInt32 +column_create bugs priority COLUMN_SCALAR priorities +column_create priorities bugs_priority_index COLUMN_INDEX|WITH_POSITION bugs priority +load --table priorities +[ +["_key","id"], +[-2,0], +[3,0], +[10,0] +] +load --table bugs +[ +["_key","id","priority"], +[1,1,10], +[2,2,3], +[3,3,-2] +] +SELECT * +FROM bugs +WHERE priority = 3; +id priority +2 3 +DROP TABLE bugs; +DROP TABLE priorities; +DROP DATABASE mroonga; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_scalar_reference.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_scalar_reference.result new file mode 100644 index 00000000000..8acf8aab220 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_scalar_reference.result @@ -0,0 +1,24 @@ +DROP TABLE IF EXISTS tags, bugs; +CREATE TABLE tags ( +name VARCHAR(64) PRIMARY KEY +) DEFAULT CHARSET=utf8 +COLLATE=utf8_bin; +CREATE TABLE bugs ( +id INT UNSIGNED PRIMARY KEY, +tag TEXT COMMENT 'type "tags"' +) DEFAULT CHARSET=utf8; +INSERT INTO bugs (id, tag) VALUES (1, "Linux"); +INSERT INTO bugs (id, tag) VALUES (2, "MySQL"); +INSERT INTO bugs (id, tag) VALUES (3, "groonga"); +SELECT * FROM bugs; +id tag +1 Linux +2 MySQL +3 groonga +SELECT * FROM tags; +name +Linux +MySQL +groonga +DROP TABLE bugs; +DROP TABLE tags; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_scalar_with_not_for_mroonga_comment.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_scalar_with_not_for_mroonga_comment.result new file mode 100644 index 00000000000..cd910206a3d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_scalar_with_not_for_mroonga_comment.result @@ -0,0 +1,27 @@ +DROP TABLE IF EXISTS tags, bugs; +CREATE TABLE tags ( +name VARCHAR(64) PRIMARY KEY +) DEFAULT CHARSET=utf8 +COLLATE=utf8_bin; +CREATE TABLE bugs ( +id INT UNSIGNED PRIMARY KEY, +tag TEXT COMMENT 'It references to tags.name, type "tags"' +) DEFAULT CHARSET=utf8; +SHOW FULL COLUMNS FROM bugs LIKE 'tag'; +Field Type Collation Null Key Default Extra Privileges Comment +tag text utf8_general_ci YES NULL select,insert,update,references It references to tags.name, type "tags" +INSERT INTO bugs (id, tag) VALUES (1, "Linux"); +INSERT INTO bugs (id, tag) VALUES (2, "MySQL"); +INSERT INTO bugs (id, tag) VALUES (3, "groonga"); +SELECT * FROM bugs; +id tag +1 Linux +2 MySQL +3 groonga +SELECT * FROM tags; +name +Linux +MySQL +groonga +DROP TABLE bugs; +DROP TABLE tags; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_vector_order_by_with_function.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_vector_order_by_with_function.result new file mode 100644 index 00000000000..468115e8a20 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_vector_order_by_with_function.result @@ -0,0 +1,23 @@ +DROP TABLE IF EXISTS tags, bugs; +CREATE TABLE tags ( +name VARCHAR(64) PRIMARY KEY +) DEFAULT CHARSET=utf8 +COLLATE=utf8_bin +COMMENT='default_tokenizer "TokenDelimit"'; +CREATE TABLE bugs ( +id INT UNSIGNED PRIMARY KEY, +tags TEXT COMMENT 'flags "COLUMN_VECTOR", type "tags"' +) DEFAULT CHARSET=utf8; +INSERT INTO bugs (id, tags) VALUES (1, "Linux MySQL Groonga"); +INSERT INTO bugs (id, tags) VALUES (2, "MySQL Mroonga"); +INSERT INTO bugs (id, tags) VALUES (3, "Ruby Rroonga"); +SELECT * FROM tags ORDER BY SUBSTRING(name, 1, 1) ASC; +name +Groonga +Linux +Mroonga +MySQL +Rroonga +Ruby +DROP TABLE bugs; +DROP TABLE tags; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_vector_reference.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_vector_reference.result new file mode 100644 index 00000000000..515dad1da2e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_vector_reference.result @@ -0,0 +1,21 @@ +DROP TABLE IF EXISTS tags, bugs; +CREATE TABLE tags ( +name VARCHAR(64) PRIMARY KEY +) DEFAULT CHARSET=utf8 +COLLATE=utf8_bin +COMMENT='default_tokenizer "TokenDelimit"'; +CREATE TABLE bugs ( +id INT UNSIGNED PRIMARY KEY, +tags TEXT COMMENT 'flags "COLUMN_VECTOR", type "tags"' +) DEFAULT CHARSET=utf8; +INSERT INTO bugs (id, tags) VALUES (1, "Linux MySQL groonga"); +SELECT * FROM bugs; +id tags +1 Linux MySQL groonga +SELECT * FROM tags; +name +Linux +MySQL +groonga +DROP TABLE bugs; +DROP TABLE tags; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_int_with_index_zero_value.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_int_with_index_zero_value.result new file mode 100644 index 00000000000..1afd7da9839 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_int_with_index_zero_value.result @@ -0,0 +1,21 @@ +DROP TABLE IF EXISTS items; +CREATE TABLE items ( +name VARCHAR(255), +price INT KEY +) ENGINE=Mroonga DEFAULT CHARSET=utf8; +INSERT INTO items VALUES ("hamburger", 200); +INSERT INTO items VALUES ("smile", 0); +INSERT INTO items VALUES ("coke", 100); +SELECT * FROM items; +name price +smile 0 +coke 100 +hamburger 200 +SELECT * FROM items WHERE price = 0; +name price +smile 0 +SELECT * FROM items WHERE price <= 100; +name price +smile 0 +coke 100 +DROP TABLE items; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_set_16_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_set_16_with_index.result new file mode 100644 index 00000000000..ee818a62e75 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_set_16_with_index.result @@ -0,0 +1,40 @@ +DROP TABLE IF EXISTS items; +CREATE TABLE items ( +name VARCHAR(255), +colors SET("black", +"dim gray", +"dark gray", +"gray", +"light gray", +"gainsboro", +"white smoke", +"white", +"red", +"orange red", +"dark orange", +"orange", +"gold", +"yellow", +"chartreuse", +"lawn green"), +INDEX (colors) +) DEFAULT CHARSET=utf8; +SHOW CREATE TABLE items; +Table Create Table +items CREATE TABLE `items` ( + `name` varchar(255) DEFAULT NULL, + `colors` set('black','dim gray','dark gray','gray','light gray','gainsboro','white smoke','white','red','orange red','dark orange','orange','gold','yellow','chartreuse','lawn green') DEFAULT NULL, + KEY `colors` (`colors`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO items VALUES ("t-shart", "black,gray"); +INSERT INTO items VALUES ("hat", "white,dark gray"); +INSERT INTO items VALUES ("parka", "chartreuse,orange"); +SELECT * FROM items; +name colors +t-shart black,gray +hat dark gray,white +parka orange,chartreuse +SELECT * FROM items WHERE colors = "dark gray,white"; +name colors +hat dark gray,white +DROP TABLE items; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_set_24_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_set_24_with_index.result new file mode 100644 index 00000000000..10d4fd8bd1c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_set_24_with_index.result @@ -0,0 +1,48 @@ +DROP TABLE IF EXISTS items; +CREATE TABLE items ( +name VARCHAR(255), +colors SET("black", +"dim gray", +"dark gray", +"gray", +"light gray", +"gainsboro", +"white smoke", +"white", +"red", +"orange red", +"dark orange", +"orange", +"gold", +"yellow", +"chartreuse", +"lawn green", +"green", +"spring green", +"medium spring green", +"cyan", +"deep sky blue", +"blue", +"medium blue", +"dark violet"), +INDEX (colors) +) DEFAULT CHARSET=utf8; +SHOW CREATE TABLE items; +Table Create Table +items CREATE TABLE `items` ( + `name` varchar(255) DEFAULT NULL, + `colors` set('black','dim gray','dark gray','gray','light gray','gainsboro','white smoke','white','red','orange red','dark orange','orange','gold','yellow','chartreuse','lawn green','green','spring green','medium spring green','cyan','deep sky blue','blue','medium blue','dark violet') DEFAULT NULL, + KEY `colors` (`colors`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO items VALUES ("t-shart", "black,white"); +INSERT INTO items VALUES ("hat", "white,lawn green"); +INSERT INTO items VALUES ("parka", "gray,medium blue"); +SELECT * FROM items; +name colors +t-shart black,white +hat white,lawn green +parka gray,medium blue +SELECT * FROM items WHERE colors = "white,lawn green"; +name colors +hat white,lawn green +DROP TABLE items; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_set_32_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_set_32_with_index.result new file mode 100644 index 00000000000..0432970aa9e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_set_32_with_index.result @@ -0,0 +1,56 @@ +DROP TABLE IF EXISTS items; +CREATE TABLE items ( +name VARCHAR(255), +colors SET("black", +"dim gray", +"dark gray", +"gray", +"light gray", +"gainsboro", +"white smoke", +"white", +"red", +"orange red", +"dark orange", +"orange", +"gold", +"yellow", +"chartreuse", +"lawn green", +"green", +"spring green", +"medium spring green", +"cyan", +"deep sky blue", +"blue", +"medium blue", +"dark violet", +"dark magenta", +"magenta", +"dark red", +"brown", +"firebrick", +"indian red", +"light coral", +"salmon"), +INDEX (colors) +) DEFAULT CHARSET=utf8; +SHOW CREATE TABLE items; +Table Create Table +items CREATE TABLE `items` ( + `name` varchar(255) DEFAULT NULL, + `colors` set('black','dim gray','dark gray','gray','light gray','gainsboro','white smoke','white','red','orange red','dark orange','orange','gold','yellow','chartreuse','lawn green','green','spring green','medium spring green','cyan','deep sky blue','blue','medium blue','dark violet','dark magenta','magenta','dark red','brown','firebrick','indian red','light coral','salmon') DEFAULT NULL, + KEY `colors` (`colors`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO items VALUES ("t-shart", "black,white"); +INSERT INTO items VALUES ("hat", "white,dark violet"); +INSERT INTO items VALUES ("parka", "green,brown,red"); +SELECT * FROM items; +name colors +t-shart black,white +hat white,dark violet +parka red,green,brown +SELECT * FROM items WHERE colors = "white,dark violet"; +name colors +hat white,dark violet +DROP TABLE items; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_set_64_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_set_64_with_index.result new file mode 100644 index 00000000000..5b6d4511adf --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_set_64_with_index.result @@ -0,0 +1,88 @@ +DROP TABLE IF EXISTS items; +CREATE TABLE items ( +name VARCHAR(255), +colors SET("black", +"dim gray", +"dark gray", +"gray", +"light gray", +"gainsboro", +"white smoke", +"white", +"red", +"orange red", +"dark orange", +"orange", +"gold", +"yellow", +"chartreuse", +"lawn green", +"green", +"spring green", +"medium spring green", +"cyan", +"deep sky blue", +"blue", +"medium blue", +"dark violet", +"dark magenta", +"magenta", +"dark red", +"brown", +"firebrick", +"indian red", +"light coral", +"salmon", +"light salmon", +"tomato", +"coral", +"dark salmon", +"rosy brown", +"sienna", +"saddle brown", +"chocolate", +"peru", +"sandy brown", +"burlywood", +"tan", +"navajo white", +"wheat", +"dark goldenrod", +"goldenrod", +"light goldenrod", +"pale goldenrod", +"cornsilk", +"dark khaki", +"khaki", +"lemon chiffon", +"dark olive green", +"olive drab", +"yellow green", +"green yellow", +"light green", +"forest green", +"dark green", +"lime green", +"pale green", +"dark sea green"), +INDEX (colors) +) DEFAULT CHARSET=utf8; +SHOW CREATE TABLE items; +Table Create Table +items CREATE TABLE `items` ( + `name` varchar(255) DEFAULT NULL, + `colors` set('black','dim gray','dark gray','gray','light gray','gainsboro','white smoke','white','red','orange red','dark orange','orange','gold','yellow','chartreuse','lawn green','green','spring green','medium spring green','cyan','deep sky blue','blue','medium blue','dark violet','dark magenta','magenta','dark red','brown','firebrick','indian red','light coral','salmon','light salmon','tomato','coral','dark salmon','rosy brown','sienna','saddle brown','chocolate','peru','sandy brown','burlywood','tan','navajo white','wheat','dark goldenrod','goldenrod','light goldenrod','pale goldenrod','cornsilk','dark khaki','khaki','lemon chiffon','dark olive green','olive drab','yellow green','green yellow','light green','forest green','dark green','lime green','pale green','dark sea green') DEFAULT NULL, + KEY `colors` (`colors`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO items VALUES ("t-shart", "black,white,lawn green,dark violet"); +INSERT INTO items VALUES ("hat", "white,dark violet,yellow green"); +INSERT INTO items VALUES ("parka", "green,brown,red,lime green"); +SELECT * FROM items; +name colors +t-shart black,white,lawn green,dark violet +hat white,dark violet,yellow green +parka red,green,brown,lime green +SELECT * FROM items WHERE colors = "white,dark violet,yellow green"; +name colors +hat white,dark violet,yellow green +DROP TABLE items; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_set_8_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_set_8_with_index.result new file mode 100644 index 00000000000..3e6bf4e1939 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_set_8_with_index.result @@ -0,0 +1,32 @@ +DROP TABLE IF EXISTS items; +CREATE TABLE items ( +name VARCHAR(255), +colors SET("black", +"dim gray", +"dark gray", +"gray", +"light gray", +"gainsboro", +"white smoke", +"white"), +INDEX (colors) +) DEFAULT CHARSET=utf8; +SHOW CREATE TABLE items; +Table Create Table +items CREATE TABLE `items` ( + `name` varchar(255) DEFAULT NULL, + `colors` set('black','dim gray','dark gray','gray','light gray','gainsboro','white smoke','white') DEFAULT NULL, + KEY `colors` (`colors`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO items VALUES ("t-shart", "black,gray"); +INSERT INTO items VALUES ("hat", "dim gray,dark gray"); +INSERT INTO items VALUES ("parka", "white smoke,light gray"); +SELECT * FROM items; +name colors +t-shart black,gray +hat dim gray,dark gray +parka light gray,white smoke +SELECT * FROM items WHERE colors = "dim gray,dark gray"; +name colors +hat dim gray,dark gray +DROP TABLE items; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_signed_bigint_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_signed_bigint_with_index.result new file mode 100644 index 00000000000..262f77556c6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_signed_bigint_with_index.result @@ -0,0 +1,28 @@ +DROP TABLE IF EXISTS items; +CREATE TABLE items ( +name VARCHAR(255), +price BIGINT KEY +) DEFAULT CHARSET=utf8; +INSERT INTO items VALUES ("house", 9223372036854775807); +INSERT INTO items VALUES ("note PC", 32767); +INSERT INTO items VALUES ("discount", -9223372036854775808); +INSERT INTO items VALUES ("coke", 100); +INSERT INTO items VALUES ("super car", 2147483648); +SELECT * FROM items; +name price +discount -9223372036854775808 +coke 100 +note PC 32767 +super car 2147483648 +house 9223372036854775807 +SELECT * FROM items WHERE price <= 2147483648; +name price +discount -9223372036854775808 +coke 100 +note PC 32767 +super car 2147483648 +SELECT * FROM items WHERE price > 2147483647; +name price +super car 2147483648 +house 9223372036854775807 +DROP TABLE items; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_signed_int_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_signed_int_with_index.result new file mode 100644 index 00000000000..867b887182f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_signed_int_with_index.result @@ -0,0 +1,28 @@ +DROP TABLE IF EXISTS items; +CREATE TABLE items ( +name VARCHAR(255), +price INT KEY +) DEFAULT CHARSET=utf8; +INSERT INTO items VALUES ("car", 2147483647); +INSERT INTO items VALUES ("note PC", 32767); +INSERT INTO items VALUES ("discount", -2147483647); +INSERT INTO items VALUES ("coke", 100); +INSERT INTO items VALUES ("bike", 16777216); +SELECT * FROM items; +name price +discount -2147483647 +coke 100 +note PC 32767 +bike 16777216 +car 2147483647 +SELECT * FROM items WHERE price <= 16777216; +name price +discount -2147483647 +coke 100 +note PC 32767 +bike 16777216 +SELECT * FROM items WHERE price > 16777215; +name price +bike 16777216 +car 2147483647 +DROP TABLE items; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_signed_mediumint_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_signed_mediumint_with_index.result new file mode 100644 index 00000000000..c8b4f895a9c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_signed_mediumint_with_index.result @@ -0,0 +1,26 @@ +DROP TABLE IF EXISTS items; +CREATE TABLE items ( +name VARCHAR(255), +price MEDIUMINT KEY +) DEFAULT CHARSET=utf8; +INSERT INTO items VALUES ("car", 8388607); +INSERT INTO items VALUES ("note PC", 32767); +INSERT INTO items VALUES ("discount", -8388608); +INSERT INTO items VALUES ("coke", 100); +INSERT INTO items VALUES ("bike", 32768); +SELECT * FROM items; +name price +discount -8388608 +coke 100 +note PC 32767 +bike 32768 +car 8388607 +SELECT * FROM items WHERE price <= 127; +name price +discount -8388608 +coke 100 +SELECT * FROM items WHERE price >= 32768; +name price +bike 32768 +car 8388607 +DROP TABLE items; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_signed_smallint_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_signed_smallint_with_index.result new file mode 100644 index 00000000000..8a51ee5fd8f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_signed_smallint_with_index.result @@ -0,0 +1,24 @@ +DROP TABLE IF EXISTS items; +CREATE TABLE items ( +name VARCHAR(255), +price SMALLINT KEY +) DEFAULT CHARSET=utf8; +INSERT INTO items VALUES ("note PC", 32767); +INSERT INTO items VALUES ("discount", -32768); +INSERT INTO items VALUES ("coke", 100); +INSERT INTO items VALUES ("tablet PC", 20000); +SELECT * FROM items; +name price +discount -32768 +coke 100 +tablet PC 20000 +note PC 32767 +SELECT * FROM items WHERE price <= 127; +name price +discount -32768 +coke 100 +SELECT * FROM items WHERE price >= 128; +name price +tablet PC 20000 +note PC 32767 +DROP TABLE items; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_signed_tinyint_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_signed_tinyint_with_index.result new file mode 100644 index 00000000000..d14efcca9a0 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_signed_tinyint_with_index.result @@ -0,0 +1,18 @@ +DROP TABLE IF EXISTS items; +CREATE TABLE items ( +name VARCHAR(255), +price TINYINT KEY +) DEFAULT CHARSET=utf8; +INSERT INTO items VALUES ("hamburger", 120); +INSERT INTO items VALUES ("discount", -10); +INSERT INTO items VALUES ("coke", 100); +SELECT * FROM items; +name price +discount -10 +coke 100 +hamburger 120 +SELECT * FROM items WHERE price <= 100; +name price +discount -10 +coke 100 +DROP TABLE items; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_time_fractional_seconds_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_time_fractional_seconds_with_index.result new file mode 100644 index 00000000000..9c2a8e876e3 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_time_fractional_seconds_with_index.result @@ -0,0 +1,40 @@ +DROP TABLE IF EXISTS running_records; +CREATE TABLE running_records ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +average TIME(6), +max TIME(6), +KEY (average) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE running_records; +Table Create Table +running_records CREATE TABLE `running_records` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `average` time(6) DEFAULT NULL, + `max` time(6) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `average` (`average`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO running_records (title, average, max) +VALUES ("normal condition", "01:00:00.000001", "01:05:00.000001"); +INSERT INTO running_records (title, average, max) +VALUES ("bad condition", "12:23:34.123456", "838:59:58.999999"); +INSERT INTO running_records (title, average, max) +VALUES ("record failure", "-838:59:59.000000", "-838:59:59.000000"); +SELECT * FROM running_records; +id title average max +1 normal condition 01:00:00.000001 01:05:00.000001 +2 bad condition 12:23:34.123456 838:59:58.999999 +3 record failure -838:59:59.000000 -838:59:59.000000 +SELECT * FROM running_records +WHERE average BETWEEN "00:59:59.999999" AND "100:10:10.101010"; +id title average max +1 normal condition 01:00:00.000001 01:05:00.000001 +2 bad condition 12:23:34.123456 838:59:58.999999 +SELECT * FROM running_records +WHERE average BETWEEN "-838:59:59.000000" AND "01:00:00.000001"; +id title average max +3 record failure -838:59:59.000000 -838:59:59.000000 +1 normal condition 01:00:00.000001 01:05:00.000001 +DROP TABLE running_records; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_time_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_time_with_index.result new file mode 100644 index 00000000000..da75fd97424 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_time_with_index.result @@ -0,0 +1,40 @@ +DROP TABLE IF EXISTS running_records; +CREATE TABLE running_records ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +average TIME, +max TIME, +KEY (average) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE running_records; +Table Create Table +running_records CREATE TABLE `running_records` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `average` time DEFAULT NULL, + `max` time DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `average` (`average`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO running_records (title, average, max) +VALUES ("normal condition", "01:00:00", "01:05:00"); +INSERT INTO running_records (title, average, max) +VALUES ("bad condition", "12:23:34", "838:59:59"); +INSERT INTO running_records (title, average, max) +VALUES ("record failure", "-838:59:59", "-838:59:59"); +SELECT * FROM running_records; +id title average max +1 normal condition 01:00:00 01:05:00 +2 bad condition 12:23:34 838:59:59 +3 record failure -838:59:59 -838:59:59 +SELECT * FROM running_records +WHERE average BETWEEN "00:59:59" AND "100:10:10"; +id title average max +1 normal condition 01:00:00 01:05:00 +2 bad condition 12:23:34 838:59:59 +SELECT * FROM running_records +WHERE average BETWEEN "-838:59:59" AND "01:00:00"; +id title average max +3 record failure -838:59:59 -838:59:59 +1 normal condition 01:00:00 01:05:00 +DROP TABLE running_records; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_timestamp_fractional_seconds_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_timestamp_fractional_seconds_with_index.result new file mode 100644 index 00000000000..da245535f2c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_timestamp_fractional_seconds_with_index.result @@ -0,0 +1,42 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +created_at TIMESTAMP(6), +updated_at TIMESTAMP(6), +KEY (updated_at) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `created_at` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), + `updated_at` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000', + PRIMARY KEY (`id`), + KEY `updated_at` (`updated_at`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, created_at, updated_at) +VALUES ("clear day", +"2012-01-29 21:51:01.111111", +"2012-01-29 21:51:02.222222"); +INSERT INTO diaries (title, created_at, updated_at) +VALUES ("rainy day", +"2012-01-30 01:23:45.333", +"2012-01-30 01:23:46.444"); +INSERT INTO diaries (title, created_at, updated_at) +VALUES ("cloudy day", +"2012-01-31 08:32:10.5555", +"2012-01-31 08:32:11.6666"); +SELECT * FROM diaries; +id title created_at updated_at +1 clear day 2012-01-29 21:51:01.111111 2012-01-29 21:51:02.222222 +2 rainy day 2012-01-30 01:23:45.333000 2012-01-30 01:23:46.444000 +3 cloudy day 2012-01-31 08:32:10.555500 2012-01-31 08:32:11.666600 +SELECT * FROM diaries +WHERE updated_at BETWEEN "2012-01-29 00:00:00.123456" AND +"2012-01-31 00:00:00.999999"; +id title created_at updated_at +1 clear day 2012-01-29 21:51:01.111111 2012-01-29 21:51:02.222222 +2 rainy day 2012-01-30 01:23:45.333000 2012-01-30 01:23:46.444000 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_timestamp_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_timestamp_with_index.result new file mode 100644 index 00000000000..b310de48111 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_timestamp_with_index.result @@ -0,0 +1,35 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +created_at TIMESTAMP, +updated_at TIMESTAMP, +KEY (updated_at) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`), + KEY `updated_at` (`updated_at`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, created_at, updated_at) +VALUES ("clear day", "2012-01-29 21:51:01", "2012-01-29 21:51:02"); +INSERT INTO diaries (title, created_at, updated_at) +VALUES ("rainy day", "2012-01-30 01:23:45", "2012-01-30 01:23:46"); +INSERT INTO diaries (title, created_at, updated_at) +VALUES ("cloudy day", "2012-01-31 08:32:10", "2012-01-31 08:32:11"); +SELECT * FROM diaries; +id title created_at updated_at +1 clear day 2012-01-29 21:51:01 2012-01-29 21:51:02 +2 rainy day 2012-01-30 01:23:45 2012-01-30 01:23:46 +3 cloudy day 2012-01-31 08:32:10 2012-01-31 08:32:11 +SELECT * FROM diaries +WHERE updated_at BETWEEN "2012-01-29 00:00:00" AND "2012-01-31 00:00:00"; +id title created_at updated_at +1 clear day 2012-01-29 21:51:01 2012-01-29 21:51:02 +2 rainy day 2012-01-30 01:23:45 2012-01-30 01:23:46 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_tinyint_without_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_tinyint_without_index.result new file mode 100644 index 00000000000..8dde1bdde6d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_tinyint_without_index.result @@ -0,0 +1,18 @@ +drop table if exists books; +create table books(title varchar(255), published tinyint); +insert into books values ("MySQL", 1); +insert into books values ("groonga", 1); +insert into books values ("mroonga", 0); +select count(*) from books where published = 0; +count(*) +1 +select count(*) from books where published = 1; +count(*) +2 +select count(*) from books where published != 2; +count(*) +3 +select count(*) from books where published != 1; +count(*) +1 +drop table books; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_unsigned_bigint_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_unsigned_bigint_with_index.result new file mode 100644 index 00000000000..d16004e3b82 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_unsigned_bigint_with_index.result @@ -0,0 +1,28 @@ +DROP TABLE IF EXISTS items; +CREATE TABLE items ( +name VARCHAR(255), +price BIGINT UNSIGNED KEY +) DEFAULT CHARSET=utf8; +INSERT INTO items VALUES ("house", 18446744073709551615); +INSERT INTO items VALUES ("note PC", 32767); +INSERT INTO items VALUES ("discount", 0); +INSERT INTO items VALUES ("coke", 100); +INSERT INTO items VALUES ("super car", 9223372036854775808); +SELECT * FROM items; +name price +discount 0 +coke 100 +note PC 32767 +super car 9223372036854775808 +house 18446744073709551615 +SELECT * FROM items WHERE price <= 9223372036854775808; +name price +discount 0 +coke 100 +note PC 32767 +super car 9223372036854775808 +SELECT * FROM items WHERE price > 9223372036854775807; +name price +super car 9223372036854775808 +house 18446744073709551615 +DROP TABLE items; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_unsigned_bigint_without_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_unsigned_bigint_without_index.result new file mode 100644 index 00000000000..277580c7710 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_unsigned_bigint_without_index.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS ids; +CREATE TABLE ids ( +id BIGINT UNSIGNED +) DEFAULT CHARSET=utf8; +INSERT INTO ids VALUES (317173755057152000); +INSERT INTO ids VALUES (317173755057152002); +SELECT * FROM ids; +id +317173755057152000 +317173755057152002 +SELECT * FROM ids WHERE id = 317173755057152000; +id +317173755057152000 +SELECT * FROM ids WHERE id = 317173755057152002; +id +317173755057152002 +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_unsigned_int_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_unsigned_int_with_index.result new file mode 100644 index 00000000000..d14ef87702d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_unsigned_int_with_index.result @@ -0,0 +1,28 @@ +DROP TABLE IF EXISTS items; +CREATE TABLE items ( +name VARCHAR(255), +price INT UNSIGNED KEY +) DEFAULT CHARSET=utf8; +INSERT INTO items VALUES ("car", 4294967295); +INSERT INTO items VALUES ("note PC", 32767); +INSERT INTO items VALUES ("discount", 0); +INSERT INTO items VALUES ("coke", 100); +INSERT INTO items VALUES ("bike", 2147483648); +SELECT * FROM items; +name price +discount 0 +coke 100 +note PC 32767 +bike 2147483648 +car 4294967295 +SELECT * FROM items WHERE price <= 2147483648; +name price +discount 0 +coke 100 +note PC 32767 +bike 2147483648 +SELECT * FROM items WHERE price > 2147483647; +name price +bike 2147483648 +car 4294967295 +DROP TABLE items; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_unsigned_mediumint_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_unsigned_mediumint_with_index.result new file mode 100644 index 00000000000..2825aadae48 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_unsigned_mediumint_with_index.result @@ -0,0 +1,28 @@ +DROP TABLE IF EXISTS items; +CREATE TABLE items ( +name VARCHAR(255), +price MEDIUMINT UNSIGNED KEY +) DEFAULT CHARSET=utf8; +INSERT INTO items VALUES ("car", 16777215); +INSERT INTO items VALUES ("note PC", 32767); +INSERT INTO items VALUES ("discount", 0); +INSERT INTO items VALUES ("coke", 100); +INSERT INTO items VALUES ("bike", 8388607); +SELECT * FROM items; +name price +discount 0 +coke 100 +note PC 32767 +bike 8388607 +car 16777215 +SELECT * FROM items WHERE price <= 8388608; +name price +discount 0 +coke 100 +note PC 32767 +bike 8388607 +SELECT * FROM items WHERE price >= 8388607; +name price +bike 8388607 +car 16777215 +DROP TABLE items; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_unsigned_smallint_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_unsigned_smallint_with_index.result new file mode 100644 index 00000000000..8586d091386 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_unsigned_smallint_with_index.result @@ -0,0 +1,25 @@ +DROP TABLE IF EXISTS items; +CREATE TABLE items ( +name VARCHAR(255), +price SMALLINT UNSIGNED KEY +) DEFAULT CHARSET=utf8; +INSERT INTO items VALUES ("note PC", 65535); +INSERT INTO items VALUES ("discount", 0); +INSERT INTO items VALUES ("coke", 100); +INSERT INTO items VALUES ("tablet PC", 32767); +SELECT * FROM items; +name price +discount 0 +coke 100 +tablet PC 32767 +note PC 65535 +SELECT * FROM items WHERE price <= 32768; +name price +discount 0 +coke 100 +tablet PC 32767 +SELECT * FROM items WHERE price >= 32767; +name price +tablet PC 32767 +note PC 65535 +DROP TABLE items; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_unsigned_tinyint_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_unsigned_tinyint_with_index.result new file mode 100644 index 00000000000..90adb048361 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_unsigned_tinyint_with_index.result @@ -0,0 +1,18 @@ +DROP TABLE IF EXISTS items; +CREATE TABLE items ( +name VARCHAR(255), +price TINYINT UNSIGNED KEY +) DEFAULT CHARSET=utf8; +INSERT INTO items VALUES ("hamburger", 255); +INSERT INTO items VALUES ("discount", 0); +INSERT INTO items VALUES ("coke", 100); +SELECT * FROM items; +name price +discount 0 +coke 100 +hamburger 255 +SELECT * FROM items WHERE price <= 100; +name price +discount 0 +coke 100 +DROP TABLE items; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_year_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_year_with_index.result new file mode 100644 index 00000000000..3ee91c1a408 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_year_with_index.result @@ -0,0 +1,37 @@ +DROP TABLE IF EXISTS aniversary_memos; +CREATE TABLE aniversary_memos ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +party_year YEAR, +KEY (party_year) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE aniversary_memos; +Table Create Table +aniversary_memos CREATE TABLE `aniversary_memos` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `party_year` year(4) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `party_year` (`party_year`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO aniversary_memos (title, party_year) +VALUES ("We need a big cake!", "11"); +INSERT INTO aniversary_memos (title, party_year) +VALUES ("Invitations are sent.", "2012"); +INSERT INTO aniversary_memos (title, party_year) +VALUES ("Tommorow is the anniversary party day!", "2012"); +INSERT INTO aniversary_memos (title, party_year) +VALUES ("Wow! Today is the anniversary party day!", "13"); +SELECT * FROM aniversary_memos; +id title party_year +1 We need a big cake! 2011 +2 Invitations are sent. 2012 +3 Tommorow is the anniversary party day! 2012 +4 Wow! Today is the anniversary party day! 2013 +SELECT * FROM aniversary_memos +WHERE party_year BETWEEN "12" AND "2013"; +id title party_year +2 Invitations are sent. 2012 +3 Tommorow is the anniversary party day! 2012 +4 Wow! Today is the anniversary party day! 2013 +DROP TABLE aniversary_memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_year_without_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_year_without_index.result new file mode 100644 index 00000000000..254a0c0718a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_year_without_index.result @@ -0,0 +1,35 @@ +DROP TABLE IF EXISTS aniversary_memos; +CREATE TABLE aniversary_memos ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +party_year YEAR +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE aniversary_memos; +Table Create Table +aniversary_memos CREATE TABLE `aniversary_memos` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `party_year` year(4) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO aniversary_memos (title, party_year) +VALUES ("We need a big cake!", "11"); +INSERT INTO aniversary_memos (title, party_year) +VALUES ("Invitations are sent.", "2012"); +INSERT INTO aniversary_memos (title, party_year) +VALUES ("Tommorow is the anniversary party day!", "2012"); +INSERT INTO aniversary_memos (title, party_year) +VALUES ("Wow! Today is the anniversary party day!", "13"); +SELECT * FROM aniversary_memos; +id title party_year +1 We need a big cake! 2011 +2 Invitations are sent. 2012 +3 Tommorow is the anniversary party day! 2012 +4 Wow! Today is the anniversary party day! 2013 +SELECT * FROM aniversary_memos +WHERE party_year BETWEEN "12" AND "2013"; +id title party_year +2 Invitations are sent. 2012 +3 Tommorow is the anniversary party day! 2012 +4 Wow! Today is the anniversary party day! 2013 +DROP TABLE aniversary_memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_database_name_slash.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_database_name_slash.result new file mode 100644 index 00000000000..56c868b2aa9 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_database_name_slash.result @@ -0,0 +1,33 @@ +DROP DATABASE IF EXISTS `master/production`; +DROP DATABASE IF EXISTS `master/development`; +CREATE DATABASE `master/production`; +USE `master/production`; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT +) DEFAULT CHARSET=UTF8; +INSERT INTO diaries (title) VALUES ("clear day (production)"); +INSERT INTO diaries (title) VALUES ("rainy day (production)"); +INSERT INTO diaries (title) VALUES ("cloudy day (production)"); +SELECT * FROM diaries; +id title +1 clear day (production) +2 rainy day (production) +3 cloudy day (production) +CREATE DATABASE `master/development`; +USE `master/development`; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT +) DEFAULT CHARSET=UTF8; +INSERT INTO diaries (title) VALUES ("clear day (development)"); +INSERT INTO diaries (title) VALUES ("rainy day (development)"); +INSERT INTO diaries (title) VALUES ("cloudy day (development)"); +SELECT * FROM diaries; +id title +1 clear day (development) +2 rainy day (development) +3 cloudy day (development) +USE test; +DROP DATABASE `master/production`; +DROP DATABASE `master/development`; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_TODO_SPLIT_ME.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_TODO_SPLIT_ME.result new file mode 100644 index 00000000000..d2a00b777ec --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_TODO_SPLIT_ME.result @@ -0,0 +1,172 @@ +drop table if exists t1, t2, t3; +create table t1 (c1 int); +create table t2 (c1 int); +create table t3 (c1 int); +drop table t1,t2,t3; +create table t1 (c1 int, c2 int, c3 int); +create table t2 (c1 int primary key, c2 int, c3 int); +drop table t1,t2; +create table t1 (c1 bit); +desc t1; +Field Type Null Key Default Extra +c1 bit(1) YES NULL +drop table t1; +create table t1 (c1 tinyint); +desc t1; +Field Type Null Key Default Extra +c1 tinyint(4) YES NULL +drop table t1; +create table t1 (c1 smallint); +desc t1; +Field Type Null Key Default Extra +c1 smallint(6) YES NULL +drop table t1; +create table t1 (c1 mediumint); +desc t1; +Field Type Null Key Default Extra +c1 mediumint(9) YES NULL +drop table t1; +create table t1 (c1 int); +desc t1; +Field Type Null Key Default Extra +c1 int(11) YES NULL +drop table t1; +create table t1 (c1 bigint); +desc t1; +Field Type Null Key Default Extra +c1 bigint(20) YES NULL +drop table t1; +create table t1 (c1 double); +desc t1; +Field Type Null Key Default Extra +c1 double YES NULL +drop table t1; +create table t1 (c1 float); +desc t1; +Field Type Null Key Default Extra +c1 float YES NULL +drop table t1; +create table t1 (c1 decimal); +desc t1; +Field Type Null Key Default Extra +c1 decimal(10,0) YES NULL +drop table t1; +create table t1 (c1 date); +desc t1; +Field Type Null Key Default Extra +c1 date YES NULL +drop table t1; +create table t1 (c1 time); +desc t1; +Field Type Null Key Default Extra +c1 time YES NULL +drop table t1; +create table t1 (c1 timestamp); +desc t1; +Field Type Null Key Default Extra +c1 timestamp NO CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP +drop table t1; +create table t1 (c1 datetime); +desc t1; +Field Type Null Key Default Extra +c1 datetime YES NULL +drop table t1; +create table t1 (c1 year); +desc t1; +Field Type Null Key Default Extra +c1 year(4) YES NULL +drop table t1; +create table t1 (c1 char(10)); +desc t1; +Field Type Null Key Default Extra +c1 char(10) YES NULL +drop table t1; +create table t1 (c1 varchar(10)); +desc t1; +Field Type Null Key Default Extra +c1 varchar(10) YES NULL +drop table t1; +create table t1 (c1 binary(10)); +desc t1; +Field Type Null Key Default Extra +c1 binary(10) YES NULL +drop table t1; +create table t1 (c1 varbinary(10)); +desc t1; +Field Type Null Key Default Extra +c1 varbinary(10) YES NULL +drop table t1; +create table t1 (c1 tinyblob); +desc t1; +Field Type Null Key Default Extra +c1 tinyblob YES NULL +drop table t1; +create table t1 (c1 blob); +desc t1; +Field Type Null Key Default Extra +c1 blob YES NULL +drop table t1; +create table t1 (c1 mediumblob); +desc t1; +Field Type Null Key Default Extra +c1 mediumblob YES NULL +drop table t1; +create table t1 (c1 longblob); +desc t1; +Field Type Null Key Default Extra +c1 longblob YES NULL +drop table t1; +create table t1 (c1 tinytext); +desc t1; +Field Type Null Key Default Extra +c1 tinytext YES NULL +drop table t1; +create table t1 (c1 text); +desc t1; +Field Type Null Key Default Extra +c1 text YES NULL +drop table t1; +create table t1 (c1 mediumtext); +desc t1; +Field Type Null Key Default Extra +c1 mediumtext YES NULL +drop table t1; +create table t1 (c1 longtext); +desc t1; +Field Type Null Key Default Extra +c1 longtext YES NULL +drop table t1; +create table t1 (c1 enum("yes","no")); +desc t1; +Field Type Null Key Default Extra +c1 enum('yes','no') YES NULL +drop table t1; +create table t1 (c1 set("A","B","AB","O")); +desc t1; +Field Type Null Key Default Extra +c1 set('A','B','AB','O') YES NULL +drop table t1; +create table t1 (c1 int, `_id` int) engine = mroonga; +desc t1; +Field Type Null Key Default Extra +c1 int(11) YES NULL +_id int(11) YES NULL +drop table t1; +create table t1 (c1 int, `_score` float) engine = mroonga; +ERROR HY000: [column][create] name can't start with '_' and contains only 0-9, A-Z, a-z, #, @, - or _: <_score> +create table t1 (c1 int, `_id` text) engine = mroonga; +ERROR HY000: _id must be numeric data type +create table t1 (c1 int, `_id` int, index(`_id`)) engine = mroonga; +ERROR HY000: only hash index can be defined for _id +create table t1 (_id int, c1 int, primary key (_id)); +ERROR HY000: only hash index can be defined for _id +create table t1 (_id int, c1 int, primary key (_id) using hash); +drop table t1; +create table t1 (_id int, c1 int, unique key (_id)); +ERROR HY000: only hash index can be defined for _id +create table t1 (_id int, c1 int, unique key (_id) using hash); +drop table t1; +create table t1 (_id int, c1 int, key (_id)); +ERROR HY000: only hash index can be defined for _id +create table t1 (_id int, c1 int, key (_id) using hash); +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_comment_normal.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_comment_normal.result new file mode 100644 index 00000000000..edda98cd034 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_comment_normal.result @@ -0,0 +1,11 @@ +DROP TABLE IF EXISTS bugs; +CREATE TABLE bugs ( +id INT UNSIGNED +) DEFAULT CHARSET=utf8 +COMMENT='Free style normal comment'; +SHOW CREATE TABLE bugs; +Table Create Table +bugs CREATE TABLE `bugs` ( + `id` int(10) unsigned DEFAULT NULL +) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='Free style normal comment' +DROP TABLE bugs; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_default_tokenizer.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_default_tokenizer.result new file mode 100644 index 00000000000..1a9888d71da --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_default_tokenizer.result @@ -0,0 +1,11 @@ +DROP TABLE IF EXISTS tags; +CREATE TABLE tags ( +name VARCHAR(64) PRIMARY KEY +) DEFAULT CHARSET=utf8 +COLLATE=utf8_bin +COMMENT='default_tokenizer "TokenDelimit"'; +SELECT mroonga_command("dump"); +mroonga_command("dump") +table_create tags TABLE_PAT_KEY ShortText --default_tokenizer TokenDelimit +column_create tags name COLUMN_SCALAR ShortText +DROP TABLE tags; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_normalizer_fulltext_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_normalizer_fulltext_index.result new file mode 100644 index 00000000000..e2d405a1e35 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_normalizer_fulltext_index.result @@ -0,0 +1,16 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES utf8; +CREATE TABLE diaries ( +day DATE PRIMARY KEY, +content VARCHAR(64) NOT NULL, +FULLTEXT INDEX (content) COMMENT 'normalizer "NormalizerAuto"' +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +INSERT INTO diaries VALUES ("2013-04-23", "ブラックコーヒーを飲んだ。"); +SELECT * FROM diaries +WHERE MATCH (content) AGAINST ("+ふらつく" IN BOOLEAN MODE); +day content +SELECT * FROM diaries +WHERE MATCH (content) AGAINST ("+ブラック" IN BOOLEAN MODE); +day content +2013-04-23 ブラックコーヒーを飲んだ。 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_normalizer_no_utf8_charset_with_utf8_normalizer.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_normalizer_no_utf8_charset_with_utf8_normalizer.result new file mode 100644 index 00000000000..9d12e2d0e39 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_normalizer_no_utf8_charset_with_utf8_normalizer.result @@ -0,0 +1,12 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES latin1; +CREATE TABLE diaries ( +day DATE PRIMARY KEY, +content VARCHAR(64) NOT NULL, +FULLTEXT INDEX (content) COMMENT 'normalizer "NormalizerMySQLGeneralCI"' +) DEFAULT CHARSET=latin1; +INSERT INTO diaries VALUES ("2013-04-23", "I drunk a black cookie."); +ERROR HY000: [tokenizer] failed to open normalized string +SELECT * FROM diaries; +day content +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_reference_type.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_reference_type.result new file mode 100644 index 00000000000..68a6bc8012f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_reference_type.result @@ -0,0 +1,16 @@ +CREATE TABLE tags ( +name VARCHAR(64) PRIMARY KEY +) DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +CREATE TABLE bugs ( +id INT UNSIGNED PRIMARY KEY, +tag VARCHAR(64) COMMENT 'type "tags"' +) DEFAULT CHARSET=utf8; +SELECT mroonga_command("dump"); +mroonga_command("dump") +table_create tags TABLE_PAT_KEY ShortText +column_create tags name COLUMN_SCALAR ShortText +table_create bugs TABLE_PAT_KEY UInt32 +column_create bugs id COLUMN_SCALAR UInt32 +column_create bugs tag COLUMN_SCALAR tags +DROP TABLE bugs; +DROP TABLE tags; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_vector.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_vector.result new file mode 100644 index 00000000000..cb6248ec3d5 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_vector.result @@ -0,0 +1,11 @@ +DROP TABLE IF EXISTS bugs; +CREATE TABLE bugs ( +id INT UNSIGNED PRIMARY KEY, +tags TEXT COMMENT 'flags "COLUMN_VECTOR"' +) DEFAULT CHARSET=utf8; +SELECT mroonga_command("dump"); +mroonga_command("dump") +table_create bugs TABLE_PAT_KEY UInt32 +column_create bugs id COLUMN_SCALAR UInt32 +column_create bugs tags COLUMN_VECTOR LongText +DROP TABLE bugs; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/delete_fulltext_column.result b/storage/mroonga/mysql-test/mroonga/storage/r/delete_fulltext_column.result new file mode 100644 index 00000000000..5fb52294758 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/delete_fulltext_column.result @@ -0,0 +1,21 @@ +drop table if exists t1, t2, t3; +create table t1 (c1 int primary key, c2 text, fulltext index (c2)); +insert into t1 values(10, "aa ii uu ee"); +insert into t1 values(20, "ka ki ku ke"); +insert into t1 values(30, "sa si su se"); +select * from t1; +c1 c2 +10 aa ii uu ee +20 ka ki ku ke +30 sa si su se +select * from t1 where match(c2) against("ki"); +c1 c2 +20 ka ki ku ke +delete from t1 where c1=20; +select * from t1; +c1 c2 +10 aa ii uu ee +30 sa si su se +select * from t1 where match(c2) against("ki"); +c1 c2 +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/delete_index_btree_many_records.result b/storage/mroonga/mysql-test/mroonga/storage/r/delete_index_btree_many_records.result new file mode 100644 index 00000000000..f318e1255fe --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/delete_index_btree_many_records.result @@ -0,0 +1,27 @@ +DROP TABLE IF EXISTS ids; +SET NAMES UTF8; +CREATE TABLE ids ( +id INT, +KEY (id) +) DEFAULT CHARSET UTF8; +INSERT INTO ids VALUES(1); +INSERT INTO ids VALUES(2); +INSERT INTO ids VALUES(3); +SELECT * FROM ids ORDER BY id; +id +1 +2 +3 +DELETE FROM ids WHERE id = 1; +SELECT * FROM ids ORDER BY id; +id +2 +3 +DELETE FROM ids WHERE id = 2; +SELECT * FROM ids ORDER BY id; +id +3 +DELETE FROM ids WHERE id = 3; +SELECT * FROM ids ORDER BY id; +id +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/delete_index_hash_id_no_unique.result b/storage/mroonga/mysql-test/mroonga/storage/r/delete_index_hash_id_no_unique.result new file mode 100644 index 00000000000..76a4ed8835b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/delete_index_hash_id_no_unique.result @@ -0,0 +1,19 @@ +drop table if exists t1, t2, t3; +create table t1 (_id int, c1 int, key (_id) using hash); +insert into t1 values(null, 100); +insert into t1 values(null, 100); +insert into t1 values(null, 100); +insert into t1 values(null, 100); +select * from t1; +_id c1 +1 100 +2 100 +3 100 +4 100 +delete from t1 where _id = 2; +select * from t1; +_id c1 +1 100 +3 100 +4 100 +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/delete_index_hash_id_unique.result b/storage/mroonga/mysql-test/mroonga/storage/r/delete_index_hash_id_unique.result new file mode 100644 index 00000000000..6307c55fcc0 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/delete_index_hash_id_unique.result @@ -0,0 +1,19 @@ +drop table if exists t1, t2, t3; +create table t1 (_id int, c1 int, unique key (_id) using hash); +insert into t1 values(null, 100); +insert into t1 values(null, 100); +insert into t1 values(null, 100); +insert into t1 values(null, 100); +select * from t1; +_id c1 +1 100 +2 100 +3 100 +4 100 +delete from t1 where _id = 2; +select * from t1; +_id c1 +1 100 +3 100 +4 100 +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/delete_normal_column.result b/storage/mroonga/mysql-test/mroonga/storage/r/delete_normal_column.result new file mode 100644 index 00000000000..7503c0b801e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/delete_normal_column.result @@ -0,0 +1,34 @@ +drop table if exists t1, t2, t3; +create table t1 (c1 int, c2 int); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(11) DEFAULT NULL, + `c2` int(11) DEFAULT NULL +) ENGINE=Mroonga DEFAULT CHARSET=latin1 +insert into t1 values (1, 100); +insert into t1 values (2, 101); +insert into t1 values (3, 102); +insert into t1 values (4, 102); +select * from t1; +c1 c2 +1 100 +2 101 +3 102 +4 102 +delete from t1 where c1=3; +select * from t1; +c1 c2 +1 100 +2 101 +4 102 +flush tables; +delete from t1 where c1=2; +select * from t1; +c1 c2 +1 100 +4 102 +delete from t1; +select * from t1; +c1 c2 +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/delete_unsigned_bigint.result b/storage/mroonga/mysql-test/mroonga/storage/r/delete_unsigned_bigint.result new file mode 100644 index 00000000000..23cc23eeef6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/delete_unsigned_bigint.result @@ -0,0 +1,12 @@ +DROP TABLE IF EXISTS numbers; +CREATE TABLE numbers ( +data BIGINT UNSIGNED +); +INSERT INTO numbers VALUES(18446744073709551615); +SELECT * FROM numbers ORDER BY data; +data +18446744073709551615 +DELETE FROM numbers WHERE data = 18446744073709551615; +SELECT * FROM numbers ORDER BY data; +data +DROP TABLE numbers; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/drop_database_TODO_SPLIT_ME.result b/storage/mroonga/mysql-test/mroonga/storage/r/drop_database_TODO_SPLIT_ME.result new file mode 100644 index 00000000000..4bd97162a6b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/drop_database_TODO_SPLIT_ME.result @@ -0,0 +1,14 @@ +drop database if exists groonga; +create database groonga; +drop database groonga; +create database groonga; +use groonga; +create table t1 (c1 int primary key, c2 varchar(255)) default charset utf8; +create table t2 (c1 int primary key, c2 varchar(255)) default charset utf8; +drop database groonga; +create database groonga; +use groonga; +create table t1 (c1 int primary key, c2 varchar(255)) default charset utf8; +create table t2 (c1 int primary key, c2 varchar(255)) default charset utf8; +drop table t1, t2; +drop database groonga; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/drop_table_TODO_SPLIT_ME.result b/storage/mroonga/mysql-test/mroonga/storage/r/drop_table_TODO_SPLIT_ME.result new file mode 100644 index 00000000000..99896765e28 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/drop_table_TODO_SPLIT_ME.result @@ -0,0 +1,5 @@ +drop table if exists alphabet, `with-hyphen`; +create table alphabet (c1 int primary key, c2 int, c3 int); +drop table alphabet; +create table `with-hyphen` (c1 int primary key, c2 int, c3 int); +drop table `with-hyphen`; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/flush_logs.result b/storage/mroonga/mysql-test/mroonga/storage/r/flush_logs.result new file mode 100644 index 00000000000..449f6437501 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/flush_logs.result @@ -0,0 +1 @@ +flush logs; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_create.result b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_create.result new file mode 100644 index 00000000000..fc550d97f87 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_create.result @@ -0,0 +1,147 @@ +drop table if exists articles2; +drop table if exists articles; +drop table if exists comments2; +drop table if exists comments; +create table comments( +comment int unsigned, +content text not null, +primary key(comment) +); +create table articles( +content text not null, +comment int unsigned, +FOREIGN KEY (comment) REFERENCES comments (comment) +); +insert into comments (comment, content) values +(1, 'aaa bbb'),(2, 'ccc ddd'),(3, 'eee fff'); +insert into articles (content, comment) values +('111aaa', 1),('222bbb', 2),('222ccc', 2); +select comment, content from comments; +comment content +1 aaa bbb +2 ccc ddd +3 eee fff +select content, comment from articles; +content comment +111aaa 1 +222bbb 2 +222ccc 2 +show create table comments; +Table Create Table +comments CREATE TABLE `comments` ( + `comment` int(10) unsigned NOT NULL DEFAULT '0', + `content` text NOT NULL, + PRIMARY KEY (`comment`) +) ENGINE=Mroonga DEFAULT CHARSET=latin1 +show create table articles; +Table Create Table +articles CREATE TABLE `articles` ( + `content` text NOT NULL, + `comment` int(10) unsigned DEFAULT NULL, + KEY `comment` (`comment`), + CONSTRAINT `comment` FOREIGN KEY (`comment`) REFERENCES `test`.`comments` (`comment`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE=Mroonga DEFAULT CHARSET=latin1 +select * from information_schema.referential_constraints; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME UNIQUE_CONSTRAINT_CATALOG UNIQUE_CONSTRAINT_SCHEMA UNIQUE_CONSTRAINT_NAME MATCH_OPTION UPDATE_RULE DELETE_RULE TABLE_NAME REFERENCED_TABLE_NAME +def test comment def test PRIMARY NONE RESTRICT RESTRICT articles comments +rename table comments to comments2; +rename table articles to articles2; +create table comments( +comment int unsigned, +content text not null, +primary key(comment) +); +create table articles( +content text not null, +comment int unsigned, +FOREIGN KEY (comment) REFERENCES comments (comment) +); +insert into comments (comment, content) values +(1, 'ab'),(2, 'cd'),(3, 'ef'); +insert into articles (content, comment) values +('1a', 1),('2b', 2),('2c', 2); +select comment, content from comments; +comment content +1 ab +2 cd +3 ef +select content, comment from articles; +content comment +1a 1 +2b 2 +2c 2 +select comment, content from comments2; +comment content +1 aaa bbb +2 ccc ddd +3 eee fff +select content, comment from articles2; +content comment +111aaa 1 +222bbb 2 +222ccc 2 +show create table comments; +Table Create Table +comments CREATE TABLE `comments` ( + `comment` int(10) unsigned NOT NULL DEFAULT '0', + `content` text NOT NULL, + PRIMARY KEY (`comment`) +) ENGINE=Mroonga DEFAULT CHARSET=latin1 +show create table articles; +Table Create Table +articles CREATE TABLE `articles` ( + `content` text NOT NULL, + `comment` int(10) unsigned DEFAULT NULL, + KEY `comment` (`comment`), + CONSTRAINT `comment` FOREIGN KEY (`comment`) REFERENCES `test`.`comments` (`comment`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE=Mroonga DEFAULT CHARSET=latin1 +show create table comments2; +Table Create Table +comments2 CREATE TABLE `comments2` ( + `comment` int(10) unsigned NOT NULL DEFAULT '0', + `content` text NOT NULL, + PRIMARY KEY (`comment`) +) ENGINE=Mroonga DEFAULT CHARSET=latin1 +show create table articles2; +Table Create Table +articles2 CREATE TABLE `articles2` ( + `content` text NOT NULL, + `comment` int(10) unsigned DEFAULT NULL, + KEY `comment` (`comment`), + CONSTRAINT `comment` FOREIGN KEY (`comment`) REFERENCES `test`.`comments2` (`comment`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE=Mroonga DEFAULT CHARSET=latin1 +select * from information_schema.referential_constraints; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME UNIQUE_CONSTRAINT_CATALOG UNIQUE_CONSTRAINT_SCHEMA UNIQUE_CONSTRAINT_NAME MATCH_OPTION UPDATE_RULE DELETE_RULE TABLE_NAME REFERENCED_TABLE_NAME +def test comment def test PRIMARY NONE RESTRICT RESTRICT articles comments +def test comment def test PRIMARY NONE RESTRICT RESTRICT articles2 comments2 +alter table articles drop foreign key comment; +show create table articles; +Table Create Table +articles CREATE TABLE `articles` ( + `content` text NOT NULL, + `comment` int(10) unsigned DEFAULT NULL, + KEY `comment` (`comment`) +) ENGINE=Mroonga DEFAULT CHARSET=latin1 +select content, comment from articles; +content comment +1a 1 +2b 2 +2c 2 +alter table articles add FOREIGN KEY (comment) REFERENCES comments (comment); +show create table articles; +Table Create Table +articles CREATE TABLE `articles` ( + `content` text NOT NULL, + `comment` int(10) unsigned DEFAULT NULL, + KEY `comment` (`comment`), + CONSTRAINT `comment` FOREIGN KEY (`comment`) REFERENCES `test`.`comments` (`comment`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE=Mroonga DEFAULT CHARSET=latin1 +select content, comment from articles; +content comment +1a 1 +2b 2 +2c 2 +drop table articles2; +drop table articles; +drop table comments2; +drop table comments; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_empty_query.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_empty_query.result new file mode 100644 index 00000000000..96c6ae4150c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_empty_query.result @@ -0,0 +1,19 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES UTF8; +CREATE TABLE diaries( +title TEXT, +FULLTEXT KEY (title) +) DEFAULT CHARSET=utf8; +INSERT INTO diaries VALUES("Start groonga"); +INSERT INTO diaries VALUES("Start mroonga"); +INSERT INTO diaries VALUES("Start groonga and Ruby"); +SELECT * FROM diaries; +title +Start groonga +Start mroonga +Start groonga and Ruby +SELECT * +FROM diaries +WHERE MATCH(title) AGAINST("" IN BOOLEAN MODE); +title +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_escape.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_escape.result new file mode 100644 index 00000000000..a48eb25dece --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_escape.result @@ -0,0 +1,18 @@ +DROP TABLE IF EXISTS memos; +SET GLOBAL mroonga_default_parser = TokenDelimit; +SET NAMES UTF8; +CREATE TABLE memos ( +id INT PRIMARY KEY, +content TEXT, +FULLTEXT INDEX (content) +) DEFAULT CHARSET=UTF8; +INSERT INTO memos VALUES(1, "(groonga) Installed!"); +INSERT INTO memos VALUES(2, "(mroonga) Installed!"); +INSERT INTO memos VALUES(3, "(groonga) Upgraded!"); +SELECT * FROM memos +WHERE MATCH(content) AGAINST("\\(groonga\\)*" IN BOOLEAN MODE); +id content +1 (groonga) Installed! +3 (groonga) Upgraded! +DROP TABLE memos; +SET GLOBAL mroonga_default_parser = TokenBigram; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_leading_not.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_leading_not.result new file mode 100644 index 00000000000..d0e1a68f76b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_leading_not.result @@ -0,0 +1,24 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES UTF8; +CREATE TABLE diaries ( +id INT PRIMARY KEY, +title VARCHAR(255), +content TEXT, +FULLTEXT INDEX (content) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL, + `title` varchar(255) DEFAULT NULL, + `content` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries VALUES(1, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, "富士山", "今日も天気がよくてきれいに見える。"); +SELECT * FROM diaries WHERE MATCH(content) AGAINST("-明日 +天気" IN BOOLEAN MODE); +id title content +3 富士山 今日も天気がよくてきれいに見える。 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_default_operator_minus_no_operator.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_default_operator_minus_no_operator.result new file mode 100644 index 00000000000..d10b5dad815 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_default_operator_minus_no_operator.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS memos; +SET NAMES utf8; +CREATE TABLE memos ( +content TEXT, +FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8; +INSERT INTO memos VALUES ("Today is good day."); +INSERT INTO memos VALUES ("Tomorrow will be good day."); +INSERT INTO memos VALUES ("Yesterday was good day."); +INSERT INTO memos VALUES ("Today is fine."); +INSERT INTO memos VALUES ("Tomorrow will be fine."); +INSERT INTO memos VALUES ("Yesterday was fine."); +SELECT * FROM memos +WHERE MATCH (content) AGAINST ("*D- fine is be" IN BOOLEAN MODE); +content +Yesterday was fine. +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_default_operator_minus_with_or.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_default_operator_minus_with_or.result new file mode 100644 index 00000000000..82c7e799fd4 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_default_operator_minus_with_or.result @@ -0,0 +1,18 @@ +DROP TABLE IF EXISTS memos; +SET NAMES utf8; +CREATE TABLE memos ( +content TEXT, +FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8; +INSERT INTO memos VALUES ("Today is good day."); +INSERT INTO memos VALUES ("Tomorrow will be good day."); +INSERT INTO memos VALUES ("Yesterday was good day."); +INSERT INTO memos VALUES ("Today is fine."); +INSERT INTO memos VALUES ("Tomorrow will be fine."); +INSERT INTO memos VALUES ("Yesterday was fine."); +SELECT * FROM memos +WHERE MATCH (content) AGAINST ("*D- is OR be fine" IN BOOLEAN MODE); +content +Today is good day. +Tomorrow will be good day. +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_default_operator_minus_with_plus.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_default_operator_minus_with_plus.result new file mode 100644 index 00000000000..c4c7b0e8546 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_default_operator_minus_with_plus.result @@ -0,0 +1,18 @@ +DROP TABLE IF EXISTS memos; +SET NAMES utf8; +CREATE TABLE memos ( +content TEXT, +FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8; +INSERT INTO memos VALUES ("Today is good day."); +INSERT INTO memos VALUES ("Tomorrow will be good day."); +INSERT INTO memos VALUES ("Yesterday was good day."); +INSERT INTO memos VALUES ("Today is fine."); +INSERT INTO memos VALUES ("Tomorrow will be fine."); +INSERT INTO memos VALUES ("Yesterday was fine."); +SELECT * FROM memos +WHERE MATCH (content) AGAINST ("*D- good +day be" IN BOOLEAN MODE); +content +Today is good day. +Yesterday was good day. +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_default_operator_or_no_operator.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_default_operator_or_no_operator.result new file mode 100644 index 00000000000..f45e8fd4fb6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_default_operator_or_no_operator.result @@ -0,0 +1,18 @@ +DROP TABLE IF EXISTS memos; +SET NAMES utf8; +CREATE TABLE memos ( +content TEXT, +FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8; +INSERT INTO memos VALUES ("Today is good day."); +INSERT INTO memos VALUES ("Tomorrow will be good day."); +INSERT INTO memos VALUES ("Today is fine."); +INSERT INTO memos VALUES ("Tomorrow will be fine."); +INSERT INTO memos VALUES ("Yesterday was fine."); +SELECT * FROM memos +WHERE MATCH (content) AGAINST ("*DOR today good" IN BOOLEAN MODE); +content +Today is good day. +Today is fine. +Tomorrow will be good day. +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_default_operator_or_with_minus.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_default_operator_or_with_minus.result new file mode 100644 index 00000000000..103866902c2 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_default_operator_or_with_minus.result @@ -0,0 +1,18 @@ +DROP TABLE IF EXISTS memos; +SET NAMES utf8; +CREATE TABLE memos ( +content TEXT, +FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8; +INSERT INTO memos VALUES ("Today is good day."); +INSERT INTO memos VALUES ("Tomorrow will be good day."); +INSERT INTO memos VALUES ("Today is fine."); +INSERT INTO memos VALUES ("Tomorrow will be fine."); +INSERT INTO memos VALUES ("Yesterday was fine."); +SELECT * FROM memos +WHERE MATCH (content) AGAINST ("*DOR today -good tomorrow" IN BOOLEAN MODE); +content +Tomorrow will be good day. +Today is fine. +Tomorrow will be fine. +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_default_operator_or_with_plus.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_default_operator_or_with_plus.result new file mode 100644 index 00000000000..fd52868b4bc --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_default_operator_or_with_plus.result @@ -0,0 +1,18 @@ +DROP TABLE IF EXISTS memos; +SET NAMES utf8; +CREATE TABLE memos ( +content TEXT, +FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8; +INSERT INTO memos VALUES ("Today is good day."); +INSERT INTO memos VALUES ("Tomorrow will be good day."); +INSERT INTO memos VALUES ("Today is fine."); +INSERT INTO memos VALUES ("Tomorrow will be fine."); +INSERT INTO memos VALUES ("Yesterday was fine."); +SELECT * FROM memos +WHERE MATCH (content) AGAINST ("*DOR today +good tomorrow" IN BOOLEAN MODE); +content +Today is good day. +Tomorrow will be good day. +Tomorrow will be fine. +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_default_operator_plus_no_operator.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_default_operator_plus_no_operator.result new file mode 100644 index 00000000000..4d1f65923c4 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_default_operator_plus_no_operator.result @@ -0,0 +1,14 @@ +DROP TABLE IF EXISTS memos; +SET NAMES utf8; +CREATE TABLE memos ( +content TEXT, +FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8; +INSERT INTO memos VALUES ("Today is good day."); +INSERT INTO memos VALUES ("Tomorrow will be good day."); +INSERT INTO memos VALUES ("Today is fine."); +SELECT * FROM memos +WHERE MATCH (content) AGAINST ("*D+ today good" IN BOOLEAN MODE); +content +Today is good day. +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_default_operator_plus_with_minus.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_default_operator_plus_with_minus.result new file mode 100644 index 00000000000..deda6f3bb1a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_default_operator_plus_with_minus.result @@ -0,0 +1,14 @@ +DROP TABLE IF EXISTS memos; +SET NAMES utf8; +CREATE TABLE memos ( +content TEXT, +FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8; +INSERT INTO memos VALUES ("Today is good day."); +INSERT INTO memos VALUES ("Tomorrow will be good day."); +INSERT INTO memos VALUES ("Today is fine."); +SELECT * FROM memos +WHERE MATCH (content) AGAINST ("*D+ today -good is" IN BOOLEAN MODE); +content +Today is fine. +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_default_operator_plus_with_or.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_default_operator_plus_with_or.result new file mode 100644 index 00000000000..2d25388fada --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_default_operator_plus_with_or.result @@ -0,0 +1,15 @@ +DROP TABLE IF EXISTS memos; +SET NAMES utf8; +CREATE TABLE memos ( +content TEXT, +FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8; +INSERT INTO memos VALUES ("Today is good day."); +INSERT INTO memos VALUES ("Tomorrow will be good day."); +INSERT INTO memos VALUES ("Today is fine."); +SELECT * FROM memos +WHERE MATCH (content) AGAINST ("*D+ today OR tomorrow day" IN BOOLEAN MODE); +content +Today is good day. +Tomorrow will be good day. +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_weight_full_spec.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_weight_full_spec.result new file mode 100644 index 00000000000..b8f15d9847e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_weight_full_spec.result @@ -0,0 +1,20 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES utf8; +CREATE TABLE diaries ( +id INT PRIMARY KEY, +title VARCHAR(255), +content TEXT, +FULLTEXT INDEX (title, content) +) DEFAULT CHARSET=utf8; +INSERT INTO diaries VALUES(1, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, "富士山", "今日も天気がよくてきれいに見える。"); +SELECT *, MATCH(title, content) +AGAINST("*W1:10,2:2 +天気" in BOOLEAN MODE) AS score +FROM diaries +WHERE MATCH(title, content) +AGAINST("*W1:10,2:2 +天気" in BOOLEAN MODE); +id title content score +2 天気 明日の富士山の天気について 12 +3 富士山 今日も天気がよくてきれいに見える。 2 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_weight_no_weight.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_weight_no_weight.result new file mode 100644 index 00000000000..42aa068a547 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_weight_no_weight.result @@ -0,0 +1,20 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES utf8; +CREATE TABLE diaries ( +id INT PRIMARY KEY, +title VARCHAR(255), +content TEXT, +FULLTEXT INDEX (title, content) +) DEFAULT CHARSET=utf8; +INSERT INTO diaries VALUES(1, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, "富士山", "今日も天気がよくてきれいに見える。"); +SELECT *, MATCH(title, content) +AGAINST("*W1,2:2 +天気" in BOOLEAN MODE) AS score +FROM diaries +WHERE MATCH(title, content) +AGAINST("*W1,2:2 +天気" in BOOLEAN MODE); +id title content score +2 天気 明日の富士山の天気について 3 +3 富士山 今日も天気がよくてきれいに見える。 2 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_weight_omit_section.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_weight_omit_section.result new file mode 100644 index 00000000000..c73d2660d54 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_weight_omit_section.result @@ -0,0 +1,20 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES utf8; +CREATE TABLE diaries ( +id INT PRIMARY KEY, +title VARCHAR(255), +content TEXT, +FULLTEXT INDEX (title, content) +) DEFAULT CHARSET=utf8; +INSERT INTO diaries VALUES(1, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, "富士山", "今日も天気がよくてきれいに見える。"); +SELECT *, MATCH(title, content) +AGAINST("*W1:2 +天気" in BOOLEAN MODE) AS score +FROM diaries +WHERE MATCH(title, content) +AGAINST("*W1:2 +天気" in BOOLEAN MODE); +id title content score +2 天気 明日の富士山の天気について 3 +3 富士山 今日も天気がよくてきれいに見える。 1 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_weight_ten_or_more_sections.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_weight_ten_or_more_sections.result new file mode 100644 index 00000000000..b1b9d5f4f41 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_weight_ten_or_more_sections.result @@ -0,0 +1,39 @@ +DROP TABLE IF EXISTS memos; +SET NAMES utf8; +CREATE TABLE memos ( +title VARCHAR(255), +tag1 VARCHAR(10), +tag2 VARCHAR(10), +tag3 VARCHAR(10), +tag4 VARCHAR(10), +tag5 VARCHAR(10), +tag6 VARCHAR(10), +tag7 VARCHAR(10), +tag8 VARCHAR(10), +tag9 VARCHAR(10), +tag10 VARCHAR(10), +FULLTEXT INDEX (tag1, tag2, tag3, tag4, tag5, tag6, tag7, tag8, tag9, tag10) +) DEFAULT CHARSET=utf8; +INSERT INTO memos +VALUES("Groonga", +"tag 1", +"tag 2", +"tag 3", +"tag 4", +"tag 5", +"tag 6", +"tag 7", +"tag 8", +"tag 9", +"tag 10"); +SELECT title, +MATCH(tag1, tag2, tag3, tag4, tag5, tag6, tag7, tag8, tag9, tag10) +AGAINST("*W1:2,2:4,3:6,4:8,5:10,6:12,7:14,8:16,9:18,10:20 +tag" + in BOOLEAN MODE) AS score +FROM memos +WHERE MATCH(tag1, tag2, tag3, tag4, tag5, tag6, tag7, tag8, tag9, tag10) +AGAINST("*W1:2,2:4,3:6,4:8,5:10,6:12,7:14,8:16,9:18,10:20 +tag" + in BOOLEAN MODE); +title score +Groonga 110 +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_weight_three_or_more_sections.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_weight_three_or_more_sections.result new file mode 100644 index 00000000000..02db17e61da --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_weight_three_or_more_sections.result @@ -0,0 +1,21 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES utf8; +CREATE TABLE diaries ( +id INT PRIMARY KEY, +title VARCHAR(255), +category VARCHAR(10), +content TEXT, +FULLTEXT INDEX (title, category, content) +) DEFAULT CHARSET=utf8; +INSERT INTO diaries VALUES(1, "Hello", "日記", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, "天気予報", "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, "富士山", "天気", "今日も天気がよくてきれいに見える。"); +SELECT *, MATCH(title, category, content) +AGAINST("*W1:2,2:10,3:1 +天気" in BOOLEAN MODE) AS score +FROM diaries +WHERE MATCH(title, category, content) +AGAINST("*W1:2,2:10,3:1 +天気" in BOOLEAN MODE); +id title category content score +2 天気予報 天気 明日の富士山の天気について 13 +3 富士山 天気 今日も天気がよくてきれいに見える。 11 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_syntax_error_error.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_syntax_error_error.result new file mode 100644 index 00000000000..5746ce89cb7 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_syntax_error_error.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS memos; +SET GLOBAL mroonga_default_parser = TokenDelimit; +SET mroonga_action_on_fulltext_query_error = ERROR; +SET NAMES UTF8; +CREATE TABLE memos ( +id INT PRIMARY KEY, +content TEXT, +FULLTEXT INDEX (content) +) DEFAULT CHARSET=UTF8; +INSERT INTO memos VALUES(1, "(groonga) Installed!"); +INSERT INTO memos VALUES(2, "(mroonga) Installed!"); +INSERT INTO memos VALUES(3, "(groonga) Upgraded!"); +SELECT * FROM memos +WHERE MATCH(content) AGAINST("(groonga" IN BOOLEAN MODE); +ERROR 42000: failed to parse fulltext search keyword: <(groonga>: <Syntax error: <(groonga||>> +DROP TABLE memos; +SET GLOBAL mroonga_default_parser = TokenBigram; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_syntax_error_error_and_log.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_syntax_error_error_and_log.result new file mode 100644 index 00000000000..1811994b67e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_syntax_error_error_and_log.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS memos; +SET GLOBAL mroonga_default_parser = TokenDelimit; +SET mroonga_action_on_fulltext_query_error = ERROR_AND_LOG; +SET NAMES UTF8; +CREATE TABLE memos ( +id INT PRIMARY KEY, +content TEXT, +FULLTEXT INDEX (content) +) DEFAULT CHARSET=UTF8; +INSERT INTO memos VALUES(1, "(groonga) Installed!"); +INSERT INTO memos VALUES(2, "(mroonga) Installed!"); +INSERT INTO memos VALUES(3, "(groonga) Upgraded!"); +SELECT * FROM memos +WHERE MATCH(content) AGAINST("(groonga" IN BOOLEAN MODE); +ERROR 42000: failed to parse fulltext search keyword: <(groonga>: <Syntax error: <(groonga||>> +DROP TABLE memos; +SET GLOBAL mroonga_default_parser = TokenBigram; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_syntax_error_ignore.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_syntax_error_ignore.result new file mode 100644 index 00000000000..6a4759963a3 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_syntax_error_ignore.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS memos; +SET GLOBAL mroonga_default_parser = TokenDelimit; +SET mroonga_action_on_fulltext_query_error = "IGNORE"; +SET NAMES UTF8; +CREATE TABLE memos ( +id INT PRIMARY KEY, +content TEXT, +FULLTEXT INDEX (content) +) DEFAULT CHARSET=UTF8; +INSERT INTO memos VALUES(1, "(groonga) Installed!"); +INSERT INTO memos VALUES(2, "(mroonga) Installed!"); +INSERT INTO memos VALUES(3, "(groonga) Upgraded!"); +SELECT * FROM memos +WHERE MATCH(content) AGAINST("(groonga" IN BOOLEAN MODE); +id content +DROP TABLE memos; +SET GLOBAL mroonga_default_parser = TokenBigram; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_syntax_error_ignore_and_log.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_syntax_error_ignore_and_log.result new file mode 100644 index 00000000000..384d677c427 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_syntax_error_ignore_and_log.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS memos; +SET GLOBAL mroonga_default_parser = TokenDelimit; +SET mroonga_action_on_fulltext_query_error = IGNORE_AND_LOG; +SET NAMES UTF8; +CREATE TABLE memos ( +id INT PRIMARY KEY, +content TEXT, +FULLTEXT INDEX (content) +) DEFAULT CHARSET=UTF8; +INSERT INTO memos VALUES(1, "(groonga) Installed!"); +INSERT INTO memos VALUES(2, "(mroonga) Installed!"); +INSERT INTO memos VALUES(3, "(groonga) Upgraded!"); +SELECT * FROM memos +WHERE MATCH(content) AGAINST("(groonga" IN BOOLEAN MODE); +id content +DROP TABLE memos; +SET GLOBAL mroonga_default_parser = TokenBigram; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_charset_ascii.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_charset_ascii.result new file mode 100644 index 00000000000..c542ba1adae --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_charset_ascii.result @@ -0,0 +1,29 @@ +drop table if exists t1, t2, t3; +create table t1 (c1 int primary key, c2 int, c3 text, fulltext index ft(c3)); +insert into t1 values(1,10,"aa ii uu ee oo"); +insert into t1 values(2,20,"ka ki ku ke ko"); +insert into t1 values(3,30,"sa si su se so"); +insert into t1 values(4,40,"ta ti tu te to"); +insert into t1 values(5,50,"aa ii uu ee oo"); +select * from t1; +c1 c2 c3 +1 10 aa ii uu ee oo +2 20 ka ki ku ke ko +3 30 sa si su se so +4 40 ta ti tu te to +5 50 aa ii uu ee oo +select * from t1 where match(c3) against("su"); +c1 c2 c3 +3 30 sa si su se so +select * from t1 where match(c3) against("ii"); +c1 c2 c3 +1 10 aa ii uu ee oo +5 50 aa ii uu ee oo +select * from t1 where match(c3) against("+su" in boolean mode); +c1 c2 c3 +3 30 sa si su se so +select * from t1 where match(c3) against("+ii" in boolean mode); +c1 c2 c3 +1 10 aa ii uu ee oo +5 50 aa ii uu ee oo +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_charset_cp932.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_charset_cp932.result new file mode 100644 index 00000000000..bd208d520c5 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_charset_cp932.result @@ -0,0 +1,18 @@ +drop table if exists t1, t2, t3; +set names cp932; +create table t1 (c1 int primary key, c2 varchar(255), c3 text, fulltext index(c2), fulltext index(c3)) default charset cp932; +insert into t1 values(1, "̕xmR̓VCɂ",""); +insert into t1 values(2, "","̕xmR̓VC͕܂"); +insert into t1 values(3, "dummy", "dummy"); +select * from t1; +c1 c2 c3 +1 ̕xmR̓VCɂ +2 ̕xmR̓VC͕܂ +3 dummy dummy +select * from t1 where match(c2) against("xmR"); +c1 c2 c3 +1 ̕xmR̓VCɂ +select * from t1 where match(c3) against("xmR"); +c1 c2 c3 +2 ̕xmR̓VC͕܂ +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_charset_eucjpms.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_charset_eucjpms.result new file mode 100644 index 00000000000..51360875cf1 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_charset_eucjpms.result @@ -0,0 +1,18 @@ +drop table if exists t1, t2, t3; +set names eucjpms; +create table t1 (c1 int primary key, c2 varchar(255), c3 text, fulltext index(c2), fulltext index(c3)) default charset eucjpms; +insert into t1 values(1, "ٻλŷˤĤ",""); +insert into t1 values(2, "","ٻλŷʬޤ"); +insert into t1 values(3, "dummy", "dummy"); +select * from t1; +c1 c2 c3 +1 ٻλŷˤĤ +2 ٻλŷʬޤ +3 dummy dummy +select * from t1 where match(c2) against("ٻλ"); +c1 c2 c3 +1 ٻλŷˤĤ +select * from t1 where match(c3) against("ٻλ"); +c1 c2 c3 +2 ٻλŷʬޤ +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_charset_japanese.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_charset_japanese.result new file mode 100644 index 00000000000..cfff3f2e29b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_charset_japanese.result @@ -0,0 +1,18 @@ +drop table if exists t1, t2, t3; +set names utf8; +create table t1 (c1 int primary key, c2 varchar(255), c3 text, fulltext index(c2), fulltext index(c3)) default charset utf8; +insert into t1 values(1, "明日の富士山の天気について","あああああああ"); +insert into t1 values(2, "いいいいい","明日の富士山の天気は分かりません"); +insert into t1 values(3, "dummy", "dummy"); +select * from t1; +c1 c2 c3 +1 明日の富士山の天気について あああああああ +2 いいいいい 明日の富士山の天気は分かりません +3 dummy dummy +select * from t1 where match(c2) against("富士山"); +c1 c2 c3 +1 明日の富士山の天気について あああああああ +select * from t1 where match(c3) against("富士山"); +c1 c2 c3 +2 いいいいい 明日の富士山の天気は分かりません +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_charset_utf8mb4.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_charset_utf8mb4.result new file mode 100644 index 00000000000..31d45181c96 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_charset_utf8mb4.result @@ -0,0 +1,26 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES utf8mb4; +CREATE TABLE diaries ( +id INT PRIMARY KEY, +title VARCHAR(255) CHARSET utf8mb4 COLLATE utf8mb4_general_ci, +content TEXT CHARSET utf8mb4 COLLATE utf8mb4_general_ci, +FULLTEXT INDEX (content) +) DEFAULT CHARSET utf8mb4; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL, + `title` varchar(255) DEFAULT NULL, + `content` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 +INSERT INTO diaries VALUES(1, "Alphabet", "ABCDE"); +INSERT INTO diaries VALUES(2, "Mathmatics", "𝐀𝐁𝐂𝐃𝐄 | U+1D400-U+1D405"); +INSERT INTO diaries VALUES(3, "ひらがな", "あいうえお"); +SELECT * +FROM diaries +WHERE MATCH (content) AGAINST("ABCDE" IN BOOLEAN MODE); +id title content +1 Alphabet ABCDE +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_empty_query.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_empty_query.result new file mode 100644 index 00000000000..bb7b3b63752 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_empty_query.result @@ -0,0 +1,19 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES UTF8; +CREATE TABLE diaries( +title TEXT, +FULLTEXT KEY (title) +) DEFAULT CHARSET=utf8; +INSERT INTO diaries VALUES("Start groonga"); +INSERT INTO diaries VALUES("Start mroonga"); +INSERT INTO diaries VALUES("Start groonga and Ruby"); +SELECT * FROM diaries; +title +Start groonga +Start mroonga +Start groonga and Ruby +SELECT * +FROM diaries +WHERE MATCH(title) AGAINST(""); +title +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_found_rows.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_found_rows.result new file mode 100644 index 00000000000..c107991d151 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_found_rows.result @@ -0,0 +1,42 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES UTF8; +CREATE TABLE diaries ( +id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, +year INT UNSIGNED, +month INT UNSIGNED, +day INT UNSIGNED, +title VARCHAR(255), +content TEXT, +FULLTEXT INDEX(content), +KEY(day) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `year` int(10) unsigned DEFAULT NULL, + `month` int(10) unsigned DEFAULT NULL, + `day` int(10) unsigned DEFAULT NULL, + `title` varchar(255) DEFAULT NULL, + `content` text, + PRIMARY KEY (`id`), + KEY `day` (`day`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気がよくてきれいに見える。"); +INSERT INTO diaries VALUES(4, 2011, 11, 11, "帰り道", "今日は天気がよくてよかった。"); +INSERT INTO diaries VALUES(5, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。"); +INSERT INTO diaries VALUES(6, 2011, 12, 2, "初雪", "今日の天気は雪!"); +SELECT SQL_CALC_FOUND_ROWS * FROM diaries WHERE MATCH(content) AGAINST("今日 天気" IN BOOLEAN MODE) ORDER BY day LIMIT 0,5; +id year month day title content +5 2011 12 1 久しぶり 天気が悪いからずっと留守番。 +6 2011 12 2 初雪 今日の天気は雪! +1 2011 11 9 Hello 今日からはじめました。 +2 2011 11 10 天気 明日の富士山の天気について +3 2011 11 11 富士山 今日も天気がよくてきれいに見える。 +SELECT FOUND_ROWS(); +FOUND_ROWS() +6 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_groonga_varchar_vector.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_groonga_varchar_vector.result new file mode 100644 index 00000000000..a23d8e5b542 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_groonga_varchar_vector.result @@ -0,0 +1,21 @@ +DROP TABLE IF EXISTS bugs, tags; +CREATE TABLE tags ( +name VARCHAR(64) PRIMARY KEY +) DEFAULT CHARSET=utf8 +COLLATE=utf8_bin +COMMENT='default_tokenizer "TokenDelimit"'; +CREATE TABLE bugs ( +id INT UNSIGNED PRIMARY KEY, +tags VARCHAR(40) COMMENT 'type "tags", flags "COLUMN_VECTOR"', +FULLTEXT INDEX bugs_tags_index (tags) COMMENT 'table "tags"' +) DEFAULT CHARSET=utf8; +INSERT INTO bugs (id, tags) VALUES (1, "Linux MySQL"); +INSERT INTO bugs (id, tags) VALUES (2, "MySQL groonga"); +INSERT INTO bugs (id, tags) VALUES (3, "mroonga"); +SELECT * +FROM bugs +WHERE MATCH (tags) AGAINST ("MySQL" IN BOOLEAN MODE); +id tags +1 Linux MySQL +2 MySQL groonga +DROP TABLE bugs, tags; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_index_recreate.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_index_recreate.result new file mode 100644 index 00000000000..04996d30f36 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_index_recreate.result @@ -0,0 +1,41 @@ +drop table if exists diaries; +set names utf8; +create table diaries ( +id int primary key, +title varchar(255), +content text, +fulltext index (title) +) default charset utf8; +show create table diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL, + `title` varchar(255) DEFAULT NULL, + `content` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `title` (`title`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +insert into diaries values(1, "Hello", "はじめました。"); +insert into diaries values(2, "天気", "明日の富士山の天気について"); +insert into diaries values(3, "富士山", "今日もきれい。"); +select * from diaries where match(title) against("富士山"); +id title content +3 富士山 今日もきれい。 +drop index title on diaries; +select * from diaries where match(title) against("富士山"); +ERROR HY000: Can't find FULLTEXT index matching the column list +select * from diaries; +id title content +1 Hello はじめました。 +2 天気 明日の富士山の天気について +3 富士山 今日もきれい。 +create fulltext index new_title_index on diaries (title); +select * from diaries where match(title) against("富士山"); +id title content +3 富士山 今日もきれい。 +select * from diaries; +id title content +1 Hello はじめました。 +2 天気 明日の富士山の天気について +3 富士山 今日もきれい。 +drop table diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_insert_select.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_insert_select.result new file mode 100644 index 00000000000..6c268ff7641 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_insert_select.result @@ -0,0 +1,66 @@ +drop table if exists t1, t2, t3; +create table t1 (c1 int primary key, c2 varchar(100), fulltext index(c2)) default charset utf8; +create table t2 (c1 int primary key, c2 text, fulltext index(c2)) default charset utf8; +insert into t1 values (1, "aa ii uu ee oo"); +insert into t1 values (2, "ka ki ku ke ko"); +insert into t1 values (3, "aa ii ii ii oo"); +insert into t1 values (4, "sa si su se so"); +insert into t1 values (5, "ta ti ii ii to"); +insert into t2 (c1,c2) select c1,c2 from t1; +select * from t1; +c1 c2 +1 aa ii uu ee oo +2 ka ki ku ke ko +3 aa ii ii ii oo +4 sa si su se so +5 ta ti ii ii to +select * from t2; +c1 c2 +1 aa ii uu ee oo +2 ka ki ku ke ko +3 aa ii ii ii oo +4 sa si su se so +5 ta ti ii ii to +select * from t1 where c1=3; +c1 c2 +3 aa ii ii ii oo +select * from t2 where c1=3; +c1 c2 +3 aa ii ii ii oo +select * from t1 where c1>3 order by c1 desc; +c1 c2 +5 ta ti ii ii to +4 sa si su se so +select * from t2 where c1>3 order by c1 asc; +c1 c2 +4 sa si su se so +5 ta ti ii ii to +select * from t1 where c2>"s" order by c2 desc; +c1 c2 +5 ta ti ii ii to +4 sa si su se so +select * from t2 where c2>"s" order by c1 asc; +c1 c2 +4 sa si su se so +5 ta ti ii ii to +select * from t1 where match(c2) against("ii") order by match(c2) against("ii") desc; +c1 c2 +3 aa ii ii ii oo +5 ta ti ii ii to +1 aa ii uu ee oo +select * from t2 where match(c2) against("ii") order by match(c2) against("ii") asc; +c1 c2 +1 aa ii uu ee oo +5 ta ti ii ii to +3 aa ii ii ii oo +select c1,c2,match(c2) against("ii") from t1 where match(c2) against("ii"); +c1 c2 match(c2) against("ii") +1 aa ii uu ee oo 174763 +3 aa ii ii ii oo 524289 +5 ta ti ii ii to 349526 +select c1,c2,match(c2) against("ii") from t2 where match(c2) against("ii"); +c1 c2 match(c2) against("ii") +1 aa ii uu ee oo 174763 +3 aa ii ii ii oo 524289 +5 ta ti ii ii to 349526 +drop table t1,t2; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_insert_values.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_insert_values.result new file mode 100644 index 00000000000..623c66daaf4 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_insert_values.result @@ -0,0 +1,25 @@ +drop table if exists t1, t2, t3; +create table t1 (c1 int primary key, c2 text, fulltext index ft (c2)); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(11) NOT NULL, + `c2` text, + PRIMARY KEY (`c1`), + FULLTEXT KEY `ft` (`c2`) +) ENGINE=Mroonga DEFAULT CHARSET=latin1 +insert into t1 values (1, "hoge hoge"); +insert into t1 values (2, "fuga fuga"); +insert into t1 values (3, "moge moge"); +select * from t1; +c1 c2 +1 hoge hoge +2 fuga fuga +3 moge moge +flush tables; +select * from t1; +c1 c2 +1 hoge hoge +2 fuga fuga +3 moge moge +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_column_index_delete.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_column_index_delete.result new file mode 100644 index 00000000000..843c4b958ba --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_column_index_delete.result @@ -0,0 +1,34 @@ +drop table if exists diaries; +set names utf8; +create table diaries ( +id int primary key, +title varchar(255), +content text, +fulltext index (title, content), +fulltext index (title), +fulltext index (content) +) default charset utf8; +show create table diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL, + `title` varchar(255) DEFAULT NULL, + `content` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `title` (`title`,`content`), + FULLTEXT KEY `title_2` (`title`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +insert into diaries values(1, "Hello", "はじめました。"); +insert into diaries values(2, "天気", "明日の富士山の天気について"); +insert into diaries values(3, "富士山", "今日もきれい。"); +delete from diaries where id = 2; +select * from diaries where match(title, content) against("富士山"); +id title content +3 富士山 今日もきれい。 +select * from diaries where match(title) against("富士山"); +id title content +3 富士山 今日もきれい。 +select * from diaries where match(content) against("富士山"); +id title content +drop table diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_column_index_insert.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_column_index_insert.result new file mode 100644 index 00000000000..3856d7ecc10 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_column_index_insert.result @@ -0,0 +1,40 @@ +drop table if exists diaries; +set names utf8; +create table diaries ( +id int primary key, +title varchar(255), +content text, +fulltext index (title, content), +fulltext index (title), +fulltext index (content) +) default charset utf8; +show create table diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL, + `title` varchar(255) DEFAULT NULL, + `content` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `title` (`title`,`content`), + FULLTEXT KEY `title_2` (`title`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +insert into diaries values(1, "Hello", "はじめました。"); +insert into diaries values(2, "天気", "明日の富士山の天気について"); +insert into diaries values(3, "富士山", "今日もきれい。"); +select * from diaries; +id title content +1 Hello はじめました。 +2 天気 明日の富士山の天気について +3 富士山 今日もきれい。 +select * from diaries where match(title, content) against("富士山"); +id title content +2 天気 明日の富士山の天気について +3 富士山 今日もきれい。 +select * from diaries where match(title) against("富士山"); +id title content +3 富士山 今日もきれい。 +select * from diaries where match(content) against("富士山"); +id title content +2 天気 明日の富士山の天気について +drop table diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_column_index_recreate.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_column_index_recreate.result new file mode 100644 index 00000000000..59b26574c73 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_column_index_recreate.result @@ -0,0 +1,42 @@ +drop table if exists diaries; +set names utf8; +create table diaries ( +id int primary key, +title varchar(255), +content text, +fulltext index (title, content), +fulltext index (title), +fulltext index (content) +) default charset utf8; +show create table diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL, + `title` varchar(255) DEFAULT NULL, + `content` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `title` (`title`,`content`), + FULLTEXT KEY `title_2` (`title`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +insert into diaries values(1, "Hello", "はじめました。"); +insert into diaries values(2, "天気", "明日の富士山の天気について"); +insert into diaries values(3, "富士山", "今日もきれい。"); +select * from diaries where match(title, content) against("富士山"); +id title content +2 天気 明日の富士山の天気について +3 富士山 今日もきれい。 +drop index title on diaries; +select * from diaries where match(title, content) against("富士山"); +ERROR HY000: Can't find FULLTEXT index matching the column list +create fulltext index new_title_content_index on diaries (title, content); +select * from diaries where match(title, content) against("富士山"); +id title content +2 天気 明日の富士山の天気について +3 富士山 今日もきれい。 +select * from diaries; +id title content +1 Hello はじめました。 +2 天気 明日の富士山の天気について +3 富士山 今日もきれい。 +drop table diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_column_index_update.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_column_index_update.result new file mode 100644 index 00000000000..d17ff6adf83 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_column_index_update.result @@ -0,0 +1,37 @@ +drop table if exists diaries; +set names utf8; +create table diaries ( +id int primary key, +title varchar(255), +content text, +fulltext index (title, content), +fulltext index (title), +fulltext index (content) +) default charset utf8; +show create table diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL, + `title` varchar(255) DEFAULT NULL, + `content` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `title` (`title`,`content`), + FULLTEXT KEY `title_2` (`title`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +insert into diaries values(1, "Hello", "はじめました。"); +insert into diaries values(2, "天気", "明日の富士山の天気について"); +insert into diaries values(3, "富士山", "今日もきれい。"); +update diaries set title = "チョモランマ" where id = 3; +update diaries set content = "チョモランマと富士山" where id = 1; +select * from diaries where match(title, content) against("富士山"); +id title content +1 Hello チョモランマと富士山 +2 天気 明日の富士山の天気について +select * from diaries where match(title) against("富士山"); +id title content +select * from diaries where match(content) against("富士山"); +id title content +1 Hello チョモランマと富士山 +2 天気 明日の富士山の天気について +drop table diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_index.result new file mode 100644 index 00000000000..81b40261a4c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_index.result @@ -0,0 +1,33 @@ +drop table if exists diaries; +create table diaries ( +id int primary key auto_increment, +title text, +body text, +fulltext index title_index (title), +fulltext index body_index (body) +) default charset utf8; +show create table diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `body` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `title_index` (`title`), + FULLTEXT KEY `body_index` (`body`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +insert into diaries (title, body) values ("survey", "will start groonga!"); +insert into diaries (title, body) values ("groonga (1)", "starting groonga..."); +insert into diaries (title, body) values ("groonga (2)", "started groonga."); +select * from diaries +where match(title) against("survey") and +match(body) against("groonga"); +id title body +1 survey will start groonga! +select *, match(title) against("survey"), match(body) against("groonga") +from diaries +where match(title) against("survey") and +match(body) against("groonga"); +id title body match(title) against("survey") match(body) against("groonga") +1 survey will start groonga! 1048577 149797 +drop table diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_no_primary_key.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_no_primary_key.result new file mode 100644 index 00000000000..5f85632575b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_no_primary_key.result @@ -0,0 +1,21 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES UTF8; +CREATE TABLE diaries ( +title VARCHAR(255), +content TEXT, +FULLTEXT INDEX (content) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `title` varchar(255) DEFAULT NULL, + `content` text, + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries VALUES("Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES("天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES("富士山", "今日も天気がよくてきれいに見える。"); +SELECT * FROM diaries WHERE MATCH(content) AGAINST("*D+ 今日 天気" IN BOOLEAN MODE); +title content +富士山 今日も天気がよくてきれいに見える。 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_not_match_against.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_not_match_against.result new file mode 100644 index 00000000000..2c1666369a5 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_not_match_against.result @@ -0,0 +1,68 @@ +drop table if exists t1, t2, t3; +create table t1 (c1 int primary key, c2 int, c3 text, fulltext index ft(c3)); +insert into t1 values(1,10,"aa ii uu ee oo"); +insert into t1 values(2,10,"ka ki ku ke ko"); +insert into t1 values(3,10,"aa ii uu ee oo"); +insert into t1 values(4,10,"ka ki ku ke ko"); +insert into t1 values(5,20,"aa ii uu ee oo"); +insert into t1 values(6,20,"ka ki ku ke ko"); +insert into t1 values(7,20,"aa ii uu ee oo"); +insert into t1 values(8,20,"ka ki ku ke ko"); +select * from t1; +c1 c2 c3 +1 10 aa ii uu ee oo +2 10 ka ki ku ke ko +3 10 aa ii uu ee oo +4 10 ka ki ku ke ko +5 20 aa ii uu ee oo +6 20 ka ki ku ke ko +7 20 aa ii uu ee oo +8 20 ka ki ku ke ko +select * from t1 where match(c3) against("uu"); +c1 c2 c3 +1 10 aa ii uu ee oo +3 10 aa ii uu ee oo +5 20 aa ii uu ee oo +7 20 aa ii uu ee oo +select * from t1 where not match(c3) against("uu"); +c1 c2 c3 +2 10 ka ki ku ke ko +4 10 ka ki ku ke ko +6 20 ka ki ku ke ko +8 20 ka ki ku ke ko +select * from t1 where match(c3) against("dummy"); +c1 c2 c3 +select * from t1 where not match(c3) against("dummy"); +c1 c2 c3 +1 10 aa ii uu ee oo +2 10 ka ki ku ke ko +3 10 aa ii uu ee oo +4 10 ka ki ku ke ko +5 20 aa ii uu ee oo +6 20 ka ki ku ke ko +7 20 aa ii uu ee oo +8 20 ka ki ku ke ko +select * from t1 where c1 = 4 and not match(c3) against("uu"); +c1 c2 c3 +4 10 ka ki ku ke ko +select * from t1 where c1 <= 4 and not match(c3) against("uu"); +c1 c2 c3 +2 10 ka ki ku ke ko +4 10 ka ki ku ke ko +select * from t1 where c1 > 4 and not match(c3) against("uu"); +c1 c2 c3 +6 20 ka ki ku ke ko +8 20 ka ki ku ke ko +select * from t1 where c2 = 10 and not match(c3) against("uu"); +c1 c2 c3 +2 10 ka ki ku ke ko +4 10 ka ki ku ke ko +select * from t1 where c2 >= 15 and not match(c3) against("uu"); +c1 c2 c3 +6 20 ka ki ku ke ko +8 20 ka ki ku ke ko +select * from t1 where c2 < 15 and not match(c3) against("uu"); +c1 c2 c3 +2 10 ka ki ku ke ko +4 10 ka ki ku ke ko +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_or.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_or.result new file mode 100644 index 00000000000..f1f7888ceeb --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_or.result @@ -0,0 +1,22 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES UTF8; +CREATE TABLE diaries( +title TEXT, +FULLTEXT KEY (title) +) DEFAULT CHARSET=utf8; +INSERT INTO diaries VALUES("Start groonga"); +INSERT INTO diaries VALUES("Start mroonga"); +INSERT INTO diaries VALUES("Start groonga and Ruby"); +SELECT * FROM diaries; +title +Start groonga +Start mroonga +Start groonga and Ruby +SELECT * +FROM diaries +WHERE MATCH(title) AGAINST("Ruby" IN BOOLEAN MODE) OR +MATCH(title) AGAINST("mroonga" IN BOOLEAN MODE); +title +Start mroonga +Start groonga and Ruby +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_different_against.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_different_against.result new file mode 100644 index 00000000000..d1f0d6bc0ab --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_different_against.result @@ -0,0 +1,23 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES UTF8; +CREATE TABLE diaries( +title TEXT, +FULLTEXT KEY (title) +) DEFAULT CHARSET=utf8; +INSERT INTO diaries VALUES("Start groonga"); +INSERT INTO diaries VALUES("Start mroonga"); +INSERT INTO diaries VALUES("Start groonga and Ruby"); +SELECT * FROM diaries; +title +Start groonga +Start mroonga +Start groonga and Ruby +SELECT *, MATCH(title) AGAINST("groonga" IN BOOLEAN MODE) AS score +FROM diaries +WHERE MATCH(title) AGAINST("groonga mroonga" IN BOOLEAN MODE) +ORDER BY MATCH(title) AGAINST("groonga" IN BOOLEAN MODE); +title score +Start mroonga 0 +Start groonga 1 +Start groonga and Ruby 1 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_different_match.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_different_match.result new file mode 100644 index 00000000000..b4a07cd0b66 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_different_match.result @@ -0,0 +1,24 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES UTF8; +CREATE TABLE diaries( +title TEXT, +body TEXT, +FULLTEXT KEY (title), +FULLTEXT KEY (body) +) DEFAULT CHARSET=utf8; +INSERT INTO diaries VALUES("Start groonga", "I read groonga's tutorial."); +INSERT INTO diaries VALUES("Start mroonga", "I read mroonga's tutorial."); +INSERT INTO diaries VALUES("Start groonga and Ruby", "I installed rroonga."); +SELECT * FROM diaries; +title body +Start groonga I read groonga's tutorial. +Start mroonga I read mroonga's tutorial. +Start groonga and Ruby I installed rroonga. +SELECT *, MATCH(body) AGAINST("groonga" IN BOOLEAN MODE) AS score +FROM diaries +WHERE MATCH(title) AGAINST("groonga" IN BOOLEAN MODE) +ORDER BY MATCH(body) AGAINST("groonga" IN BOOLEAN MODE); +title body score +Start groonga and Ruby I installed rroonga. 0 +Start groonga I read groonga's tutorial. 1 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_no_where.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_no_where.result new file mode 100644 index 00000000000..125b35fb96e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_no_where.result @@ -0,0 +1,22 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES UTF8; +CREATE TABLE diaries( +title TEXT, +FULLTEXT KEY (title) +) DEFAULT CHARSET=utf8; +INSERT INTO diaries VALUES("Start groonga"); +INSERT INTO diaries VALUES("Start mroonga"); +INSERT INTO diaries VALUES("Start groonga and Ruby"); +SELECT * FROM diaries; +title +Start groonga +Start mroonga +Start groonga and Ruby +SELECT *, MATCH(title) AGAINST("groonga" IN BOOLEAN MODE) AS score +FROM diaries +ORDER BY MATCH(title) AGAINST("groonga" IN BOOLEAN MODE); +title score +Start mroonga 0 +Start groonga 1 +Start groonga and Ruby 1 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_same_match_against.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_same_match_against.result new file mode 100644 index 00000000000..a3a668c4445 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_same_match_against.result @@ -0,0 +1,22 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES UTF8; +CREATE TABLE diaries( +title TEXT, +FULLTEXT KEY (title) +) DEFAULT CHARSET=utf8; +INSERT INTO diaries VALUES("Start groonga"); +INSERT INTO diaries VALUES("Start mroonga"); +INSERT INTO diaries VALUES("Start groonga and Ruby"); +SELECT * FROM diaries; +title +Start groonga +Start mroonga +Start groonga and Ruby +SELECT *, MATCH(title) AGAINST("groonga" IN BOOLEAN MODE) AS score +FROM diaries +WHERE MATCH(title) AGAINST("groonga" IN BOOLEAN MODE) +ORDER BY MATCH(title) AGAINST("groonga" IN BOOLEAN MODE); +title score +Start groonga 1 +Start groonga and Ruby 1 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_parser_comment.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_parser_comment.result new file mode 100644 index 00000000000..f2abfe85dd6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_parser_comment.result @@ -0,0 +1,29 @@ +drop table if exists diaries; +create table diaries ( +id int primary key auto_increment, +body text, +fulltext index body_index (body) +comment 'parser "TokenBigramSplitSymbolAlphaDigit"' +) default charset utf8; +show create table diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `body` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `body_index` (`body`) COMMENT 'parser "TokenBigramSplitSymbolAlphaDigit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +insert into diaries (body) values ("will start groonga!"); +insert into diaries (body) values ("starting groonga..."); +insert into diaries (body) values ("started groonga."); +select * from diaries; +id body +1 will start groonga! +2 starting groonga... +3 started groonga. +select * from diaries where match(body) against("start"); +id body +1 will start groonga! +2 starting groonga... +3 started groonga. +drop table diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_parser_default.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_parser_default.result new file mode 100644 index 00000000000..6c04cae59f2 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_parser_default.result @@ -0,0 +1,33 @@ +drop table if exists diaries; +set @mroonga_default_parser_backup=@@mroonga_default_parser; +set global mroonga_default_parser=TokenBigramSplitSymbolAlphaDigit; +create table diaries ( +id int primary key auto_increment, +body text, +fulltext index body_index (body) +) default charset utf8; +show create table diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `body` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `body_index` (`body`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +insert into diaries (body) values ("will start groonga!"); +insert into diaries (body) values ("starting groonga..."); +insert into diaries (body) values ("started groonga."); +insert into diaries (body) values ("finished groonga."); +select * from diaries; +id body +1 will start groonga! +2 starting groonga... +3 started groonga. +4 finished groonga. +select * from diaries where match(body) against("start"); +id body +1 will start groonga! +2 starting groonga... +3 started groonga. +drop table diaries; +set global mroonga_default_parser=@mroonga_default_parser_backup; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_parser_off.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_parser_off.result new file mode 100644 index 00000000000..77765f61dc3 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_parser_off.result @@ -0,0 +1,42 @@ +DROP TABLE IF EXISTS variables; +CREATE TABLE variables ( +id INT PRIMARY KEY AUTO_INCREMENT, +name TEXT, +FULLTEXT INDEX (name) COMMENT 'parser "off"' +) DEFAULT CHARSET=utf8; +SHOW CREATE TABLE variables; +Table Create Table +variables CREATE TABLE `variables` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `name` (`name`) COMMENT 'parser "off"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO variables (name) VALUES ("mroonga_database_path_prefix"); +INSERT INTO variables (name) VALUES ("mroonga_default_parser"); +INSERT INTO variables (name) VALUES ("mroonga_default_wrapper_engine"); +INSERT INTO variables (name) VALUES ("mroonga_dry_write"); +INSERT INTO variables (name) VALUES ("mroonga_enable_optimization"); +INSERT INTO variables (name) VALUES ("mroonga_libgroonga_version"); +INSERT INTO variables (name) VALUES ("mroonga_log_file"); +INSERT INTO variables (name) VALUES ("mroonga_log_level"); +INSERT INTO variables (name) VALUES ("mroonga_match_escalation_threshold"); +INSERT INTO variables (name) VALUES ("mroonga_version"); +SELECT * FROM variables; +id name +1 mroonga_database_path_prefix +2 mroonga_default_parser +3 mroonga_default_wrapper_engine +4 mroonga_dry_write +5 mroonga_enable_optimization +6 mroonga_libgroonga_version +7 mroonga_log_file +8 mroonga_log_level +9 mroonga_match_escalation_threshold +10 mroonga_version +SELECT * FROM variables +WHERE MATCH (name) AGAINST ("mroonga_default*" IN BOOLEAN MODE); +id name +3 mroonga_default_wrapper_engine +2 mroonga_default_parser +DROP TABLE variables; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_two_inner_join.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_two_inner_join.result new file mode 100644 index 00000000000..e39790ed5be --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_two_inner_join.result @@ -0,0 +1,41 @@ +DROP TABLE IF EXISTS users, posts, comments; +SET NAMES utf8; +CREATE TABLE users ( +id int NOT NULL, +name varchar(50) NOT NULL, +PRIMARY KEY (id), +KEY (name) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE posts ( +id int NOT NULL, +content mediumtext, +user_id int NOT NULL, +PRIMARY KEY (id), +FULLTEXT KEY (content) +) DEFAULT CHARSET=utf8; +CREATE TABLE comments ( +id int NOT NULL, +user_id int NOT NULL, +post_id int NOT NULL, +PRIMARY KEY (id) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +INSERT INTO users VALUES (1, "Alice"), +(2, "Bob"), +(3, "Calros"); +INSERT INTO posts VALUES (1, "Hello!", 1), +(2, "World!", 2), +(3, "Great!", 3); +INSERT INTO comments VALUES (1, 1, 1), +(2, 2, 1), +(3, 3, 3); +SELECT * +FROM comments +INNER JOIN posts +ON posts.id = comments.post_id AND +MATCH (posts.content) AGAINST ("Hello!" IN BOOLEAN MODE) +INNER JOIN users +ON users.id = comments.user_id AND +users.name = "Alice"; +id user_id post_id id content user_id id name +1 1 1 1 Hello! 1 1 Alice +DROP TABLE users, posts, comments; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_version_100_no_such_key.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_version_100_no_such_key.result new file mode 100644 index 00000000000..d3ac2387586 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_version_100_no_such_key.result @@ -0,0 +1,25 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +body TEXT, +FULLTEXT INDEX title_index (title), +FULLTEXT INDEX body_index (body) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `body` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `title_index` (`title`), + FULLTEXT KEY `body_index` (`body`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); +INSERT INTO diaries (title, body) VALUES ("groonga (1)", "starting groonga..."); +INSERT INTO diaries (title, body) VALUES ("groonga (2)", "started groonga."); +SELECT * FROM diaries FORCE INDEX(primary) +WHERE MATCH(title) AGAINST("survey" IN BOOLEAN MODE); +ERROR HY000: Can't find FULLTEXT index matching the column list +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_version_55_no_such_key.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_version_55_no_such_key.result new file mode 100644 index 00000000000..5f7bc98a3d3 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_version_55_no_such_key.result @@ -0,0 +1,25 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +body TEXT, +FULLTEXT INDEX title_index (title), +FULLTEXT INDEX body_index (body) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `body` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `title_index` (`title`), + FULLTEXT KEY `body_index` (`body`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); +INSERT INTO diaries (title, body) VALUES ("groonga (1)", "starting groonga..."); +INSERT INTO diaries (title, body) VALUES ("groonga (2)", "started groonga."); +SELECT * FROM diaries FORCE INDEX(primary) +WHERE MATCH(title) AGAINST("survey" IN BOOLEAN MODE); +id title body +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_version_56_no_such_key.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_version_56_no_such_key.result new file mode 100644 index 00000000000..d3ac2387586 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_version_56_no_such_key.result @@ -0,0 +1,25 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +body TEXT, +FULLTEXT INDEX title_index (title), +FULLTEXT INDEX body_index (body) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `body` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `title_index` (`title`), + FULLTEXT KEY `body_index` (`body`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); +INSERT INTO diaries (title, body) VALUES ("groonga (1)", "starting groonga..."); +INSERT INTO diaries (title, body) VALUES ("groonga (2)", "started groonga."); +SELECT * FROM diaries FORCE INDEX(primary) +WHERE MATCH(title) AGAINST("survey" IN BOOLEAN MODE); +ERROR HY000: Can't find FULLTEXT index matching the column list +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_command_select.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_command_select.result new file mode 100644 index 00000000000..1551d32c971 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_command_select.result @@ -0,0 +1,13 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES UTF8; +CREATE TABLE diaries( +title TEXT, +FULLTEXT KEY (title) +) DEFAULT CHARSET=utf8; +INSERT INTO diaries VALUES("Start groonga"); +INSERT INTO diaries VALUES("Start mroonga"); +INSERT INTO diaries VALUES("Start groonga and Ruby"); +SELECT mroonga_command('select diaries --match_columns "title" --query "groonga"'); +mroonga_command('select diaries --match_columns "title" --query "groonga"') +[[[2],[["_id","UInt32"],["title","LongText"]],[1,"Start groonga"],[3,"Start groonga and Ruby"]]] +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_error_query_is_missing.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_error_query_is_missing.result new file mode 100644 index 00000000000..98213e81eb9 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_error_query_is_missing.result @@ -0,0 +1,3 @@ +SET NAMES UTF8; +SELECT mroonga_escape() AS escaped_query; +ERROR HY000: Can't initialize function 'mroonga_escape'; mroonga_escape(): Incorrect number of arguments: 0 for 1..2 diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_error_query_is_not_string.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_error_query_is_not_string.result new file mode 100644 index 00000000000..c1762458199 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_error_query_is_not_string.result @@ -0,0 +1,3 @@ +SET NAMES UTF8; +SELECT mroonga_escape(29) AS escaped_query; +ERROR HY000: Can't initialize function 'mroonga_escape'; mroonga_escape(): The 1st argument must be query as string diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_error_target_characters_is_not_string.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_error_target_characters_is_not_string.result new file mode 100644 index 00000000000..77dc420f0c5 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_error_target_characters_is_not_string.result @@ -0,0 +1,3 @@ +SET NAMES UTF8; +SELECT mroonga_escape('+-><~*()\"\\:', 29) AS escaped_query; +ERROR HY000: Can't initialize function 'mroonga_escape'; mroonga_escape(): The 2st argument must be escape target characters as string diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_success_all.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_success_all.result new file mode 100644 index 00000000000..b002262a83f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_success_all.result @@ -0,0 +1,4 @@ +SET NAMES UTF8; +SELECT mroonga_escape('+-><~*()\"\\:') AS escaped_query; +escaped_query +\+\-\>\<\~\*\(\)\"\\\: diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_success_custom.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_success_custom.result new file mode 100644 index 00000000000..c2e7d8f50ef --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_success_custom.result @@ -0,0 +1,4 @@ +SET NAMES UTF8; +SELECT mroonga_escape('+-><~*()\"\\:', '()<>~') AS escaped_query; +escaped_query ++-\>\<\~*\(\)"\: diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_success_nested.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_success_nested.result new file mode 100644 index 00000000000..5a57c144891 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_success_nested.result @@ -0,0 +1,13 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES UTF8; +CREATE TABLE diaries( +title TEXT, +FULLTEXT KEY (title) +) DEFAULT CHARSET=utf8; +INSERT INTO diaries VALUES("Start groonga"); +INSERT INTO diaries VALUES("Start mroonga"); +INSERT INTO diaries VALUES("Start groonga and Ruby"); +SELECT mroonga_escape(mroonga_escape('*groonga*')); +mroonga_escape(mroonga_escape('*groonga*')) +\\\*groonga\\\* +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_last_insert_grn_id.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_last_insert_grn_id.result new file mode 100644 index 00000000000..42064b7f189 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_last_insert_grn_id.result @@ -0,0 +1,28 @@ +drop table if exists t1, t2, t3; +create table t1 (_id int, c1 int); +select last_insert_grn_id(); +last_insert_grn_id() +0 +insert into t1 values(null,100); +insert into t1 values(null,100); +select last_insert_grn_id(); +last_insert_grn_id() +2 +insert into t1 values(null,100); +insert into t1 values(null,100); +select last_insert_grn_id(); +last_insert_grn_id() +4 +insert into t1 values(null,100); +insert into t1 values(null,100); +select last_insert_grn_id(); +last_insert_grn_id() +6 +insert into t1 values(null,100); +insert into t1 values(null,100); +select last_insert_grn_id(); +last_insert_grn_id() +8 +select last_insert_grn_id(1); +ERROR HY000: Can't initialize function 'last_insert_grn_id'; last_insert_grn_id must not have arguments +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_last_insert_id_reference.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_last_insert_id_reference.result new file mode 100644 index 00000000000..b0db86cb5ec --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_last_insert_id_reference.result @@ -0,0 +1,15 @@ +DROP TABLE IF EXISTS ids; +CREATE TABLE ids ( +id int AUTO_INCREMENT PRIMARY KEY +); +SELECT last_insert_id(); +last_insert_id() +0 +INSERT INTO ids VALUES(); +SELECT last_insert_id(); +last_insert_id() +1 +SELECT * FROM ids; +id +1 +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_last_insert_id_set.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_last_insert_id_set.result new file mode 100644 index 00000000000..ec6f2f98462 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_last_insert_id_set.result @@ -0,0 +1,21 @@ +DROP TABLE IF EXISTS ids; +CREATE TABLE ids ( +id int AUTO_INCREMENT PRIMARY KEY +); +SELECT last_insert_id(); +last_insert_id() +0 +SELECT last_insert_id(10); +last_insert_id(10) +10 +SELECT last_insert_id(); +last_insert_id() +10 +INSERT INTO ids VALUES(); +SELECT last_insert_id(); +last_insert_id() +1 +SELECT * FROM ids; +id +1 +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_ascii.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_ascii.result new file mode 100644 index 00000000000..5766f822ee3 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_ascii.result @@ -0,0 +1,120 @@ +drop table if exists t1, t2, t3; +create table t1 (c1 int primary key, c2 int, c3 text, fulltext index ft(c3)); +insert into t1 values(1,10,"aa bb cc dd ee >< ff gg hh ii jj kk ll mm nn"); +insert into t1 values(2,20,"nn mm ll kk jj >< ii hh gg ff ee dd cc bb aa"); +insert into t1 values(3,30,"cc dd ee ff gg >< hh ii jj kk ll mm nn oo pp"); +insert into t1 values(4,40,"ee ff gg hh ii >< jj kk ll mm nn oo pp qq rr"); +insert into t1 values(5,50,"AA BB CC DD EE >< FF GG HH II JJ KK LL MM NN"); +select c1, c2, mroonga_snippet(c3, 10, 2, 'ascii_general_ci', 0, 1, '...', '...<br>\n', 'bb', '<span class="w1">', '</span>', 'ff', '<span class="w2">', '</span>', 'dd', '<span class="w3">', '</span>') from t1; +c1 c2 mroonga_snippet(c3, 10, 2, 'ascii_general_ci', 0, 1, '...', '...<br>\n', 'bb', '<span class="w1">', '</span>', 'ff', '<span class="w2">', '</span>', 'dd', '<span class="w3">', '</span>') +1 10 ...a<span class="w1"> bb</span> cc<span class="w3"> dd</span>...<br> +...e ><<span class="w2"> ff</span> gg...<br> + +2 20 ...g<span class="w2"> ff</span> ee<span class="w3"> dd</span>...<br> +... cc<span class="w1"> bb</span> aa...<br> + +3 30 ...c<span class="w3"> dd</span> ee<span class="w2"> ff</span>...<br> + +4 40 ...ee<span class="w2"> ff</span> gg h...<br> + +5 50 ...A<span class="w1"> BB</span> CC<span class="w3"> DD</span>...<br> +...E ><<span class="w2"> FF</span> GG...<br> + +select c1, c2, mroonga_snippet(c3, 10, 2, 'ascii_bin', 0, 1, '...', '...<br>\n', 'bb', '<span class="w1">', '</span>', 'ff', '<span class="w2">', '</span>', 'dd', '<span class="w3">', '</span>') from t1; +c1 c2 mroonga_snippet(c3, 10, 2, 'ascii_bin', 0, 1, '...', '...<br>\n', 'bb', '<span class="w1">', '</span>', 'ff', '<span class="w2">', '</span>', 'dd', '<span class="w3">', '</span>') +1 10 ... <span class="w1">bb</span> cc <span class="w3">dd</span> ...<br> +... >< <span class="w2">ff</span> gg ...<br> + +2 20 ... <span class="w2">ff</span> ee <span class="w3">dd</span> ...<br> +...cc <span class="w1">bb</span> aa...<br> + +3 30 ... <span class="w3">dd</span> ee <span class="w2">ff</span> ...<br> + +4 40 ...ee <span class="w2">ff</span> gg h...<br> + +5 50 +select c1, c2, mroonga_snippet(c3, 10, 2, 'ascii_general_ci', 1, 1, '...', '...<br>\n', 'bb', '<span class="w1">', '</span>', 'ff', '<span class="w2">', '</span>', 'dd', '<span class="w3">', '</span>') from t1; +c1 c2 mroonga_snippet(c3, 10, 2, 'ascii_general_ci', 1, 1, '...', '...<br>\n', 'bb', '<span class="w1">', '</span>', 'ff', '<span class="w2">', '</span>', 'dd', '<span class="w3">', '</span>') +1 10 ... <span class="w1">bb</span> cc <span class="w3">dd</span> ...<br> +... >< <span class="w2">ff</span> gg ...<br> + +2 20 ... <span class="w2">ff</span> ee <span class="w3">dd</span> ...<br> +...cc <span class="w1">bb</span> aa...<br> + +3 30 ... <span class="w3">dd</span> ee <span class="w2">ff</span> ...<br> + +4 40 ...ee <span class="w2">ff</span> gg h...<br> + +5 50 ... <span class="w1">BB</span> CC <span class="w3">DD</span> ...<br> +... >< <span class="w2">FF</span> GG ...<br> + +select c1, c2, mroonga_snippet(c3, 10, 2, 'ascii_bin', 1, 1, '...', '...<br>\n', 'bb', '<span class="w1">', '</span>', 'ff', '<span class="w2">', '</span>', 'dd', '<span class="w3">', '</span>') from t1; +c1 c2 mroonga_snippet(c3, 10, 2, 'ascii_bin', 1, 1, '...', '...<br>\n', 'bb', '<span class="w1">', '</span>', 'ff', '<span class="w2">', '</span>', 'dd', '<span class="w3">', '</span>') +1 10 ... <span class="w1">bb</span> cc <span class="w3">dd</span> ...<br> +... >< <span class="w2">ff</span> gg ...<br> + +2 20 ... <span class="w2">ff</span> ee <span class="w3">dd</span> ...<br> +...cc <span class="w1">bb</span> aa...<br> + +3 30 ... <span class="w3">dd</span> ee <span class="w2">ff</span> ...<br> + +4 40 ...ee <span class="w2">ff</span> gg h...<br> + +5 50 +select c1, c2, mroonga_snippet(c3, 10, 2, 'ascii_general_ci', 0, 0, '...', '...\n', 'bb', '(w1)[', ']', 'ff', '(w2)[', ']', 'dd', '(w3)[', ']') from t1; +c1 c2 mroonga_snippet(c3, 10, 2, 'ascii_general_ci', 0, 0, '...', '...\n', 'bb', '(w1)[', ']', 'ff', '(w2)[', ']', 'dd', '(w3)[', ']') +1 10 ...a(w1)[ bb] cc(w3)[ dd]... +...e ><(w2)[ ff] gg... + +2 20 ...g(w2)[ ff] ee(w3)[ dd]... +... cc(w1)[ bb] aa... + +3 30 ...c(w3)[ dd] ee(w2)[ ff]... + +4 40 ...ee(w2)[ ff] gg h... + +5 50 ...A(w1)[ BB] CC(w3)[ DD]... +...E ><(w2)[ FF] GG... + +select c1, c2, mroonga_snippet(c3, 10, 2, 'ascii_bin', 0, 0, '...', '...\n', 'bb', '(w1)[', ']', 'ff', '(w2)[', ']', 'dd', '(w3)[', ']') from t1; +c1 c2 mroonga_snippet(c3, 10, 2, 'ascii_bin', 0, 0, '...', '...\n', 'bb', '(w1)[', ']', 'ff', '(w2)[', ']', 'dd', '(w3)[', ']') +1 10 ... (w1)[bb] cc (w3)[dd] ... +... >< (w2)[ff] gg ... + +2 20 ... (w2)[ff] ee (w3)[dd] ... +...cc (w1)[bb] aa... + +3 30 ... (w3)[dd] ee (w2)[ff] ... + +4 40 ...ee (w2)[ff] gg h... + +5 50 +select c1, c2, mroonga_snippet(c3, 10, 2, 'ascii_general_ci', 1, 0, '...', '...\n', 'bb', '(w1)[', ']', 'ff', '(w2)[', ']', 'dd', '(w3)[', ']') from t1; +c1 c2 mroonga_snippet(c3, 10, 2, 'ascii_general_ci', 1, 0, '...', '...\n', 'bb', '(w1)[', ']', 'ff', '(w2)[', ']', 'dd', '(w3)[', ']') +1 10 ... (w1)[bb] cc (w3)[dd] ... +... >< (w2)[ff] gg ... + +2 20 ... (w2)[ff] ee (w3)[dd] ... +...cc (w1)[bb] aa... + +3 30 ... (w3)[dd] ee (w2)[ff] ... + +4 40 ...ee (w2)[ff] gg h... + +5 50 ... (w1)[BB] CC (w3)[DD] ... +... >< (w2)[FF] GG ... + +select c1, c2, mroonga_snippet(c3, 10, 2, 'ascii_bin', 1, 0, '...', '...\n', 'bb', '(w1)[', ']', 'ff', '(w2)[', ']', 'dd', '(w3)[', ']') from t1; +c1 c2 mroonga_snippet(c3, 10, 2, 'ascii_bin', 1, 0, '...', '...\n', 'bb', '(w1)[', ']', 'ff', '(w2)[', ']', 'dd', '(w3)[', ']') +1 10 ... (w1)[bb] cc (w3)[dd] ... +... >< (w2)[ff] gg ... + +2 20 ... (w2)[ff] ee (w3)[dd] ... +...cc (w1)[bb] aa... + +3 30 ... (w3)[dd] ee (w2)[ff] ... + +4 40 ...ee (w2)[ff] gg h... + +5 50 +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_cp932.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_cp932.result new file mode 100644 index 00000000000..a21157a0a18 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_cp932.result @@ -0,0 +1,91 @@ +drop table if exists t1, t2, t3; +set names cp932; +create table t1 (c1 int primary key, c2 varchar(255), c3 text, fulltext index(c2), fulltext index(c3)) default charset cp932; +insert into t1 values(1, "","QX̕xmR̓VCɂ"); +insert into t1 values(2, "","QX̕xmR̓VC͕܂"); +insert into t1 values(3, "","29̕xmR̓VCɂ"); +select c1, c2, mroonga_snippet(c3, 10, 2, 'cp932_japanese_ci', 0, 1, '...', '...<br>\n', 'QX', '<span class="w1">', '</span>', 'VC', '<span class="w2">', '</span>', 'xmR', '<span class="w3">', '</span>') from t1; +c1 c2 mroonga_snippet(c3, 10, 2, 'cp932_japanese_ci', 0, 1, '...', '...<br>\n', 'QX', '<span class="w1">', '</span>', 'VC', '<span class="w2">', '</span>', 'xmR', '<span class="w3">', '</span>') +1 ...<span class="w1">QX</span>̕x...<br> +...<span class="w2">VC</span>ɂ...<br> + +2 ...<span class="w1">QX</span>̕x...<br> +...<span class="w2">VC</span>͕...<br> + +3 ...<span class="w1">29</span>̕xm...<br> +...<span class="w2">VC</span>ɂ...<br> + +select c1, c2, mroonga_snippet(c3, 10, 2, 'cp932_bin', 0, 1, '...', '...<br>\n', 'QX', '<span class="w1">', '</span>', 'VC', '<span class="w2">', '</span>', 'xmR', '<span class="w3">', '</span>') from t1; +c1 c2 mroonga_snippet(c3, 10, 2, 'cp932_bin', 0, 1, '...', '...<br>\n', 'QX', '<span class="w1">', '</span>', 'VC', '<span class="w2">', '</span>', 'xmR', '<span class="w3">', '</span>') +1 ...<span class="w1">QX</span>̕x...<br> +...<span class="w2">VC</span>ɂ...<br> + +2 ...<span class="w1">QX</span>̕x...<br> +...<span class="w2">VC</span>͕...<br> + +3 ...<span class="w3">xmR</span>...<br> + +select c1, c2, mroonga_snippet(c3, 10, 2, 'cp932_japanese_ci', 1, 1, '...', '...<br>\n', 'QX', '<span class="w1">', '</span>', 'VC', '<span class="w2">', '</span>', 'xmR', '<span class="w3">', '</span>') from t1; +c1 c2 mroonga_snippet(c3, 10, 2, 'cp932_japanese_ci', 1, 1, '...', '...<br>\n', 'QX', '<span class="w1">', '</span>', 'VC', '<span class="w2">', '</span>', 'xmR', '<span class="w3">', '</span>') +1 ...<span class="w1">QX</span>̕x...<br> +...<span class="w2">VC</span>ɂ...<br> + +2 ...<span class="w1">QX</span>̕x...<br> +...<span class="w2">VC</span>͕...<br> + +3 ...<span class="w1">29</span>̕xm...<br> +...<span class="w2">VC</span>ɂ...<br> + +select c1, c2, mroonga_snippet(c3, 10, 2, 'cp932_bin', 1, 1, '...', '...<br>\n', 'QX', '<span class="w1">', '</span>', 'VC', '<span class="w2">', '</span>', 'xmR', '<span class="w3">', '</span>') from t1; +c1 c2 mroonga_snippet(c3, 10, 2, 'cp932_bin', 1, 1, '...', '...<br>\n', 'QX', '<span class="w1">', '</span>', 'VC', '<span class="w2">', '</span>', 'xmR', '<span class="w3">', '</span>') +1 ...<span class="w1">QX</span>̕x...<br> +...<span class="w2">VC</span>ɂ...<br> + +2 ...<span class="w1">QX</span>̕x...<br> +...<span class="w2">VC</span>͕...<br> + +3 ...<span class="w3">xmR</span>...<br> + +select c1, c2, mroonga_snippet(c3, 10, 2, 'cp932_japanese_ci', 0, 0, '...', '...\n', 'QX', '(w1)[', ']', 'VC', '(w2)[', ']', 'xmR', '(w3)[', ']') from t1; +c1 c2 mroonga_snippet(c3, 10, 2, 'cp932_japanese_ci', 0, 0, '...', '...\n', 'QX', '(w1)[', ']', 'VC', '(w2)[', ']', 'xmR', '(w3)[', ']') +1 ...(w1)[QX]̕x... +...(w2)[VC]ɂ... + +2 ...(w1)[QX]̕x... +...(w2)[VC]͕... + +3 ...(w1)[29]̕xm... +...(w2)[VC]ɂ... + +select c1, c2, mroonga_snippet(c3, 10, 2, 'cp932_bin', 0, 0, '...', '...\n', 'QX', '(w1)[', ']', 'VC', '(w2)[', ']', 'xmR', '(w3)[', ']') from t1; +c1 c2 mroonga_snippet(c3, 10, 2, 'cp932_bin', 0, 0, '...', '...\n', 'QX', '(w1)[', ']', 'VC', '(w2)[', ']', 'xmR', '(w3)[', ']') +1 ...(w1)[QX]̕x... +...(w2)[VC]ɂ... + +2 ...(w1)[QX]̕x... +...(w2)[VC]͕... + +3 ...(w3)[xmR]... + +select c1, c2, mroonga_snippet(c3, 10, 2, 'cp932_japanese_ci', 1, 0, '...', '...\n', 'QX', '(w1)[', ']', 'VC', '(w2)[', ']', 'xmR', '(w3)[', ']') from t1; +c1 c2 mroonga_snippet(c3, 10, 2, 'cp932_japanese_ci', 1, 0, '...', '...\n', 'QX', '(w1)[', ']', 'VC', '(w2)[', ']', 'xmR', '(w3)[', ']') +1 ...(w1)[QX]̕x... +...(w2)[VC]ɂ... + +2 ...(w1)[QX]̕x... +...(w2)[VC]͕... + +3 ...(w1)[29]̕xm... +...(w2)[VC]ɂ... + +select c1, c2, mroonga_snippet(c3, 10, 2, 'cp932_bin', 1, 0, '...', '...\n', 'QX', '(w1)[', ']', 'VC', '(w2)[', ']', 'xmR', '(w3)[', ']') from t1; +c1 c2 mroonga_snippet(c3, 10, 2, 'cp932_bin', 1, 0, '...', '...\n', 'QX', '(w1)[', ']', 'VC', '(w2)[', ']', 'xmR', '(w3)[', ']') +1 ...(w1)[QX]̕x... +...(w2)[VC]ɂ... + +2 ...(w1)[QX]̕x... +...(w2)[VC]͕... + +3 ...(w3)[xmR]... + +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_eucjpms.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_eucjpms.result new file mode 100644 index 00000000000..e4c6a41773e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_eucjpms.result @@ -0,0 +1,91 @@ +drop table if exists t1, t2, t3; +set names eucjpms; +create table t1 (c1 int primary key, c2 varchar(255), c3 text, fulltext index(c2), fulltext index(c3)) default charset eucjpms; +insert into t1 values(1, "","ٻλŷˤĤ"); +insert into t1 values(2, "","ٻλŷʬޤ"); +insert into t1 values(3, "","29ٻλŷˤĤ"); +select c1, c2, mroonga_snippet(c3, 10, 2, 'eucjpms_japanese_ci', 0, 1, '...', '...<br>\n', '', '<span class="w1">', '</span>', 'ŷ', '<span class="w2">', '</span>', 'ٻλ', '<span class="w3">', '</span>') from t1; +c1 c2 mroonga_snippet(c3, 10, 2, 'eucjpms_japanese_ci', 0, 1, '...', '...<br>\n', '', '<span class="w1">', '</span>', 'ŷ', '<span class="w2">', '</span>', 'ٻλ', '<span class="w3">', '</span>') +1 ...<span class="w1"></span>...<br> +...<span class="w2">ŷ</span>ˤ...<br> + +2 ...<span class="w1"></span>...<br> +...<span class="w2">ŷ</span>ʬ...<br> + +3 ...<span class="w1">29</span>ٻ...<br> +...<span class="w2">ŷ</span>ˤ...<br> + +select c1, c2, mroonga_snippet(c3, 10, 2, 'eucjpms_bin', 0, 1, '...', '...<br>\n', '', '<span class="w1">', '</span>', 'ŷ', '<span class="w2">', '</span>', 'ٻλ', '<span class="w3">', '</span>') from t1; +c1 c2 mroonga_snippet(c3, 10, 2, 'eucjpms_bin', 0, 1, '...', '...<br>\n', '', '<span class="w1">', '</span>', 'ŷ', '<span class="w2">', '</span>', 'ٻλ', '<span class="w3">', '</span>') +1 ...<span class="w1"></span>...<br> +...<span class="w2">ŷ</span>ˤ...<br> + +2 ...<span class="w1"></span>...<br> +...<span class="w2">ŷ</span>ʬ...<br> + +3 ...<span class="w3">ٻλ</span>...<br> + +select c1, c2, mroonga_snippet(c3, 10, 2, 'eucjpms_japanese_ci', 1, 1, '...', '...<br>\n', '', '<span class="w1">', '</span>', 'ŷ', '<span class="w2">', '</span>', 'ٻλ', '<span class="w3">', '</span>') from t1; +c1 c2 mroonga_snippet(c3, 10, 2, 'eucjpms_japanese_ci', 1, 1, '...', '...<br>\n', '', '<span class="w1">', '</span>', 'ŷ', '<span class="w2">', '</span>', 'ٻλ', '<span class="w3">', '</span>') +1 ...<span class="w1"></span>...<br> +...<span class="w2">ŷ</span>ˤ...<br> + +2 ...<span class="w1"></span>...<br> +...<span class="w2">ŷ</span>ʬ...<br> + +3 ...<span class="w1">29</span>ٻ...<br> +...<span class="w2">ŷ</span>ˤ...<br> + +select c1, c2, mroonga_snippet(c3, 10, 2, 'eucjpms_bin', 1, 1, '...', '...<br>\n', '', '<span class="w1">', '</span>', 'ŷ', '<span class="w2">', '</span>', 'ٻλ', '<span class="w3">', '</span>') from t1; +c1 c2 mroonga_snippet(c3, 10, 2, 'eucjpms_bin', 1, 1, '...', '...<br>\n', '', '<span class="w1">', '</span>', 'ŷ', '<span class="w2">', '</span>', 'ٻλ', '<span class="w3">', '</span>') +1 ...<span class="w1"></span>...<br> +...<span class="w2">ŷ</span>ˤ...<br> + +2 ...<span class="w1"></span>...<br> +...<span class="w2">ŷ</span>ʬ...<br> + +3 ...<span class="w3">ٻλ</span>...<br> + +select c1, c2, mroonga_snippet(c3, 10, 2, 'eucjpms_japanese_ci', 0, 0, '...', '...\n', '', '(w1)[', ']', 'ŷ', '(w2)[', ']', 'ٻλ', '(w3)[', ']') from t1; +c1 c2 mroonga_snippet(c3, 10, 2, 'eucjpms_japanese_ci', 0, 0, '...', '...\n', '', '(w1)[', ']', 'ŷ', '(w2)[', ']', 'ٻλ', '(w3)[', ']') +1 ...(w1)[]... +...(w2)[ŷ]ˤ... + +2 ...(w1)[]... +...(w2)[ŷ]ʬ... + +3 ...(w1)[29]ٻ... +...(w2)[ŷ]ˤ... + +select c1, c2, mroonga_snippet(c3, 10, 2, 'eucjpms_bin', 0, 0, '...', '...\n', '', '(w1)[', ']', 'ŷ', '(w2)[', ']', 'ٻλ', '(w3)[', ']') from t1; +c1 c2 mroonga_snippet(c3, 10, 2, 'eucjpms_bin', 0, 0, '...', '...\n', '', '(w1)[', ']', 'ŷ', '(w2)[', ']', 'ٻλ', '(w3)[', ']') +1 ...(w1)[]... +...(w2)[ŷ]ˤ... + +2 ...(w1)[]... +...(w2)[ŷ]ʬ... + +3 ...(w3)[ٻλ]... + +select c1, c2, mroonga_snippet(c3, 10, 2, 'eucjpms_japanese_ci', 1, 0, '...', '...\n', '', '(w1)[', ']', 'ŷ', '(w2)[', ']', 'ٻλ', '(w3)[', ']') from t1; +c1 c2 mroonga_snippet(c3, 10, 2, 'eucjpms_japanese_ci', 1, 0, '...', '...\n', '', '(w1)[', ']', 'ŷ', '(w2)[', ']', 'ٻλ', '(w3)[', ']') +1 ...(w1)[]... +...(w2)[ŷ]ˤ... + +2 ...(w1)[]... +...(w2)[ŷ]ʬ... + +3 ...(w1)[29]ٻ... +...(w2)[ŷ]ˤ... + +select c1, c2, mroonga_snippet(c3, 10, 2, 'eucjpms_bin', 1, 0, '...', '...\n', '', '(w1)[', ']', 'ŷ', '(w2)[', ']', 'ٻλ', '(w3)[', ']') from t1; +c1 c2 mroonga_snippet(c3, 10, 2, 'eucjpms_bin', 1, 0, '...', '...\n', '', '(w1)[', ']', 'ŷ', '(w2)[', ']', 'ٻλ', '(w3)[', ']') +1 ...(w1)[]... +...(w2)[ŷ]ˤ... + +2 ...(w1)[]... +...(w2)[ŷ]ʬ... + +3 ...(w3)[ٻλ]... + +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_invalid_nonexistent_charset.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_invalid_nonexistent_charset.result new file mode 100644 index 00000000000..78cee62696f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_invalid_nonexistent_charset.result @@ -0,0 +1,4 @@ +SET NAMES UTF8; +SELECT mroonga_snippet("Invalid charset test", 10, 2, "nonexistent_charset", +1, 0, "...", "...", "charset", "<", ">"); +ERROR HY000: Can't initialize function 'mroonga_snippet'; Unknown charset: <nonexistent_charset> diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_invalid_unsupported_charset.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_invalid_unsupported_charset.result new file mode 100644 index 00000000000..bf967adbf46 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_invalid_unsupported_charset.result @@ -0,0 +1,4 @@ +SET NAMES UTF8; +SELECT mroonga_snippet("Unsuppported charset test", 10, 2, "big5", +1, 0, "...", "...", "charset", "<", ">"); +ERROR HY000: Can't initialize function 'mroonga_snippet'; Unknown charset: <big5> diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_japanese.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_japanese.result new file mode 100644 index 00000000000..05a63a3d597 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_japanese.result @@ -0,0 +1,95 @@ +drop table if exists t1, t2, t3; +set names utf8; +create table t1 (c1 int primary key, c2 varchar(255), c3 text, fulltext index(c2), fulltext index(c3)) default charset utf8; +insert into t1 values(1, "あああああ","29日の富士山の天気について"); +insert into t1 values(2, "いいいいい","29日の富士山の天気は分かりません"); +insert into t1 values(3, "ううううう","29日の富士山の天気について"); +select c1, c2, mroonga_snippet(c3, 10, 2, 'utf8_general_ci', 0, 1, '...', '...<br>\n', '29日', '<span class="w1">', '</span>', '天気', '<span class="w2">', '</span>', '富士山', '<span class="w3">', '</span>') from t1; +c1 c2 mroonga_snippet(c3, 10, 2, 'utf8_general_ci', 0, 1, '...', '...<br>\n', '29日', '<span class="w1">', '</span>', '天気', '<span class="w2">', '</span>', '富士山', '<span class="w3">', '</span>') +1 あああああ ...<span class="w1">29日</span>...<br> +...<span class="w3">富士山</span>...<br> + +2 いいいいい ...<span class="w1">29日</span>...<br> +...<span class="w3">富士山</span>...<br> + +3 ううううう ...<span class="w1">29日</span>の...<br> +...<span class="w2">天気</span>に...<br> + +select c1, c2, mroonga_snippet(c3, 10, 2, 'utf8_bin', 0, 1, '...', '...<br>\n', '29日', '<span class="w1">', '</span>', '天気', '<span class="w2">', '</span>', '富士山', '<span class="w3">', '</span>') from t1; +c1 c2 mroonga_snippet(c3, 10, 2, 'utf8_bin', 0, 1, '...', '...<br>\n', '29日', '<span class="w1">', '</span>', '天気', '<span class="w2">', '</span>', '富士山', '<span class="w3">', '</span>') +1 あああああ ...<span class="w1">29日</span>...<br> +...<span class="w3">富士山</span>...<br> + +2 いいいいい ...<span class="w1">29日</span>...<br> +...<span class="w3">富士山</span>...<br> + +3 ううううう ...<span class="w3">富士山</span>...<br> +...<span class="w2">天気</span>に...<br> + +select c1, c2, mroonga_snippet(c3, 10, 2, 'utf8_general_ci', 1, 1, '...', '...<br>\n', '29日', '<span class="w1">', '</span>', '天気', '<span class="w2">', '</span>', '富士山', '<span class="w3">', '</span>') from t1; +c1 c2 mroonga_snippet(c3, 10, 2, 'utf8_general_ci', 1, 1, '...', '...<br>\n', '29日', '<span class="w1">', '</span>', '天気', '<span class="w2">', '</span>', '富士山', '<span class="w3">', '</span>') +1 あああああ ...<span class="w1">29日</span>...<br> +...<span class="w3">富士山</span>...<br> + +2 いいいいい ...<span class="w1">29日</span>...<br> +...<span class="w3">富士山</span>...<br> + +3 ううううう ...<span class="w1">29日</span>の...<br> +...<span class="w2">天気</span>に...<br> + +select c1, c2, mroonga_snippet(c3, 10, 2, 'utf8_bin', 1, 1, '...', '...<br>\n', '29日', '<span class="w1">', '</span>', '天気', '<span class="w2">', '</span>', '富士山', '<span class="w3">', '</span>') from t1; +c1 c2 mroonga_snippet(c3, 10, 2, 'utf8_bin', 1, 1, '...', '...<br>\n', '29日', '<span class="w1">', '</span>', '天気', '<span class="w2">', '</span>', '富士山', '<span class="w3">', '</span>') +1 あああああ ...<span class="w1">29日</span>...<br> +...<span class="w3">富士山</span>...<br> + +2 いいいいい ...<span class="w1">29日</span>...<br> +...<span class="w3">富士山</span>...<br> + +3 ううううう ...<span class="w3">富士山</span>...<br> +...<span class="w2">天気</span>に...<br> + +select c1, c2, mroonga_snippet(c3, 10, 2, 'utf8_general_ci', 0, 0, '...', '...\n', '29日', '(w1)[', ']', '天気', '(w2)[', ']', '富士山', '(w3)[', ']') from t1; +c1 c2 mroonga_snippet(c3, 10, 2, 'utf8_general_ci', 0, 0, '...', '...\n', '29日', '(w1)[', ']', '天気', '(w2)[', ']', '富士山', '(w3)[', ']') +1 あああああ ...(w1)[29日]... +...(w3)[富士山]... + +2 いいいいい ...(w1)[29日]... +...(w3)[富士山]... + +3 ううううう ...(w1)[29日]の... +...(w2)[天気]に... + +select c1, c2, mroonga_snippet(c3, 10, 2, 'utf8_bin', 0, 0, '...', '...\n', '29日', '(w1)[', ']', '天気', '(w2)[', ']', '富士山', '(w3)[', ']') from t1; +c1 c2 mroonga_snippet(c3, 10, 2, 'utf8_bin', 0, 0, '...', '...\n', '29日', '(w1)[', ']', '天気', '(w2)[', ']', '富士山', '(w3)[', ']') +1 あああああ ...(w1)[29日]... +...(w3)[富士山]... + +2 いいいいい ...(w1)[29日]... +...(w3)[富士山]... + +3 ううううう ...(w3)[富士山]... +...(w2)[天気]に... + +select c1, c2, mroonga_snippet(c3, 10, 2, 'utf8_general_ci', 1, 0, '...', '...\n', '29日', '(w1)[', ']', '天気', '(w2)[', ']', '富士山', '(w3)[', ']') from t1; +c1 c2 mroonga_snippet(c3, 10, 2, 'utf8_general_ci', 1, 0, '...', '...\n', '29日', '(w1)[', ']', '天気', '(w2)[', ']', '富士山', '(w3)[', ']') +1 あああああ ...(w1)[29日]... +...(w3)[富士山]... + +2 いいいいい ...(w1)[29日]... +...(w3)[富士山]... + +3 ううううう ...(w1)[29日]の... +...(w2)[天気]に... + +select c1, c2, mroonga_snippet(c3, 10, 2, 'utf8_bin', 1, 0, '...', '...\n', '29日', '(w1)[', ']', '天気', '(w2)[', ']', '富士山', '(w3)[', ']') from t1; +c1 c2 mroonga_snippet(c3, 10, 2, 'utf8_bin', 1, 0, '...', '...\n', '29日', '(w1)[', ']', '天気', '(w2)[', ']', '富士山', '(w3)[', ']') +1 あああああ ...(w1)[29日]... +...(w3)[富士山]... + +2 いいいいい ...(w1)[29日]... +...(w3)[富士山]... + +3 ううううう ...(w3)[富士山]... +...(w2)[天気]に... + +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/geometry_bulk_insert_null.result b/storage/mroonga/mysql-test/mroonga/storage/r/geometry_bulk_insert_null.result new file mode 100644 index 00000000000..2e9314db109 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/geometry_bulk_insert_null.result @@ -0,0 +1,13 @@ +DROP TABLE IF EXISTS shops; +CREATE TABLE shops ( +location GEOMETRY NOT NULL +); +INSERT INTO shops VALUES (NULL), (NULL); +Warnings: +Warning 1048 Column 'location' cannot be null +Warning 1048 Column 'location' cannot be null +SELECT AsText(location) FROM shops; +AsText(location) +POINT(0 0) +POINT(0 0) +DROP TABLE shops; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/geometry_contains.result b/storage/mroonga/mysql-test/mroonga/storage/r/geometry_contains.result new file mode 100644 index 00000000000..e88402a10b4 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/geometry_contains.result @@ -0,0 +1,170 @@ +DROP TABLE IF EXISTS shops; +CREATE TABLE shops ( +id INT PRIMARY KEY AUTO_INCREMENT, +name TEXT, +location GEOMETRY NOT NULL, +SPATIAL KEY location_index (location) +); +SHOW CREATE TABLE shops; +Table Create Table +shops CREATE TABLE `shops` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` text, + `location` geometry NOT NULL, + PRIMARY KEY (`id`), + SPATIAL KEY `location_index` (`location`) +) ENGINE=Mroonga DEFAULT CHARSET=latin1 +INSERT INTO shops (name, location) +VALUES ('nezu-no-taiyaki', +GeomFromText('POINT(139.762573 35.720253)')); +INSERT INTO shops (name, location) +VALUES ('taiyaki-kataoka', +GeomFromText('POINT(139.715591 35.712521)')); +INSERT INTO shops (name, location) +VALUES ('soba-taiyaki-ku', +GeomFromText('POINT(139.659088 35.683712)')); +INSERT INTO shops (name, location) +VALUES ('kuruma', +GeomFromText('POINT(139.706207 35.721516)')); +INSERT INTO shops (name, location) +VALUES ('hirose-ya', +GeomFromText('POINT(139.685608 35.714844)')); +INSERT INTO shops (name, location) +VALUES ('sazare', +GeomFromText('POINT(139.685043 35.714653)')); +INSERT INTO shops (name, location) +VALUES ('omede-taiyaki', +GeomFromText('POINT(139.817154 35.700516)')); +INSERT INTO shops (name, location) +VALUES ('onaga-ya', +GeomFromText('POINT(139.81105 35.698254)')); +INSERT INTO shops (name, location) +VALUES ('shiro-ya', +GeomFromText('POINT(139.638611 35.705517)')); +INSERT INTO shops (name, location) +VALUES ('fuji-ya', +GeomFromText('POINT(139.637115 35.703938)')); +INSERT INTO shops (name, location) +VALUES ('miyoshi', +GeomFromText('POINT(139.537323 35.644539)')); +INSERT INTO shops (name, location) +VALUES ('juju-ya', +GeomFromText('POINT(139.695755 35.628922)')); +INSERT INTO shops (name, location) +VALUES ('tatsumi-ya', +GeomFromText('POINT(139.638657 35.665501)')); +INSERT INTO shops (name, location) +VALUES ('tetsuji', +GeomFromText('POINT(139.76857 35.680912)')); +INSERT INTO shops (name, location) +VALUES ('gazuma-ya', +GeomFromText('POINT(139.647598 35.700817)')); +INSERT INTO shops (name, location) +VALUES ('honma-mon', +GeomFromText('POINT(139.652573 35.722736)')); +INSERT INTO shops (name, location) +VALUES ('naniwa-ya', +GeomFromText('POINT(139.796234 35.730061)')); +INSERT INTO shops (name, location) +VALUES ('kuro-dai', +GeomFromText('POINT(139.704834 35.650345)')); +INSERT INTO shops (name, location) +VALUES ('daruma', +GeomFromText('POINT(139.770599 35.681461)')); +INSERT INTO shops (name, location) +VALUES ('yanagi-ya', +GeomFromText('POINT(139.783981 35.685341)')); +INSERT INTO shops (name, location) +VALUES ('sharaku', +GeomFromText('POINT(139.794846 35.716969)')); +INSERT INTO shops (name, location) +VALUES ('takane', +GeomFromText('POINT(139.560913 35.698601)')); +INSERT INTO shops (name, location) +VALUES ('chiyoda', +GeomFromText('POINT(139.652817 35.642601)')); +INSERT INTO shops (name, location) +VALUES ('da-ka-po', +GeomFromText('POINT(139.727356 35.627346)')); +INSERT INTO shops (name, location) +VALUES ('matsushima-ya', +GeomFromText('POINT(139.737381 35.640556)')); +INSERT INTO shops (name, location) +VALUES ('kazuya', +GeomFromText('POINT(139.760895 35.673508)')); +INSERT INTO shops (name, location) +VALUES ('furuya-kogane-an', +GeomFromText('POINT(139.676071 35.680603)')); +INSERT INTO shops (name, location) +VALUES ('hachi-no-ie', +GeomFromText('POINT(139.668106 35.608021)')); +INSERT INTO shops (name, location) +VALUES ('azuki-chan', +GeomFromText('POINT(139.673203 35.64151)')); +INSERT INTO shops (name, location) +VALUES ('kuriko-an', +GeomFromText('POINT(139.796829 35.712013)')); +INSERT INTO shops (name, location) +VALUES ('yume-no-aru-machi-no-taiyaki-ya-san', +GeomFromText('POINT(139.712524 35.616199)')); +INSERT INTO shops (name, location) +VALUES ('naze-ya', +GeomFromText('POINT(139.665833 35.609039)')); +INSERT INTO shops (name, location) +VALUES ('sanoki-ya', +GeomFromText('POINT(139.770721 35.66592)')); +INSERT INTO shops (name, location) +VALUES ('shigeta', +GeomFromText('POINT(139.780273 35.672626)')); +INSERT INTO shops (name, location) +VALUES ('nishimi-ya', +GeomFromText('POINT(139.774628 35.671825)')); +INSERT INTO shops (name, location) +VALUES ('hiiragi', +GeomFromText('POINT(139.711517 35.647701)')); +SELECT id, name, AsText(location) AS location_text FROM shops; +id name location_text +1 nezu-no-taiyaki POINT(139.76257305555555 35.72025305555556) +2 taiyaki-kataoka POINT(139.7155911111111 35.712521111111116) +3 soba-taiyaki-ku POINT(139.65908805555557 35.68371194444445) +4 kuruma POINT(139.70620694444446 35.72151611111111) +5 hirose-ya POINT(139.68560805555555 35.71484388888889) +6 sazare POINT(139.68504305555555 35.71465305555556) +7 omede-taiyaki POINT(139.8171538888889 35.70051611111111) +8 onaga-ya POINT(139.81105 35.69825388888889) +9 shiro-ya POINT(139.63861111111112 35.70551694444445) +10 fuji-ya POINT(139.637115 35.703938055555554) +11 miyoshi POINT(139.53732305555556 35.644538888888896) +12 juju-ya POINT(139.69575500000002 35.62892194444445) +13 tatsumi-ya POINT(139.63865694444445 35.66550111111111) +14 tetsuji POINT(139.76857 35.680911944444446) +15 gazuma-ya POINT(139.64759805555553 35.70081694444444) +16 honma-mon POINT(139.65257305555556 35.72273611111111) +17 naniwa-ya POINT(139.79623388888888 35.73006111111111) +18 kuro-dai POINT(139.70483388888888 35.650345) +19 daruma POINT(139.7705988888889 35.68146111111111) +20 yanagi-ya POINT(139.78398111111113 35.685341111111114) +21 sharaku POINT(139.79484611111113 35.71696888888889) +22 takane POINT(139.56091305555555 35.69860111111112) +23 chiyoda POINT(139.65281694444442 35.64260111111111) +24 da-ka-po POINT(139.72735611111113 35.62734611111111) +25 matsushima-ya POINT(139.73738111111112 35.64055611111111) +26 kazuya POINT(139.760895 35.67350805555556) +27 furuya-kogane-an POINT(139.67607111111113 35.68060305555556) +28 hachi-no-ie POINT(139.66810611111111 35.608021111111114) +29 azuki-chan POINT(139.67320305555555 35.641510000000004) +30 kuriko-an POINT(139.79682888888888 35.71201305555556) +31 yume-no-aru-machi-no-taiyaki-ya-san POINT(139.71252388888888 35.61619888888889) +32 naze-ya POINT(139.66583305555557 35.60903888888889) +33 sanoki-ya POINT(139.7707211111111 35.66592) +34 shigeta POINT(139.78027305555557 35.67262611111111) +35 nishimi-ya POINT(139.77462805555555 35.671825) +36 hiiragi POINT(139.71151694444444 35.64770111111111) +SELECT id, name, AsText(location) AS location_text FROM shops +WHERE MBRContains(GeomFromText('LineString(139.7727 35.6684, 139.7038 35.7121)'), location) +ORDER BY id; +id name location_text +14 tetsuji POINT(139.76857 35.680911944444446) +19 daruma POINT(139.7705988888889 35.68146111111111) +26 kazuya POINT(139.760895 35.67350805555556) +DROP TABLE shops; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_btree_equal_datetime.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_btree_equal_datetime.result new file mode 100644 index 00000000000..78ed69f0ef8 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_btree_equal_datetime.result @@ -0,0 +1,16 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES utf8; +CREATE TABLE diaries ( +created_at datetime, +title varchar(256), +KEY created_at_key(created_at) +) DEFAULT CHARSET=utf8; +INSERT INTO diaries VALUES ("1000-01-01 00:00:00", "The start"); +INSERT INTO diaries VALUES ("2012-10-25 16:18:29", "Today is shiny day."); +INSERT INTO diaries VALUES ("9999-12-31 23:59:59", "The end"); +SELECT * +FROM diaries FORCE INDEX(created_at_key) +WHERE created_at = "2012-10-25 16:18:29"; +created_at title +2012-10-25 16:18:29 Today is shiny day. +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_btree_equal_time.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_btree_equal_time.result new file mode 100644 index 00000000000..a55a184d17a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_btree_equal_time.result @@ -0,0 +1,16 @@ +DROP TABLE IF EXISTS timer; +CREATE TABLE timer ( +id int PRIMARY KEY, +elapsed time, +KEY elapsed_key(elapsed) +); +INSERT INTO timer VALUES (1, "00:00:00"); +INSERT INTO timer VALUES (2, "15:11:12"); +INSERT INTO timer VALUES (3, "838:59:59"); +INSERT INTO timer VALUES (4, "-838:59:59"); +SELECT * +FROM timer FORCE INDEX(elapsed_key) +WHERE elapsed = "-838:59:59"; +id elapsed +4 -838:59:59 +DROP TABLE timer; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_btree_equal_timestamp.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_btree_equal_timestamp.result new file mode 100644 index 00000000000..57eb6ae2cee --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_btree_equal_timestamp.result @@ -0,0 +1,16 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES utf8; +CREATE TABLE diaries ( +created_at timestamp, +title varchar(256), +KEY created_at_key(created_at) +) DEFAULT CHARSET=utf8; +INSERT INTO diaries VALUES ("1970-01-01 12:00:00", "The start"); +INSERT INTO diaries VALUES ("2012-10-05 16:18:29", "Today is shiny day."); +INSERT INTO diaries VALUES ("2038-01-18 15:14:07", "The end"); +SELECT * +FROM diaries FORCE INDEX(created_at_key) +WHERE created_at = "2012-10-05 16:18:29"; +created_at title +2012-10-05 16:18:29 Today is shiny day. +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_btree_normal_column_insert.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_btree_normal_column_insert.result new file mode 100644 index 00000000000..043d1e3c1bc --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_btree_normal_column_insert.result @@ -0,0 +1,25 @@ +drop table if exists t1, t2, t3; +create table t1 (c1 int primary key, c2 int, index using btree (c2)); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(11) NOT NULL, + `c2` int(11) DEFAULT NULL, + PRIMARY KEY (`c1`), + KEY `c2` (`c2`) USING BTREE +) ENGINE=Mroonga DEFAULT CHARSET=latin1 +insert into t1 values (1, 100); +insert into t1 values (2, 101); +insert into t1 values (3, 102); +select * from t1; +c1 c2 +1 100 +2 101 +3 102 +flush tables; +select * from t1; +c1 c2 +1 100 +2 101 +3 102 +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_hash_id_normal.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_hash_id_normal.result new file mode 100644 index 00000000000..5f92c086ea3 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_hash_id_normal.result @@ -0,0 +1,18 @@ +drop table if exists t1, t2, t3; +create table t1 (_id int, a int, key (_id) using hash); +insert into t1 values(null, 100); +insert into t1 values(null, 100); +insert into t1 values(null, 100); +insert into t1 values(null, 100); +select * from t1; +_id a +1 100 +2 100 +3 100 +4 100 +select * from t1 where _id = 2; +_id a +2 100 +select * from t1 where _id = 20; +_id a +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_hash_id_primary.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_hash_id_primary.result new file mode 100644 index 00000000000..508ee135ef2 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_hash_id_primary.result @@ -0,0 +1,28 @@ +drop table if exists t1, t2, t3; +create table t1 (_id int, a int, primary key (_id) using hash); +insert into t1 values(null, 100); +ERROR 23000: Column '_id' cannot be null +insert into t1 values(1,100); +Warnings: +Warning 1265 Data truncated for column '_id' at row 1 +insert into t1 values(1,100); +Warnings: +Warning 1265 Data truncated for column '_id' at row 1 +insert into t1 values(1,100); +Warnings: +Warning 1265 Data truncated for column '_id' at row 1 +insert into t1 values(1,100); +Warnings: +Warning 1265 Data truncated for column '_id' at row 1 +select * from t1; +_id a +1 100 +2 100 +3 100 +4 100 +select * from t1 where _id = 2; +_id a +2 100 +select * from t1 where _id = 20; +_id a +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_hash_id_unique.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_hash_id_unique.result new file mode 100644 index 00000000000..1a30a1ecbf4 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_hash_id_unique.result @@ -0,0 +1,18 @@ +drop table if exists t1, t2, t3; +create table t1 (_id int, a int, unique key (_id) using hash); +insert into t1 values(null, 100); +insert into t1 values(null, 100); +insert into t1 values(null, 100); +insert into t1 values(null, 100); +select * from t1; +_id a +1 100 +2 100 +3 100 +4 100 +select * from t1 where _id = 2; +_id a +2 100 +select * from t1 where _id = 20; +_id a +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_hash_normal_column_insert.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_hash_normal_column_insert.result new file mode 100644 index 00000000000..6e642ce1272 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_hash_normal_column_insert.result @@ -0,0 +1,25 @@ +drop table if exists t1, t2, t3; +create table t1 (c1 int primary key, c2 int, index using hash (c2)); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(11) NOT NULL, + `c2` int(11) DEFAULT NULL, + PRIMARY KEY (`c1`), + KEY `c2` (`c2`) USING HASH +) ENGINE=Mroonga DEFAULT CHARSET=latin1 +insert into t1 values (1, 100); +insert into t1 values (2, 101); +insert into t1 values (3, 102); +select * from t1; +c1 c2 +1 100 +2 101 +3 102 +flush tables; +select * from t1; +c1 c2 +1 100 +2 101 +3 102 +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_delete.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_delete.result new file mode 100644 index 00000000000..c680a3733f3 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_delete.result @@ -0,0 +1,32 @@ +drop table if exists listing; +set names utf8; +create table scores ( +id int primary key auto_increment not null, +name char(30) not null, +score int not null, +index property (name, score) +) default charset utf8; +show create table scores; +Table Create Table +scores CREATE TABLE `scores` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` char(30) NOT NULL, + `score` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `property` (`name`,`score`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +insert into scores (name, score) values("Taro Yamada", 29); +insert into scores (name, score) values("Taro Yamada", -12); +insert into scores (name, score) values("Jiro Yamada", 27); +insert into scores (name, score) values("Taro Yamada", 10); +select * from scores; +id name score +1 Taro Yamada 29 +2 Taro Yamada -12 +3 Jiro Yamada 27 +4 Taro Yamada 10 +delete from scores where name = "Taro Yamada" and score = 10; +select * from scores where name = "Taro Yamada" and (score >= -12 and score < 29); +id name score +2 Taro Yamada -12 +drop table scores; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_nullable_smallint.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_nullable_smallint.result new file mode 100644 index 00000000000..a627f432068 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_nullable_smallint.result @@ -0,0 +1,65 @@ +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( +id INT PRIMARY KEY AUTO_INCREMENT, +c1 SMALLINT, +c2 SMALLINT, +KEY idx1(c1, c2) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `c1` smallint(6) DEFAULT NULL, + `c2` smallint(6) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `idx1` (`c1`,`c2`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +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; +id c1 c2 +8 2006 5 +9 2007 4 +10 2008 3 +11 2009 2 +12 2010 1 +SELECT * FROM t1 WHERE c1 >= 2005; +id c1 c2 +7 2005 6 +8 2006 5 +9 2007 4 +10 2008 3 +11 2009 2 +12 2010 1 +SELECT * FROM t1 WHERE c1 = 2005; +id c1 c2 +7 2005 6 +SELECT * FROM t1 WHERE c1 <= 2005; +id c1 c2 +1 1999 12 +2 2000 11 +3 2001 10 +4 2002 9 +5 2003 8 +6 2004 7 +7 2005 6 +SELECT * FROM t1 WHERE c1 < 2005; +id c1 c2 +1 1999 12 +2 2000 11 +3 2001 10 +4 2002 9 +5 2003 8 +6 2004 7 +DROP TABLE t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_nullable_unsigned_bigint.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_nullable_unsigned_bigint.result new file mode 100644 index 00000000000..368f88a64e1 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_nullable_unsigned_bigint.result @@ -0,0 +1,65 @@ +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( +id INT PRIMARY KEY AUTO_INCREMENT, +c1 BIGINT UNSIGNED, +c2 BIGINT UNSIGNED, +KEY idx1(c1, c2) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `c1` bigint(20) unsigned DEFAULT NULL, + `c2` bigint(20) unsigned DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `idx1` (`c1`,`c2`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +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; +id c1 c2 +8 2006 5 +9 2007 4 +10 2008 3 +11 2009 2 +12 2010 1 +SELECT * FROM t1 WHERE c1 >= 2005; +id c1 c2 +7 2005 6 +8 2006 5 +9 2007 4 +10 2008 3 +11 2009 2 +12 2010 1 +SELECT * FROM t1 WHERE c1 = 2005; +id c1 c2 +7 2005 6 +SELECT * FROM t1 WHERE c1 <= 2005; +id c1 c2 +1 1999 12 +2 2000 11 +3 2001 10 +4 2002 9 +5 2003 8 +6 2004 7 +7 2005 6 +SELECT * FROM t1 WHERE c1 < 2005; +id c1 c2 +1 1999 12 +2 2000 11 +3 2001 10 +4 2002 9 +5 2003 8 +6 2004 7 +DROP TABLE t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_nullable_unsigned_int.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_nullable_unsigned_int.result new file mode 100644 index 00000000000..6d5516f7eea --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_nullable_unsigned_int.result @@ -0,0 +1,65 @@ +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( +id INT PRIMARY KEY AUTO_INCREMENT, +c1 INT UNSIGNED, +c2 INT UNSIGNED, +KEY idx1(c1, c2) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `c1` int(10) unsigned DEFAULT NULL, + `c2` int(10) unsigned DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `idx1` (`c1`,`c2`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +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; +id c1 c2 +8 2006 5 +9 2007 4 +10 2008 3 +11 2009 2 +12 2010 1 +SELECT * FROM t1 WHERE c1 >= 2005; +id c1 c2 +7 2005 6 +8 2006 5 +9 2007 4 +10 2008 3 +11 2009 2 +12 2010 1 +SELECT * FROM t1 WHERE c1 = 2005; +id c1 c2 +7 2005 6 +SELECT * FROM t1 WHERE c1 <= 2005; +id c1 c2 +1 1999 12 +2 2000 11 +3 2001 10 +4 2002 9 +5 2003 8 +6 2004 7 +7 2005 6 +SELECT * FROM t1 WHERE c1 < 2005; +id c1 c2 +1 1999 12 +2 2000 11 +3 2001 10 +4 2002 9 +5 2003 8 +6 2004 7 +DROP TABLE t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_nullable_unsigned_smallint.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_nullable_unsigned_smallint.result new file mode 100644 index 00000000000..b0edfb9eea1 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_nullable_unsigned_smallint.result @@ -0,0 +1,65 @@ +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( +id INT PRIMARY KEY AUTO_INCREMENT, +c1 SMALLINT UNSIGNED, +c2 SMALLINT UNSIGNED, +KEY idx1(c1, c2) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `c1` smallint(5) unsigned DEFAULT NULL, + `c2` smallint(5) unsigned DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `idx1` (`c1`,`c2`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +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; +id c1 c2 +8 2006 5 +9 2007 4 +10 2008 3 +11 2009 2 +12 2010 1 +SELECT * FROM t1 WHERE c1 >= 2005; +id c1 c2 +7 2005 6 +8 2006 5 +9 2007 4 +10 2008 3 +11 2009 2 +12 2010 1 +SELECT * FROM t1 WHERE c1 = 2005; +id c1 c2 +7 2005 6 +SELECT * FROM t1 WHERE c1 <= 2005; +id c1 c2 +1 1999 12 +2 2000 11 +3 2001 10 +4 2002 9 +5 2003 8 +6 2004 7 +7 2005 6 +SELECT * FROM t1 WHERE c1 < 2005; +id c1 c2 +1 1999 12 +2 2000 11 +3 2001 10 +4 2002 9 +5 2003 8 +6 2004 7 +DROP TABLE t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_nullable_varchar.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_nullable_varchar.result new file mode 100644 index 00000000000..587e3c5fd4d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_nullable_varchar.result @@ -0,0 +1,65 @@ +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( +id INT PRIMARY KEY AUTO_INCREMENT, +c1 VARCHAR(10), +c2 VARCHAR(10), +KEY idx1(c1, c2) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `c1` varchar(10) DEFAULT NULL, + `c2` varchar(10) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `idx1` (`c1`,`c2`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO t1 (c1, c2) VALUES +('1999', '12'), +('2000', '11'), +('2001', '10'), +('2002', '09'), +('2003', '08'), +('2004', '07'), +('2005', '06'), +('2006', '05'), +('2007', '04'), +('2008', '03'), +('2009', '02'), +('2010', '01'); +SELECT * FROM t1 WHERE c1 > '2005'; +id c1 c2 +8 2006 05 +9 2007 04 +10 2008 03 +11 2009 02 +12 2010 01 +SELECT * FROM t1 WHERE c1 >= '2005'; +id c1 c2 +7 2005 06 +8 2006 05 +9 2007 04 +10 2008 03 +11 2009 02 +12 2010 01 +SELECT * FROM t1 WHERE c1 = '2005'; +id c1 c2 +7 2005 06 +SELECT * FROM t1 WHERE c1 <= '2005'; +id c1 c2 +1 1999 12 +2 2000 11 +3 2001 10 +4 2002 09 +5 2003 08 +6 2004 07 +7 2005 06 +SELECT * FROM t1 WHERE c1 < '2005'; +id c1 c2 +1 1999 12 +2 2000 11 +3 2001 10 +4 2002 09 +5 2003 08 +6 2004 07 +DROP TABLE t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_primary_delete.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_primary_delete.result new file mode 100644 index 00000000000..ac673bac52c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_primary_delete.result @@ -0,0 +1,29 @@ +drop table if exists listing; +set names utf8; +create table scores ( +name char(30) not null, +score int not null, +primary key (name, score) +) default charset utf8; +show create table scores; +Table Create Table +scores CREATE TABLE `scores` ( + `name` char(30) NOT NULL, + `score` int(11) NOT NULL, + PRIMARY KEY (`name`,`score`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +insert into scores (name, score) values("Taro Yamada", 29); +insert into scores (name, score) values("Taro Yamada", -12); +insert into scores (name, score) values("Jiro Yamada", 27); +insert into scores (name, score) values("Taro Yamada", 10); +select * from scores; +name score +Jiro Yamada 27 +Taro Yamada -12 +Taro Yamada 10 +Taro Yamada 29 +delete from scores where name = "Taro Yamada" and score = 10; +select * from scores where name = "Taro Yamada" and (score >= -12 and score < 29); +name score +Taro Yamada -12 +drop table scores; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_primary_select_int.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_primary_select_int.result new file mode 100644 index 00000000000..20b45861e4e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_primary_select_int.result @@ -0,0 +1,37 @@ +drop table if exists listing; +set names utf8; +create table scores ( +name char(30) not null, +score int not null, +primary key (name, score) +) default charset utf8; +show create table scores; +Table Create Table +scores CREATE TABLE `scores` ( + `name` char(30) NOT NULL, + `score` int(11) NOT NULL, + PRIMARY KEY (`name`,`score`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +insert into scores (name, score) values("Taro Yamada", 29); +insert into scores (name, score) values("Taro Yamada", -12); +insert into scores (name, score) values("Jiro Yamada", 27); +insert into scores (name, score) values("Taro Yamada", 10); +select * from scores; +name score +Jiro Yamada 27 +Taro Yamada -12 +Taro Yamada 10 +Taro Yamada 29 +select * from scores where name = "Taro Yamada"; +name score +Taro Yamada -12 +Taro Yamada 10 +Taro Yamada 29 +select * from scores where name = "Taro Yamada" and score = 29; +name score +Taro Yamada 29 +select * from scores where name = "Taro Yamada" and (score >= -12 and score < 29); +name score +Taro Yamada -12 +Taro Yamada 10 +drop table scores; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_primary_update.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_primary_update.result new file mode 100644 index 00000000000..86b06bc94dd --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_primary_update.result @@ -0,0 +1,32 @@ +drop table if exists listing; +set names utf8; +create table scores ( +name char(30) not null, +score int not null, +primary key (name, score) +) default charset utf8; +show create table scores; +Table Create Table +scores CREATE TABLE `scores` ( + `name` char(30) NOT NULL, + `score` int(11) NOT NULL, + PRIMARY KEY (`name`,`score`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +insert into scores (name, score) values("Taro Yamada", 29); +insert into scores (name, score) values("Taro Yamada", -12); +insert into scores (name, score) values("Jiro Yamada", 27); +insert into scores (name, score) values("Taro Yamada", 10); +select * from scores; +name score +Jiro Yamada 27 +Taro Yamada -12 +Taro Yamada 10 +Taro Yamada 29 +update scores set name = "Taro Yamada" where name = "Jiro Yamada" and score = 27; +Warnings: +Warning 1265 data truncated for primary key column: <name> +select * from scores where name = "Taro Yamada" and (score >= -12 and score < 29); +name score +Taro Yamada -12 +Taro Yamada 10 +drop table scores; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_recreate.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_recreate.result new file mode 100644 index 00000000000..02222965755 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_recreate.result @@ -0,0 +1,39 @@ +drop table if exists listing; +set names utf8; +create table listing ( +id int primary key auto_increment not null, +last_name char(30) not null, +first_name char(30) not null, +index name (last_name, first_name) +) default charset utf8; +show create table listing; +Table Create Table +listing CREATE TABLE `listing` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `last_name` char(30) NOT NULL, + `first_name` char(30) NOT NULL, + PRIMARY KEY (`id`), + KEY `name` (`last_name`,`first_name`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +insert into listing (last_name, first_name) values("Taro", "Yamada"); +insert into listing (last_name, first_name) values("Taro", "Suzuki"); +insert into listing (last_name, first_name) values("Jiro", "Yamada"); +insert into listing (last_name, first_name) values("Taro", "Tanaka"); +select * from listing +where last_name = "Taro" and (first_name >= "S" and first_name <= "Y"); +id last_name first_name +2 Taro Suzuki +4 Taro Tanaka +drop index name on listing; +select * from listing +where last_name = "Taro" and (first_name >= "S" and first_name <= "Y"); +id last_name first_name +2 Taro Suzuki +4 Taro Tanaka +create index new_name_index on listing (last_name, first_name); +select * from listing +where last_name = "Taro" and (first_name >= "S" and first_name <= "Y"); +id last_name first_name +2 Taro Suzuki +4 Taro Tanaka +drop table listing; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_replace.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_replace.result new file mode 100644 index 00000000000..df67c8a397e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_replace.result @@ -0,0 +1,39 @@ +DROP TABLE IF EXISTS listing; +CREATE TABLE scores ( +id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, +name CHAR(30) NOT NULL, +score INT NOT NULL, +INDEX property (NAME, SCORE) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE scores; +Table Create Table +scores CREATE TABLE `scores` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` char(30) NOT NULL, + `score` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `property` (`name`,`score`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO scores (name, score) VALUES("Taro Yamada", 29); +INSERT INTO scores (name, score) VALUES("Taro Yamada", -12); +INSERT INTO scores (name, score) VALUES("Jiro Yamada", 27); +INSERT INTO scores (name, score) VALUES("Taro Yamada", 10); +SELECT * FROM scores; +id name score +1 Taro Yamada 29 +2 Taro Yamada -12 +3 Jiro Yamada 27 +4 Taro Yamada 10 +REPLACE scores (id, name, score) VALUES (3, "Taro Yamada", 28); +SELECT * FROM scores; +id name score +1 Taro Yamada 29 +2 Taro Yamada -12 +3 Taro Yamada 28 +4 Taro Yamada 10 +SELECT * FROM scores WHERE name = "Taro Yamada" AND (score >= -12 AND score < 29); +id name score +2 Taro Yamada -12 +4 Taro Yamada 10 +3 Taro Yamada 28 +DROP TABLE scores; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_select_double.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_select_double.result new file mode 100644 index 00000000000..c75733f49fe --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_select_double.result @@ -0,0 +1,28 @@ +DROP TABLE IF EXISTS temperatures; +CREATE TABLE temperatures ( +id INT PRIMARY KEY AUTO_INCREMENT, +title VARCHAR(20), +temperature DOUBLE, +KEY temperature_index(temperature), +KEY multi_index(temperature, title) +); +INSERT INTO temperatures VALUES (NULL, "Hot!", 28.2); +INSERT INTO temperatures VALUES (NULL, "Snow!", -2.8); +INSERT INTO temperatures VALUES (NULL, "Rainy!", 12.7); +SELECT temperature FROM temperatures WHERE temperature BETWEEN 10 AND 30; +temperature +12.7 +28.2 +SELECT temperature FROM temperatures WHERE temperature BETWEEN -10 AND 20; +temperature +-2.8 +12.7 +SELECT title, temperature FROM temperatures WHERE temperature BETWEEN 10 AND 30; +title temperature +Rainy! 12.7 +Hot! 28.2 +SELECT title, temperature FROM temperatures WHERE temperature BETWEEN -10 AND 20; +title temperature +Snow! -2.8 +Rainy! 12.7 +DROP TABLE temperatures; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_select_float.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_select_float.result new file mode 100644 index 00000000000..452cae2d651 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_select_float.result @@ -0,0 +1,28 @@ +DROP TABLE IF EXISTS temperatures; +CREATE TABLE temperatures ( +id INT PRIMARY KEY AUTO_INCREMENT, +title VARCHAR(20), +temperature FLOAT, +KEY temperature_index(temperature), +KEY multi_index(temperature, title) +); +INSERT INTO temperatures VALUES (NULL, "Hot!", 28.2); +INSERT INTO temperatures VALUES (NULL, "Snow!", -2.8); +INSERT INTO temperatures VALUES (NULL, "Rainy!", 12.7); +SELECT temperature FROM temperatures WHERE temperature BETWEEN 10 AND 30; +temperature +12.7 +28.2 +SELECT temperature FROM temperatures WHERE temperature BETWEEN -10 AND 20; +temperature +-2.8 +12.7 +SELECT title, temperature FROM temperatures WHERE temperature BETWEEN 10 AND 30; +title temperature +Rainy! 12.7 +Hot! 28.2 +SELECT title, temperature FROM temperatures WHERE temperature BETWEEN -10 AND 20; +title temperature +Snow! -2.8 +Rainy! 12.7 +DROP TABLE temperatures; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_select_int.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_select_int.result new file mode 100644 index 00000000000..ecf7706bd8e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_select_int.result @@ -0,0 +1,37 @@ +DROP TABLE IF EXISTS listing; +CREATE TABLE scores ( +id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, +name CHAR(30) NOT NULL, +score INT NOT NULL, +INDEX property (score, name) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE scores; +Table Create Table +scores CREATE TABLE `scores` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` char(30) NOT NULL, + `score` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `property` (`score`,`name`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO scores (name, score) VALUES("Taro Yamada", 29); +INSERT INTO scores (name, score) VALUES("Taro Yamada", -12); +INSERT INTO scores (name, score) VALUES("Jiro Yamada", 27); +INSERT INTO scores (name, score) VALUES("Taro Yamada", 10); +SELECT * FROM scores; +id name score +1 Taro Yamada 29 +2 Taro Yamada -12 +3 Jiro Yamada 27 +4 Taro Yamada 10 +SELECT * FROM scores WHERE score = 29; +id name score +1 Taro Yamada 29 +SELECT * FROM scores WHERE score = 29 AND name = "Taro Yamada"; +id name score +1 Taro Yamada 29 +SELECT * FROM scores WHERE (score >= -12 AND score < 29) AND name = "Taro Yamada"; +id name score +2 Taro Yamada -12 +4 Taro Yamada 10 +DROP TABLE scores; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_select_string.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_select_string.result new file mode 100644 index 00000000000..ad73669e40b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_select_string.result @@ -0,0 +1,40 @@ +drop table if exists listing; +set names utf8; +create table listing ( +id int primary key auto_increment not null, +last_name char(30) not null, +first_name char(30) not null, +index name (last_name, first_name) +) default charset utf8; +show create table listing; +Table Create Table +listing CREATE TABLE `listing` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `last_name` char(30) NOT NULL, + `first_name` char(30) NOT NULL, + PRIMARY KEY (`id`), + KEY `name` (`last_name`,`first_name`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +insert into listing (last_name, first_name) values("Taro", "Yamada"); +insert into listing (last_name, first_name) values("Taro", "Suzuki"); +insert into listing (last_name, first_name) values("Jiro", "Yamada"); +insert into listing (last_name, first_name) values("Taro", "Tanaka"); +select * from listing; +id last_name first_name +1 Taro Yamada +2 Taro Suzuki +3 Jiro Yamada +4 Taro Tanaka +select * from listing where last_name = "Taro"; +id last_name first_name +2 Taro Suzuki +4 Taro Tanaka +1 Taro Yamada +select * from listing where last_name = "Taro" and first_name = "Suzuki"; +id last_name first_name +2 Taro Suzuki +select * from listing where last_name = "Taro" and (first_name >= "S" and first_name <= "Y"); +id last_name first_name +2 Taro Suzuki +4 Taro Tanaka +drop table listing; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_select_varchar.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_select_varchar.result new file mode 100644 index 00000000000..53fbccda2b4 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_select_varchar.result @@ -0,0 +1,39 @@ +drop table if exists scores; +set names utf8; +create table scores ( +given_name varchar(30) not null, +family_name varchar(30) not null, +score int not null, +primary key property (given_name, family_name, score) +) default charset utf8; +show create table scores; +Table Create Table +scores CREATE TABLE `scores` ( + `given_name` varchar(30) NOT NULL, + `family_name` varchar(30) NOT NULL, + `score` int(11) NOT NULL, + PRIMARY KEY (`given_name`,`family_name`,`score`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +insert into scores values("Taro", "Yamada", 29); +insert into scores values("Taro", "Yamada", -12); +insert into scores values("Jiro", "Yamada", 27); +insert into scores values("Taro", "Yamada", 10); +select * from scores; +given_name family_name score +Jiro Yamada 27 +Taro Yamada -12 +Taro Yamada 10 +Taro Yamada 29 +select * from scores where given_name = "Taro" and family_name = "Yamada"; +given_name family_name score +Taro Yamada -12 +Taro Yamada 10 +Taro Yamada 29 +select * from scores where given_name = "Taro" and family_name = "Yamada" and score = 29; +given_name family_name score +Taro Yamada 29 +select * from scores where given_name = "Taro" and family_name = "Yamada" and (score >= -12 and score < 29); +given_name family_name score +Taro Yamada -12 +Taro Yamada 10 +drop table scores; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_32bit_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_32bit_equal.result new file mode 100644 index 00000000000..2174efc1b4f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_32bit_equal.result @@ -0,0 +1,25 @@ +DROP TABLE IF EXISTS ranges; +CREATE TABLE ranges ( +id INT PRIMARY KEY, +start DATE, +end DATE, +UNIQUE KEY range_key(start, end) +); +INSERT INTO ranges VALUES (1, "1000-01-01", "2012-10-05"); +Warnings: +Warning 1265 Data truncated for column 'start' at row 1 +INSERT INTO ranges VALUES (2, "1000-01-01", "9999-12-31"); +Warnings: +Warning 1265 Data truncated for column 'start' at row 1 +Warning 1265 Data truncated for column 'end' at row 1 +INSERT INTO ranges VALUES (3, "2012-10-25", "9999-12-31"); +Warnings: +Warning 1265 Data truncated for column 'end' at row 1 +INSERT INTO ranges VALUES (4, "9999-12-31", "1000-01-01"); +Warnings: +Warning 1265 Data truncated for column 'start' at row 1 +Warning 1265 Data truncated for column 'end' at row 1 +SELECT * FROM ranges FORCE INDEX(range_key) +WHERE start = "1000-01-01" AND end = "9999-12-31"; +id start end +DROP TABLE ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_64bit_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_64bit_equal.result new file mode 100644 index 00000000000..869ced05d25 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_64bit_equal.result @@ -0,0 +1,16 @@ +DROP TABLE IF EXISTS ranges; +CREATE TABLE ranges ( +id INT PRIMARY KEY, +start DATE, +end DATE, +UNIQUE KEY range_key(start, end) +); +INSERT INTO ranges VALUES (1, "1000-01-01", "2012-10-05"); +INSERT INTO ranges VALUES (2, "1000-01-01", "9999-12-31"); +INSERT INTO ranges VALUES (3, "2012-10-25", "9999-12-31"); +INSERT INTO ranges VALUES (4, "9999-12-31", "1000-01-01"); +SELECT * FROM ranges FORCE INDEX(range_key) +WHERE start = "1000-01-01" AND end = "9999-12-31"; +id start end +2 1000-01-01 9999-12-31 +DROP TABLE ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_index_read.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_index_read.result new file mode 100644 index 00000000000..8e480d4844a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_index_read.result @@ -0,0 +1,20 @@ +DROP TABLE IF EXISTS ranges; +CREATE TABLE ranges ( +id INT PRIMARY KEY, +start DATE, +end DATE, +UNIQUE KEY range_key(start, end) +); +INSERT INTO ranges VALUES (1, "1000-01-01", "2012-10-05"); +INSERT INTO ranges VALUES (2, "1000-01-01", "9999-12-31"); +INSERT INTO ranges VALUES (3, "2012-10-25", "9999-12-31"); +INSERT INTO ranges VALUES (4, "9999-12-31", "1000-01-01"); +SELECT start, end +FROM ranges FORCE INDEX(range_key) +ORDER BY start, end; +start end +1000-01-01 2012-10-05 +1000-01-01 9999-12-31 +2012-10-25 9999-12-31 +9999-12-31 1000-01-01 +DROP TABLE ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_order_32bit_asc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_order_32bit_asc.result new file mode 100644 index 00000000000..0a64a822fb5 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_order_32bit_asc.result @@ -0,0 +1,29 @@ +DROP TABLE IF EXISTS ranges; +CREATE TABLE ranges ( +id INT PRIMARY KEY, +start DATE, +end DATE, +UNIQUE KEY range_key(start, end) +); +INSERT INTO ranges VALUES (1, "2012-10-25", "9999-12-31"); +Warnings: +Warning 1265 Data truncated for column 'end' at row 1 +INSERT INTO ranges VALUES (2, "1000-01-01", "2012-10-05"); +Warnings: +Warning 1265 Data truncated for column 'start' at row 1 +INSERT INTO ranges VALUES (3, "9999-12-31", "1000-01-01"); +Warnings: +Warning 1265 Data truncated for column 'start' at row 1 +Warning 1265 Data truncated for column 'end' at row 1 +INSERT INTO ranges VALUES (4, "1000-01-01", "9999-12-31"); +Warnings: +Warning 1265 Data truncated for column 'start' at row 1 +Warning 1265 Data truncated for column 'end' at row 1 +SELECT * FROM ranges FORCE INDEX(range_key) +ORDER BY start, end; +id start end +2 1970-01-01 2012-10-05 +4 1970-01-01 1970-01-01 +1 2012-10-25 1970-01-01 +3 1970-01-01 1970-01-01 +DROP TABLE ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_order_32bit_desc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_order_32bit_desc.result new file mode 100644 index 00000000000..24439fdf5fa --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_order_32bit_desc.result @@ -0,0 +1,29 @@ +DROP TABLE IF EXISTS ranges; +CREATE TABLE ranges ( +id INT PRIMARY KEY, +start DATE, +end DATE, +UNIQUE KEY range_key(start, end) +); +INSERT INTO ranges VALUES (1, "2012-10-25", "9999-12-31"); +Warnings: +Warning 1265 Data truncated for column 'end' at row 1 +INSERT INTO ranges VALUES (2, "1000-01-01", "2012-10-05"); +Warnings: +Warning 1265 Data truncated for column 'start' at row 1 +INSERT INTO ranges VALUES (3, "9999-12-31", "1000-01-01"); +Warnings: +Warning 1265 Data truncated for column 'start' at row 1 +Warning 1265 Data truncated for column 'end' at row 1 +INSERT INTO ranges VALUES (4, "1000-01-01", "9999-12-31"); +Warnings: +Warning 1265 Data truncated for column 'start' at row 1 +Warning 1265 Data truncated for column 'end' at row 1 +SELECT * FROM ranges FORCE INDEX(range_key) +ORDER BY start DESC, end DESC; +id start end +3 1970-01-01 1970-01-01 +1 2012-10-25 1970-01-01 +4 1970-01-01 1970-01-01 +2 1970-01-01 2012-10-05 +DROP TABLE ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_order_64bit_asc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_order_64bit_asc.result new file mode 100644 index 00000000000..92e7f51ff6e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_order_64bit_asc.result @@ -0,0 +1,19 @@ +DROP TABLE IF EXISTS ranges; +CREATE TABLE ranges ( +id INT PRIMARY KEY, +start DATE, +end DATE, +UNIQUE KEY range_key(start, end) +); +INSERT INTO ranges VALUES (1, "2012-10-25", "9999-12-31"); +INSERT INTO ranges VALUES (2, "1000-01-01", "2012-10-05"); +INSERT INTO ranges VALUES (3, "9999-12-31", "1000-01-01"); +INSERT INTO ranges VALUES (4, "1000-01-01", "9999-12-31"); +SELECT * FROM ranges FORCE INDEX(range_key) +ORDER BY start, end; +id start end +2 1000-01-01 2012-10-05 +4 1000-01-01 9999-12-31 +1 2012-10-25 9999-12-31 +3 9999-12-31 1000-01-01 +DROP TABLE ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_order_64bit_desc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_order_64bit_desc.result new file mode 100644 index 00000000000..ddd694c3863 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_order_64bit_desc.result @@ -0,0 +1,19 @@ +DROP TABLE IF EXISTS ranges; +CREATE TABLE ranges ( +id INT PRIMARY KEY, +start DATE, +end DATE, +UNIQUE KEY range_key(start, end) +); +INSERT INTO ranges VALUES (1, "2012-10-25", "9999-12-31"); +INSERT INTO ranges VALUES (2, "1000-01-01", "2012-10-05"); +INSERT INTO ranges VALUES (3, "9999-12-31", "1000-01-01"); +INSERT INTO ranges VALUES (4, "1000-01-01", "9999-12-31"); +SELECT * FROM ranges FORCE INDEX(range_key) +ORDER BY start DESC, end DESC; +id start end +3 9999-12-31 1000-01-01 +1 2012-10-25 9999-12-31 +4 1000-01-01 9999-12-31 +2 1000-01-01 2012-10-05 +DROP TABLE ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_reinsert.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_reinsert.result new file mode 100644 index 00000000000..bd1bdc33325 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_reinsert.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS ranges; +CREATE TABLE ranges ( +id INT PRIMARY KEY, +start DATE, +end DATE, +UNIQUE KEY range_key(start, end) +); +INSERT INTO ranges VALUES (1, "2010-01-01", "2012-10-05"); +SELECT * FROM ranges; +id start end +1 2010-01-01 2012-10-05 +DELETE FROM ranges WHERE id = 1; +INSERT INTO ranges VALUES (1, "2010-01-01", "2012-10-05"); +SELECT * FROM ranges; +id start end +1 2010-01-01 2012-10-05 +DROP TABLE ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_datetime_index_read.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_datetime_index_read.result new file mode 100644 index 00000000000..1aa710882cb --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_datetime_index_read.result @@ -0,0 +1,20 @@ +DROP TABLE IF EXISTS ranges; +CREATE TABLE ranges ( +id int PRIMARY KEY, +start datetime, +end datetime, +UNIQUE KEY range_key(start, end) +); +INSERT INTO ranges VALUES (1, "1000-01-01 00:00:00", "2012-10-05 16:18:29"); +INSERT INTO ranges VALUES (2, "1000-01-01 00:00:00", "9999-12-31 23:59:59"); +INSERT INTO ranges VALUES (3, "2012-10-25 16:18:29", "9999-12-31 23:59:59"); +INSERT INTO ranges VALUES (4, "9999-12-31 23:59:59", "1000-01-01 00:00:00"); +SELECT start, end +FROM ranges FORCE INDEX(range_key) +ORDER BY start, end; +start end +1000-01-01 00:00:00 2012-10-05 16:18:29 +1000-01-01 00:00:00 9999-12-31 23:59:59 +2012-10-25 16:18:29 9999-12-31 23:59:59 +9999-12-31 23:59:59 1000-01-01 00:00:00 +DROP TABLE ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_datetime_order_asc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_datetime_order_asc.result new file mode 100644 index 00000000000..d18f1858932 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_datetime_order_asc.result @@ -0,0 +1,19 @@ +DROP TABLE IF EXISTS ranges; +CREATE TABLE ranges ( +id int PRIMARY KEY, +start datetime, +end datetime, +UNIQUE KEY range_key(start, end) +); +INSERT INTO ranges VALUES (1, "2012-10-25 16:18:29", "9999-12-31 23:59:59"); +INSERT INTO ranges VALUES (2, "1000-01-01 00:00:00", "2012-10-05 16:18:29"); +INSERT INTO ranges VALUES (3, "9999-12-31 23:59:59", "1000-01-01 00:00:00"); +INSERT INTO ranges VALUES (4, "1000-01-01 00:00:00", "9999-12-31 23:59:59"); +SELECT * FROM ranges FORCE INDEX(range_key) +ORDER BY start, end; +id start end +2 1000-01-01 00:00:00 2012-10-05 16:18:29 +4 1000-01-01 00:00:00 9999-12-31 23:59:59 +1 2012-10-25 16:18:29 9999-12-31 23:59:59 +3 9999-12-31 23:59:59 1000-01-01 00:00:00 +DROP TABLE ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_datetime_order_desc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_datetime_order_desc.result new file mode 100644 index 00000000000..c159aeab4ce --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_datetime_order_desc.result @@ -0,0 +1,19 @@ +DROP TABLE IF EXISTS ranges; +CREATE TABLE ranges ( +id int PRIMARY KEY, +start datetime, +end datetime, +UNIQUE KEY range_key(start, end) +); +INSERT INTO ranges VALUES (1, "2012-10-25 16:18:29", "9999-12-31 23:59:59"); +INSERT INTO ranges VALUES (2, "1000-01-01 00:00:00", "2012-10-05 16:18:29"); +INSERT INTO ranges VALUES (3, "9999-12-31 23:59:59", "1000-01-01 00:00:00"); +INSERT INTO ranges VALUES (4, "1000-01-01 00:00:00", "9999-12-31 23:59:59"); +SELECT * FROM ranges FORCE INDEX(range_key) +ORDER BY start DESC, end DESC; +id start end +3 9999-12-31 23:59:59 1000-01-01 00:00:00 +1 2012-10-25 16:18:29 9999-12-31 23:59:59 +4 1000-01-01 00:00:00 9999-12-31 23:59:59 +2 1000-01-01 00:00:00 2012-10-05 16:18:29 +DROP TABLE ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_datetime_reinsert.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_datetime_reinsert.result new file mode 100644 index 00000000000..50d5da49955 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_datetime_reinsert.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS ranges; +CREATE TABLE ranges ( +id int PRIMARY KEY, +start datetime, +end datetime, +UNIQUE KEY range_key(start, end) +); +INSERT INTO ranges VALUES (1, "2010-01-01 00:00:00", "2012-10-05 23:59:59"); +SELECT * FROM ranges; +id start end +1 2010-01-01 00:00:00 2012-10-05 23:59:59 +DELETE FROM ranges WHERE id = 1; +INSERT INTO ranges VALUES (1, "2010-01-01 00:00:00", "2012-10-05 23:59:59"); +SELECT * FROM ranges; +id start end +1 2010-01-01 00:00:00 2012-10-05 23:59:59 +DROP TABLE ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_decimal.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_decimal.result new file mode 100644 index 00000000000..015afdb5cf6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_decimal.result @@ -0,0 +1,36 @@ +drop table if exists t1; +create table t1 (c1 int primary key, c2 decimal(65,30), c3 decimal(65,30), unique key uk1(c2,c3)); +insert into t1 values(1,123.456,0.000000000000000000000000000001); +insert into t1 values(2,-123.456,123.456); +insert into t1 values(3,98765432109876543210987654321098765.432109876543210987654321098765,-123.456); +insert into t1 values(4,-98765432109876543210987654321098765.432109876543210987654321098765,98765432109876543210987654321098765.432109876543210987654321098765); +insert into t1 values(5,0.000000000000000000000000000001,-98765432109876543210987654321098765.432109876543210987654321098765); +select c1, c2, c3 from t1 force index(uk1) where c2 = -98765432109876543210987654321098765.432109876543210987654321098765 and c3 = 98765432109876543210987654321098765.432109876543210987654321098765; +c1 c2 c3 +4 -98765432109876543210987654321098765.432109876543210987654321098765 98765432109876543210987654321098765.432109876543210987654321098765 +select c1, c2, c3 from t1 force index(uk1) order by c2, c3; +c1 c2 c3 +4 -98765432109876543210987654321098765.432109876543210987654321098765 98765432109876543210987654321098765.432109876543210987654321098765 +2 -123.456000000000000000000000000000 123.456000000000000000000000000000 +5 0.000000000000000000000000000001 -98765432109876543210987654321098765.432109876543210987654321098765 +1 123.456000000000000000000000000000 0.000000000000000000000000000001 +3 98765432109876543210987654321098765.432109876543210987654321098765 -123.456000000000000000000000000000 +select c1, c2, c3 from t1 force index(uk1) order by c2 desc, c3 desc; +c1 c2 c3 +3 98765432109876543210987654321098765.432109876543210987654321098765 -123.456000000000000000000000000000 +1 123.456000000000000000000000000000 0.000000000000000000000000000001 +5 0.000000000000000000000000000001 -98765432109876543210987654321098765.432109876543210987654321098765 +2 -123.456000000000000000000000000000 123.456000000000000000000000000000 +4 -98765432109876543210987654321098765.432109876543210987654321098765 98765432109876543210987654321098765.432109876543210987654321098765 +select c2, c3 from t1 force index(uk1) order by c2, c3; +c2 c3 +-98765432109876543210987654321098765.432109876543210987654321098765 98765432109876543210987654321098765.432109876543210987654321098765 +-123.456000000000000000000000000000 123.456000000000000000000000000000 +0.000000000000000000000000000001 -98765432109876543210987654321098765.432109876543210987654321098765 +123.456000000000000000000000000000 0.000000000000000000000000000001 +98765432109876543210987654321098765.432109876543210987654321098765 -123.456000000000000000000000000000 +insert into t1 values(6,123.456,0.000000000000000000000000000001); +ERROR 23000: Duplicate entry '123.456000000000000000000000000000-0.000000000000000000000000000' for key 'uk1' +delete from t1 where c1 = 1; +insert into t1 values(1,123.456,0.000000000000000000000000000001); +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_time_index_read.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_time_index_read.result new file mode 100644 index 00000000000..4e0dec32a28 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_time_index_read.result @@ -0,0 +1,22 @@ +DROP TABLE IF EXISTS ranges; +CREATE TABLE ranges ( +id int PRIMARY KEY, +start time, +end time, +UNIQUE KEY range_key(start, end) +); +INSERT INTO ranges VALUES (1, "00:00:00", "15:11:11"); +INSERT INTO ranges VALUES (2, "00:00:00", "838:59:59"); +INSERT INTO ranges VALUES (3, "15:11:12", "838:59:59"); +INSERT INTO ranges VALUES (4, "838:59:59", "00:00:00"); +INSERT INTO ranges VALUES (5, "-838:59:59", "838:59:59"); +SELECT start, end +FROM ranges FORCE INDEX(range_key) +ORDER BY start, end; +start end +-838:59:59 838:59:59 +00:00:00 15:11:11 +00:00:00 838:59:59 +15:11:12 838:59:59 +838:59:59 00:00:00 +DROP TABLE ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_time_order_asc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_time_order_asc.result new file mode 100644 index 00000000000..3c6520a69c9 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_time_order_asc.result @@ -0,0 +1,21 @@ +DROP TABLE IF EXISTS ranges; +CREATE TABLE ranges ( +id int PRIMARY KEY, +start time, +end time, +UNIQUE KEY range_key(start, end) +); +INSERT INTO ranges VALUES (1, "15:11:12", "838:59:59"); +INSERT INTO ranges VALUES (2, "00:00:00", "15:11:11"); +INSERT INTO ranges VALUES (3, "838:59:59", "00:00:00"); +INSERT INTO ranges VALUES (4, "00:00:00", "838:59:59"); +INSERT INTO ranges VALUES (5, "-838:59:59", "838:59:59"); +SELECT * FROM ranges FORCE INDEX(range_key) +ORDER BY start, end; +id start end +5 -838:59:59 838:59:59 +2 00:00:00 15:11:11 +4 00:00:00 838:59:59 +1 15:11:12 838:59:59 +3 838:59:59 00:00:00 +DROP TABLE ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_time_order_desc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_time_order_desc.result new file mode 100644 index 00000000000..c1be80309b8 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_time_order_desc.result @@ -0,0 +1,21 @@ +DROP TABLE IF EXISTS ranges; +CREATE TABLE ranges ( +id int PRIMARY KEY, +start time, +end time, +UNIQUE KEY range_key(start, end) +); +INSERT INTO ranges VALUES (1, "15:11:12", "838:59:59"); +INSERT INTO ranges VALUES (2, "00:00:00", "15:11:11"); +INSERT INTO ranges VALUES (3, "838:59:59", "00:00:00"); +INSERT INTO ranges VALUES (4, "00:00:00", "838:59:59"); +INSERT INTO ranges VALUES (5, "-838:59:59", "838:59:59"); +SELECT * FROM ranges FORCE INDEX(range_key) +ORDER BY start DESC, end DESC; +id start end +3 838:59:59 00:00:00 +1 15:11:12 838:59:59 +4 00:00:00 838:59:59 +2 00:00:00 15:11:11 +5 -838:59:59 838:59:59 +DROP TABLE ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_time_reinsert.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_time_reinsert.result new file mode 100644 index 00000000000..0613de3e2f3 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_time_reinsert.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS ranges; +CREATE TABLE ranges ( +id int PRIMARY KEY, +start time, +end time, +UNIQUE KEY range_key(start, end) +); +INSERT INTO ranges VALUES (1, "13:21:48", "15:11:12"); +SELECT * FROM ranges; +id start end +1 13:21:48 15:11:12 +DELETE FROM ranges WHERE id = 1; +INSERT INTO ranges VALUES (1, "13:21:48", "15:11:12"); +SELECT * FROM ranges; +id start end +1 13:21:48 15:11:12 +DROP TABLE ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_index_read.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_index_read.result new file mode 100644 index 00000000000..d833fb44024 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_index_read.result @@ -0,0 +1,20 @@ +DROP TABLE IF EXISTS ranges; +CREATE TABLE ranges ( +id int PRIMARY KEY, +start timestamp, +end timestamp, +UNIQUE KEY range_key(start, end) +); +INSERT INTO ranges VALUES (1, "1970-01-01 12:00:00", "2012-10-05 16:18:29"); +INSERT INTO ranges VALUES (2, "1970-01-01 12:00:00", "2038-01-18 15:14:07"); +INSERT INTO ranges VALUES (3, "2012-10-25 16:18:29", "2038-01-18 15:14:07"); +INSERT INTO ranges VALUES (4, "2038-01-18 15:14:07", "1970-01-01 12:00:00"); +SELECT start, end +FROM ranges FORCE INDEX(range_key) +ORDER BY start, end; +start end +1970-01-01 12:00:00 2012-10-05 16:18:29 +1970-01-01 12:00:00 2038-01-18 15:14:07 +2012-10-25 16:18:29 2038-01-18 15:14:07 +2038-01-18 15:14:07 1970-01-01 12:00:00 +DROP TABLE ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_order_asc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_order_asc.result new file mode 100644 index 00000000000..1e4ee102c9e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_order_asc.result @@ -0,0 +1,19 @@ +DROP TABLE IF EXISTS ranges; +CREATE TABLE ranges ( +id int PRIMARY KEY, +start timestamp, +end timestamp, +UNIQUE KEY range_key(start, end) +); +INSERT INTO ranges VALUES (1, "2012-10-25 16:18:29", "2038-01-18 15:14:07"); +INSERT INTO ranges VALUES (2, "1970-01-01 12:00:00", "2012-10-05 16:18:29"); +INSERT INTO ranges VALUES (3, "2038-01-18 15:14:07", "1970-01-01 12:00:00"); +INSERT INTO ranges VALUES (4, "1970-01-01 12:00:00", "2038-01-18 15:14:07"); +SELECT * FROM ranges FORCE INDEX(range_key) +ORDER BY start, end; +id start end +2 1970-01-01 12:00:00 2012-10-05 16:18:29 +4 1970-01-01 12:00:00 2038-01-18 15:14:07 +1 2012-10-25 16:18:29 2038-01-18 15:14:07 +3 2038-01-18 15:14:07 1970-01-01 12:00:00 +DROP TABLE ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_order_desc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_order_desc.result new file mode 100644 index 00000000000..23a5522320a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_order_desc.result @@ -0,0 +1,19 @@ +DROP TABLE IF EXISTS ranges; +CREATE TABLE ranges ( +id int PRIMARY KEY, +start timestamp, +end timestamp, +UNIQUE KEY range_key(start, end) +); +INSERT INTO ranges VALUES (1, "2012-10-25 16:18:29", "2038-01-18 15:14:07"); +INSERT INTO ranges VALUES (2, "1970-01-01 12:00:00", "2012-10-05 16:18:29"); +INSERT INTO ranges VALUES (3, "2038-01-18 15:14:07", "1970-01-01 12:00:00"); +INSERT INTO ranges VALUES (4, "1970-01-01 12:00:00", "2038-01-18 15:14:07"); +SELECT * FROM ranges FORCE INDEX(range_key) +ORDER BY start DESC, end DESC; +id start end +3 2038-01-18 15:14:07 1970-01-01 12:00:00 +1 2012-10-25 16:18:29 2038-01-18 15:14:07 +4 1970-01-01 12:00:00 2038-01-18 15:14:07 +2 1970-01-01 12:00:00 2012-10-05 16:18:29 +DROP TABLE ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_reinsert.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_reinsert.result new file mode 100644 index 00000000000..3f3277f5e64 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_reinsert.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS ranges; +CREATE TABLE ranges ( +id int PRIMARY KEY, +start timestamp, +end timestamp, +UNIQUE KEY range_key(start, end) +); +INSERT INTO ranges VALUES (1, "2010-01-01 00:00:00", "2012-10-05 23:59:59"); +SELECT * FROM ranges; +id start end +1 2010-01-01 00:00:00 2012-10-05 23:59:59 +DELETE FROM ranges WHERE id = 1; +INSERT INTO ranges VALUES (1, "2010-01-01 00:00:00", "2012-10-05 23:59:59"); +SELECT * FROM ranges; +id start end +1 2010-01-01 00:00:00 2012-10-05 23:59:59 +DROP TABLE ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_varchar.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_varchar.result Binary files differnew file mode 100644 index 00000000000..5c9cd959472 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_varchar.result diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_year_32bit_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_year_32bit_equal.result new file mode 100644 index 00000000000..04b3ba38395 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_year_32bit_equal.result @@ -0,0 +1,25 @@ +DROP TABLE IF EXISTS ranges; +CREATE TABLE ranges ( +id INT PRIMARY KEY, +start YEAR, +end YEAR, +UNIQUE KEY range_key(start, end) +); +INSERT INTO ranges VALUES (1, 1901, 2012); +Warnings: +Warning 1265 Data truncated for column 'start' at row 1 +INSERT INTO ranges VALUES (2, 1901, 2155); +Warnings: +Warning 1265 Data truncated for column 'start' at row 1 +Warning 1265 Data truncated for column 'end' at row 1 +INSERT INTO ranges VALUES (3, 2012, 2155); +Warnings: +Warning 1265 Data truncated for column 'end' at row 1 +INSERT INTO ranges VALUES (4, 2155, 1901); +Warnings: +Warning 1265 Data truncated for column 'start' at row 1 +Warning 1265 Data truncated for column 'end' at row 1 +SELECT * FROM ranges FORCE INDEX(range_key) +WHERE start = 1901 AND end = 2155; +id start end +DROP TABLE ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_year_64bit_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_year_64bit_equal.result new file mode 100644 index 00000000000..e96754e5e21 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_year_64bit_equal.result @@ -0,0 +1,16 @@ +DROP TABLE IF EXISTS ranges; +CREATE TABLE ranges ( +id INT PRIMARY KEY, +start YEAR, +end YEAR, +UNIQUE KEY range_key(start, end) +); +INSERT INTO ranges VALUES (1, 1901, 2012); +INSERT INTO ranges VALUES (2, 1901, 2155); +INSERT INTO ranges VALUES (3, 2012, 2155); +INSERT INTO ranges VALUES (4, 2155, 1901); +SELECT * FROM ranges FORCE INDEX(range_key) +WHERE start = 1901 AND end = 2155; +id start end +2 1901 2155 +DROP TABLE ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_year_index_read.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_year_index_read.result new file mode 100644 index 00000000000..997c5e7db8f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_year_index_read.result @@ -0,0 +1,20 @@ +DROP TABLE IF EXISTS ranges; +CREATE TABLE ranges ( +id INT PRIMARY KEY, +start YEAR, +end YEAR, +UNIQUE KEY range_key(start, end) +); +INSERT INTO ranges VALUES (1, 1901, 2012); +INSERT INTO ranges VALUES (2, 1901, 2155); +INSERT INTO ranges VALUES (3, 2012, 2155); +INSERT INTO ranges VALUES (4, 2155, 1901); +SELECT start, end +FROM ranges FORCE INDEX(range_key) +ORDER BY start, end; +start end +1901 2012 +1901 2155 +2012 2155 +2155 1901 +DROP TABLE ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_year_order_32bit_asc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_year_order_32bit_asc.result new file mode 100644 index 00000000000..9a84d115a87 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_year_order_32bit_asc.result @@ -0,0 +1,29 @@ +DROP TABLE IF EXISTS ranges; +CREATE TABLE ranges ( +id INT PRIMARY KEY, +start YEAR, +end YEAR, +UNIQUE KEY range_key(start, end) +); +INSERT INTO ranges VALUES (1, 2012, 2155); +Warnings: +Warning 1265 Data truncated for column 'end' at row 1 +INSERT INTO ranges VALUES (2, 1901, 2012); +Warnings: +Warning 1265 Data truncated for column 'start' at row 1 +INSERT INTO ranges VALUES (3, 2155, 1901); +Warnings: +Warning 1265 Data truncated for column 'start' at row 1 +Warning 1265 Data truncated for column 'end' at row 1 +INSERT INTO ranges VALUES (4, 1901, 2155); +Warnings: +Warning 1265 Data truncated for column 'start' at row 1 +Warning 1265 Data truncated for column 'end' at row 1 +SELECT * FROM ranges FORCE INDEX(range_key) +ORDER BY start, end; +id start end +2 1970 2012 +4 1970 1970 +1 2012 1970 +3 1970 1970 +DROP TABLE ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_year_order_32bit_desc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_year_order_32bit_desc.result new file mode 100644 index 00000000000..3deb7435030 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_year_order_32bit_desc.result @@ -0,0 +1,29 @@ +DROP TABLE IF EXISTS ranges; +CREATE TABLE ranges ( +id INT PRIMARY KEY, +start YEAR, +end YEAR, +UNIQUE KEY range_key(start, end) +); +INSERT INTO ranges VALUES (1, 2012, 2155); +Warnings: +Warning 1265 Data truncated for column 'end' at row 1 +INSERT INTO ranges VALUES (2, 1901, 2012); +Warnings: +Warning 1265 Data truncated for column 'start' at row 1 +INSERT INTO ranges VALUES (3, 2155, 1901); +Warnings: +Warning 1265 Data truncated for column 'start' at row 1 +Warning 1265 Data truncated for column 'end' at row 1 +INSERT INTO ranges VALUES (4, 1901, 2155); +Warnings: +Warning 1265 Data truncated for column 'start' at row 1 +Warning 1265 Data truncated for column 'end' at row 1 +SELECT * FROM ranges FORCE INDEX(range_key) +ORDER BY start DESC, end DESC; +id start end +3 1970 1970 +1 2012 1970 +4 1970 1970 +2 1970 2012 +DROP TABLE ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_year_order_64bit_asc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_year_order_64bit_asc.result new file mode 100644 index 00000000000..335b9eb9486 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_year_order_64bit_asc.result @@ -0,0 +1,19 @@ +DROP TABLE IF EXISTS ranges; +CREATE TABLE ranges ( +id INT PRIMARY KEY, +start YEAR, +end YEAR, +UNIQUE KEY range_key(start, end) +); +INSERT INTO ranges VALUES (1, 2012, 2155); +INSERT INTO ranges VALUES (2, 1901, 2012); +INSERT INTO ranges VALUES (3, 2155, 1901); +INSERT INTO ranges VALUES (4, 1901, 2155); +SELECT * FROM ranges FORCE INDEX(range_key) +ORDER BY start, end; +id start end +2 1901 2012 +4 1901 2155 +1 2012 2155 +3 2155 1901 +DROP TABLE ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_year_order_64bit_desc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_year_order_64bit_desc.result new file mode 100644 index 00000000000..524456b74bb --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_year_order_64bit_desc.result @@ -0,0 +1,19 @@ +DROP TABLE IF EXISTS ranges; +CREATE TABLE ranges ( +id INT PRIMARY KEY, +start YEAR, +end YEAR, +UNIQUE KEY range_key(start, end) +); +INSERT INTO ranges VALUES (1, 2012, 2155); +INSERT INTO ranges VALUES (2, 1901, 2012); +INSERT INTO ranges VALUES (3, 2155, 1901); +INSERT INTO ranges VALUES (4, 1901, 2155); +SELECT * FROM ranges FORCE INDEX(range_key) +ORDER BY start DESC, end DESC; +id start end +3 2155 1901 +1 2012 2155 +4 1901 2155 +2 1901 2012 +DROP TABLE ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_year_reinsert.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_year_reinsert.result new file mode 100644 index 00000000000..7362411d7cf --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_year_reinsert.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS ranges; +CREATE TABLE ranges ( +id INT PRIMARY KEY, +start YEAR, +end YEAR, +UNIQUE KEY range_key(start, end) +); +INSERT INTO ranges VALUES (1, 2010, 2012); +SELECT * FROM ranges; +id start end +1 2010 2012 +DELETE FROM ranges WHERE id = 1; +INSERT INTO ranges VALUES (1, 2010, 2012); +SELECT * FROM ranges; +id start end +1 2010 2012 +DROP TABLE ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_update_int.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_update_int.result new file mode 100644 index 00000000000..bfc30a1f871 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_update_int.result @@ -0,0 +1,30 @@ +DROP TABLE IF EXISTS scores; +CREATE TABLE scores ( +id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, +name CHAR(30) NOT NULL, +score INT NOT NULL, +KEY property (score, name) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE scores; +Table Create Table +scores CREATE TABLE `scores` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` char(30) NOT NULL, + `score` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `property` (`score`,`name`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO scores (name, score) VALUES("Taro Yamada", 29); +INSERT INTO scores (name, score) VALUES("Taro Yamada", -12); +INSERT INTO scores (name, score) VALUES("Jiro Yamada", 29); +INSERT INTO scores (name, score) VALUES("Taro Yamada", 10); +SELECT * FROM scores WHERE score = 29; +id name score +3 Jiro Yamada 29 +1 Taro Yamada 29 +UPDATE scores SET name = "Saburo YAMADA" WHERE id = 3; +SELECT * FROM scores WHERE score = 29; +id name score +3 Saburo YAMADA 29 +1 Taro Yamada 29 +DROP TABLE scores; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_update_string.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_update_string.result new file mode 100644 index 00000000000..550551d0052 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_update_string.result @@ -0,0 +1,34 @@ +drop table if exists listing; +set names utf8; +create table scores ( +id int primary key auto_increment not null, +name char(30) not null, +score int not null, +index property (name, score) +) default charset utf8; +show create table scores; +Table Create Table +scores CREATE TABLE `scores` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` char(30) NOT NULL, + `score` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `property` (`name`,`score`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +insert into scores (name, score) values("Taro Yamada", 29); +insert into scores (name, score) values("Taro Yamada", -12); +insert into scores (name, score) values("Jiro Yamada", 27); +insert into scores (name, score) values("Taro Yamada", 10); +select * from scores; +id name score +1 Taro Yamada 29 +2 Taro Yamada -12 +3 Jiro Yamada 27 +4 Taro Yamada 10 +update scores set name = "Taro Yamada" where name = "Jiro Yamada" and score = 27; +select * from scores where name = "Taro Yamada" and (score >= -12 and score < 29); +id name score +2 Taro Yamada -12 +4 Taro Yamada 10 +3 Taro Yamada 27 +drop table scores; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_char_exact_length.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_char_exact_length.result new file mode 100644 index 00000000000..95d7c78bbb6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_char_exact_length.result @@ -0,0 +1,16 @@ +DROP TABLE IF EXISTS ids; +CREATE TABLE ids ( +id char(10) CHARACTER SET latin1 PRIMARY KEY +); +INSERT INTO ids VALUES('abcdefghij'); +INSERT INTO ids VALUES('klmnopqrst'); +INSERT INTO ids VALUES('uvwxyz0123'); +SELECT * FROM ids FORCE INDEX(PRIMARY) ORDER BY id; +id +abcdefghij +klmnopqrst +uvwxyz0123 +SELECT * FROM ids FORCE INDEX(PRIMARY) WHERE id = 'abcdefghij'; +id +abcdefghij +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_char_null_character.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_char_null_character.result Binary files differnew file mode 100644 index 00000000000..f7a802060d5 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_char_null_character.result diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_char_short.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_char_short.result new file mode 100644 index 00000000000..fb08c6601bb --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_char_short.result @@ -0,0 +1,16 @@ +DROP TABLE IF EXISTS ids; +CREATE TABLE ids ( +id char(6) CHARACTER SET latin1 PRIMARY KEY +); +INSERT INTO ids VALUES("abcdef"); +INSERT INTO ids VALUES( "cdef"); +INSERT INTO ids VALUES( "ef"); +SELECT * FROM ids FORCE INDEX(PRIMARY) ORDER BY id; +id +abcdef +cdef +ef +SELECT * FROM ids FORCE INDEX(PRIMARY) WHERE id = "cdef"; +id +cdef +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_date.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_date.result new file mode 100644 index 00000000000..a460c7d99d6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_date.result @@ -0,0 +1,28 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +day DATE PRIMARY KEY, +title TEXT +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `day` date NOT NULL, + `title` text, + PRIMARY KEY (`day`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (day, title) VALUES ("2012-01-29", "clear day"); +INSERT INTO diaries (day, title) VALUES ("2012-01-30", "rainy day"); +INSERT INTO diaries (day, title) VALUES ("2012-01-31", "cloudy day"); +INSERT INTO diaries (day, title) VALUES ("2012-01-31", "duplicated day"); +ERROR 23000: Duplicate entry '2012-01-31' for key 'PRIMARY' +SELECT * FROM diaries; +day title +2012-01-29 clear day +2012-01-30 rainy day +2012-01-31 cloudy day +SELECT * FROM diaries +WHERE day BETWEEN "2012-01-29" AND "2012-01-30"; +day title +2012-01-29 clear day +2012-01-30 rainy day +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_datetime_with_fractional_seconds.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_datetime_with_fractional_seconds.result new file mode 100644 index 00000000000..ffbbfe3f460 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_datetime_with_fractional_seconds.result @@ -0,0 +1,30 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +day DATETIME(6) PRIMARY KEY, +title TEXT +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `day` datetime(6) NOT NULL, + `title` text, + PRIMARY KEY (`day`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (day, title) +VALUES ("2012-01-29 21:51:01.111111", "clear day"); +INSERT INTO diaries (day, title) +VALUES ("2012-01-30 01:23:45.333", "rainy day"); +INSERT INTO diaries (day, title) +VALUES ("2012-01-31 08:32:10.5555", "cloudy day"); +SELECT * FROM diaries; +day title +2012-01-29 21:51:01.111111 clear day +2012-01-30 01:23:45.333000 rainy day +2012-01-31 08:32:10.555500 cloudy day +SELECT * FROM diaries +WHERE day BETWEEN "2012-01-29 00:00:00.123456" AND +"2012-01-31 00:00:00.999999"; +day title +2012-01-29 21:51:01.111111 clear day +2012-01-30 01:23:45.333000 rainy day +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_datetime_without_fractional_seconds.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_datetime_without_fractional_seconds.result new file mode 100644 index 00000000000..76c529f7fbb --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_datetime_without_fractional_seconds.result @@ -0,0 +1,29 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +day DATETIME PRIMARY KEY, +title TEXT +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `day` datetime NOT NULL, + `title` text, + PRIMARY KEY (`day`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (day, title) +VALUES ("2012-01-29 21:51:01", "clear day"); +INSERT INTO diaries (day, title) +VALUES ("2012-01-30 01:23:45", "rainy day"); +INSERT INTO diaries (day, title) +VALUES ("2012-01-31 08:32:10", "cloudy day"); +SELECT * FROM diaries; +day title +2012-01-29 21:51:01 clear day +2012-01-30 01:23:45 rainy day +2012-01-31 08:32:10 cloudy day +SELECT * FROM diaries +WHERE day BETWEEN "2012-01-29 00:00:00" AND "2012-01-31 00:00:00"; +day title +2012-01-29 21:51:01 clear day +2012-01-30 01:23:45 rainy day +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_decimal_with_fractional_seconds.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_decimal_with_fractional_seconds.result new file mode 100644 index 00000000000..9b1e8e7d7e8 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_decimal_with_fractional_seconds.result @@ -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; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_decimal_without_fractional_seconds.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_decimal_without_fractional_seconds.result new file mode 100644 index 00000000000..0624ab2f2b2 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_decimal_without_fractional_seconds.result @@ -0,0 +1,25 @@ +DROP TABLE IF EXISTS releases; +CREATE TABLE releases ( +version DECIMAL PRIMARY KEY, +message TEXT +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE releases; +Table Create Table +releases CREATE TABLE `releases` ( + `version` decimal(10,0) NOT NULL, + `message` text, + PRIMARY KEY (`version`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO releases (version, message) VALUES (1, "the first release!!!"); +INSERT INTO releases (version, message) VALUES (10, "10th release!"); +INSERT INTO releases (version, message) VALUES (999, "the last release!"); +SELECT * FROM releases; +version message +1 the first release!!! +10 10th release! +999 the last release! +SELECT * FROM releases WHERE version BETWEEN "1" AND "10"; +version message +1 the first release!!! +10 10th release! +DROP TABLE releases; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_time_with_fractional_seconds.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_time_with_fractional_seconds.result new file mode 100644 index 00000000000..639114875e9 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_time_with_fractional_seconds.result @@ -0,0 +1,29 @@ +DROP TABLE IF EXISTS running_records; +CREATE TABLE running_records ( +time TIME(6) PRIMARY KEY, +title TEXT +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE running_records; +Table Create Table +running_records CREATE TABLE `running_records` ( + `time` time(6) NOT NULL, + `title` text, + PRIMARY KEY (`time`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO running_records (time, title) +VALUES ("01:00:00.000001", "normal condition"); +INSERT INTO running_records (time, title) +VALUES ("12:23:34.123456", "bad condition"); +INSERT INTO running_records (time, title) +VALUES ("-838:59:59.000000", "record failure"); +SELECT * FROM running_records; +time title +-838:59:59.000000 record failure +01:00:00.000001 normal condition +12:23:34.123456 bad condition +SELECT * FROM running_records +WHERE time BETWEEN "00:59:59.999999" AND "12:23:34.123456"; +time title +01:00:00.000001 normal condition +12:23:34.123456 bad condition +DROP TABLE running_records; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_time_without_fractional_seconds.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_time_without_fractional_seconds.result new file mode 100644 index 00000000000..6a89cdc33dd --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_time_without_fractional_seconds.result @@ -0,0 +1,29 @@ +DROP TABLE IF EXISTS running_records; +CREATE TABLE running_records ( +time TIME PRIMARY KEY, +title TEXT +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE running_records; +Table Create Table +running_records CREATE TABLE `running_records` ( + `time` time NOT NULL, + `title` text, + PRIMARY KEY (`time`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO running_records (time, title) +VALUES ("01:00:00", "normal condition"); +INSERT INTO running_records (time, title) +VALUES ("12:23:34", "bad condition"); +INSERT INTO running_records (time, title) +VALUES ("-838:59:59", "record failure"); +SELECT * FROM running_records; +time title +-838:59:59 record failure +01:00:00 normal condition +12:23:34 bad condition +SELECT * FROM running_records +WHERE time BETWEEN "00:59:59" AND "12:23:34"; +time title +01:00:00 normal condition +12:23:34 bad condition +DROP TABLE running_records; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_timestamp_with_fractional_seconds.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_timestamp_with_fractional_seconds.result new file mode 100644 index 00000000000..7040cc22b2e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_timestamp_with_fractional_seconds.result @@ -0,0 +1,30 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +time TIMESTAMP(6) PRIMARY KEY, +title TEXT +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), + `title` text, + PRIMARY KEY (`time`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (time, title) +VALUES ("2012-01-29 21:51:01.111111", "clear day"); +INSERT INTO diaries (time, title) +VALUES ("2012-01-30 01:23:45.333", "rainy day"); +INSERT INTO diaries (time, title) +VALUES ("2012-01-31 08:32:10.5555", "cloudy day"); +SELECT * FROM diaries; +time title +2012-01-29 21:51:01.111111 clear day +2012-01-30 01:23:45.333000 rainy day +2012-01-31 08:32:10.555500 cloudy day +SELECT * FROM diaries +WHERE time BETWEEN "2012-01-29 00:00:00.123456" AND +"2012-01-31 00:00:00.999999"; +time title +2012-01-29 21:51:01.111111 clear day +2012-01-30 01:23:45.333000 rainy day +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_timestamp_without_fractional_seconds.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_timestamp_without_fractional_seconds.result new file mode 100644 index 00000000000..38017f6f8cc --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_timestamp_without_fractional_seconds.result @@ -0,0 +1,26 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +time TIMESTAMP PRIMARY KEY, +title TEXT +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `title` text, + PRIMARY KEY (`time`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (time, title) VALUES ("2012-01-29 21:51:01", "clear day"); +INSERT INTO diaries (time, title) VALUES ("2012-01-30 01:23:45", "rainy day"); +INSERT INTO diaries (time, title) VALUES ("2012-01-31 08:32:10", "cloudy day"); +SELECT * FROM diaries; +time title +2012-01-29 21:51:01 clear day +2012-01-30 01:23:45 rainy day +2012-01-31 08:32:10 cloudy day +SELECT * FROM diaries +WHERE time BETWEEN "2012-01-29 00:00:00" AND "2012-01-31 00:00:00"; +time title +2012-01-29 21:51:01 clear day +2012-01-30 01:23:45 rainy day +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_varchar_null_character.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_varchar_null_character.result Binary files differnew file mode 100644 index 00000000000..9079d9c4064 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_varchar_null_character.result diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_year.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_year.result new file mode 100644 index 00000000000..af9b3a2dbfb --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_year.result @@ -0,0 +1,29 @@ +DROP TABLE IF EXISTS aniversary_memos; +CREATE TABLE aniversary_memos ( +party_year YEAR PRIMARY KEY, +title TEXT +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE aniversary_memos; +Table Create Table +aniversary_memos CREATE TABLE `aniversary_memos` ( + `party_year` year(4) NOT NULL, + `title` text, + PRIMARY KEY (`party_year`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO aniversary_memos (party_year, title) +VALUES ("11", "We need a big cake!"); +INSERT INTO aniversary_memos (party_year, title) +VALUES ("2012", "Invitations are sent."); +INSERT INTO aniversary_memos (party_year, title) +VALUES ("13", "Wow! Today is the anniversary party day!"); +SELECT * FROM aniversary_memos; +party_year title +2011 We need a big cake! +2012 Invitations are sent. +2013 Wow! Today is the anniversary party day! +SELECT * FROM aniversary_memos +WHERE party_year BETWEEN "12" AND "2013"; +party_year title +2012 Invitations are sent. +2013 Wow! Today is the anniversary party day! +DROP TABLE aniversary_memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_range_greater_than_asc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_greater_than_asc.result new file mode 100644 index 00000000000..1ca4b145f54 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_greater_than_asc.result @@ -0,0 +1,16 @@ +DROP TABLE IF EXISTS ids; +SET NAMES UTF8; +CREATE TABLE ids ( +id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT +) ENGINE=Mroonga DEFAULT CHARSET=utf8; +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +SELECT * FROM ids WHERE ids.id > 1 ORDER BY ids.id ASC LIMIT 3; +id +2 +3 +4 +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_range_greater_than_desc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_greater_than_desc.result new file mode 100644 index 00000000000..80dcb25ffe6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_greater_than_desc.result @@ -0,0 +1,15 @@ +DROP TABLE IF EXISTS ids; +SET NAMES UTF8; +CREATE TABLE ids ( +id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT +) ENGINE=Mroonga DEFAULT CHARSET=utf8; +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +SELECT * FROM ids WHERE ids.id > 3 ORDER BY ids.id DESC LIMIT 3; +id +5 +4 +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_range_greater_than_or_equal_asc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_greater_than_or_equal_asc.result new file mode 100644 index 00000000000..4c1ff997d79 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_greater_than_or_equal_asc.result @@ -0,0 +1,16 @@ +DROP TABLE IF EXISTS ids; +SET NAMES UTF8; +CREATE TABLE ids ( +id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT +) ENGINE=Mroonga DEFAULT CHARSET=utf8; +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +SELECT * FROM ids WHERE ids.id >= 2 ORDER BY ids.id ASC LIMIT 3; +id +2 +3 +4 +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_range_greater_than_or_equal_desc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_greater_than_or_equal_desc.result new file mode 100644 index 00000000000..4998725aef5 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_greater_than_or_equal_desc.result @@ -0,0 +1,16 @@ +DROP TABLE IF EXISTS ids; +SET NAMES UTF8; +CREATE TABLE ids ( +id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT +) ENGINE=Mroonga DEFAULT CHARSET=utf8; +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +SELECT * FROM ids WHERE ids.id >= 3 ORDER BY ids.id DESC LIMIT 3; +id +5 +4 +3 +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_range_less_than_asc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_less_than_asc.result new file mode 100644 index 00000000000..8b142f30610 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_less_than_asc.result @@ -0,0 +1,16 @@ +DROP TABLE IF EXISTS ids; +SET NAMES UTF8; +CREATE TABLE ids ( +id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT +) ENGINE=Mroonga DEFAULT CHARSET=utf8; +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +SELECT * FROM ids WHERE ids.id < 4 ORDER BY ids.id ASC LIMIT 3; +id +1 +2 +3 +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_range_less_than_desc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_less_than_desc.result new file mode 100644 index 00000000000..eaf5b87e62c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_less_than_desc.result @@ -0,0 +1,16 @@ +DROP TABLE IF EXISTS ids; +SET NAMES UTF8; +CREATE TABLE ids ( +id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT +) ENGINE=Mroonga DEFAULT CHARSET=utf8; +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +SELECT * FROM ids WHERE ids.id < 4 ORDER BY ids.id DESC LIMIT 3; +id +3 +2 +1 +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_range_less_than_or_equal_asc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_less_than_or_equal_asc.result new file mode 100644 index 00000000000..e1e96c9ca8b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_less_than_or_equal_asc.result @@ -0,0 +1,16 @@ +DROP TABLE IF EXISTS ids; +SET NAMES UTF8; +CREATE TABLE ids ( +id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT +) ENGINE=Mroonga DEFAULT CHARSET=utf8; +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +SELECT * FROM ids WHERE ids.id <= 4 ORDER BY ids.id ASC LIMIT 3; +id +1 +2 +3 +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_range_less_than_or_equal_desc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_less_than_or_equal_desc.result new file mode 100644 index 00000000000..e8124ca14c0 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_less_than_or_equal_desc.result @@ -0,0 +1,16 @@ +DROP TABLE IF EXISTS ids; +SET NAMES UTF8; +CREATE TABLE ids ( +id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT +) ENGINE=Mroonga DEFAULT CHARSET=utf8; +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +SELECT * FROM ids WHERE ids.id <= 4 ORDER BY ids.id DESC LIMIT 3; +id +4 +3 +2 +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_read_multiple_bigint.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_read_multiple_bigint.result new file mode 100644 index 00000000000..77b321015c9 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_read_multiple_bigint.result @@ -0,0 +1,38 @@ +DROP TABLE IF EXISTS ids; +CREATE TABLE ids ( +id BIGINT, +value BIGINT, +KEY (id, value) +); +INSERT INTO ids VALUES ( -1, 16); +INSERT INTO ids VALUES ( -2, 8); +INSERT INTO ids VALUES ( -4, 4); +INSERT INTO ids VALUES ( -8, 2); +INSERT INTO ids VALUES (-16, 1); +INSERT INTO ids VALUES ( 16, -1); +INSERT INTO ids VALUES ( 8, -2); +INSERT INTO ids VALUES ( 4, -4); +INSERT INTO ids VALUES ( 2, -8); +INSERT INTO ids VALUES ( 1, -16); +SELECT * FROM ids; +id value +-16 1 +-8 2 +-4 4 +-2 8 +-1 16 +1 -16 +2 -8 +4 -4 +8 -2 +16 -1 +SELECT * FROM ids WHERE id BETWEEN -4 AND 8; +id value +-4 4 +-2 8 +-1 16 +1 -16 +2 -8 +4 -4 +8 -2 +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_read_multiple_bigint_unsigned.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_read_multiple_bigint_unsigned.result new file mode 100644 index 00000000000..b0004a3c87a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_read_multiple_bigint_unsigned.result @@ -0,0 +1,31 @@ +DROP TABLE IF EXISTS ids; +CREATE TABLE ids ( +id BIGINT UNSIGNED, +value BIGINT UNSIGNED, +KEY (id, value) +); +INSERT INTO ids VALUES ( 1, 1); +INSERT INTO ids VALUES ( 2, 2); +INSERT INTO ids VALUES ( 4, 3); +INSERT INTO ids VALUES ( 8, 4); +INSERT INTO ids VALUES (16, 5); +INSERT INTO ids VALUES (32, 6); +INSERT INTO ids VALUES (64, 7); +INSERT INTO ids VALUES (128, 8); +SELECT * FROM ids; +id value +1 1 +2 2 +4 3 +8 4 +16 5 +32 6 +64 7 +128 8 +SELECT * FROM ids WHERE id BETWEEN 4 AND 32; +id value +4 3 +8 4 +16 5 +32 6 +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_read_multiple_double.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_read_multiple_double.result new file mode 100644 index 00000000000..862a314c9c2 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_read_multiple_double.result @@ -0,0 +1,38 @@ +DROP TABLE IF EXISTS ids; +CREATE TABLE ids ( +id DOUBLE, +value DOUBLE, +KEY (id, value) +); +INSERT INTO ids VALUES ( -1.1, 16.16); +INSERT INTO ids VALUES ( -2.2, 8.8); +INSERT INTO ids VALUES ( -4.4, 4.4); +INSERT INTO ids VALUES ( -8.8, 2.2); +INSERT INTO ids VALUES (-16.6, 1.1); +INSERT INTO ids VALUES ( 16.6, -1.1); +INSERT INTO ids VALUES ( 8.8, -2.2); +INSERT INTO ids VALUES ( 4.4, -4.4); +INSERT INTO ids VALUES ( 2.2, -8.8); +INSERT INTO ids VALUES ( 1.1, -16.16); +SELECT * FROM ids; +id value +-16.6 1.1 +-8.8 2.2 +-4.4 4.4 +-2.2 8.8 +-1.1 16.16 +1.1 -16.16 +2.2 -8.8 +4.4 -4.4 +8.8 -2.2 +16.6 -1.1 +SELECT * FROM ids WHERE id BETWEEN -4.5 AND 8.9; +id value +-4.4 4.4 +-2.2 8.8 +-1.1 16.16 +1.1 -16.16 +2.2 -8.8 +4.4 -4.4 +8.8 -2.2 +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_read_multiple_float.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_read_multiple_float.result new file mode 100644 index 00000000000..04d44130ed4 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_read_multiple_float.result @@ -0,0 +1,38 @@ +DROP TABLE IF EXISTS ids; +CREATE TABLE ids ( +id FLOAT, +value FLOAT, +KEY (id, value) +); +INSERT INTO ids VALUES ( -1.1, 16.16); +INSERT INTO ids VALUES ( -2.2, 8.8); +INSERT INTO ids VALUES ( -4.4, 4.4); +INSERT INTO ids VALUES ( -8.8, 2.2); +INSERT INTO ids VALUES (-16.6, 1.1); +INSERT INTO ids VALUES ( 16.6, -1.1); +INSERT INTO ids VALUES ( 8.8, -2.2); +INSERT INTO ids VALUES ( 4.4, -4.4); +INSERT INTO ids VALUES ( 2.2, -8.8); +INSERT INTO ids VALUES ( 1.1, -16.16); +SELECT * FROM ids; +id value +-16.6 1.1 +-8.8 2.2 +-4.4 4.4 +-2.2 8.8 +-1.1 16.16 +1.1 -16.16 +2.2 -8.8 +4.4 -4.4 +8.8 -2.2 +16.6 -1.1 +SELECT * FROM ids WHERE id BETWEEN -4.5 AND 8.9; +id value +-4.4 4.4 +-2.2 8.8 +-1.1 16.16 +1.1 -16.16 +2.2 -8.8 +4.4 -4.4 +8.8 -2.2 +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_read_multiple_int.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_read_multiple_int.result new file mode 100644 index 00000000000..8d3f6f7ff9e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_read_multiple_int.result @@ -0,0 +1,38 @@ +DROP TABLE IF EXISTS ids; +CREATE TABLE ids ( +id INT, +value INT, +KEY (id, value) +); +INSERT INTO ids VALUES ( -1, 16); +INSERT INTO ids VALUES ( -2, 8); +INSERT INTO ids VALUES ( -4, 4); +INSERT INTO ids VALUES ( -8, 2); +INSERT INTO ids VALUES (-16, 1); +INSERT INTO ids VALUES ( 16, -1); +INSERT INTO ids VALUES ( 8, -2); +INSERT INTO ids VALUES ( 4, -4); +INSERT INTO ids VALUES ( 2, -8); +INSERT INTO ids VALUES ( 1, -16); +SELECT * FROM ids; +id value +-16 1 +-8 2 +-4 4 +-2 8 +-1 16 +1 -16 +2 -8 +4 -4 +8 -2 +16 -1 +SELECT * FROM ids WHERE id BETWEEN -4 AND 8; +id value +-4 4 +-2 8 +-1 16 +1 -16 +2 -8 +4 -4 +8 -2 +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_read_multiple_int_unsigned.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_read_multiple_int_unsigned.result new file mode 100644 index 00000000000..d09f97e0d06 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_read_multiple_int_unsigned.result @@ -0,0 +1,31 @@ +DROP TABLE IF EXISTS ids; +CREATE TABLE ids ( +id INT UNSIGNED, +value INT UNSIGNED, +KEY (id, value) +); +INSERT INTO ids VALUES ( 1, 1); +INSERT INTO ids VALUES ( 2, 2); +INSERT INTO ids VALUES ( 4, 3); +INSERT INTO ids VALUES ( 8, 4); +INSERT INTO ids VALUES (16, 5); +INSERT INTO ids VALUES (32, 6); +INSERT INTO ids VALUES (64, 7); +INSERT INTO ids VALUES (128, 8); +SELECT * FROM ids; +id value +1 1 +2 2 +4 3 +8 4 +16 5 +32 6 +64 7 +128 8 +SELECT * FROM ids WHERE id BETWEEN 4 AND 32; +id value +4 3 +8 4 +16 5 +32 6 +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_read_multiple_mediumint.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_read_multiple_mediumint.result new file mode 100644 index 00000000000..5242f10ff02 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_read_multiple_mediumint.result @@ -0,0 +1,38 @@ +DROP TABLE IF EXISTS ids; +CREATE TABLE ids ( +id MEDIUMINT, +value MEDIUMINT, +KEY (id, value) +); +INSERT INTO ids VALUES ( -1, 16); +INSERT INTO ids VALUES ( -2, 8); +INSERT INTO ids VALUES ( -4, 4); +INSERT INTO ids VALUES ( -8, 2); +INSERT INTO ids VALUES (-16, 1); +INSERT INTO ids VALUES ( 16, -1); +INSERT INTO ids VALUES ( 8, -2); +INSERT INTO ids VALUES ( 4, -4); +INSERT INTO ids VALUES ( 2, -8); +INSERT INTO ids VALUES ( 1, -16); +SELECT * FROM ids; +id value +-16 1 +-8 2 +-4 4 +-2 8 +-1 16 +1 -16 +2 -8 +4 -4 +8 -2 +16 -1 +SELECT * FROM ids WHERE id BETWEEN -4 AND 8; +id value +-4 4 +-2 8 +-1 16 +1 -16 +2 -8 +4 -4 +8 -2 +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_read_multiple_mediumint_unsigned.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_read_multiple_mediumint_unsigned.result new file mode 100644 index 00000000000..41d9c0ebeeb --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_read_multiple_mediumint_unsigned.result @@ -0,0 +1,31 @@ +DROP TABLE IF EXISTS ids; +CREATE TABLE ids ( +id MEDIUMINT UNSIGNED, +value MEDIUMINT UNSIGNED, +KEY (id, value) +); +INSERT INTO ids VALUES ( 1, 1); +INSERT INTO ids VALUES ( 2, 2); +INSERT INTO ids VALUES ( 4, 3); +INSERT INTO ids VALUES ( 8, 4); +INSERT INTO ids VALUES (16, 5); +INSERT INTO ids VALUES (32, 6); +INSERT INTO ids VALUES (64, 7); +INSERT INTO ids VALUES (128, 8); +SELECT * FROM ids; +id value +1 1 +2 2 +4 3 +8 4 +16 5 +32 6 +64 7 +128 8 +SELECT * FROM ids WHERE id BETWEEN 4 AND 32; +id value +4 3 +8 4 +16 5 +32 6 +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_read_multiple_smallint.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_read_multiple_smallint.result new file mode 100644 index 00000000000..e34b7b7ddab --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_read_multiple_smallint.result @@ -0,0 +1,38 @@ +DROP TABLE IF EXISTS ids; +CREATE TABLE ids ( +id SMALLINT, +value SMALLINT, +KEY (id, value) +); +INSERT INTO ids VALUES ( -1, 16); +INSERT INTO ids VALUES ( -2, 8); +INSERT INTO ids VALUES ( -4, 4); +INSERT INTO ids VALUES ( -8, 2); +INSERT INTO ids VALUES (-16, 1); +INSERT INTO ids VALUES ( 16, -1); +INSERT INTO ids VALUES ( 8, -2); +INSERT INTO ids VALUES ( 4, -4); +INSERT INTO ids VALUES ( 2, -8); +INSERT INTO ids VALUES ( 1, -16); +SELECT * FROM ids; +id value +-16 1 +-8 2 +-4 4 +-2 8 +-1 16 +1 -16 +2 -8 +4 -4 +8 -2 +16 -1 +SELECT * FROM ids WHERE id BETWEEN -4 AND 8; +id value +-4 4 +-2 8 +-1 16 +1 -16 +2 -8 +4 -4 +8 -2 +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_read_multiple_smallint_unsigned.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_read_multiple_smallint_unsigned.result new file mode 100644 index 00000000000..9014f9afaec --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_read_multiple_smallint_unsigned.result @@ -0,0 +1,31 @@ +DROP TABLE IF EXISTS ids; +CREATE TABLE ids ( +id SMALLINT UNSIGNED, +value SMALLINT UNSIGNED, +KEY (id, value) +); +INSERT INTO ids VALUES ( 1, 1); +INSERT INTO ids VALUES ( 2, 2); +INSERT INTO ids VALUES ( 4, 3); +INSERT INTO ids VALUES ( 8, 4); +INSERT INTO ids VALUES (16, 5); +INSERT INTO ids VALUES (32, 6); +INSERT INTO ids VALUES (64, 7); +INSERT INTO ids VALUES (128, 8); +SELECT * FROM ids; +id value +1 1 +2 2 +4 3 +8 4 +16 5 +32 6 +64 7 +128 8 +SELECT * FROM ids WHERE id BETWEEN 4 AND 32; +id value +4 3 +8 4 +16 5 +32 6 +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_read_multiple_tinyint.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_read_multiple_tinyint.result new file mode 100644 index 00000000000..63b27fdd4ff --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_read_multiple_tinyint.result @@ -0,0 +1,38 @@ +DROP TABLE IF EXISTS ids; +CREATE TABLE ids ( +id TINYINT, +value TINYINT, +KEY (id, value) +); +INSERT INTO ids VALUES ( -1, 16); +INSERT INTO ids VALUES ( -2, 8); +INSERT INTO ids VALUES ( -4, 4); +INSERT INTO ids VALUES ( -8, 2); +INSERT INTO ids VALUES (-16, 1); +INSERT INTO ids VALUES ( 16, -1); +INSERT INTO ids VALUES ( 8, -2); +INSERT INTO ids VALUES ( 4, -4); +INSERT INTO ids VALUES ( 2, -8); +INSERT INTO ids VALUES ( 1, -16); +SELECT * FROM ids; +id value +-16 1 +-8 2 +-4 4 +-2 8 +-1 16 +1 -16 +2 -8 +4 -4 +8 -2 +16 -1 +SELECT * FROM ids WHERE id BETWEEN -4 AND 8; +id value +-4 4 +-2 8 +-1 16 +1 -16 +2 -8 +4 -4 +8 -2 +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_read_multiple_tinyint_unsigned.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_read_multiple_tinyint_unsigned.result new file mode 100644 index 00000000000..412b9b7c0c8 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_read_multiple_tinyint_unsigned.result @@ -0,0 +1,31 @@ +DROP TABLE IF EXISTS ids; +CREATE TABLE ids ( +id TINYINT UNSIGNED, +value TINYINT UNSIGNED, +KEY (id, value) +); +INSERT INTO ids VALUES ( 1, 1); +INSERT INTO ids VALUES ( 2, 2); +INSERT INTO ids VALUES ( 4, 3); +INSERT INTO ids VALUES ( 8, 4); +INSERT INTO ids VALUES (16, 5); +INSERT INTO ids VALUES (32, 6); +INSERT INTO ids VALUES (64, 7); +INSERT INTO ids VALUES (128, 8); +SELECT * FROM ids; +id value +1 1 +2 2 +4 3 +8 4 +16 5 +32 6 +64 7 +128 8 +SELECT * FROM ids WHERE id BETWEEN 4 AND 32; +id value +4 3 +8 4 +16 5 +32 6 +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_read_multiple_varchar.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_read_multiple_varchar.result new file mode 100644 index 00000000000..c08522d0dab --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_read_multiple_varchar.result @@ -0,0 +1,29 @@ +DROP TABLE IF EXISTS ids; +CREATE TABLE ids ( +id VARCHAR(5), +value VARCHAR(10), +KEY (id, value) +) DEFAULT CHARSET=utf8 COLLATE utf8_bin; +INSERT INTO ids VALUES ("abc", "Abc"); +INSERT INTO ids VALUES ("acd", "aBc"); +INSERT INTO ids VALUES ("ade", "abC"); +INSERT INTO ids VALUES ("aef", "abc"); +INSERT INTO ids VALUES ("ABC", "aBC"); +INSERT INTO ids VALUES ("ACD", "AbC"); +INSERT INTO ids VALUES ("ADE", "ABc"); +INSERT INTO ids VALUES ("AEF", "ABC"); +SELECT * FROM ids; +id value +ABC aBC +ACD AbC +ADE ABc +AEF ABC +abc Abc +acd aBc +ade abC +aef abc +SELECT * FROM ids WHERE id BETWEEN "ab" AND "ad"; +id value +abc Abc +acd aBc +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_read_multiple_varchar_collation.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_read_multiple_varchar_collation.result new file mode 100644 index 00000000000..9882f2b1598 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_read_multiple_varchar_collation.result @@ -0,0 +1,31 @@ +DROP TABLE IF EXISTS ids; +CREATE TABLE ids ( +id VARCHAR(5), +value VARCHAR(10), +KEY (id, value) +) DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; +INSERT INTO ids VALUES ("abc", "Abc"); +INSERT INTO ids VALUES ("acd", "aBc"); +INSERT INTO ids VALUES ("ade", "abC"); +INSERT INTO ids VALUES ("aef", "abc"); +INSERT INTO ids VALUES ("ABC", "aBC"); +INSERT INTO ids VALUES ("ACD", "AbC"); +INSERT INTO ids VALUES ("ADE", "ABc"); +INSERT INTO ids VALUES ("AEF", "ABC"); +SELECT * FROM ids; +id value +abc Abc +acd aBc +ade abC +aef abc +ABC aBC +ACD AbC +ADE ABc +AEF ABC +SELECT * FROM ids WHERE id BETWEEN "ab" AND "ad"; +id value +abc Abc +ABC aBC +acd aBc +ACD AbC +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_read_normal_int.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_read_normal_int.result new file mode 100644 index 00000000000..67f1f4f8268 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_read_normal_int.result @@ -0,0 +1,55 @@ +DROP TABLE IF EXISTS ids; +CREATE TABLE ids ( +id INT, +KEY (id) +); +INSERT INTO ids VALUES (1); +INSERT INTO ids SELECT id + 1 FROM ids; +INSERT INTO ids SELECT id + 2 FROM ids; +INSERT INTO ids SELECT id + 4 FROM ids; +INSERT INTO ids SELECT id + 8 FROM ids; +INSERT INTO ids SELECT id + 16 FROM ids; +SELECT * FROM ids; +id +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +SELECT * FROM ids WHERE id BETWEEN 10 AND 16; +id +10 +11 +12 +13 +14 +15 +16 +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_read_normal_varchar.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_read_normal_varchar.result new file mode 100644 index 00000000000..2cdde6c4086 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_read_normal_varchar.result @@ -0,0 +1,55 @@ +DROP TABLE IF EXISTS ids; +CREATE TABLE ids ( +id VARCHAR(10), +KEY (id) +); +INSERT INTO ids VALUES ("1"); +INSERT INTO ids SELECT id + "1" FROM ids; +INSERT INTO ids SELECT id + "2" FROM ids; +INSERT INTO ids SELECT id + "4" FROM ids; +INSERT INTO ids SELECT id + "8" FROM ids; +INSERT INTO ids SELECT id + "16" FROM ids; +SELECT * FROM ids; +id +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +SELECT * FROM ids WHERE id BETWEEN "10" AND "16"; +id +10 +11 +12 +13 +14 +15 +16 +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_read_primary_int.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_read_primary_int.result new file mode 100644 index 00000000000..23f63d2ffca --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_read_primary_int.result @@ -0,0 +1,55 @@ +DROP TABLE IF EXISTS ids; +CREATE TABLE ids ( +id INT, +PRIMARY KEY (id) +); +INSERT INTO ids VALUES (1); +INSERT INTO ids SELECT id + 1 FROM ids; +INSERT INTO ids SELECT id + 2 FROM ids; +INSERT INTO ids SELECT id + 4 FROM ids; +INSERT INTO ids SELECT id + 8 FROM ids; +INSERT INTO ids SELECT id + 16 FROM ids; +SELECT * FROM ids; +id +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +SELECT * FROM ids WHERE id BETWEEN 10 AND 16; +id +10 +11 +12 +13 +14 +15 +16 +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_read_primary_varchar.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_read_primary_varchar.result new file mode 100644 index 00000000000..7fa17bd79d9 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_read_primary_varchar.result @@ -0,0 +1,55 @@ +DROP TABLE IF EXISTS ids; +CREATE TABLE ids ( +id VARCHAR(10), +PRIMARY KEY (id) +); +INSERT INTO ids VALUES ("1"); +INSERT INTO ids SELECT id + "1" FROM ids; +INSERT INTO ids SELECT id + "2" FROM ids; +INSERT INTO ids SELECT id + "4" FROM ids; +INSERT INTO ids SELECT id + "8" FROM ids; +INSERT INTO ids SELECT id + "16" FROM ids; +SELECT * FROM ids; +id +1 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +2 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +3 +30 +31 +32 +4 +5 +6 +7 +8 +9 +SELECT * FROM ids WHERE id BETWEEN "10" AND "16"; +id +10 +11 +12 +13 +14 +15 +16 +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_unique_delete_by_primary_key.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_unique_delete_by_primary_key.result new file mode 100644 index 00000000000..4e10cf72415 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_unique_delete_by_primary_key.result @@ -0,0 +1,13 @@ +DROP TABLE IF EXISTS users; +CREATE TABLE users ( +id int PRIMARY KEY, +name varchar(100) NOT NULL, +UNIQUE KEY name (name) +) DEFAULT CHARSET=utf8; +INSERT INTO users VALUES (1, "Alice"); +DELETE FROM users WHERE id = 1; +INSERT INTO users VALUES (1, "Alice"); +SELECT * FROM users; +id name +1 Alice +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_unique_insert_after_error.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_unique_insert_after_error.result new file mode 100644 index 00000000000..7b2c0b86214 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_unique_insert_after_error.result @@ -0,0 +1,15 @@ +DROP TABLE IF EXISTS users; +CREATE TABLE users ( +id int PRIMARY KEY, +name varchar(100) NOT NULL, +UNIQUE KEY name (name) +) DEFAULT CHARSET=utf8; +INSERT INTO users VALUES (1, "Alice"); +INSERT INTO users VALUES (1, "Bob"); +ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +INSERT INTO users VALUES (2, "Bob"); +SELECT * FROM users; +id name +1 Alice +2 Bob +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_unique_varchar.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_unique_varchar.result new file mode 100644 index 00000000000..155cdf15959 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_unique_varchar.result @@ -0,0 +1,15 @@ +DROP TABLE IF EXISTS users; +CREATE TABLE users ( +name varchar(100) NOT NULL, +UNIQUE KEY name (name) +) DEFAULT CHARSET=utf8; +INSERT INTO users VALUES ("Alice"); +INSERT INTO users VALUES ("Bob"); +SELECT * FROM users; +name +Alice +Bob +SELECT * FROM users WHERE name = "aLiCe"; +name +Alice +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_update_multiple_column.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_update_multiple_column.result new file mode 100644 index 00000000000..9165ca26fea --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_update_multiple_column.result @@ -0,0 +1,18 @@ +DROP TABLE IF EXISTS scores; +SET NAMES utf8; +CREATE TABLE scores ( +deleted BOOLEAN, +value INT, +INDEX (deleted, value) +); +INSERT INTO scores VALUES (FALSE, 1); +INSERT INTO scores VALUES (FALSE, 1); +INSERT INTO scores VALUES (FALSE, 2); +SELECT count(*) FROM scores WHERE deleted = FALSE; +count(*) +3 +UPDATE scores SET deleted = TRUE WHERE value = 1; +SELECT count(*) FROM scores WHERE deleted = FALSE; +count(*) +1 +DROP TABLE scores; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_update_single_column.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_update_single_column.result new file mode 100644 index 00000000000..b283af17f94 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_update_single_column.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS scores; +SET NAMES utf8; +CREATE TABLE scores ( +value INT, +INDEX (value) +); +INSERT INTO scores VALUES (21); +INSERT INTO scores VALUES (21); +INSERT INTO scores VALUES (22); +SELECT count(*) FROM scores WHERE value >= 20; +count(*) +3 +UPDATE scores SET value = 11 WHERE value = 21; +SELECT count(*) FROM scores WHERE value >= 20; +count(*) +1 +DROP TABLE scores; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/information_schema_plugins.result b/storage/mroonga/mysql-test/mroonga/storage/r/information_schema_plugins.result new file mode 100644 index 00000000000..46c6f6ab258 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/information_schema_plugins.result @@ -0,0 +1,4 @@ +select PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_TYPE +from information_schema.plugins where plugin_name = "Mroonga"; +PLUGIN_NAME PLUGIN_VERSION PLUGIN_TYPE +Mroonga 4.5 STORAGE ENGINE diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/information_schema_plugins.result.in b/storage/mroonga/mysql-test/mroonga/storage/r/information_schema_plugins.result.in new file mode 100644 index 00000000000..f1020453183 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/information_schema_plugins.result.in @@ -0,0 +1,4 @@ +select PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_TYPE +from information_schema.plugins where plugin_name = "Mroonga"; +PLUGIN_NAME PLUGIN_VERSION PLUGIN_TYPE +Mroonga @MRN_PLUGIN_VERSION@ STORAGE ENGINE diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/information_schema_tables_auto_increment_none.result b/storage/mroonga/mysql-test/mroonga/storage/r/information_schema_tables_auto_increment_none.result new file mode 100644 index 00000000000..c23dab5e4a7 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/information_schema_tables_auto_increment_none.result @@ -0,0 +1,10 @@ +DROP TABLE IF EXISTS ids; +CREATE TABLE ids ( +id INT PRIMARY KEY +); +SELECT AUTO_INCREMENT +FROM INFORMATION_SCHEMA.TABLES +WHERE TABLE_NAME = "ids"; +AUTO_INCREMENT +NULL +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/information_schema_tables_auto_increment_use.result b/storage/mroonga/mysql-test/mroonga/storage/r/information_schema_tables_auto_increment_use.result new file mode 100644 index 00000000000..96d1b0ad32e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/information_schema_tables_auto_increment_use.result @@ -0,0 +1,10 @@ +DROP TABLE IF EXISTS ids; +CREATE TABLE ids ( +id INT AUTO_INCREMENT PRIMARY KEY +); +SELECT AUTO_INCREMENT +FROM INFORMATION_SCHEMA.TABLES +WHERE TABLE_NAME = "ids"; +AUTO_INCREMENT +1 +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/information_schema_tables_data_length.result b/storage/mroonga/mysql-test/mroonga/storage/r/information_schema_tables_data_length.result new file mode 100644 index 00000000000..d58afb1f6d4 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/information_schema_tables_data_length.result @@ -0,0 +1,26 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES UTF8; +CREATE TABLE diaries ( +id INT PRIMARY KEY, +title VARCHAR(255), +content TEXT, +FULLTEXT INDEX (content) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL, + `title` varchar(255) DEFAULT NULL, + `content` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries VALUES(1, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, "富士山", "今日も天気がよくてきれいに見える。"); +SELECT COUNT(*) +FROM INFORMATION_SCHEMA.TABLES +WHERE TABLE_NAME = "diaries" AND DATA_LENGTH > 0; +COUNT(*) +1 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/insert_TODO_SPLIT_ME.result b/storage/mroonga/mysql-test/mroonga/storage/r/insert_TODO_SPLIT_ME.result new file mode 100644 index 00000000000..00466f19bb5 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/insert_TODO_SPLIT_ME.result @@ -0,0 +1,90 @@ +drop table if exists t1, t2, t3; +create table t1 (c1 tinyint); +insert into t1 values(1); +select * from t1; +c1 +1 +drop table t1; +create table t1 (c1 smallint); +insert into t1 values(1); +select * from t1; +c1 +1 +drop table t1; +create table t1 (c1 mediumint); +insert into t1 values(1); +select * from t1; +c1 +1 +drop table t1; +create table t1 (c1 int); +insert into t1 values(1); +select * from t1; +c1 +1 +drop table t1; +create table t1 (c1 bigint); +insert into t1 values(1); +select * from t1; +c1 +1 +drop table t1; +create table t1 (c1 float); +insert into t1 values(0.5); +select * from t1; +c1 +0.5 +drop table t1; +create table t1 (c1 double); +insert into t1 values(0.5); +select * from t1; +c1 +0.5 +drop table t1; +create table t1 (c1 date); +insert into t1 values("2010/03/26"); +select * from t1; +c1 +2010-03-26 +drop table t1; +create table t1 (c1 time); +insert into t1 values("11:22:33"); +select * from t1; +c1 +11:22:33 +drop table t1; +create table t1 (c1 year); +insert into t1 values("2010"); +select * from t1; +c1 +2010 +drop table t1; +create table t1 (c1 datetime); +insert into t1 values("2010/03/26 11:22:33"); +select * from t1; +c1 +2010-03-26 11:22:33 +drop table t1; +create table t1 (c1 int, _id int); +set sql_mode=""; +insert into t1 (c1,_id) values (1,1); +Warnings: +Warning 1265 Data truncated for column '_id' at row 1 +set sql_mode="strict_all_tables"; +insert into t1 (c1,_id) values (4,1); +ERROR 01000: Data truncated for column '_id' at row 1 +select * from t1; +c1 _id +1 1 +drop table t1; +create table t1 (c1 int primary key, c2 int); +insert into t1 values(1,100); +select * from t1; +c1 c2 +1 100 +insert into t1 values(1,200); +ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +select * from t1; +c1 c2 +1 100 +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/insert_on_duplicate_key_update_no_primary_key_and_unique_key_twice.result b/storage/mroonga/mysql-test/mroonga/storage/r/insert_on_duplicate_key_update_no_primary_key_and_unique_key_twice.result new file mode 100644 index 00000000000..0d2c9dd7987 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/insert_on_duplicate_key_update_no_primary_key_and_unique_key_twice.result @@ -0,0 +1,18 @@ +DROP TABLE IF EXISTS numbers; +CREATE TABLE numbers ( +id INT, +count INT, +UNIQUE (id) +); +INSERT INTO numbers (id, count) VALUES (1, 1) ON DUPLICATE KEY UPDATE count = 2; +INSERT INTO numbers (id, count) VALUES (1, 3) ON DUPLICATE KEY UPDATE count = 4; +SELECT * FROM numbers; +id count +1 4 +INSERT INTO numbers (id, count) VALUES (2, 1) ON DUPLICATE KEY UPDATE count = 2; +INSERT INTO numbers (id, count) VALUES (2, 3) ON DUPLICATE KEY UPDATE count = 4; +SELECT * FROM numbers; +id count +1 4 +2 4 +DROP TABLE numbers; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/insert_on_duplicate_key_update_primary_key.result b/storage/mroonga/mysql-test/mroonga/storage/r/insert_on_duplicate_key_update_primary_key.result new file mode 100644 index 00000000000..12d4b173eaa --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/insert_on_duplicate_key_update_primary_key.result @@ -0,0 +1,26 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +day DATE PRIMARY KEY, +title TEXT +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `day` date NOT NULL, + `title` text, + PRIMARY KEY (`day`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (day, title) +VALUES ("2012-02-14", "clear day") +ON DUPLICATE KEY UPDATE title = "clear day (duplicated)"; +INSERT INTO diaries (day, title) +VALUES ("2012-02-14", "rainy day") +ON DUPLICATE KEY UPDATE title = "rainy day (duplicated)"; +INSERT INTO diaries (day, title) +VALUES ("2012-02-15", "cloudy day") +ON DUPLICATE KEY UPDATE title = "cloudy day (duplicated)"; +SELECT * FROM diaries; +day title +2012-02-14 rainy day (duplicated) +2012-02-15 cloudy day +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/insert_on_duplicate_key_update_unique_key.result b/storage/mroonga/mysql-test/mroonga/storage/r/insert_on_duplicate_key_update_unique_key.result new file mode 100644 index 00000000000..288e9e3a2c8 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/insert_on_duplicate_key_update_unique_key.result @@ -0,0 +1,30 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +day DATE, +title TEXT, +UNIQUE KEY day (day) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `day` date DEFAULT NULL, + `title` text, + PRIMARY KEY (`id`), + UNIQUE KEY `day` (`day`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (day, title) +VALUES ("2012-02-14", "clear day") +ON DUPLICATE KEY UPDATE title = "clear day (duplicated)"; +INSERT INTO diaries (day, title) +VALUES ("2012-02-14", "rainy day") +ON DUPLICATE KEY UPDATE title = "rainy day (duplicated)"; +INSERT INTO diaries (day, title) +VALUES ("2012-02-15", "cloudy day") +ON DUPLICATE KEY UPDATE title = "cloudy day (duplicated)"; +SELECT * FROM diaries; +id day title +1 2012-02-14 rainy day (duplicated) +3 2012-02-15 cloudy day +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/like_unicode_ci.result b/storage/mroonga/mysql-test/mroonga/storage/r/like_unicode_ci.result new file mode 100644 index 00000000000..1cc1d92451d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/like_unicode_ci.result @@ -0,0 +1,13 @@ +DROP TABLE IF EXISTS terms; +SET NAMES utf8; +CREATE TABLE terms ( +content varchar(64) NOT NULL COLLATE 'utf8_unicode_ci', +INDEX (content) +) DEFAULT CHARSET=utf8; +INSERT INTO terms VALUES ('track'); +INSERT INTO terms VALUES ('trackback'); +SELECT * FROM terms WHERE content LIKE 'TRACK%'; +content +track +trackback +DROP TABLE terms; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/lock_tables_read.result b/storage/mroonga/mysql-test/mroonga/storage/r/lock_tables_read.result new file mode 100644 index 00000000000..4e1db465c63 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/lock_tables_read.result @@ -0,0 +1,7 @@ +DROP TABLE IF EXISTS counts; +CREATE TABLE counts ( +id INT PRIMARY KEY AUTO_INCREMENT +); +LOCK TABLES counts READ; +UNLOCK TABLES; +DROP TABLE counts; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_not_optimized_disabled.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_not_optimized_disabled.result new file mode 100644 index 00000000000..da15588ccd5 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_not_optimized_disabled.result @@ -0,0 +1,47 @@ +DROP TABLE IF EXISTS diaries; +FLUSH STATUS; +SET NAMES UTF8; +CREATE TABLE diaries ( +id INT UNSIGNED NOT NULL, +year INT UNSIGNED, +month INT UNSIGNED, +day INT UNSIGNED, +title VARCHAR(255), +content TEXT, +FULLTEXT INDEX(content), +KEY(month), +KEY(day) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(10) unsigned NOT NULL, + `year` int(10) unsigned DEFAULT NULL, + `month` int(10) unsigned DEFAULT NULL, + `day` int(10) unsigned DEFAULT NULL, + `title` varchar(255) DEFAULT NULL, + `content` text, + KEY `month` (`month`), + KEY `day` (`day`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気がよくてきれいに見える。"); +INSERT INTO diaries VALUES(4, 2011, 11, 12, "帰り道", "今日は天気がよくてよかった。"); +INSERT INTO diaries VALUES(5, 2011, 11, 13, "はれ", "天気がよいのは今日までみたい。"); +INSERT INTO diaries VALUES(6, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。"); +INSERT INTO diaries VALUES(7, 2011, 12, 2, "初雪", "今日の天気は雪!"); +SET mroonga_enable_optimization=FALSE; +SELECT * FROM diaries +WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) AND +month = 11 +ORDER BY day LIMIT 1,2; +id year month day title content +3 2011 11 11 富士山 今日も天気がよくてきれいに見える。 +4 2011 11 12 帰り道 今日は天気がよくてよかった。 +SHOW STATUS LIKE 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 0 +SET mroonga_enable_optimization=TRUE; +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_not_optimized_no_limit.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_not_optimized_no_limit.result new file mode 100644 index 00000000000..0794b104a62 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_not_optimized_no_limit.result @@ -0,0 +1,47 @@ +DROP TABLE IF EXISTS diaries; +FLUSH STATUS; +SET NAMES UTF8; +CREATE TABLE diaries ( +id INT UNSIGNED NOT NULL, +year INT UNSIGNED, +month INT UNSIGNED, +day INT UNSIGNED, +title VARCHAR(255), +content TEXT, +FULLTEXT INDEX(content), +KEY(month), +KEY(day) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(10) unsigned NOT NULL, + `year` int(10) unsigned DEFAULT NULL, + `month` int(10) unsigned DEFAULT NULL, + `day` int(10) unsigned DEFAULT NULL, + `title` varchar(255) DEFAULT NULL, + `content` text, + KEY `month` (`month`), + KEY `day` (`day`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気がよくてきれいに見える。"); +INSERT INTO diaries VALUES(4, 2011, 11, 12, "帰り道", "今日は天気がよくてよかった。"); +INSERT INTO diaries VALUES(5, 2011, 11, 13, "はれ", "天気がよいのは今日までみたい。"); +INSERT INTO diaries VALUES(6, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。"); +INSERT INTO diaries VALUES(7, 2011, 12, 2, "初雪", "今日の天気は雪!"); +SELECT * FROM diaries +WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) +ORDER BY day; +id year month day title content +7 2011 12 2 初雪 今日の天気は雪! +1 2011 11 9 Hello 今日からはじめました。 +3 2011 11 11 富士山 今日も天気がよくてきれいに見える。 +4 2011 11 12 帰り道 今日は天気がよくてよかった。 +5 2011 11 13 はれ 天気がよいのは今日までみたい。 +SHOW STATUS LIKE 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 0 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_between.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_between.result new file mode 100644 index 00000000000..bd34b040ad7 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_between.result @@ -0,0 +1,35 @@ +DROP TABLE IF EXISTS diaries; +FLUSH STATUS; +SET NAMES UTF8; +CREATE TABLE diaries ( +id INT UNSIGNED NOT NULL, +date DATETIME, +content TEXT, +FULLTEXT INDEX(content), +KEY(date) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(10) unsigned NOT NULL, + `date` datetime DEFAULT NULL, + `content` text, + KEY `date` (`date`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries VALUES(1, "2011-11-11 12:23:30", "Today is fine."); +INSERT INTO diaries VALUES(2, "2011-11-11 12:23:31", "Today's lucky item is flower!"); +INSERT INTO diaries VALUES(3, "2011-11-11 12:23:32", "I will do something today!"); +INSERT INTO diaries VALUES(4, "2011-11-11 12:23:33", "I don't want to anything today..."); +INSERT INTO diaries VALUES(5, "2011-11-11 12:23:34", "I'm sleepy today."); +SELECT * FROM diaries +WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND +date BETWEEN "2011-11-11 12:23:31" AND "2011-11-11 12:23:33" + ORDER BY id LIMIT 1,2; +id date content +3 2011-11-11 12:23:32 I will do something today! +4 2011-11-11 12:23:33 I don't want to anything today... +SHOW STATUS LIKE 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 1 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_between_over.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_between_over.result new file mode 100644 index 00000000000..f495a3b5956 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_between_over.result @@ -0,0 +1,35 @@ +DROP TABLE IF EXISTS diaries; +FLUSH STATUS; +SET NAMES UTF8; +CREATE TABLE diaries ( +id INT UNSIGNED NOT NULL, +date DATETIME, +content TEXT, +FULLTEXT INDEX(content), +KEY(date) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(10) unsigned NOT NULL, + `date` datetime DEFAULT NULL, + `content` text, + KEY `date` (`date`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries VALUES(1, "2011-11-11 12:23:30", "Today is fine."); +INSERT INTO diaries VALUES(2, "2011-11-11 12:23:31", "Today's lucky item is flower!"); +INSERT INTO diaries VALUES(3, "2011-11-11 12:23:32", "I will do something today!"); +INSERT INTO diaries VALUES(4, "2011-11-11 12:23:33", "I don't want to anything today..."); +INSERT INTO diaries VALUES(5, "2011-11-11 12:23:34", "I'm sleepy today."); +SELECT * FROM diaries +WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND +date BETWEEN "2011-11-11 12:23:31" AND "2011-11-11 12:23:43" + ORDER BY id LIMIT 1,2; +id date content +3 2011-11-11 12:23:32 I will do something today! +4 2011-11-11 12:23:33 I don't want to anything today... +SHOW STATUS LIKE 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 1 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_equal.result new file mode 100644 index 00000000000..b5be750690d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_equal.result @@ -0,0 +1,35 @@ +DROP TABLE IF EXISTS diaries; +FLUSH STATUS; +SET NAMES UTF8; +CREATE TABLE diaries ( +id INT UNSIGNED NOT NULL, +date DATETIME, +content TEXT, +FULLTEXT INDEX(content), +KEY(date) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(10) unsigned NOT NULL, + `date` datetime DEFAULT NULL, + `content` text, + KEY `date` (`date`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries VALUES(1, "2011-11-11 12:23:34", "Today is fine."); +INSERT INTO diaries VALUES(2, "2011-11-11 12:23:34", "Tomorrow will be fine."); +INSERT INTO diaries VALUES(3, "2011-11-11 12:23:34", "I will do something today!"); +INSERT INTO diaries VALUES(4, "2011-11-11 12:23:34", "I don't want to anything today..."); +INSERT INTO diaries VALUES(5, "2011-11-11 12:23:34", "I'm sleepy today."); +SELECT * FROM diaries +WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND +date = "2011-11-11 12:23:34" + ORDER BY id LIMIT 1,2; +id date content +3 2011-11-11 12:23:34 I will do something today! +4 2011-11-11 12:23:34 I don't want to anything today... +SHOW STATUS LIKE 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 1 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_greater_than.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_greater_than.result new file mode 100644 index 00000000000..6f20f3b8b35 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_greater_than.result @@ -0,0 +1,35 @@ +DROP TABLE IF EXISTS diaries; +FLUSH STATUS; +SET NAMES UTF8; +CREATE TABLE diaries ( +id INT UNSIGNED NOT NULL, +date DATETIME, +content TEXT, +FULLTEXT INDEX(content), +KEY(date) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(10) unsigned NOT NULL, + `date` datetime DEFAULT NULL, + `content` text, + KEY `date` (`date`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries VALUES(1, "2011-11-11 12:23:30", "Today is fine."); +INSERT INTO diaries VALUES(2, "2011-11-11 12:23:31", "Today's lucky item is flower!"); +INSERT INTO diaries VALUES(3, "2011-11-11 12:23:32", "I will do something today!"); +INSERT INTO diaries VALUES(4, "2011-11-11 12:23:33", "I don't want to anything today..."); +INSERT INTO diaries VALUES(5, "2011-11-11 12:23:34", "I'm sleepy today."); +SELECT * FROM diaries +WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND +date > "2011-11-11 12:23:31" + ORDER BY id LIMIT 1,2; +id date content +4 2011-11-11 12:23:33 I don't want to anything today... +5 2011-11-11 12:23:34 I'm sleepy today. +SHOW STATUS LIKE 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 1 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_greater_than_or_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_greater_than_or_equal.result new file mode 100644 index 00000000000..5df3c12ccd8 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_greater_than_or_equal.result @@ -0,0 +1,35 @@ +DROP TABLE IF EXISTS diaries; +FLUSH STATUS; +SET NAMES UTF8; +CREATE TABLE diaries ( +id INT UNSIGNED NOT NULL, +date DATETIME, +content TEXT, +FULLTEXT INDEX(content), +KEY(date) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(10) unsigned NOT NULL, + `date` datetime DEFAULT NULL, + `content` text, + KEY `date` (`date`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries VALUES(1, "2011-11-11 12:23:30", "Today is fine."); +INSERT INTO diaries VALUES(2, "2011-11-11 12:23:31", "Today's lucky item is flower!"); +INSERT INTO diaries VALUES(3, "2011-11-11 12:23:32", "I will do something today!"); +INSERT INTO diaries VALUES(4, "2011-11-11 12:23:33", "I don't want to anything today..."); +INSERT INTO diaries VALUES(5, "2011-11-11 12:23:34", "I'm sleepy today."); +SELECT * FROM diaries +WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND +date >= "2011-11-11 12:23:31" + ORDER BY id LIMIT 1,2; +id date content +3 2011-11-11 12:23:32 I will do something today! +4 2011-11-11 12:23:33 I don't want to anything today... +SHOW STATUS LIKE 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 1 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_less_than.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_less_than.result new file mode 100644 index 00000000000..c12e69bf686 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_less_than.result @@ -0,0 +1,35 @@ +DROP TABLE IF EXISTS diaries; +FLUSH STATUS; +SET NAMES UTF8; +CREATE TABLE diaries ( +id INT UNSIGNED NOT NULL, +date DATETIME, +content TEXT, +FULLTEXT INDEX(content), +KEY(date) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(10) unsigned NOT NULL, + `date` datetime DEFAULT NULL, + `content` text, + KEY `date` (`date`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries VALUES(1, "2011-11-11 12:23:30", "Today is fine."); +INSERT INTO diaries VALUES(2, "2011-11-11 12:23:31", "Today's lucky item is flower!"); +INSERT INTO diaries VALUES(3, "2011-11-11 12:23:32", "I will do something today!"); +INSERT INTO diaries VALUES(4, "2011-11-11 12:23:33", "I don't want to anything today..."); +INSERT INTO diaries VALUES(5, "2011-11-11 12:23:34", "I'm sleepy today."); +SELECT * FROM diaries +WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND +date < "2011-11-11 12:23:33" + ORDER BY id LIMIT 1,2; +id date content +2 2011-11-11 12:23:31 Today's lucky item is flower! +3 2011-11-11 12:23:32 I will do something today! +SHOW STATUS LIKE 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 1 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_less_than_or_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_less_than_or_equal.result new file mode 100644 index 00000000000..6d00bac66eb --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_less_than_or_equal.result @@ -0,0 +1,35 @@ +DROP TABLE IF EXISTS diaries; +FLUSH STATUS; +SET NAMES UTF8; +CREATE TABLE diaries ( +id INT UNSIGNED NOT NULL, +date DATETIME, +content TEXT, +FULLTEXT INDEX(content), +KEY(date) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(10) unsigned NOT NULL, + `date` datetime DEFAULT NULL, + `content` text, + KEY `date` (`date`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries VALUES(1, "2011-11-11 12:23:30", "Today is fine."); +INSERT INTO diaries VALUES(2, "2011-11-11 12:23:31", "Today's lucky item is flower!"); +INSERT INTO diaries VALUES(3, "2011-11-11 12:23:32", "I will do something today!"); +INSERT INTO diaries VALUES(4, "2011-11-11 12:23:33", "I don't want to anything today..."); +INSERT INTO diaries VALUES(5, "2011-11-11 12:23:34", "I'm sleepy today."); +SELECT * FROM diaries +WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND +date <= "2011-11-11 12:23:33" + ORDER BY id LIMIT 1,2; +id date content +2 2011-11-11 12:23:31 Today's lucky item is flower! +3 2011-11-11 12:23:32 I will do something today! +SHOW STATUS LIKE 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 1 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_have_primary_key.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_have_primary_key.result new file mode 100644 index 00000000000..529f0d521ee --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_have_primary_key.result @@ -0,0 +1,43 @@ +DROP TABLE IF EXISTS diaries; +FLUSH STATUS; +SET NAMES UTF8; +CREATE TABLE diaries ( +id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, +year INT UNSIGNED, +month INT UNSIGNED, +day INT UNSIGNED, +title VARCHAR(255), +content TEXT, +FULLTEXT INDEX(content), +KEY(day) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `year` int(10) unsigned DEFAULT NULL, + `month` int(10) unsigned DEFAULT NULL, + `day` int(10) unsigned DEFAULT NULL, + `title` varchar(255) DEFAULT NULL, + `content` text, + PRIMARY KEY (`id`), + KEY `day` (`day`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気がよくてきれいに見える。"); +INSERT INTO diaries VALUES(4, 2011, 11, 11, "帰り道", "今日は天気がよくてよかった。"); +INSERT INTO diaries VALUES(5, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。"); +INSERT INTO diaries VALUES(6, 2011, 12, 2, "初雪", "今日の天気は雪!"); +SELECT * FROM diaries WHERE MATCH(content) AGAINST("今日 天気" IN BOOLEAN MODE) ORDER BY day LIMIT 0,5; +id year month day title content +5 2011 12 1 久しぶり 天気が悪いからずっと留守番。 +6 2011 12 2 初雪 今日の天気は雪! +1 2011 11 9 Hello 今日からはじめました。 +2 2011 11 10 天気 明日の富士山の天気について +4 2011 11 11 帰り道 今日は天気がよくてよかった。 +SHOW STATUS LIKE 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 1 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_between.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_between.result new file mode 100644 index 00000000000..ed86c0e1e37 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_between.result @@ -0,0 +1,25 @@ +DROP TABLE IF EXISTS memos; +FLUSH STATUS; +SET NAMES UTF8; +CREATE TABLE memos ( +id INT UNSIGNED, +content TEXT, +FULLTEXT INDEX(content), +KEY(id) +) DEFAULT CHARSET UTF8; +INSERT INTO memos VALUES(1, "Today is fine."); +INSERT INTO memos VALUES(2, "Today's lucky item is flower!"); +INSERT INTO memos VALUES(3, "I will do something today!"); +INSERT INTO memos VALUES(4, "I don't want to anything today..."); +INSERT INTO memos VALUES(5, "I'm sleepy today."); +SELECT * FROM memos +WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND +id BETWEEN 2 AND 4 +ORDER BY id LIMIT 1,2; +id content +3 I will do something today! +4 I don't want to anything today... +SHOW STATUS LIKE 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 1 +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_between_over.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_between_over.result new file mode 100644 index 00000000000..a18e2a15863 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_between_over.result @@ -0,0 +1,25 @@ +DROP TABLE IF EXISTS memos; +FLUSH STATUS; +SET NAMES UTF8; +CREATE TABLE memos ( +id INT UNSIGNED, +content TEXT, +FULLTEXT INDEX(content), +KEY(id) +) DEFAULT CHARSET UTF8; +INSERT INTO memos VALUES(1, "Today is fine."); +INSERT INTO memos VALUES(2, "Today's lucky item is flower!"); +INSERT INTO memos VALUES(3, "I will do something today!"); +INSERT INTO memos VALUES(4, "I don't want to anything today..."); +INSERT INTO memos VALUES(5, "I'm sleepy today."); +SELECT * FROM memos +WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND +id BETWEEN 2 AND 6 +ORDER BY id LIMIT 1,2; +id content +3 I will do something today! +4 I don't want to anything today... +SHOW STATUS LIKE 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 1 +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_equal.result new file mode 100644 index 00000000000..2320b0ffbc4 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_equal.result @@ -0,0 +1,45 @@ +DROP TABLE IF EXISTS diaries; +FLUSH STATUS; +SET NAMES UTF8; +CREATE TABLE diaries ( +id INT UNSIGNED NOT NULL, +year INT UNSIGNED, +month INT UNSIGNED, +day INT UNSIGNED, +title VARCHAR(255), +content TEXT, +FULLTEXT INDEX(content), +KEY(month), +KEY(day) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(10) unsigned NOT NULL, + `year` int(10) unsigned DEFAULT NULL, + `month` int(10) unsigned DEFAULT NULL, + `day` int(10) unsigned DEFAULT NULL, + `title` varchar(255) DEFAULT NULL, + `content` text, + KEY `month` (`month`), + KEY `day` (`day`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気がよくてきれいに見える。"); +INSERT INTO diaries VALUES(4, 2011, 11, 12, "帰り道", "今日は天気がよくてよかった。"); +INSERT INTO diaries VALUES(5, 2011, 11, 13, "はれ", "天気がよいのは今日までみたい。"); +INSERT INTO diaries VALUES(6, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。"); +INSERT INTO diaries VALUES(7, 2011, 12, 2, "初雪", "今日の天気は雪!"); +SELECT * FROM diaries +WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) AND +month = 11 +ORDER BY day LIMIT 1,2; +id year month day title content +3 2011 11 11 富士山 今日も天気がよくてきれいに見える。 +4 2011 11 12 帰り道 今日は天気がよくてよかった。 +SHOW STATUS LIKE 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 1 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_greater_than.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_greater_than.result new file mode 100644 index 00000000000..c367aef808a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_greater_than.result @@ -0,0 +1,45 @@ +DROP TABLE IF EXISTS diaries; +FLUSH STATUS; +SET NAMES UTF8; +CREATE TABLE diaries ( +id INT UNSIGNED NOT NULL, +year INT UNSIGNED, +month INT UNSIGNED, +day INT UNSIGNED, +title VARCHAR(255), +content TEXT, +FULLTEXT INDEX(content), +KEY(month), +KEY(day) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(10) unsigned NOT NULL, + `year` int(10) unsigned DEFAULT NULL, + `month` int(10) unsigned DEFAULT NULL, + `day` int(10) unsigned DEFAULT NULL, + `title` varchar(255) DEFAULT NULL, + `content` text, + KEY `month` (`month`), + KEY `day` (`day`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気がよくてきれいに見える。"); +INSERT INTO diaries VALUES(4, 2011, 11, 12, "帰り道", "今日は天気がよくてよかった。"); +INSERT INTO diaries VALUES(5, 2011, 11, 13, "はれ", "天気がよいのは今日までみたい。"); +INSERT INTO diaries VALUES(6, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。"); +INSERT INTO diaries VALUES(7, 2011, 12, 2, "初雪", "今日の天気は雪!"); +SELECT * FROM diaries +WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) AND +day > 10 +ORDER BY day LIMIT 1,2; +id year month day title content +4 2011 11 12 帰り道 今日は天気がよくてよかった。 +5 2011 11 13 はれ 天気がよいのは今日までみたい。 +SHOW STATUS LIKE 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 1 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_greater_than_or_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_greater_than_or_equal.result new file mode 100644 index 00000000000..b00a4e2a2c3 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_greater_than_or_equal.result @@ -0,0 +1,45 @@ +DROP TABLE IF EXISTS diaries; +FLUSH STATUS; +SET NAMES UTF8; +CREATE TABLE diaries ( +id INT UNSIGNED NOT NULL, +year INT UNSIGNED, +month INT UNSIGNED, +day INT UNSIGNED, +title VARCHAR(255), +content TEXT, +FULLTEXT INDEX(content), +KEY(month), +KEY(day) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(10) unsigned NOT NULL, + `year` int(10) unsigned DEFAULT NULL, + `month` int(10) unsigned DEFAULT NULL, + `day` int(10) unsigned DEFAULT NULL, + `title` varchar(255) DEFAULT NULL, + `content` text, + KEY `month` (`month`), + KEY `day` (`day`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気がよくてきれいに見える。"); +INSERT INTO diaries VALUES(4, 2011, 11, 12, "帰り道", "今日は天気がよくてよかった。"); +INSERT INTO diaries VALUES(5, 2011, 11, 13, "はれ", "天気がよいのは今日までみたい。"); +INSERT INTO diaries VALUES(6, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。"); +INSERT INTO diaries VALUES(7, 2011, 12, 2, "初雪", "今日の天気は雪!"); +SELECT * FROM diaries +WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) AND +day >= 10 +ORDER BY day LIMIT 1,2; +id year month day title content +4 2011 11 12 帰り道 今日は天気がよくてよかった。 +5 2011 11 13 はれ 天気がよいのは今日までみたい。 +SHOW STATUS LIKE 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 1 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_less_than.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_less_than.result new file mode 100644 index 00000000000..5bf6bca4985 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_less_than.result @@ -0,0 +1,45 @@ +DROP TABLE IF EXISTS diaries; +FLUSH STATUS; +SET NAMES UTF8; +CREATE TABLE diaries ( +id INT UNSIGNED NOT NULL, +year INT UNSIGNED, +month INT UNSIGNED, +day INT UNSIGNED, +title VARCHAR(255), +content TEXT, +FULLTEXT INDEX(content), +KEY(month), +KEY(day) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(10) unsigned NOT NULL, + `year` int(10) unsigned DEFAULT NULL, + `month` int(10) unsigned DEFAULT NULL, + `day` int(10) unsigned DEFAULT NULL, + `title` varchar(255) DEFAULT NULL, + `content` text, + KEY `month` (`month`), + KEY `day` (`day`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気がよくてきれいに見える。"); +INSERT INTO diaries VALUES(4, 2011, 11, 12, "帰り道", "今日は天気がよくてよかった。"); +INSERT INTO diaries VALUES(5, 2011, 11, 13, "はれ", "天気がよいのは今日までみたい。"); +INSERT INTO diaries VALUES(6, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。"); +INSERT INTO diaries VALUES(7, 2011, 12, 2, "初雪", "今日の天気は雪!"); +SELECT * FROM diaries +WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) AND +day < 12 +ORDER BY day LIMIT 1,2; +id year month day title content +1 2011 11 9 Hello 今日からはじめました。 +3 2011 11 11 富士山 今日も天気がよくてきれいに見える。 +SHOW STATUS LIKE 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 1 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_less_than_or_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_less_than_or_equal.result new file mode 100644 index 00000000000..5d6a19a936e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_less_than_or_equal.result @@ -0,0 +1,45 @@ +DROP TABLE IF EXISTS diaries; +FLUSH STATUS; +SET NAMES UTF8; +CREATE TABLE diaries ( +id INT UNSIGNED NOT NULL, +year INT UNSIGNED, +month INT UNSIGNED, +day INT UNSIGNED, +title VARCHAR(255), +content TEXT, +FULLTEXT INDEX(content), +KEY(month), +KEY(day) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(10) unsigned NOT NULL, + `year` int(10) unsigned DEFAULT NULL, + `month` int(10) unsigned DEFAULT NULL, + `day` int(10) unsigned DEFAULT NULL, + `title` varchar(255) DEFAULT NULL, + `content` text, + KEY `month` (`month`), + KEY `day` (`day`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気がよくてきれいに見える。"); +INSERT INTO diaries VALUES(4, 2011, 11, 12, "帰り道", "今日は天気がよくてよかった。"); +INSERT INTO diaries VALUES(5, 2011, 11, 13, "はれ", "天気がよいのは今日までみたい。"); +INSERT INTO diaries VALUES(6, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。"); +INSERT INTO diaries VALUES(7, 2011, 12, 2, "初雪", "今日の天気は雪!"); +SELECT * FROM diaries +WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) AND +day <= 12 +ORDER BY day LIMIT 1,2; +id year month day title content +1 2011 11 9 Hello 今日からはじめました。 +3 2011 11 11 富士山 今日も天気がよくてきれいに見える。 +SHOW STATUS LIKE 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 1 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_no_primary_key.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_no_primary_key.result new file mode 100644 index 00000000000..6ee2991e51a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_no_primary_key.result @@ -0,0 +1,42 @@ +DROP TABLE IF EXISTS diaries; +FLUSH STATUS; +SET NAMES UTF8; +CREATE TABLE diaries ( +id INT UNSIGNED NOT NULL, +year INT UNSIGNED, +month INT UNSIGNED, +day INT UNSIGNED, +title VARCHAR(255), +content TEXT, +FULLTEXT INDEX(content), +KEY(day) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(10) unsigned NOT NULL, + `year` int(10) unsigned DEFAULT NULL, + `month` int(10) unsigned DEFAULT NULL, + `day` int(10) unsigned DEFAULT NULL, + `title` varchar(255) DEFAULT NULL, + `content` text, + KEY `day` (`day`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気がよくてきれいに見える。"); +INSERT INTO diaries VALUES(4, 2011, 11, 11, "帰り道", "今日は天気がよくてよかった。"); +INSERT INTO diaries VALUES(5, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。"); +INSERT INTO diaries VALUES(6, 2011, 12, 2, "初雪", "今日の天気は雪!"); +SELECT * FROM diaries WHERE MATCH(content) AGAINST("今日 天気" IN BOOLEAN MODE) ORDER BY day LIMIT 0,5; +id year month day title content +5 2011 12 1 久しぶり 天気が悪いからずっと留守番。 +6 2011 12 2 初雪 今日の天気は雪! +1 2011 11 9 Hello 今日からはじめました。 +2 2011 11 10 天気 明日の富士山の天気について +4 2011 11 11 帰り道 今日は天気がよくてよかった。 +SHOW STATUS LIKE 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 1 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_no_where_clause.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_no_where_clause.result new file mode 100644 index 00000000000..9730069c849 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_no_where_clause.result @@ -0,0 +1,19 @@ +drop table if exists t1; +flush status; +create table t1 (c1 int primary key, c2 int, c3 text, _id int, key idx1(c2), fulltext index ft(c3)) default charset utf8; +insert into t1 values(1,10,"aa ii uu ee oo",null); +insert into t1 values(2,20,"ka ki ku ke ko",null); +insert into t1 values(3,30,"ii si ii se ii",null); +insert into t1 values(4,40,"ta ti tu te to",null); +insert into t1 values(5,50,"aa ii uu ii oo",null); +show status like 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 0 +select *, match(c3) against("ii") from t1 order by c1 desc limit 2; +c1 c2 c3 _id match(c3) against("ii") +5 50 aa ii uu ii oo 5 349526 +4 40 ta ti tu te to 4 0 +show status like 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 1 +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_order_by_asc.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_order_by_asc.result new file mode 100644 index 00000000000..e91e8af5391 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_order_by_asc.result @@ -0,0 +1,43 @@ +DROP TABLE IF EXISTS diaries; +FLUSH STATUS; +SET NAMES UTF8; +CREATE TABLE diaries ( +id INT UNSIGNED NOT NULL, +year INT UNSIGNED, +month INT UNSIGNED, +day INT UNSIGNED, +title VARCHAR(255), +content TEXT, +FULLTEXT INDEX(content), +KEY(month), +KEY(day) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(10) unsigned NOT NULL, + `year` int(10) unsigned DEFAULT NULL, + `month` int(10) unsigned DEFAULT NULL, + `day` int(10) unsigned DEFAULT NULL, + `title` varchar(255) DEFAULT NULL, + `content` text, + KEY `month` (`month`), + KEY `day` (`day`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気がよくてきれいに見える。"); +INSERT INTO diaries VALUES(4, 2011, 11, 12, "帰り道", "今日は天気がよくてよかった。"); +INSERT INTO diaries VALUES(5, 2011, 11, 13, "はれ", "天気がよいのは今日までみたい。"); +INSERT INTO diaries VALUES(6, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。"); +INSERT INTO diaries VALUES(7, 2011, 12, 2, "初雪", "今日の天気は雪!"); +SELECT * FROM diaries +WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) +ORDER BY day ASC LIMIT 1; +id year month day title content +7 2011 12 2 初雪 今日の天気は雪! +SHOW STATUS LIKE 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 1 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_order_by_desc.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_order_by_desc.result new file mode 100644 index 00000000000..da01145e45a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_order_by_desc.result @@ -0,0 +1,43 @@ +DROP TABLE IF EXISTS diaries; +FLUSH STATUS; +SET NAMES UTF8; +CREATE TABLE diaries ( +id INT UNSIGNED NOT NULL, +year INT UNSIGNED, +month INT UNSIGNED, +day INT UNSIGNED, +title VARCHAR(255), +content TEXT, +FULLTEXT INDEX(content), +KEY(month), +KEY(day) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(10) unsigned NOT NULL, + `year` int(10) unsigned DEFAULT NULL, + `month` int(10) unsigned DEFAULT NULL, + `day` int(10) unsigned DEFAULT NULL, + `title` varchar(255) DEFAULT NULL, + `content` text, + KEY `month` (`month`), + KEY `day` (`day`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気がよくてきれいに見える。"); +INSERT INTO diaries VALUES(4, 2011, 11, 12, "帰り道", "今日は天気がよくてよかった。"); +INSERT INTO diaries VALUES(5, 2011, 11, 13, "はれ", "天気がよいのは今日までみたい。"); +INSERT INTO diaries VALUES(6, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。"); +INSERT INTO diaries VALUES(7, 2011, 12, 2, "初雪", "今日の天気は雪!"); +SELECT * FROM diaries +WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) +ORDER BY day DESC LIMIT 1; +id year month day title content +5 2011 11 13 はれ 天気がよいのは今日までみたい。 +SHOW STATUS LIKE 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 1 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_order_by_id.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_order_by_id.result new file mode 100644 index 00000000000..bb541c014bd --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_order_by_id.result @@ -0,0 +1,46 @@ +DROP TABLE IF EXISTS diaries; +FLUSH STATUS; +SET NAMES UTF8; +CREATE TABLE diaries ( +_id INT, +id INT UNSIGNED NOT NULL, +year INT UNSIGNED, +month INT UNSIGNED, +day INT UNSIGNED, +title VARCHAR(255), +content TEXT, +FULLTEXT INDEX(content), +KEY(month), +KEY(day) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `_id` int(11) DEFAULT NULL, + `id` int(10) unsigned NOT NULL, + `year` int(10) unsigned DEFAULT NULL, + `month` int(10) unsigned DEFAULT NULL, + `day` int(10) unsigned DEFAULT NULL, + `title` varchar(255) DEFAULT NULL, + `content` text, + KEY `month` (`month`), + KEY `day` (`day`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries VALUES(NULL, 1, 2011, 11, 9, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(NULL, 2, 2011, 11, 10, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(NULL, 3, 2011, 11, 11, "富士山", "今日も天気がよくてきれいに見える。"); +INSERT INTO diaries VALUES(NULL, 4, 2011, 11, 12, "帰り道", "今日は天気がよくてよかった。"); +INSERT INTO diaries VALUES(NULL, 5, 2011, 11, 13, "はれ", "天気がよいのは今日までみたい。"); +INSERT INTO diaries VALUES(NULL, 6, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。"); +INSERT INTO diaries VALUES(NULL, 7, 2011, 12, 2, "初雪", "今日の天気は雪!"); +SELECT * FROM diaries +WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) +ORDER BY _id +LIMIT 1; +_id id year month day title content +1 1 2011 11 9 Hello 今日からはじめました。 +SHOW STATUS LIKE 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 1 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_order_by_match_against.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_order_by_match_against.result new file mode 100644 index 00000000000..fb9393687dc --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_order_by_match_against.result @@ -0,0 +1,44 @@ +DROP TABLE IF EXISTS diaries; +FLUSH STATUS; +SET NAMES UTF8; +CREATE TABLE diaries ( +id INT UNSIGNED NOT NULL, +year INT UNSIGNED, +month INT UNSIGNED, +day INT UNSIGNED, +title VARCHAR(255), +content TEXT, +FULLTEXT INDEX(content), +KEY(month), +KEY(day) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(10) unsigned NOT NULL, + `year` int(10) unsigned DEFAULT NULL, + `month` int(10) unsigned DEFAULT NULL, + `day` int(10) unsigned DEFAULT NULL, + `title` varchar(255) DEFAULT NULL, + `content` text, + KEY `month` (`month`), + KEY `day` (`day`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気がよくてきれいに見える。"); +INSERT INTO diaries VALUES(4, 2011, 11, 12, "帰り道", "今日は天気がよくてよかった。"); +INSERT INTO diaries VALUES(5, 2011, 11, 13, "はれ", "天気がよいのは今日までみたい。"); +INSERT INTO diaries VALUES(6, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。"); +INSERT INTO diaries VALUES(7, 2011, 12, 2, "初雪", "今日の天気は雪!"); +SELECT * FROM diaries +WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) +ORDER BY MATCH(content) AGAINST("今日" IN BOOLEAN MODE) +LIMIT 1; +id year month day title content +1 2011 11 9 Hello 今日からはじめました。 +SHOW STATUS LIKE 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 1 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_select_match_against.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_select_match_against.result new file mode 100644 index 00000000000..75ad884a268 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_select_match_against.result @@ -0,0 +1,45 @@ +DROP TABLE IF EXISTS diaries; +FLUSH STATUS; +SET NAMES UTF8; +CREATE TABLE diaries ( +id INT UNSIGNED NOT NULL, +year INT UNSIGNED, +month INT UNSIGNED, +day INT UNSIGNED, +title VARCHAR(255), +content TEXT, +FULLTEXT INDEX(content), +KEY(month), +KEY(day) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(10) unsigned NOT NULL, + `year` int(10) unsigned DEFAULT NULL, + `month` int(10) unsigned DEFAULT NULL, + `day` int(10) unsigned DEFAULT NULL, + `title` varchar(255) DEFAULT NULL, + `content` text, + KEY `month` (`month`), + KEY `day` (`day`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気がよくてきれいに見える。"); +INSERT INTO diaries VALUES(4, 2011, 11, 12, "帰り道", "今日は天気がよくてよかった。"); +INSERT INTO diaries VALUES(5, 2011, 11, 13, "はれ", "天気がよいのは今日までみたい。"); +INSERT INTO diaries VALUES(6, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。"); +INSERT INTO diaries VALUES(7, 2011, 12, 2, "初雪", "今日の天気は雪!"); +SELECT *, MATCH(content) AGAINST("今日" IN BOOLEAN MODE) +FROM diaries +WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) +ORDER BY MATCH(content) AGAINST("今日" IN BOOLEAN MODE) +LIMIT 1; +id year month day title content MATCH(content) AGAINST("今日" IN BOOLEAN MODE) +1 2011 11 9 Hello 今日からはじめました。 1 +SHOW STATUS LIKE 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 1 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_between.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_between.result new file mode 100644 index 00000000000..bb4ac9c3b33 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_between.result @@ -0,0 +1,35 @@ +DROP TABLE IF EXISTS memos; +FLUSH STATUS; +SET NAMES UTF8; +CREATE TABLE memos ( +id INT UNSIGNED NOT NULL, +writing_time TIME, +content TEXT, +FULLTEXT INDEX(content), +KEY(writing_time) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE memos; +Table Create Table +memos CREATE TABLE `memos` ( + `id` int(10) unsigned NOT NULL, + `writing_time` time DEFAULT NULL, + `content` text, + KEY `writing_time` (`writing_time`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO memos VALUES(1, "1:23:30", "Today is fine."); +INSERT INTO memos VALUES(2, "1:23:31", "Today's lucky item is flower!"); +INSERT INTO memos VALUES(3, "1:23:32", "I will do something today!"); +INSERT INTO memos VALUES(4, "1:23:33", "I don't want to anything today..."); +INSERT INTO memos VALUES(5, "1:23:34", "I'm sleepy today."); +SELECT * FROM memos +WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND +writing_time BETWEEN "1:23:31" AND "1:23:33" + ORDER BY id LIMIT 1,2; +id writing_time content +3 01:23:32 I will do something today! +4 01:23:33 I don't want to anything today... +SHOW STATUS LIKE 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 1 +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_between_over.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_between_over.result new file mode 100644 index 00000000000..1b4d38e0107 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_between_over.result @@ -0,0 +1,35 @@ +DROP TABLE IF EXISTS memos; +FLUSH STATUS; +SET NAMES UTF8; +CREATE TABLE memos ( +id INT UNSIGNED NOT NULL, +writing_time TIME, +content TEXT, +FULLTEXT INDEX(content), +KEY(writing_time) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE memos; +Table Create Table +memos CREATE TABLE `memos` ( + `id` int(10) unsigned NOT NULL, + `writing_time` time DEFAULT NULL, + `content` text, + KEY `writing_time` (`writing_time`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO memos VALUES(1, "1:23:30", "Today is fine."); +INSERT INTO memos VALUES(2, "1:23:31", "Today's lucky item is flower!"); +INSERT INTO memos VALUES(3, "1:23:32", "I will do something today!"); +INSERT INTO memos VALUES(4, "1:23:33", "I don't want to anything today..."); +INSERT INTO memos VALUES(5, "1:23:34", "I'm sleepy today."); +SELECT * FROM memos +WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND +writing_time BETWEEN "1:23:31" AND "1:23:43" + ORDER BY id LIMIT 1,2; +id writing_time content +3 01:23:32 I will do something today! +4 01:23:33 I don't want to anything today... +SHOW STATUS LIKE 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 1 +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_equal.result new file mode 100644 index 00000000000..4fff9f9185f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_equal.result @@ -0,0 +1,35 @@ +DROP TABLE IF EXISTS memos; +FLUSH STATUS; +SET NAMES UTF8; +CREATE TABLE memos ( +id INT UNSIGNED NOT NULL, +writing_time TIME, +content TEXT, +FULLTEXT INDEX(content), +KEY(writing_time) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE memos; +Table Create Table +memos CREATE TABLE `memos` ( + `id` int(10) unsigned NOT NULL, + `writing_time` time DEFAULT NULL, + `content` text, + KEY `writing_time` (`writing_time`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO memos VALUES(1, "1:23:34", "Today is fine."); +INSERT INTO memos VALUES(2, "1:23:34", "Tomorrow will be fine."); +INSERT INTO memos VALUES(3, "1:23:34", "I will do something today!"); +INSERT INTO memos VALUES(4, "1:23:34", "I don't want to anything today..."); +INSERT INTO memos VALUES(5, "1:23:34", "I'm sleepy today."); +SELECT * FROM memos +WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND +writing_time = "1:23:34" + ORDER BY id LIMIT 1,2; +id writing_time content +3 01:23:34 I will do something today! +4 01:23:34 I don't want to anything today... +SHOW STATUS LIKE 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 1 +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_greater_than.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_greater_than.result new file mode 100644 index 00000000000..61119b2b74e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_greater_than.result @@ -0,0 +1,35 @@ +DROP TABLE IF EXISTS memos; +FLUSH STATUS; +SET NAMES UTF8; +CREATE TABLE memos ( +id INT UNSIGNED NOT NULL, +writing_time TIME, +content TEXT, +FULLTEXT INDEX(content), +KEY(writing_time) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE memos; +Table Create Table +memos CREATE TABLE `memos` ( + `id` int(10) unsigned NOT NULL, + `writing_time` time DEFAULT NULL, + `content` text, + KEY `writing_time` (`writing_time`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO memos VALUES(1, "1:23:30", "Today is fine."); +INSERT INTO memos VALUES(2, "1:23:31", "Today's lucky item is flower!" ); +INSERT INTO memos VALUES(3, "1:23:32", "I will do something today!"); +INSERT INTO memos VALUES(4, "1:23:33", "I don't want to anything today..."); +INSERT INTO memos VALUES(5, "1:23:34", "I'm sleepy today."); +SELECT * FROM memos +WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND +writing_time > "1:23:31" + ORDER BY id LIMIT 1,2; +id writing_time content +4 01:23:33 I don't want to anything today... +5 01:23:34 I'm sleepy today. +SHOW STATUS LIKE 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 1 +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_greater_than_or_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_greater_than_or_equal.result new file mode 100644 index 00000000000..9bf8b91ea07 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_greater_than_or_equal.result @@ -0,0 +1,35 @@ +DROP TABLE IF EXISTS memos; +FLUSH STATUS; +SET NAMES UTF8; +CREATE TABLE memos ( +id INT UNSIGNED NOT NULL, +writing_time TIME, +content TEXT, +FULLTEXT INDEX(content), +KEY(writing_time) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE memos; +Table Create Table +memos CREATE TABLE `memos` ( + `id` int(10) unsigned NOT NULL, + `writing_time` time DEFAULT NULL, + `content` text, + KEY `writing_time` (`writing_time`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO memos VALUES(1, "1:23:30", "Today is fine."); +INSERT INTO memos VALUES(2, "1:23:31", "Today's lucky item is flower!" ); +INSERT INTO memos VALUES(3, "1:23:32", "I will do something today!"); +INSERT INTO memos VALUES(4, "1:23:33", "I don't want to anything today..."); +INSERT INTO memos VALUES(5, "1:23:34", "I'm sleepy today."); +SELECT * FROM memos +WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND +writing_time >= "1:23:31" + ORDER BY id LIMIT 1,2; +id writing_time content +3 01:23:32 I will do something today! +4 01:23:33 I don't want to anything today... +SHOW STATUS LIKE 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 1 +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_less_than.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_less_than.result new file mode 100644 index 00000000000..e4d41f5867e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_less_than.result @@ -0,0 +1,35 @@ +DROP TABLE IF EXISTS memos; +FLUSH STATUS; +SET NAMES UTF8; +CREATE TABLE memos ( +id INT UNSIGNED NOT NULL, +writing_time TIME, +content TEXT, +FULLTEXT INDEX(content), +KEY(writing_time) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE memos; +Table Create Table +memos CREATE TABLE `memos` ( + `id` int(10) unsigned NOT NULL, + `writing_time` time DEFAULT NULL, + `content` text, + KEY `writing_time` (`writing_time`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO memos VALUES(1, "1:23:30", "Today is fine."); +INSERT INTO memos VALUES(2, "1:23:31", "Today's lucky item is flower!"); +INSERT INTO memos VALUES(3, "1:23:32", "I will do something today!"); +INSERT INTO memos VALUES(4, "1:23:33", "I don't want to anything today..."); +INSERT INTO memos VALUES(5, "1:23:34", "I'm sleepy today."); +SELECT * FROM memos +WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND +writing_time < "1:23:33" + ORDER BY id LIMIT 1,2; +id writing_time content +2 01:23:31 Today's lucky item is flower! +3 01:23:32 I will do something today! +SHOW STATUS LIKE 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 1 +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_less_than_or_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_less_than_or_equal.result new file mode 100644 index 00000000000..31a497ef8bb --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_less_than_or_equal.result @@ -0,0 +1,35 @@ +DROP TABLE IF EXISTS memos; +FLUSH STATUS; +SET NAMES UTF8; +CREATE TABLE memos ( +id INT UNSIGNED NOT NULL, +writing_time TIME, +content TEXT, +FULLTEXT INDEX(content), +KEY(writing_time) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE memos; +Table Create Table +memos CREATE TABLE `memos` ( + `id` int(10) unsigned NOT NULL, + `writing_time` time DEFAULT NULL, + `content` text, + KEY `writing_time` (`writing_time`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO memos VALUES(1, "1:23:30", "Today is fine."); +INSERT INTO memos VALUES(2, "1:23:31", "Today's lucky item is flower!"); +INSERT INTO memos VALUES(3, "1:23:32", "I will do something today!"); +INSERT INTO memos VALUES(4, "1:23:33", "I don't want to anything today..."); +INSERT INTO memos VALUES(5, "1:23:34", "I'm sleepy today."); +SELECT * FROM memos +WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND +writing_time <= "1:23:33" + ORDER BY id LIMIT 1,2; +id writing_time content +2 01:23:31 Today's lucky item is flower! +3 01:23:32 I will do something today! +SHOW STATUS LIKE 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 1 +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_varchar_equal_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_varchar_equal_with_index.result new file mode 100644 index 00000000000..46c80ddcce7 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_varchar_equal_with_index.result @@ -0,0 +1,46 @@ +DROP TABLE IF EXISTS diaries; +FLUSH STATUS; +SET NAMES UTF8; +CREATE TABLE diaries ( +id INT UNSIGNED NOT NULL, +year INT UNSIGNED, +month INT UNSIGNED, +day INT UNSIGNED, +title VARCHAR(255), +content TEXT, +FULLTEXT INDEX(content), +KEY(title), +KEY(month), +KEY(day) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(10) unsigned NOT NULL, + `year` int(10) unsigned DEFAULT NULL, + `month` int(10) unsigned DEFAULT NULL, + `day` int(10) unsigned DEFAULT NULL, + `title` varchar(255) DEFAULT NULL, + `content` text, + KEY `title` (`title`), + KEY `month` (`month`), + KEY `day` (`day`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気がよくてきれいに見える。"); +INSERT INTO diaries VALUES(4, 2011, 11, 12, "帰り道", "今日は天気がよくてよかった。"); +INSERT INTO diaries VALUES(5, 2011, 11, 13, "はれ", "天気がよいのは今日までみたい。"); +INSERT INTO diaries VALUES(6, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。"); +INSERT INTO diaries VALUES(7, 2011, 12, 2, "初雪", "今日の天気は雪!"); +SELECT * FROM diaries +WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) AND +title = "hello" + ORDER BY day LIMIT 1; +id year month day title content +1 2011 11 9 Hello 今日からはじめました。 +SHOW STATUS LIKE 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 1 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_varchar_equal_without_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_varchar_equal_without_index.result new file mode 100644 index 00000000000..38263c1083f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_varchar_equal_without_index.result @@ -0,0 +1,44 @@ +DROP TABLE IF EXISTS diaries; +FLUSH STATUS; +SET NAMES UTF8; +CREATE TABLE diaries ( +id INT UNSIGNED NOT NULL, +year INT UNSIGNED, +month INT UNSIGNED, +day INT UNSIGNED, +title VARCHAR(255), +content TEXT, +FULLTEXT INDEX(content), +KEY(month), +KEY(day) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(10) unsigned NOT NULL, + `year` int(10) unsigned DEFAULT NULL, + `month` int(10) unsigned DEFAULT NULL, + `day` int(10) unsigned DEFAULT NULL, + `title` varchar(255) DEFAULT NULL, + `content` text, + KEY `month` (`month`), + KEY `day` (`day`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気がよくてきれいに見える。"); +INSERT INTO diaries VALUES(4, 2011, 11, 12, "帰り道", "今日は天気がよくてよかった。"); +INSERT INTO diaries VALUES(5, 2011, 11, 13, "はれ", "天気がよいのは今日までみたい。"); +INSERT INTO diaries VALUES(6, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。"); +INSERT INTO diaries VALUES(7, 2011, 12, 2, "初雪", "今日の天気は雪!"); +SELECT * FROM diaries +WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) AND +title = "hello" + ORDER BY day LIMIT 1; +id year month day title content +1 2011 11 9 Hello 今日からはじめました。 +SHOW STATUS LIKE 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 0 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_year_between.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_year_between.result new file mode 100644 index 00000000000..5a1b1bda2ce --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_year_between.result @@ -0,0 +1,30 @@ +DROP TABLE IF EXISTS mroonga_releases; +FLUSH STATUS; +CREATE TABLE mroonga_releases ( +id INT PRIMARY KEY AUTO_INCREMENT, +release_title TEXT, +release_year YEAR, +KEY (release_year), +FULLTEXT KEY (release_title) +) DEFAULT CHARSET UTF8; +INSERT INTO mroonga_releases (release_title, release_year) +VALUES ("Groonga storage engine 0.1 has been released", "10"); +INSERT INTO mroonga_releases (release_title, release_year) +VALUES ("Rename Groonga storage engine to Mroonga", "2011"); +INSERT INTO mroonga_releases (release_title, release_year) +VALUES ("Mroonga 2.0 has been released", "2012"); +INSERT INTO mroonga_releases (release_title, release_year) +VALUES ("Mroonga 3.0 has been released", "13"); +INSERT INTO mroonga_releases (release_title, release_year) +VALUES ("Mroonga 4.0 will be released", "2014"); +SELECT * FROM mroonga_releases +WHERE release_year BETWEEN "11" AND "2013" AND +MATCH(release_title) AGAINST("Mroonga" IN BOOLEAN MODE) +ORDER BY id DESC LIMIT 1,2; +id release_title release_year +3 Mroonga 2.0 has been released 2012 +2 Rename Groonga storage engine to Mroonga 2011 +SHOW STATUS LIKE 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 1 +DROP TABLE mroonga_releases; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_year_between_over.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_year_between_over.result new file mode 100644 index 00000000000..b0ad41fbbba --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_year_between_over.result @@ -0,0 +1,30 @@ +DROP TABLE IF EXISTS mroonga_releases; +FLUSH STATUS; +CREATE TABLE mroonga_releases ( +id INT PRIMARY KEY AUTO_INCREMENT, +release_title TEXT, +release_year YEAR, +KEY (release_year), +FULLTEXT KEY (release_title) +) DEFAULT CHARSET UTF8; +INSERT INTO mroonga_releases (release_title, release_year) +VALUES ("Groonga storage engine 0.1 has been released", "10"); +INSERT INTO mroonga_releases (release_title, release_year) +VALUES ("Rename Groonga storage engine to Mroonga", "2011"); +INSERT INTO mroonga_releases (release_title, release_year) +VALUES ("Mroonga 2.0 has been released", "2012"); +INSERT INTO mroonga_releases (release_title, release_year) +VALUES ("Mroonga 3.0 has been released", "13"); +INSERT INTO mroonga_releases (release_title, release_year) +VALUES ("Mroonga 4.0 will be released", "2014"); +SELECT * FROM mroonga_releases +WHERE release_year BETWEEN "11" AND "2015" AND +MATCH(release_title) AGAINST("Mroonga" IN BOOLEAN MODE) +ORDER BY id DESC LIMIT 1,2; +id release_title release_year +4 Mroonga 3.0 has been released 2013 +3 Mroonga 2.0 has been released 2012 +SHOW STATUS LIKE 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 1 +DROP TABLE mroonga_releases; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_year_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_year_equal.result new file mode 100644 index 00000000000..08db6b384e8 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_year_equal.result @@ -0,0 +1,32 @@ +DROP TABLE IF EXISTS mroonga_releases; +FLUSH STATUS; +CREATE TABLE mroonga_releases ( +id INT PRIMARY KEY AUTO_INCREMENT, +release_title TEXT, +release_year YEAR, +KEY (release_year), +FULLTEXT KEY (release_title) +) DEFAULT CHARSET UTF8; +INSERT INTO mroonga_releases (release_title, release_year) +VALUES ("Groonga storage engine (code name Mroonga) 1.0 has been released", "11"); +INSERT INTO mroonga_releases (release_title, release_year) +VALUES ("Rename Groonga storage engine to Mroonga", "2011"); +INSERT INTO mroonga_releases (release_title, release_year) +VALUES ("Mroonga 1.11 has been released", "2011"); +INSERT INTO mroonga_releases (release_title, release_year) +VALUES ("Mroonga 2.0 has been released", "2012"); +INSERT INTO mroonga_releases (release_title, release_year) +VALUES ("Mroonga 3.0 has been released", "13"); +INSERT INTO mroonga_releases (release_title, release_year) +VALUES ("Mroonga 4.0 will be released", "2014"); +SELECT * FROM mroonga_releases +WHERE release_year = "11" AND +MATCH(release_title) AGAINST("Mroonga" IN BOOLEAN MODE) +ORDER BY id DESC LIMIT 1,2; +id release_title release_year +2 Rename Groonga storage engine to Mroonga 2011 +1 Groonga storage engine (code name Mroonga) 1.0 has been released 2011 +SHOW STATUS LIKE 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 1 +DROP TABLE mroonga_releases; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_year_greater_than.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_year_greater_than.result new file mode 100644 index 00000000000..a33cd484865 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_year_greater_than.result @@ -0,0 +1,30 @@ +DROP TABLE IF EXISTS mroonga_releases; +FLUSH STATUS; +CREATE TABLE mroonga_releases ( +id INT PRIMARY KEY AUTO_INCREMENT, +release_title TEXT, +release_year YEAR, +KEY (release_year), +FULLTEXT KEY (release_title) +) DEFAULT CHARSET UTF8; +INSERT INTO mroonga_releases (release_title, release_year) +VALUES ("Groonga storage engine (code name Mroonga) 0.1 has been released", "10"); +INSERT INTO mroonga_releases (release_title, release_year) +VALUES ("Rename Groonga storage engine to Mroonga", "2011"); +INSERT INTO mroonga_releases (release_title, release_year) +VALUES ("Mroonga 2.0 has been released", "2012"); +INSERT INTO mroonga_releases (release_title, release_year) +VALUES ("Mroonga 3.0 has been released", "13"); +INSERT INTO mroonga_releases (release_title, release_year) +VALUES ("Mroonga 4.0 will be released", "2014"); +SELECT * FROM mroonga_releases +WHERE release_year > "11" AND +MATCH(release_title) AGAINST("Mroonga" IN BOOLEAN MODE) +ORDER BY id ASC LIMIT 2; +id release_title release_year +3 Mroonga 2.0 has been released 2012 +4 Mroonga 3.0 has been released 2013 +SHOW STATUS LIKE 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 1 +DROP TABLE mroonga_releases; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_year_greater_than_or_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_year_greater_than_or_equal.result new file mode 100644 index 00000000000..7d2471b3aa0 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_year_greater_than_or_equal.result @@ -0,0 +1,30 @@ +DROP TABLE IF EXISTS mroonga_releases; +FLUSH STATUS; +CREATE TABLE mroonga_releases ( +id INT PRIMARY KEY AUTO_INCREMENT, +release_title TEXT, +release_year YEAR, +KEY (release_year), +FULLTEXT KEY (release_title) +) DEFAULT CHARSET UTF8; +INSERT INTO mroonga_releases (release_title, release_year) +VALUES ("Groonga storage engine (code name Mroonga) 0.1 has been released", "10"); +INSERT INTO mroonga_releases (release_title, release_year) +VALUES ("Rename Groonga storage engine to Mroonga", "2011"); +INSERT INTO mroonga_releases (release_title, release_year) +VALUES ("Mroonga 2.0 has been released", "2012"); +INSERT INTO mroonga_releases (release_title, release_year) +VALUES ("Mroonga 3.0 has been released", "13"); +INSERT INTO mroonga_releases (release_title, release_year) +VALUES ("Mroonga 4.0 will be released", "2014"); +SELECT * FROM mroonga_releases +WHERE release_year >= "11" AND +MATCH(release_title) AGAINST("Mroonga" IN BOOLEAN MODE) +ORDER BY id ASC LIMIT 2; +id release_title release_year +2 Rename Groonga storage engine to Mroonga 2011 +3 Mroonga 2.0 has been released 2012 +SHOW STATUS LIKE 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 1 +DROP TABLE mroonga_releases; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_year_less_than.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_year_less_than.result new file mode 100644 index 00000000000..cac3d6f4356 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_year_less_than.result @@ -0,0 +1,30 @@ +DROP TABLE IF EXISTS mroonga_releases; +FLUSH STATUS; +CREATE TABLE mroonga_releases ( +id INT PRIMARY KEY AUTO_INCREMENT, +release_title TEXT, +release_year YEAR, +KEY (release_year), +FULLTEXT KEY (release_title) +) DEFAULT CHARSET UTF8; +INSERT INTO mroonga_releases (release_title, release_year) +VALUES ("Groonga storage engine (code name Mroonga) 0.1 has been released", "10"); +INSERT INTO mroonga_releases (release_title, release_year) +VALUES ("Rename Groonga storage engine to Mroonga", "2011"); +INSERT INTO mroonga_releases (release_title, release_year) +VALUES ("Mroonga 2.0 has been released", "2012"); +INSERT INTO mroonga_releases (release_title, release_year) +VALUES ("Mroonga 3.0 has been released", "13"); +INSERT INTO mroonga_releases (release_title, release_year) +VALUES ("Mroonga 4.0 will be released", "2014"); +SELECT * FROM mroonga_releases +WHERE release_year < "13" AND +MATCH(release_title) AGAINST("Mroonga" IN BOOLEAN MODE) +ORDER BY id DESC LIMIT 1,2; +id release_title release_year +2 Rename Groonga storage engine to Mroonga 2011 +1 Groonga storage engine (code name Mroonga) 0.1 has been released 2010 +SHOW STATUS LIKE 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 1 +DROP TABLE mroonga_releases; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_year_less_than_or_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_year_less_than_or_equal.result new file mode 100644 index 00000000000..df57f51e5d6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_year_less_than_or_equal.result @@ -0,0 +1,30 @@ +DROP TABLE IF EXISTS mroonga_releases; +FLUSH STATUS; +CREATE TABLE mroonga_releases ( +id INT PRIMARY KEY AUTO_INCREMENT, +release_title TEXT, +release_year YEAR, +KEY (release_year), +FULLTEXT KEY (release_title) +) DEFAULT CHARSET UTF8; +INSERT INTO mroonga_releases (release_title, release_year) +VALUES ("Groonga storage engine (code name Mroonga) 0.1 has been released", "10"); +INSERT INTO mroonga_releases (release_title, release_year) +VALUES ("Rename Groonga storage engine to Mroonga", "2011"); +INSERT INTO mroonga_releases (release_title, release_year) +VALUES ("Mroonga 2.0 has been released", "2012"); +INSERT INTO mroonga_releases (release_title, release_year) +VALUES ("Mroonga 3.0 has been released", "13"); +INSERT INTO mroonga_releases (release_title, release_year) +VALUES ("Mroonga 4.0 will be released", "2014"); +SELECT * FROM mroonga_releases +WHERE release_year <= "13" AND +MATCH(release_title) AGAINST("Mroonga" IN BOOLEAN MODE) +ORDER BY id DESC LIMIT 1,2; +id release_title release_year +3 Mroonga 2.0 has been released 2012 +2 Rename Groonga storage engine to Mroonga 2011 +SHOW STATUS LIKE 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 1 +DROP TABLE mroonga_releases; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_skip_count_TODO_SPLIT_ME.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_skip_count_TODO_SPLIT_ME.result new file mode 100644 index 00000000000..b66801094bd --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_skip_count_TODO_SPLIT_ME.result @@ -0,0 +1,106 @@ +drop table if exists t1, t2, t3; +flush status; +create table t1 (c1 int primary key, c2 int, c3 text, key idx1(c2), fulltext index ft(c3)); +insert into t1 values(1,10,"aa ii uu ee oo"); +insert into t1 values(2,20,"ka ki ku ke ko"); +insert into t1 values(3,30,"sa si su se so"); +insert into t1 values(4,40,"ta ti tu te to"); +insert into t1 values(5,50,"aa ii uu ee oo"); +show status like 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 0 +select * from t1; +c1 c2 c3 +1 10 aa ii uu ee oo +2 20 ka ki ku ke ko +3 30 sa si su se so +4 40 ta ti tu te to +5 50 aa ii uu ee oo +show status like 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 0 +select count(*) from t1; +count(*) +5 +show status like 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 0 +select * from t1 force index(primary) where c1 between 2 and 4; +c1 c2 c3 +2 20 ka ki ku ke ko +3 30 sa si su se so +4 40 ta ti tu te to +show status like 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 0 +select count(*) from t1 force index(primary) where c1 between 2 and 4; +count(*) +3 +show status like 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 1 +select c1 from t1 force index(primary) where c1 < 3; +c1 +1 +2 +show status like 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 1 +select count(c1) from t1 force index(primary) where c1 < 3; +count(c1) +2 +show status like 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 1 +select 1 from t1 force index(primary) where c1 > 3; +1 +1 +1 +show status like 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 1 +select count(1) from t1 force index(primary) where c1 > 3; +count(1) +2 +show status like 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 2 +select * from t1 where match(c3) against("su"); +c1 c2 c3 +3 30 sa si su se so +show status like 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 2 +select count(*) from t1 where match(c3) against("su"); +count(*) +1 +show status like 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 3 +select * from t1 where match(c3) against("+su" in boolean mode); +c1 c2 c3 +3 30 sa si su se so +show status like 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 3 +select count(*) from t1 where match(c3) against("+su" in boolean mode); +count(*) +1 +show status like 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 4 +select * from t1 force index(idx1) where c2 between 20 and 40; +c1 c2 c3 +2 20 ka ki ku ke ko +3 30 sa si su se so +4 40 ta ti tu te to +show status like 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 4 +select count(*) from t1 force index(idx1) where c2 between 20 and 40; +count(*) +3 +show status like 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 5 +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_skip_count_after_insert_multithread.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_skip_count_after_insert_multithread.result new file mode 100644 index 00000000000..c09ec340ccb --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_skip_count_after_insert_multithread.result @@ -0,0 +1,19 @@ +DROP TABLE IF EXISTS diaries; +FLUSH STATUS; +CREATE TABLE diaries ( +title TEXT, +FULLTEXT INDEX ft(title) +); +INSERT INTO diaries VALUES("Hello mroonga!"); +INSERT INTO diaries VALUES("It's funny."); +INSERT INTO diaries VALUES("Happy birthday!"); +SHOW STATUS LIKE 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 0 +SELECT COUNT(*) FROM diaries WHERE MATCH(title) AGAINST("mroonga" IN BOOLEAN MODE); +COUNT(*) +1 +SHOW STATUS LIKE 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 1 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_skip_count_after_insert_single_thread.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_skip_count_after_insert_single_thread.result new file mode 100644 index 00000000000..c09ec340ccb --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_skip_count_after_insert_single_thread.result @@ -0,0 +1,19 @@ +DROP TABLE IF EXISTS diaries; +FLUSH STATUS; +CREATE TABLE diaries ( +title TEXT, +FULLTEXT INDEX ft(title) +); +INSERT INTO diaries VALUES("Hello mroonga!"); +INSERT INTO diaries VALUES("It's funny."); +INSERT INTO diaries VALUES("Happy birthday!"); +SHOW STATUS LIKE 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 0 +SELECT COUNT(*) FROM diaries WHERE MATCH(title) AGAINST("mroonga" IN BOOLEAN MODE); +COUNT(*) +1 +SHOW STATUS LIKE 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 1 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_skip_count_disabled.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_skip_count_disabled.result new file mode 100644 index 00000000000..9971d21e386 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_skip_count_disabled.result @@ -0,0 +1,32 @@ +DROP TABLE IF EXISTS diaries; +FLUSH STATUS; +SET NAMES UTF8; +CREATE TABLE diaries ( +id INT UNSIGNED NOT NULL, +title VARCHAR(255), +content TEXT, +FULLTEXT INDEX(content) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(10) unsigned NOT NULL, + `title` varchar(255) DEFAULT NULL, + `content` text, + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries VALUES(1, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, "富士山", "今日も天気がよくてきれいに見える。"); +INSERT INTO diaries VALUES(4, "帰り道", "今日は天気がよくてよかった。"); +INSERT INTO diaries VALUES(5, "はれ", "天気がよいのは今日までみたい。"); +SET mroonga_enable_optimization=FALSE; +SELECT COUNT(*) FROM diaries +WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE); +COUNT(*) +4 +SHOW STATUS LIKE 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 0 +SET mroonga_enable_optimization=TRUE; +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_skip_count_index_view.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_skip_count_index_view.result new file mode 100644 index 00000000000..407347a4fa2 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_skip_count_index_view.result @@ -0,0 +1,28 @@ +DROP TABLE IF EXISTS diaries, users; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +user_id INT NOT NULL, +title VARCHAR(45) NOT NULL, +KEY (user_id), +FULLTEXT INDEX title_index (title) +) DEFAULT CHARSET=UTF8; +CREATE TABLE users ( +id INT PRIMARY KEY AUTO_INCREMENT, +name VARCHAR(45) NOT NULL, +INDEX (name) +) ENGINE=InnoDB DEFAULT CHARSET=UTF8; +INSERT INTO users (id, name) VALUES (1, "Alice"), (2, "Bob"); +INSERT INTO diaries (user_id, title) VALUES (1, "survey"); +INSERT INTO diaries (user_id, title) VALUES (2, "groonga (1)"); +INSERT INTO diaries (user_id, title) VALUES (2, "groonga (2)"); +CREATE VIEW articles AS +SELECT diaries.user_id AS user_id, +diaries.title AS title, +users.name AS name +FROM diaries, users +WHERE diaries.user_id = users.id; +SELECT COUNT(*) FROM articles WHERE name = 'Bob'; +COUNT(*) +2 +DROP VIEW articles; +DROP TABLE diaries, users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/replace_geometry.result b/storage/mroonga/mysql-test/mroonga/storage/r/replace_geometry.result new file mode 100644 index 00000000000..94bd5167dbc --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/replace_geometry.result @@ -0,0 +1,23 @@ +DROP TABLE IF EXISTS geo_replace; +CREATE TABLE geo_replace ( +id INT NOT NULL, +geo GEOMETRY NOT NULL, +PRIMARY KEY(id) +) DEFAULT CHARSET=utf8; +INSERT INTO geo_replace VALUES(1, POINT(100,100)); +SELECT id, ASTEXT(geo) FROM geo_replace; +id ASTEXT(geo) +1 POINT(100 100) +REPLACE INTO geo_replace VALUES(1, POINT(100,200)); +SELECT id, ASTEXT(geo) FROM geo_replace; +id ASTEXT(geo) +1 POINT(100 200) +INSERT INTO geo_replace VALUES(1, POINT(200,200)) ON DUPLICATE KEY UPDATE geo = POINT(200,200); +SELECT id, ASTEXT(geo) FROM geo_replace; +id ASTEXT(geo) +1 POINT(200 200) +UPDATE geo_replace SET geo = POINT(200,300); +SELECT id, ASTEXT(geo) FROM geo_replace; +id ASTEXT(geo) +1 POINT(200 300) +DROP TABLE geo_replace; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/replace_select_varchar.result b/storage/mroonga/mysql-test/mroonga/storage/r/replace_select_varchar.result new file mode 100644 index 00000000000..9cbe11c5574 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/replace_select_varchar.result @@ -0,0 +1,39 @@ +DROP TABLE IF EXISTS videos_master, videos_groonga; +CREATE TABLE `videos_master` ( +`id` bigint(1) unsigned NOT NULL, +`video_id` varchar(64) NOT NULL, +`description` text, +`tags_unpack` text, +PRIMARY KEY (`video_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `videos_groonga` ( +`id` bigint(1) unsigned NOT NULL, +`video_id` varchar(64) NOT NULL, +`description` text, +`tags_unpack` text, +PRIMARY KEY (`video_id`), +FULLTEXT INDEX (`description`), +FULLTEXT INDEX (`tags_unpack`) +) DEFAULT CHARSET=utf8; +INSERT INTO videos_master VALUES (1, "video-1", "My Familly", "familly human"); +INSERT INTO videos_master VALUES (2, "video-2", "My Cat", "family cat"); +REPLACE INTO videos_groonga +SELECT v.id, v.video_id, v.description, NULL +FROM videos_master AS v +WHERE v.video_id = (video_id); +SELECT *, MATCH(description) AGAINST("cat") FROM videos_groonga +WHERE MATCH(description) AGAINST("cat"); +id video_id description tags_unpack MATCH(description) AGAINST("cat") +2 video-2 My Cat 1048577 +INSERT INTO videos_master VALUES (3, "video-3", "My Dog", "family dog"); +REPLACE INTO videos_groonga +SELECT v.id, v.video_id, v.description, NULL +FROM videos_master AS v +WHERE v.video_id = (video_id); +SELECT *, MATCH(description) AGAINST("my") FROM videos_groonga +WHERE MATCH(description) AGAINST("my"); +id video_id description tags_unpack MATCH(description) AGAINST("my") +1 video-1 My Familly 209716 +2 video-2 My Cat 209716 +3 video-3 My Dog 209716 +DROP TABLE videos_master, videos_groonga; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/replace_text.result b/storage/mroonga/mysql-test/mroonga/storage/r/replace_text.result new file mode 100644 index 00000000000..f2cf9667ac7 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/replace_text.result @@ -0,0 +1,33 @@ +drop table if exists diaries; +set names utf8; +create table diaries ( +id int primary key, +content text, +fulltext index (content) +) default charset utf8; +show create table diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL, + `content` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +insert into diaries values(1, "今日からはじめました。"); +insert into diaries values(2, "明日の富士山の天気について"); +insert into diaries values(3, "今日も天気がよくてきれいに見える。"); +select * from diaries; +id content +1 今日からはじめました。 +2 明日の富士山の天気について +3 今日も天気がよくてきれいに見える。 +select * from diaries where match(content) against("天気"); +id content +2 明日の富士山の天気について +3 今日も天気がよくてきれいに見える。 +replace into diaries values(2, "明日の天気は雨みたい。"); +select * from diaries where match(content) against("天気"); +id content +2 明日の天気は雨みたい。 +3 今日も天気がよくてきれいに見える。 +drop table diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/replace_varchar.result b/storage/mroonga/mysql-test/mroonga/storage/r/replace_varchar.result new file mode 100644 index 00000000000..090ea9b84d6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/replace_varchar.result @@ -0,0 +1,33 @@ +drop table if exists diaries; +set names utf8; +create table diaries ( +id int primary key, +content varchar(256), +fulltext index (content) +) default charset utf8; +show create table diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL, + `content` varchar(256) DEFAULT NULL, + PRIMARY KEY (`id`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +insert into diaries values(1, "今日からはじめました。"); +insert into diaries values(2, "明日の富士山の天気について"); +insert into diaries values(3, "今日も天気がよくてきれいに見える。"); +select * from diaries; +id content +1 今日からはじめました。 +2 明日の富士山の天気について +3 今日も天気がよくてきれいに見える。 +select * from diaries where match(content) against("天気"); +id content +2 明日の富士山の天気について +3 今日も天気がよくてきれいに見える。 +replace into diaries values(2, "明日の天気は雨みたい。"); +select * from diaries where match(content) against("天気"); +id content +2 明日の天気は雨みたい。 +3 今日も天気がよくてきれいに見える。 +drop table diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/replace_vector.result b/storage/mroonga/mysql-test/mroonga/storage/r/replace_vector.result new file mode 100644 index 00000000000..3e987631dba --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/replace_vector.result @@ -0,0 +1,29 @@ +DROP TABLE IF EXISTS vector_replace; +DROP TABLE IF EXISTS vector_replace_vec; +CREATE TABLE vector_replace_vec ( +vec CHAR(10) PRIMARY KEY +) DEFAULT CHARSET=utf8 +COMMENT='default_tokenizer "TokenDelimit"'; +CREATE TABLE vector_replace ( +id INT NOT NULL, +vec TEXT COMMENT 'flags "COLUMN_VECTOR", type "vector_replace_vec"', +PRIMARY KEY(id) +) DEFAULT CHARSET=utf8; +INSERT INTO vector_replace VALUES(1, 'first second third'); +SELECT id, vec FROM vector_replace; +id vec +1 FIRST SECOND THIRD +REPLACE INTO vector_replace VALUES(1, 'fourth fifth'); +SELECT id, vec FROM vector_replace; +id vec +1 FOURTH FIFTH +INSERT INTO vector_replace VALUES(1, 'sixth seventh') ON DUPLICATE KEY UPDATE vec = 'sixth seventh'; +SELECT id, vec FROM vector_replace; +id vec +1 SIXTH SEVENTH +UPDATE vector_replace SET vec = 'eighth nineth tenth'; +SELECT id, vec FROM vector_replace; +id vec +1 EIGHTH NINETH TENTH +DROP TABLE vector_replace; +DROP TABLE vector_replace_vec; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/select_all.result b/storage/mroonga/mysql-test/mroonga/storage/r/select_all.result new file mode 100644 index 00000000000..18318bdbc4e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/select_all.result @@ -0,0 +1,198 @@ +drop table if exists t1, t2, t3; +create table t1(c1 int, c2 int, c3 int); +insert into t1 values (1, 10, 100); +insert into t1 values (2, 30, 500); +insert into t1 values (5, 20, 200); +insert into t1 values (3, 60, 300); +insert into t1 values (4, 50, 600); +insert into t1 values (6, 40, 400); +select * from t1; +c1 c2 c3 +1 10 100 +2 30 500 +5 20 200 +3 60 300 +4 50 600 +6 40 400 +select c1 from t1; +c1 +1 +2 +5 +3 +4 +6 +select c2 from t1; +c2 +10 +30 +20 +60 +50 +40 +select c3 from t1; +c3 +100 +500 +200 +300 +600 +400 +select * from t1 where c1 <= 3; +c1 c2 c3 +1 10 100 +2 30 500 +3 60 300 +select * from t1 where c2 > 40; +c1 c2 c3 +3 60 300 +4 50 600 +select * from t1 where c3 = 300; +c1 c2 c3 +3 60 300 +select * from t1 order by c1; +c1 c2 c3 +1 10 100 +2 30 500 +3 60 300 +4 50 600 +5 20 200 +6 40 400 +select * from t1 order by c2 desc; +c1 c2 c3 +3 60 300 +4 50 600 +6 40 400 +2 30 500 +5 20 200 +1 10 100 +select * from t1 order by c3, c1; +c1 c2 c3 +1 10 100 +5 20 200 +3 60 300 +6 40 400 +2 30 500 +4 50 600 +drop table t1; +create table t1 (c1 int, c2 varchar(100)); +insert into t1 values(1, "hoge"); +insert into t1 values(4, "hogefuga"); +insert into t1 values(2, "fuga"); +insert into t1 values(5, "moge"); +insert into t1 values(3, "mo"); +select * from t1; +c1 c2 +1 hoge +4 hogefuga +2 fuga +5 moge +3 mo +select * from t1 order by c1; +c1 c2 +1 hoge +2 fuga +3 mo +4 hogefuga +5 moge +select * from t1 order by c1 desc; +c1 c2 +5 moge +4 hogefuga +3 mo +2 fuga +1 hoge +select * from t1 order by c2; +c1 c2 +2 fuga +1 hoge +4 hogefuga +3 mo +5 moge +drop table t1; +create table t1 (c1 int, c2 text); +insert into t1 values(1, "hoge"); +insert into t1 values(4, "hogefuga"); +insert into t1 values(2, "fuga"); +insert into t1 values(5, "moge"); +insert into t1 values(3, "mo"); +select * from t1; +c1 c2 +1 hoge +4 hogefuga +2 fuga +5 moge +3 mo +drop table t1; +create table t1 (c1 int, c2 int, c3 text); +insert into t1 values(1, 20, "hoge"); +insert into t1 values(4, 60, "hogefuga"); +insert into t1 values(2, 50, "fuga"); +insert into t1 values(5, 30, "moge"); +insert into t1 values(3, 40, "mo"); +select * from t1 order by c1 asc; +c1 c2 c3 +1 20 hoge +2 50 fuga +3 40 mo +4 60 hogefuga +5 30 moge +select * from t1 order by c1 desc; +c1 c2 c3 +5 30 moge +4 60 hogefuga +3 40 mo +2 50 fuga +1 20 hoge +select * from t1 order by c2 asc; +c1 c2 c3 +1 20 hoge +5 30 moge +3 40 mo +2 50 fuga +4 60 hogefuga +select * from t1 order by c2 desc; +c1 c2 c3 +4 60 hogefuga +2 50 fuga +3 40 mo +5 30 moge +1 20 hoge +select * from t1 order by c3 asc; +c1 c2 c3 +2 50 fuga +1 20 hoge +4 60 hogefuga +3 40 mo +5 30 moge +select * from t1 order by c3 desc; +c1 c2 c3 +5 30 moge +3 40 mo +4 60 hogefuga +1 20 hoge +2 50 fuga +drop table t1; +create table t1 (_id int, c1 int); +insert into t1 values (null,100); +insert into t1 values (null,100); +insert into t1 values (null,100); +insert into t1 values (null,100); +insert into t1 values (null,100); +select * from t1; +_id c1 +1 100 +2 100 +3 100 +4 100 +5 100 +select * from t1 where _id < 3; +_id c1 +1 100 +2 100 +select * from t1 where _id >= 3; +_id c1 +3 100 +4 100 +5 100 +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/select_empty_key_where_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/select_empty_key_where_equal.result new file mode 100644 index 00000000000..e0e3e21c620 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/select_empty_key_where_equal.result @@ -0,0 +1,12 @@ +DROP TABLE IF EXISTS tags; +CREATE TABLE tags ( +name VARCHAR(16) NOT NULL, +KEY index_name (name) +); +INSERT INTO tags VALUES ('mroonga'); +INSERT INTO tags VALUES ('mysql'); +INSERT INTO tags VALUES (''); +SELECT * FROM tags WHERE name = ""; +name + +DROP TABLE tags; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/select_empty_key_where_not_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/select_empty_key_where_not_equal.result new file mode 100644 index 00000000000..3732cb28184 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/select_empty_key_where_not_equal.result @@ -0,0 +1,13 @@ +DROP TABLE IF EXISTS tags; +CREATE TABLE tags ( +name VARCHAR(16) NOT NULL, +KEY index_name (name) +); +INSERT INTO tags VALUES ('mroonga'); +INSERT INTO tags VALUES ('mysql'); +INSERT INTO tags VALUES (''); +SELECT * FROM tags WHERE name != ""; +name +mroonga +mysql +DROP TABLE tags; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/select_group_by_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/select_group_by_with_index.result new file mode 100644 index 00000000000..400156cec7b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/select_group_by_with_index.result @@ -0,0 +1,15 @@ +DROP TABLE IF EXISTS users; +SET NAMES utf8; +CREATE TABLE users ( +name varchar(40), +age int, +KEY (age) +); +INSERT INTO users VALUES ("Alice", 20); +INSERT INTO users VALUES ("Bob", 20); +INSERT INTO users VALUES ("Charry", 29); +SELECT *, COUNT(*) FROM users GROUP BY age; +name age COUNT(*) +Alice 20 2 +Charry 29 1 +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/select_group_by_without_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/select_group_by_without_index.result new file mode 100644 index 00000000000..04f63d0e779 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/select_group_by_without_index.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS users; +SET NAMES utf8; +CREATE TABLE users ( +name varchar(40), +age int +); +INSERT INTO users VALUES ("Alice", 20); +INSERT INTO users VALUES ("Bob", 20); +INSERT INTO users VALUES ("Charry", 29); +EXPLAIN SELECT *, COUNT(*) FROM users GROUP BY age; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE users ALL NULL NULL NULL NULL 3 Using temporary; Using filesort +SELECT *, COUNT(*) FROM users GROUP BY age; +name age COUNT(*) +Alice 20 2 +Charry 29 1 +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/select_pkey.result b/storage/mroonga/mysql-test/mroonga/storage/r/select_pkey.result new file mode 100644 index 00000000000..99f69f49aba --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/select_pkey.result @@ -0,0 +1,27 @@ +drop table if exists t1, t2, t3; +create table t1(c1 int primary key, c2 int, c3 int); +insert into t1 values (1, 10, 100); +insert into t1 values (2, 30, 500); +insert into t1 values (5, 20, 200); +insert into t1 values (3, 60, 300); +insert into t1 values (4, 50, 600); +insert into t1 values (6, 40, 400); +select * from t1 where c1=1; +c1 c2 c3 +1 10 100 +select * from t1 where c1=2; +c1 c2 c3 +2 30 500 +select * from t1 where c1=3; +c1 c2 c3 +3 60 300 +select * from t1 where c1=4; +c1 c2 c3 +4 50 600 +select * from t1 where c1=5; +c1 c2 c3 +5 20 200 +select * from t1 where c1=6; +c1 c2 c3 +6 40 400 +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/select_secondary_key.result b/storage/mroonga/mysql-test/mroonga/storage/r/select_secondary_key.result new file mode 100644 index 00000000000..1c24089ef71 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/select_secondary_key.result @@ -0,0 +1,55 @@ +drop table if exists t1, t2, t3; +create table t1 (c1 int primary key, c2 int, c3 text, key idx1(c2), fulltext index ft(c3)); +insert into t1 values(1,10,"aa ii uu ee oo"); +insert into t1 values(2,20,"ka ki ku ke ko"); +insert into t1 values(3,30,"sa si su se so"); +insert into t1 values(4,40,"ta ti tu te to"); +insert into t1 values(5,50,"aa ii uu ee oo"); +select * from t1; +c1 c2 c3 +1 10 aa ii uu ee oo +2 20 ka ki ku ke ko +3 30 sa si su se so +4 40 ta ti tu te to +5 50 aa ii uu ee oo +select * from t1 force index(idx1) where c2 = 30; +c1 c2 c3 +3 30 sa si su se so +select * from t1 force index(idx1) where c2 = 20; +c1 c2 c3 +2 20 ka ki ku ke ko +insert into t1 values(6,30,"aa bb cc dd ee"); +select * from t1; +c1 c2 c3 +1 10 aa ii uu ee oo +2 20 ka ki ku ke ko +3 30 sa si su se so +4 40 ta ti tu te to +5 50 aa ii uu ee oo +6 30 aa bb cc dd ee +select * from t1 force index(idx1) where c2 = 30; +c1 c2 c3 +3 30 sa si su se so +6 30 aa bb cc dd ee +drop table t1; +create table t1 (c1 varchar(5) primary key, c2 varchar(5), c3 text, key idx1(c2), fulltext index ft(c3))engine=mroonga; +insert into t1 values('ab','ijk',"aa ii uu ee oo"); +insert into t1 values('bc','ghi',"ka ki ku ke ko"); +insert into t1 values('cd','efg',"sa si su se so"); +insert into t1 values('de','cde',"ta ti tu te to"); +insert into t1 values('ef','abc',"aa ii uu ee oo"); +select * from t1 force index(idx1) where c2 < 'e' order by c1 asc; +c1 c2 c3 +de cde ta ti tu te to +ef abc aa ii uu ee oo +select * from t1 force index(idx1) where c2 > 'e' order by c1 asc; +c1 c2 c3 +ab ijk aa ii uu ee oo +bc ghi ka ki ku ke ko +cd efg sa si su se so +select * from t1 force index(idx1) where c2 between 'c' and 'h' order by c1 asc; +c1 c2 c3 +bc ghi ka ki ku ke ko +cd efg sa si su se so +de cde ta ti tu te to +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/show_create_table_TODO_SPLIT_ME.result b/storage/mroonga/mysql-test/mroonga/storage/r/show_create_table_TODO_SPLIT_ME.result new file mode 100644 index 00000000000..ef87703e716 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/show_create_table_TODO_SPLIT_ME.result @@ -0,0 +1,25 @@ +drop table if exists t1, t2, t3; +create table t1 (c1 int); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(11) DEFAULT NULL +) ENGINE=Mroonga DEFAULT CHARSET=latin1 +drop table t1; +create table t1 (c1 int, c2 int); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(11) DEFAULT NULL, + `c2` int(11) DEFAULT NULL +) ENGINE=Mroonga DEFAULT CHARSET=latin1 +drop table t1; +create table t1 (c1 int primary key, c2 varchar(100)); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(11) NOT NULL, + `c2` varchar(100) DEFAULT NULL, + PRIMARY KEY (`c1`) +) ENGINE=Mroonga DEFAULT CHARSET=latin1 +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/sub_query_fulltext.result b/storage/mroonga/mysql-test/mroonga/storage/r/sub_query_fulltext.result new file mode 100644 index 00000000000..4f24d0d74b0 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/sub_query_fulltext.result @@ -0,0 +1,44 @@ +DROP TABLE IF EXISTS diaries, users; +CREATE TABLE users ( +id INT PRIMARY KEY AUTO_INCREMENT, +name TEXT +) DEFAULT CHARSET UTF8; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +user_id INT UNSIGNED NOT NULL, +title TEXT, +FULLTEXT INDEX (title) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(10) unsigned NOT NULL, + `title` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `title` (`title`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO users (name) VALUES ("alice"); +INSERT INTO users (name) VALUES ("bob"); +INSERT INTO users (name) VALUES ("carlos"); +SELECT * FROM users; +id name +1 alice +2 bob +3 carlos +INSERT INTO diaries (user_id, title) VALUES (1, "Hello!"); +INSERT INTO diaries (user_id, title) VALUES (2, "my name is bob"); +INSERT INTO diaries (user_id, title) VALUES (3, "my name is carlos"); +SELECT * FROM diaries; +id user_id title +1 1 Hello! +2 2 my name is bob +3 3 my name is carlos +SELECT * FROM users +WHERE id IN (SELECT user_id FROM diaries +WHERE MATCH(title) AGAINST("name")) +ORDER BY id DESC; +id name +3 carlos +2 bob +DROP TABLE diaries, users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/temporary_table.result b/storage/mroonga/mysql-test/mroonga/storage/r/temporary_table.result new file mode 100644 index 00000000000..f6c036bbf9f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/temporary_table.result @@ -0,0 +1,21 @@ +DROP TEMPORARY TABLE IF EXISTS diaries; +CREATE TEMPORARY TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TEMPORARY TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (title) VALUES ("clear day"); +INSERT INTO diaries (title) VALUES ("rainy day"); +INSERT INTO diaries (title) VALUES ("cloudy day"); +SELECT * FROM diaries; +id title +1 clear day +2 rainy day +3 cloudy day +DROP TEMPORARY TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/truncate.result b/storage/mroonga/mysql-test/mroonga/storage/r/truncate.result new file mode 100644 index 00000000000..0e33976eb17 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/truncate.result @@ -0,0 +1,55 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES UTF8; +CREATE TABLE diaries ( +id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, +year INT UNSIGNED, +month INT UNSIGNED, +day INT UNSIGNED, +title VARCHAR(255), +content TEXT, +FULLTEXT INDEX(content), +KEY(day) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `year` int(10) unsigned DEFAULT NULL, + `month` int(10) unsigned DEFAULT NULL, + `day` int(10) unsigned DEFAULT NULL, + `title` varchar(255) DEFAULT NULL, + `content` text, + PRIMARY KEY (`id`), + KEY `day` (`day`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気がよくてきれいに見える。"); +SELECT * FROM diaries; +id year month day title content +1 2011 11 9 Hello 今日からはじめました。 +2 2011 11 10 天気 明日の富士山の天気について +3 2011 11 11 富士山 今日も天気がよくてきれいに見える。 +SELECT * FROM diaries WHERE MATCH(content) AGAINST("今日 天気" IN BOOLEAN MODE); +id year month day title content +1 2011 11 9 Hello 今日からはじめました。 +3 2011 11 11 富士山 今日も天気がよくてきれいに見える。 +2 2011 11 10 天気 明日の富士山の天気について +TRUNCATE TABLE diaries; +SELECT * FROM diaries; +id year month day title content +SELECT * FROM diaries WHERE MATCH(content) AGAINST("今日 天気" IN BOOLEAN MODE); +id year month day title content +INSERT INTO diaries VALUES(1, 2011, 11, 11, "帰り道", "つかれたー"); +INSERT INTO diaries VALUES(2, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。"); +INSERT INTO diaries VALUES(3, 2011, 12, 2, "初雪", "今年はじめての雪!"); +SELECT * FROM diaries; +id year month day title content +1 2011 11 11 帰り道 つかれたー +2 2011 12 1 久しぶり 天気が悪いからずっと留守番。 +3 2011 12 2 初雪 今年はじめての雪! +SELECT * FROM diaries WHERE MATCH(content) AGAINST("悪い" IN BOOLEAN MODE); +id year month day title content +2 2011 12 1 久しぶり 天気が悪いからずっと留守番。 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/update_fulltext.result b/storage/mroonga/mysql-test/mroonga/storage/r/update_fulltext.result new file mode 100644 index 00000000000..bf81d5e0a8d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/update_fulltext.result @@ -0,0 +1,22 @@ +drop table if exists t1, t2, t3; +create table t1 (c1 int primary key, c2 text, fulltext index (c2)); +insert into t1 values(10, "aa ii uu ee"); +insert into t1 values(20, "ka ki ku ke"); +insert into t1 values(30, "sa si su se"); +select * from t1; +c1 c2 +10 aa ii uu ee +20 ka ki ku ke +30 sa si su se +update t1 set c2="ta ti tu te" where c1=20; +select * from t1; +c1 c2 +10 aa ii uu ee +20 ta ti tu te +30 sa si su se +select * from t1 where match(c2) against("ti"); +c1 c2 +20 ta ti tu te +select * from t1 where match(c2) against("ki"); +c1 c2 +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/update_id_hash_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/update_id_hash_index.result new file mode 100644 index 00000000000..35d8843afbe --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/update_id_hash_index.result @@ -0,0 +1,20 @@ +drop table if exists t1, t2, t3; +create table t1 (_id int, c1 int, key (_id) using hash); +insert into t1 values(null, 100); +insert into t1 values(null, 100); +insert into t1 values(null, 100); +insert into t1 values(null, 100); +select * from t1; +_id c1 +1 100 +2 100 +3 100 +4 100 +update t1 set c1 = 200 where _id = 2; +select * from t1; +_id c1 +1 100 +2 200 +3 100 +4 100 +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/update_id_unique_hash_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/update_id_unique_hash_index.result new file mode 100644 index 00000000000..dba9c964270 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/update_id_unique_hash_index.result @@ -0,0 +1,20 @@ +drop table if exists t1, t2, t3; +create table t1 (_id int, c1 int, unique key (_id) using hash); +insert into t1 values(null, 100); +insert into t1 values(null, 100); +insert into t1 values(null, 100); +insert into t1 values(null, 100); +select * from t1; +_id c1 +1 100 +2 100 +3 100 +4 100 +update t1 set c1 = 200 where _id = 2; +select * from t1; +_id c1 +1 100 +2 200 +3 100 +4 100 +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/update_int.result b/storage/mroonga/mysql-test/mroonga/storage/r/update_int.result new file mode 100644 index 00000000000..e022fa237bb --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/update_int.result @@ -0,0 +1,42 @@ +drop table if exists t1, t2, t3; +create table t1 (c1 int, c2 int); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(11) DEFAULT NULL, + `c2` int(11) DEFAULT NULL +) ENGINE=Mroonga DEFAULT CHARSET=latin1 +insert into t1 values (1, 100); +insert into t1 values (2, 101); +insert into t1 values (3, 102); +select * from t1; +c1 c2 +1 100 +2 101 +3 102 +update t1 set c2=c2+100 where c1=1; +select * from t1; +c1 c2 +1 200 +2 101 +3 102 +update t1 set c2=c2+100 where c1=2; +select * from t1; +c1 c2 +1 200 +2 201 +3 102 +update t1 set c2=c2+100 where c1=3; +select * from t1; +c1 c2 +1 200 +2 201 +3 202 +flush tables; +update t1 set c1=5, c2=50; +select * from t1; +c1 c2 +5 50 +5 50 +5 50 +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/update_last_insert_grn_id.result b/storage/mroonga/mysql-test/mroonga/storage/r/update_last_insert_grn_id.result new file mode 100644 index 00000000000..af5926313c1 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/update_last_insert_grn_id.result @@ -0,0 +1,29 @@ +drop table if exists memos; +create table memos ( +_id int, +content varchar(255), +unique key (_id) using hash +); +insert into memos values (null, "今夜はさんま。"); +insert into memos values (null, "明日はgroongaをアップデート。"); +insert into memos values (null, "帰りにおだんご。"); +insert into memos values (null, "金曜日は肉の日。"); +select * from memos; +_id content +1 今夜はさんま。 +2 明日はgroongaをアップデート。 +3 帰りにおだんご。 +4 金曜日は肉の日。 +insert into memos values (null, "冷蔵庫に牛乳が残り1本。"); +select last_insert_grn_id(); +last_insert_grn_id() +5 +update memos set content = "冷蔵庫に牛乳はまだたくさんある。" where _id = last_insert_grn_id(); +select * from memos; +_id content +1 今夜はさんま。 +2 明日はgroongaをアップデート。 +3 帰りにおだんご。 +4 金曜日は肉の日。 +5 冷蔵庫に牛乳はまだたくさんある。 +drop table memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/update_virtual_column.result b/storage/mroonga/mysql-test/mroonga/storage/r/update_virtual_column.result new file mode 100644 index 00000000000..11e6ee21949 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/update_virtual_column.result @@ -0,0 +1,28 @@ +drop table if exists t1, t2, t3; +create table t1 (c1 int, _id int); +insert into t1 values(1,null); +insert into t1 values(2,null); +insert into t1 values(3,null); +select * from t1; +c1 _id +1 1 +2 2 +3 3 +set sql_mode=""; +update t1 set _id = 10 where c1 = 1; +Warnings: +Warning 1265 Data truncated for column '_id' at row 1 +select * from t1; +c1 _id +1 1 +2 2 +3 3 +set sql_mode="strict_all_tables"; +update t1 set _id = 11 where c1 = 1; +ERROR 01000: Data truncated for column '_id' at row 1 +select * from t1; +c1 _id +1 1 +2 2 +3 3 +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_database_path_prefix.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_database_path_prefix.result new file mode 100644 index 00000000000..4536dded9d7 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_database_path_prefix.result @@ -0,0 +1,17 @@ +SET GLOBAL mroonga_database_path_prefix = "test/mroonga.data/"; +SHOW GLOBAL VARIABLES LIKE 'mroonga_database_path_prefix'; +Variable_name Value +mroonga_database_path_prefix test/mroonga.data/ +CREATE DATABASE clean_test; +USE clean_test; +CREATE TABLE counts ( +id INT PRIMARY KEY AUTO_INCREMENT +); +INSERT INTO counts VALUES (NULL); +SELECT * FROM counts; +id +1 +DROP TABLE counts; +DROP DATABASE clean_test; +USE test; +SET GLOBAL mroonga_database_path_prefix = NULL; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_default_parser_new_value.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_default_parser_new_value.result new file mode 100644 index 00000000000..959383ee6d9 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_default_parser_new_value.result @@ -0,0 +1,6 @@ +SET @mroonga_default_parser_backup = @@mroonga_default_parser; +SET GLOBAL mroonga_default_parser = "TokenBigramSplitAlpha"; +SHOW GLOBAL VARIABLES LIKE 'mroonga_default_parser'; +Variable_name Value +mroonga_default_parser TokenBigramSplitAlpha +SET GLOBAL mroonga_default_parser = @mroonga_default_parser_backup; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_default_parser_same_value.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_default_parser_same_value.result new file mode 100644 index 00000000000..7f441b4b86d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_default_parser_same_value.result @@ -0,0 +1,4 @@ +SET GLOBAL mroonga_default_parser = "TokenBigram"; +SHOW GLOBAL VARIABLES LIKE 'mroonga_default_parser'; +Variable_name Value +mroonga_default_parser TokenBigram diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_dry_write_delete.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_dry_write_delete.result new file mode 100644 index 00000000000..6e690f45e61 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_dry_write_delete.result @@ -0,0 +1,28 @@ +drop table if exists diaries; +create table diaries ( +id int primary key auto_increment, +body text, +fulltext index body_index (body) +) default charset utf8; +show create table diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `body` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `body_index` (`body`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +insert into diaries (body) values ("will start groonga!"); +select * from diaries; +id body +1 will start groonga! +set mroonga_dry_write=true; +delete from diaries where id = 1; +select * from diaries; +id body +1 will start groonga! +set mroonga_dry_write=false; +delete from diaries where id = 1; +select * from diaries; +id body +drop table diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_dry_write_insert.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_dry_write_insert.result new file mode 100644 index 00000000000..8de55efaccc --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_dry_write_insert.result @@ -0,0 +1,30 @@ +drop table if exists diaries; +create table diaries ( +id int primary key auto_increment, +body text, +fulltext index body_index (body) +) default charset utf8; +show create table diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `body` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `body_index` (`body`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +insert into diaries (body) values ("will start groonga!"); +select * from diaries; +id body +1 will start groonga! +set mroonga_dry_write=true; +insert into diaries (body) values ("starting groonga..."); +select * from diaries; +id body +1 will start groonga! +set mroonga_dry_write=false; +insert into diaries (body) values ("started groonga."); +select * from diaries; +id body +1 will start groonga! +2 started groonga. +drop table diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_dry_write_update.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_dry_write_update.result new file mode 100644 index 00000000000..dd3ee5b333c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_dry_write_update.result @@ -0,0 +1,26 @@ +drop table if exists diaries; +create table diaries ( +id int primary key auto_increment, +body text, +fulltext index body_index (body) +) default charset utf8; +show create table diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `body` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `body_index` (`body`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +insert into diaries (body) values ("will start groonga!"); +set mroonga_dry_write=true; +update diaries set body = "starting groonga..." where id = 1; +select * from diaries; +id body +1 will start groonga! +set mroonga_dry_write=false; +update diaries set body = "starting groonga..." where id = 1; +select * from diaries; +id body +1 starting groonga... +drop table diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_lock_timeout_disable.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_lock_timeout_disable.result new file mode 100644 index 00000000000..789316d83ca --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_lock_timeout_disable.result @@ -0,0 +1,4 @@ +SET GLOBAL mroonga_lock_timeout = -1; +SHOW GLOBAL VARIABLES LIKE "mroonga_lock_timeout"; +Variable_name Value +mroonga_lock_timeout -1 diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_lock_timeout_invalid.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_lock_timeout_invalid.result new file mode 100644 index 00000000000..029b1ab17f7 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_lock_timeout_invalid.result @@ -0,0 +1,6 @@ +SET GLOBAL mroonga_lock_timeout = -2; +Warnings: +Warning 1292 Truncated incorrect mroonga_lock_timeout value: '-2' +SHOW GLOBAL VARIABLES LIKE "mroonga_lock_timeout"; +Variable_name Value +mroonga_lock_timeout -1 diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_lock_timeout_no_retry.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_lock_timeout_no_retry.result new file mode 100644 index 00000000000..f47a2e6625b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_lock_timeout_no_retry.result @@ -0,0 +1,4 @@ +SET GLOBAL mroonga_lock_timeout = 0; +SHOW GLOBAL VARIABLES LIKE "mroonga_lock_timeout"; +Variable_name Value +mroonga_lock_timeout 0 diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_lock_timeout_valid.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_lock_timeout_valid.result new file mode 100644 index 00000000000..6ec1004f752 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_lock_timeout_valid.result @@ -0,0 +1,4 @@ +SET GLOBAL mroonga_lock_timeout = 1000; +SHOW GLOBAL VARIABLES LIKE "mroonga_lock_timeout"; +Variable_name Value +mroonga_lock_timeout 1000 diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_log_file_new_value.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_log_file_new_value.result new file mode 100644 index 00000000000..db4694797b2 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_log_file_new_value.result @@ -0,0 +1,6 @@ +SET @mroonga_log_file_backup = @@mroonga_log_file; +SET GLOBAL mroonga_log_file = "new-mroonga.log"; +SHOW GLOBAL VARIABLES LIKE 'mroonga_log_file'; +Variable_name Value +mroonga_log_file new-mroonga.log +SET GLOBAL mroonga_log_file = @mroonga_log_file_backup; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_log_file_nonexistent_path.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_log_file_nonexistent_path.result new file mode 100644 index 00000000000..1dbec1f850e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_log_file_nonexistent_path.result @@ -0,0 +1,4 @@ +SET GLOBAL mroonga_log_file = "nonexistent/mroonga.log"; +SHOW GLOBAL VARIABLES LIKE 'mroonga_log_file'; +Variable_name Value +mroonga_log_file groonga.log diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_log_file_same_value.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_log_file_same_value.result new file mode 100644 index 00000000000..5824f09053e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_log_file_same_value.result @@ -0,0 +1,4 @@ +SET GLOBAL mroonga_log_file = "groonga.log"; +SHOW GLOBAL VARIABLES LIKE 'mroonga_log_file'; +Variable_name Value +mroonga_log_file groonga.log diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_log_level_TODO_SPLIT_ME.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_log_level_TODO_SPLIT_ME.result new file mode 100644 index 00000000000..cb646eceaf3 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_log_level_TODO_SPLIT_ME.result @@ -0,0 +1,49 @@ +set @mroonga_log_level_backup=@@mroonga_log_level; +show global variables like 'mroonga_log_level'; +Variable_name Value +mroonga_log_level NOTICE +set global mroonga_log_level=NONE; +show global variables like 'mroonga_log_level'; +Variable_name Value +mroonga_log_level NONE +set global mroonga_log_level=EMERG; +show global variables like 'mroonga_log_level'; +Variable_name Value +mroonga_log_level EMERG +set global mroonga_log_level=ALERT; +show global variables like 'mroonga_log_level'; +Variable_name Value +mroonga_log_level ALERT +set global mroonga_log_level=CRIT; +show global variables like 'mroonga_log_level'; +Variable_name Value +mroonga_log_level CRIT +set global mroonga_log_level=ERROR; +show global variables like 'mroonga_log_level'; +Variable_name Value +mroonga_log_level ERROR +set global mroonga_log_level=WARNING; +show global variables like 'mroonga_log_level'; +Variable_name Value +mroonga_log_level WARNING +set global mroonga_log_level=NOTICE; +show global variables like 'mroonga_log_level'; +Variable_name Value +mroonga_log_level NOTICE +set global mroonga_log_level=INFO; +show global variables like 'mroonga_log_level'; +Variable_name Value +mroonga_log_level INFO +set global mroonga_log_level=DEBUG; +show global variables like 'mroonga_log_level'; +Variable_name Value +mroonga_log_level DEBUG +set global mroonga_log_level=DUMP; +show global variables like 'mroonga_log_level'; +Variable_name Value +mroonga_log_level DUMP +set global mroonga_log_level=dummy; +ERROR 42000: Variable 'mroonga_log_level' can't be set to the value of 'dummy' +set session mroonga_log_level=NOTICE; +ERROR HY000: Variable 'mroonga_log_level' is a GLOBAL variable and should be set with SET GLOBAL +set global mroonga_log_level=@mroonga_log_level_backup; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_match_escalation_threshold_global.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_match_escalation_threshold_global.result new file mode 100644 index 00000000000..04b22c22ea6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_match_escalation_threshold_global.result @@ -0,0 +1,33 @@ +DROP TABLE IF EXISTS diaries; +SET GLOBAL mroonga_match_escalation_threshold = -1; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +tags TEXT, +FULLTEXT INDEX tags_index (tags) COMMENT 'parser "TokenDelimit"' +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `tags` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `tags_index` (`tags`) COMMENT 'parser "TokenDelimit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, tags) VALUES ("Hello groonga!", "groonga install"); +INSERT INTO diaries (title, tags) VALUES ("Hello mroonga!", "mroonga install"); +SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("install" IN BOOLEAN MODE); +id title tags +1 Hello groonga! groonga install +2 Hello mroonga! mroonga install +SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE); +id title tags +SET GLOBAL mroonga_match_escalation_threshold = 0; +SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE); +id title tags +SET mroonga_match_escalation_threshold = 0; +SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE); +id title tags +1 Hello groonga! groonga install +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_match_escalation_threshold_session.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_match_escalation_threshold_session.result new file mode 100644 index 00000000000..25a1aba61e2 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_match_escalation_threshold_session.result @@ -0,0 +1,33 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +tags TEXT, +FULLTEXT INDEX tags_index (tags) COMMENT 'parser "TokenDelimit"' +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `tags` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `tags_index` (`tags`) COMMENT 'parser "TokenDelimit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, tags) VALUES ("Hello groonga!", "groonga install"); +INSERT INTO diaries (title, tags) VALUES ("Hello mroonga!", "mroonga install"); +SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("install" IN BOOLEAN MODE); +id title tags +1 Hello groonga! groonga install +2 Hello mroonga! mroonga install +SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE); +id title tags +1 Hello groonga! groonga install +SET mroonga_match_escalation_threshold = -1; +SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE); +id title tags +SET mroonga_match_escalation_threshold = 0; +SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE); +id title tags +1 Hello groonga! groonga install +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_vector_column_delimiter.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_vector_column_delimiter.result new file mode 100644 index 00000000000..f3c8f1e8628 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_vector_column_delimiter.result @@ -0,0 +1,29 @@ +DROP TABLE IF EXISTS document; +DROP TABLE IF EXISTS category; +CREATE TABLE category ( +category CHAR(10) PRIMARY KEY +) DEFAULT CHARSET=utf8 +COMMENT='default_tokenizer "TokenDelimit"'; +CREATE TABLE document ( +id INT NOT NULL, +title TEXT, +categories TEXT COMMENT 'flags "COLUMN_VECTOR", type "category"', +PRIMARY KEY(id) +) DEFAULT CHARSET=utf8; +SHOW GLOBAL VARIABLES LIKE 'mroonga_vector_column_delimiter'; +Variable_name Value +mroonga_vector_column_delimiter +INSERT INTO document VALUES(1, "Mroonga is the fastest search engine", "it database fulltext"); +SELECT id, title, categories FROM document; +id title categories +1 Mroonga is the fastest search engine IT DATABASE FULLTEXT +SET GLOBAL mroonga_vector_column_delimiter = ';'; +SHOW GLOBAL VARIABLES LIKE 'mroonga_vector_column_delimiter'; +Variable_name Value +mroonga_vector_column_delimiter ; +SELECT id, title, categories FROM document; +id title categories +1 Mroonga is the fastest search engine IT;DATABASE;FULLTEXT +DROP TABLE document; +DROP TABLE category; +SET GLOBAL mroonga_vector_column_delimiter = ' '; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_version.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_version.result new file mode 100644 index 00000000000..4c22040ab5a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_version.result @@ -0,0 +1,3 @@ +show variables like 'mroonga_version'; +Variable_name Value +mroonga_version 4.05 diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_version.result.in b/storage/mroonga/mysql-test/mroonga/storage/r/variable_version.result.in new file mode 100644 index 00000000000..26ff300a759 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_version.result.in @@ -0,0 +1,3 @@ +show variables like 'mroonga_version'; +Variable_name Value +mroonga_version @MRN_VERSION@ diff --git a/storage/mroonga/mysql-test/mroonga/storage/suite.opt b/storage/mroonga/mysql-test/mroonga/storage/suite.opt new file mode 100644 index 00000000000..d5a1e5190a7 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/suite.opt @@ -0,0 +1 @@ +--loose-plugin-load-add=$HA_MROONGA_SO --loose-plugin-mroonga=ON diff --git a/storage/mroonga/mysql-test/mroonga/storage/suite.pm b/storage/mroonga/mysql-test/mroonga/storage/suite.pm new file mode 100644 index 00000000000..528ccc5d693 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/suite.pm @@ -0,0 +1,23 @@ +package My::Suite::Mroonga; + +@ISA = qw(My::Suite); + +return "No Mroonga engine" unless $ENV{HA_MROONGA_SO} or + $::mysqld_variables{'mroonga'} eq "ON"; + +sub is_default { 1 } + +my $groonga_normalizer_mysql_dir=$::basedir . '/storage/mroonga/vendor/groonga/vendor/plugins/groonga-normalizer-mysql'; +my $groonga_normalizer_mysql_install_dir=$::basedir . '/lib/groonga/plugins'; + +if (-d $groonga_normalizer_mysql_dir) +{ + $ENV{GRN_PLUGINS_DIR}=$groonga_normalizer_mysql_dir; +} +elsif (-d $groonga_normalizer_mysql_install_dir) +{ + $ENV{GRN_PLUGINS_DIR}=$groonga_normalizer_mysql_install_dir; +} + +bless { }; + diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_after.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_after.test new file mode 100644 index 00000000000..e70dcb92e12 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_after.test @@ -0,0 +1,38 @@ +# Copyright(C) 2014 Naoya Murakami <naoya@createfield.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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + body TEXT +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +ALTER TABLE diaries ADD title TEXT AFTER id; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, body) values ("groonga (1)", "starting groonga."); +SELECT * FROM diaries; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_first.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_first.test new file mode 100644 index 00000000000..dac06ff6719 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_first.test @@ -0,0 +1,38 @@ +# Copyright(C) 2014 Naoya Murakami <naoya@createfield.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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + body TEXT +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +ALTER TABLE diaries ADD title TEXT FIRST; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, body) values ("groonga (1)", "starting groonga."); +SELECT * FROM diaries; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_multiple.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_multiple.test new file mode 100644 index 00000000000..ebf8ac5d581 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_multiple.test @@ -0,0 +1,50 @@ +# Copyright(C) 2014 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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title) VALUES ("survey"); +SELECT * FROM diaries; + +ALTER TABLE diaries + ADD COLUMN body TEXT FIRST, + ADD COLUMN published BOOLEAN AFTER id, + ADD COLUMN created_at DATETIME; +UPDATE diaries SET body = "will start groonga!"; +SELECT * FROM diaries; + +INSERT INTO diaries (title, body, published, created_at) + VALUES ("groonga (1)", "starting groonga...", TRUE, "2014-2-9 02:09:00"); +INSERT INTO diaries (title, body, published, created_at) + VALUES ("groonga (2)", "started groonga.", FALSE, "2014-2-9 12:19:00"); +SELECT * FROM diaries; + +SHOW CREATE TABLE diaries; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_plain.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_plain.test new file mode 100644 index 00000000000..01f13799c02 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_plain.test @@ -0,0 +1,45 @@ +# Copyright(C) 2011 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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title) VALUES ("survey"); +SELECT * FROM diaries; + +ALTER TABLE diaries ADD COLUMN body TEXT; +UPDATE diaries SET body = "will start groonga!"; +SELECT * FROM diaries; + +INSERT INTO diaries (title, body) values ("groonga (1)", "starting groonga..."); +INSERT INTO diaries (title, body) values ("groonga (2)", "started groonga."); +SELECT * FROM diaries; + +SHOW CREATE TABLE diaries; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_with_flags.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_with_flags.test new file mode 100644 index 00000000000..c93ae13a19e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_with_flags.test @@ -0,0 +1,38 @@ +# Copyright(C) 2014 Kenji Maruyama <mmmaru777@gmail.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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_query_log +DROP DATABASE test; +CREATE DATABASE test; +USE test; +--enable_query_log + +CREATE TABLE tags ( + id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY +) DEFAULT CHARSET=utf8; + +ALTER TABLE tags ADD COLUMN name VARCHAR(64) COMMENT 'flags "COLUMN_VECTOR"'; + +SELECT mroonga_command("dump"); + +DROP TABLE tags; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_with_type.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_with_type.test new file mode 100644 index 00000000000..2f39d52777a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_with_type.test @@ -0,0 +1,43 @@ +# Copyright(C) 2014 Kenji Maruyama <mmmaru777@gmail.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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_query_log +DROP DATABASE test; +CREATE DATABASE test; +USE test; +--enable_query_log + +CREATE TABLE tags ( + id INT UNSIGNED PRIMARY KEY +) DEFAULT CHARSET=utf8; + +CREATE TABLE bugs ( + id INT UNSIGNED PRIMARY KEY +) DEFAULT CHARSET=utf8; + +ALTER TABLE bugs ADD COLUMN name VARCHAR(64) COMMENT 'type "tags"'; + +SELECT mroonga_command("dump"); + +DROP TABLE bugs; +DROP TABLE tags; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_key_multiple_column_with_data.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_key_multiple_column_with_data.test new file mode 100644 index 00000000000..ba06e55e1ba --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_key_multiple_column_with_data.test @@ -0,0 +1,45 @@ +# 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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS scores; +--enable_warnings + +SET NAMES UTF8; +CREATE TABLE scores ( + id BIGINT(20) PRIMARY KEY AUTO_INCREMENT NOT NULL, + name CHAR(30) NOT NULL, + score INT NOT NULL +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE scores; + +INSERT INTO scores (name, score) VALUES("Taro Yamada", 29); +INSERT INTO scores (name, score) VALUES("Taro Yamada", -12); +INSERT INTO scores (name, score) VALUES("Jiro Yamada", 27); +INSERT INTO scores (name, score) VALUES("Taro Yamada", 10); +SELECT * FROM scores + WHERE name = "Taro Yamada" AND (score >= -12 AND score < 29); + +ALTER TABLE scores ADD KEY property (name, score); +SELECT * FROM scores + WHERE name = "Taro Yamada" AND (score >= -12 AND score < 29); + +DROP TABLE scores; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_comment_not_for_mroonga.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_comment_not_for_mroonga.test new file mode 100644 index 00000000000..7b9fc783244 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_comment_not_for_mroonga.test @@ -0,0 +1,39 @@ +# Copyright(C) 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 +# 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 +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP TABLE IF EXISTS bugs; +--enable_warnings + +CREATE TABLE bugs ( + id INT UNSIGNED PRIMARY KEY, + tag VARCHAR(64) +) DEFAULT CHARSET=utf8; + +ALTER TABLE bugs + CHANGE COLUMN + tag + tag VARCHAR(64) COMMENT 'It must consist of only alphabet and number.'; + +SHOW CREATE TABLE bugs; + +DROP TABLE bugs; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_have_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_have_index.test new file mode 100644 index 00000000000..3a86d23facf --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_have_index.test @@ -0,0 +1,35 @@ +# Copyright(C) 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 +# 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 bugs; +--enable_warnings + +CREATE TABLE bugs ( + id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + title VARCHAR(32), + FULLTEXT KEY (title) +) DEFAULT CHARSET=utf8; + +ALTER TABLE bugs CHANGE COLUMN title title VARCHAR(64); + +SHOW CREATE TABLE bugs; + +DROP TABLE bugs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_after.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_after.test new file mode 100644 index 00000000000..16e98a9769e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_after.test @@ -0,0 +1,39 @@ +# Copyright(C) 2014 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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + body TEXT +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +ALTER TABLE diaries CHANGE body description TEXT AFTER id; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, description) values ("groonga (1)", "starting groonga."); +SELECT * FROM diaries; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_first.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_first.test new file mode 100644 index 00000000000..86c94afd281 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_first.test @@ -0,0 +1,39 @@ +# Copyright(C) 2014 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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + body TEXT +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +ALTER TABLE diaries CHANGE body description TEXT FIRST; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, description) values ("groonga (1)", "starting groonga."); +SELECT * FROM diaries; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_multiple.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_multiple.test new file mode 100644 index 00000000000..a9bbe403da1 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_multiple.test @@ -0,0 +1,43 @@ +# Copyright(C) 2014 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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + body TEXT +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +ALTER TABLE diaries + CHANGE body description TEXT FIRST, + CHANGE title subject TEXT AFTER internal_id, + CHANGE id internal_id INT; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (subject, description) + VALUES ("groonga (1)", "starting groonga."); +SELECT * FROM diaries; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_no_order.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_no_order.test new file mode 100644 index 00000000000..12ba5606b25 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_no_order.test @@ -0,0 +1,39 @@ +# Copyright(C) 2014 Naoya Murakami <naoya@createfield.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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + body TEXT +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +ALTER TABLE diaries CHANGE body description TEXT; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, description) values ("groonga (1)", "starting groonga."); +SELECT * FROM diaries; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_engine.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_engine.test new file mode 100644 index 00000000000..867c6722d36 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_engine.test @@ -0,0 +1,54 @@ +# Copyright(C) 2011 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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + body TEXT, + FULLTEXT INDEX title_index (title), + FULLTEXT INDEX body_index (body) +) ENGINE MyISAM DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); +INSERT INTO diaries (title, body) VALUES ("groonga (1)", "starting groonga..."); +SELECT * FROM diaries + WHERE MATCH(title) AGAINST("survey" IN BOOLEAN MODE) AND + MATCH(body) AGAINST("groonga" IN BOOLEAN MODE); + +ALTER TABLE diaries ENGINE = mroonga; +SHOW CREATE TABLE diaries; + +SELECT * FROM diaries + WHERE MATCH(title) AGAINST("survey" IN BOOLEAN MODE) AND + MATCH(body) AGAINST("groonga" IN BOOLEAN MODE); + +INSERT INTO diaries (title, body) VALUES ("groonga (2)", "started groonga."); + +SELECT * FROM diaries + WHERE MATCH(title) AGAINST("groonga" IN BOOLEAN MODE) AND + MATCH(body) AGAINST("groonga" IN BOOLEAN MODE); + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_create_fulltext.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_create_fulltext.test new file mode 100644 index 00000000000..06cdb13ba16 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_create_fulltext.test @@ -0,0 +1,55 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE diaries ( + id int PRIMARY KEY, + title varchar(255) +) DEFAULT CHARSET=utf8; + +INSERT INTO diaries VALUES (1, "Hello"); +INSERT INTO diaries VALUES (2, "天気"); +INSERT INTO diaries VALUES (3, "富士山"); + +--error ER_FT_MATCHING_KEY_NOT_FOUND +SELECT * + FROM diaries + WHERE MATCH (title) AGAINST ("富士山"); + +CREATE FULLTEXT INDEX title_index on diaries (title); + +SELECT * + FROM diaries + FORCE INDEX (title_index) + WHERE MATCH (title) AGAINST ("富士山"); + +ALTER TABLE diaries DISABLE KEYS; + +--error ER_FT_MATCHING_KEY_NOT_FOUND +SELECT * + FROM diaries + FORCE INDEX (title_index) + WHERE MATCH (title) AGAINST ("富士山"); + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_fulltext_ujis.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_fulltext_ujis.test new file mode 100644 index 00000000000..d6e32e0f004 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_fulltext_ujis.test @@ -0,0 +1,49 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES ujis; +CREATE TABLE diaries ( + id int PRIMARY KEY, + title varchar(255), + FULLTEXT KEY title_index (title) +) DEFAULT CHARSET=ujis; + +INSERT INTO diaries VALUES (1, "Hello"); +INSERT INTO diaries VALUES (2, "ŷ"); +INSERT INTO diaries VALUES (3, "ٻλ"); + +SELECT * + FROM diaries + FORCE INDEX (title_index) + WHERE MATCH (title) AGAINST ("ٻλ"); + +ALTER TABLE diaries DISABLE KEYS; + +--error ER_FT_MATCHING_KEY_NOT_FOUND +SELECT * + FROM diaries + FORCE INDEX (title_index) + WHERE MATCH (title) AGAINST ("ٻλ"); + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_fulltext_utf8.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_fulltext_utf8.test new file mode 100644 index 00000000000..fb89d678b75 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_fulltext_utf8.test @@ -0,0 +1,49 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE diaries ( + id int PRIMARY KEY, + title varchar(255), + FULLTEXT KEY title_index (title) +) DEFAULT CHARSET=utf8; + +INSERT INTO diaries VALUES (1, "Hello"); +INSERT INTO diaries VALUES (2, "天気"); +INSERT INTO diaries VALUES (3, "富士山"); + +SELECT * + FROM diaries + FORCE INDEX (title_index) + WHERE MATCH (title) AGAINST ("富士山"); + +ALTER TABLE diaries DISABLE KEYS; + +--error ER_FT_MATCHING_KEY_NOT_FOUND +SELECT * + FROM diaries + FORCE INDEX (title_index) + WHERE MATCH (title) AGAINST ("富士山"); + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_multiple_column.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_multiple_column.test new file mode 100644 index 00000000000..2112828684a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_multiple_column.test @@ -0,0 +1,51 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE diaries ( + id int PRIMARY KEY, + title varchar(255), + created_at datetime, + KEY title_and_created_at_index (title, created_at) +) DEFAULT CHARSET=utf8; + +INSERT INTO diaries VALUES (1, "Hello", "2012-04-30 20:00:00"); +INSERT INTO diaries VALUES (2, "天気" , "2012-04-30 23:00:00"); +INSERT INTO diaries VALUES (3, "富士山", "2012-04-30 19:00:00"); + +SELECT * + FROM diaries + FORCE INDEX (title_and_created_at_index) + WHERE title = "天気" AND + created_at = "2012-04-30 23:00:00"; + +ALTER TABLE diaries DISABLE KEYS; + +SELECT * + FROM diaries + FORCE INDEX (title_and_created_at_index) + WHERE title = "天気" AND + created_at = "2012-04-30 23:00:00"; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_normal.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_normal.test new file mode 100644 index 00000000000..f599767ab8f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_normal.test @@ -0,0 +1,49 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE diaries ( + id int PRIMARY KEY, + title varchar(255), + created_at datetime, + KEY created_at_index (created_at) +) DEFAULT CHARSET=utf8; + +INSERT INTO diaries VALUES (1, "Hello", "2012-04-30 20:00:00"); +INSERT INTO diaries VALUES (2, "天気" , "2012-04-30 23:00:00"); +INSERT INTO diaries VALUES (3, "富士山", "2012-04-30 19:00:00"); + +SELECT * + FROM diaries + FORCE INDEX (created_at_index) + WHERE created_at = "2012-04-30 20:00:00"; + +ALTER TABLE diaries DISABLE KEYS; + +SELECT * + FROM diaries + FORCE INDEX (created_at_index) + WHERE created_at = "2012-04-30 20:00:00"; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_primary.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_primary.test new file mode 100644 index 00000000000..4bc5fb1f643 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_primary.test @@ -0,0 +1,47 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE diaries ( + id int PRIMARY KEY, + title varchar(255) +) DEFAULT CHARSET=utf8; + +INSERT INTO diaries VALUES (1, "Hello"); +INSERT INTO diaries VALUES (2, "天気"); +INSERT INTO diaries VALUES (3, "富士山"); + +SELECT * + FROM diaries + FORCE INDEX (PRIMARY) + WHERE id = 2; + +ALTER TABLE diaries DISABLE KEYS; + +SELECT * + FROM diaries + FORCE INDEX (PRIMARY) + WHERE id = 2; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_truncate.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_truncate.test new file mode 100644 index 00000000000..ab990a549b1 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_truncate.test @@ -0,0 +1,45 @@ +# Copyright(C) 2013 Kentoku SHIBA +# Copyright(C) 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 +# 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 users; +--enable_warnings + +SET NAMES utf8; + +CREATE TABLE users ( + first_name VARCHAR(32) NOT NULL, + last_name VARCHAR(32) NOT NULL, + KEY (first_name, last_name) +); + +INSERT INTO users VALUES("Taro", "Yamada"); +INSERT INTO users VALUES("Hanako", "Tanaka"); +INSERT INTO users VALUES("Joe", "Honda"); + +SELECT * FROM users; + +ALTER TABLE users DISABLE KEYS; +TRUNCATE users; + +SELECT * FROM users; + +DROP TABLE users; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_updating.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_updating.test new file mode 100644 index 00000000000..b172ff303c1 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_updating.test @@ -0,0 +1,41 @@ +# 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 ( + c1 int NOT NULL, + c2 text NOT NULL, + c3 int NOT NULL, + c4 int NOT NULL, + PRIMARY KEY(c1), + KEY idx1(c3,c4), + FULLTEXT KEY ft1(c2) +); +INSERT INTO t1 VALUES(1, 'test1', 1, 1); +INSERT INTO t1 VALUES(2, 'test2', 2, 2); +INSERT INTO t1 VALUES(3, 'test3', 1, 3); +ALTER TABLE t1 DISABLE KEYS; +DELETE FROM t1 WHERE c1 = 2; +UPDATE t1 SET c4 = 4 WHERE c1 = 1; +INSERT INTO t1 VALUES(4, 'test4', 2, 4); +DROP TABLE t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_drop_column_multiple.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_drop_column_multiple.test new file mode 100644 index 00000000000..549a5540450 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_drop_column_multiple.test @@ -0,0 +1,45 @@ +# Copyright(C) 2014 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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + body TEXT +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); +SELECT * FROM diaries; + +ALTER TABLE diaries + DROP COLUMN title, + DROP COLUMN body; +SHOW CREATE TABLE diaries; +SELECT * FROM diaries; + +INSERT INTO diaries () VALUES (); +SELECT * FROM diaries; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_drop_column_one.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_drop_column_one.test new file mode 100644 index 00000000000..1e7248125cf --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_drop_column_one.test @@ -0,0 +1,44 @@ +# Copyright(C) 2011 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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + body TEXT +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); +SELECT * FROM diaries; + +ALTER TABLE diaries DROP COLUMN body; +SHOW CREATE TABLE diaries; +SELECT * FROM diaries; + +INSERT INTO diaries (title) values ("groonga (1)"); +INSERT INTO diaries (title) values ("groonga (2)"); +SELECT * FROM diaries; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_drop_key_multiple_column_with_data.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_drop_key_multiple_column_with_data.test new file mode 100644 index 00000000000..992606b4f62 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_drop_key_multiple_column_with_data.test @@ -0,0 +1,46 @@ +# 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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS scores; +--enable_warnings + +SET NAMES UTF8; +CREATE TABLE scores ( + id BIGINT(20) PRIMARY KEY AUTO_INCREMENT NOT NULL, + name CHAR(30) NOT NULL, + score INT NOT NULL, + KEY property (name, score) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE scores; + +INSERT INTO scores (name, score) VALUES("Taro Yamada", 29); +INSERT INTO scores (name, score) VALUES("Taro Yamada", -12); +INSERT INTO scores (name, score) VALUES("Jiro Yamada", 27); +INSERT INTO scores (name, score) VALUES("Taro Yamada", 10); +SELECT * FROM scores + WHERE name = "Taro Yamada" AND (score >= -12 AND score < 29); + +ALTER TABLE scores DROP KEY property; +SELECT * FROM scores + WHERE name = "Taro Yamada" AND (score >= -12 AND score < 29); + +DROP TABLE scores; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext.test new file mode 100644 index 00000000000..136acfcebf2 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext.test @@ -0,0 +1,51 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE diaries ( + id int PRIMARY KEY, + title varchar(255), + FULLTEXT KEY title_index (title) +) DEFAULT CHARSET=utf8; + +ALTER TABLE diaries DISABLE KEYS; + +INSERT INTO diaries VALUES (1, "Hello"); +INSERT INTO diaries VALUES (2, "天気"); +INSERT INTO diaries VALUES (3, "富士山"); + +--error ER_FT_MATCHING_KEY_NOT_FOUND +SELECT * + FROM diaries + FORCE INDEX (title_index) + WHERE MATCH (title) AGAINST ("富士山"); + +ALTER TABLE diaries ENABLE KEYS; + +SELECT * + FROM diaries + FORCE INDEX (title_index) + WHERE MATCH (title) AGAINST ("富士山"); + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext_ujis.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext_ujis.test new file mode 100644 index 00000000000..e14400808e5 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext_ujis.test @@ -0,0 +1,51 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES ujis; +CREATE TABLE diaries ( + id int PRIMARY KEY, + title varchar(255), + FULLTEXT KEY title_index (title) +) DEFAULT CHARSET=ujis; + +ALTER TABLE diaries DISABLE KEYS; + +INSERT INTO diaries VALUES (1, "Hello"); +INSERT INTO diaries VALUES (2, "ŷ"); +INSERT INTO diaries VALUES (3, "ٻλ"); + +--error ER_FT_MATCHING_KEY_NOT_FOUND +SELECT * + FROM diaries + FORCE INDEX (title_index) + WHERE MATCH (title) AGAINST ("ٻλ"); + +ALTER TABLE diaries ENABLE KEYS; + +SELECT * + FROM diaries + FORCE INDEX (title_index) + WHERE MATCH (title) AGAINST ("ٻλ"); + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext_utf8.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext_utf8.test new file mode 100644 index 00000000000..136acfcebf2 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext_utf8.test @@ -0,0 +1,51 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE diaries ( + id int PRIMARY KEY, + title varchar(255), + FULLTEXT KEY title_index (title) +) DEFAULT CHARSET=utf8; + +ALTER TABLE diaries DISABLE KEYS; + +INSERT INTO diaries VALUES (1, "Hello"); +INSERT INTO diaries VALUES (2, "天気"); +INSERT INTO diaries VALUES (3, "富士山"); + +--error ER_FT_MATCHING_KEY_NOT_FOUND +SELECT * + FROM diaries + FORCE INDEX (title_index) + WHERE MATCH (title) AGAINST ("富士山"); + +ALTER TABLE diaries ENABLE KEYS; + +SELECT * + FROM diaries + FORCE INDEX (title_index) + WHERE MATCH (title) AGAINST ("富士山"); + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_multiple_column.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_multiple_column.test new file mode 100644 index 00000000000..35e6366ed62 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_multiple_column.test @@ -0,0 +1,53 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE diaries ( + id int PRIMARY KEY, + title varchar(255), + created_at datetime, + KEY title_and_created_at_index (title, created_at) +) DEFAULT CHARSET=utf8; + +ALTER TABLE diaries DISABLE KEYS; + +INSERT INTO diaries VALUES (1, "Hello", "2012-04-30 20:00:00"); +INSERT INTO diaries VALUES (2, "天気" , "2012-04-30 23:00:00"); +INSERT INTO diaries VALUES (3, "富士山", "2012-04-30 19:00:00"); + +SELECT * + FROM diaries + FORCE INDEX (title_and_created_at_index) + WHERE title = "天気" AND + created_at = "2012-04-30 23:00:00"; + +ALTER TABLE diaries ENABLE KEYS; + +SELECT * + FROM diaries + FORCE INDEX (title_and_created_at_index) + WHERE title = "天気" AND + created_at = "2012-04-30 23:00:00"; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_normal.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_normal.test new file mode 100644 index 00000000000..ec45b48f61e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_normal.test @@ -0,0 +1,51 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE diaries ( + id int PRIMARY KEY, + title varchar(255), + created_at datetime, + KEY created_at_index (created_at) +) DEFAULT CHARSET=utf8; + +ALTER TABLE diaries DISABLE KEYS; + +INSERT INTO diaries VALUES (1, "Hello", "2012-04-30 20:00:00"); +INSERT INTO diaries VALUES (2, "天気" , "2012-04-30 23:00:00"); +INSERT INTO diaries VALUES (3, "富士山", "2012-04-30 19:00:00"); + +SELECT * + FROM diaries + FORCE INDEX (created_at_index) + WHERE created_at = "2012-04-30 20:00:00"; + +ALTER TABLE diaries ENABLE KEYS; + +SELECT * + FROM diaries + FORCE INDEX (created_at_index) + WHERE created_at = "2012-04-30 20:00:00"; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_primary.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_primary.test new file mode 100644 index 00000000000..b1ebb668391 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_primary.test @@ -0,0 +1,49 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE diaries ( + id int PRIMARY KEY, + title varchar(255) +) DEFAULT CHARSET=utf8; + +ALTER TABLE diaries DISABLE KEYS; + +INSERT INTO diaries VALUES (1, "Hello"); +INSERT INTO diaries VALUES (2, "天気"); +INSERT INTO diaries VALUES (3, "富士山"); + +SELECT * + FROM diaries + FORCE INDEX (PRIMARY) + WHERE id = 2; + +ALTER TABLE diaries ENABLE KEYS; + +SELECT * + FROM diaries + FORCE INDEX (PRIMARY) + WHERE id = 2; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_engine_decimal.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_engine_decimal.test new file mode 100644 index 00000000000..fc07085df5b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_engine_decimal.test @@ -0,0 +1,46 @@ +# 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_innodb.inc +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + temperature DECIMAL(6, 3) +) ENGINE InnoDB DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, temperature) VALUES ("clear day", 21.281); +SELECT * FROM diaries; + +ALTER TABLE diaries ENGINE = mroonga; +SELECT * FROM diaries; + +INSERT INTO diaries (title, temperature) VALUES ("rainy day", 14.213); +INSERT INTO diaries (title, temperature) VALUES ("cloudy day", 17.821); +SELECT * FROM diaries; + +SHOW CREATE TABLE diaries; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_fulltext_add_no_primary_key.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_fulltext_add_no_primary_key.test new file mode 100644 index 00000000000..fb52105411d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_fulltext_add_no_primary_key.test @@ -0,0 +1,39 @@ +# Copyright(C) 2014 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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS memos; +--enable_warnings + +CREATE TABLE memos ( + content varchar(32) +) DEFAULT CHARSET="utf8"; + +INSERT INTO memos (content) values ("Starting Groonga..."); +INSERT INTO memos (content) values ("Started Groonga."); +INSERT INTO memos (content) values ("Starting Mroonga..."); + +ALTER TABLE memos ADD FULLTEXT INDEX content_index (content); +SHOW CREATE TABLE memos; + +SELECT * FROM memos WHERE MATCH(content) AGAINST("groonga"); + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_fulltext_add_normal.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_fulltext_add_normal.test new file mode 100644 index 00000000000..3bcd1259236 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_fulltext_add_normal.test @@ -0,0 +1,40 @@ +# Copyright(C) 2011-2014 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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS memos; +--enable_warnings + +CREATE TABLE memos ( + id INT PRIMARY KEY AUTO_INCREMENT, + content TEXT +) DEFAULT CHARSET="utf8"; + +INSERT INTO memos (content) values ("Starting Groonga..."); +INSERT INTO memos (content) values ("Started Groonga."); +INSERT INTO memos (content) values ("Starting Mroonga..."); + +ALTER TABLE memos ADD FULLTEXT INDEX content_index (content); +SHOW CREATE TABLE memos; + +SELECT * FROM memos WHERE MATCH(content) AGAINST("groonga"); + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_fulltext_add_table.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_fulltext_add_table.test new file mode 100644 index 00000000000..efd0d9928d2 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_fulltext_add_table.test @@ -0,0 +1,47 @@ +# Copyright(C) 2014 HAYASHI Kentaro <hayashi@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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS tags; +DROP TABLE IF EXISTS bugs; +--enable_warnings + +CREATE TABLE tags ( + name VARCHAR(64) PRIMARY KEY +) DEFAULT CHARSET=utf8 COMMENT='default_tokenizer "TokenDelimit"'; + +CREATE TABLE bugs ( + id INT UNSIGNED PRIMARY KEY, + tags VARCHAR(40) COMMENT 'type "tags"' +) DEFAULT CHARSET=utf8; + +INSERT INTO tags (name) VALUES ("Groonga"); +INSERT INTO bugs (id, tags) VALUES (1, "Groonga Mroonga"); + +SELECT * FROM bugs; + +ALTER TABLE bugs ADD FULLTEXT INDEX bugs_tags_index (tags) COMMENT 'table "tags"'; + +SELECT * FROM bugs + WHERE MATCH(tags) AGAINST("Groonga"); + +DROP TABLE bugs; +DROP TABLE tags; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_fulltext_drop_table.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_fulltext_drop_table.test new file mode 100644 index 00000000000..ebc30945062 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_fulltext_drop_table.test @@ -0,0 +1,48 @@ +# Copyright(C) 2014 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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS tags; +DROP TABLE IF EXISTS bugs; +--enable_warnings + +CREATE TABLE tags ( + name VARCHAR(64) PRIMARY KEY +) DEFAULT CHARSET=utf8 COMMENT='default_tokenizer "TokenDelimit"'; + +CREATE TABLE bugs ( + id INT UNSIGNED PRIMARY KEY, + tags VARCHAR(40) COMMENT 'type "tags"', + FULLTEXT INDEX bugs_tags_index (tags) COMMENT 'table "tags"' +) DEFAULT CHARSET=utf8; + +INSERT INTO tags (name) VALUES ("Groonga"); +INSERT INTO bugs (id, tags) VALUES (1, "Groonga Mroonga"); + +ALTER TABLE bugs DROP INDEX bugs_tags_index; +ALTER TABLE bugs + ADD FULLTEXT INDEX bugs_tags_index (tags) COMMENT 'table "tags"'; + +SELECT * FROM bugs + WHERE MATCH(tags) AGAINST("Groonga"); + +DROP TABLE bugs; +DROP TABLE tags; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_modify_column_after.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_modify_column_after.test new file mode 100644 index 00000000000..710161397d5 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_modify_column_after.test @@ -0,0 +1,42 @@ +# Copyright(C) 2014 Naoya Murakami <naoya@createfield.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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + body TEXT +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, body) values ("groonga (1)", "starting groonga."); +SELECT * FROM diaries; + +ALTER TABLE diaries MODIFY body TEXT AFTER id; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, body) values ("groonga (2)", "started groonga."); +SELECT * FROM diaries; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_modify_column_first.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_modify_column_first.test new file mode 100644 index 00000000000..a810b7457a5 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_modify_column_first.test @@ -0,0 +1,42 @@ +# Copyright(C) 2014 Naoya Murakami <naoya@createfield.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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + body TEXT +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, body) values ("groonga (1)", "starting groonga."); +SELECT * FROM diaries; + +ALTER TABLE diaries MODIFY body TEXT FIRST; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, body) values ("groonga (2)", "started groonga."); +SELECT * FROM diaries; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_modify_column_no_order.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_modify_column_no_order.test new file mode 100644 index 00000000000..7dc75e180c1 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_modify_column_no_order.test @@ -0,0 +1,42 @@ +# Copyright(C) 2014 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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + body TEXT +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, body) values ("groonga (1)", "starting groonga."); +SELECT * FROM diaries; + +ALTER TABLE diaries MODIFY title VARCHAR(100); +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, body) values ("groonga (2)", "started groonga."); +SELECT * FROM diaries; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_recreate_anonymous_index_at_once.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_recreate_anonymous_index_at_once.test new file mode 100644 index 00000000000..0c391219426 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_recreate_anonymous_index_at_once.test @@ -0,0 +1,51 @@ +# Copyright(C) 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 +# 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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + body TEXT, + FULLTEXT INDEX (body) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); +INSERT INTO diaries (title, body) VALUES ("survey", "will start mroonga!"); + +SELECT * FROM diaries; +SELECT * FROM diaries + WHERE MATCH (body) AGAINST ("+groonga" IN BOOLEAN MODE); + +ALTER TABLE diaries + DROP INDEX body, + ADD FULLTEXT INDEX (body); + +SELECT * FROM diaries; +SELECT * FROM diaries + WHERE MATCH (body) AGAINST ("+groonga" IN BOOLEAN MODE); + +SHOW CREATE TABLE diaries; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_rename_table.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_rename_table.test new file mode 100644 index 00000000000..20fa7f35463 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_rename_table.test @@ -0,0 +1,49 @@ +# Copyright(C) 2011 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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries, memos; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + body TEXT, + FULLTEXT INDEX title_index (title), + FULLTEXT INDEX body_index (body) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); +SELECT * FROM diaries; +SELECT * FROM diaries + WHERE MATCH(title) AGAINST("groonga") AND + MATCH(body) AGAINST("starting"); + +ALTER TABLE diaries RENAME memos; +SELECT * FROM memos; +SELECT * FROM memos + WHERE MATCH(title) AGAINST("groonga") AND + MATCH(body) AGAINST("starting"); + +SHOW CREATE TABLE memos; + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_spatial.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_spatial.test new file mode 100644 index 00000000000..8a41792bdae --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_spatial.test @@ -0,0 +1,150 @@ +# Copyright(C) 2011 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/not_embedded.inc +--source include/have_geometry.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS shops; +--enable_warnings + +CREATE TABLE shops ( + id INT PRIMARY KEY AUTO_INCREMENT, + name TEXT, + location GEOMETRY NOT NULL +); + +INSERT INTO shops (name, location) + VALUES ('nezu-no-taiyaki', + GeomFromText('POINT(139.762573 35.720253)')); +INSERT INTO shops (name, location) + VALUES ('taiyaki-kataoka', + GeomFromText('POINT(139.715591 35.712521)')); +INSERT INTO shops (name, location) + VALUES ('soba-taiyaki-ku', + GeomFromText('POINT(139.659088 35.683712)')); +INSERT INTO shops (name, location) + VALUES ('kuruma', + GeomFromText('POINT(139.706207 35.721516)')); +INSERT INTO shops (name, location) + VALUES ('hirose-ya', + GeomFromText('POINT(139.685608 35.714844)')); +INSERT INTO shops (name, location) + VALUES ('sazare', + GeomFromText('POINT(139.685043 35.714653)')); +INSERT INTO shops (name, location) + VALUES ('omede-taiyaki', + GeomFromText('POINT(139.817154 35.700516)')); +INSERT INTO shops (name, location) + VALUES ('onaga-ya', + GeomFromText('POINT(139.81105 35.698254)')); +INSERT INTO shops (name, location) + VALUES ('shiro-ya', + GeomFromText('POINT(139.638611 35.705517)')); +INSERT INTO shops (name, location) + VALUES ('fuji-ya', + GeomFromText('POINT(139.637115 35.703938)')); +INSERT INTO shops (name, location) + VALUES ('miyoshi', + GeomFromText('POINT(139.537323 35.644539)')); +INSERT INTO shops (name, location) + VALUES ('juju-ya', + GeomFromText('POINT(139.695755 35.628922)')); +INSERT INTO shops (name, location) + VALUES ('tatsumi-ya', + GeomFromText('POINT(139.638657 35.665501)')); +INSERT INTO shops (name, location) + VALUES ('tetsuji', + GeomFromText('POINT(139.76857 35.680912)')); +INSERT INTO shops (name, location) + VALUES ('gazuma-ya', + GeomFromText('POINT(139.647598 35.700817)')); +INSERT INTO shops (name, location) + VALUES ('honma-mon', + GeomFromText('POINT(139.652573 35.722736)')); +INSERT INTO shops (name, location) + VALUES ('naniwa-ya', + GeomFromText('POINT(139.796234 35.730061)')); +INSERT INTO shops (name, location) + VALUES ('kuro-dai', + GeomFromText('POINT(139.704834 35.650345)')); +INSERT INTO shops (name, location) + VALUES ('daruma', + GeomFromText('POINT(139.770599 35.681461)')); +INSERT INTO shops (name, location) + VALUES ('yanagi-ya', + GeomFromText('POINT(139.783981 35.685341)')); +INSERT INTO shops (name, location) + VALUES ('sharaku', + GeomFromText('POINT(139.794846 35.716969)')); +INSERT INTO shops (name, location) + VALUES ('takane', + GeomFromText('POINT(139.560913 35.698601)')); +INSERT INTO shops (name, location) + VALUES ('chiyoda', + GeomFromText('POINT(139.652817 35.642601)')); +INSERT INTO shops (name, location) + VALUES ('da-ka-po', + GeomFromText('POINT(139.727356 35.627346)')); +INSERT INTO shops (name, location) + VALUES ('matsushima-ya', + GeomFromText('POINT(139.737381 35.640556)')); +INSERT INTO shops (name, location) + VALUES ('kazuya', + GeomFromText('POINT(139.760895 35.673508)')); +INSERT INTO shops (name, location) + VALUES ('furuya-kogane-an', + GeomFromText('POINT(139.676071 35.680603)')); +INSERT INTO shops (name, location) + VALUES ('hachi-no-ie', + GeomFromText('POINT(139.668106 35.608021)')); +INSERT INTO shops (name, location) + VALUES ('azuki-chan', + GeomFromText('POINT(139.673203 35.64151)')); +INSERT INTO shops (name, location) + VALUES ('kuriko-an', + GeomFromText('POINT(139.796829 35.712013)')); +INSERT INTO shops (name, location) + VALUES ('yume-no-aru-machi-no-taiyaki-ya-san', + GeomFromText('POINT(139.712524 35.616199)')); +INSERT INTO shops (name, location) + VALUES ('naze-ya', + GeomFromText('POINT(139.665833 35.609039)')); +INSERT INTO shops (name, location) + VALUES ('sanoki-ya', + GeomFromText('POINT(139.770721 35.66592)')); +INSERT INTO shops (name, location) + VALUES ('shigeta', + GeomFromText('POINT(139.780273 35.672626)')); +INSERT INTO shops (name, location) + VALUES ('nishimi-ya', + GeomFromText('POINT(139.774628 35.671825)')); +INSERT INTO shops (name, location) + VALUES ('hiiragi', + GeomFromText('POINT(139.711517 35.647701)')); + +ALTER TABLE shops ADD SPATIAL KEY location_index (location); + +SELECT id, name, AsText(location) AS location_text FROM shops + WHERE MBRContains(GeomFromText('LineString(139.7727 35.6684, 139.7038 35.7121)'), location) + ORDER BY id; + +SHOW CREATE TABLE shops; + +DROP TABLE shops; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/auto_increment_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/storage/t/auto_increment_TODO_SPLIT_ME.test new file mode 100644 index 00000000000..8ce709b1187 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/auto_increment_TODO_SPLIT_ME.test @@ -0,0 +1,53 @@ +# Copyright(C) 2011 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 (c1 int auto_increment, primary key(c1)); +insert into t1 values(null); +select c1 from t1 order by c1 desc limit 1; +insert into t1 values(null); +select c1 from t1 order by c1 desc limit 1; +insert into t1 values(10); +select c1 from t1 order by c1 desc limit 1; +insert into t1 values(null); +select c1 from t1 order by c1 desc limit 1; +insert into t1 values(6); +select c1 from t1 order by c1 desc limit 1; +insert into t1 values(null); +select c1 from t1 order by c1 desc limit 1; +drop table t1; + +create table t1 (c1 int, c2 int auto_increment, primary key(c1), key idx1(c2)); +insert into t1 values(1, null); +select * from t1 order by c2 desc limit 1; +insert into t1 values(2, null); +select * from t1 order by c2 desc limit 1; +insert into t1 values(3, 10); +select * from t1 order by c2 desc limit 1; +insert into t1 values(4, null); +select * from t1 order by c2 desc limit 1; +insert into t1 values(5, 6); +select * from t1 order by c2 desc limit 1; +insert into t1 values(6, null); +select * from t1 order by c2 desc limit 1; +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/auto_increment_table_param.test b/storage/mroonga/mysql-test/mroonga/storage/t/auto_increment_table_param.test new file mode 100644 index 00000000000..59727f4abaa --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/auto_increment_table_param.test @@ -0,0 +1,49 @@ +# 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 (c1 int auto_increment, primary key(c1)) auto_increment=34129; +insert into t1 values(null); +select c1 from t1 order by c1 desc; +show create table t1; +insert into t1 values(null); +select c1 from t1 order by c1 desc; +insert into t1 values(10); +select c1 from t1 order by c1 desc; +insert into t1 values(null); +select c1 from t1 order by c1 desc; +insert into t1 values(6); +select c1 from t1 order by c1 desc; +insert into t1 values(null); +select c1 from t1 order by c1 desc; +truncate table t1; +insert into t1 values(null); +select c1 from t1 order by c1 desc; +delete from t1; +insert into t1 values(null); +select c1 from t1 order by c1 desc; +rename table t1 to t2; +insert into t2 values(null); +select c1 from t2 order by c1 desc; +show create table t2; +drop table t2; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/auto_increment_text.test b/storage/mroonga/mysql-test/mroonga/storage/t/auto_increment_text.test new file mode 100644 index 00000000000..83f9f745019 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/auto_increment_text.test @@ -0,0 +1,33 @@ +# Copyright(C) 2011 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/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists diaries; +--enable_warnings + +create table diaries ( + id int primary key auto_increment, + body text +); +insert into diaries (body) values ("started groonga (long text)"); +select * from diaries; +insert into diaries (body) values ("sleeping... (short text)"); +select * from diaries; +drop table diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/binlog_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/storage/t/binlog_TODO_SPLIT_ME.test new file mode 100644 index 00000000000..57d57347205 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/binlog_TODO_SPLIT_ME.test @@ -0,0 +1,53 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# +# 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_log_bin.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists t1; +--enable_warnings + +show variables like 'log_bin'; + +set binlog_format="STATEMENT"; + +create table t1 (c1 int primary key, c2 int) engine = mroonga; +insert into t1 values(1,100); +insert into t1 values(2,100); +commit; +select * from t1; +drop table t1; + +set binlog_format="ROW"; + +create table t1 (c1 int primary key, c2 int) engine = mroonga; +insert into t1 values(1,100); +insert into t1 values(2,100); +commit; +select * from t1; +drop table t1; + +set binlog_format="MIXED"; + +create table t1 (c1 int primary key, c2 int) engine = mroonga; +insert into t1 values(1,100); +insert into t1 values(2,100); +commit; +select * from t1; +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_general_ci_french.test b/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_general_ci_french.test new file mode 100644 index 00000000000..8b4c7d6eaf7 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_general_ci_french.test @@ -0,0 +1,35 @@ +# Copyright(C) 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 +# 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 diaries; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE diaries ( + content varchar(256) COLLATE utf8_general_ci, + FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8; + +INSERT INTO diaries VALUES ("Je suis un garçon."); + +SELECT * FROM diaries WHERE MATCH (content) AGAINST ("garcon"); + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_unicode_ci_french.test b/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_unicode_ci_french.test new file mode 100644 index 00000000000..6cebc9ebce9 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_unicode_ci_french.test @@ -0,0 +1,35 @@ +# Copyright(C) 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 +# 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 diaries; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE diaries ( + content varchar(256) COLLATE utf8_unicode_ci, + FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8; + +INSERT INTO diaries VALUES ("Je suis un garçon."); + +SELECT * FROM diaries WHERE MATCH (content) AGAINST ("garcon"); + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_unicode_ci_japanese.test b/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_unicode_ci_japanese.test new file mode 100644 index 00000000000..dacb1cba74f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_unicode_ci_japanese.test @@ -0,0 +1,35 @@ +# Copyright(C) 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 +# 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 diaries; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE diaries ( + content varchar(256) COLLATE utf8_unicode_ci, + FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8; + +INSERT INTO diaries VALUES ("ひらがなとカタカナを覚えました。"); + +SELECT * FROM diaries WHERE MATCH (content) AGAINST ("かたかな"); + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_comment_index_not_for_mroonga.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_comment_index_not_for_mroonga.test new file mode 100644 index 00000000000..620d2a9fd56 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_comment_index_not_for_mroonga.test @@ -0,0 +1,34 @@ +# Copyright(C) 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 +# 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 +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP TABLE IF EXISTS bugs; +--enable_warnings + +CREATE TABLE bugs ( + id INT UNSIGNED, + INDEX (id) COMMENT 'ID search is required.' +) DEFAULT CHARSET=utf8; + +SHOW CREATE TABLE bugs; + +DROP TABLE bugs; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_comment_normal_not_for_mroonga.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_comment_normal_not_for_mroonga.test new file mode 100644 index 00000000000..695ac9cba61 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_comment_normal_not_for_mroonga.test @@ -0,0 +1,34 @@ +# Copyright(C) 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 +# 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 +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP TABLE IF EXISTS bugs; +--enable_warnings + +CREATE TABLE bugs ( + id INT UNSIGNED PRIMARY KEY, + tag VARCHAR(64) COMMENT 'It must consist of only alphabet and number.' +) DEFAULT CHARSET=utf8; + +SHOW CREATE TABLE bugs; + +DROP TABLE bugs; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_date_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_date_with_index.test new file mode 100644 index 00000000000..fc2e58fdcd9 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_date_with_index.test @@ -0,0 +1,41 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + created_at DATE, + KEY (created_at) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, created_at) VALUES ("clear day", "2012-01-29"); +INSERT INTO diaries (title, created_at) VALUES ("rainy day", "2012-01-30"); +INSERT INTO diaries (title, created_at) VALUES ("cloudy day", "2012-01-31"); + +SELECT * FROM diaries; + +SELECT * FROM diaries WHERE created_at BETWEEN "2012-01-29" AND "2012-01-30"; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_date_without_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_date_without_index.test new file mode 100644 index 00000000000..8dae21494db --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_date_without_index.test @@ -0,0 +1,40 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + created_at DATE +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, created_at) VALUES ("clear day", "2012-01-29"); +INSERT INTO diaries (title, created_at) VALUES ("rainy day", "2012-01-30"); +INSERT INTO diaries (title, created_at) VALUES ("cloudy day", "2012-01-31"); + +SELECT * FROM diaries; + +SELECT * FROM diaries WHERE created_at BETWEEN "2012-01-29" AND "2012-01-30"; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_date_zero_date.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_date_zero_date.test new file mode 100644 index 00000000000..b6225075959 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_date_zero_date.test @@ -0,0 +1,38 @@ +# 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 timestamps; +--enable_warnings + +CREATE TABLE timestamps ( + id INT PRIMARY KEY AUTO_INCREMENT, + create_dt DATE +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE timestamps; + +INSERT INTO timestamps (create_dt) VALUES ("2012-00-01"); +INSERT INTO timestamps (create_dt) VALUES ("2012-01-00"); + +SELECT * FROM timestamps; + +SELECT * FROM timestamps WHERE create_dt = "2012-01-01"; + +DROP TABLE timestamps; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_2038.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_2038.test new file mode 100644 index 00000000000..9c3344cbe98 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_2038.test @@ -0,0 +1,40 @@ +# Copyright(C) 2012 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_32bit.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + created_at DATETIME +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, created_at) + VALUES ('2038-01-18 03:14:07', '2038-01-18 03:14:07'); +INSERT INTO diaries (title, created_at) + VALUES ('2038-01-20 03:14:08', '2038-01-20 03:14:08'); + +SELECT * FROM diaries; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_before_unix_epoch.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_before_unix_epoch.test new file mode 100644 index 00000000000..61eecbb2ac8 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_before_unix_epoch.test @@ -0,0 +1,38 @@ +# Copyright(C) 2012 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_32bit.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + created_at DATETIME +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, created_at) + VALUES ('1000-01-01 00:00:00', '1000-01-01 00:00:00'); + +SELECT * FROM diaries; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_max.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_max.test new file mode 100644 index 00000000000..7bbfcbe7a3a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_max.test @@ -0,0 +1,38 @@ +# Copyright(C) 2012 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_32bit.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + created_at DATETIME +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, created_at) + VALUES ('9999-12-31 23:59:59', '9999-12-31 23:59:59'); + +SELECT * FROM diaries; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_out_of_range.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_out_of_range.test new file mode 100644 index 00000000000..2cc99562231 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_out_of_range.test @@ -0,0 +1,38 @@ +# Copyright(C) 2012 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_32bit.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + created_at DATETIME +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, created_at) + VALUES ('2012', '2012'); + +SELECT * FROM diaries; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_2038.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_2038.test new file mode 100644 index 00000000000..75c757f147a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_2038.test @@ -0,0 +1,40 @@ +# Copyright(C) 2012 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_64bit.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + created_at DATETIME +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, created_at) + VALUES ('2038-01-19 03:14:07', '2038-01-19 03:14:07'); +INSERT INTO diaries (title, created_at) + VALUES ('2038-01-19 03:14:08', '2038-01-19 03:14:08'); + +SELECT * FROM diaries; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_before_unix_epoch.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_before_unix_epoch.test new file mode 100644 index 00000000000..b2b30462ca9 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_before_unix_epoch.test @@ -0,0 +1,40 @@ +# Copyright(C) 2012 Kentoku SHIBA +# Copyright(C) 2014 Kenji Maruyama <mmmaru777@gmail.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/mroonga/skip_freebsd.inc +--source ../../include/mroonga/have_64bit.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + created_at DATETIME +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, created_at) + VALUES ('1000-01-01 00:00:00', '1000-01-01 00:00:00'); + +SELECT * FROM diaries; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_max.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_max.test new file mode 100644 index 00000000000..661d145087c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_max.test @@ -0,0 +1,38 @@ +# Copyright(C) 2012 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_64bit.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + created_at DATETIME +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, created_at) + VALUES ('9999-12-31 23:59:59', '9999-12-31 23:59:59'); + +SELECT * FROM diaries; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_version_55_out_of_range.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_version_55_out_of_range.test new file mode 100644 index 00000000000..14a4483a96e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_version_55_out_of_range.test @@ -0,0 +1,40 @@ +# Copyright(C) 2012 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_64bit.inc +--source ../../include/mroonga/have_version_55.inc +--source ../../include/mroonga/have_mysql.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + created_at DATETIME +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, created_at) + VALUES ('2012', '2012'); + +SELECT * FROM diaries; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_version_56_or_later_out_of_range.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_version_56_or_later_out_of_range.test new file mode 100644 index 00000000000..6b90c39a853 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_version_56_or_later_out_of_range.test @@ -0,0 +1,41 @@ +# Copyright(C) 2012 Kentoku SHIBA +# Copyright(C) 2014 Kenji Maruyama <mmmaru777@gmail.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/mroonga/skip_freebsd.inc +--source ../../include/mroonga/have_64bit.inc +--source ../../include/mroonga/have_version_56_or_later.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + created_at DATETIME +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, created_at) + VALUES ('2012', '2012'); + +SELECT * FROM diaries; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_fractional_seconds_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_fractional_seconds_with_index.test new file mode 100644 index 00000000000..ac10203a576 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_fractional_seconds_with_index.test @@ -0,0 +1,47 @@ +# 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/mroonga/have_fractional_seconds.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + created_at DATETIME(6), + KEY (created_at) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, created_at) + VALUES ("clear day", "2012-01-29 21:51:01.111111"); +INSERT INTO diaries (title, created_at) + VALUES ("rainy day", "2012-01-30 01:23:45.333"); +INSERT INTO diaries (title, created_at) + VALUES ("cloudy day", "2012-01-31 08:32:10.5555"); + +SELECT * FROM diaries; + +SELECT * FROM diaries + WHERE created_at BETWEEN "2012-01-29 00:00:00.123456" AND + "2012-01-31 00:00:00.999999"; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_fractional_seconds_without_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_fractional_seconds_without_index.test new file mode 100644 index 00000000000..11a2b783038 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_fractional_seconds_without_index.test @@ -0,0 +1,46 @@ +# 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/mroonga/have_fractional_seconds.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + created_at DATETIME(6) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, created_at) + VALUES ("clear day", "2012-01-29 21:51:01.111111"); +INSERT INTO diaries (title, created_at) + VALUES ("rainy day", "2012-01-30 01:23:45.333"); +INSERT INTO diaries (title, created_at) + VALUES ("cloudy day", "2012-01-31 08:32:10.5555"); + +SELECT * FROM diaries; + +SELECT * FROM diaries + WHERE created_at BETWEEN "2012-01-29 00:00:00.123456" AND + "2012-01-31 00:00:00.999999"; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_freebsd_before_unix_epoch.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_freebsd_before_unix_epoch.test new file mode 100644 index 00000000000..07b54bebc9d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_freebsd_before_unix_epoch.test @@ -0,0 +1,38 @@ +# Copyright(C) 2014 Kenji Maruyama <mmmaru777@gmail.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/mroonga/have_freebsd.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + created_at DATETIME +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, created_at) + VALUES ('1000-01-01 00:00:00', '1000-01-01 00:00:00'); + +SELECT * FROM diaries; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_null.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_null.test new file mode 100644 index 00000000000..e1db5043319 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_null.test @@ -0,0 +1,37 @@ +# Copyright(C) 2012 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 diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + created_at DATETIME +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, created_at) + VALUES ('NULL', NULL); + +SELECT * FROM diaries; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_with_index.test new file mode 100644 index 00000000000..992249b0fae --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_with_index.test @@ -0,0 +1,45 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + created_at DATETIME, + KEY (created_at) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, created_at) + VALUES ("clear day", "2012-01-29 21:51:01"); +INSERT INTO diaries (title, created_at) + VALUES ("rainy day", "2012-01-30 01:23:45"); +INSERT INTO diaries (title, created_at) + VALUES ("cloudy day", "2012-01-31 08:32:10"); + +SELECT * FROM diaries; + +SELECT * FROM diaries + WHERE created_at BETWEEN "2012-01-29 00:00:00" AND "2012-01-31 00:00:00"; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_without_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_without_index.test new file mode 100644 index 00000000000..bc0b7b2e982 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_without_index.test @@ -0,0 +1,44 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + created_at DATETIME +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, created_at) + VALUES ("clear day", "2012-01-29 21:51:01"); +INSERT INTO diaries (title, created_at) + VALUES ("rainy day", "2012-01-30 01:23:45"); +INSERT INTO diaries (title, created_at) + VALUES ("cloudy day", "2012-01-31 08:32:10"); + +SELECT * FROM diaries; + +SELECT * FROM diaries + WHERE created_at BETWEEN "2012-01-29 00:00:00" AND "2012-01-31 00:00:00"; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_zero_date.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_zero_date.test new file mode 100644 index 00000000000..5c39086d452 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_zero_date.test @@ -0,0 +1,38 @@ +# 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 timestamps; +--enable_warnings + +CREATE TABLE timestamps ( + id INT PRIMARY KEY AUTO_INCREMENT, + create_dt DATETIME +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE timestamps; + +INSERT INTO timestamps (create_dt) VALUES ("2012-00-01 00:00:00"); +INSERT INTO timestamps (create_dt) VALUES ("2012-01-00 00:00:00"); + +SELECT * FROM timestamps; + +SELECT * FROM timestamps WHERE create_dt = "2012-01-01 00:00:00"; + +DROP TABLE timestamps; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_decimal_fractional_seconds_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_decimal_fractional_seconds_with_index.test new file mode 100644 index 00000000000..92636b4d773 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_decimal_fractional_seconds_with_index.test @@ -0,0 +1,41 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + temperature DECIMAL(6, 3), + KEY (temperature) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, temperature) VALUES ("clear day", 21.281); +INSERT INTO diaries (title, temperature) VALUES ("rainy day", 14.213); +INSERT INTO diaries (title, temperature) VALUES ("cloudy day", 17.821); + +SELECT * FROM diaries; + +SELECT * FROM diaries WHERE temperature BETWEEN "14.213" AND "17.821"; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_decimal_fractional_seconds_without_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_decimal_fractional_seconds_without_index.test new file mode 100644 index 00000000000..b314342fdea --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_decimal_fractional_seconds_without_index.test @@ -0,0 +1,40 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + temperature DECIMAL(6, 3) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, temperature) VALUES ("clear day", 21.281); +INSERT INTO diaries (title, temperature) VALUES ("rainy day", 14.213); +INSERT INTO diaries (title, temperature) VALUES ("cloudy day", 17.821); + +SELECT * FROM diaries; + +SELECT * FROM diaries WHERE temperature BETWEEN "14.213" AND "17.821"; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_decimal_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_decimal_with_index.test new file mode 100644 index 00000000000..ffcf737fde9 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_decimal_with_index.test @@ -0,0 +1,41 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + temperature DECIMAL, + KEY (temperature) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, temperature) VALUES ("clear day", 21); +INSERT INTO diaries (title, temperature) VALUES ("rainy day", 14); +INSERT INTO diaries (title, temperature) VALUES ("cloudy day", 17); + +SELECT * FROM diaries; + +SELECT * FROM diaries WHERE temperature BETWEEN "14" AND "17"; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_decimal_without_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_decimal_without_index.test new file mode 100644 index 00000000000..d7df5c3c323 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_decimal_without_index.test @@ -0,0 +1,40 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + temperature DECIMAL +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, temperature) VALUES ("clear day", 21); +INSERT INTO diaries (title, temperature) VALUES ("rainy day", 14); +INSERT INTO diaries (title, temperature) VALUES ("cloudy day", 17); + +SELECT * FROM diaries; + +SELECT * FROM diaries WHERE temperature BETWEEN "14" AND "17"; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_enum_less_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_enum_less_with_index.test new file mode 100644 index 00000000000..0d96498ee04 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_enum_less_with_index.test @@ -0,0 +1,41 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS items; +--enable_warnings + +CREATE TABLE items ( + name VARCHAR(255), + size ENUM("small", "medium", "large"), + INDEX (size) +) ENGINE=Mroonga DEFAULT CHARSET=utf8; +SHOW CREATE TABLE items; + +INSERT INTO items VALUES ("t-shart for child", "small"); +INSERT INTO items VALUES ("leadies' coat", "medium"); +INSERT INTO items VALUES ("parka", "large"); +INSERT INTO items VALUES ("hat", "medium"); + +SELECT * FROM items; + +SELECT * FROM items WHERE size = "medium"; + +DROP TABLE items; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_enum_many_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_enum_many_with_index.test new file mode 100644 index 00000000000..3f8b728105c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_enum_many_with_index.test @@ -0,0 +1,298 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS items; +--enable_warnings + +CREATE TABLE items ( + name VARCHAR(255), + size ENUM("size1", + "size2", + "size3", + "size4", + "size5", + "size6", + "size7", + "size8", + "size9", + "size10", + "size11", + "size12", + "size13", + "size14", + "size15", + "size16", + "size17", + "size18", + "size19", + "size20", + "size21", + "size22", + "size23", + "size24", + "size25", + "size26", + "size27", + "size28", + "size29", + "size30", + "size31", + "size32", + "size33", + "size34", + "size35", + "size36", + "size37", + "size38", + "size39", + "size40", + "size41", + "size42", + "size43", + "size44", + "size45", + "size46", + "size47", + "size48", + "size49", + "size50", + "size51", + "size52", + "size53", + "size54", + "size55", + "size56", + "size57", + "size58", + "size59", + "size60", + "size61", + "size62", + "size63", + "size64", + "size65", + "size66", + "size67", + "size68", + "size69", + "size70", + "size71", + "size72", + "size73", + "size74", + "size75", + "size76", + "size77", + "size78", + "size79", + "size80", + "size81", + "size82", + "size83", + "size84", + "size85", + "size86", + "size87", + "size88", + "size89", + "size90", + "size91", + "size92", + "size93", + "size94", + "size95", + "size96", + "size97", + "size98", + "size99", + "size100", + "size101", + "size102", + "size103", + "size104", + "size105", + "size106", + "size107", + "size108", + "size109", + "size110", + "size111", + "size112", + "size113", + "size114", + "size115", + "size116", + "size117", + "size118", + "size119", + "size120", + "size121", + "size122", + "size123", + "size124", + "size125", + "size126", + "size127", + "size128", + "size129", + "size130", + "size131", + "size132", + "size133", + "size134", + "size135", + "size136", + "size137", + "size138", + "size139", + "size140", + "size141", + "size142", + "size143", + "size144", + "size145", + "size146", + "size147", + "size148", + "size149", + "size150", + "size151", + "size152", + "size153", + "size154", + "size155", + "size156", + "size157", + "size158", + "size159", + "size160", + "size161", + "size162", + "size163", + "size164", + "size165", + "size166", + "size167", + "size168", + "size169", + "size170", + "size171", + "size172", + "size173", + "size174", + "size175", + "size176", + "size177", + "size178", + "size179", + "size180", + "size181", + "size182", + "size183", + "size184", + "size185", + "size186", + "size187", + "size188", + "size189", + "size190", + "size191", + "size192", + "size193", + "size194", + "size195", + "size196", + "size197", + "size198", + "size199", + "size200", + "size201", + "size202", + "size203", + "size204", + "size205", + "size206", + "size207", + "size208", + "size209", + "size210", + "size211", + "size212", + "size213", + "size214", + "size215", + "size216", + "size217", + "size218", + "size219", + "size220", + "size221", + "size222", + "size223", + "size224", + "size225", + "size226", + "size227", + "size228", + "size229", + "size230", + "size231", + "size232", + "size233", + "size234", + "size235", + "size236", + "size237", + "size238", + "size239", + "size240", + "size241", + "size242", + "size243", + "size244", + "size245", + "size246", + "size247", + "size248", + "size249", + "size250", + "size251", + "size252", + "size253", + "size254", + "size255", + "size256"), + INDEX (size) +) ENGINE=Mroonga DEFAULT CHARSET=utf8; +SHOW CREATE TABLE items; + +INSERT INTO items VALUES ("t-shart for child", "size1"); +INSERT INTO items VALUES ("leadies' coat", "size1"); +INSERT INTO items VALUES ("parka", "size256"); +INSERT INTO items VALUES ("hat", "size256"); + +SELECT * FROM items; + +SELECT * FROM items WHERE size = "size1"; + +SELECT * FROM items WHERE size = "size256"; + +DROP TABLE items; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga__id__id.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga__id__id.test new file mode 100644 index 00000000000..6efb3920695 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga__id__id.test @@ -0,0 +1,34 @@ +# 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 contents; +--enable_warnings + +CREATE TABLE contents ( + _id INT, + content TEXT NOT NULL, + FULLTEXT INDEX(content) +) DEFAULT CHARSET=utf8; +INSERT INTO contents (content) VALUES ('first'); +INSERT INTO contents (content) VALUES ('second'); +SELECT _id, content FROM contents; + +DROP TABLE contents; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga__id_invalid_id.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga__id_invalid_id.test new file mode 100644 index 00000000000..9b2e59615f3 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga__id_invalid_id.test @@ -0,0 +1,34 @@ +# 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 contents; +--enable_warnings + +--error ER_CANT_CREATE_TABLE +CREATE TABLE contents ( + _i INT, + content TEXT NOT NULL, + FULLTEXT INDEX(content) +) DEFAULT CHARSET=utf8; + +--disable_warnings +DROP TABLE IF EXISTS contents; +--enable_warnings + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_index_fulltext_other_table.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_index_fulltext_other_table.test new file mode 100644 index 00000000000..805c744236f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_index_fulltext_other_table.test @@ -0,0 +1,54 @@ +# Copyright(C) 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 +# 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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP DATABASE IF EXISTS mroonga; +--enable_warnings + +CREATE DATABASE mroonga; +USE mroonga; + +CREATE TABLE tags ( + name VARCHAR(64) PRIMARY KEY +) DEFAULT CHARSET=utf8 + COLLATE=utf8_bin + COMMENT='default_tokenizer "TokenDelimit"'; + +CREATE TABLE bugs ( + id INT UNSIGNED PRIMARY KEY, + tags TEXT COMMENT 'flags "COLUMN_VECTOR", type "tags"', + FULLTEXT INDEX bugs_tags_index (tags) COMMENT 'table "tags"' +) DEFAULT CHARSET=utf8; + +INSERT INTO bugs (id, tags) VALUES (1, "Linux MySQL groonga"); + +SELECT mroonga_command("dump"); + +SELECT *, MATCH (tags) AGAINST ("MySQL" IN BOOLEAN MODE) AS score + FROM bugs + WHERE MATCH (tags) AGAINST ("MySQL" IN BOOLEAN MODE); + +DROP TABLE bugs; +DROP TABLE tags; + +DROP DATABASE mroonga; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_index_int_other_table.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_index_int_other_table.test new file mode 100644 index 00000000000..91f204133dd --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_index_int_other_table.test @@ -0,0 +1,55 @@ +# Copyright(C) 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 +# 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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP DATABASE IF EXISTS mroonga; +--enable_warnings + +CREATE DATABASE mroonga; +USE mroonga; + +CREATE TABLE priorities ( + id INT PRIMARY KEY +) DEFAULT CHARSET=utf8 + COLLATE=utf8_bin; + +CREATE TABLE bugs ( + id INT UNSIGNED PRIMARY KEY, + priority INT COMMENT 'type "priorities"', + INDEX bugs_priority_index (priority) COMMENT 'table "priorities"' +) DEFAULT CHARSET=utf8; + +INSERT INTO bugs (id, priority) VALUES (1, 10); +INSERT INTO bugs (id, priority) VALUES (2, 3); +INSERT INTO bugs (id, priority) VALUES (3, -2); + +SELECT mroonga_command("dump"); + +SELECT * + FROM bugs + WHERE priority = 3; + +DROP TABLE bugs; +DROP TABLE priorities; + +DROP DATABASE mroonga; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_reference.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_reference.test new file mode 100644 index 00000000000..6e89c70c051 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_reference.test @@ -0,0 +1,45 @@ +# Copyright(C) 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 +# 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 +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP TABLE IF EXISTS tags, bugs; +--enable_warnings + +CREATE TABLE tags ( + name VARCHAR(64) PRIMARY KEY +) DEFAULT CHARSET=utf8 + COLLATE=utf8_bin; + +CREATE TABLE bugs ( + id INT UNSIGNED PRIMARY KEY, + tag TEXT COMMENT 'type "tags"' +) DEFAULT CHARSET=utf8; + +INSERT INTO bugs (id, tag) VALUES (1, "Linux"); +INSERT INTO bugs (id, tag) VALUES (2, "MySQL"); +INSERT INTO bugs (id, tag) VALUES (3, "groonga"); + +SELECT * FROM bugs; +SELECT * FROM tags; + +DROP TABLE bugs; +DROP TABLE tags; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_with_not_for_mroonga_comment.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_with_not_for_mroonga_comment.test new file mode 100644 index 00000000000..059b8bc4bfa --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_with_not_for_mroonga_comment.test @@ -0,0 +1,48 @@ +# Copyright(C) 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 +# 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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP TABLE IF EXISTS tags, bugs; +--enable_warnings + +CREATE TABLE tags ( + name VARCHAR(64) PRIMARY KEY +) DEFAULT CHARSET=utf8 + COLLATE=utf8_bin; + +CREATE TABLE bugs ( + id INT UNSIGNED PRIMARY KEY, + tag TEXT COMMENT 'It references to tags.name, type "tags"' +) DEFAULT CHARSET=utf8; + +SHOW FULL COLUMNS FROM bugs LIKE 'tag'; + +INSERT INTO bugs (id, tag) VALUES (1, "Linux"); +INSERT INTO bugs (id, tag) VALUES (2, "MySQL"); +INSERT INTO bugs (id, tag) VALUES (3, "groonga"); + +SELECT * FROM bugs; +SELECT * FROM tags; + +DROP TABLE bugs; +DROP TABLE tags; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_vector_order_by_with_function.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_vector_order_by_with_function.test new file mode 100644 index 00000000000..0d3be3d663d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_vector_order_by_with_function.test @@ -0,0 +1,45 @@ +# Copyright(C) 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 +# 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 +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP TABLE IF EXISTS tags, bugs; +--enable_warnings + +CREATE TABLE tags ( + name VARCHAR(64) PRIMARY KEY +) DEFAULT CHARSET=utf8 + COLLATE=utf8_bin + COMMENT='default_tokenizer "TokenDelimit"'; + +CREATE TABLE bugs ( + id INT UNSIGNED PRIMARY KEY, + tags TEXT COMMENT 'flags "COLUMN_VECTOR", type "tags"' +) DEFAULT CHARSET=utf8; + +INSERT INTO bugs (id, tags) VALUES (1, "Linux MySQL Groonga"); +INSERT INTO bugs (id, tags) VALUES (2, "MySQL Mroonga"); +INSERT INTO bugs (id, tags) VALUES (3, "Ruby Rroonga"); + +SELECT * FROM tags ORDER BY SUBSTRING(name, 1, 1) ASC; + +DROP TABLE bugs; +DROP TABLE tags; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_vector_reference.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_vector_reference.test new file mode 100644 index 00000000000..bb66e35f2d1 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_vector_reference.test @@ -0,0 +1,44 @@ +# Copyright(C) 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 +# 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 +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP TABLE IF EXISTS tags, bugs; +--enable_warnings + +CREATE TABLE tags ( + name VARCHAR(64) PRIMARY KEY +) DEFAULT CHARSET=utf8 + COLLATE=utf8_bin + COMMENT='default_tokenizer "TokenDelimit"'; + +CREATE TABLE bugs ( + id INT UNSIGNED PRIMARY KEY, + tags TEXT COMMENT 'flags "COLUMN_VECTOR", type "tags"' +) DEFAULT CHARSET=utf8; + +INSERT INTO bugs (id, tags) VALUES (1, "Linux MySQL groonga"); + +SELECT * FROM bugs; +SELECT * FROM tags; + +DROP TABLE bugs; +DROP TABLE tags; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_int_with_index_zero_value.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_int_with_index_zero_value.test new file mode 100644 index 00000000000..aa33af05df3 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_int_with_index_zero_value.test @@ -0,0 +1,40 @@ +# Copyright(C) 2011 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS items; +--enable_warnings + +CREATE TABLE items ( + name VARCHAR(255), + price INT KEY +) ENGINE=Mroonga DEFAULT CHARSET=utf8; + +INSERT INTO items VALUES ("hamburger", 200); +INSERT INTO items VALUES ("smile", 0); +INSERT INTO items VALUES ("coke", 100); + +SELECT * FROM items; + +SELECT * FROM items WHERE price = 0; + +SELECT * FROM items WHERE price <= 100; + +DROP TABLE items; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_set_16_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_set_16_with_index.test new file mode 100644 index 00000000000..9d7d40433d0 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_set_16_with_index.test @@ -0,0 +1,56 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS items; +--enable_warnings + +CREATE TABLE items ( + name VARCHAR(255), + colors SET("black", + "dim gray", + "dark gray", + "gray", + "light gray", + "gainsboro", + "white smoke", + "white", + + "red", + "orange red", + "dark orange", + "orange", + "gold", + "yellow", + "chartreuse", + "lawn green"), + INDEX (colors) +) DEFAULT CHARSET=utf8; +SHOW CREATE TABLE items; + +INSERT INTO items VALUES ("t-shart", "black,gray"); +INSERT INTO items VALUES ("hat", "white,dark gray"); +INSERT INTO items VALUES ("parka", "chartreuse,orange"); + +SELECT * FROM items; + +SELECT * FROM items WHERE colors = "dark gray,white"; + +DROP TABLE items; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_set_24_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_set_24_with_index.test new file mode 100644 index 00000000000..c555c4ced6a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_set_24_with_index.test @@ -0,0 +1,65 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS items; +--enable_warnings + +CREATE TABLE items ( + name VARCHAR(255), + colors SET("black", + "dim gray", + "dark gray", + "gray", + "light gray", + "gainsboro", + "white smoke", + "white", + + "red", + "orange red", + "dark orange", + "orange", + "gold", + "yellow", + "chartreuse", + "lawn green", + + "green", + "spring green", + "medium spring green", + "cyan", + "deep sky blue", + "blue", + "medium blue", + "dark violet"), + INDEX (colors) +) DEFAULT CHARSET=utf8; +SHOW CREATE TABLE items; + +INSERT INTO items VALUES ("t-shart", "black,white"); +INSERT INTO items VALUES ("hat", "white,lawn green"); +INSERT INTO items VALUES ("parka", "gray,medium blue"); + +SELECT * FROM items; + +SELECT * FROM items WHERE colors = "white,lawn green"; + +DROP TABLE items; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_set_32_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_set_32_with_index.test new file mode 100644 index 00000000000..0f772522eb6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_set_32_with_index.test @@ -0,0 +1,74 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS items; +--enable_warnings + +CREATE TABLE items ( + name VARCHAR(255), + colors SET("black", + "dim gray", + "dark gray", + "gray", + "light gray", + "gainsboro", + "white smoke", + "white", + + "red", + "orange red", + "dark orange", + "orange", + "gold", + "yellow", + "chartreuse", + "lawn green", + + "green", + "spring green", + "medium spring green", + "cyan", + "deep sky blue", + "blue", + "medium blue", + "dark violet", + + "dark magenta", + "magenta", + "dark red", + "brown", + "firebrick", + "indian red", + "light coral", + "salmon"), + INDEX (colors) +) DEFAULT CHARSET=utf8; +SHOW CREATE TABLE items; + +INSERT INTO items VALUES ("t-shart", "black,white"); +INSERT INTO items VALUES ("hat", "white,dark violet"); +INSERT INTO items VALUES ("parka", "green,brown,red"); + +SELECT * FROM items; + +SELECT * FROM items WHERE colors = "white,dark violet"; + +DROP TABLE items; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_set_64_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_set_64_with_index.test new file mode 100644 index 00000000000..6552c5da805 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_set_64_with_index.test @@ -0,0 +1,110 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS items; +--enable_warnings + +CREATE TABLE items ( + name VARCHAR(255), + colors SET("black", + "dim gray", + "dark gray", + "gray", + "light gray", + "gainsboro", + "white smoke", + "white", + + "red", + "orange red", + "dark orange", + "orange", + "gold", + "yellow", + "chartreuse", + "lawn green", + + "green", + "spring green", + "medium spring green", + "cyan", + "deep sky blue", + "blue", + "medium blue", + "dark violet", + + "dark magenta", + "magenta", + "dark red", + "brown", + "firebrick", + "indian red", + "light coral", + "salmon", + + "light salmon", + "tomato", + "coral", + "dark salmon", + "rosy brown", + "sienna", + "saddle brown", + "chocolate", + + "peru", + "sandy brown", + "burlywood", + "tan", + "navajo white", + "wheat", + "dark goldenrod", + "goldenrod", + + "light goldenrod", + "pale goldenrod", + "cornsilk", + "dark khaki", + "khaki", + "lemon chiffon", + "dark olive green", + "olive drab", + + "yellow green", + "green yellow", + "light green", + "forest green", + "dark green", + "lime green", + "pale green", + "dark sea green"), + INDEX (colors) +) DEFAULT CHARSET=utf8; +SHOW CREATE TABLE items; + +INSERT INTO items VALUES ("t-shart", "black,white,lawn green,dark violet"); +INSERT INTO items VALUES ("hat", "white,dark violet,yellow green"); +INSERT INTO items VALUES ("parka", "green,brown,red,lime green"); + +SELECT * FROM items; + +SELECT * FROM items WHERE colors = "white,dark violet,yellow green"; + +DROP TABLE items; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_set_8_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_set_8_with_index.test new file mode 100644 index 00000000000..bd92f23deb0 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_set_8_with_index.test @@ -0,0 +1,47 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS items; +--enable_warnings + +CREATE TABLE items ( + name VARCHAR(255), + colors SET("black", + "dim gray", + "dark gray", + "gray", + "light gray", + "gainsboro", + "white smoke", + "white"), + INDEX (colors) +) DEFAULT CHARSET=utf8; +SHOW CREATE TABLE items; + +INSERT INTO items VALUES ("t-shart", "black,gray"); +INSERT INTO items VALUES ("hat", "dim gray,dark gray"); +INSERT INTO items VALUES ("parka", "white smoke,light gray"); + +SELECT * FROM items; + +SELECT * FROM items WHERE colors = "dim gray,dark gray"; + +DROP TABLE items; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_bigint_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_bigint_with_index.test new file mode 100644 index 00000000000..c8bd7df0a15 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_bigint_with_index.test @@ -0,0 +1,42 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS items; +--enable_warnings + +CREATE TABLE items ( + name VARCHAR(255), + price BIGINT KEY +) DEFAULT CHARSET=utf8; + +INSERT INTO items VALUES ("house", 9223372036854775807); +INSERT INTO items VALUES ("note PC", 32767); +INSERT INTO items VALUES ("discount", -9223372036854775808); +INSERT INTO items VALUES ("coke", 100); +INSERT INTO items VALUES ("super car", 2147483648); + +SELECT * FROM items; + +SELECT * FROM items WHERE price <= 2147483648; + +SELECT * FROM items WHERE price > 2147483647; + +DROP TABLE items; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_int_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_int_with_index.test new file mode 100644 index 00000000000..572f46ebbb5 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_int_with_index.test @@ -0,0 +1,42 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS items; +--enable_warnings + +CREATE TABLE items ( + name VARCHAR(255), + price INT KEY +) DEFAULT CHARSET=utf8; + +INSERT INTO items VALUES ("car", 2147483647); +INSERT INTO items VALUES ("note PC", 32767); +INSERT INTO items VALUES ("discount", -2147483647); +INSERT INTO items VALUES ("coke", 100); +INSERT INTO items VALUES ("bike", 16777216); + +SELECT * FROM items; + +SELECT * FROM items WHERE price <= 16777216; + +SELECT * FROM items WHERE price > 16777215; + +DROP TABLE items; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_mediumint_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_mediumint_with_index.test new file mode 100644 index 00000000000..f43395cb0aa --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_mediumint_with_index.test @@ -0,0 +1,42 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS items; +--enable_warnings + +CREATE TABLE items ( + name VARCHAR(255), + price MEDIUMINT KEY +) DEFAULT CHARSET=utf8; + +INSERT INTO items VALUES ("car", 8388607); +INSERT INTO items VALUES ("note PC", 32767); +INSERT INTO items VALUES ("discount", -8388608); +INSERT INTO items VALUES ("coke", 100); +INSERT INTO items VALUES ("bike", 32768); + +SELECT * FROM items; + +SELECT * FROM items WHERE price <= 127; + +SELECT * FROM items WHERE price >= 32768; + +DROP TABLE items; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_smallint_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_smallint_with_index.test new file mode 100644 index 00000000000..4ddd446dc46 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_smallint_with_index.test @@ -0,0 +1,41 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS items; +--enable_warnings + +CREATE TABLE items ( + name VARCHAR(255), + price SMALLINT KEY +) DEFAULT CHARSET=utf8; + +INSERT INTO items VALUES ("note PC", 32767); +INSERT INTO items VALUES ("discount", -32768); +INSERT INTO items VALUES ("coke", 100); +INSERT INTO items VALUES ("tablet PC", 20000); + +SELECT * FROM items; + +SELECT * FROM items WHERE price <= 127; + +SELECT * FROM items WHERE price >= 128; + +DROP TABLE items; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_tinyint_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_tinyint_with_index.test new file mode 100644 index 00000000000..e2bca9328a9 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_tinyint_with_index.test @@ -0,0 +1,38 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS items; +--enable_warnings + +CREATE TABLE items ( + name VARCHAR(255), + price TINYINT KEY +) DEFAULT CHARSET=utf8; + +INSERT INTO items VALUES ("hamburger", 120); +INSERT INTO items VALUES ("discount", -10); +INSERT INTO items VALUES ("coke", 100); + +SELECT * FROM items; + +SELECT * FROM items WHERE price <= 100; + +DROP TABLE items; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_time_fractional_seconds_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_time_fractional_seconds_with_index.test new file mode 100644 index 00000000000..2a920d7e387 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_time_fractional_seconds_with_index.test @@ -0,0 +1,50 @@ +# 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/mroonga/have_mroonga.inc +--source ../../include/mroonga/have_fractional_seconds.inc + +--disable_warnings +DROP TABLE IF EXISTS running_records; +--enable_warnings + +CREATE TABLE running_records ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + average TIME(6), + max TIME(6), + KEY (average) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE running_records; + +INSERT INTO running_records (title, average, max) + VALUES ("normal condition", "01:00:00.000001", "01:05:00.000001"); +INSERT INTO running_records (title, average, max) + VALUES ("bad condition", "12:23:34.123456", "838:59:58.999999"); +INSERT INTO running_records (title, average, max) + VALUES ("record failure", "-838:59:59.000000", "-838:59:59.000000"); + +SELECT * FROM running_records; + +SELECT * FROM running_records + WHERE average BETWEEN "00:59:59.999999" AND "100:10:10.101010"; + +SELECT * FROM running_records + WHERE average BETWEEN "-838:59:59.000000" AND "01:00:00.000001"; + +DROP TABLE running_records; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_time_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_time_with_index.test new file mode 100644 index 00000000000..f5961825259 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_time_with_index.test @@ -0,0 +1,49 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS running_records; +--enable_warnings + +CREATE TABLE running_records ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + average TIME, + max TIME, + KEY (average) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE running_records; + +INSERT INTO running_records (title, average, max) + VALUES ("normal condition", "01:00:00", "01:05:00"); +INSERT INTO running_records (title, average, max) + VALUES ("bad condition", "12:23:34", "838:59:59"); +INSERT INTO running_records (title, average, max) + VALUES ("record failure", "-838:59:59", "-838:59:59"); + +SELECT * FROM running_records; + +SELECT * FROM running_records + WHERE average BETWEEN "00:59:59" AND "100:10:10"; + +SELECT * FROM running_records + WHERE average BETWEEN "-838:59:59" AND "01:00:00"; + +DROP TABLE running_records; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_timestamp_fractional_seconds_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_timestamp_fractional_seconds_with_index.test new file mode 100644 index 00000000000..6f5e0116eb7 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_timestamp_fractional_seconds_with_index.test @@ -0,0 +1,55 @@ +# 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/mroonga/skip_mariadb_55.inc +--source ../../include/mroonga/have_fractional_seconds.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + created_at TIMESTAMP(6), + updated_at TIMESTAMP(6), + KEY (updated_at) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, created_at, updated_at) + VALUES ("clear day", + "2012-01-29 21:51:01.111111", + "2012-01-29 21:51:02.222222"); +INSERT INTO diaries (title, created_at, updated_at) + VALUES ("rainy day", + "2012-01-30 01:23:45.333", + "2012-01-30 01:23:46.444"); +INSERT INTO diaries (title, created_at, updated_at) + VALUES ("cloudy day", + "2012-01-31 08:32:10.5555", + "2012-01-31 08:32:11.6666"); + +SELECT * FROM diaries; + +SELECT * FROM diaries + WHERE updated_at BETWEEN "2012-01-29 00:00:00.123456" AND + "2012-01-31 00:00:00.999999"; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_timestamp_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_timestamp_with_index.test new file mode 100644 index 00000000000..ae78befc466 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_timestamp_with_index.test @@ -0,0 +1,46 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + created_at TIMESTAMP, + updated_at TIMESTAMP, + KEY (updated_at) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, created_at, updated_at) + VALUES ("clear day", "2012-01-29 21:51:01", "2012-01-29 21:51:02"); +INSERT INTO diaries (title, created_at, updated_at) + VALUES ("rainy day", "2012-01-30 01:23:45", "2012-01-30 01:23:46"); +INSERT INTO diaries (title, created_at, updated_at) + VALUES ("cloudy day", "2012-01-31 08:32:10", "2012-01-31 08:32:11"); + +SELECT * FROM diaries; + +SELECT * FROM diaries + WHERE updated_at BETWEEN "2012-01-29 00:00:00" AND "2012-01-31 00:00:00"; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_tinyint_without_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_tinyint_without_index.test new file mode 100644 index 00000000000..c658c873e02 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_tinyint_without_index.test @@ -0,0 +1,35 @@ +# Copyright(C) 2011 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/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists books; +--enable_warnings + +create table books(title varchar(255), published tinyint); +insert into books values ("MySQL", 1); +insert into books values ("groonga", 1); +insert into books values ("mroonga", 0); + +select count(*) from books where published = 0; +select count(*) from books where published = 1; +select count(*) from books where published != 2; +select count(*) from books where published != 1; + +drop table books; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_bigint_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_bigint_with_index.test new file mode 100644 index 00000000000..1936842707c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_bigint_with_index.test @@ -0,0 +1,42 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS items; +--enable_warnings + +CREATE TABLE items ( + name VARCHAR(255), + price BIGINT UNSIGNED KEY +) DEFAULT CHARSET=utf8; + +INSERT INTO items VALUES ("house", 18446744073709551615); +INSERT INTO items VALUES ("note PC", 32767); +INSERT INTO items VALUES ("discount", 0); +INSERT INTO items VALUES ("coke", 100); +INSERT INTO items VALUES ("super car", 9223372036854775808); + +SELECT * FROM items; + +SELECT * FROM items WHERE price <= 9223372036854775808; + +SELECT * FROM items WHERE price > 9223372036854775807; + +DROP TABLE items; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_bigint_without_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_bigint_without_index.test new file mode 100644 index 00000000000..8ac9715ad76 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_bigint_without_index.test @@ -0,0 +1,38 @@ +# 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 ids; +--enable_warnings + +CREATE TABLE ids ( + id BIGINT UNSIGNED +) DEFAULT CHARSET=utf8; + +INSERT INTO ids VALUES (317173755057152000); +INSERT INTO ids VALUES (317173755057152002); + +SELECT * FROM ids; + +SELECT * FROM ids WHERE id = 317173755057152000; + +SELECT * FROM ids WHERE id = 317173755057152002; + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_int_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_int_with_index.test new file mode 100644 index 00000000000..a97024b48d8 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_int_with_index.test @@ -0,0 +1,42 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS items; +--enable_warnings + +CREATE TABLE items ( + name VARCHAR(255), + price INT UNSIGNED KEY +) DEFAULT CHARSET=utf8; + +INSERT INTO items VALUES ("car", 4294967295); +INSERT INTO items VALUES ("note PC", 32767); +INSERT INTO items VALUES ("discount", 0); +INSERT INTO items VALUES ("coke", 100); +INSERT INTO items VALUES ("bike", 2147483648); + +SELECT * FROM items; + +SELECT * FROM items WHERE price <= 2147483648; + +SELECT * FROM items WHERE price > 2147483647; + +DROP TABLE items; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_mediumint_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_mediumint_with_index.test new file mode 100644 index 00000000000..bec5917b410 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_mediumint_with_index.test @@ -0,0 +1,42 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS items; +--enable_warnings + +CREATE TABLE items ( + name VARCHAR(255), + price MEDIUMINT UNSIGNED KEY +) DEFAULT CHARSET=utf8; + +INSERT INTO items VALUES ("car", 16777215); +INSERT INTO items VALUES ("note PC", 32767); +INSERT INTO items VALUES ("discount", 0); +INSERT INTO items VALUES ("coke", 100); +INSERT INTO items VALUES ("bike", 8388607); + +SELECT * FROM items; + +SELECT * FROM items WHERE price <= 8388608; + +SELECT * FROM items WHERE price >= 8388607; + +DROP TABLE items; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_smallint_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_smallint_with_index.test new file mode 100644 index 00000000000..8e389b98881 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_smallint_with_index.test @@ -0,0 +1,41 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS items; +--enable_warnings + +CREATE TABLE items ( + name VARCHAR(255), + price SMALLINT UNSIGNED KEY +) DEFAULT CHARSET=utf8; + +INSERT INTO items VALUES ("note PC", 65535); +INSERT INTO items VALUES ("discount", 0); +INSERT INTO items VALUES ("coke", 100); +INSERT INTO items VALUES ("tablet PC", 32767); + +SELECT * FROM items; + +SELECT * FROM items WHERE price <= 32768; + +SELECT * FROM items WHERE price >= 32767; + +DROP TABLE items; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_tinyint_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_tinyint_with_index.test new file mode 100644 index 00000000000..880bc2d7cd8 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_tinyint_with_index.test @@ -0,0 +1,38 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS items; +--enable_warnings + +CREATE TABLE items ( + name VARCHAR(255), + price TINYINT UNSIGNED KEY +) DEFAULT CHARSET=utf8; + +INSERT INTO items VALUES ("hamburger", 255); +INSERT INTO items VALUES ("discount", 0); +INSERT INTO items VALUES ("coke", 100); + +SELECT * FROM items; + +SELECT * FROM items WHERE price <= 100; + +DROP TABLE items; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_year_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_year_with_index.test new file mode 100644 index 00000000000..a61dccc6439 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_year_with_index.test @@ -0,0 +1,47 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS aniversary_memos; +--enable_warnings + +CREATE TABLE aniversary_memos ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + party_year YEAR, + KEY (party_year) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE aniversary_memos; + +INSERT INTO aniversary_memos (title, party_year) + VALUES ("We need a big cake!", "11"); +INSERT INTO aniversary_memos (title, party_year) + VALUES ("Invitations are sent.", "2012"); +INSERT INTO aniversary_memos (title, party_year) + VALUES ("Tommorow is the anniversary party day!", "2012"); +INSERT INTO aniversary_memos (title, party_year) + VALUES ("Wow! Today is the anniversary party day!", "13"); + +SELECT * FROM aniversary_memos; + +SELECT * FROM aniversary_memos + WHERE party_year BETWEEN "12" AND "2013"; + +DROP TABLE aniversary_memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_year_without_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_year_without_index.test new file mode 100644 index 00000000000..ce1e1c21921 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_year_without_index.test @@ -0,0 +1,46 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS aniversary_memos; +--enable_warnings + +CREATE TABLE aniversary_memos ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + party_year YEAR +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE aniversary_memos; + +INSERT INTO aniversary_memos (title, party_year) + VALUES ("We need a big cake!", "11"); +INSERT INTO aniversary_memos (title, party_year) + VALUES ("Invitations are sent.", "2012"); +INSERT INTO aniversary_memos (title, party_year) + VALUES ("Tommorow is the anniversary party day!", "2012"); +INSERT INTO aniversary_memos (title, party_year) + VALUES ("Wow! Today is the anniversary party day!", "13"); + +SELECT * FROM aniversary_memos; + +SELECT * FROM aniversary_memos + WHERE party_year BETWEEN "12" AND "2013"; + +DROP TABLE aniversary_memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_database_name_slash.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_database_name_slash.test new file mode 100644 index 00000000000..b731acda9c9 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_database_name_slash.test @@ -0,0 +1,60 @@ +# 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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP DATABASE IF EXISTS `master/production`; +DROP DATABASE IF EXISTS `master/development`; +--enable_warnings + +CREATE DATABASE `master/production`; +USE `master/production`; + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT +) DEFAULT CHARSET=UTF8; + +INSERT INTO diaries (title) VALUES ("clear day (production)"); +INSERT INTO diaries (title) VALUES ("rainy day (production)"); +INSERT INTO diaries (title) VALUES ("cloudy day (production)"); + +SELECT * FROM diaries; + + +CREATE DATABASE `master/development`; +USE `master/development`; + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT +) DEFAULT CHARSET=UTF8; + +INSERT INTO diaries (title) VALUES ("clear day (development)"); +INSERT INTO diaries (title) VALUES ("rainy day (development)"); +INSERT INTO diaries (title) VALUES ("cloudy day (development)"); + +SELECT * FROM diaries; + + +USE test; + +DROP DATABASE `master/production`; +DROP DATABASE `master/development`; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_TODO_SPLIT_ME.test new file mode 100644 index 00000000000..e448a66956f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_TODO_SPLIT_ME.test @@ -0,0 +1,147 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# +# 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, t2, t3; +--enable_warnings + +# simple test +create table t1 (c1 int); +create table t2 (c1 int); +create table t3 (c1 int); +drop table t1,t2,t3; +create table t1 (c1 int, c2 int, c3 int); +create table t2 (c1 int primary key, c2 int, c3 int); +drop table t1,t2; + +# data type support +create table t1 (c1 bit); +desc t1; +drop table t1; +create table t1 (c1 tinyint); +desc t1; +drop table t1; +create table t1 (c1 smallint); +desc t1; +drop table t1; +create table t1 (c1 mediumint); +desc t1; +drop table t1; +create table t1 (c1 int); +desc t1; +drop table t1; +create table t1 (c1 bigint); +desc t1; +drop table t1; +create table t1 (c1 double); +desc t1; +drop table t1; +create table t1 (c1 float); +desc t1; +drop table t1; +create table t1 (c1 decimal); +desc t1; +drop table t1; +create table t1 (c1 date); +desc t1; +drop table t1; +create table t1 (c1 time); +desc t1; +drop table t1; +create table t1 (c1 timestamp); +desc t1; +drop table t1; +create table t1 (c1 datetime); +desc t1; +drop table t1; +create table t1 (c1 year); +desc t1; +drop table t1; +create table t1 (c1 char(10)); +desc t1; +drop table t1; +create table t1 (c1 varchar(10)); +desc t1; +drop table t1; +create table t1 (c1 binary(10)); +desc t1; +drop table t1; +create table t1 (c1 varbinary(10)); +desc t1; +drop table t1; +create table t1 (c1 tinyblob); +desc t1; +drop table t1; +create table t1 (c1 blob); +desc t1; +drop table t1; +create table t1 (c1 mediumblob); +desc t1; +drop table t1; +create table t1 (c1 longblob); +desc t1; +drop table t1; +create table t1 (c1 tinytext); +desc t1; +drop table t1; +create table t1 (c1 text); +desc t1; +drop table t1; +create table t1 (c1 mediumtext); +desc t1; +drop table t1; +create table t1 (c1 longtext); +desc t1; +drop table t1; +create table t1 (c1 enum("yes","no")); +desc t1; +drop table t1; +create table t1 (c1 set("A","B","AB","O")); +desc t1; +drop table t1; + +# virtual columns +create table t1 (c1 int, `_id` int) engine = mroonga; +desc t1; +drop table t1; + +# error +--error ER_CANT_CREATE_TABLE +create table t1 (c1 int, `_score` float) engine = mroonga; + +# checking for virtual columns +--error ER_CANT_CREATE_TABLE +create table t1 (c1 int, `_id` text) engine = mroonga; +--error ER_CANT_CREATE_TABLE +create table t1 (c1 int, `_id` int, index(`_id`)) engine = mroonga; + +# index for _id +--error ER_CANT_CREATE_TABLE +create table t1 (_id int, c1 int, primary key (_id)); +create table t1 (_id int, c1 int, primary key (_id) using hash); +drop table t1; +--error ER_CANT_CREATE_TABLE +create table t1 (_id int, c1 int, unique key (_id)); +create table t1 (_id int, c1 int, unique key (_id) using hash); +drop table t1; +--error ER_CANT_CREATE_TABLE +create table t1 (_id int, c1 int, key (_id)); +create table t1 (_id int, c1 int, key (_id) using hash); +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_comment_normal.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_comment_normal.test new file mode 100644 index 00000000000..272485d3453 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_comment_normal.test @@ -0,0 +1,34 @@ +# Copyright(C) 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 +# 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 +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP TABLE IF EXISTS bugs; +--enable_warnings + +CREATE TABLE bugs ( + id INT UNSIGNED +) DEFAULT CHARSET=utf8 + COMMENT='Free style normal comment'; + +SHOW CREATE TABLE bugs; + +DROP TABLE bugs; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_default_tokenizer.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_default_tokenizer.test new file mode 100644 index 00000000000..ee1afdfe4f6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_default_tokenizer.test @@ -0,0 +1,36 @@ +# Copyright(C) 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 +# 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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP TABLE IF EXISTS tags; +--enable_warnings + +CREATE TABLE tags ( + name VARCHAR(64) PRIMARY KEY +) DEFAULT CHARSET=utf8 + COLLATE=utf8_bin + COMMENT='default_tokenizer "TokenDelimit"'; + +SELECT mroonga_command("dump"); + +DROP TABLE tags; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_normalizer_fulltext_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_normalizer_fulltext_index.test new file mode 100644 index 00000000000..02e2cb9e81a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_normalizer_fulltext_index.test @@ -0,0 +1,42 @@ +# Copyright(C) 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 +# 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 +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES utf8; + +CREATE TABLE diaries ( + day DATE PRIMARY KEY, + content VARCHAR(64) NOT NULL, + FULLTEXT INDEX (content) COMMENT 'normalizer "NormalizerAuto"' +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +INSERT INTO diaries VALUES ("2013-04-23", "ブラックコーヒーを飲んだ。"); + +SELECT * FROM diaries + WHERE MATCH (content) AGAINST ("+ふらつく" IN BOOLEAN MODE); +SELECT * FROM diaries + WHERE MATCH (content) AGAINST ("+ブラック" IN BOOLEAN MODE); + +DROP TABLE diaries; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_normalizer_no_utf8_charset_with_utf8_normalizer.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_normalizer_no_utf8_charset_with_utf8_normalizer.test new file mode 100644 index 00000000000..f28fb5b8695 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_normalizer_no_utf8_charset_with_utf8_normalizer.test @@ -0,0 +1,40 @@ +# Copyright(C) 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 +# 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 +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES latin1; + +CREATE TABLE diaries ( + day DATE PRIMARY KEY, + content VARCHAR(64) NOT NULL, + FULLTEXT INDEX (content) COMMENT 'normalizer "NormalizerMySQLGeneralCI"' +) DEFAULT CHARSET=latin1; + +--error ER_ERROR_ON_WRITE +INSERT INTO diaries VALUES ("2013-04-23", "I drunk a black cookie."); + +SELECT * FROM diaries; + +DROP TABLE diaries; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_reference_type.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_reference_type.test new file mode 100644 index 00000000000..eb1095e75a7 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_reference_type.test @@ -0,0 +1,42 @@ +# Copyright(C) 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 +# 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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_query_log +DROP DATABASE test; +CREATE DATABASE test; +USE test; +--enable_query_log + +CREATE TABLE tags ( + name VARCHAR(64) PRIMARY KEY +) DEFAULT CHARSET=utf8 COLLATE=utf8_bin; + +CREATE TABLE bugs ( + id INT UNSIGNED PRIMARY KEY, + tag VARCHAR(64) COMMENT 'type "tags"' +) DEFAULT CHARSET=utf8; + +SELECT mroonga_command("dump"); + +DROP TABLE bugs; +DROP TABLE tags; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_vector.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_vector.test new file mode 100644 index 00000000000..440619c33c0 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_vector.test @@ -0,0 +1,35 @@ +# Copyright(C) 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 +# 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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP TABLE IF EXISTS bugs; +--enable_warnings + +CREATE TABLE bugs ( + id INT UNSIGNED PRIMARY KEY, + tags TEXT COMMENT 'flags "COLUMN_VECTOR"' +) DEFAULT CHARSET=utf8; + +SELECT mroonga_command("dump"); + +DROP TABLE bugs; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/delete_fulltext_column.test b/storage/mroonga/mysql-test/mroonga/storage/t/delete_fulltext_column.test new file mode 100644 index 00000000000..a43f5c6511b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/delete_fulltext_column.test @@ -0,0 +1,36 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# +# 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, t2, t3; +--enable_warnings + +create table t1 (c1 int primary key, c2 text, fulltext index (c2)); +insert into t1 values(10, "aa ii uu ee"); +insert into t1 values(20, "ka ki ku ke"); +insert into t1 values(30, "sa si su se"); + +select * from t1; +select * from t1 where match(c2) against("ki"); +delete from t1 where c1=20; +select * from t1; +select * from t1 where match(c2) against("ki"); + +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/delete_index_btree_many_records.test b/storage/mroonga/mysql-test/mroonga/storage/t/delete_index_btree_many_records.test new file mode 100644 index 00000000000..224929fe308 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/delete_index_btree_many_records.test @@ -0,0 +1,46 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ids; +--enable_warnings + +SET NAMES UTF8; +CREATE TABLE ids ( + id INT, + KEY (id) +) DEFAULT CHARSET UTF8; + +INSERT INTO ids VALUES(1); +INSERT INTO ids VALUES(2); +INSERT INTO ids VALUES(3); + +SELECT * FROM ids ORDER BY id; + +DELETE FROM ids WHERE id = 1; +SELECT * FROM ids ORDER BY id; + +DELETE FROM ids WHERE id = 2; +SELECT * FROM ids ORDER BY id; + +DELETE FROM ids WHERE id = 3; +SELECT * FROM ids ORDER BY id; + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/delete_index_hash_id_no_unique.test b/storage/mroonga/mysql-test/mroonga/storage/t/delete_index_hash_id_no_unique.test new file mode 100644 index 00000000000..a23ca3bae5c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/delete_index_hash_id_no_unique.test @@ -0,0 +1,33 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# +# 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, t2, t3; +--enable_warnings + +create table t1 (_id int, c1 int, key (_id) using hash); +insert into t1 values(null, 100); +insert into t1 values(null, 100); +insert into t1 values(null, 100); +insert into t1 values(null, 100); +select * from t1; +delete from t1 where _id = 2; +select * from t1; +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/delete_index_hash_id_unique.test b/storage/mroonga/mysql-test/mroonga/storage/t/delete_index_hash_id_unique.test new file mode 100644 index 00000000000..559b3a15be6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/delete_index_hash_id_unique.test @@ -0,0 +1,33 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# +# 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, t2, t3; +--enable_warnings + +create table t1 (_id int, c1 int, unique key (_id) using hash); +insert into t1 values(null, 100); +insert into t1 values(null, 100); +insert into t1 values(null, 100); +insert into t1 values(null, 100); +select * from t1; +delete from t1 where _id = 2; +select * from t1; +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/delete_normal_column.test b/storage/mroonga/mysql-test/mroonga/storage/t/delete_normal_column.test new file mode 100644 index 00000000000..2f94a8242d3 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/delete_normal_column.test @@ -0,0 +1,44 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# +# 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, t2, t3; +--enable_warnings + +create table t1 (c1 int, c2 int); +show create table t1; +insert into t1 values (1, 100); +insert into t1 values (2, 101); +insert into t1 values (3, 102); +insert into t1 values (4, 102); +select * from t1; + +delete from t1 where c1=3; +select * from t1; + +flush tables; + +delete from t1 where c1=2; +select * from t1; + +delete from t1; +select * from t1; + +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/delete_unsigned_bigint.test b/storage/mroonga/mysql-test/mroonga/storage/t/delete_unsigned_bigint.test new file mode 100644 index 00000000000..e174710934b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/delete_unsigned_bigint.test @@ -0,0 +1,37 @@ +# Copyright(C) 2012 Kentoku SHIBA +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS numbers; +--enable_warnings + +CREATE TABLE numbers ( + data BIGINT UNSIGNED +); + +INSERT INTO numbers VALUES(18446744073709551615); + +SELECT * FROM numbers ORDER BY data; + +DELETE FROM numbers WHERE data = 18446744073709551615; +SELECT * FROM numbers ORDER BY data; + +DROP TABLE numbers; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/drop_database_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/storage/t/drop_database_TODO_SPLIT_ME.test new file mode 100644 index 00000000000..74f840944f9 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/drop_database_TODO_SPLIT_ME.test @@ -0,0 +1,40 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# +# 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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +drop database if exists groonga; +--enable_warnings + +create database groonga; +drop database groonga; + +create database groonga; +use groonga; +create table t1 (c1 int primary key, c2 varchar(255)) default charset utf8; +create table t2 (c1 int primary key, c2 varchar(255)) default charset utf8; +drop database groonga; + +create database groonga; +use groonga; +create table t1 (c1 int primary key, c2 varchar(255)) default charset utf8; +create table t2 (c1 int primary key, c2 varchar(255)) default charset utf8; +drop table t1, t2; +drop database groonga; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/drop_table_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/storage/t/drop_table_TODO_SPLIT_ME.test new file mode 100644 index 00000000000..a057f328453 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/drop_table_TODO_SPLIT_ME.test @@ -0,0 +1,29 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# +# 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 alphabet, `with-hyphen`; +--enable_warnings + +create table alphabet (c1 int primary key, c2 int, c3 int); +drop table alphabet; + +create table `with-hyphen` (c1 int primary key, c2 int, c3 int); +drop table `with-hyphen`; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/flush_logs.test b/storage/mroonga/mysql-test/mroonga/storage/t/flush_logs.test new file mode 100644 index 00000000000..964217ae713 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/flush_logs.test @@ -0,0 +1,21 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# +# 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 + +flush logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_create.test b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_create.test new file mode 100644 index 00000000000..0ab06083b7d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_create.test @@ -0,0 +1,118 @@ +# 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_version_56.inc +--source ../../include/mroonga/check_mariadb.inc + +if ($mariadb) +{ + skip This test is for MySQL version 5.6.x; +} + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists articles2; +drop table if exists articles; +drop table if exists comments2; +drop table if exists comments; +--enable_warnings + +create table comments( + comment int unsigned, + content text not null, + primary key(comment) +); + +create table articles( + content text not null, + comment int unsigned, + FOREIGN KEY (comment) REFERENCES comments (comment) +); + +insert into comments (comment, content) values +(1, 'aaa bbb'),(2, 'ccc ddd'),(3, 'eee fff'); + +insert into articles (content, comment) values +('111aaa', 1),('222bbb', 2),('222ccc', 2); + +select comment, content from comments; + +select content, comment from articles; + +show create table comments; + +show create table articles; + +select * from information_schema.referential_constraints; + +rename table comments to comments2; +rename table articles to articles2; + +create table comments( + comment int unsigned, + content text not null, + primary key(comment) +); + +create table articles( + content text not null, + comment int unsigned, + FOREIGN KEY (comment) REFERENCES comments (comment) +); + +insert into comments (comment, content) values +(1, 'ab'),(2, 'cd'),(3, 'ef'); + +insert into articles (content, comment) values +('1a', 1),('2b', 2),('2c', 2); + +select comment, content from comments; + +select content, comment from articles; + +select comment, content from comments2; + +select content, comment from articles2; + +show create table comments; + +show create table articles; + +show create table comments2; + +show create table articles2; + +select * from information_schema.referential_constraints; + +alter table articles drop foreign key comment; + +show create table articles; + +select content, comment from articles; + +alter table articles add FOREIGN KEY (comment) REFERENCES comments (comment); + +show create table articles; + +select content, comment from articles; + +drop table articles2; +drop table articles; +drop table comments2; +drop table comments; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_empty_query.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_empty_query.test new file mode 100644 index 00000000000..75f1c3c38ed --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_empty_query.test @@ -0,0 +1,41 @@ +# Copyright(C) 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 +# 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 diaries; +--enable_warnings + +SET NAMES UTF8; +CREATE TABLE diaries( + title TEXT, + FULLTEXT KEY (title) +) DEFAULT CHARSET=utf8; + +INSERT INTO diaries VALUES("Start groonga"); +INSERT INTO diaries VALUES("Start mroonga"); +INSERT INTO diaries VALUES("Start groonga and Ruby"); + +SELECT * FROM diaries; + +SELECT * + FROM diaries + WHERE MATCH(title) AGAINST("" IN BOOLEAN MODE); + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_escape.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_escape.test new file mode 100644 index 00000000000..1a27422aa81 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_escape.test @@ -0,0 +1,43 @@ +# Copyright(C) 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 +# 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 memos; +--enable_warnings + +SET GLOBAL mroonga_default_parser = TokenDelimit; + +SET NAMES UTF8; +CREATE TABLE memos ( + id INT PRIMARY KEY, + content TEXT, + FULLTEXT INDEX (content) +) DEFAULT CHARSET=UTF8; + +INSERT INTO memos VALUES(1, "(groonga) Installed!"); +INSERT INTO memos VALUES(2, "(mroonga) Installed!"); +INSERT INTO memos VALUES(3, "(groonga) Upgraded!"); + +SELECT * FROM memos + WHERE MATCH(content) AGAINST("\\(groonga\\)*" IN BOOLEAN MODE); + +DROP TABLE memos; + +SET GLOBAL mroonga_default_parser = TokenBigram; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_leading_not.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_leading_not.test new file mode 100644 index 00000000000..952749338ac --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_leading_not.test @@ -0,0 +1,40 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES UTF8; +CREATE TABLE diaries ( + id INT PRIMARY KEY, + title VARCHAR(255), + content TEXT, + FULLTEXT INDEX (content) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries VALUES(1, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, "富士山", "今日も天気がよくてきれいに見える。"); + +SELECT * FROM diaries WHERE MATCH(content) AGAINST("-明日 +天気" IN BOOLEAN MODE); + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_minus_no_operator.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_minus_no_operator.test new file mode 100644 index 00000000000..89adbd4b5f7 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_minus_no_operator.test @@ -0,0 +1,42 @@ +# Copyright(C) 2011-2013 Kouhei Sutou <kou@clear-code.com> +# Copyright(C) 2013 Kenji Maruyama <mmmaru777@gmail.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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS memos; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE memos ( + content TEXT, + FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8; + +INSERT INTO memos VALUES ("Today is good day."); +INSERT INTO memos VALUES ("Tomorrow will be good day."); +INSERT INTO memos VALUES ("Yesterday was good day."); +INSERT INTO memos VALUES ("Today is fine."); +INSERT INTO memos VALUES ("Tomorrow will be fine."); +INSERT INTO memos VALUES ("Yesterday was fine."); + +SELECT * FROM memos + WHERE MATCH (content) AGAINST ("*D- fine is be" IN BOOLEAN MODE); + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_minus_with_or.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_minus_with_or.test new file mode 100644 index 00000000000..76a72a5b865 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_minus_with_or.test @@ -0,0 +1,42 @@ +# Copyright(C) 2011-2013 Kouhei Sutou <kou@clear-code.com> +# Copyright(C) 2013 Kenji Maruyama <mmmaru777@gmail.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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS memos; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE memos ( + content TEXT, + FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8; + +INSERT INTO memos VALUES ("Today is good day."); +INSERT INTO memos VALUES ("Tomorrow will be good day."); +INSERT INTO memos VALUES ("Yesterday was good day."); +INSERT INTO memos VALUES ("Today is fine."); +INSERT INTO memos VALUES ("Tomorrow will be fine."); +INSERT INTO memos VALUES ("Yesterday was fine."); + +SELECT * FROM memos + WHERE MATCH (content) AGAINST ("*D- is OR be fine" IN BOOLEAN MODE); + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_minus_with_plus.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_minus_with_plus.test new file mode 100644 index 00000000000..e2edfe780b3 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_minus_with_plus.test @@ -0,0 +1,42 @@ +# Copyright(C) 2011-2013 Kouhei Sutou <kou@clear-code.com> +# Copyright(C) 2013 Kenji Maruyama <mmmaru777@gmail.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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS memos; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE memos ( + content TEXT, + FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8; + +INSERT INTO memos VALUES ("Today is good day."); +INSERT INTO memos VALUES ("Tomorrow will be good day."); +INSERT INTO memos VALUES ("Yesterday was good day."); +INSERT INTO memos VALUES ("Today is fine."); +INSERT INTO memos VALUES ("Tomorrow will be fine."); +INSERT INTO memos VALUES ("Yesterday was fine."); + +SELECT * FROM memos + WHERE MATCH (content) AGAINST ("*D- good +day be" IN BOOLEAN MODE); + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_or_no_operator.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_or_no_operator.test new file mode 100644 index 00000000000..4d0f15b203a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_or_no_operator.test @@ -0,0 +1,41 @@ +# Copyright(C) 2011-2013 Kouhei Sutou <kou@clear-code.com> +# Copyright(C) 2013 Kenji Maruyama <mmmaru777@gmail.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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS memos; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE memos ( + content TEXT, + FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8; + +INSERT INTO memos VALUES ("Today is good day."); +INSERT INTO memos VALUES ("Tomorrow will be good day."); +INSERT INTO memos VALUES ("Today is fine."); +INSERT INTO memos VALUES ("Tomorrow will be fine."); +INSERT INTO memos VALUES ("Yesterday was fine."); + +SELECT * FROM memos + WHERE MATCH (content) AGAINST ("*DOR today good" IN BOOLEAN MODE); + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_or_with_minus.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_or_with_minus.test new file mode 100644 index 00000000000..ed93b543869 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_or_with_minus.test @@ -0,0 +1,41 @@ +# Copyright(C) 2011-2013 Kouhei Sutou <kou@clear-code.com> +# Copyright(C) 2013 Kenji Maruyama <mmmaru777@gmail.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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS memos; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE memos ( + content TEXT, + FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8; + +INSERT INTO memos VALUES ("Today is good day."); +INSERT INTO memos VALUES ("Tomorrow will be good day."); +INSERT INTO memos VALUES ("Today is fine."); +INSERT INTO memos VALUES ("Tomorrow will be fine."); +INSERT INTO memos VALUES ("Yesterday was fine."); + +SELECT * FROM memos + WHERE MATCH (content) AGAINST ("*DOR today -good tomorrow" IN BOOLEAN MODE); + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_or_with_plus.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_or_with_plus.test new file mode 100644 index 00000000000..3a078c7eccb --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_or_with_plus.test @@ -0,0 +1,41 @@ +# Copyright(C) 2011-2013 Kouhei Sutou <kou@clear-code.com> +# Copyright(C) 2013 Kenji Maruyama <mmmaru777@gmail.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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS memos; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE memos ( + content TEXT, + FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8; + +INSERT INTO memos VALUES ("Today is good day."); +INSERT INTO memos VALUES ("Tomorrow will be good day."); +INSERT INTO memos VALUES ("Today is fine."); +INSERT INTO memos VALUES ("Tomorrow will be fine."); +INSERT INTO memos VALUES ("Yesterday was fine."); + +SELECT * FROM memos + WHERE MATCH (content) AGAINST ("*DOR today +good tomorrow" IN BOOLEAN MODE); + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_plus_no_operator.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_plus_no_operator.test new file mode 100644 index 00000000000..fb2ec74a5e0 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_plus_no_operator.test @@ -0,0 +1,39 @@ +# Copyright(C) 2011-2013 Kouhei Sutou <kou@clear-code.com> +# Copyright(C) 2013 Kenji Maruyama <mmmaru777@gmail.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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS memos; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE memos ( + content TEXT, + FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8; + +INSERT INTO memos VALUES ("Today is good day."); +INSERT INTO memos VALUES ("Tomorrow will be good day."); +INSERT INTO memos VALUES ("Today is fine."); + +SELECT * FROM memos + WHERE MATCH (content) AGAINST ("*D+ today good" IN BOOLEAN MODE); + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_plus_with_minus.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_plus_with_minus.test new file mode 100644 index 00000000000..30cf3e87491 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_plus_with_minus.test @@ -0,0 +1,39 @@ +# Copyright(C) 2011-2013 Kouhei Sutou <kou@clear-code.com> +# Copyright(C) 2013 Kenji Maruyama <mmmaru777@gmail.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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS memos; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE memos ( + content TEXT, + FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8; + +INSERT INTO memos VALUES ("Today is good day."); +INSERT INTO memos VALUES ("Tomorrow will be good day."); +INSERT INTO memos VALUES ("Today is fine."); + +SELECT * FROM memos + WHERE MATCH (content) AGAINST ("*D+ today -good is" IN BOOLEAN MODE); + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_plus_with_or.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_plus_with_or.test new file mode 100644 index 00000000000..7268cc1921c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_plus_with_or.test @@ -0,0 +1,39 @@ +# Copyright(C) 2011-2013 Kouhei Sutou <kou@clear-code.com> +# Copyright(C) 2013 Kenji Maruyama <mmmaru777@gmail.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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS memos; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE memos ( + content TEXT, + FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8; + +INSERT INTO memos VALUES ("Today is good day."); +INSERT INTO memos VALUES ("Tomorrow will be good day."); +INSERT INTO memos VALUES ("Today is fine."); + +SELECT * FROM memos + WHERE MATCH (content) AGAINST ("*D+ today OR tomorrow day" IN BOOLEAN MODE); + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_full_spec.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_full_spec.test new file mode 100644 index 00000000000..bec7944a82b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_full_spec.test @@ -0,0 +1,43 @@ +# Copyright(C) 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 +# 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 diaries; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE diaries ( + id INT PRIMARY KEY, + title VARCHAR(255), + content TEXT, + FULLTEXT INDEX (title, content) +) DEFAULT CHARSET=utf8; + +INSERT INTO diaries VALUES(1, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, "富士山", "今日も天気がよくてきれいに見える。"); + +SELECT *, MATCH(title, content) + AGAINST("*W1:10,2:2 +天気" in BOOLEAN MODE) AS score + FROM diaries + WHERE MATCH(title, content) + AGAINST("*W1:10,2:2 +天気" in BOOLEAN MODE); + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_no_weight.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_no_weight.test new file mode 100644 index 00000000000..fa10ae7b73b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_no_weight.test @@ -0,0 +1,43 @@ +# Copyright(C) 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 +# 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 diaries; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE diaries ( + id INT PRIMARY KEY, + title VARCHAR(255), + content TEXT, + FULLTEXT INDEX (title, content) +) DEFAULT CHARSET=utf8; + +INSERT INTO diaries VALUES(1, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, "富士山", "今日も天気がよくてきれいに見える。"); + +SELECT *, MATCH(title, content) + AGAINST("*W1,2:2 +天気" in BOOLEAN MODE) AS score + FROM diaries + WHERE MATCH(title, content) + AGAINST("*W1,2:2 +天気" in BOOLEAN MODE); + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_omit_section.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_omit_section.test new file mode 100644 index 00000000000..d7f1bde6ca4 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_omit_section.test @@ -0,0 +1,43 @@ +# Copyright(C) 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 +# 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 diaries; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE diaries ( + id INT PRIMARY KEY, + title VARCHAR(255), + content TEXT, + FULLTEXT INDEX (title, content) +) DEFAULT CHARSET=utf8; + +INSERT INTO diaries VALUES(1, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, "富士山", "今日も天気がよくてきれいに見える。"); + +SELECT *, MATCH(title, content) + AGAINST("*W1:2 +天気" in BOOLEAN MODE) AS score + FROM diaries + WHERE MATCH(title, content) + AGAINST("*W1:2 +天気" in BOOLEAN MODE); + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_ten_or_more_sections.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_ten_or_more_sections.test new file mode 100644 index 00000000000..6df0c13f111 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_ten_or_more_sections.test @@ -0,0 +1,63 @@ +# Copyright(C) 2014 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS memos; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE memos ( + title VARCHAR(255), + tag1 VARCHAR(10), + tag2 VARCHAR(10), + tag3 VARCHAR(10), + tag4 VARCHAR(10), + tag5 VARCHAR(10), + tag6 VARCHAR(10), + tag7 VARCHAR(10), + tag8 VARCHAR(10), + tag9 VARCHAR(10), + tag10 VARCHAR(10), + FULLTEXT INDEX (tag1, tag2, tag3, tag4, tag5, tag6, tag7, tag8, tag9, tag10) +) DEFAULT CHARSET=utf8; + +INSERT INTO memos + VALUES("Groonga", + "tag 1", + "tag 2", + "tag 3", + "tag 4", + "tag 5", + "tag 6", + "tag 7", + "tag 8", + "tag 9", + "tag 10"); + +SELECT title, + MATCH(tag1, tag2, tag3, tag4, tag5, tag6, tag7, tag8, tag9, tag10) + AGAINST("*W1:2,2:4,3:6,4:8,5:10,6:12,7:14,8:16,9:18,10:20 +tag" + in BOOLEAN MODE) AS score + FROM memos + WHERE MATCH(tag1, tag2, tag3, tag4, tag5, tag6, tag7, tag8, tag9, tag10) + AGAINST("*W1:2,2:4,3:6,4:8,5:10,6:12,7:14,8:16,9:18,10:20 +tag" + in BOOLEAN MODE); + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_three_or_more_sections.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_three_or_more_sections.test new file mode 100644 index 00000000000..9161ff6ff0d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_three_or_more_sections.test @@ -0,0 +1,44 @@ +# Copyright(C) 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 +# 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 diaries; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE diaries ( + id INT PRIMARY KEY, + title VARCHAR(255), + category VARCHAR(10), + content TEXT, + FULLTEXT INDEX (title, category, content) +) DEFAULT CHARSET=utf8; + +INSERT INTO diaries VALUES(1, "Hello", "日記", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, "天気予報", "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, "富士山", "天気", "今日も天気がよくてきれいに見える。"); + +SELECT *, MATCH(title, category, content) + AGAINST("*W1:2,2:10,3:1 +天気" in BOOLEAN MODE) AS score + FROM diaries + WHERE MATCH(title, category, content) + AGAINST("*W1:2,2:10,3:1 +天気" in BOOLEAN MODE); + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_syntax_error_error.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_syntax_error_error.test new file mode 100644 index 00000000000..f8d5e3fe6be --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_syntax_error_error.test @@ -0,0 +1,45 @@ +# Copyright(C) 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 +# 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 memos; +--enable_warnings + +SET GLOBAL mroonga_default_parser = TokenDelimit; +SET mroonga_action_on_fulltext_query_error = ERROR; + +SET NAMES UTF8; +CREATE TABLE memos ( + id INT PRIMARY KEY, + content TEXT, + FULLTEXT INDEX (content) +) DEFAULT CHARSET=UTF8; + +INSERT INTO memos VALUES(1, "(groonga) Installed!"); +INSERT INTO memos VALUES(2, "(mroonga) Installed!"); +INSERT INTO memos VALUES(3, "(groonga) Upgraded!"); + +-- error ER_PARSE_ERROR +SELECT * FROM memos + WHERE MATCH(content) AGAINST("(groonga" IN BOOLEAN MODE); + +DROP TABLE memos; + +SET GLOBAL mroonga_default_parser = TokenBigram; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_syntax_error_error_and_log.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_syntax_error_error_and_log.test new file mode 100644 index 00000000000..1c0795bca58 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_syntax_error_error_and_log.test @@ -0,0 +1,45 @@ +# Copyright(C) 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 +# 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 memos; +--enable_warnings + +SET GLOBAL mroonga_default_parser = TokenDelimit; +SET mroonga_action_on_fulltext_query_error = ERROR_AND_LOG; + +SET NAMES UTF8; +CREATE TABLE memos ( + id INT PRIMARY KEY, + content TEXT, + FULLTEXT INDEX (content) +) DEFAULT CHARSET=UTF8; + +INSERT INTO memos VALUES(1, "(groonga) Installed!"); +INSERT INTO memos VALUES(2, "(mroonga) Installed!"); +INSERT INTO memos VALUES(3, "(groonga) Upgraded!"); + +-- error ER_PARSE_ERROR +SELECT * FROM memos + WHERE MATCH(content) AGAINST("(groonga" IN BOOLEAN MODE); + +DROP TABLE memos; + +SET GLOBAL mroonga_default_parser = TokenBigram; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_syntax_error_ignore.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_syntax_error_ignore.test new file mode 100644 index 00000000000..fef386cc42d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_syntax_error_ignore.test @@ -0,0 +1,44 @@ +# Copyright(C) 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 +# 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 memos; +--enable_warnings + +SET GLOBAL mroonga_default_parser = TokenDelimit; +SET mroonga_action_on_fulltext_query_error = "IGNORE"; + +SET NAMES UTF8; +CREATE TABLE memos ( + id INT PRIMARY KEY, + content TEXT, + FULLTEXT INDEX (content) +) DEFAULT CHARSET=UTF8; + +INSERT INTO memos VALUES(1, "(groonga) Installed!"); +INSERT INTO memos VALUES(2, "(mroonga) Installed!"); +INSERT INTO memos VALUES(3, "(groonga) Upgraded!"); + +SELECT * FROM memos + WHERE MATCH(content) AGAINST("(groonga" IN BOOLEAN MODE); + +DROP TABLE memos; + +SET GLOBAL mroonga_default_parser = TokenBigram; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_syntax_error_ignore_and_log.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_syntax_error_ignore_and_log.test new file mode 100644 index 00000000000..ac51f81a43a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_syntax_error_ignore_and_log.test @@ -0,0 +1,44 @@ +# Copyright(C) 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 +# 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 memos; +--enable_warnings + +SET GLOBAL mroonga_default_parser = TokenDelimit; +SET mroonga_action_on_fulltext_query_error = IGNORE_AND_LOG; + +SET NAMES UTF8; +CREATE TABLE memos ( + id INT PRIMARY KEY, + content TEXT, + FULLTEXT INDEX (content) +) DEFAULT CHARSET=UTF8; + +INSERT INTO memos VALUES(1, "(groonga) Installed!"); +INSERT INTO memos VALUES(2, "(mroonga) Installed!"); +INSERT INTO memos VALUES(3, "(groonga) Upgraded!"); + +SELECT * FROM memos + WHERE MATCH(content) AGAINST("(groonga" IN BOOLEAN MODE); + +DROP TABLE memos; + +SET GLOBAL mroonga_default_parser = TokenBigram; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_ascii.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_ascii.test new file mode 100644 index 00000000000..42ef563105d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_ascii.test @@ -0,0 +1,36 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# +# 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, t2, t3; +--enable_warnings + +create table t1 (c1 int primary key, c2 int, c3 text, fulltext index ft(c3)); +insert into t1 values(1,10,"aa ii uu ee oo"); +insert into t1 values(2,20,"ka ki ku ke ko"); +insert into t1 values(3,30,"sa si su se so"); +insert into t1 values(4,40,"ta ti tu te to"); +insert into t1 values(5,50,"aa ii uu ee oo"); +select * from t1; +select * from t1 where match(c3) against("su"); +select * from t1 where match(c3) against("ii"); +select * from t1 where match(c3) against("+su" in boolean mode); +select * from t1 where match(c3) against("+ii" in boolean mode); +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_cp932.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_cp932.test new file mode 100644 index 00000000000..7396a66ecc0 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_cp932.test @@ -0,0 +1,34 @@ +# Copyright(C) 2011 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/have_cp932.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists t1, t2, t3; +--enable_warnings + +set names cp932; +create table t1 (c1 int primary key, c2 varchar(255), c3 text, fulltext index(c2), fulltext index(c3)) default charset cp932; +insert into t1 values(1, "̕xmR̓VCɂ",""); +insert into t1 values(2, "","̕xmR̓VC͕܂"); +insert into t1 values(3, "dummy", "dummy"); +select * from t1; +select * from t1 where match(c2) against("xmR"); +select * from t1 where match(c3) against("xmR"); +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_eucjpms.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_eucjpms.test new file mode 100644 index 00000000000..2d8b094c43d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_eucjpms.test @@ -0,0 +1,34 @@ +# Copyright(C) 2011 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/have_eucjpms.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists t1, t2, t3; +--enable_warnings + +set names eucjpms; +create table t1 (c1 int primary key, c2 varchar(255), c3 text, fulltext index(c2), fulltext index(c3)) default charset eucjpms; +insert into t1 values(1, "ٻλŷˤĤ",""); +insert into t1 values(2, "","ٻλŷʬޤ"); +insert into t1 values(3, "dummy", "dummy"); +select * from t1; +select * from t1 where match(c2) against("ٻλ"); +select * from t1 where match(c3) against("ٻλ"); +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_japanese.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_japanese.test new file mode 100644 index 00000000000..4b6ca756a29 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_japanese.test @@ -0,0 +1,33 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# +# 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, t2, t3; +--enable_warnings + +set names utf8; +create table t1 (c1 int primary key, c2 varchar(255), c3 text, fulltext index(c2), fulltext index(c3)) default charset utf8; +insert into t1 values(1, "明日の富士山の天気について","あああああああ"); +insert into t1 values(2, "いいいいい","明日の富士山の天気は分かりません"); +insert into t1 values(3, "dummy", "dummy"); +select * from t1; +select * from t1 where match(c2) against("富士山"); +select * from t1 where match(c3) against("富士山"); +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_utf8mb4.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_utf8mb4.test new file mode 100644 index 00000000000..d870affba4f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_utf8mb4.test @@ -0,0 +1,42 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES utf8mb4; +CREATE TABLE diaries ( + id INT PRIMARY KEY, + title VARCHAR(255) CHARSET utf8mb4 COLLATE utf8mb4_general_ci, + content TEXT CHARSET utf8mb4 COLLATE utf8mb4_general_ci, + FULLTEXT INDEX (content) +) DEFAULT CHARSET utf8mb4; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries VALUES(1, "Alphabet", "ABCDE"); +INSERT INTO diaries VALUES(2, "Mathmatics", "𝐀𝐁𝐂𝐃𝐄 | U+1D400-U+1D405"); +INSERT INTO diaries VALUES(3, "ひらがな", "あいうえお"); + +SELECT * + FROM diaries + WHERE MATCH (content) AGAINST("ABCDE" IN BOOLEAN MODE); + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_empty_query.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_empty_query.test new file mode 100644 index 00000000000..59a274f942c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_empty_query.test @@ -0,0 +1,41 @@ +# Copyright(C) 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 +# 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 diaries; +--enable_warnings + +SET NAMES UTF8; +CREATE TABLE diaries( + title TEXT, + FULLTEXT KEY (title) +) DEFAULT CHARSET=utf8; + +INSERT INTO diaries VALUES("Start groonga"); +INSERT INTO diaries VALUES("Start mroonga"); +INSERT INTO diaries VALUES("Start groonga and Ruby"); + +SELECT * FROM diaries; + +SELECT * + FROM diaries + WHERE MATCH(title) AGAINST(""); + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_found_rows.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_found_rows.test new file mode 100644 index 00000000000..4d899201fb3 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_found_rows.test @@ -0,0 +1,49 @@ +# Copyright(C) 2011 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES UTF8; +CREATE TABLE diaries ( + id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + year INT UNSIGNED, + month INT UNSIGNED, + day INT UNSIGNED, + title VARCHAR(255), + content TEXT, + FULLTEXT INDEX(content), + KEY(day) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気がよくてきれいに見える。"); +INSERT INTO diaries VALUES(4, 2011, 11, 11, "帰り道", "今日は天気がよくてよかった。"); +INSERT INTO diaries VALUES(5, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。"); +INSERT INTO diaries VALUES(6, 2011, 12, 2, "初雪", "今日の天気は雪!"); + +SELECT SQL_CALC_FOUND_ROWS * FROM diaries WHERE MATCH(content) AGAINST("今日 天気" IN BOOLEAN MODE) ORDER BY day LIMIT 0,5; + +SELECT FOUND_ROWS(); + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_groonga_varchar_vector.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_groonga_varchar_vector.test new file mode 100644 index 00000000000..19f82f644a6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_groonga_varchar_vector.test @@ -0,0 +1,47 @@ +# Copyright(C) 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 +# 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 +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP TABLE IF EXISTS bugs, tags; +--enable_warnings + +CREATE TABLE tags ( + name VARCHAR(64) PRIMARY KEY +) DEFAULT CHARSET=utf8 + COLLATE=utf8_bin + COMMENT='default_tokenizer "TokenDelimit"'; + +CREATE TABLE bugs ( + id INT UNSIGNED PRIMARY KEY, + tags VARCHAR(40) COMMENT 'type "tags", flags "COLUMN_VECTOR"', + FULLTEXT INDEX bugs_tags_index (tags) COMMENT 'table "tags"' +) DEFAULT CHARSET=utf8; + +INSERT INTO bugs (id, tags) VALUES (1, "Linux MySQL"); +INSERT INTO bugs (id, tags) VALUES (2, "MySQL groonga"); +INSERT INTO bugs (id, tags) VALUES (3, "mroonga"); + +SELECT * + FROM bugs + WHERE MATCH (tags) AGAINST ("MySQL" IN BOOLEAN MODE); + +DROP TABLE bugs, tags; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_index_recreate.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_index_recreate.test new file mode 100644 index 00000000000..a8d4780fee3 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_index_recreate.test @@ -0,0 +1,44 @@ +# Copyright(C) 2011 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/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists diaries; +--enable_warnings + +set names utf8; +create table diaries ( + id int primary key, + title varchar(255), + content text, + fulltext index (title) +) default charset utf8; +show create table diaries; +insert into diaries values(1, "Hello", "はじめました。"); +insert into diaries values(2, "天気", "明日の富士山の天気について"); +insert into diaries values(3, "富士山", "今日もきれい。"); +select * from diaries where match(title) against("富士山"); +drop index title on diaries; +--error ER_FT_MATCHING_KEY_NOT_FOUND +select * from diaries where match(title) against("富士山"); +select * from diaries; +create fulltext index new_title_index on diaries (title); +select * from diaries where match(title) against("富士山"); +select * from diaries; +drop table diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_insert_select.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_insert_select.test new file mode 100644 index 00000000000..641bbc3c4bd --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_insert_select.test @@ -0,0 +1,45 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# +# 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, t2, t3; +--enable_warnings + +create table t1 (c1 int primary key, c2 varchar(100), fulltext index(c2)) default charset utf8; +create table t2 (c1 int primary key, c2 text, fulltext index(c2)) default charset utf8; +insert into t1 values (1, "aa ii uu ee oo"); +insert into t1 values (2, "ka ki ku ke ko"); +insert into t1 values (3, "aa ii ii ii oo"); +insert into t1 values (4, "sa si su se so"); +insert into t1 values (5, "ta ti ii ii to"); +insert into t2 (c1,c2) select c1,c2 from t1; +select * from t1; +select * from t2; +select * from t1 where c1=3; +select * from t2 where c1=3; +select * from t1 where c1>3 order by c1 desc; +select * from t2 where c1>3 order by c1 asc; +select * from t1 where c2>"s" order by c2 desc; +select * from t2 where c2>"s" order by c1 asc; +select * from t1 where match(c2) against("ii") order by match(c2) against("ii") desc; +select * from t2 where match(c2) against("ii") order by match(c2) against("ii") asc; +select c1,c2,match(c2) against("ii") from t1 where match(c2) against("ii"); +select c1,c2,match(c2) against("ii") from t2 where match(c2) against("ii"); +drop table t1,t2; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_insert_values.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_insert_values.test new file mode 100644 index 00000000000..0b52448bc45 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_insert_values.test @@ -0,0 +1,33 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# +# 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, t2, t3; +--enable_warnings + +create table t1 (c1 int primary key, c2 text, fulltext index ft (c2)); +show create table t1; +insert into t1 values (1, "hoge hoge"); +insert into t1 values (2, "fuga fuga"); +insert into t1 values (3, "moge moge"); +select * from t1; +flush tables; +select * from t1; +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_column_index_delete.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_column_index_delete.test new file mode 100644 index 00000000000..9c083f57a80 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_column_index_delete.test @@ -0,0 +1,42 @@ +# Copyright(C) 2011 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/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists diaries; +--enable_warnings + +set names utf8; +create table diaries ( + id int primary key, + title varchar(255), + content text, + fulltext index (title, content), + fulltext index (title), + fulltext index (content) +) default charset utf8; +show create table diaries; +insert into diaries values(1, "Hello", "はじめました。"); +insert into diaries values(2, "天気", "明日の富士山の天気について"); +insert into diaries values(3, "富士山", "今日もきれい。"); +delete from diaries where id = 2; +select * from diaries where match(title, content) against("富士山"); +select * from diaries where match(title) against("富士山"); +select * from diaries where match(content) against("富士山"); +drop table diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_column_index_insert.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_column_index_insert.test new file mode 100644 index 00000000000..ce2c2714e31 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_column_index_insert.test @@ -0,0 +1,42 @@ +# Copyright(C) 2011 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/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists diaries; +--enable_warnings + +set names utf8; +create table diaries ( + id int primary key, + title varchar(255), + content text, + fulltext index (title, content), + fulltext index (title), + fulltext index (content) +) default charset utf8; +show create table diaries; +insert into diaries values(1, "Hello", "はじめました。"); +insert into diaries values(2, "天気", "明日の富士山の天気について"); +insert into diaries values(3, "富士山", "今日もきれい。"); +select * from diaries; +select * from diaries where match(title, content) against("富士山"); +select * from diaries where match(title) against("富士山"); +select * from diaries where match(content) against("富士山"); +drop table diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_column_index_recreate.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_column_index_recreate.test new file mode 100644 index 00000000000..ffee108932a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_column_index_recreate.test @@ -0,0 +1,50 @@ +# Copyright(C) 2011 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/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists diaries; +--enable_warnings + +set names utf8; +create table diaries ( + id int primary key, + title varchar(255), + content text, + fulltext index (title, content), + fulltext index (title), + fulltext index (content) +) default charset utf8; +show create table diaries; + +insert into diaries values(1, "Hello", "はじめました。"); +insert into diaries values(2, "天気", "明日の富士山の天気について"); +insert into diaries values(3, "富士山", "今日もきれい。"); +select * from diaries where match(title, content) against("富士山"); + +drop index title on diaries; +--error ER_FT_MATCHING_KEY_NOT_FOUND +select * from diaries where match(title, content) against("富士山"); + +create fulltext index new_title_content_index on diaries (title, content); +select * from diaries where match(title, content) against("富士山"); + +select * from diaries; + +drop table diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_column_index_update.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_column_index_update.test new file mode 100644 index 00000000000..e9e6aa2bb6e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_column_index_update.test @@ -0,0 +1,43 @@ +# Copyright(C) 2011 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/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists diaries; +--enable_warnings + +set names utf8; +create table diaries ( + id int primary key, + title varchar(255), + content text, + fulltext index (title, content), + fulltext index (title), + fulltext index (content) +) default charset utf8; +show create table diaries; +insert into diaries values(1, "Hello", "はじめました。"); +insert into diaries values(2, "天気", "明日の富士山の天気について"); +insert into diaries values(3, "富士山", "今日もきれい。"); +update diaries set title = "チョモランマ" where id = 3; +update diaries set content = "チョモランマと富士山" where id = 1; +select * from diaries where match(title, content) against("富士山"); +select * from diaries where match(title) against("富士山"); +select * from diaries where match(content) against("富士山"); +drop table diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_index.test new file mode 100644 index 00000000000..19fd4f8d3ba --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_index.test @@ -0,0 +1,47 @@ +# Copyright(C) 2011 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/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists diaries; +--enable_warnings + +create table diaries ( + id int primary key auto_increment, + title text, + body text, + fulltext index title_index (title), + fulltext index body_index (body) +) default charset utf8; +show create table diaries; + +insert into diaries (title, body) values ("survey", "will start groonga!"); +insert into diaries (title, body) values ("groonga (1)", "starting groonga..."); +insert into diaries (title, body) values ("groonga (2)", "started groonga."); + +select * from diaries + where match(title) against("survey") and + match(body) against("groonga"); + +select *, match(title) against("survey"), match(body) against("groonga") + from diaries + where match(title) against("survey") and + match(body) against("groonga"); + +drop table diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_no_primary_key.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_no_primary_key.test new file mode 100644 index 00000000000..7ef05efa3a5 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_no_primary_key.test @@ -0,0 +1,39 @@ +# Copyright(C) 2011 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES UTF8; +CREATE TABLE diaries ( + title VARCHAR(255), + content TEXT, + FULLTEXT INDEX (content) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries VALUES("Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES("天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES("富士山", "今日も天気がよくてきれいに見える。"); + +SELECT * FROM diaries WHERE MATCH(content) AGAINST("*D+ 今日 天気" IN BOOLEAN MODE); + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_not_match_against.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_not_match_against.test new file mode 100644 index 00000000000..7b4e62ba0a9 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_not_match_against.test @@ -0,0 +1,46 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# +# 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, t2, t3; +--enable_warnings + +# for "not match against" +create table t1 (c1 int primary key, c2 int, c3 text, fulltext index ft(c3)); +insert into t1 values(1,10,"aa ii uu ee oo"); +insert into t1 values(2,10,"ka ki ku ke ko"); +insert into t1 values(3,10,"aa ii uu ee oo"); +insert into t1 values(4,10,"ka ki ku ke ko"); +insert into t1 values(5,20,"aa ii uu ee oo"); +insert into t1 values(6,20,"ka ki ku ke ko"); +insert into t1 values(7,20,"aa ii uu ee oo"); +insert into t1 values(8,20,"ka ki ku ke ko"); +select * from t1; +select * from t1 where match(c3) against("uu"); +select * from t1 where not match(c3) against("uu"); +select * from t1 where match(c3) against("dummy"); +select * from t1 where not match(c3) against("dummy"); +select * from t1 where c1 = 4 and not match(c3) against("uu"); +select * from t1 where c1 <= 4 and not match(c3) against("uu"); +select * from t1 where c1 > 4 and not match(c3) against("uu"); +select * from t1 where c2 = 10 and not match(c3) against("uu"); +select * from t1 where c2 >= 15 and not match(c3) against("uu"); +select * from t1 where c2 < 15 and not match(c3) against("uu"); +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_or.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_or.test new file mode 100644 index 00000000000..2b0f3bbb15c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_or.test @@ -0,0 +1,42 @@ +# Copyright(C) 2012 Kouhei Sutou +# +# 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 diaries; +--enable_warnings + +SET NAMES UTF8; +CREATE TABLE diaries( + title TEXT, + FULLTEXT KEY (title) +) DEFAULT CHARSET=utf8; + +INSERT INTO diaries VALUES("Start groonga"); +INSERT INTO diaries VALUES("Start mroonga"); +INSERT INTO diaries VALUES("Start groonga and Ruby"); + +SELECT * FROM diaries; + +SELECT * + FROM diaries + WHERE MATCH(title) AGAINST("Ruby" IN BOOLEAN MODE) OR + MATCH(title) AGAINST("mroonga" IN BOOLEAN MODE); + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_different_against.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_different_against.test new file mode 100644 index 00000000000..f2859f99dba --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_different_against.test @@ -0,0 +1,42 @@ +# Copyright(C) 2012 Kouhei Sutou +# +# 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 diaries; +--enable_warnings + +SET NAMES UTF8; +CREATE TABLE diaries( + title TEXT, + FULLTEXT KEY (title) +) DEFAULT CHARSET=utf8; + +INSERT INTO diaries VALUES("Start groonga"); +INSERT INTO diaries VALUES("Start mroonga"); +INSERT INTO diaries VALUES("Start groonga and Ruby"); + +SELECT * FROM diaries; + +SELECT *, MATCH(title) AGAINST("groonga" IN BOOLEAN MODE) AS score + FROM diaries + WHERE MATCH(title) AGAINST("groonga mroonga" IN BOOLEAN MODE) + ORDER BY MATCH(title) AGAINST("groonga" IN BOOLEAN MODE); + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_different_match.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_different_match.test new file mode 100644 index 00000000000..dc97db87487 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_different_match.test @@ -0,0 +1,44 @@ +# Copyright(C) 2012 Kouhei Sutou +# +# 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 diaries; +--enable_warnings + +SET NAMES UTF8; +CREATE TABLE diaries( + title TEXT, + body TEXT, + FULLTEXT KEY (title), + FULLTEXT KEY (body) +) DEFAULT CHARSET=utf8; + +INSERT INTO diaries VALUES("Start groonga", "I read groonga's tutorial."); +INSERT INTO diaries VALUES("Start mroonga", "I read mroonga's tutorial."); +INSERT INTO diaries VALUES("Start groonga and Ruby", "I installed rroonga."); + +SELECT * FROM diaries; + +SELECT *, MATCH(body) AGAINST("groonga" IN BOOLEAN MODE) AS score + FROM diaries + WHERE MATCH(title) AGAINST("groonga" IN BOOLEAN MODE) + ORDER BY MATCH(body) AGAINST("groonga" IN BOOLEAN MODE); + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_no_where.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_no_where.test new file mode 100644 index 00000000000..50dd652e2d0 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_no_where.test @@ -0,0 +1,41 @@ +# Copyright(C) 2012 Kouhei Sutou +# +# 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 diaries; +--enable_warnings + +SET NAMES UTF8; +CREATE TABLE diaries( + title TEXT, + FULLTEXT KEY (title) +) DEFAULT CHARSET=utf8; + +INSERT INTO diaries VALUES("Start groonga"); +INSERT INTO diaries VALUES("Start mroonga"); +INSERT INTO diaries VALUES("Start groonga and Ruby"); + +SELECT * FROM diaries; + +SELECT *, MATCH(title) AGAINST("groonga" IN BOOLEAN MODE) AS score + FROM diaries + ORDER BY MATCH(title) AGAINST("groonga" IN BOOLEAN MODE); + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_same_match_against.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_same_match_against.test new file mode 100644 index 00000000000..0873849a1e7 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_same_match_against.test @@ -0,0 +1,42 @@ +# Copyright(C) 2012 Kouhei Sutou +# +# 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 diaries; +--enable_warnings + +SET NAMES UTF8; +CREATE TABLE diaries( + title TEXT, + FULLTEXT KEY (title) +) DEFAULT CHARSET=utf8; + +INSERT INTO diaries VALUES("Start groonga"); +INSERT INTO diaries VALUES("Start mroonga"); +INSERT INTO diaries VALUES("Start groonga and Ruby"); + +SELECT * FROM diaries; + +SELECT *, MATCH(title) AGAINST("groonga" IN BOOLEAN MODE) AS score + FROM diaries + WHERE MATCH(title) AGAINST("groonga" IN BOOLEAN MODE) + ORDER BY MATCH(title) AGAINST("groonga" IN BOOLEAN MODE); + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_parser_comment.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_parser_comment.test new file mode 100644 index 00000000000..24cc173485a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_parser_comment.test @@ -0,0 +1,38 @@ +# Copyright(C) 2011 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/mroonga/have_fulltext_index_comment.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists diaries; +--enable_warnings + +create table diaries ( + id int primary key auto_increment, + body text, + fulltext index body_index (body) + comment 'parser "TokenBigramSplitSymbolAlphaDigit"' +) default charset utf8; +show create table diaries; +insert into diaries (body) values ("will start groonga!"); +insert into diaries (body) values ("starting groonga..."); +insert into diaries (body) values ("started groonga."); +select * from diaries; +select * from diaries where match(body) against("start"); +drop table diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_parser_default.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_parser_default.test new file mode 100644 index 00000000000..1e08cc46221 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_parser_default.test @@ -0,0 +1,41 @@ +# Copyright(C) 2011 Kouhei Sutou <kou@clear-code.com> +# Copyright(C) 2014 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 diaries; +--enable_warnings + +set @mroonga_default_parser_backup=@@mroonga_default_parser; +set global mroonga_default_parser=TokenBigramSplitSymbolAlphaDigit; +create table diaries ( + id int primary key auto_increment, + body text, + fulltext index body_index (body) +) default charset utf8; +show create table diaries; +insert into diaries (body) values ("will start groonga!"); +insert into diaries (body) values ("starting groonga..."); +insert into diaries (body) values ("started groonga."); +insert into diaries (body) values ("finished groonga."); +select * from diaries; +select * from diaries where match(body) against("start"); +drop table diaries; +set global mroonga_default_parser=@mroonga_default_parser_backup; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_parser_off.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_parser_off.test new file mode 100644 index 00000000000..0dcf494c684 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_parser_off.test @@ -0,0 +1,48 @@ +# Copyright(C) 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 +# 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_fulltext_index_comment.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS variables; +--enable_warnings + +CREATE TABLE variables ( + id INT PRIMARY KEY AUTO_INCREMENT, + name TEXT, + FULLTEXT INDEX (name) COMMENT 'parser "off"' +) DEFAULT CHARSET=utf8; +SHOW CREATE TABLE variables; + +INSERT INTO variables (name) VALUES ("mroonga_database_path_prefix"); +INSERT INTO variables (name) VALUES ("mroonga_default_parser"); +INSERT INTO variables (name) VALUES ("mroonga_default_wrapper_engine"); +INSERT INTO variables (name) VALUES ("mroonga_dry_write"); +INSERT INTO variables (name) VALUES ("mroonga_enable_optimization"); +INSERT INTO variables (name) VALUES ("mroonga_libgroonga_version"); +INSERT INTO variables (name) VALUES ("mroonga_log_file"); +INSERT INTO variables (name) VALUES ("mroonga_log_level"); +INSERT INTO variables (name) VALUES ("mroonga_match_escalation_threshold"); +INSERT INTO variables (name) VALUES ("mroonga_version"); + +SELECT * FROM variables; +SELECT * FROM variables + WHERE MATCH (name) AGAINST ("mroonga_default*" IN BOOLEAN MODE); + +DROP TABLE variables; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_two_inner_join.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_two_inner_join.test new file mode 100644 index 00000000000..745720d1fe6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_two_inner_join.test @@ -0,0 +1,69 @@ +# 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS users, posts, comments; +--enable_warnings + +SET NAMES utf8; + +CREATE TABLE users ( + id int NOT NULL, + name varchar(50) NOT NULL, + PRIMARY KEY (id), + KEY (name) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +CREATE TABLE posts ( + id int NOT NULL, + content mediumtext, + user_id int NOT NULL, + PRIMARY KEY (id), + FULLTEXT KEY (content) +) DEFAULT CHARSET=utf8; + +CREATE TABLE comments ( + id int NOT NULL, + user_id int NOT NULL, + post_id int NOT NULL, + PRIMARY KEY (id) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +INSERT INTO users VALUES (1, "Alice"), + (2, "Bob"), + (3, "Calros"); +INSERT INTO posts VALUES (1, "Hello!", 1), + (2, "World!", 2), + (3, "Great!", 3); +INSERT INTO comments VALUES (1, 1, 1), + (2, 2, 1), + (3, 3, 3); + +SELECT * + FROM comments + INNER JOIN posts + ON posts.id = comments.post_id AND + MATCH (posts.content) AGAINST ("Hello!" IN BOOLEAN MODE) + INNER JOIN users + ON users.id = comments.user_id AND + users.name = "Alice"; + +DROP TABLE users, posts, comments; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_version_100_no_such_key.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_version_100_no_such_key.test new file mode 100644 index 00000000000..aab09c18b79 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_version_100_no_such_key.test @@ -0,0 +1,43 @@ +# Copyright(C) 2011-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 +# 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_version_100.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + body TEXT, + FULLTEXT INDEX title_index (title), + FULLTEXT INDEX body_index (body) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); +INSERT INTO diaries (title, body) VALUES ("groonga (1)", "starting groonga..."); +INSERT INTO diaries (title, body) VALUES ("groonga (2)", "started groonga."); + +-- error ER_FT_MATCHING_KEY_NOT_FOUND +SELECT * FROM diaries FORCE INDEX(primary) + WHERE MATCH(title) AGAINST("survey" IN BOOLEAN MODE); + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_version_55_no_such_key.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_version_55_no_such_key.test new file mode 100644 index 00000000000..d447b1f85dc --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_version_55_no_such_key.test @@ -0,0 +1,42 @@ +# Copyright(C) 2011-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 +# 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_version_55.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + body TEXT, + FULLTEXT INDEX title_index (title), + FULLTEXT INDEX body_index (body) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); +INSERT INTO diaries (title, body) VALUES ("groonga (1)", "starting groonga..."); +INSERT INTO diaries (title, body) VALUES ("groonga (2)", "started groonga."); + +SELECT * FROM diaries FORCE INDEX(primary) + WHERE MATCH(title) AGAINST("survey" IN BOOLEAN MODE); + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_version_56_no_such_key.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_version_56_no_such_key.test new file mode 100644 index 00000000000..1187b189244 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_version_56_no_such_key.test @@ -0,0 +1,43 @@ +# Copyright(C) 2011-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 +# 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_version_56.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + body TEXT, + FULLTEXT INDEX title_index (title), + FULLTEXT INDEX body_index (body) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); +INSERT INTO diaries (title, body) VALUES ("groonga (1)", "starting groonga..."); +INSERT INTO diaries (title, body) VALUES ("groonga (2)", "started groonga."); + +-- error ER_FT_MATCHING_KEY_NOT_FOUND +SELECT * FROM diaries FORCE INDEX(primary) + WHERE MATCH(title) AGAINST("survey" IN BOOLEAN MODE); + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_command_select.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_command_select.test new file mode 100644 index 00000000000..f1a1777d92b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_command_select.test @@ -0,0 +1,41 @@ +# Copyright(C) 2013 Kouhei Sutou <kou@clear-code.com> +# 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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES UTF8; +CREATE TABLE diaries( + title TEXT, + FULLTEXT KEY (title) +) DEFAULT CHARSET=utf8; + +INSERT INTO diaries VALUES("Start groonga"); +INSERT INTO diaries VALUES("Start mroonga"); +INSERT INTO diaries VALUES("Start groonga and Ruby"); + +SELECT mroonga_command('select diaries --match_columns "title" --query "groonga"'); + +DROP TABLE diaries; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_error_query_is_missing.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_error_query_is_missing.test new file mode 100644 index 00000000000..a37e601e92d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_error_query_is_missing.test @@ -0,0 +1,27 @@ +# Copyright(C) 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 +# 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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SET NAMES UTF8; + +-- error ER_CANT_INITIALIZE_UDF +SELECT mroonga_escape() AS escaped_query; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_error_query_is_not_string.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_error_query_is_not_string.test new file mode 100644 index 00000000000..683efb7e25c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_error_query_is_not_string.test @@ -0,0 +1,27 @@ +# Copyright(C) 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 +# 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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SET NAMES UTF8; + +-- error ER_CANT_INITIALIZE_UDF +SELECT mroonga_escape(29) AS escaped_query; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_error_target_characters_is_not_string.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_error_target_characters_is_not_string.test new file mode 100644 index 00000000000..5e04ae2a615 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_error_target_characters_is_not_string.test @@ -0,0 +1,27 @@ +# Copyright(C) 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 +# 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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SET NAMES UTF8; + +-- error ER_CANT_INITIALIZE_UDF +SELECT mroonga_escape('+-><~*()\"\\:', 29) AS escaped_query; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_success_all.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_success_all.test new file mode 100644 index 00000000000..6d328fa8434 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_success_all.test @@ -0,0 +1,26 @@ +# Copyright(C) 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 +# 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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SET NAMES UTF8; + +SELECT mroonga_escape('+-><~*()\"\\:') AS escaped_query; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_success_custom.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_success_custom.test new file mode 100644 index 00000000000..2ad633b43f0 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_success_custom.test @@ -0,0 +1,26 @@ +# Copyright(C) 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 +# 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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SET NAMES UTF8; + +SELECT mroonga_escape('+-><~*()\"\\:', '()<>~') AS escaped_query; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_success_nested.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_success_nested.test new file mode 100644 index 00000000000..82f7410d909 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_success_nested.test @@ -0,0 +1,40 @@ +# Copyright(C) 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 +# 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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES UTF8; +CREATE TABLE diaries( + title TEXT, + FULLTEXT KEY (title) +) DEFAULT CHARSET=utf8; + +INSERT INTO diaries VALUES("Start groonga"); +INSERT INTO diaries VALUES("Start mroonga"); +INSERT INTO diaries VALUES("Start groonga and Ruby"); + +SELECT mroonga_escape(mroonga_escape('*groonga*')); + +DROP TABLE diaries; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_last_insert_grn_id.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_last_insert_grn_id.test new file mode 100644 index 00000000000..ef6b0077976 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_last_insert_grn_id.test @@ -0,0 +1,48 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# Copyright(C) 2013 Kentoku SHIBA +# Copyright(C) 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 +# 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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +drop table if exists t1, t2, t3; +--enable_warnings + +create table t1 (_id int, c1 int); +select last_insert_grn_id(); +insert into t1 values(null,100); +insert into t1 values(null,100); +select last_insert_grn_id(); +insert into t1 values(null,100); +insert into t1 values(null,100); +select last_insert_grn_id(); +insert into t1 values(null,100); +insert into t1 values(null,100); +select last_insert_grn_id(); +insert into t1 values(null,100); +insert into t1 values(null,100); +select last_insert_grn_id(); + +--error ER_CANT_INITIALIZE_UDF +select last_insert_grn_id(1); + +drop table t1; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_last_insert_id_reference.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_last_insert_id_reference.test new file mode 100644 index 00000000000..a515757ab55 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_last_insert_id_reference.test @@ -0,0 +1,35 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ids; +--enable_warnings + +CREATE TABLE ids ( + id int AUTO_INCREMENT PRIMARY KEY +); + +SELECT last_insert_id(); + +INSERT INTO ids VALUES(); +SELECT last_insert_id(); +SELECT * FROM ids; + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_last_insert_id_set.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_last_insert_id_set.test new file mode 100644 index 00000000000..2eb75ac3b60 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_last_insert_id_set.test @@ -0,0 +1,37 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ids; +--enable_warnings + +CREATE TABLE ids ( + id int AUTO_INCREMENT PRIMARY KEY +); + +SELECT last_insert_id(); +SELECT last_insert_id(10); +SELECT last_insert_id(); + +INSERT INTO ids VALUES(); +SELECT last_insert_id(); +SELECT * FROM ids; + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_ascii.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_ascii.test new file mode 100644 index 00000000000..f273a38c13a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_ascii.test @@ -0,0 +1,43 @@ +# Copyright(C) 2012-2013 Kentoku SHIBA +# Copyright(C) 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 +# 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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +drop table if exists t1, t2, t3; +--enable_warnings + +create table t1 (c1 int primary key, c2 int, c3 text, fulltext index ft(c3)); +insert into t1 values(1,10,"aa bb cc dd ee >< ff gg hh ii jj kk ll mm nn"); +insert into t1 values(2,20,"nn mm ll kk jj >< ii hh gg ff ee dd cc bb aa"); +insert into t1 values(3,30,"cc dd ee ff gg >< hh ii jj kk ll mm nn oo pp"); +insert into t1 values(4,40,"ee ff gg hh ii >< jj kk ll mm nn oo pp qq rr"); +insert into t1 values(5,50,"AA BB CC DD EE >< FF GG HH II JJ KK LL MM NN"); +select c1, c2, mroonga_snippet(c3, 10, 2, 'ascii_general_ci', 0, 1, '...', '...<br>\n', 'bb', '<span class="w1">', '</span>', 'ff', '<span class="w2">', '</span>', 'dd', '<span class="w3">', '</span>') from t1; +select c1, c2, mroonga_snippet(c3, 10, 2, 'ascii_bin', 0, 1, '...', '...<br>\n', 'bb', '<span class="w1">', '</span>', 'ff', '<span class="w2">', '</span>', 'dd', '<span class="w3">', '</span>') from t1; +select c1, c2, mroonga_snippet(c3, 10, 2, 'ascii_general_ci', 1, 1, '...', '...<br>\n', 'bb', '<span class="w1">', '</span>', 'ff', '<span class="w2">', '</span>', 'dd', '<span class="w3">', '</span>') from t1; +select c1, c2, mroonga_snippet(c3, 10, 2, 'ascii_bin', 1, 1, '...', '...<br>\n', 'bb', '<span class="w1">', '</span>', 'ff', '<span class="w2">', '</span>', 'dd', '<span class="w3">', '</span>') from t1; +select c1, c2, mroonga_snippet(c3, 10, 2, 'ascii_general_ci', 0, 0, '...', '...\n', 'bb', '(w1)[', ']', 'ff', '(w2)[', ']', 'dd', '(w3)[', ']') from t1; +select c1, c2, mroonga_snippet(c3, 10, 2, 'ascii_bin', 0, 0, '...', '...\n', 'bb', '(w1)[', ']', 'ff', '(w2)[', ']', 'dd', '(w3)[', ']') from t1; +select c1, c2, mroonga_snippet(c3, 10, 2, 'ascii_general_ci', 1, 0, '...', '...\n', 'bb', '(w1)[', ']', 'ff', '(w2)[', ']', 'dd', '(w3)[', ']') from t1; +select c1, c2, mroonga_snippet(c3, 10, 2, 'ascii_bin', 1, 0, '...', '...\n', 'bb', '(w1)[', ']', 'ff', '(w2)[', ']', 'dd', '(w3)[', ']') from t1; +drop table t1; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_cp932.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_cp932.test new file mode 100644 index 00000000000..eb67245e7c0 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_cp932.test @@ -0,0 +1,43 @@ +# Copyright(C) 2012-2013 Kentoku SHIBA +# Copyright(C) 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 +# 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/not_embedded.inc +--source include/have_cp932.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +drop table if exists t1, t2, t3; +--enable_warnings + +set names cp932; +create table t1 (c1 int primary key, c2 varchar(255), c3 text, fulltext index(c2), fulltext index(c3)) default charset cp932; +insert into t1 values(1, "","QX̕xmR̓VCɂ"); +insert into t1 values(2, "","QX̕xmR̓VC͕܂"); +insert into t1 values(3, "","29̕xmR̓VCɂ"); +select c1, c2, mroonga_snippet(c3, 10, 2, 'cp932_japanese_ci', 0, 1, '...', '...<br>\n', 'QX', '<span class="w1">', '</span>', 'VC', '<span class="w2">', '</span>', 'xmR', '<span class="w3">', '</span>') from t1; +select c1, c2, mroonga_snippet(c3, 10, 2, 'cp932_bin', 0, 1, '...', '...<br>\n', 'QX', '<span class="w1">', '</span>', 'VC', '<span class="w2">', '</span>', 'xmR', '<span class="w3">', '</span>') from t1; +select c1, c2, mroonga_snippet(c3, 10, 2, 'cp932_japanese_ci', 1, 1, '...', '...<br>\n', 'QX', '<span class="w1">', '</span>', 'VC', '<span class="w2">', '</span>', 'xmR', '<span class="w3">', '</span>') from t1; +select c1, c2, mroonga_snippet(c3, 10, 2, 'cp932_bin', 1, 1, '...', '...<br>\n', 'QX', '<span class="w1">', '</span>', 'VC', '<span class="w2">', '</span>', 'xmR', '<span class="w3">', '</span>') from t1; +select c1, c2, mroonga_snippet(c3, 10, 2, 'cp932_japanese_ci', 0, 0, '...', '...\n', 'QX', '(w1)[', ']', 'VC', '(w2)[', ']', 'xmR', '(w3)[', ']') from t1; +select c1, c2, mroonga_snippet(c3, 10, 2, 'cp932_bin', 0, 0, '...', '...\n', 'QX', '(w1)[', ']', 'VC', '(w2)[', ']', 'xmR', '(w3)[', ']') from t1; +select c1, c2, mroonga_snippet(c3, 10, 2, 'cp932_japanese_ci', 1, 0, '...', '...\n', 'QX', '(w1)[', ']', 'VC', '(w2)[', ']', 'xmR', '(w3)[', ']') from t1; +select c1, c2, mroonga_snippet(c3, 10, 2, 'cp932_bin', 1, 0, '...', '...\n', 'QX', '(w1)[', ']', 'VC', '(w2)[', ']', 'xmR', '(w3)[', ']') from t1; +drop table t1; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_eucjpms.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_eucjpms.test new file mode 100644 index 00000000000..8864d6adffc --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_eucjpms.test @@ -0,0 +1,43 @@ +# Copyright(C) 2012-2013 Kentoku SHIBA +# Copyright(C) 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 +# 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/not_embedded.inc +--source include/have_eucjpms.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +drop table if exists t1, t2, t3; +--enable_warnings + +set names eucjpms; +create table t1 (c1 int primary key, c2 varchar(255), c3 text, fulltext index(c2), fulltext index(c3)) default charset eucjpms; +insert into t1 values(1, "","ٻλŷˤĤ"); +insert into t1 values(2, "","ٻλŷʬޤ"); +insert into t1 values(3, "","29ٻλŷˤĤ"); +select c1, c2, mroonga_snippet(c3, 10, 2, 'eucjpms_japanese_ci', 0, 1, '...', '...<br>\n', '', '<span class="w1">', '</span>', 'ŷ', '<span class="w2">', '</span>', 'ٻλ', '<span class="w3">', '</span>') from t1; +select c1, c2, mroonga_snippet(c3, 10, 2, 'eucjpms_bin', 0, 1, '...', '...<br>\n', '', '<span class="w1">', '</span>', 'ŷ', '<span class="w2">', '</span>', 'ٻλ', '<span class="w3">', '</span>') from t1; +select c1, c2, mroonga_snippet(c3, 10, 2, 'eucjpms_japanese_ci', 1, 1, '...', '...<br>\n', '', '<span class="w1">', '</span>', 'ŷ', '<span class="w2">', '</span>', 'ٻλ', '<span class="w3">', '</span>') from t1; +select c1, c2, mroonga_snippet(c3, 10, 2, 'eucjpms_bin', 1, 1, '...', '...<br>\n', '', '<span class="w1">', '</span>', 'ŷ', '<span class="w2">', '</span>', 'ٻλ', '<span class="w3">', '</span>') from t1; +select c1, c2, mroonga_snippet(c3, 10, 2, 'eucjpms_japanese_ci', 0, 0, '...', '...\n', '', '(w1)[', ']', 'ŷ', '(w2)[', ']', 'ٻλ', '(w3)[', ']') from t1; +select c1, c2, mroonga_snippet(c3, 10, 2, 'eucjpms_bin', 0, 0, '...', '...\n', '', '(w1)[', ']', 'ŷ', '(w2)[', ']', 'ٻλ', '(w3)[', ']') from t1; +select c1, c2, mroonga_snippet(c3, 10, 2, 'eucjpms_japanese_ci', 1, 0, '...', '...\n', '', '(w1)[', ']', 'ŷ', '(w2)[', ']', 'ٻλ', '(w3)[', ']') from t1; +select c1, c2, mroonga_snippet(c3, 10, 2, 'eucjpms_bin', 1, 0, '...', '...\n', '', '(w1)[', ']', 'ŷ', '(w2)[', ']', 'ٻλ', '(w3)[', ']') from t1; +drop table t1; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_invalid_nonexistent_charset.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_invalid_nonexistent_charset.test new file mode 100644 index 00000000000..bf6b4df5871 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_invalid_nonexistent_charset.test @@ -0,0 +1,28 @@ +# Copyright(C) 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 +# 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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SET NAMES UTF8; + +--error ER_CANT_INITIALIZE_UDF +SELECT mroonga_snippet("Invalid charset test", 10, 2, "nonexistent_charset", + 1, 0, "...", "...", "charset", "<", ">"); + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_invalid_unsupported_charset.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_invalid_unsupported_charset.test new file mode 100644 index 00000000000..451737c900c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_invalid_unsupported_charset.test @@ -0,0 +1,28 @@ +# Copyright(C) 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 +# 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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SET NAMES UTF8; + +--error ER_CANT_INITIALIZE_UDF +SELECT mroonga_snippet("Unsuppported charset test", 10, 2, "big5", + 1, 0, "...", "...", "charset", "<", ">"); + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_japanese.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_japanese.test new file mode 100644 index 00000000000..354d5f5a2d6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_japanese.test @@ -0,0 +1,41 @@ +# Copyright(C) 2012-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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +drop table if exists t1, t2, t3; +--enable_warnings + +set names utf8; +create table t1 (c1 int primary key, c2 varchar(255), c3 text, fulltext index(c2), fulltext index(c3)) default charset utf8; +insert into t1 values(1, "あああああ","29日の富士山の天気について"); +insert into t1 values(2, "いいいいい","29日の富士山の天気は分かりません"); +insert into t1 values(3, "ううううう","29日の富士山の天気について"); +select c1, c2, mroonga_snippet(c3, 10, 2, 'utf8_general_ci', 0, 1, '...', '...<br>\n', '29日', '<span class="w1">', '</span>', '天気', '<span class="w2">', '</span>', '富士山', '<span class="w3">', '</span>') from t1; +select c1, c2, mroonga_snippet(c3, 10, 2, 'utf8_bin', 0, 1, '...', '...<br>\n', '29日', '<span class="w1">', '</span>', '天気', '<span class="w2">', '</span>', '富士山', '<span class="w3">', '</span>') from t1; +select c1, c2, mroonga_snippet(c3, 10, 2, 'utf8_general_ci', 1, 1, '...', '...<br>\n', '29日', '<span class="w1">', '</span>', '天気', '<span class="w2">', '</span>', '富士山', '<span class="w3">', '</span>') from t1; +select c1, c2, mroonga_snippet(c3, 10, 2, 'utf8_bin', 1, 1, '...', '...<br>\n', '29日', '<span class="w1">', '</span>', '天気', '<span class="w2">', '</span>', '富士山', '<span class="w3">', '</span>') from t1; +select c1, c2, mroonga_snippet(c3, 10, 2, 'utf8_general_ci', 0, 0, '...', '...\n', '29日', '(w1)[', ']', '天気', '(w2)[', ']', '富士山', '(w3)[', ']') from t1; +select c1, c2, mroonga_snippet(c3, 10, 2, 'utf8_bin', 0, 0, '...', '...\n', '29日', '(w1)[', ']', '天気', '(w2)[', ']', '富士山', '(w3)[', ']') from t1; +select c1, c2, mroonga_snippet(c3, 10, 2, 'utf8_general_ci', 1, 0, '...', '...\n', '29日', '(w1)[', ']', '天気', '(w2)[', ']', '富士山', '(w3)[', ']') from t1; +select c1, c2, mroonga_snippet(c3, 10, 2, 'utf8_bin', 1, 0, '...', '...\n', '29日', '(w1)[', ']', '天気', '(w2)[', ']', '富士山', '(w3)[', ']') from t1; +drop table t1; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/geometry_bulk_insert_null.test b/storage/mroonga/mysql-test/mroonga/storage/t/geometry_bulk_insert_null.test new file mode 100644 index 00000000000..39462257f9d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/geometry_bulk_insert_null.test @@ -0,0 +1,34 @@ +# Copyright(C) 2014 Kenji Maruyama <mmmaru777@gmail.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_geometry.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS shops; +--enable_warnings + +CREATE TABLE shops ( + location GEOMETRY NOT NULL +); + +INSERT INTO shops VALUES (NULL), (NULL); + +SELECT AsText(location) FROM shops; + +DROP TABLE shops; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/geometry_contains.test b/storage/mroonga/mysql-test/mroonga/storage/t/geometry_contains.test new file mode 100644 index 00000000000..c8ec649f181 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/geometry_contains.test @@ -0,0 +1,148 @@ +# Copyright(C) 2011-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_geometry.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS shops; +--enable_warnings + +CREATE TABLE shops ( + id INT PRIMARY KEY AUTO_INCREMENT, + name TEXT, + location GEOMETRY NOT NULL, + SPATIAL KEY location_index (location) +); +SHOW CREATE TABLE shops; + +INSERT INTO shops (name, location) + VALUES ('nezu-no-taiyaki', + GeomFromText('POINT(139.762573 35.720253)')); +INSERT INTO shops (name, location) + VALUES ('taiyaki-kataoka', + GeomFromText('POINT(139.715591 35.712521)')); +INSERT INTO shops (name, location) + VALUES ('soba-taiyaki-ku', + GeomFromText('POINT(139.659088 35.683712)')); +INSERT INTO shops (name, location) + VALUES ('kuruma', + GeomFromText('POINT(139.706207 35.721516)')); +INSERT INTO shops (name, location) + VALUES ('hirose-ya', + GeomFromText('POINT(139.685608 35.714844)')); +INSERT INTO shops (name, location) + VALUES ('sazare', + GeomFromText('POINT(139.685043 35.714653)')); +INSERT INTO shops (name, location) + VALUES ('omede-taiyaki', + GeomFromText('POINT(139.817154 35.700516)')); +INSERT INTO shops (name, location) + VALUES ('onaga-ya', + GeomFromText('POINT(139.81105 35.698254)')); +INSERT INTO shops (name, location) + VALUES ('shiro-ya', + GeomFromText('POINT(139.638611 35.705517)')); +INSERT INTO shops (name, location) + VALUES ('fuji-ya', + GeomFromText('POINT(139.637115 35.703938)')); +INSERT INTO shops (name, location) + VALUES ('miyoshi', + GeomFromText('POINT(139.537323 35.644539)')); +INSERT INTO shops (name, location) + VALUES ('juju-ya', + GeomFromText('POINT(139.695755 35.628922)')); +INSERT INTO shops (name, location) + VALUES ('tatsumi-ya', + GeomFromText('POINT(139.638657 35.665501)')); +INSERT INTO shops (name, location) + VALUES ('tetsuji', + GeomFromText('POINT(139.76857 35.680912)')); +INSERT INTO shops (name, location) + VALUES ('gazuma-ya', + GeomFromText('POINT(139.647598 35.700817)')); +INSERT INTO shops (name, location) + VALUES ('honma-mon', + GeomFromText('POINT(139.652573 35.722736)')); +INSERT INTO shops (name, location) + VALUES ('naniwa-ya', + GeomFromText('POINT(139.796234 35.730061)')); +INSERT INTO shops (name, location) + VALUES ('kuro-dai', + GeomFromText('POINT(139.704834 35.650345)')); +INSERT INTO shops (name, location) + VALUES ('daruma', + GeomFromText('POINT(139.770599 35.681461)')); +INSERT INTO shops (name, location) + VALUES ('yanagi-ya', + GeomFromText('POINT(139.783981 35.685341)')); +INSERT INTO shops (name, location) + VALUES ('sharaku', + GeomFromText('POINT(139.794846 35.716969)')); +INSERT INTO shops (name, location) + VALUES ('takane', + GeomFromText('POINT(139.560913 35.698601)')); +INSERT INTO shops (name, location) + VALUES ('chiyoda', + GeomFromText('POINT(139.652817 35.642601)')); +INSERT INTO shops (name, location) + VALUES ('da-ka-po', + GeomFromText('POINT(139.727356 35.627346)')); +INSERT INTO shops (name, location) + VALUES ('matsushima-ya', + GeomFromText('POINT(139.737381 35.640556)')); +INSERT INTO shops (name, location) + VALUES ('kazuya', + GeomFromText('POINT(139.760895 35.673508)')); +INSERT INTO shops (name, location) + VALUES ('furuya-kogane-an', + GeomFromText('POINT(139.676071 35.680603)')); +INSERT INTO shops (name, location) + VALUES ('hachi-no-ie', + GeomFromText('POINT(139.668106 35.608021)')); +INSERT INTO shops (name, location) + VALUES ('azuki-chan', + GeomFromText('POINT(139.673203 35.64151)')); +INSERT INTO shops (name, location) + VALUES ('kuriko-an', + GeomFromText('POINT(139.796829 35.712013)')); +INSERT INTO shops (name, location) + VALUES ('yume-no-aru-machi-no-taiyaki-ya-san', + GeomFromText('POINT(139.712524 35.616199)')); +INSERT INTO shops (name, location) + VALUES ('naze-ya', + GeomFromText('POINT(139.665833 35.609039)')); +INSERT INTO shops (name, location) + VALUES ('sanoki-ya', + GeomFromText('POINT(139.770721 35.66592)')); +INSERT INTO shops (name, location) + VALUES ('shigeta', + GeomFromText('POINT(139.780273 35.672626)')); +INSERT INTO shops (name, location) + VALUES ('nishimi-ya', + GeomFromText('POINT(139.774628 35.671825)')); +INSERT INTO shops (name, location) + VALUES ('hiiragi', + GeomFromText('POINT(139.711517 35.647701)')); + +SELECT id, name, AsText(location) AS location_text FROM shops; +SELECT id, name, AsText(location) AS location_text FROM shops + WHERE MBRContains(GeomFromText('LineString(139.7727 35.6684, 139.7038 35.7121)'), location) + ORDER BY id; + +DROP TABLE shops; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_btree_equal_datetime.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_btree_equal_datetime.test new file mode 100644 index 00000000000..2fd1fa7471c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_btree_equal_datetime.test @@ -0,0 +1,44 @@ +# Copyright(C) 2012 Kentoku SHIBA +# Copyright(C) 2012 Kouhei Sutou <kou@clear-code.com> +# Copyright(C) 2014 Kenji Maruyama <mmmaru777@gmail.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/mroonga/have_64bit.inc +--source ../../include/mroonga/skip_freebsd.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE diaries ( + created_at datetime, + title varchar(256), + KEY created_at_key(created_at) +) DEFAULT CHARSET=utf8; + +INSERT INTO diaries VALUES ("1000-01-01 00:00:00", "The start"); +INSERT INTO diaries VALUES ("2012-10-25 16:18:29", "Today is shiny day."); +INSERT INTO diaries VALUES ("9999-12-31 23:59:59", "The end"); + +SELECT * + FROM diaries FORCE INDEX(created_at_key) + WHERE created_at = "2012-10-25 16:18:29"; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_btree_equal_time.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_btree_equal_time.test new file mode 100644 index 00000000000..51737fcf375 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_btree_equal_time.test @@ -0,0 +1,40 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS timer; +--enable_warnings + +CREATE TABLE timer ( + id int PRIMARY KEY, + elapsed time, + KEY elapsed_key(elapsed) +); + +INSERT INTO timer VALUES (1, "00:00:00"); +INSERT INTO timer VALUES (2, "15:11:12"); +INSERT INTO timer VALUES (3, "838:59:59"); +INSERT INTO timer VALUES (4, "-838:59:59"); + +SELECT * + FROM timer FORCE INDEX(elapsed_key) + WHERE elapsed = "-838:59:59"; + +DROP TABLE timer; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_btree_equal_timestamp.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_btree_equal_timestamp.test new file mode 100644 index 00000000000..f8848ce196d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_btree_equal_timestamp.test @@ -0,0 +1,40 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE diaries ( + created_at timestamp, + title varchar(256), + KEY created_at_key(created_at) +) DEFAULT CHARSET=utf8; + +INSERT INTO diaries VALUES ("1970-01-01 12:00:00", "The start"); +INSERT INTO diaries VALUES ("2012-10-05 16:18:29", "Today is shiny day."); +INSERT INTO diaries VALUES ("2038-01-18 15:14:07", "The end"); + +SELECT * + FROM diaries FORCE INDEX(created_at_key) + WHERE created_at = "2012-10-05 16:18:29"; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_btree_normal_column_insert.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_btree_normal_column_insert.test new file mode 100644 index 00000000000..0215807b9db --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_btree_normal_column_insert.test @@ -0,0 +1,33 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# +# 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, t2, t3; +--enable_warnings + +create table t1 (c1 int primary key, c2 int, index using btree (c2)); +show create table t1; +insert into t1 values (1, 100); +insert into t1 values (2, 101); +insert into t1 values (3, 102); +select * from t1; +flush tables; +select * from t1; +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_id_normal.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_id_normal.test new file mode 100644 index 00000000000..29a937054a2 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_id_normal.test @@ -0,0 +1,33 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# +# 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, t2, t3; +--enable_warnings + +create table t1 (_id int, a int, key (_id) using hash); +insert into t1 values(null, 100); +insert into t1 values(null, 100); +insert into t1 values(null, 100); +insert into t1 values(null, 100); +select * from t1; +select * from t1 where _id = 2; +select * from t1 where _id = 20; +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_id_primary.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_id_primary.test new file mode 100644 index 00000000000..60ca970aa45 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_id_primary.test @@ -0,0 +1,35 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# +# 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, t2, t3; +--enable_warnings + +create table t1 (_id int, a int, primary key (_id) using hash); +--error ER_BAD_NULL_ERROR +insert into t1 values(null, 100); +insert into t1 values(1,100); +insert into t1 values(1,100); +insert into t1 values(1,100); +insert into t1 values(1,100); +select * from t1; +select * from t1 where _id = 2; +select * from t1 where _id = 20; +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_id_unique.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_id_unique.test new file mode 100644 index 00000000000..28922bc3644 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_id_unique.test @@ -0,0 +1,33 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# +# 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, t2, t3; +--enable_warnings + +create table t1 (_id int, a int, unique key (_id) using hash); +insert into t1 values(null, 100); +insert into t1 values(null, 100); +insert into t1 values(null, 100); +insert into t1 values(null, 100); +select * from t1; +select * from t1 where _id = 2; +select * from t1 where _id = 20; +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_normal_column_insert.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_normal_column_insert.test new file mode 100644 index 00000000000..5138c6c9698 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_normal_column_insert.test @@ -0,0 +1,33 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# +# 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, t2, t3; +--enable_warnings + +create table t1 (c1 int primary key, c2 int, index using hash (c2)); +show create table t1; +insert into t1 values (1, 100); +insert into t1 values (2, 101); +insert into t1 values (3, 102); +select * from t1; +flush tables; +select * from t1; +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_delete.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_delete.test new file mode 100644 index 00000000000..f39ead56541 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_delete.test @@ -0,0 +1,40 @@ +# Copyright(C) 2011 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/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists listing; +--enable_warnings + +set names utf8; +create table scores ( + id int primary key auto_increment not null, + name char(30) not null, + score int not null, + index property (name, score) +) default charset utf8; +show create table scores; +insert into scores (name, score) values("Taro Yamada", 29); +insert into scores (name, score) values("Taro Yamada", -12); +insert into scores (name, score) values("Jiro Yamada", 27); +insert into scores (name, score) values("Taro Yamada", 10); +select * from scores; +delete from scores where name = "Taro Yamada" and score = 10; +select * from scores where name = "Taro Yamada" and (score >= -12 and score < 29); +drop table scores; + +--source ../../include/mroonga/have_mroonga_deinit.inc 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 diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_unsigned_bigint.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_unsigned_bigint.test new file mode 100644 index 00000000000..9c9f3dfc283 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_unsigned_bigint.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 BIGINT UNSIGNED, + c2 BIGINT UNSIGNED, + 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 diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_unsigned_int.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_unsigned_int.test new file mode 100644 index 00000000000..c78aec6d6e0 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_unsigned_int.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 INT UNSIGNED, + c2 INT UNSIGNED, + 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 diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_unsigned_smallint.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_unsigned_smallint.test new file mode 100644 index 00000000000..0b9b7dd3a3c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_unsigned_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 UNSIGNED, + c2 SMALLINT UNSIGNED, + 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 diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_varchar.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_varchar.test new file mode 100644 index 00000000000..2307c490fda --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_varchar.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 VARCHAR(10), + c2 VARCHAR(10), + KEY idx1(c1, c2) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE t1; + +INSERT INTO t1 (c1, c2) VALUES + ('1999', '12'), + ('2000', '11'), + ('2001', '10'), + ('2002', '09'), + ('2003', '08'), + ('2004', '07'), + ('2005', '06'), + ('2006', '05'), + ('2007', '04'), + ('2008', '03'), + ('2009', '02'), + ('2010', '01'); + +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 diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_delete.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_delete.test new file mode 100644 index 00000000000..75e77b597e0 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_delete.test @@ -0,0 +1,39 @@ +# Copyright(C) 2011 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/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists listing; +--enable_warnings + +set names utf8; +create table scores ( + name char(30) not null, + score int not null, + primary key (name, score) +) default charset utf8; +show create table scores; +insert into scores (name, score) values("Taro Yamada", 29); +insert into scores (name, score) values("Taro Yamada", -12); +insert into scores (name, score) values("Jiro Yamada", 27); +insert into scores (name, score) values("Taro Yamada", 10); +select * from scores; +delete from scores where name = "Taro Yamada" and score = 10; +select * from scores where name = "Taro Yamada" and (score >= -12 and score < 29); +drop table scores; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_select_int.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_select_int.test new file mode 100644 index 00000000000..0b3a7362c0e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_select_int.test @@ -0,0 +1,40 @@ +# Copyright(C) 2011 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/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists listing; +--enable_warnings + +set names utf8; +create table scores ( + name char(30) not null, + score int not null, + primary key (name, score) +) default charset utf8; +show create table scores; +insert into scores (name, score) values("Taro Yamada", 29); +insert into scores (name, score) values("Taro Yamada", -12); +insert into scores (name, score) values("Jiro Yamada", 27); +insert into scores (name, score) values("Taro Yamada", 10); +select * from scores; +select * from scores where name = "Taro Yamada"; +select * from scores where name = "Taro Yamada" and score = 29; +select * from scores where name = "Taro Yamada" and (score >= -12 and score < 29); +drop table scores; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_update.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_update.test new file mode 100644 index 00000000000..26c76dd5207 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_update.test @@ -0,0 +1,39 @@ +# Copyright(C) 2011 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/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists listing; +--enable_warnings + +set names utf8; +create table scores ( + name char(30) not null, + score int not null, + primary key (name, score) +) default charset utf8; +show create table scores; +insert into scores (name, score) values("Taro Yamada", 29); +insert into scores (name, score) values("Taro Yamada", -12); +insert into scores (name, score) values("Jiro Yamada", 27); +insert into scores (name, score) values("Taro Yamada", 10); +select * from scores; +update scores set name = "Taro Yamada" where name = "Jiro Yamada" and score = 27; +select * from scores where name = "Taro Yamada" and (score >= -12 and score < 29); +drop table scores; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_recreate.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_recreate.test new file mode 100644 index 00000000000..90a1fdf6c49 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_recreate.test @@ -0,0 +1,50 @@ +# Copyright(C) 2011 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/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists listing; +--enable_warnings + +set names utf8; +create table listing ( + id int primary key auto_increment not null, + last_name char(30) not null, + first_name char(30) not null, + index name (last_name, first_name) +) default charset utf8; +show create table listing; + +insert into listing (last_name, first_name) values("Taro", "Yamada"); +insert into listing (last_name, first_name) values("Taro", "Suzuki"); +insert into listing (last_name, first_name) values("Jiro", "Yamada"); +insert into listing (last_name, first_name) values("Taro", "Tanaka"); + +select * from listing + where last_name = "Taro" and (first_name >= "S" and first_name <= "Y"); + +drop index name on listing; +select * from listing + where last_name = "Taro" and (first_name >= "S" and first_name <= "Y"); + +create index new_name_index on listing (last_name, first_name); +select * from listing + where last_name = "Taro" and (first_name >= "S" and first_name <= "Y"); + +drop table listing; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_replace.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_replace.test new file mode 100644 index 00000000000..b5e592938a7 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_replace.test @@ -0,0 +1,43 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS listing; +--enable_warnings + +CREATE TABLE scores ( + id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, + name CHAR(30) NOT NULL, + score INT NOT NULL, + INDEX property (NAME, SCORE) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE scores; + +INSERT INTO scores (name, score) VALUES("Taro Yamada", 29); +INSERT INTO scores (name, score) VALUES("Taro Yamada", -12); +INSERT INTO scores (name, score) VALUES("Jiro Yamada", 27); +INSERT INTO scores (name, score) VALUES("Taro Yamada", 10); + +SELECT * FROM scores; +REPLACE scores (id, name, score) VALUES (3, "Taro Yamada", 28); +SELECT * FROM scores; +SELECT * FROM scores WHERE name = "Taro Yamada" AND (score >= -12 AND score < 29); + +DROP TABLE scores; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_double.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_double.test new file mode 100644 index 00000000000..4f9c60d14b2 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_double.test @@ -0,0 +1,43 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS temperatures; +--enable_warnings + +CREATE TABLE temperatures ( + id INT PRIMARY KEY AUTO_INCREMENT, + title VARCHAR(20), + temperature DOUBLE, + KEY temperature_index(temperature), + KEY multi_index(temperature, title) +); + +INSERT INTO temperatures VALUES (NULL, "Hot!", 28.2); +INSERT INTO temperatures VALUES (NULL, "Snow!", -2.8); +INSERT INTO temperatures VALUES (NULL, "Rainy!", 12.7); + +SELECT temperature FROM temperatures WHERE temperature BETWEEN 10 AND 30; +SELECT temperature FROM temperatures WHERE temperature BETWEEN -10 AND 20; + +SELECT title, temperature FROM temperatures WHERE temperature BETWEEN 10 AND 30; +SELECT title, temperature FROM temperatures WHERE temperature BETWEEN -10 AND 20; + +DROP TABLE temperatures; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_float.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_float.test new file mode 100644 index 00000000000..941fddbc5a0 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_float.test @@ -0,0 +1,43 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS temperatures; +--enable_warnings + +CREATE TABLE temperatures ( + id INT PRIMARY KEY AUTO_INCREMENT, + title VARCHAR(20), + temperature FLOAT, + KEY temperature_index(temperature), + KEY multi_index(temperature, title) +); + +INSERT INTO temperatures VALUES (NULL, "Hot!", 28.2); +INSERT INTO temperatures VALUES (NULL, "Snow!", -2.8); +INSERT INTO temperatures VALUES (NULL, "Rainy!", 12.7); + +SELECT temperature FROM temperatures WHERE temperature BETWEEN 10 AND 30; +SELECT temperature FROM temperatures WHERE temperature BETWEEN -10 AND 20; + +SELECT title, temperature FROM temperatures WHERE temperature BETWEEN 10 AND 30; +SELECT title, temperature FROM temperatures WHERE temperature BETWEEN -10 AND 20; + +DROP TABLE temperatures; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_int.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_int.test new file mode 100644 index 00000000000..478be9a90db --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_int.test @@ -0,0 +1,46 @@ +# Copyright(C) 2011 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS listing; +--enable_warnings + +CREATE TABLE scores ( + id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, + name CHAR(30) NOT NULL, + score INT NOT NULL, + INDEX property (score, name) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE scores; + +INSERT INTO scores (name, score) VALUES("Taro Yamada", 29); +INSERT INTO scores (name, score) VALUES("Taro Yamada", -12); +INSERT INTO scores (name, score) VALUES("Jiro Yamada", 27); +INSERT INTO scores (name, score) VALUES("Taro Yamada", 10); + +SELECT * FROM scores; + +SELECT * FROM scores WHERE score = 29; + +SELECT * FROM scores WHERE score = 29 AND name = "Taro Yamada"; + +SELECT * FROM scores WHERE (score >= -12 AND score < 29) AND name = "Taro Yamada"; + +DROP TABLE scores; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_string.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_string.test new file mode 100644 index 00000000000..6e0278f3910 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_string.test @@ -0,0 +1,41 @@ +# Copyright(C) 2011 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/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists listing; +--enable_warnings + +set names utf8; +create table listing ( + id int primary key auto_increment not null, + last_name char(30) not null, + first_name char(30) not null, + index name (last_name, first_name) +) default charset utf8; +show create table listing; +insert into listing (last_name, first_name) values("Taro", "Yamada"); +insert into listing (last_name, first_name) values("Taro", "Suzuki"); +insert into listing (last_name, first_name) values("Jiro", "Yamada"); +insert into listing (last_name, first_name) values("Taro", "Tanaka"); +select * from listing; +select * from listing where last_name = "Taro"; +select * from listing where last_name = "Taro" and first_name = "Suzuki"; +select * from listing where last_name = "Taro" and (first_name >= "S" and first_name <= "Y"); +drop table listing; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_varchar.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_varchar.test new file mode 100644 index 00000000000..9822ec18f4a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_varchar.test @@ -0,0 +1,44 @@ +# Copyright(C) 2011 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/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists scores; +--enable_warnings + +set names utf8; +create table scores ( + given_name varchar(30) not null, + family_name varchar(30) not null, + score int not null, + primary key property (given_name, family_name, score) +) default charset utf8; +show create table scores; + +insert into scores values("Taro", "Yamada", 29); +insert into scores values("Taro", "Yamada", -12); +insert into scores values("Jiro", "Yamada", 27); +insert into scores values("Taro", "Yamada", 10); + +select * from scores; +select * from scores where given_name = "Taro" and family_name = "Yamada"; +select * from scores where given_name = "Taro" and family_name = "Yamada" and score = 29; +select * from scores where given_name = "Taro" and family_name = "Yamada" and (score >= -12 and score < 29); + +drop table scores; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_32bit_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_32bit_equal.test new file mode 100644 index 00000000000..b206333d28d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_32bit_equal.test @@ -0,0 +1,42 @@ +# Copyright(C) 2012 Kentoku SHIBA +# 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/mroonga/have_32bit.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ranges; +--enable_warnings + +CREATE TABLE ranges ( + id INT PRIMARY KEY, + start DATE, + end DATE, + UNIQUE KEY range_key(start, end) +); + +INSERT INTO ranges VALUES (1, "1000-01-01", "2012-10-05"); +INSERT INTO ranges VALUES (2, "1000-01-01", "9999-12-31"); +INSERT INTO ranges VALUES (3, "2012-10-25", "9999-12-31"); +INSERT INTO ranges VALUES (4, "9999-12-31", "1000-01-01"); + +SELECT * FROM ranges FORCE INDEX(range_key) + WHERE start = "1000-01-01" AND end = "9999-12-31"; + +DROP TABLE ranges; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_64bit_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_64bit_equal.test new file mode 100644 index 00000000000..c425b882482 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_64bit_equal.test @@ -0,0 +1,44 @@ +# Copyright(C) 2012 Kentoku SHIBA +# Copyright(C) 2012 Kouhei Sutou <kou@clear-code.com> +# Copyright(C) 2014 Kenji Maruyama <mmmaru777@gmail.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/mroonga/skip_freebsd.inc +--source ../../include/mroonga/have_64bit.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ranges; +--enable_warnings + +CREATE TABLE ranges ( + id INT PRIMARY KEY, + start DATE, + end DATE, + UNIQUE KEY range_key(start, end) +); + +INSERT INTO ranges VALUES (1, "1000-01-01", "2012-10-05"); +INSERT INTO ranges VALUES (2, "1000-01-01", "9999-12-31"); +INSERT INTO ranges VALUES (3, "2012-10-25", "9999-12-31"); +INSERT INTO ranges VALUES (4, "9999-12-31", "1000-01-01"); + +SELECT * FROM ranges FORCE INDEX(range_key) + WHERE start = "1000-01-01" AND end = "9999-12-31"; + +DROP TABLE ranges; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_index_read.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_index_read.test new file mode 100644 index 00000000000..ea095f1c085 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_index_read.test @@ -0,0 +1,45 @@ +# Copyright(C) 2012 Kentoku SHIBA +# Copyright(C) 2012 Kouhei Sutou <kou@clear-code.com> +# Copyright(C) 2014 Kenji Maruyama <mmmaru777@gmail.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/mroonga/have_64bit.inc +--source ../../include/mroonga/skip_freebsd.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ranges; +--enable_warnings + +CREATE TABLE ranges ( + id INT PRIMARY KEY, + start DATE, + end DATE, + UNIQUE KEY range_key(start, end) +); + +INSERT INTO ranges VALUES (1, "1000-01-01", "2012-10-05"); +INSERT INTO ranges VALUES (2, "1000-01-01", "9999-12-31"); +INSERT INTO ranges VALUES (3, "2012-10-25", "9999-12-31"); +INSERT INTO ranges VALUES (4, "9999-12-31", "1000-01-01"); + +SELECT start, end + FROM ranges FORCE INDEX(range_key) + ORDER BY start, end; + +DROP TABLE ranges; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_32bit_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_32bit_asc.test new file mode 100644 index 00000000000..b877ed2f01a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_32bit_asc.test @@ -0,0 +1,42 @@ +# Copyright(C) 2012 Kentoku SHIBA +# 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/mroonga/have_32bit.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ranges; +--enable_warnings + +CREATE TABLE ranges ( + id INT PRIMARY KEY, + start DATE, + end DATE, + UNIQUE KEY range_key(start, end) +); + +INSERT INTO ranges VALUES (1, "2012-10-25", "9999-12-31"); +INSERT INTO ranges VALUES (2, "1000-01-01", "2012-10-05"); +INSERT INTO ranges VALUES (3, "9999-12-31", "1000-01-01"); +INSERT INTO ranges VALUES (4, "1000-01-01", "9999-12-31"); + +SELECT * FROM ranges FORCE INDEX(range_key) + ORDER BY start, end; + +DROP TABLE ranges; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_32bit_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_32bit_desc.test new file mode 100644 index 00000000000..c3185bb0fdc --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_32bit_desc.test @@ -0,0 +1,42 @@ +# Copyright(C) 2012 Kentoku SHIBA +# 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/mroonga/have_32bit.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ranges; +--enable_warnings + +CREATE TABLE ranges ( + id INT PRIMARY KEY, + start DATE, + end DATE, + UNIQUE KEY range_key(start, end) +); + +INSERT INTO ranges VALUES (1, "2012-10-25", "9999-12-31"); +INSERT INTO ranges VALUES (2, "1000-01-01", "2012-10-05"); +INSERT INTO ranges VALUES (3, "9999-12-31", "1000-01-01"); +INSERT INTO ranges VALUES (4, "1000-01-01", "9999-12-31"); + +SELECT * FROM ranges FORCE INDEX(range_key) + ORDER BY start DESC, end DESC; + +DROP TABLE ranges; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_64bit_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_64bit_asc.test new file mode 100644 index 00000000000..7fa17dbc2b3 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_64bit_asc.test @@ -0,0 +1,44 @@ +# Copyright(C) 2012 Kentoku SHIBA +# Copyright(C) 2012 Kouhei Sutou <kou@clear-code.com> +# Copyright(C) 2014 Kenji Maruyama <mmmaru777@gmail.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/mroonga/skip_freebsd.inc +--source ../../include/mroonga/have_64bit.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ranges; +--enable_warnings + +CREATE TABLE ranges ( + id INT PRIMARY KEY, + start DATE, + end DATE, + UNIQUE KEY range_key(start, end) +); + +INSERT INTO ranges VALUES (1, "2012-10-25", "9999-12-31"); +INSERT INTO ranges VALUES (2, "1000-01-01", "2012-10-05"); +INSERT INTO ranges VALUES (3, "9999-12-31", "1000-01-01"); +INSERT INTO ranges VALUES (4, "1000-01-01", "9999-12-31"); + +SELECT * FROM ranges FORCE INDEX(range_key) + ORDER BY start, end; + +DROP TABLE ranges; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_64bit_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_64bit_desc.test new file mode 100644 index 00000000000..ef3d9eee548 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_64bit_desc.test @@ -0,0 +1,44 @@ +# Copyright(C) 2012 Kentoku SHIBA +# Copyright(C) 2012 Kouhei Sutou <kou@clear-code.com> +# Copyright(C) 2014 Kenji Maruyama <mmmaru777@gmail.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/mroonga/skip_freebsd.inc +--source ../../include/mroonga/have_64bit.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ranges; +--enable_warnings + +CREATE TABLE ranges ( + id INT PRIMARY KEY, + start DATE, + end DATE, + UNIQUE KEY range_key(start, end) +); + +INSERT INTO ranges VALUES (1, "2012-10-25", "9999-12-31"); +INSERT INTO ranges VALUES (2, "1000-01-01", "2012-10-05"); +INSERT INTO ranges VALUES (3, "9999-12-31", "1000-01-01"); +INSERT INTO ranges VALUES (4, "1000-01-01", "9999-12-31"); + +SELECT * FROM ranges FORCE INDEX(range_key) + ORDER BY start DESC, end DESC; + +DROP TABLE ranges; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_reinsert.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_reinsert.test new file mode 100644 index 00000000000..58ec29f07e9 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_reinsert.test @@ -0,0 +1,40 @@ +# Copyright(C) 2012 Kentoku SHIBA +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ranges; +--enable_warnings + +CREATE TABLE ranges ( + id INT PRIMARY KEY, + start DATE, + end DATE, + UNIQUE KEY range_key(start, end) +); + +INSERT INTO ranges VALUES (1, "2010-01-01", "2012-10-05"); +SELECT * FROM ranges; + +DELETE FROM ranges WHERE id = 1; +INSERT INTO ranges VALUES (1, "2010-01-01", "2012-10-05"); +SELECT * FROM ranges; + +DROP TABLE ranges; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_index_read.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_index_read.test new file mode 100644 index 00000000000..efa0c0288bd --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_index_read.test @@ -0,0 +1,45 @@ +# Copyright(C) 2012 Kentoku SHIBA +# Copyright(C) 2012 Kouhei Sutou <kou@clear-code.com> +# Copyright(C) 2014 Kenji Maruyama <mmmaru777@gmail.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/mroonga/have_64bit.inc +--source ../../include/mroonga/skip_freebsd.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ranges; +--enable_warnings + +CREATE TABLE ranges ( + id int PRIMARY KEY, + start datetime, + end datetime, + UNIQUE KEY range_key(start, end) +); + +INSERT INTO ranges VALUES (1, "1000-01-01 00:00:00", "2012-10-05 16:18:29"); +INSERT INTO ranges VALUES (2, "1000-01-01 00:00:00", "9999-12-31 23:59:59"); +INSERT INTO ranges VALUES (3, "2012-10-25 16:18:29", "9999-12-31 23:59:59"); +INSERT INTO ranges VALUES (4, "9999-12-31 23:59:59", "1000-01-01 00:00:00"); + +SELECT start, end + FROM ranges FORCE INDEX(range_key) + ORDER BY start, end; + +DROP TABLE ranges; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_order_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_order_asc.test new file mode 100644 index 00000000000..55d910cc820 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_order_asc.test @@ -0,0 +1,44 @@ +# Copyright(C) 2012 Kentoku SHIBA +# Copyright(C) 2012 Kouhei Sutou <kou@clear-code.com> +# Copyright(C) 2014 Kenji Maruyama <mmmaru777@gmail.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/mroonga/skip_freebsd.inc +--source ../../include/mroonga/have_64bit.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ranges; +--enable_warnings + +CREATE TABLE ranges ( + id int PRIMARY KEY, + start datetime, + end datetime, + UNIQUE KEY range_key(start, end) +); + +INSERT INTO ranges VALUES (1, "2012-10-25 16:18:29", "9999-12-31 23:59:59"); +INSERT INTO ranges VALUES (2, "1000-01-01 00:00:00", "2012-10-05 16:18:29"); +INSERT INTO ranges VALUES (3, "9999-12-31 23:59:59", "1000-01-01 00:00:00"); +INSERT INTO ranges VALUES (4, "1000-01-01 00:00:00", "9999-12-31 23:59:59"); + +SELECT * FROM ranges FORCE INDEX(range_key) + ORDER BY start, end; + +DROP TABLE ranges; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_order_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_order_desc.test new file mode 100644 index 00000000000..5868ade2228 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_order_desc.test @@ -0,0 +1,44 @@ +# Copyright(C) 2012 Kentoku SHIBA +# Copyright(C) 2012 Kouhei Sutou <kou@clear-code.com> +# Copyright(C) 2014 Kenji Maruyama <mmmaru777@gmail.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/mroonga/skip_freebsd.inc +--source ../../include/mroonga/have_64bit.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ranges; +--enable_warnings + +CREATE TABLE ranges ( + id int PRIMARY KEY, + start datetime, + end datetime, + UNIQUE KEY range_key(start, end) +); + +INSERT INTO ranges VALUES (1, "2012-10-25 16:18:29", "9999-12-31 23:59:59"); +INSERT INTO ranges VALUES (2, "1000-01-01 00:00:00", "2012-10-05 16:18:29"); +INSERT INTO ranges VALUES (3, "9999-12-31 23:59:59", "1000-01-01 00:00:00"); +INSERT INTO ranges VALUES (4, "1000-01-01 00:00:00", "9999-12-31 23:59:59"); + +SELECT * FROM ranges FORCE INDEX(range_key) + ORDER BY start DESC, end DESC; + +DROP TABLE ranges; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_reinsert.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_reinsert.test new file mode 100644 index 00000000000..ab9ed122862 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_reinsert.test @@ -0,0 +1,40 @@ +# Copyright(C) 2012 Kentoku SHIBA +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ranges; +--enable_warnings + +CREATE TABLE ranges ( + id int PRIMARY KEY, + start datetime, + end datetime, + UNIQUE KEY range_key(start, end) +); + +INSERT INTO ranges VALUES (1, "2010-01-01 00:00:00", "2012-10-05 23:59:59"); +SELECT * FROM ranges; + +DELETE FROM ranges WHERE id = 1; +INSERT INTO ranges VALUES (1, "2010-01-01 00:00:00", "2012-10-05 23:59:59"); +SELECT * FROM ranges; + +DROP TABLE ranges; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_decimal.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_decimal.test new file mode 100644 index 00000000000..85645967fbd --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_decimal.test @@ -0,0 +1,39 @@ +# Copyright(C) 2012 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 (c1 int primary key, c2 decimal(65,30), c3 decimal(65,30), unique key uk1(c2,c3)); +insert into t1 values(1,123.456,0.000000000000000000000000000001); +insert into t1 values(2,-123.456,123.456); +insert into t1 values(3,98765432109876543210987654321098765.432109876543210987654321098765,-123.456); +insert into t1 values(4,-98765432109876543210987654321098765.432109876543210987654321098765,98765432109876543210987654321098765.432109876543210987654321098765); +insert into t1 values(5,0.000000000000000000000000000001,-98765432109876543210987654321098765.432109876543210987654321098765); +select c1, c2, c3 from t1 force index(uk1) where c2 = -98765432109876543210987654321098765.432109876543210987654321098765 and c3 = 98765432109876543210987654321098765.432109876543210987654321098765; +select c1, c2, c3 from t1 force index(uk1) order by c2, c3; +select c1, c2, c3 from t1 force index(uk1) order by c2 desc, c3 desc; +select c2, c3 from t1 force index(uk1) order by c2, c3; +--error ER_DUP_ENTRY +insert into t1 values(6,123.456,0.000000000000000000000000000001); +delete from t1 where c1 = 1; +insert into t1 values(1,123.456,0.000000000000000000000000000001); +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_time_index_read.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_time_index_read.test new file mode 100644 index 00000000000..f9b2d2b6f5c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_time_index_read.test @@ -0,0 +1,43 @@ +# Copyright(C) 2012 Kentoku SHIBA +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ranges; +--enable_warnings + +CREATE TABLE ranges ( + id int PRIMARY KEY, + start time, + end time, + UNIQUE KEY range_key(start, end) +); + +INSERT INTO ranges VALUES (1, "00:00:00", "15:11:11"); +INSERT INTO ranges VALUES (2, "00:00:00", "838:59:59"); +INSERT INTO ranges VALUES (3, "15:11:12", "838:59:59"); +INSERT INTO ranges VALUES (4, "838:59:59", "00:00:00"); +INSERT INTO ranges VALUES (5, "-838:59:59", "838:59:59"); + +SELECT start, end + FROM ranges FORCE INDEX(range_key) + ORDER BY start, end; + +DROP TABLE ranges; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_time_order_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_time_order_asc.test new file mode 100644 index 00000000000..94e2fa39946 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_time_order_asc.test @@ -0,0 +1,43 @@ +# Copyright(C) 2012 Kentoku SHIBA +# 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/mroonga/have_64bit.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ranges; +--enable_warnings + +CREATE TABLE ranges ( + id int PRIMARY KEY, + start time, + end time, + UNIQUE KEY range_key(start, end) +); + +INSERT INTO ranges VALUES (1, "15:11:12", "838:59:59"); +INSERT INTO ranges VALUES (2, "00:00:00", "15:11:11"); +INSERT INTO ranges VALUES (3, "838:59:59", "00:00:00"); +INSERT INTO ranges VALUES (4, "00:00:00", "838:59:59"); +INSERT INTO ranges VALUES (5, "-838:59:59", "838:59:59"); + +SELECT * FROM ranges FORCE INDEX(range_key) + ORDER BY start, end; + +DROP TABLE ranges; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_time_order_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_time_order_desc.test new file mode 100644 index 00000000000..d9d31cf3386 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_time_order_desc.test @@ -0,0 +1,43 @@ +# Copyright(C) 2012 Kentoku SHIBA +# 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/mroonga/have_64bit.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ranges; +--enable_warnings + +CREATE TABLE ranges ( + id int PRIMARY KEY, + start time, + end time, + UNIQUE KEY range_key(start, end) +); + +INSERT INTO ranges VALUES (1, "15:11:12", "838:59:59"); +INSERT INTO ranges VALUES (2, "00:00:00", "15:11:11"); +INSERT INTO ranges VALUES (3, "838:59:59", "00:00:00"); +INSERT INTO ranges VALUES (4, "00:00:00", "838:59:59"); +INSERT INTO ranges VALUES (5, "-838:59:59", "838:59:59"); + +SELECT * FROM ranges FORCE INDEX(range_key) + ORDER BY start DESC, end DESC; + +DROP TABLE ranges; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_time_reinsert.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_time_reinsert.test new file mode 100644 index 00000000000..e0a18ae792b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_time_reinsert.test @@ -0,0 +1,40 @@ +# Copyright(C) 2012 Kentoku SHIBA +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ranges; +--enable_warnings + +CREATE TABLE ranges ( + id int PRIMARY KEY, + start time, + end time, + UNIQUE KEY range_key(start, end) +); + +INSERT INTO ranges VALUES (1, "13:21:48", "15:11:12"); +SELECT * FROM ranges; + +DELETE FROM ranges WHERE id = 1; +INSERT INTO ranges VALUES (1, "13:21:48", "15:11:12"); +SELECT * FROM ranges; + +DROP TABLE ranges; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_index_read.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_index_read.test new file mode 100644 index 00000000000..c660f6aef6e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_index_read.test @@ -0,0 +1,42 @@ +# Copyright(C) 2012 Kentoku SHIBA +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ranges; +--enable_warnings + +CREATE TABLE ranges ( + id int PRIMARY KEY, + start timestamp, + end timestamp, + UNIQUE KEY range_key(start, end) +); + +INSERT INTO ranges VALUES (1, "1970-01-01 12:00:00", "2012-10-05 16:18:29"); +INSERT INTO ranges VALUES (2, "1970-01-01 12:00:00", "2038-01-18 15:14:07"); +INSERT INTO ranges VALUES (3, "2012-10-25 16:18:29", "2038-01-18 15:14:07"); +INSERT INTO ranges VALUES (4, "2038-01-18 15:14:07", "1970-01-01 12:00:00"); + +SELECT start, end + FROM ranges FORCE INDEX(range_key) + ORDER BY start, end; + +DROP TABLE ranges; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_order_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_order_asc.test new file mode 100644 index 00000000000..5ec630b56df --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_order_asc.test @@ -0,0 +1,42 @@ +# Copyright(C) 2012 Kentoku SHIBA +# 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/mroonga/have_64bit.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ranges; +--enable_warnings + +CREATE TABLE ranges ( + id int PRIMARY KEY, + start timestamp, + end timestamp, + UNIQUE KEY range_key(start, end) +); + +INSERT INTO ranges VALUES (1, "2012-10-25 16:18:29", "2038-01-18 15:14:07"); +INSERT INTO ranges VALUES (2, "1970-01-01 12:00:00", "2012-10-05 16:18:29"); +INSERT INTO ranges VALUES (3, "2038-01-18 15:14:07", "1970-01-01 12:00:00"); +INSERT INTO ranges VALUES (4, "1970-01-01 12:00:00", "2038-01-18 15:14:07"); + +SELECT * FROM ranges FORCE INDEX(range_key) + ORDER BY start, end; + +DROP TABLE ranges; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_order_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_order_desc.test new file mode 100644 index 00000000000..9ca7440da88 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_order_desc.test @@ -0,0 +1,42 @@ +# Copyright(C) 2012 Kentoku SHIBA +# 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/mroonga/have_64bit.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ranges; +--enable_warnings + +CREATE TABLE ranges ( + id int PRIMARY KEY, + start timestamp, + end timestamp, + UNIQUE KEY range_key(start, end) +); + +INSERT INTO ranges VALUES (1, "2012-10-25 16:18:29", "2038-01-18 15:14:07"); +INSERT INTO ranges VALUES (2, "1970-01-01 12:00:00", "2012-10-05 16:18:29"); +INSERT INTO ranges VALUES (3, "2038-01-18 15:14:07", "1970-01-01 12:00:00"); +INSERT INTO ranges VALUES (4, "1970-01-01 12:00:00", "2038-01-18 15:14:07"); + +SELECT * FROM ranges FORCE INDEX(range_key) + ORDER BY start DESC, end DESC; + +DROP TABLE ranges; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_reinsert.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_reinsert.test new file mode 100644 index 00000000000..559cf958804 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_reinsert.test @@ -0,0 +1,40 @@ +# Copyright(C) 2012 Kentoku SHIBA +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ranges; +--enable_warnings + +CREATE TABLE ranges ( + id int PRIMARY KEY, + start timestamp, + end timestamp, + UNIQUE KEY range_key(start, end) +); + +INSERT INTO ranges VALUES (1, "2010-01-01 00:00:00", "2012-10-05 23:59:59"); +SELECT * FROM ranges; + +DELETE FROM ranges WHERE id = 1; +INSERT INTO ranges VALUES (1, "2010-01-01 00:00:00", "2012-10-05 23:59:59"); +SELECT * FROM ranges; + +DROP TABLE ranges; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_varchar.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_varchar.test new file mode 100644 index 00000000000..900de61feac --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_varchar.test @@ -0,0 +1,39 @@ +# Copyright(C) 2012 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 (c1 int primary key, c2 varchar(10), c3 varchar(10), unique key uk1(c2,c3)) default charset=utf8 collate utf8_bin; +insert into t1 values(1,'abcde','abc '); +insert into t1 values(2,'abc\0','abcde'); +insert into t1 values(3,'abc','abc\0'); +insert into t1 values(4,'abc ','abc'); +insert into t1 values(5,'abc ','abc '); +select c1, c2, c3 from t1 force index(uk1) where c2 = 'abc ' and c3 = 'abc'; +select c1, c2, c3 from t1 force index(uk1) order by c2, c3; +select c1, c2, c3 from t1 force index(uk1) order by c2 desc, c3 desc; +select c2, c3 from t1 force index(uk1) order by c2, c3; +--error ER_DUP_ENTRY +insert into t1 values(6,'abcde','abc '); +delete from t1 where c1 = 1; +insert into t1 values(1,'abcde','abc '); +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_32bit_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_32bit_equal.test new file mode 100644 index 00000000000..3daf3fa4153 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_32bit_equal.test @@ -0,0 +1,42 @@ +# Copyright(C) 2012 Kentoku SHIBA +# 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/mroonga/have_32bit.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ranges; +--enable_warnings + +CREATE TABLE ranges ( + id INT PRIMARY KEY, + start YEAR, + end YEAR, + UNIQUE KEY range_key(start, end) +); + +INSERT INTO ranges VALUES (1, 1901, 2012); +INSERT INTO ranges VALUES (2, 1901, 2155); +INSERT INTO ranges VALUES (3, 2012, 2155); +INSERT INTO ranges VALUES (4, 2155, 1901); + +SELECT * FROM ranges FORCE INDEX(range_key) + WHERE start = 1901 AND end = 2155; + +DROP TABLE ranges; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_64bit_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_64bit_equal.test new file mode 100644 index 00000000000..57ab0534147 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_64bit_equal.test @@ -0,0 +1,42 @@ +# Copyright(C) 2012 Kentoku SHIBA +# 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/mroonga/have_64bit.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ranges; +--enable_warnings + +CREATE TABLE ranges ( + id INT PRIMARY KEY, + start YEAR, + end YEAR, + UNIQUE KEY range_key(start, end) +); + +INSERT INTO ranges VALUES (1, 1901, 2012); +INSERT INTO ranges VALUES (2, 1901, 2155); +INSERT INTO ranges VALUES (3, 2012, 2155); +INSERT INTO ranges VALUES (4, 2155, 1901); + +SELECT * FROM ranges FORCE INDEX(range_key) + WHERE start = 1901 AND end = 2155; + +DROP TABLE ranges; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_index_read.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_index_read.test new file mode 100644 index 00000000000..efa92728a63 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_index_read.test @@ -0,0 +1,43 @@ +# Copyright(C) 2012 Kentoku SHIBA +# 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/mroonga/have_64bit.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ranges; +--enable_warnings + +CREATE TABLE ranges ( + id INT PRIMARY KEY, + start YEAR, + end YEAR, + UNIQUE KEY range_key(start, end) +); + +INSERT INTO ranges VALUES (1, 1901, 2012); +INSERT INTO ranges VALUES (2, 1901, 2155); +INSERT INTO ranges VALUES (3, 2012, 2155); +INSERT INTO ranges VALUES (4, 2155, 1901); + +SELECT start, end + FROM ranges FORCE INDEX(range_key) + ORDER BY start, end; + +DROP TABLE ranges; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_32bit_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_32bit_asc.test new file mode 100644 index 00000000000..774c06772a7 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_32bit_asc.test @@ -0,0 +1,42 @@ +# Copyright(C) 2012 Kentoku SHIBA +# 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/mroonga/have_32bit.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ranges; +--enable_warnings + +CREATE TABLE ranges ( + id INT PRIMARY KEY, + start YEAR, + end YEAR, + UNIQUE KEY range_key(start, end) +); + +INSERT INTO ranges VALUES (1, 2012, 2155); +INSERT INTO ranges VALUES (2, 1901, 2012); +INSERT INTO ranges VALUES (3, 2155, 1901); +INSERT INTO ranges VALUES (4, 1901, 2155); + +SELECT * FROM ranges FORCE INDEX(range_key) + ORDER BY start, end; + +DROP TABLE ranges; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_32bit_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_32bit_desc.test new file mode 100644 index 00000000000..bd0d20fe973 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_32bit_desc.test @@ -0,0 +1,42 @@ +# Copyright(C) 2012 Kentoku SHIBA +# 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/mroonga/have_32bit.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ranges; +--enable_warnings + +CREATE TABLE ranges ( + id INT PRIMARY KEY, + start YEAR, + end YEAR, + UNIQUE KEY range_key(start, end) +); + +INSERT INTO ranges VALUES (1, 2012, 2155); +INSERT INTO ranges VALUES (2, 1901, 2012); +INSERT INTO ranges VALUES (3, 2155, 1901); +INSERT INTO ranges VALUES (4, 1901, 2155); + +SELECT * FROM ranges FORCE INDEX(range_key) + ORDER BY start DESC, end DESC; + +DROP TABLE ranges; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_64bit_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_64bit_asc.test new file mode 100644 index 00000000000..225188e05c6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_64bit_asc.test @@ -0,0 +1,42 @@ +# Copyright(C) 2012 Kentoku SHIBA +# 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/mroonga/have_64bit.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ranges; +--enable_warnings + +CREATE TABLE ranges ( + id INT PRIMARY KEY, + start YEAR, + end YEAR, + UNIQUE KEY range_key(start, end) +); + +INSERT INTO ranges VALUES (1, 2012, 2155); +INSERT INTO ranges VALUES (2, 1901, 2012); +INSERT INTO ranges VALUES (3, 2155, 1901); +INSERT INTO ranges VALUES (4, 1901, 2155); + +SELECT * FROM ranges FORCE INDEX(range_key) + ORDER BY start, end; + +DROP TABLE ranges; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_64bit_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_64bit_desc.test new file mode 100644 index 00000000000..dcf905e9286 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_64bit_desc.test @@ -0,0 +1,42 @@ +# Copyright(C) 2012 Kentoku SHIBA +# 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/mroonga/have_64bit.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ranges; +--enable_warnings + +CREATE TABLE ranges ( + id INT PRIMARY KEY, + start YEAR, + end YEAR, + UNIQUE KEY range_key(start, end) +); + +INSERT INTO ranges VALUES (1, 2012, 2155); +INSERT INTO ranges VALUES (2, 1901, 2012); +INSERT INTO ranges VALUES (3, 2155, 1901); +INSERT INTO ranges VALUES (4, 1901, 2155); + +SELECT * FROM ranges FORCE INDEX(range_key) + ORDER BY start DESC, end DESC; + +DROP TABLE ranges; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_reinsert.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_reinsert.test new file mode 100644 index 00000000000..250ef00b5b6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_reinsert.test @@ -0,0 +1,40 @@ +# Copyright(C) 2012 Kentoku SHIBA +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ranges; +--enable_warnings + +CREATE TABLE ranges ( + id INT PRIMARY KEY, + start YEAR, + end YEAR, + UNIQUE KEY range_key(start, end) +); + +INSERT INTO ranges VALUES (1, 2010, 2012); +SELECT * FROM ranges; + +DELETE FROM ranges WHERE id = 1; +INSERT INTO ranges VALUES (1, 2010, 2012); +SELECT * FROM ranges; + +DROP TABLE ranges; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_update_int.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_update_int.test new file mode 100644 index 00000000000..e1efd0c992c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_update_int.test @@ -0,0 +1,43 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS scores; +--enable_warnings + +CREATE TABLE scores ( + id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, + name CHAR(30) NOT NULL, + score INT NOT NULL, + KEY property (score, name) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE scores; + +INSERT INTO scores (name, score) VALUES("Taro Yamada", 29); +INSERT INTO scores (name, score) VALUES("Taro Yamada", -12); +INSERT INTO scores (name, score) VALUES("Jiro Yamada", 29); +INSERT INTO scores (name, score) VALUES("Taro Yamada", 10); + +SELECT * FROM scores WHERE score = 29; + +UPDATE scores SET name = "Saburo YAMADA" WHERE id = 3; +SELECT * FROM scores WHERE score = 29; + +DROP TABLE scores; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_update_string.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_update_string.test new file mode 100644 index 00000000000..bcbbe82914b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_update_string.test @@ -0,0 +1,40 @@ +# Copyright(C) 2011 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/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists listing; +--enable_warnings + +set names utf8; +create table scores ( + id int primary key auto_increment not null, + name char(30) not null, + score int not null, + index property (name, score) +) default charset utf8; +show create table scores; +insert into scores (name, score) values("Taro Yamada", 29); +insert into scores (name, score) values("Taro Yamada", -12); +insert into scores (name, score) values("Jiro Yamada", 27); +insert into scores (name, score) values("Taro Yamada", 10); +select * from scores; +update scores set name = "Taro Yamada" where name = "Jiro Yamada" and score = 27; +select * from scores where name = "Taro Yamada" and (score >= -12 and score < 29); +drop table scores; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_char_exact_length.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_char_exact_length.test new file mode 100644 index 00000000000..ba52b4b4138 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_char_exact_length.test @@ -0,0 +1,38 @@ +# Copyright(C) 2012 Kentoku SHIBA +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ids; +--enable_warnings + +CREATE TABLE ids ( + id char(10) CHARACTER SET latin1 PRIMARY KEY +); + +INSERT INTO ids VALUES('abcdefghij'); +INSERT INTO ids VALUES('klmnopqrst'); +INSERT INTO ids VALUES('uvwxyz0123'); + +SELECT * FROM ids FORCE INDEX(PRIMARY) ORDER BY id; + +SELECT * FROM ids FORCE INDEX(PRIMARY) WHERE id = 'abcdefghij'; + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_char_null_character.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_char_null_character.test new file mode 100644 index 00000000000..bded856812c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_char_null_character.test @@ -0,0 +1,37 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ids; +--enable_warnings + +CREATE TABLE ids ( + id char(7) CHARACTER SET latin1 COLLATE latin1_bin PRIMARY KEY +); + +INSERT INTO ids VALUES("\0abcdef"); +INSERT INTO ids VALUES("ab\0cdef"); +INSERT INTO ids VALUES("abcd\0ef"); + +SELECT * FROM ids FORCE INDEX(PRIMARY) ORDER BY id; + +SELECT * FROM ids FORCE INDEX(PRIMARY) WHERE id = "ab\0cdef"; + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_char_short.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_char_short.test new file mode 100644 index 00000000000..ae8c40b82c5 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_char_short.test @@ -0,0 +1,37 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ids; +--enable_warnings + +CREATE TABLE ids ( + id char(6) CHARACTER SET latin1 PRIMARY KEY +); + +INSERT INTO ids VALUES("abcdef"); +INSERT INTO ids VALUES( "cdef"); +INSERT INTO ids VALUES( "ef"); + +SELECT * FROM ids FORCE INDEX(PRIMARY) ORDER BY id; + +SELECT * FROM ids FORCE INDEX(PRIMARY) WHERE id = "cdef"; + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_date.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_date.test new file mode 100644 index 00000000000..e57a8491d99 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_date.test @@ -0,0 +1,42 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + day DATE PRIMARY KEY, + title TEXT +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (day, title) VALUES ("2012-01-29", "clear day"); +INSERT INTO diaries (day, title) VALUES ("2012-01-30", "rainy day"); +INSERT INTO diaries (day, title) VALUES ("2012-01-31", "cloudy day"); +--error ER_DUP_ENTRY +INSERT INTO diaries (day, title) VALUES ("2012-01-31", "duplicated day"); + +SELECT * FROM diaries; + +SELECT * FROM diaries + WHERE day BETWEEN "2012-01-29" AND "2012-01-30"; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_datetime_with_fractional_seconds.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_datetime_with_fractional_seconds.test new file mode 100644 index 00000000000..7f140bf24c6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_datetime_with_fractional_seconds.test @@ -0,0 +1,45 @@ +# 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/mroonga/have_fractional_seconds.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + day DATETIME(6) PRIMARY KEY, + title TEXT +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (day, title) + VALUES ("2012-01-29 21:51:01.111111", "clear day"); +INSERT INTO diaries (day, title) + VALUES ("2012-01-30 01:23:45.333", "rainy day"); +INSERT INTO diaries (day, title) + VALUES ("2012-01-31 08:32:10.5555", "cloudy day"); + +SELECT * FROM diaries; + +SELECT * FROM diaries + WHERE day BETWEEN "2012-01-29 00:00:00.123456" AND + "2012-01-31 00:00:00.999999"; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_datetime_without_fractional_seconds.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_datetime_without_fractional_seconds.test new file mode 100644 index 00000000000..1986e4db3db --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_datetime_without_fractional_seconds.test @@ -0,0 +1,43 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + day DATETIME PRIMARY KEY, + title TEXT +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (day, title) + VALUES ("2012-01-29 21:51:01", "clear day"); +INSERT INTO diaries (day, title) + VALUES ("2012-01-30 01:23:45", "rainy day"); +INSERT INTO diaries (day, title) + VALUES ("2012-01-31 08:32:10", "cloudy day"); + +SELECT * FROM diaries; + +SELECT * FROM diaries + WHERE day BETWEEN "2012-01-29 00:00:00" AND "2012-01-31 00:00:00"; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_decimal_with_fractional_seconds.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_decimal_with_fractional_seconds.test new file mode 100644 index 00000000000..d296285b391 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_decimal_with_fractional_seconds.test @@ -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/mroonga/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/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_decimal_without_fractional_seconds.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_decimal_without_fractional_seconds.test new file mode 100644 index 00000000000..956b9800650 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_decimal_without_fractional_seconds.test @@ -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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS releases; +--enable_warnings + +CREATE TABLE releases ( + version DECIMAL PRIMARY KEY, + message TEXT +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE releases; + +INSERT INTO releases (version, message) VALUES (1, "the first release!!!"); +INSERT INTO releases (version, message) VALUES (10, "10th release!"); +INSERT INTO releases (version, message) VALUES (999, "the last release!"); + +SELECT * FROM releases; + +SELECT * FROM releases WHERE version BETWEEN "1" AND "10"; + +DROP TABLE releases; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_time_with_fractional_seconds.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_time_with_fractional_seconds.test new file mode 100644 index 00000000000..90e668e1e38 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_time_with_fractional_seconds.test @@ -0,0 +1,44 @@ +# 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/mroonga/have_mroonga.inc +--source ../../include/mroonga/have_fractional_seconds.inc + +--disable_warnings +DROP TABLE IF EXISTS running_records; +--enable_warnings + +CREATE TABLE running_records ( + time TIME(6) PRIMARY KEY, + title TEXT +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE running_records; + +INSERT INTO running_records (time, title) + VALUES ("01:00:00.000001", "normal condition"); +INSERT INTO running_records (time, title) + VALUES ("12:23:34.123456", "bad condition"); +INSERT INTO running_records (time, title) + VALUES ("-838:59:59.000000", "record failure"); + +SELECT * FROM running_records; + +SELECT * FROM running_records + WHERE time BETWEEN "00:59:59.999999" AND "12:23:34.123456"; + +DROP TABLE running_records; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_time_without_fractional_seconds.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_time_without_fractional_seconds.test new file mode 100644 index 00000000000..f000f7390f6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_time_without_fractional_seconds.test @@ -0,0 +1,43 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS running_records; +--enable_warnings + +CREATE TABLE running_records ( + time TIME PRIMARY KEY, + title TEXT +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE running_records; + +INSERT INTO running_records (time, title) + VALUES ("01:00:00", "normal condition"); +INSERT INTO running_records (time, title) + VALUES ("12:23:34", "bad condition"); +INSERT INTO running_records (time, title) + VALUES ("-838:59:59", "record failure"); + +SELECT * FROM running_records; + +SELECT * FROM running_records + WHERE time BETWEEN "00:59:59" AND "12:23:34"; + +DROP TABLE running_records; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_timestamp_with_fractional_seconds.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_timestamp_with_fractional_seconds.test new file mode 100644 index 00000000000..aba635ad637 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_timestamp_with_fractional_seconds.test @@ -0,0 +1,46 @@ +# 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/mroonga/skip_mariadb_55.inc +--source ../../include/mroonga/have_fractional_seconds.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + time TIMESTAMP(6) PRIMARY KEY, + title TEXT +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (time, title) + VALUES ("2012-01-29 21:51:01.111111", "clear day"); +INSERT INTO diaries (time, title) + VALUES ("2012-01-30 01:23:45.333", "rainy day"); +INSERT INTO diaries (time, title) + VALUES ("2012-01-31 08:32:10.5555", "cloudy day"); + +SELECT * FROM diaries; + +SELECT * FROM diaries + WHERE time BETWEEN "2012-01-29 00:00:00.123456" AND + "2012-01-31 00:00:00.999999"; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_timestamp_without_fractional_seconds.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_timestamp_without_fractional_seconds.test new file mode 100644 index 00000000000..ae61434c795 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_timestamp_without_fractional_seconds.test @@ -0,0 +1,40 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + time TIMESTAMP PRIMARY KEY, + title TEXT +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (time, title) VALUES ("2012-01-29 21:51:01", "clear day"); +INSERT INTO diaries (time, title) VALUES ("2012-01-30 01:23:45", "rainy day"); +INSERT INTO diaries (time, title) VALUES ("2012-01-31 08:32:10", "cloudy day"); + +SELECT * FROM diaries; + +SELECT * FROM diaries + WHERE time BETWEEN "2012-01-29 00:00:00" AND "2012-01-31 00:00:00"; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_varchar_null_character.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_varchar_null_character.test new file mode 100644 index 00000000000..20ae939be8b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_varchar_null_character.test @@ -0,0 +1,37 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ids; +--enable_warnings + +CREATE TABLE ids ( + id varchar(7) CHARACTER SET latin1 COLLATE latin1_bin PRIMARY KEY +); + +INSERT INTO ids VALUES("\0abcdef"); +INSERT INTO ids VALUES("ab\0cdef"); +INSERT INTO ids VALUES("abcd\0ef"); + +SELECT * FROM ids FORCE INDEX(PRIMARY) ORDER BY id; + +SELECT * FROM ids FORCE INDEX(PRIMARY) WHERE id = "ab\0cdef"; + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_year.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_year.test new file mode 100644 index 00000000000..25f02d38e94 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_year.test @@ -0,0 +1,43 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS aniversary_memos; +--enable_warnings + +CREATE TABLE aniversary_memos ( + party_year YEAR PRIMARY KEY, + title TEXT +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE aniversary_memos; + +INSERT INTO aniversary_memos (party_year, title) + VALUES ("11", "We need a big cake!"); +INSERT INTO aniversary_memos (party_year, title) + VALUES ("2012", "Invitations are sent."); +INSERT INTO aniversary_memos (party_year, title) + VALUES ("13", "Wow! Today is the anniversary party day!"); + +SELECT * FROM aniversary_memos; + +SELECT * FROM aniversary_memos + WHERE party_year BETWEEN "12" AND "2013"; + +DROP TABLE aniversary_memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_greater_than_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_greater_than_asc.test new file mode 100644 index 00000000000..a622dfbf70d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_greater_than_asc.test @@ -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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ids; +--enable_warnings + +SET NAMES UTF8; + +CREATE TABLE ids ( + id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT +) ENGINE=Mroonga DEFAULT CHARSET=utf8; + +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); + +SELECT * FROM ids WHERE ids.id > 1 ORDER BY ids.id ASC LIMIT 3; + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_greater_than_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_greater_than_desc.test new file mode 100644 index 00000000000..63dc820ccfd --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_greater_than_desc.test @@ -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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ids; +--enable_warnings + +SET NAMES UTF8; + +CREATE TABLE ids ( + id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT +) ENGINE=Mroonga DEFAULT CHARSET=utf8; + +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); + +SELECT * FROM ids WHERE ids.id > 3 ORDER BY ids.id DESC LIMIT 3; + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_greater_than_or_equal_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_greater_than_or_equal_asc.test new file mode 100644 index 00000000000..a51e6c5da47 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_greater_than_or_equal_asc.test @@ -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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ids; +--enable_warnings + +SET NAMES UTF8; + +CREATE TABLE ids ( + id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT +) ENGINE=Mroonga DEFAULT CHARSET=utf8; + +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); + +SELECT * FROM ids WHERE ids.id >= 2 ORDER BY ids.id ASC LIMIT 3; + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_greater_than_or_equal_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_greater_than_or_equal_desc.test new file mode 100644 index 00000000000..ea5c150bf0f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_greater_than_or_equal_desc.test @@ -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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ids; +--enable_warnings + +SET NAMES UTF8; + +CREATE TABLE ids ( + id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT +) ENGINE=Mroonga DEFAULT CHARSET=utf8; + +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); + +SELECT * FROM ids WHERE ids.id >= 3 ORDER BY ids.id DESC LIMIT 3; + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_less_than_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_less_than_asc.test new file mode 100644 index 00000000000..12761c0f4d8 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_less_than_asc.test @@ -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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ids; +--enable_warnings + +SET NAMES UTF8; + +CREATE TABLE ids ( + id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT +) ENGINE=Mroonga DEFAULT CHARSET=utf8; + +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); + +SELECT * FROM ids WHERE ids.id < 4 ORDER BY ids.id ASC LIMIT 3; + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_less_than_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_less_than_desc.test new file mode 100644 index 00000000000..a4f4a781ead --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_less_than_desc.test @@ -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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ids; +--enable_warnings + +SET NAMES UTF8; + +CREATE TABLE ids ( + id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT +) ENGINE=Mroonga DEFAULT CHARSET=utf8; + +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); + +SELECT * FROM ids WHERE ids.id < 4 ORDER BY ids.id DESC LIMIT 3; + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_less_than_or_equal_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_less_than_or_equal_asc.test new file mode 100644 index 00000000000..2fba0d13f5f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_less_than_or_equal_asc.test @@ -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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ids; +--enable_warnings + +SET NAMES UTF8; + +CREATE TABLE ids ( + id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT +) ENGINE=Mroonga DEFAULT CHARSET=utf8; + +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); + +SELECT * FROM ids WHERE ids.id <= 4 ORDER BY ids.id ASC LIMIT 3; + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_less_than_or_equal_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_less_than_or_equal_desc.test new file mode 100644 index 00000000000..e4661fc7047 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_less_than_or_equal_desc.test @@ -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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ids; +--enable_warnings + +SET NAMES UTF8; + +CREATE TABLE ids ( + id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT +) ENGINE=Mroonga DEFAULT CHARSET=utf8; + +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); +INSERT INTO ids VALUES(); + +SELECT * FROM ids WHERE ids.id <= 4 ORDER BY ids.id DESC LIMIT 3; + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_bigint.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_bigint.test new file mode 100644 index 00000000000..53111b576d7 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_bigint.test @@ -0,0 +1,45 @@ +# Copyright(C) 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 +# 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 ids; +--enable_warnings + +CREATE TABLE ids ( + id BIGINT, + value BIGINT, + KEY (id, value) +); + +INSERT INTO ids VALUES ( -1, 16); +INSERT INTO ids VALUES ( -2, 8); +INSERT INTO ids VALUES ( -4, 4); +INSERT INTO ids VALUES ( -8, 2); +INSERT INTO ids VALUES (-16, 1); +INSERT INTO ids VALUES ( 16, -1); +INSERT INTO ids VALUES ( 8, -2); +INSERT INTO ids VALUES ( 4, -4); +INSERT INTO ids VALUES ( 2, -8); +INSERT INTO ids VALUES ( 1, -16); + +SELECT * FROM ids; +SELECT * FROM ids WHERE id BETWEEN -4 AND 8; + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_bigint_unsigned.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_bigint_unsigned.test new file mode 100644 index 00000000000..5e93137afeb --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_bigint_unsigned.test @@ -0,0 +1,43 @@ +# Copyright(C) 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 +# 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 ids; +--enable_warnings + +CREATE TABLE ids ( + id BIGINT UNSIGNED, + value BIGINT UNSIGNED, + KEY (id, value) +); + +INSERT INTO ids VALUES ( 1, 1); +INSERT INTO ids VALUES ( 2, 2); +INSERT INTO ids VALUES ( 4, 3); +INSERT INTO ids VALUES ( 8, 4); +INSERT INTO ids VALUES (16, 5); +INSERT INTO ids VALUES (32, 6); +INSERT INTO ids VALUES (64, 7); +INSERT INTO ids VALUES (128, 8); + +SELECT * FROM ids; +SELECT * FROM ids WHERE id BETWEEN 4 AND 32; + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_double.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_double.test new file mode 100644 index 00000000000..0ca7d948318 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_double.test @@ -0,0 +1,45 @@ +# Copyright(C) 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 +# 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 ids; +--enable_warnings + +CREATE TABLE ids ( + id DOUBLE, + value DOUBLE, + KEY (id, value) +); + +INSERT INTO ids VALUES ( -1.1, 16.16); +INSERT INTO ids VALUES ( -2.2, 8.8); +INSERT INTO ids VALUES ( -4.4, 4.4); +INSERT INTO ids VALUES ( -8.8, 2.2); +INSERT INTO ids VALUES (-16.6, 1.1); +INSERT INTO ids VALUES ( 16.6, -1.1); +INSERT INTO ids VALUES ( 8.8, -2.2); +INSERT INTO ids VALUES ( 4.4, -4.4); +INSERT INTO ids VALUES ( 2.2, -8.8); +INSERT INTO ids VALUES ( 1.1, -16.16); + +SELECT * FROM ids; +SELECT * FROM ids WHERE id BETWEEN -4.5 AND 8.9; + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_float.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_float.test new file mode 100644 index 00000000000..ade89f6bc56 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_float.test @@ -0,0 +1,45 @@ +# Copyright(C) 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 +# 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 ids; +--enable_warnings + +CREATE TABLE ids ( + id FLOAT, + value FLOAT, + KEY (id, value) +); + +INSERT INTO ids VALUES ( -1.1, 16.16); +INSERT INTO ids VALUES ( -2.2, 8.8); +INSERT INTO ids VALUES ( -4.4, 4.4); +INSERT INTO ids VALUES ( -8.8, 2.2); +INSERT INTO ids VALUES (-16.6, 1.1); +INSERT INTO ids VALUES ( 16.6, -1.1); +INSERT INTO ids VALUES ( 8.8, -2.2); +INSERT INTO ids VALUES ( 4.4, -4.4); +INSERT INTO ids VALUES ( 2.2, -8.8); +INSERT INTO ids VALUES ( 1.1, -16.16); + +SELECT * FROM ids; +SELECT * FROM ids WHERE id BETWEEN -4.5 AND 8.9; + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_int.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_int.test new file mode 100644 index 00000000000..9ed4979fd8f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_int.test @@ -0,0 +1,46 @@ +# Copyright(C) 2012 Kentoku SHIBA +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ids; +--enable_warnings + +CREATE TABLE ids ( + id INT, + value INT, + KEY (id, value) +); + +INSERT INTO ids VALUES ( -1, 16); +INSERT INTO ids VALUES ( -2, 8); +INSERT INTO ids VALUES ( -4, 4); +INSERT INTO ids VALUES ( -8, 2); +INSERT INTO ids VALUES (-16, 1); +INSERT INTO ids VALUES ( 16, -1); +INSERT INTO ids VALUES ( 8, -2); +INSERT INTO ids VALUES ( 4, -4); +INSERT INTO ids VALUES ( 2, -8); +INSERT INTO ids VALUES ( 1, -16); + +SELECT * FROM ids; +SELECT * FROM ids WHERE id BETWEEN -4 AND 8; + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_int_unsigned.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_int_unsigned.test new file mode 100644 index 00000000000..f68c2f6906c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_int_unsigned.test @@ -0,0 +1,43 @@ +# Copyright(C) 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 +# 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 ids; +--enable_warnings + +CREATE TABLE ids ( + id INT UNSIGNED, + value INT UNSIGNED, + KEY (id, value) +); + +INSERT INTO ids VALUES ( 1, 1); +INSERT INTO ids VALUES ( 2, 2); +INSERT INTO ids VALUES ( 4, 3); +INSERT INTO ids VALUES ( 8, 4); +INSERT INTO ids VALUES (16, 5); +INSERT INTO ids VALUES (32, 6); +INSERT INTO ids VALUES (64, 7); +INSERT INTO ids VALUES (128, 8); + +SELECT * FROM ids; +SELECT * FROM ids WHERE id BETWEEN 4 AND 32; + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_mediumint.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_mediumint.test new file mode 100644 index 00000000000..254345b6ec6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_mediumint.test @@ -0,0 +1,45 @@ +# Copyright(C) 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 +# 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 ids; +--enable_warnings + +CREATE TABLE ids ( + id MEDIUMINT, + value MEDIUMINT, + KEY (id, value) +); + +INSERT INTO ids VALUES ( -1, 16); +INSERT INTO ids VALUES ( -2, 8); +INSERT INTO ids VALUES ( -4, 4); +INSERT INTO ids VALUES ( -8, 2); +INSERT INTO ids VALUES (-16, 1); +INSERT INTO ids VALUES ( 16, -1); +INSERT INTO ids VALUES ( 8, -2); +INSERT INTO ids VALUES ( 4, -4); +INSERT INTO ids VALUES ( 2, -8); +INSERT INTO ids VALUES ( 1, -16); + +SELECT * FROM ids; +SELECT * FROM ids WHERE id BETWEEN -4 AND 8; + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_mediumint_unsigned.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_mediumint_unsigned.test new file mode 100644 index 00000000000..8975c5120cb --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_mediumint_unsigned.test @@ -0,0 +1,43 @@ +# Copyright(C) 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 +# 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 ids; +--enable_warnings + +CREATE TABLE ids ( + id MEDIUMINT UNSIGNED, + value MEDIUMINT UNSIGNED, + KEY (id, value) +); + +INSERT INTO ids VALUES ( 1, 1); +INSERT INTO ids VALUES ( 2, 2); +INSERT INTO ids VALUES ( 4, 3); +INSERT INTO ids VALUES ( 8, 4); +INSERT INTO ids VALUES (16, 5); +INSERT INTO ids VALUES (32, 6); +INSERT INTO ids VALUES (64, 7); +INSERT INTO ids VALUES (128, 8); + +SELECT * FROM ids; +SELECT * FROM ids WHERE id BETWEEN 4 AND 32; + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_smallint.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_smallint.test new file mode 100644 index 00000000000..4ed8c4b366e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_smallint.test @@ -0,0 +1,45 @@ +# Copyright(C) 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 +# 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 ids; +--enable_warnings + +CREATE TABLE ids ( + id SMALLINT, + value SMALLINT, + KEY (id, value) +); + +INSERT INTO ids VALUES ( -1, 16); +INSERT INTO ids VALUES ( -2, 8); +INSERT INTO ids VALUES ( -4, 4); +INSERT INTO ids VALUES ( -8, 2); +INSERT INTO ids VALUES (-16, 1); +INSERT INTO ids VALUES ( 16, -1); +INSERT INTO ids VALUES ( 8, -2); +INSERT INTO ids VALUES ( 4, -4); +INSERT INTO ids VALUES ( 2, -8); +INSERT INTO ids VALUES ( 1, -16); + +SELECT * FROM ids; +SELECT * FROM ids WHERE id BETWEEN -4 AND 8; + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_smallint_unsigned.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_smallint_unsigned.test new file mode 100644 index 00000000000..ef5da3e79c9 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_smallint_unsigned.test @@ -0,0 +1,43 @@ +# Copyright(C) 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 +# 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 ids; +--enable_warnings + +CREATE TABLE ids ( + id SMALLINT UNSIGNED, + value SMALLINT UNSIGNED, + KEY (id, value) +); + +INSERT INTO ids VALUES ( 1, 1); +INSERT INTO ids VALUES ( 2, 2); +INSERT INTO ids VALUES ( 4, 3); +INSERT INTO ids VALUES ( 8, 4); +INSERT INTO ids VALUES (16, 5); +INSERT INTO ids VALUES (32, 6); +INSERT INTO ids VALUES (64, 7); +INSERT INTO ids VALUES (128, 8); + +SELECT * FROM ids; +SELECT * FROM ids WHERE id BETWEEN 4 AND 32; + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_tinyint.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_tinyint.test new file mode 100644 index 00000000000..5c738fa567b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_tinyint.test @@ -0,0 +1,45 @@ +# Copyright(C) 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 +# 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 ids; +--enable_warnings + +CREATE TABLE ids ( + id TINYINT, + value TINYINT, + KEY (id, value) +); + +INSERT INTO ids VALUES ( -1, 16); +INSERT INTO ids VALUES ( -2, 8); +INSERT INTO ids VALUES ( -4, 4); +INSERT INTO ids VALUES ( -8, 2); +INSERT INTO ids VALUES (-16, 1); +INSERT INTO ids VALUES ( 16, -1); +INSERT INTO ids VALUES ( 8, -2); +INSERT INTO ids VALUES ( 4, -4); +INSERT INTO ids VALUES ( 2, -8); +INSERT INTO ids VALUES ( 1, -16); + +SELECT * FROM ids; +SELECT * FROM ids WHERE id BETWEEN -4 AND 8; + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_tinyint_unsigned.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_tinyint_unsigned.test new file mode 100644 index 00000000000..7f17f0031db --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_tinyint_unsigned.test @@ -0,0 +1,43 @@ +# Copyright(C) 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 +# 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 ids; +--enable_warnings + +CREATE TABLE ids ( + id TINYINT UNSIGNED, + value TINYINT UNSIGNED, + KEY (id, value) +); + +INSERT INTO ids VALUES ( 1, 1); +INSERT INTO ids VALUES ( 2, 2); +INSERT INTO ids VALUES ( 4, 3); +INSERT INTO ids VALUES ( 8, 4); +INSERT INTO ids VALUES (16, 5); +INSERT INTO ids VALUES (32, 6); +INSERT INTO ids VALUES (64, 7); +INSERT INTO ids VALUES (128, 8); + +SELECT * FROM ids; +SELECT * FROM ids WHERE id BETWEEN 4 AND 32; + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_varchar.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_varchar.test new file mode 100644 index 00000000000..ccd53a95237 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_varchar.test @@ -0,0 +1,44 @@ +# Copyright(C) 2012 Kentoku SHIBA +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ids; +--enable_warnings + +CREATE TABLE ids ( + id VARCHAR(5), + value VARCHAR(10), + KEY (id, value) +) DEFAULT CHARSET=utf8 COLLATE utf8_bin; + +INSERT INTO ids VALUES ("abc", "Abc"); +INSERT INTO ids VALUES ("acd", "aBc"); +INSERT INTO ids VALUES ("ade", "abC"); +INSERT INTO ids VALUES ("aef", "abc"); +INSERT INTO ids VALUES ("ABC", "aBC"); +INSERT INTO ids VALUES ("ACD", "AbC"); +INSERT INTO ids VALUES ("ADE", "ABc"); +INSERT INTO ids VALUES ("AEF", "ABC"); + +SELECT * FROM ids; +SELECT * FROM ids WHERE id BETWEEN "ab" AND "ad"; + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_varchar_collation.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_varchar_collation.test new file mode 100644 index 00000000000..1d799e76696 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_varchar_collation.test @@ -0,0 +1,43 @@ +# Copyright(C) 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 +# 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 ids; +--enable_warnings + +CREATE TABLE ids ( + id VARCHAR(5), + value VARCHAR(10), + KEY (id, value) +) DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; + +INSERT INTO ids VALUES ("abc", "Abc"); +INSERT INTO ids VALUES ("acd", "aBc"); +INSERT INTO ids VALUES ("ade", "abC"); +INSERT INTO ids VALUES ("aef", "abc"); +INSERT INTO ids VALUES ("ABC", "aBC"); +INSERT INTO ids VALUES ("ACD", "AbC"); +INSERT INTO ids VALUES ("ADE", "ABc"); +INSERT INTO ids VALUES ("AEF", "ABC"); + +SELECT * FROM ids; +SELECT * FROM ids WHERE id BETWEEN "ab" AND "ad"; + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_normal_int.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_normal_int.test new file mode 100644 index 00000000000..a7ff9f3a600 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_normal_int.test @@ -0,0 +1,41 @@ +# Copyright(C) 2012 Kentoku SHIBA +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ids; +--enable_warnings + +CREATE TABLE ids ( + id INT, + KEY (id) +); + +INSERT INTO ids VALUES (1); +INSERT INTO ids SELECT id + 1 FROM ids; +INSERT INTO ids SELECT id + 2 FROM ids; +INSERT INTO ids SELECT id + 4 FROM ids; +INSERT INTO ids SELECT id + 8 FROM ids; +INSERT INTO ids SELECT id + 16 FROM ids; + +SELECT * FROM ids; +SELECT * FROM ids WHERE id BETWEEN 10 AND 16; + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_normal_varchar.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_normal_varchar.test new file mode 100644 index 00000000000..4d094df41cd --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_normal_varchar.test @@ -0,0 +1,41 @@ +# Copyright(C) 2012 Kentoku SHIBA +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ids; +--enable_warnings + +CREATE TABLE ids ( + id VARCHAR(10), + KEY (id) +); + +INSERT INTO ids VALUES ("1"); +INSERT INTO ids SELECT id + "1" FROM ids; +INSERT INTO ids SELECT id + "2" FROM ids; +INSERT INTO ids SELECT id + "4" FROM ids; +INSERT INTO ids SELECT id + "8" FROM ids; +INSERT INTO ids SELECT id + "16" FROM ids; + +SELECT * FROM ids; +SELECT * FROM ids WHERE id BETWEEN "10" AND "16"; + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_primary_int.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_primary_int.test new file mode 100644 index 00000000000..68f132367f2 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_primary_int.test @@ -0,0 +1,41 @@ +# Copyright(C) 2012 Kentoku SHIBA +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ids; +--enable_warnings + +CREATE TABLE ids ( + id INT, + PRIMARY KEY (id) +); + +INSERT INTO ids VALUES (1); +INSERT INTO ids SELECT id + 1 FROM ids; +INSERT INTO ids SELECT id + 2 FROM ids; +INSERT INTO ids SELECT id + 4 FROM ids; +INSERT INTO ids SELECT id + 8 FROM ids; +INSERT INTO ids SELECT id + 16 FROM ids; + +SELECT * FROM ids; +SELECT * FROM ids WHERE id BETWEEN 10 AND 16; + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_primary_varchar.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_primary_varchar.test new file mode 100644 index 00000000000..aa9ba644062 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_primary_varchar.test @@ -0,0 +1,41 @@ +# Copyright(C) 2012 Kentoku SHIBA +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ids; +--enable_warnings + +CREATE TABLE ids ( + id VARCHAR(10), + PRIMARY KEY (id) +); + +INSERT INTO ids VALUES ("1"); +INSERT INTO ids SELECT id + "1" FROM ids; +INSERT INTO ids SELECT id + "2" FROM ids; +INSERT INTO ids SELECT id + "4" FROM ids; +INSERT INTO ids SELECT id + "8" FROM ids; +INSERT INTO ids SELECT id + "16" FROM ids; + +SELECT * FROM ids; +SELECT * FROM ids WHERE id BETWEEN "10" AND "16"; + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_delete_by_primary_key.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_delete_by_primary_key.test new file mode 100644 index 00000000000..2c1ec45c045 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_delete_by_primary_key.test @@ -0,0 +1,37 @@ +# Copyright(C) 2014 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +CREATE TABLE users ( + id int PRIMARY KEY, + name varchar(100) NOT NULL, + UNIQUE KEY name (name) +) DEFAULT CHARSET=utf8; + +INSERT INTO users VALUES (1, "Alice"); +DELETE FROM users WHERE id = 1; +INSERT INTO users VALUES (1, "Alice"); + +SELECT * FROM users; + +DROP TABLE users; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_insert_after_error.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_insert_after_error.test new file mode 100644 index 00000000000..6c47c877771 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_insert_after_error.test @@ -0,0 +1,38 @@ +# Copyright(C) 2014 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +CREATE TABLE users ( + id int PRIMARY KEY, + name varchar(100) NOT NULL, + UNIQUE KEY name (name) +) DEFAULT CHARSET=utf8; + +INSERT INTO users VALUES (1, "Alice"); +-- error ER_DUP_ENTRY +INSERT INTO users VALUES (1, "Bob"); +INSERT INTO users VALUES (2, "Bob"); + +SELECT * FROM users; + +DROP TABLE users; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_varchar.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_varchar.test new file mode 100644 index 00000000000..21446b302f2 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_varchar.test @@ -0,0 +1,36 @@ +# Copyright(C) 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 +# 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 users; +--enable_warnings + +CREATE TABLE users ( + name varchar(100) NOT NULL, + UNIQUE KEY name (name) +) DEFAULT CHARSET=utf8; + +INSERT INTO users VALUES ("Alice"); +INSERT INTO users VALUES ("Bob"); +SELECT * FROM users; + +SELECT * FROM users WHERE name = "aLiCe"; + +DROP TABLE users; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_update_multiple_column.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_update_multiple_column.test new file mode 100644 index 00000000000..bbf368551af --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_update_multiple_column.test @@ -0,0 +1,40 @@ +# Copyright(C) 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 +# 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 scores; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE scores ( + deleted BOOLEAN, + value INT, + INDEX (deleted, value) +); + +INSERT INTO scores VALUES (FALSE, 1); +INSERT INTO scores VALUES (FALSE, 1); +INSERT INTO scores VALUES (FALSE, 2); + +SELECT count(*) FROM scores WHERE deleted = FALSE; +UPDATE scores SET deleted = TRUE WHERE value = 1; +SELECT count(*) FROM scores WHERE deleted = FALSE; + +DROP TABLE scores; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_update_single_column.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_update_single_column.test new file mode 100644 index 00000000000..a0dc2f8a952 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_update_single_column.test @@ -0,0 +1,39 @@ +# Copyright(C) 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 +# 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 scores; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE scores ( + value INT, + INDEX (value) +); + +INSERT INTO scores VALUES (21); +INSERT INTO scores VALUES (21); +INSERT INTO scores VALUES (22); + +SELECT count(*) FROM scores WHERE value >= 20; +UPDATE scores SET value = 11 WHERE value = 21; +SELECT count(*) FROM scores WHERE value >= 20; + +DROP TABLE scores; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_plugins.test b/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_plugins.test new file mode 100644 index 00000000000..d22c6560c2c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_plugins.test @@ -0,0 +1,22 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# +# 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 + +select PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_TYPE + from information_schema.plugins where plugin_name = "Mroonga"; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_tables_auto_increment_none.test b/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_tables_auto_increment_none.test new file mode 100644 index 00000000000..2956e072302 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_tables_auto_increment_none.test @@ -0,0 +1,34 @@ +# Copyright(C) 2012 Kentoku SHIBA +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ids; +--enable_warnings + +CREATE TABLE ids ( + id INT PRIMARY KEY +); + +SELECT AUTO_INCREMENT + FROM INFORMATION_SCHEMA.TABLES + WHERE TABLE_NAME = "ids"; + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_tables_auto_increment_use.test b/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_tables_auto_increment_use.test new file mode 100644 index 00000000000..79e12fe67a9 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_tables_auto_increment_use.test @@ -0,0 +1,34 @@ +# Copyright(C) 2012 Kentoku SHIBA +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ids; +--enable_warnings + +CREATE TABLE ids ( + id INT AUTO_INCREMENT PRIMARY KEY +); + +SELECT AUTO_INCREMENT + FROM INFORMATION_SCHEMA.TABLES + WHERE TABLE_NAME = "ids"; + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_tables_data_length.test b/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_tables_data_length.test new file mode 100644 index 00000000000..82dd4fdf1c6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_tables_data_length.test @@ -0,0 +1,42 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES UTF8; +CREATE TABLE diaries ( + id INT PRIMARY KEY, + title VARCHAR(255), + content TEXT, + FULLTEXT INDEX (content) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries VALUES(1, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, "富士山", "今日も天気がよくてきれいに見える。"); + +SELECT COUNT(*) + FROM INFORMATION_SCHEMA.TABLES + WHERE TABLE_NAME = "diaries" AND DATA_LENGTH > 0; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/insert_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/storage/t/insert_TODO_SPLIT_ME.test new file mode 100644 index 00000000000..3fa85344dfa --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/insert_TODO_SPLIT_ME.test @@ -0,0 +1,105 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# +# 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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists t1, t2, t3; +--enable_warnings + +# data types +create table t1 (c1 tinyint); +insert into t1 values(1); +select * from t1; +drop table t1; + +create table t1 (c1 smallint); +insert into t1 values(1); +select * from t1; +drop table t1; + +create table t1 (c1 mediumint); +insert into t1 values(1); +select * from t1; +drop table t1; + +create table t1 (c1 int); +insert into t1 values(1); +select * from t1; +drop table t1; + +create table t1 (c1 bigint); +insert into t1 values(1); +select * from t1; +drop table t1; + +create table t1 (c1 float); +insert into t1 values(0.5); +select * from t1; +drop table t1; + +create table t1 (c1 double); +insert into t1 values(0.5); +select * from t1; +drop table t1; + +create table t1 (c1 date); +insert into t1 values("2010/03/26"); +select * from t1; +drop table t1; + +create table t1 (c1 time); +insert into t1 values("11:22:33"); +select * from t1; +drop table t1; + +create table t1 (c1 year); +insert into t1 values("2010"); +select * from t1; +drop table t1; + +create table t1 (c1 datetime); +insert into t1 values("2010/03/26 11:22:33"); +select * from t1; +drop table t1; + + +# for virtual columns +create table t1 (c1 int, _id int); +set sql_mode=""; +# warning WARN_DATA_TRUNCATED +insert into t1 (c1,_id) values (1,1); +set sql_mode="strict_all_tables"; +# We can't use WARN_DATA_TRUNCATED here because "WXXX" isn't supported +# MySQL 5.5, 5.6 and MariaDB 5.6. MariaDB 10.0 only supports it. +# We share this test with all MySQL servers. So we use number here. +--error 1265 +insert into t1 (c1,_id) values (4,1); +select * from t1; +drop table t1; + + +# duplicated key error +create table t1 (c1 int primary key, c2 int); +insert into t1 values(1,100); +select * from t1; +--error ER_DUP_ENTRY +insert into t1 values(1,200); +select * from t1; +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/insert_on_duplicate_key_update_no_primary_key_and_unique_key_twice.test b/storage/mroonga/mysql-test/mroonga/storage/t/insert_on_duplicate_key_update_no_primary_key_and_unique_key_twice.test new file mode 100644 index 00000000000..c3530dc34c0 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/insert_on_duplicate_key_update_no_primary_key_and_unique_key_twice.test @@ -0,0 +1,41 @@ +# Copyright(C) 2014 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS numbers; +--enable_warnings + +CREATE TABLE numbers ( + id INT, + count INT, + UNIQUE (id) +); + +INSERT INTO numbers (id, count) VALUES (1, 1) ON DUPLICATE KEY UPDATE count = 2; +INSERT INTO numbers (id, count) VALUES (1, 3) ON DUPLICATE KEY UPDATE count = 4; + +SELECT * FROM numbers; + +INSERT INTO numbers (id, count) VALUES (2, 1) ON DUPLICATE KEY UPDATE count = 2; +INSERT INTO numbers (id, count) VALUES (2, 3) ON DUPLICATE KEY UPDATE count = 4; + +SELECT * FROM numbers; + +DROP TABLE numbers; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/insert_on_duplicate_key_update_primary_key.test b/storage/mroonga/mysql-test/mroonga/storage/t/insert_on_duplicate_key_update_primary_key.test new file mode 100644 index 00000000000..794605d742b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/insert_on_duplicate_key_update_primary_key.test @@ -0,0 +1,43 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + day DATE PRIMARY KEY, + title TEXT +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (day, title) + VALUES ("2012-02-14", "clear day") + ON DUPLICATE KEY UPDATE title = "clear day (duplicated)"; +INSERT INTO diaries (day, title) + VALUES ("2012-02-14", "rainy day") + ON DUPLICATE KEY UPDATE title = "rainy day (duplicated)"; +INSERT INTO diaries (day, title) + VALUES ("2012-02-15", "cloudy day") + ON DUPLICATE KEY UPDATE title = "cloudy day (duplicated)"; + +SELECT * FROM diaries; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/insert_on_duplicate_key_update_unique_key.test b/storage/mroonga/mysql-test/mroonga/storage/t/insert_on_duplicate_key_update_unique_key.test new file mode 100644 index 00000000000..782b7bee9ca --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/insert_on_duplicate_key_update_unique_key.test @@ -0,0 +1,45 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + day DATE, + title TEXT, + UNIQUE KEY day (day) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (day, title) + VALUES ("2012-02-14", "clear day") + ON DUPLICATE KEY UPDATE title = "clear day (duplicated)"; +INSERT INTO diaries (day, title) + VALUES ("2012-02-14", "rainy day") + ON DUPLICATE KEY UPDATE title = "rainy day (duplicated)"; +INSERT INTO diaries (day, title) + VALUES ("2012-02-15", "cloudy day") + ON DUPLICATE KEY UPDATE title = "cloudy day (duplicated)"; + +SELECT * FROM diaries; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/like_unicode_ci.test b/storage/mroonga/mysql-test/mroonga/storage/t/like_unicode_ci.test new file mode 100644 index 00000000000..18801541b72 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/like_unicode_ci.test @@ -0,0 +1,37 @@ +# Copyright(C) 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 +# 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 terms; +--enable_warnings + +SET NAMES utf8; + +CREATE TABLE terms ( + content varchar(64) NOT NULL COLLATE 'utf8_unicode_ci', + INDEX (content) +) DEFAULT CHARSET=utf8; + +INSERT INTO terms VALUES ('track'); +INSERT INTO terms VALUES ('trackback'); + +SELECT * FROM terms WHERE content LIKE 'TRACK%'; + +DROP TABLE terms; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/lock_tables_read.test b/storage/mroonga/mysql-test/mroonga/storage/t/lock_tables_read.test new file mode 100644 index 00000000000..b7093f82aa5 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/lock_tables_read.test @@ -0,0 +1,32 @@ +# Copyright(C) 2013 Kenji Maruyama <mmmaru777@gmail.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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS counts; +--enable_warnings + +CREATE TABLE counts ( + id INT PRIMARY KEY AUTO_INCREMENT +); + +LOCK TABLES counts READ; +UNLOCK TABLES; + +DROP TABLE counts; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_not_optimized_disabled.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_not_optimized_disabled.test new file mode 100644 index 00000000000..8c818041a6c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_not_optimized_disabled.test @@ -0,0 +1,60 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +FLUSH STATUS; + +SET NAMES UTF8; +CREATE TABLE diaries ( + id INT UNSIGNED NOT NULL, + year INT UNSIGNED, + month INT UNSIGNED, + day INT UNSIGNED, + title VARCHAR(255), + content TEXT, + FULLTEXT INDEX(content), + KEY(month), + KEY(day) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気がよくてきれいに見える。"); +INSERT INTO diaries VALUES(4, 2011, 11, 12, "帰り道", "今日は天気がよくてよかった。"); +INSERT INTO diaries VALUES(5, 2011, 11, 13, "はれ", "天気がよいのは今日までみたい。"); +INSERT INTO diaries VALUES(6, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。"); +INSERT INTO diaries VALUES(7, 2011, 12, 2, "初雪", "今日の天気は雪!"); + +SET mroonga_enable_optimization=FALSE; + +SELECT * FROM diaries + WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) AND + month = 11 + ORDER BY day LIMIT 1,2; + +SHOW STATUS LIKE 'mroonga_fast_order_limit'; + +SET mroonga_enable_optimization=TRUE; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_not_optimized_no_limit.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_not_optimized_no_limit.test new file mode 100644 index 00000000000..d75a6460218 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_not_optimized_no_limit.test @@ -0,0 +1,55 @@ +# Copyright(C) 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 +# 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 diaries; +--enable_warnings + +FLUSH STATUS; + +SET NAMES UTF8; +CREATE TABLE diaries ( + id INT UNSIGNED NOT NULL, + year INT UNSIGNED, + month INT UNSIGNED, + day INT UNSIGNED, + title VARCHAR(255), + content TEXT, + FULLTEXT INDEX(content), + KEY(month), + KEY(day) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気がよくてきれいに見える。"); +INSERT INTO diaries VALUES(4, 2011, 11, 12, "帰り道", "今日は天気がよくてよかった。"); +INSERT INTO diaries VALUES(5, 2011, 11, 13, "はれ", "天気がよいのは今日までみたい。"); +INSERT INTO diaries VALUES(6, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。"); +INSERT INTO diaries VALUES(7, 2011, 12, 2, "初雪", "今日の天気は雪!"); + +SELECT * FROM diaries + WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) + ORDER BY day; + +SHOW STATUS LIKE 'mroonga_fast_order_limit'; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_between.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_between.test new file mode 100644 index 00000000000..61e16a9444d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_between.test @@ -0,0 +1,50 @@ +# Copyright(C) 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 +# 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 diaries; +--enable_warnings + +FLUSH STATUS; + +SET NAMES UTF8; +CREATE TABLE diaries ( + id INT UNSIGNED NOT NULL, + date DATETIME, + content TEXT, + FULLTEXT INDEX(content), + KEY(date) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries VALUES(1, "2011-11-11 12:23:30", "Today is fine."); +INSERT INTO diaries VALUES(2, "2011-11-11 12:23:31", "Today's lucky item is flower!"); +INSERT INTO diaries VALUES(3, "2011-11-11 12:23:32", "I will do something today!"); +INSERT INTO diaries VALUES(4, "2011-11-11 12:23:33", "I don't want to anything today..."); +INSERT INTO diaries VALUES(5, "2011-11-11 12:23:34", "I'm sleepy today."); + +SELECT * FROM diaries + WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND + date BETWEEN "2011-11-11 12:23:31" AND "2011-11-11 12:23:33" + ORDER BY id LIMIT 1,2; + +SHOW STATUS LIKE 'mroonga_fast_order_limit'; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_between_over.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_between_over.test new file mode 100644 index 00000000000..4b75648009b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_between_over.test @@ -0,0 +1,50 @@ +# Copyright(C) 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 +# 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 diaries; +--enable_warnings + +FLUSH STATUS; + +SET NAMES UTF8; +CREATE TABLE diaries ( + id INT UNSIGNED NOT NULL, + date DATETIME, + content TEXT, + FULLTEXT INDEX(content), + KEY(date) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries VALUES(1, "2011-11-11 12:23:30", "Today is fine."); +INSERT INTO diaries VALUES(2, "2011-11-11 12:23:31", "Today's lucky item is flower!"); +INSERT INTO diaries VALUES(3, "2011-11-11 12:23:32", "I will do something today!"); +INSERT INTO diaries VALUES(4, "2011-11-11 12:23:33", "I don't want to anything today..."); +INSERT INTO diaries VALUES(5, "2011-11-11 12:23:34", "I'm sleepy today."); + +SELECT * FROM diaries + WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND + date BETWEEN "2011-11-11 12:23:31" AND "2011-11-11 12:23:43" + ORDER BY id LIMIT 1,2; + +SHOW STATUS LIKE 'mroonga_fast_order_limit'; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_equal.test new file mode 100644 index 00000000000..f3b4be95b3a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_equal.test @@ -0,0 +1,50 @@ +# Copyright(C) 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 +# 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 diaries; +--enable_warnings + +FLUSH STATUS; + +SET NAMES UTF8; +CREATE TABLE diaries ( + id INT UNSIGNED NOT NULL, + date DATETIME, + content TEXT, + FULLTEXT INDEX(content), + KEY(date) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries VALUES(1, "2011-11-11 12:23:34", "Today is fine."); +INSERT INTO diaries VALUES(2, "2011-11-11 12:23:34", "Tomorrow will be fine."); +INSERT INTO diaries VALUES(3, "2011-11-11 12:23:34", "I will do something today!"); +INSERT INTO diaries VALUES(4, "2011-11-11 12:23:34", "I don't want to anything today..."); +INSERT INTO diaries VALUES(5, "2011-11-11 12:23:34", "I'm sleepy today."); + +SELECT * FROM diaries + WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND + date = "2011-11-11 12:23:34" + ORDER BY id LIMIT 1,2; + +SHOW STATUS LIKE 'mroonga_fast_order_limit'; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_greater_than.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_greater_than.test new file mode 100644 index 00000000000..ce5724b8b0b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_greater_than.test @@ -0,0 +1,50 @@ +# Copyright(C) 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 +# 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 diaries; +--enable_warnings + +FLUSH STATUS; + +SET NAMES UTF8; +CREATE TABLE diaries ( + id INT UNSIGNED NOT NULL, + date DATETIME, + content TEXT, + FULLTEXT INDEX(content), + KEY(date) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries VALUES(1, "2011-11-11 12:23:30", "Today is fine."); +INSERT INTO diaries VALUES(2, "2011-11-11 12:23:31", "Today's lucky item is flower!"); +INSERT INTO diaries VALUES(3, "2011-11-11 12:23:32", "I will do something today!"); +INSERT INTO diaries VALUES(4, "2011-11-11 12:23:33", "I don't want to anything today..."); +INSERT INTO diaries VALUES(5, "2011-11-11 12:23:34", "I'm sleepy today."); + +SELECT * FROM diaries + WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND + date > "2011-11-11 12:23:31" + ORDER BY id LIMIT 1,2; + +SHOW STATUS LIKE 'mroonga_fast_order_limit'; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_greater_than_or_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_greater_than_or_equal.test new file mode 100644 index 00000000000..4c55ba2a895 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_greater_than_or_equal.test @@ -0,0 +1,50 @@ +# Copyright(C) 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 +# 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 diaries; +--enable_warnings + +FLUSH STATUS; + +SET NAMES UTF8; +CREATE TABLE diaries ( + id INT UNSIGNED NOT NULL, + date DATETIME, + content TEXT, + FULLTEXT INDEX(content), + KEY(date) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries VALUES(1, "2011-11-11 12:23:30", "Today is fine."); +INSERT INTO diaries VALUES(2, "2011-11-11 12:23:31", "Today's lucky item is flower!"); +INSERT INTO diaries VALUES(3, "2011-11-11 12:23:32", "I will do something today!"); +INSERT INTO diaries VALUES(4, "2011-11-11 12:23:33", "I don't want to anything today..."); +INSERT INTO diaries VALUES(5, "2011-11-11 12:23:34", "I'm sleepy today."); + +SELECT * FROM diaries + WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND + date >= "2011-11-11 12:23:31" + ORDER BY id LIMIT 1,2; + +SHOW STATUS LIKE 'mroonga_fast_order_limit'; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_less_than.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_less_than.test new file mode 100644 index 00000000000..36f0e0ab6f2 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_less_than.test @@ -0,0 +1,50 @@ +# Copyright(C) 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 +# 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 diaries; +--enable_warnings + +FLUSH STATUS; + +SET NAMES UTF8; +CREATE TABLE diaries ( + id INT UNSIGNED NOT NULL, + date DATETIME, + content TEXT, + FULLTEXT INDEX(content), + KEY(date) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries VALUES(1, "2011-11-11 12:23:30", "Today is fine."); +INSERT INTO diaries VALUES(2, "2011-11-11 12:23:31", "Today's lucky item is flower!"); +INSERT INTO diaries VALUES(3, "2011-11-11 12:23:32", "I will do something today!"); +INSERT INTO diaries VALUES(4, "2011-11-11 12:23:33", "I don't want to anything today..."); +INSERT INTO diaries VALUES(5, "2011-11-11 12:23:34", "I'm sleepy today."); + +SELECT * FROM diaries + WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND + date < "2011-11-11 12:23:33" + ORDER BY id LIMIT 1,2; + +SHOW STATUS LIKE 'mroonga_fast_order_limit'; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_less_than_or_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_less_than_or_equal.test new file mode 100644 index 00000000000..3fc1505fcc2 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_less_than_or_equal.test @@ -0,0 +1,50 @@ +# Copyright(C) 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 +# 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 diaries; +--enable_warnings + +FLUSH STATUS; + +SET NAMES UTF8; +CREATE TABLE diaries ( + id INT UNSIGNED NOT NULL, + date DATETIME, + content TEXT, + FULLTEXT INDEX(content), + KEY(date) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries VALUES(1, "2011-11-11 12:23:30", "Today is fine."); +INSERT INTO diaries VALUES(2, "2011-11-11 12:23:31", "Today's lucky item is flower!"); +INSERT INTO diaries VALUES(3, "2011-11-11 12:23:32", "I will do something today!"); +INSERT INTO diaries VALUES(4, "2011-11-11 12:23:33", "I don't want to anything today..."); +INSERT INTO diaries VALUES(5, "2011-11-11 12:23:34", "I'm sleepy today."); + +SELECT * FROM diaries + WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND + date <= "2011-11-11 12:23:33" + ORDER BY id LIMIT 1,2; + +SHOW STATUS LIKE 'mroonga_fast_order_limit'; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_have_primary_key.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_have_primary_key.test new file mode 100644 index 00000000000..0733a48ba97 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_have_primary_key.test @@ -0,0 +1,51 @@ +# Copyright(C) 2011 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +FLUSH STATUS; + +SET NAMES UTF8; +CREATE TABLE diaries ( + id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + year INT UNSIGNED, + month INT UNSIGNED, + day INT UNSIGNED, + title VARCHAR(255), + content TEXT, + FULLTEXT INDEX(content), + KEY(day) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気がよくてきれいに見える。"); +INSERT INTO diaries VALUES(4, 2011, 11, 11, "帰り道", "今日は天気がよくてよかった。"); +INSERT INTO diaries VALUES(5, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。"); +INSERT INTO diaries VALUES(6, 2011, 12, 2, "初雪", "今日の天気は雪!"); + +SELECT * FROM diaries WHERE MATCH(content) AGAINST("今日 天気" IN BOOLEAN MODE) ORDER BY day LIMIT 0,5; + +SHOW STATUS LIKE 'mroonga_fast_order_limit'; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_between.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_between.test new file mode 100644 index 00000000000..f96043b4e37 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_between.test @@ -0,0 +1,48 @@ +# Copyright(C) 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 +# 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 memos; +--enable_warnings + +FLUSH STATUS; + +SET NAMES UTF8; +CREATE TABLE memos ( + id INT UNSIGNED, + content TEXT, + FULLTEXT INDEX(content), + KEY(id) +) DEFAULT CHARSET UTF8; + +INSERT INTO memos VALUES(1, "Today is fine."); +INSERT INTO memos VALUES(2, "Today's lucky item is flower!"); +INSERT INTO memos VALUES(3, "I will do something today!"); +INSERT INTO memos VALUES(4, "I don't want to anything today..."); +INSERT INTO memos VALUES(5, "I'm sleepy today."); + +SELECT * FROM memos + WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND + id BETWEEN 2 AND 4 + ORDER BY id LIMIT 1,2; + +SHOW STATUS LIKE 'mroonga_fast_order_limit'; + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_between_over.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_between_over.test new file mode 100644 index 00000000000..39caa96424c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_between_over.test @@ -0,0 +1,48 @@ +# Copyright(C) 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 +# 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 memos; +--enable_warnings + +FLUSH STATUS; + +SET NAMES UTF8; +CREATE TABLE memos ( + id INT UNSIGNED, + content TEXT, + FULLTEXT INDEX(content), + KEY(id) +) DEFAULT CHARSET UTF8; + +INSERT INTO memos VALUES(1, "Today is fine."); +INSERT INTO memos VALUES(2, "Today's lucky item is flower!"); +INSERT INTO memos VALUES(3, "I will do something today!"); +INSERT INTO memos VALUES(4, "I don't want to anything today..."); +INSERT INTO memos VALUES(5, "I'm sleepy today."); + +SELECT * FROM memos + WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND + id BETWEEN 2 AND 6 + ORDER BY id LIMIT 1,2; + +SHOW STATUS LIKE 'mroonga_fast_order_limit'; + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_equal.test new file mode 100644 index 00000000000..579b7b33899 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_equal.test @@ -0,0 +1,56 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +FLUSH STATUS; + +SET NAMES UTF8; +CREATE TABLE diaries ( + id INT UNSIGNED NOT NULL, + year INT UNSIGNED, + month INT UNSIGNED, + day INT UNSIGNED, + title VARCHAR(255), + content TEXT, + FULLTEXT INDEX(content), + KEY(month), + KEY(day) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気がよくてきれいに見える。"); +INSERT INTO diaries VALUES(4, 2011, 11, 12, "帰り道", "今日は天気がよくてよかった。"); +INSERT INTO diaries VALUES(5, 2011, 11, 13, "はれ", "天気がよいのは今日までみたい。"); +INSERT INTO diaries VALUES(6, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。"); +INSERT INTO diaries VALUES(7, 2011, 12, 2, "初雪", "今日の天気は雪!"); + +SELECT * FROM diaries + WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) AND + month = 11 + ORDER BY day LIMIT 1,2; + +SHOW STATUS LIKE 'mroonga_fast_order_limit'; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_greater_than.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_greater_than.test new file mode 100644 index 00000000000..c7354438224 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_greater_than.test @@ -0,0 +1,56 @@ +# Copyright(C) 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 +# 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 diaries; +--enable_warnings + +FLUSH STATUS; + +SET NAMES UTF8; +CREATE TABLE diaries ( + id INT UNSIGNED NOT NULL, + year INT UNSIGNED, + month INT UNSIGNED, + day INT UNSIGNED, + title VARCHAR(255), + content TEXT, + FULLTEXT INDEX(content), + KEY(month), + KEY(day) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気がよくてきれいに見える。"); +INSERT INTO diaries VALUES(4, 2011, 11, 12, "帰り道", "今日は天気がよくてよかった。"); +INSERT INTO diaries VALUES(5, 2011, 11, 13, "はれ", "天気がよいのは今日までみたい。"); +INSERT INTO diaries VALUES(6, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。"); +INSERT INTO diaries VALUES(7, 2011, 12, 2, "初雪", "今日の天気は雪!"); + +SELECT * FROM diaries + WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) AND + day > 10 + ORDER BY day LIMIT 1,2; + +SHOW STATUS LIKE 'mroonga_fast_order_limit'; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_greater_than_or_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_greater_than_or_equal.test new file mode 100644 index 00000000000..259e2e5178d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_greater_than_or_equal.test @@ -0,0 +1,56 @@ +# Copyright(C) 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 +# 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 diaries; +--enable_warnings + +FLUSH STATUS; + +SET NAMES UTF8; +CREATE TABLE diaries ( + id INT UNSIGNED NOT NULL, + year INT UNSIGNED, + month INT UNSIGNED, + day INT UNSIGNED, + title VARCHAR(255), + content TEXT, + FULLTEXT INDEX(content), + KEY(month), + KEY(day) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気がよくてきれいに見える。"); +INSERT INTO diaries VALUES(4, 2011, 11, 12, "帰り道", "今日は天気がよくてよかった。"); +INSERT INTO diaries VALUES(5, 2011, 11, 13, "はれ", "天気がよいのは今日までみたい。"); +INSERT INTO diaries VALUES(6, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。"); +INSERT INTO diaries VALUES(7, 2011, 12, 2, "初雪", "今日の天気は雪!"); + +SELECT * FROM diaries + WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) AND + day >= 10 + ORDER BY day LIMIT 1,2; + +SHOW STATUS LIKE 'mroonga_fast_order_limit'; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_less_than.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_less_than.test new file mode 100644 index 00000000000..02c2123afef --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_less_than.test @@ -0,0 +1,56 @@ +# Copyright(C) 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 +# 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 diaries; +--enable_warnings + +FLUSH STATUS; + +SET NAMES UTF8; +CREATE TABLE diaries ( + id INT UNSIGNED NOT NULL, + year INT UNSIGNED, + month INT UNSIGNED, + day INT UNSIGNED, + title VARCHAR(255), + content TEXT, + FULLTEXT INDEX(content), + KEY(month), + KEY(day) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気がよくてきれいに見える。"); +INSERT INTO diaries VALUES(4, 2011, 11, 12, "帰り道", "今日は天気がよくてよかった。"); +INSERT INTO diaries VALUES(5, 2011, 11, 13, "はれ", "天気がよいのは今日までみたい。"); +INSERT INTO diaries VALUES(6, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。"); +INSERT INTO diaries VALUES(7, 2011, 12, 2, "初雪", "今日の天気は雪!"); + +SELECT * FROM diaries + WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) AND + day < 12 + ORDER BY day LIMIT 1,2; + +SHOW STATUS LIKE 'mroonga_fast_order_limit'; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_less_than_or_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_less_than_or_equal.test new file mode 100644 index 00000000000..0511de74442 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_less_than_or_equal.test @@ -0,0 +1,56 @@ +# Copyright(C) 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 +# 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 diaries; +--enable_warnings + +FLUSH STATUS; + +SET NAMES UTF8; +CREATE TABLE diaries ( + id INT UNSIGNED NOT NULL, + year INT UNSIGNED, + month INT UNSIGNED, + day INT UNSIGNED, + title VARCHAR(255), + content TEXT, + FULLTEXT INDEX(content), + KEY(month), + KEY(day) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気がよくてきれいに見える。"); +INSERT INTO diaries VALUES(4, 2011, 11, 12, "帰り道", "今日は天気がよくてよかった。"); +INSERT INTO diaries VALUES(5, 2011, 11, 13, "はれ", "天気がよいのは今日までみたい。"); +INSERT INTO diaries VALUES(6, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。"); +INSERT INTO diaries VALUES(7, 2011, 12, 2, "初雪", "今日の天気は雪!"); + +SELECT * FROM diaries + WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) AND + day <= 12 + ORDER BY day LIMIT 1,2; + +SHOW STATUS LIKE 'mroonga_fast_order_limit'; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_no_primary_key.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_no_primary_key.test new file mode 100644 index 00000000000..b757b39e9ce --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_no_primary_key.test @@ -0,0 +1,51 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +FLUSH STATUS; + +SET NAMES UTF8; +CREATE TABLE diaries ( + id INT UNSIGNED NOT NULL, + year INT UNSIGNED, + month INT UNSIGNED, + day INT UNSIGNED, + title VARCHAR(255), + content TEXT, + FULLTEXT INDEX(content), + KEY(day) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気がよくてきれいに見える。"); +INSERT INTO diaries VALUES(4, 2011, 11, 11, "帰り道", "今日は天気がよくてよかった。"); +INSERT INTO diaries VALUES(5, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。"); +INSERT INTO diaries VALUES(6, 2011, 12, 2, "初雪", "今日の天気は雪!"); + +SELECT * FROM diaries WHERE MATCH(content) AGAINST("今日 天気" IN BOOLEAN MODE) ORDER BY day LIMIT 0,5; + +SHOW STATUS LIKE 'mroonga_fast_order_limit'; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_no_where_clause.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_no_where_clause.test new file mode 100644 index 00000000000..b4d7aa348f0 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_no_where_clause.test @@ -0,0 +1,39 @@ +# 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 + +flush status; +create table t1 (c1 int primary key, c2 int, c3 text, _id int, key idx1(c2), fulltext index ft(c3)) default charset utf8; +insert into t1 values(1,10,"aa ii uu ee oo",null); +insert into t1 values(2,20,"ka ki ku ke ko",null); +insert into t1 values(3,30,"ii si ii se ii",null); +insert into t1 values(4,40,"ta ti tu te to",null); +insert into t1 values(5,50,"aa ii uu ii oo",null); + +show status like 'mroonga_fast_order_limit'; + +select *, match(c3) against("ii") from t1 order by c1 desc limit 2; + +show status like 'mroonga_fast_order_limit'; + +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_asc.test new file mode 100644 index 00000000000..74da8581596 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_asc.test @@ -0,0 +1,55 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +FLUSH STATUS; + +SET NAMES UTF8; +CREATE TABLE diaries ( + id INT UNSIGNED NOT NULL, + year INT UNSIGNED, + month INT UNSIGNED, + day INT UNSIGNED, + title VARCHAR(255), + content TEXT, + FULLTEXT INDEX(content), + KEY(month), + KEY(day) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気がよくてきれいに見える。"); +INSERT INTO diaries VALUES(4, 2011, 11, 12, "帰り道", "今日は天気がよくてよかった。"); +INSERT INTO diaries VALUES(5, 2011, 11, 13, "はれ", "天気がよいのは今日までみたい。"); +INSERT INTO diaries VALUES(6, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。"); +INSERT INTO diaries VALUES(7, 2011, 12, 2, "初雪", "今日の天気は雪!"); + +SELECT * FROM diaries + WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) + ORDER BY day ASC LIMIT 1; + +SHOW STATUS LIKE 'mroonga_fast_order_limit'; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_desc.test new file mode 100644 index 00000000000..2e5d0741c51 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_desc.test @@ -0,0 +1,55 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +FLUSH STATUS; + +SET NAMES UTF8; +CREATE TABLE diaries ( + id INT UNSIGNED NOT NULL, + year INT UNSIGNED, + month INT UNSIGNED, + day INT UNSIGNED, + title VARCHAR(255), + content TEXT, + FULLTEXT INDEX(content), + KEY(month), + KEY(day) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気がよくてきれいに見える。"); +INSERT INTO diaries VALUES(4, 2011, 11, 12, "帰り道", "今日は天気がよくてよかった。"); +INSERT INTO diaries VALUES(5, 2011, 11, 13, "はれ", "天気がよいのは今日までみたい。"); +INSERT INTO diaries VALUES(6, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。"); +INSERT INTO diaries VALUES(7, 2011, 12, 2, "初雪", "今日の天気は雪!"); + +SELECT * FROM diaries + WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) + ORDER BY day DESC LIMIT 1; + +SHOW STATUS LIKE 'mroonga_fast_order_limit'; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_id.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_id.test new file mode 100644 index 00000000000..d7becd3820a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_id.test @@ -0,0 +1,57 @@ +# Copyright(C) 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 +# 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 diaries; +--enable_warnings + +FLUSH STATUS; + +SET NAMES UTF8; +CREATE TABLE diaries ( + _id INT, + id INT UNSIGNED NOT NULL, + year INT UNSIGNED, + month INT UNSIGNED, + day INT UNSIGNED, + title VARCHAR(255), + content TEXT, + FULLTEXT INDEX(content), + KEY(month), + KEY(day) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries VALUES(NULL, 1, 2011, 11, 9, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(NULL, 2, 2011, 11, 10, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(NULL, 3, 2011, 11, 11, "富士山", "今日も天気がよくてきれいに見える。"); +INSERT INTO diaries VALUES(NULL, 4, 2011, 11, 12, "帰り道", "今日は天気がよくてよかった。"); +INSERT INTO diaries VALUES(NULL, 5, 2011, 11, 13, "はれ", "天気がよいのは今日までみたい。"); +INSERT INTO diaries VALUES(NULL, 6, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。"); +INSERT INTO diaries VALUES(NULL, 7, 2011, 12, 2, "初雪", "今日の天気は雪!"); + +SELECT * FROM diaries + WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) + ORDER BY _id + LIMIT 1; + +SHOW STATUS LIKE 'mroonga_fast_order_limit'; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_match_against.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_match_against.test new file mode 100644 index 00000000000..827faa70fa9 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_match_against.test @@ -0,0 +1,56 @@ +# Copyright(C) 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 +# 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 diaries; +--enable_warnings + +FLUSH STATUS; + +SET NAMES UTF8; +CREATE TABLE diaries ( + id INT UNSIGNED NOT NULL, + year INT UNSIGNED, + month INT UNSIGNED, + day INT UNSIGNED, + title VARCHAR(255), + content TEXT, + FULLTEXT INDEX(content), + KEY(month), + KEY(day) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気がよくてきれいに見える。"); +INSERT INTO diaries VALUES(4, 2011, 11, 12, "帰り道", "今日は天気がよくてよかった。"); +INSERT INTO diaries VALUES(5, 2011, 11, 13, "はれ", "天気がよいのは今日までみたい。"); +INSERT INTO diaries VALUES(6, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。"); +INSERT INTO diaries VALUES(7, 2011, 12, 2, "初雪", "今日の天気は雪!"); + +SELECT * FROM diaries + WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) + ORDER BY MATCH(content) AGAINST("今日" IN BOOLEAN MODE) + LIMIT 1; + +SHOW STATUS LIKE 'mroonga_fast_order_limit'; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_select_match_against.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_select_match_against.test new file mode 100644 index 00000000000..04a2309e98e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_select_match_against.test @@ -0,0 +1,57 @@ +# Copyright(C) 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 +# 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 diaries; +--enable_warnings + +FLUSH STATUS; + +SET NAMES UTF8; +CREATE TABLE diaries ( + id INT UNSIGNED NOT NULL, + year INT UNSIGNED, + month INT UNSIGNED, + day INT UNSIGNED, + title VARCHAR(255), + content TEXT, + FULLTEXT INDEX(content), + KEY(month), + KEY(day) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気がよくてきれいに見える。"); +INSERT INTO diaries VALUES(4, 2011, 11, 12, "帰り道", "今日は天気がよくてよかった。"); +INSERT INTO diaries VALUES(5, 2011, 11, 13, "はれ", "天気がよいのは今日までみたい。"); +INSERT INTO diaries VALUES(6, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。"); +INSERT INTO diaries VALUES(7, 2011, 12, 2, "初雪", "今日の天気は雪!"); + +SELECT *, MATCH(content) AGAINST("今日" IN BOOLEAN MODE) + FROM diaries + WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) + ORDER BY MATCH(content) AGAINST("今日" IN BOOLEAN MODE) + LIMIT 1; + +SHOW STATUS LIKE 'mroonga_fast_order_limit'; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_between.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_between.test new file mode 100644 index 00000000000..8c8fafc076c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_between.test @@ -0,0 +1,50 @@ +# Copyright(C) 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 +# 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 memos; +--enable_warnings + +FLUSH STATUS; + +SET NAMES UTF8; +CREATE TABLE memos ( + id INT UNSIGNED NOT NULL, + writing_time TIME, + content TEXT, + FULLTEXT INDEX(content), + KEY(writing_time) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE memos; + +INSERT INTO memos VALUES(1, "1:23:30", "Today is fine."); +INSERT INTO memos VALUES(2, "1:23:31", "Today's lucky item is flower!"); +INSERT INTO memos VALUES(3, "1:23:32", "I will do something today!"); +INSERT INTO memos VALUES(4, "1:23:33", "I don't want to anything today..."); +INSERT INTO memos VALUES(5, "1:23:34", "I'm sleepy today."); + +SELECT * FROM memos + WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND + writing_time BETWEEN "1:23:31" AND "1:23:33" + ORDER BY id LIMIT 1,2; + +SHOW STATUS LIKE 'mroonga_fast_order_limit'; + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_between_over.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_between_over.test new file mode 100644 index 00000000000..9f9848b7e7e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_between_over.test @@ -0,0 +1,50 @@ +# Copyright(C) 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 +# 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 memos; +--enable_warnings + +FLUSH STATUS; + +SET NAMES UTF8; +CREATE TABLE memos ( + id INT UNSIGNED NOT NULL, + writing_time TIME, + content TEXT, + FULLTEXT INDEX(content), + KEY(writing_time) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE memos; + +INSERT INTO memos VALUES(1, "1:23:30", "Today is fine."); +INSERT INTO memos VALUES(2, "1:23:31", "Today's lucky item is flower!"); +INSERT INTO memos VALUES(3, "1:23:32", "I will do something today!"); +INSERT INTO memos VALUES(4, "1:23:33", "I don't want to anything today..."); +INSERT INTO memos VALUES(5, "1:23:34", "I'm sleepy today."); + +SELECT * FROM memos + WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND + writing_time BETWEEN "1:23:31" AND "1:23:43" + ORDER BY id LIMIT 1,2; + +SHOW STATUS LIKE 'mroonga_fast_order_limit'; + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_equal.test new file mode 100644 index 00000000000..04efd54eb48 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_equal.test @@ -0,0 +1,50 @@ +# Copyright(C) 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 +# 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 memos; +--enable_warnings + +FLUSH STATUS; + +SET NAMES UTF8; +CREATE TABLE memos ( + id INT UNSIGNED NOT NULL, + writing_time TIME, + content TEXT, + FULLTEXT INDEX(content), + KEY(writing_time) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE memos; + +INSERT INTO memos VALUES(1, "1:23:34", "Today is fine."); +INSERT INTO memos VALUES(2, "1:23:34", "Tomorrow will be fine."); +INSERT INTO memos VALUES(3, "1:23:34", "I will do something today!"); +INSERT INTO memos VALUES(4, "1:23:34", "I don't want to anything today..."); +INSERT INTO memos VALUES(5, "1:23:34", "I'm sleepy today."); + +SELECT * FROM memos + WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND + writing_time = "1:23:34" + ORDER BY id LIMIT 1,2; + +SHOW STATUS LIKE 'mroonga_fast_order_limit'; + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_greater_than.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_greater_than.test new file mode 100644 index 00000000000..b2ec8b78198 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_greater_than.test @@ -0,0 +1,50 @@ +# Copyright(C) 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 +# 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 memos; +--enable_warnings + +FLUSH STATUS; + +SET NAMES UTF8; +CREATE TABLE memos ( + id INT UNSIGNED NOT NULL, + writing_time TIME, + content TEXT, + FULLTEXT INDEX(content), + KEY(writing_time) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE memos; + +INSERT INTO memos VALUES(1, "1:23:30", "Today is fine."); +INSERT INTO memos VALUES(2, "1:23:31", "Today's lucky item is flower!" ); +INSERT INTO memos VALUES(3, "1:23:32", "I will do something today!"); +INSERT INTO memos VALUES(4, "1:23:33", "I don't want to anything today..."); +INSERT INTO memos VALUES(5, "1:23:34", "I'm sleepy today."); + +SELECT * FROM memos + WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND + writing_time > "1:23:31" + ORDER BY id LIMIT 1,2; + +SHOW STATUS LIKE 'mroonga_fast_order_limit'; + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_greater_than_or_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_greater_than_or_equal.test new file mode 100644 index 00000000000..0b9964eb542 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_greater_than_or_equal.test @@ -0,0 +1,50 @@ +# Copyright(C) 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 +# 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 memos; +--enable_warnings + +FLUSH STATUS; + +SET NAMES UTF8; +CREATE TABLE memos ( + id INT UNSIGNED NOT NULL, + writing_time TIME, + content TEXT, + FULLTEXT INDEX(content), + KEY(writing_time) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE memos; + +INSERT INTO memos VALUES(1, "1:23:30", "Today is fine."); +INSERT INTO memos VALUES(2, "1:23:31", "Today's lucky item is flower!" ); +INSERT INTO memos VALUES(3, "1:23:32", "I will do something today!"); +INSERT INTO memos VALUES(4, "1:23:33", "I don't want to anything today..."); +INSERT INTO memos VALUES(5, "1:23:34", "I'm sleepy today."); + +SELECT * FROM memos + WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND + writing_time >= "1:23:31" + ORDER BY id LIMIT 1,2; + +SHOW STATUS LIKE 'mroonga_fast_order_limit'; + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_less_than.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_less_than.test new file mode 100644 index 00000000000..ce772a2ee6d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_less_than.test @@ -0,0 +1,50 @@ +# Copyright(C) 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 +# 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 memos; +--enable_warnings + +FLUSH STATUS; + +SET NAMES UTF8; +CREATE TABLE memos ( + id INT UNSIGNED NOT NULL, + writing_time TIME, + content TEXT, + FULLTEXT INDEX(content), + KEY(writing_time) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE memos; + +INSERT INTO memos VALUES(1, "1:23:30", "Today is fine."); +INSERT INTO memos VALUES(2, "1:23:31", "Today's lucky item is flower!"); +INSERT INTO memos VALUES(3, "1:23:32", "I will do something today!"); +INSERT INTO memos VALUES(4, "1:23:33", "I don't want to anything today..."); +INSERT INTO memos VALUES(5, "1:23:34", "I'm sleepy today."); + +SELECT * FROM memos + WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND + writing_time < "1:23:33" + ORDER BY id LIMIT 1,2; + +SHOW STATUS LIKE 'mroonga_fast_order_limit'; + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_less_than_or_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_less_than_or_equal.test new file mode 100644 index 00000000000..797bd935eaa --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_less_than_or_equal.test @@ -0,0 +1,50 @@ +# Copyright(C) 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 +# 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 memos; +--enable_warnings + +FLUSH STATUS; + +SET NAMES UTF8; +CREATE TABLE memos ( + id INT UNSIGNED NOT NULL, + writing_time TIME, + content TEXT, + FULLTEXT INDEX(content), + KEY(writing_time) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE memos; + +INSERT INTO memos VALUES(1, "1:23:30", "Today is fine."); +INSERT INTO memos VALUES(2, "1:23:31", "Today's lucky item is flower!"); +INSERT INTO memos VALUES(3, "1:23:32", "I will do something today!"); +INSERT INTO memos VALUES(4, "1:23:33", "I don't want to anything today..."); +INSERT INTO memos VALUES(5, "1:23:34", "I'm sleepy today."); + +SELECT * FROM memos + WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND + writing_time <= "1:23:33" + ORDER BY id LIMIT 1,2; + +SHOW STATUS LIKE 'mroonga_fast_order_limit'; + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_varchar_equal_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_varchar_equal_with_index.test new file mode 100644 index 00000000000..e34209b841e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_varchar_equal_with_index.test @@ -0,0 +1,57 @@ +# Copyright(C) 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 +# 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 diaries; +--enable_warnings + +FLUSH STATUS; + +SET NAMES UTF8; +CREATE TABLE diaries ( + id INT UNSIGNED NOT NULL, + year INT UNSIGNED, + month INT UNSIGNED, + day INT UNSIGNED, + title VARCHAR(255), + content TEXT, + FULLTEXT INDEX(content), + KEY(title), + KEY(month), + KEY(day) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気がよくてきれいに見える。"); +INSERT INTO diaries VALUES(4, 2011, 11, 12, "帰り道", "今日は天気がよくてよかった。"); +INSERT INTO diaries VALUES(5, 2011, 11, 13, "はれ", "天気がよいのは今日までみたい。"); +INSERT INTO diaries VALUES(6, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。"); +INSERT INTO diaries VALUES(7, 2011, 12, 2, "初雪", "今日の天気は雪!"); + +SELECT * FROM diaries + WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) AND + title = "hello" + ORDER BY day LIMIT 1; + +SHOW STATUS LIKE 'mroonga_fast_order_limit'; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_varchar_equal_without_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_varchar_equal_without_index.test new file mode 100644 index 00000000000..380f323d64a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_varchar_equal_without_index.test @@ -0,0 +1,56 @@ +# Copyright(C) 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 +# 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 diaries; +--enable_warnings + +FLUSH STATUS; + +SET NAMES UTF8; +CREATE TABLE diaries ( + id INT UNSIGNED NOT NULL, + year INT UNSIGNED, + month INT UNSIGNED, + day INT UNSIGNED, + title VARCHAR(255), + content TEXT, + FULLTEXT INDEX(content), + KEY(month), + KEY(day) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気がよくてきれいに見える。"); +INSERT INTO diaries VALUES(4, 2011, 11, 12, "帰り道", "今日は天気がよくてよかった。"); +INSERT INTO diaries VALUES(5, 2011, 11, 13, "はれ", "天気がよいのは今日までみたい。"); +INSERT INTO diaries VALUES(6, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。"); +INSERT INTO diaries VALUES(7, 2011, 12, 2, "初雪", "今日の天気は雪!"); + +SELECT * FROM diaries + WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) AND + title = "hello" + ORDER BY day LIMIT 1; + +SHOW STATUS LIKE 'mroonga_fast_order_limit'; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_between.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_between.test new file mode 100644 index 00000000000..988a116731c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_between.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 mroonga_releases; +--enable_warnings + +FLUSH STATUS; + +CREATE TABLE mroonga_releases ( + id INT PRIMARY KEY AUTO_INCREMENT, + release_title TEXT, + release_year YEAR, + KEY (release_year), + FULLTEXT KEY (release_title) +) DEFAULT CHARSET UTF8; + +INSERT INTO mroonga_releases (release_title, release_year) + VALUES ("Groonga storage engine 0.1 has been released", "10"); +INSERT INTO mroonga_releases (release_title, release_year) + VALUES ("Rename Groonga storage engine to Mroonga", "2011"); +INSERT INTO mroonga_releases (release_title, release_year) + VALUES ("Mroonga 2.0 has been released", "2012"); +INSERT INTO mroonga_releases (release_title, release_year) + VALUES ("Mroonga 3.0 has been released", "13"); +INSERT INTO mroonga_releases (release_title, release_year) + VALUES ("Mroonga 4.0 will be released", "2014"); + +SELECT * FROM mroonga_releases + WHERE release_year BETWEEN "11" AND "2013" AND + MATCH(release_title) AGAINST("Mroonga" IN BOOLEAN MODE) + ORDER BY id DESC LIMIT 1,2; + +SHOW STATUS LIKE 'mroonga_fast_order_limit'; + +DROP TABLE mroonga_releases; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_between_over.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_between_over.test new file mode 100644 index 00000000000..d4c1d020fcc --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_between_over.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 mroonga_releases; +--enable_warnings + +FLUSH STATUS; + +CREATE TABLE mroonga_releases ( + id INT PRIMARY KEY AUTO_INCREMENT, + release_title TEXT, + release_year YEAR, + KEY (release_year), + FULLTEXT KEY (release_title) +) DEFAULT CHARSET UTF8; + +INSERT INTO mroonga_releases (release_title, release_year) + VALUES ("Groonga storage engine 0.1 has been released", "10"); +INSERT INTO mroonga_releases (release_title, release_year) + VALUES ("Rename Groonga storage engine to Mroonga", "2011"); +INSERT INTO mroonga_releases (release_title, release_year) + VALUES ("Mroonga 2.0 has been released", "2012"); +INSERT INTO mroonga_releases (release_title, release_year) + VALUES ("Mroonga 3.0 has been released", "13"); +INSERT INTO mroonga_releases (release_title, release_year) + VALUES ("Mroonga 4.0 will be released", "2014"); + +SELECT * FROM mroonga_releases + WHERE release_year BETWEEN "11" AND "2015" AND + MATCH(release_title) AGAINST("Mroonga" IN BOOLEAN MODE) + ORDER BY id DESC LIMIT 1,2; + +SHOW STATUS LIKE 'mroonga_fast_order_limit'; + +DROP TABLE mroonga_releases; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_equal.test new file mode 100644 index 00000000000..b1daa3a0000 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_equal.test @@ -0,0 +1,55 @@ +# 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 mroonga_releases; +--enable_warnings + +FLUSH STATUS; + +CREATE TABLE mroonga_releases ( + id INT PRIMARY KEY AUTO_INCREMENT, + release_title TEXT, + release_year YEAR, + KEY (release_year), + FULLTEXT KEY (release_title) +) DEFAULT CHARSET UTF8; + +INSERT INTO mroonga_releases (release_title, release_year) + VALUES ("Groonga storage engine (code name Mroonga) 1.0 has been released", "11"); +INSERT INTO mroonga_releases (release_title, release_year) + VALUES ("Rename Groonga storage engine to Mroonga", "2011"); +INSERT INTO mroonga_releases (release_title, release_year) + VALUES ("Mroonga 1.11 has been released", "2011"); +INSERT INTO mroonga_releases (release_title, release_year) + VALUES ("Mroonga 2.0 has been released", "2012"); +INSERT INTO mroonga_releases (release_title, release_year) + VALUES ("Mroonga 3.0 has been released", "13"); +INSERT INTO mroonga_releases (release_title, release_year) + VALUES ("Mroonga 4.0 will be released", "2014"); + +SELECT * FROM mroonga_releases + WHERE release_year = "11" AND + MATCH(release_title) AGAINST("Mroonga" IN BOOLEAN MODE) + ORDER BY id DESC LIMIT 1,2; + +SHOW STATUS LIKE 'mroonga_fast_order_limit'; + +DROP TABLE mroonga_releases; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_greater_than.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_greater_than.test new file mode 100644 index 00000000000..bf4a18793b5 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_greater_than.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 mroonga_releases; +--enable_warnings + +FLUSH STATUS; + +CREATE TABLE mroonga_releases ( + id INT PRIMARY KEY AUTO_INCREMENT, + release_title TEXT, + release_year YEAR, + KEY (release_year), + FULLTEXT KEY (release_title) +) DEFAULT CHARSET UTF8; + +INSERT INTO mroonga_releases (release_title, release_year) + VALUES ("Groonga storage engine (code name Mroonga) 0.1 has been released", "10"); +INSERT INTO mroonga_releases (release_title, release_year) + VALUES ("Rename Groonga storage engine to Mroonga", "2011"); +INSERT INTO mroonga_releases (release_title, release_year) + VALUES ("Mroonga 2.0 has been released", "2012"); +INSERT INTO mroonga_releases (release_title, release_year) + VALUES ("Mroonga 3.0 has been released", "13"); +INSERT INTO mroonga_releases (release_title, release_year) + VALUES ("Mroonga 4.0 will be released", "2014"); + +SELECT * FROM mroonga_releases + WHERE release_year > "11" AND + MATCH(release_title) AGAINST("Mroonga" IN BOOLEAN MODE) + ORDER BY id ASC LIMIT 2; + +SHOW STATUS LIKE 'mroonga_fast_order_limit'; + +DROP TABLE mroonga_releases; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_greater_than_or_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_greater_than_or_equal.test new file mode 100644 index 00000000000..8863d613f06 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_greater_than_or_equal.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 mroonga_releases; +--enable_warnings + +FLUSH STATUS; + +CREATE TABLE mroonga_releases ( + id INT PRIMARY KEY AUTO_INCREMENT, + release_title TEXT, + release_year YEAR, + KEY (release_year), + FULLTEXT KEY (release_title) +) DEFAULT CHARSET UTF8; + +INSERT INTO mroonga_releases (release_title, release_year) + VALUES ("Groonga storage engine (code name Mroonga) 0.1 has been released", "10"); +INSERT INTO mroonga_releases (release_title, release_year) + VALUES ("Rename Groonga storage engine to Mroonga", "2011"); +INSERT INTO mroonga_releases (release_title, release_year) + VALUES ("Mroonga 2.0 has been released", "2012"); +INSERT INTO mroonga_releases (release_title, release_year) + VALUES ("Mroonga 3.0 has been released", "13"); +INSERT INTO mroonga_releases (release_title, release_year) + VALUES ("Mroonga 4.0 will be released", "2014"); + +SELECT * FROM mroonga_releases + WHERE release_year >= "11" AND + MATCH(release_title) AGAINST("Mroonga" IN BOOLEAN MODE) + ORDER BY id ASC LIMIT 2; + +SHOW STATUS LIKE 'mroonga_fast_order_limit'; + +DROP TABLE mroonga_releases; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_less_than.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_less_than.test new file mode 100644 index 00000000000..2fe423ac053 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_less_than.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 mroonga_releases; +--enable_warnings + +FLUSH STATUS; + +CREATE TABLE mroonga_releases ( + id INT PRIMARY KEY AUTO_INCREMENT, + release_title TEXT, + release_year YEAR, + KEY (release_year), + FULLTEXT KEY (release_title) +) DEFAULT CHARSET UTF8; + +INSERT INTO mroonga_releases (release_title, release_year) + VALUES ("Groonga storage engine (code name Mroonga) 0.1 has been released", "10"); +INSERT INTO mroonga_releases (release_title, release_year) + VALUES ("Rename Groonga storage engine to Mroonga", "2011"); +INSERT INTO mroonga_releases (release_title, release_year) + VALUES ("Mroonga 2.0 has been released", "2012"); +INSERT INTO mroonga_releases (release_title, release_year) + VALUES ("Mroonga 3.0 has been released", "13"); +INSERT INTO mroonga_releases (release_title, release_year) + VALUES ("Mroonga 4.0 will be released", "2014"); + +SELECT * FROM mroonga_releases + WHERE release_year < "13" AND + MATCH(release_title) AGAINST("Mroonga" IN BOOLEAN MODE) + ORDER BY id DESC LIMIT 1,2; + +SHOW STATUS LIKE 'mroonga_fast_order_limit'; + +DROP TABLE mroonga_releases; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_less_than_or_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_less_than_or_equal.test new file mode 100644 index 00000000000..52f26e37123 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_less_than_or_equal.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 mroonga_releases; +--enable_warnings + +FLUSH STATUS; + +CREATE TABLE mroonga_releases ( + id INT PRIMARY KEY AUTO_INCREMENT, + release_title TEXT, + release_year YEAR, + KEY (release_year), + FULLTEXT KEY (release_title) +) DEFAULT CHARSET UTF8; + +INSERT INTO mroonga_releases (release_title, release_year) + VALUES ("Groonga storage engine (code name Mroonga) 0.1 has been released", "10"); +INSERT INTO mroonga_releases (release_title, release_year) + VALUES ("Rename Groonga storage engine to Mroonga", "2011"); +INSERT INTO mroonga_releases (release_title, release_year) + VALUES ("Mroonga 2.0 has been released", "2012"); +INSERT INTO mroonga_releases (release_title, release_year) + VALUES ("Mroonga 3.0 has been released", "13"); +INSERT INTO mroonga_releases (release_title, release_year) + VALUES ("Mroonga 4.0 will be released", "2014"); + +SELECT * FROM mroonga_releases + WHERE release_year <= "13" AND + MATCH(release_title) AGAINST("Mroonga" IN BOOLEAN MODE) + ORDER BY id DESC LIMIT 1,2; + +SHOW STATUS LIKE 'mroonga_fast_order_limit'; + +DROP TABLE mroonga_releases; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_skip_count_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_skip_count_TODO_SPLIT_ME.test new file mode 100644 index 00000000000..669868c6c7f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_skip_count_TODO_SPLIT_ME.test @@ -0,0 +1,61 @@ +# Copyright(C) 2010 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, t2, t3; +--enable_warnings + +flush status; +create table t1 (c1 int primary key, c2 int, c3 text, key idx1(c2), fulltext index ft(c3)); +insert into t1 values(1,10,"aa ii uu ee oo"); +insert into t1 values(2,20,"ka ki ku ke ko"); +insert into t1 values(3,30,"sa si su se so"); +insert into t1 values(4,40,"ta ti tu te to"); +insert into t1 values(5,50,"aa ii uu ee oo"); +show status like 'mroonga_count_skip'; +select * from t1; +show status like 'mroonga_count_skip'; +select count(*) from t1; +show status like 'mroonga_count_skip'; +select * from t1 force index(primary) where c1 between 2 and 4; +show status like 'mroonga_count_skip'; +select count(*) from t1 force index(primary) where c1 between 2 and 4; +show status like 'mroonga_count_skip'; +select c1 from t1 force index(primary) where c1 < 3; +show status like 'mroonga_count_skip'; +select count(c1) from t1 force index(primary) where c1 < 3; +show status like 'mroonga_count_skip'; +select 1 from t1 force index(primary) where c1 > 3; +show status like 'mroonga_count_skip'; +select count(1) from t1 force index(primary) where c1 > 3; +show status like 'mroonga_count_skip'; +select * from t1 where match(c3) against("su"); +show status like 'mroonga_count_skip'; +select count(*) from t1 where match(c3) against("su"); +show status like 'mroonga_count_skip'; +select * from t1 where match(c3) against("+su" in boolean mode); +show status like 'mroonga_count_skip'; +select count(*) from t1 where match(c3) against("+su" in boolean mode); +show status like 'mroonga_count_skip'; +select * from t1 force index(idx1) where c2 between 20 and 40; +show status like 'mroonga_count_skip'; +select count(*) from t1 force index(idx1) where c2 between 20 and 40; +show status like 'mroonga_count_skip'; +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_skip_count_after_insert_multithread.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_skip_count_after_insert_multithread.test new file mode 100644 index 00000000000..bca2311ffbc --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_skip_count_after_insert_multithread.test @@ -0,0 +1,45 @@ +# Copyright(C) 2012 Kentoku SHIBA +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +FLUSH STATUS; +CREATE TABLE diaries ( + title TEXT, + FULLTEXT INDEX ft(title) +); + +INSERT INTO diaries VALUES("Hello mroonga!"); +INSERT INTO diaries VALUES("It's funny."); + +CONNECT (thread2, localhost, root, ,); +CONNECTION thread2; +INSERT INTO diaries VALUES("Happy birthday!"); +DISCONNECT thread2; +CONNECTION default; + +SHOW STATUS LIKE 'mroonga_count_skip'; +SELECT COUNT(*) FROM diaries WHERE MATCH(title) AGAINST("mroonga" IN BOOLEAN MODE); +SHOW STATUS LIKE 'mroonga_count_skip'; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_skip_count_after_insert_single_thread.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_skip_count_after_insert_single_thread.test new file mode 100644 index 00000000000..fa960be850f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_skip_count_after_insert_single_thread.test @@ -0,0 +1,40 @@ +# Copyright(C) 2012 Kentoku SHIBA +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +FLUSH STATUS; +CREATE TABLE diaries ( + title TEXT, + FULLTEXT INDEX ft(title) +); + +INSERT INTO diaries VALUES("Hello mroonga!"); +INSERT INTO diaries VALUES("It's funny."); +INSERT INTO diaries VALUES("Happy birthday!"); + +SHOW STATUS LIKE 'mroonga_count_skip'; +SELECT COUNT(*) FROM diaries WHERE MATCH(title) AGAINST("mroonga" IN BOOLEAN MODE); +SHOW STATUS LIKE 'mroonga_count_skip'; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_skip_count_disabled.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_skip_count_disabled.test new file mode 100644 index 00000000000..e94702e8159 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_skip_count_disabled.test @@ -0,0 +1,51 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +FLUSH STATUS; + +SET NAMES UTF8; +CREATE TABLE diaries ( + id INT UNSIGNED NOT NULL, + title VARCHAR(255), + content TEXT, + FULLTEXT INDEX(content) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries VALUES(1, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, "富士山", "今日も天気がよくてきれいに見える。"); +INSERT INTO diaries VALUES(4, "帰り道", "今日は天気がよくてよかった。"); +INSERT INTO diaries VALUES(5, "はれ", "天気がよいのは今日までみたい。"); + +SET mroonga_enable_optimization=FALSE; + +SELECT COUNT(*) FROM diaries + WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE); + +SHOW STATUS LIKE 'mroonga_count_skip'; + +SET mroonga_enable_optimization=TRUE; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_skip_count_index_view.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_skip_count_index_view.test new file mode 100644 index 00000000000..11457b1e05a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_skip_count_index_view.test @@ -0,0 +1,56 @@ +# 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries, users; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + user_id INT NOT NULL, + title VARCHAR(45) NOT NULL, + KEY (user_id), + FULLTEXT INDEX title_index (title) +) DEFAULT CHARSET=UTF8; + +CREATE TABLE users ( + id INT PRIMARY KEY AUTO_INCREMENT, + name VARCHAR(45) NOT NULL, + INDEX (name) +) ENGINE=InnoDB DEFAULT CHARSET=UTF8; + +INSERT INTO users (id, name) VALUES (1, "Alice"), (2, "Bob"); +INSERT INTO diaries (user_id, title) VALUES (1, "survey"); +INSERT INTO diaries (user_id, title) VALUES (2, "groonga (1)"); +INSERT INTO diaries (user_id, title) VALUES (2, "groonga (2)"); + +CREATE VIEW articles AS + SELECT diaries.user_id AS user_id, + diaries.title AS title, + users.name AS name + FROM diaries, users + WHERE diaries.user_id = users.id; + + +SELECT COUNT(*) FROM articles WHERE name = 'Bob'; + +DROP VIEW articles; +DROP TABLE diaries, users; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/replace_geometry.test b/storage/mroonga/mysql-test/mroonga/storage/t/replace_geometry.test new file mode 100644 index 00000000000..5f160af239f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/replace_geometry.test @@ -0,0 +1,39 @@ +# 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 geo_replace; +--enable_warnings + +CREATE TABLE geo_replace ( + id INT NOT NULL, + geo GEOMETRY NOT NULL, + PRIMARY KEY(id) +) DEFAULT CHARSET=utf8; +INSERT INTO geo_replace VALUES(1, POINT(100,100)); +SELECT id, ASTEXT(geo) FROM geo_replace; +REPLACE INTO geo_replace VALUES(1, POINT(100,200)); +SELECT id, ASTEXT(geo) FROM geo_replace; +INSERT INTO geo_replace VALUES(1, POINT(200,200)) ON DUPLICATE KEY UPDATE geo = POINT(200,200); +SELECT id, ASTEXT(geo) FROM geo_replace; +UPDATE geo_replace SET geo = POINT(200,300); +SELECT id, ASTEXT(geo) FROM geo_replace; + +DROP TABLE geo_replace; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/replace_select_varchar.test b/storage/mroonga/mysql-test/mroonga/storage/t/replace_select_varchar.test new file mode 100644 index 00000000000..192a4976cbd --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/replace_select_varchar.test @@ -0,0 +1,64 @@ +# Copyright(C) 2011 Kouhei Sutou +# +# 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 + +# Based on #910. + +--source include/have_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS videos_master, videos_groonga; +--enable_warnings + +CREATE TABLE `videos_master` ( + `id` bigint(1) unsigned NOT NULL, + `video_id` varchar(64) NOT NULL, + `description` text, + `tags_unpack` text, + PRIMARY KEY (`video_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +CREATE TABLE `videos_groonga` ( + `id` bigint(1) unsigned NOT NULL, + `video_id` varchar(64) NOT NULL, + `description` text, + `tags_unpack` text, + PRIMARY KEY (`video_id`), + FULLTEXT INDEX (`description`), + FULLTEXT INDEX (`tags_unpack`) +) DEFAULT CHARSET=utf8; + + +INSERT INTO videos_master VALUES (1, "video-1", "My Familly", "familly human"); +INSERT INTO videos_master VALUES (2, "video-2", "My Cat", "family cat"); +REPLACE INTO videos_groonga + SELECT v.id, v.video_id, v.description, NULL + FROM videos_master AS v + WHERE v.video_id = (video_id); +SELECT *, MATCH(description) AGAINST("cat") FROM videos_groonga + WHERE MATCH(description) AGAINST("cat"); + +INSERT INTO videos_master VALUES (3, "video-3", "My Dog", "family dog"); +REPLACE INTO videos_groonga + SELECT v.id, v.video_id, v.description, NULL + FROM videos_master AS v + WHERE v.video_id = (video_id); +SELECT *, MATCH(description) AGAINST("my") FROM videos_groonga + WHERE MATCH(description) AGAINST("my"); + +DROP TABLE videos_master, videos_groonga; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/replace_text.test b/storage/mroonga/mysql-test/mroonga/storage/t/replace_text.test new file mode 100644 index 00000000000..6411896312c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/replace_text.test @@ -0,0 +1,44 @@ +# Copyright(C) 2011 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/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists diaries; +--enable_warnings + +set names utf8; +create table diaries ( + id int primary key, + content text, + fulltext index (content) +) default charset utf8; +show create table diaries; + +insert into diaries values(1, "今日からはじめました。"); +insert into diaries values(2, "明日の富士山の天気について"); +insert into diaries values(3, "今日も天気がよくてきれいに見える。"); + +select * from diaries; + +select * from diaries where match(content) against("天気"); + +replace into diaries values(2, "明日の天気は雨みたい。"); +select * from diaries where match(content) against("天気"); + +drop table diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/replace_varchar.test b/storage/mroonga/mysql-test/mroonga/storage/t/replace_varchar.test new file mode 100644 index 00000000000..0d9b82fb7d4 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/replace_varchar.test @@ -0,0 +1,44 @@ +# Copyright(C) 2011 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/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists diaries; +--enable_warnings + +set names utf8; +create table diaries ( + id int primary key, + content varchar(256), + fulltext index (content) +) default charset utf8; +show create table diaries; + +insert into diaries values(1, "今日からはじめました。"); +insert into diaries values(2, "明日の富士山の天気について"); +insert into diaries values(3, "今日も天気がよくてきれいに見える。"); + +select * from diaries; + +select * from diaries where match(content) against("天気"); + +replace into diaries values(2, "明日の天気は雨みたい。"); +select * from diaries where match(content) against("天気"); + +drop table diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/replace_vector.test b/storage/mroonga/mysql-test/mroonga/storage/t/replace_vector.test new file mode 100644 index 00000000000..a2efa7912b5 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/replace_vector.test @@ -0,0 +1,46 @@ +# 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 vector_replace; +DROP TABLE IF EXISTS vector_replace_vec; +--enable_warnings + +CREATE TABLE vector_replace_vec ( + vec CHAR(10) PRIMARY KEY +) DEFAULT CHARSET=utf8 + COMMENT='default_tokenizer "TokenDelimit"'; + +CREATE TABLE vector_replace ( + id INT NOT NULL, + vec TEXT COMMENT 'flags "COLUMN_VECTOR", type "vector_replace_vec"', + PRIMARY KEY(id) +) DEFAULT CHARSET=utf8; +INSERT INTO vector_replace VALUES(1, 'first second third'); +SELECT id, vec FROM vector_replace; +REPLACE INTO vector_replace VALUES(1, 'fourth fifth'); +SELECT id, vec FROM vector_replace; +INSERT INTO vector_replace VALUES(1, 'sixth seventh') ON DUPLICATE KEY UPDATE vec = 'sixth seventh'; +SELECT id, vec FROM vector_replace; +UPDATE vector_replace SET vec = 'eighth nineth tenth'; +SELECT id, vec FROM vector_replace; + +DROP TABLE vector_replace; +DROP TABLE vector_replace_vec; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/select_all.test b/storage/mroonga/mysql-test/mroonga/storage/t/select_all.test new file mode 100644 index 00000000000..8de78ca99af --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/select_all.test @@ -0,0 +1,100 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# +# 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, t2, t3; +--enable_warnings + +create table t1(c1 int, c2 int, c3 int); +insert into t1 values (1, 10, 100); +insert into t1 values (2, 30, 500); +insert into t1 values (5, 20, 200); +insert into t1 values (3, 60, 300); +insert into t1 values (4, 50, 600); +insert into t1 values (6, 40, 400); + +select * from t1; +select c1 from t1; +select c2 from t1; +select c3 from t1; + +select * from t1 where c1 <= 3; +select * from t1 where c2 > 40; +select * from t1 where c3 = 300; + + +select * from t1 order by c1; +select * from t1 order by c2 desc; +select * from t1 order by c3, c1; + +drop table t1; + + +create table t1 (c1 int, c2 varchar(100)); +insert into t1 values(1, "hoge"); +insert into t1 values(4, "hogefuga"); +insert into t1 values(2, "fuga"); +insert into t1 values(5, "moge"); +insert into t1 values(3, "mo"); + +select * from t1; +select * from t1 order by c1; +select * from t1 order by c1 desc; +select * from t1 order by c2; + +drop table t1; + +create table t1 (c1 int, c2 text); +insert into t1 values(1, "hoge"); +insert into t1 values(4, "hogefuga"); +insert into t1 values(2, "fuga"); +insert into t1 values(5, "moge"); +insert into t1 values(3, "mo"); + +select * from t1; + +drop table t1; + +# ORDER BY with position +create table t1 (c1 int, c2 int, c3 text); +insert into t1 values(1, 20, "hoge"); +insert into t1 values(4, 60, "hogefuga"); +insert into t1 values(2, 50, "fuga"); +insert into t1 values(5, 30, "moge"); +insert into t1 values(3, 40, "mo"); +select * from t1 order by c1 asc; +select * from t1 order by c1 desc; +select * from t1 order by c2 asc; +select * from t1 order by c2 desc; +select * from t1 order by c3 asc; +select * from t1 order by c3 desc; +drop table t1; + +# _id +create table t1 (_id int, c1 int); +insert into t1 values (null,100); +insert into t1 values (null,100); +insert into t1 values (null,100); +insert into t1 values (null,100); +insert into t1 values (null,100); +select * from t1; +select * from t1 where _id < 3; +select * from t1 where _id >= 3; +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/select_empty_key_where_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/select_empty_key_where_equal.test new file mode 100644 index 00000000000..c4ce4c0193d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/select_empty_key_where_equal.test @@ -0,0 +1,36 @@ +# Copyright(C) 2014 Kenji Maruyama <mmmaru777@gmail.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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS tags; +--enable_warnings + +CREATE TABLE tags ( + name VARCHAR(16) NOT NULL, + KEY index_name (name) +); + +INSERT INTO tags VALUES ('mroonga'); +INSERT INTO tags VALUES ('mysql'); +INSERT INTO tags VALUES (''); + +SELECT * FROM tags WHERE name = ""; + +DROP TABLE tags; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/select_empty_key_where_not_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/select_empty_key_where_not_equal.test new file mode 100644 index 00000000000..8537616e89e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/select_empty_key_where_not_equal.test @@ -0,0 +1,36 @@ +# Copyright(C) 2014 Kenji Maruyama <mmmaru777@gmail.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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS tags; +--enable_warnings + +CREATE TABLE tags ( + name VARCHAR(16) NOT NULL, + KEY index_name (name) +); + +INSERT INTO tags VALUES ('mroonga'); +INSERT INTO tags VALUES ('mysql'); +INSERT INTO tags VALUES (''); + +SELECT * FROM tags WHERE name != ""; + +DROP TABLE tags; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/select_group_by_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/select_group_by_with_index.test new file mode 100644 index 00000000000..569fbcfd600 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/select_group_by_with_index.test @@ -0,0 +1,38 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE users ( + name varchar(40), + age int, + KEY (age) +); + +INSERT INTO users VALUES ("Alice", 20); +INSERT INTO users VALUES ("Bob", 20); +INSERT INTO users VALUES ("Charry", 29); + +SELECT *, COUNT(*) FROM users GROUP BY age; + +DROP TABLE users; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/select_group_by_without_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/select_group_by_without_index.test new file mode 100644 index 00000000000..ae852bfcfed --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/select_group_by_without_index.test @@ -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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE users ( + name varchar(40), + age int +); + +INSERT INTO users VALUES ("Alice", 20); +INSERT INTO users VALUES ("Bob", 20); +INSERT INTO users VALUES ("Charry", 29); + +EXPLAIN SELECT *, COUNT(*) FROM users GROUP BY age; + +SELECT *, COUNT(*) FROM users GROUP BY age; + +DROP TABLE users; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/select_pkey.test b/storage/mroonga/mysql-test/mroonga/storage/t/select_pkey.test new file mode 100644 index 00000000000..9ebd707392d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/select_pkey.test @@ -0,0 +1,40 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# +# 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, t2, t3; +--enable_warnings + +create table t1(c1 int primary key, c2 int, c3 int); +insert into t1 values (1, 10, 100); +insert into t1 values (2, 30, 500); +insert into t1 values (5, 20, 200); +insert into t1 values (3, 60, 300); +insert into t1 values (4, 50, 600); +insert into t1 values (6, 40, 400); + +select * from t1 where c1=1; +select * from t1 where c1=2; +select * from t1 where c1=3; +select * from t1 where c1=4; +select * from t1 where c1=5; +select * from t1 where c1=6; + +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/select_secondary_key.test b/storage/mroonga/mysql-test/mroonga/storage/t/select_secondary_key.test new file mode 100644 index 00000000000..a6159bea02b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/select_secondary_key.test @@ -0,0 +1,51 @@ +# Copyright(C) 2010 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, t2, t3; +--enable_warnings + +create table t1 (c1 int primary key, c2 int, c3 text, key idx1(c2), fulltext index ft(c3)); +insert into t1 values(1,10,"aa ii uu ee oo"); +insert into t1 values(2,20,"ka ki ku ke ko"); +insert into t1 values(3,30,"sa si su se so"); +insert into t1 values(4,40,"ta ti tu te to"); +insert into t1 values(5,50,"aa ii uu ee oo"); + +select * from t1; +select * from t1 force index(idx1) where c2 = 30; +select * from t1 force index(idx1) where c2 = 20; + +insert into t1 values(6,30,"aa bb cc dd ee"); +select * from t1; +select * from t1 force index(idx1) where c2 = 30; + +drop table t1; + +create table t1 (c1 varchar(5) primary key, c2 varchar(5), c3 text, key idx1(c2), fulltext index ft(c3))engine=mroonga; +insert into t1 values('ab','ijk',"aa ii uu ee oo"); +insert into t1 values('bc','ghi',"ka ki ku ke ko"); +insert into t1 values('cd','efg',"sa si su se so"); +insert into t1 values('de','cde',"ta ti tu te to"); +insert into t1 values('ef','abc',"aa ii uu ee oo"); +select * from t1 force index(idx1) where c2 < 'e' order by c1 asc; +select * from t1 force index(idx1) where c2 > 'e' order by c1 asc; +select * from t1 force index(idx1) where c2 between 'c' and 'h' order by c1 asc; +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/show_create_table_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/storage/t/show_create_table_TODO_SPLIT_ME.test new file mode 100644 index 00000000000..240e8c11dcf --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/show_create_table_TODO_SPLIT_ME.test @@ -0,0 +1,35 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# +# 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, t2, t3; +--enable_warnings + +create table t1 (c1 int); +show create table t1; +drop table t1; + +create table t1 (c1 int, c2 int); +show create table t1; +drop table t1; + +create table t1 (c1 int primary key, c2 varchar(100)); +show create table t1; +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/sub_query_fulltext.test b/storage/mroonga/mysql-test/mroonga/storage/t/sub_query_fulltext.test new file mode 100644 index 00000000000..34839669f25 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/sub_query_fulltext.test @@ -0,0 +1,55 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries, users; +--enable_warnings + +CREATE TABLE users ( + id INT PRIMARY KEY AUTO_INCREMENT, + name TEXT +) DEFAULT CHARSET UTF8; + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + user_id INT UNSIGNED NOT NULL, + title TEXT, + FULLTEXT INDEX (title) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO users (name) VALUES ("alice"); +INSERT INTO users (name) VALUES ("bob"); +INSERT INTO users (name) VALUES ("carlos"); + +SELECT * FROM users; + +INSERT INTO diaries (user_id, title) VALUES (1, "Hello!"); +INSERT INTO diaries (user_id, title) VALUES (2, "my name is bob"); +INSERT INTO diaries (user_id, title) VALUES (3, "my name is carlos"); + +SELECT * FROM diaries; + +SELECT * FROM users + WHERE id IN (SELECT user_id FROM diaries + WHERE MATCH(title) AGAINST("name")) + ORDER BY id DESC; + +DROP TABLE diaries, users; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/temporary_table.test b/storage/mroonga/mysql-test/mroonga/storage/t/temporary_table.test new file mode 100644 index 00000000000..56ebb430afc --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/temporary_table.test @@ -0,0 +1,39 @@ +# Copyright(C) 2012 Kouhei Sutou <kou@clear-code.com> +# Copyright(C) 2014 Toshihisa Tashiro +# +# 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/skip_osx.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TEMPORARY TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TEMPORARY TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title) VALUES ("clear day"); +INSERT INTO diaries (title) VALUES ("rainy day"); +INSERT INTO diaries (title) VALUES ("cloudy day"); + +SELECT * FROM diaries; + +DROP TEMPORARY TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/truncate.test b/storage/mroonga/mysql-test/mroonga/storage/t/truncate.test new file mode 100644 index 00000000000..5833f77722a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/truncate.test @@ -0,0 +1,56 @@ +# Copyright(C) 2011-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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES UTF8; +CREATE TABLE diaries ( + id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + year INT UNSIGNED, + month INT UNSIGNED, + day INT UNSIGNED, + title VARCHAR(255), + content TEXT, + FULLTEXT INDEX(content), + KEY(day) +) DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気がよくてきれいに見える。"); + +SELECT * FROM diaries; +SELECT * FROM diaries WHERE MATCH(content) AGAINST("今日 天気" IN BOOLEAN MODE); +TRUNCATE TABLE diaries; +SELECT * FROM diaries; +SELECT * FROM diaries WHERE MATCH(content) AGAINST("今日 天気" IN BOOLEAN MODE); + +INSERT INTO diaries VALUES(1, 2011, 11, 11, "帰り道", "つかれたー"); +INSERT INTO diaries VALUES(2, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。"); +INSERT INTO diaries VALUES(3, 2011, 12, 2, "初雪", "今年はじめての雪!"); + +SELECT * FROM diaries; +SELECT * FROM diaries WHERE MATCH(content) AGAINST("悪い" IN BOOLEAN MODE); + + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/update_fulltext.test b/storage/mroonga/mysql-test/mroonga/storage/t/update_fulltext.test new file mode 100644 index 00000000000..a6cc1ba7fb2 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/update_fulltext.test @@ -0,0 +1,36 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# +# 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, t2, t3; +--enable_warnings + +create table t1 (c1 int primary key, c2 text, fulltext index (c2)); +insert into t1 values(10, "aa ii uu ee"); +insert into t1 values(20, "ka ki ku ke"); +insert into t1 values(30, "sa si su se"); + +select * from t1; +update t1 set c2="ta ti tu te" where c1=20; +select * from t1; +select * from t1 where match(c2) against("ti"); +select * from t1 where match(c2) against("ki"); + +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/update_id_hash_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/update_id_hash_index.test new file mode 100644 index 00000000000..e362984f896 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/update_id_hash_index.test @@ -0,0 +1,33 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# +# 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, t2, t3; +--enable_warnings + +create table t1 (_id int, c1 int, key (_id) using hash); +insert into t1 values(null, 100); +insert into t1 values(null, 100); +insert into t1 values(null, 100); +insert into t1 values(null, 100); +select * from t1; +update t1 set c1 = 200 where _id = 2; +select * from t1; +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/update_id_unique_hash_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/update_id_unique_hash_index.test new file mode 100644 index 00000000000..d8257e41fb5 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/update_id_unique_hash_index.test @@ -0,0 +1,33 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# +# 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, t2, t3; +--enable_warnings + +create table t1 (_id int, c1 int, unique key (_id) using hash); +insert into t1 values(null, 100); +insert into t1 values(null, 100); +insert into t1 values(null, 100); +insert into t1 values(null, 100); +select * from t1; +update t1 set c1 = 200 where _id = 2; +select * from t1; +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/update_int.test b/storage/mroonga/mysql-test/mroonga/storage/t/update_int.test new file mode 100644 index 00000000000..043ae25aee5 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/update_int.test @@ -0,0 +1,44 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# +# 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, t2, t3; +--enable_warnings + +create table t1 (c1 int, c2 int); +show create table t1; +insert into t1 values (1, 100); +insert into t1 values (2, 101); +insert into t1 values (3, 102); +select * from t1; + +update t1 set c2=c2+100 where c1=1; +select * from t1; +update t1 set c2=c2+100 where c1=2; +select * from t1; +update t1 set c2=c2+100 where c1=3; +select * from t1; + +flush tables; + +update t1 set c1=5, c2=50; +select * from t1; + +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/update_last_insert_grn_id.test b/storage/mroonga/mysql-test/mroonga/storage/t/update_last_insert_grn_id.test new file mode 100644 index 00000000000..3ad713cbbde --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/update_last_insert_grn_id.test @@ -0,0 +1,48 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# Copyright(C) 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 +# 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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +drop table if exists memos; +--enable_warnings + +create table memos ( + _id int, + content varchar(255), + unique key (_id) using hash +); + +insert into memos values (null, "今夜はさんま。"); +insert into memos values (null, "明日はgroongaをアップデート。"); +insert into memos values (null, "帰りにおだんご。"); +insert into memos values (null, "金曜日は肉の日。"); + +select * from memos; + +insert into memos values (null, "冷蔵庫に牛乳が残り1本。"); +select last_insert_grn_id(); +update memos set content = "冷蔵庫に牛乳はまだたくさんある。" where _id = last_insert_grn_id(); + +select * from memos; + +drop table memos; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/update_virtual_column.test b/storage/mroonga/mysql-test/mroonga/storage/t/update_virtual_column.test new file mode 100644 index 00000000000..f5d85de4043 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/update_virtual_column.test @@ -0,0 +1,43 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# +# 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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists t1, t2, t3; +--enable_warnings + +# for virtual columns +create table t1 (c1 int, _id int); +insert into t1 values(1,null); +insert into t1 values(2,null); +insert into t1 values(3,null); +select * from t1; +set sql_mode=""; +# warning WARN_DATA_TRUNCATED +update t1 set _id = 10 where c1 = 1; +select * from t1; +set sql_mode="strict_all_tables"; +# We can't use WARN_DATA_TRUNCATED here because "WXXX" isn't supported +# MySQL 5.5, 5.6 and MariaDB 5.6. MariaDB 10.0 only supports it. +# We share this test with all MySQL servers. So we use number here. +--error 1265 +update t1 set _id = 11 where c1 = 1; +select * from t1; +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_database_path_prefix.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_database_path_prefix.test new file mode 100644 index 00000000000..c7b2094906b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_database_path_prefix.test @@ -0,0 +1,42 @@ +# 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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/have_mroonga_helper.inc + +SET GLOBAL mroonga_database_path_prefix = "test/mroonga.data/"; +SHOW GLOBAL VARIABLES LIKE 'mroonga_database_path_prefix'; +CREATE DATABASE clean_test; +USE clean_test; + +CREATE TABLE counts ( + id INT PRIMARY KEY AUTO_INCREMENT +); + +--file_exists $MYSQLD_DATADIR/test/mroonga.data/clean_test.mrn + +INSERT INTO counts VALUES (NULL); + +SELECT * FROM counts; + +DROP TABLE counts; +DROP DATABASE clean_test; +USE test; + +SET GLOBAL mroonga_database_path_prefix = NULL; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_default_parser_new_value.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_default_parser_new_value.test new file mode 100644 index 00000000000..a61af87fb2b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_default_parser_new_value.test @@ -0,0 +1,25 @@ +# Copyright(C) 2014 Kouhei Sutou <kou@clear-code.com> +# Copyright(C) 2014 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 + +SET @mroonga_default_parser_backup = @@mroonga_default_parser; +SET GLOBAL mroonga_default_parser = "TokenBigramSplitAlpha"; +SHOW GLOBAL VARIABLES LIKE 'mroonga_default_parser'; +SET GLOBAL mroonga_default_parser = @mroonga_default_parser_backup; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_default_parser_same_value.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_default_parser_same_value.test new file mode 100644 index 00000000000..0e8562de92c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_default_parser_same_value.test @@ -0,0 +1,22 @@ +# Copyright(C) 2014 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/mroonga/have_mroonga.inc + +SET GLOBAL mroonga_default_parser = "TokenBigram"; +SHOW GLOBAL VARIABLES LIKE 'mroonga_default_parser'; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_dry_write_delete.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_dry_write_delete.test new file mode 100644 index 00000000000..b80ac2e8400 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_dry_write_delete.test @@ -0,0 +1,43 @@ +# Copyright(C) 2011 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/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists diaries; +--enable_warnings + +create table diaries ( + id int primary key auto_increment, + body text, + fulltext index body_index (body) +) default charset utf8; +show create table diaries; + +insert into diaries (body) values ("will start groonga!"); +select * from diaries; + +set mroonga_dry_write=true; +delete from diaries where id = 1; +select * from diaries; + +set mroonga_dry_write=false; +delete from diaries where id = 1; +select * from diaries; + +drop table diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_dry_write_insert.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_dry_write_insert.test new file mode 100644 index 00000000000..72346c80a6d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_dry_write_insert.test @@ -0,0 +1,43 @@ +# Copyright(C) 2011 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/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists diaries; +--enable_warnings + +create table diaries ( + id int primary key auto_increment, + body text, + fulltext index body_index (body) +) default charset utf8; +show create table diaries; + +insert into diaries (body) values ("will start groonga!"); +select * from diaries; + +set mroonga_dry_write=true; +insert into diaries (body) values ("starting groonga..."); +select * from diaries; + +set mroonga_dry_write=false; +insert into diaries (body) values ("started groonga."); +select * from diaries; + +drop table diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_dry_write_update.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_dry_write_update.test new file mode 100644 index 00000000000..2100f61700c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_dry_write_update.test @@ -0,0 +1,42 @@ +# Copyright(C) 2011 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/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists diaries; +--enable_warnings + +create table diaries ( + id int primary key auto_increment, + body text, + fulltext index body_index (body) +) default charset utf8; +show create table diaries; + +insert into diaries (body) values ("will start groonga!"); + +set mroonga_dry_write=true; +update diaries set body = "starting groonga..." where id = 1; +select * from diaries; + +set mroonga_dry_write=false; +update diaries set body = "starting groonga..." where id = 1; +select * from diaries; + +drop table diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_lock_timeout_disable.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_lock_timeout_disable.test new file mode 100644 index 00000000000..2c2776e5fd8 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_lock_timeout_disable.test @@ -0,0 +1,28 @@ +# Copyright(C) 2014 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/mroonga/have_version_100_or_later.inc +--source ../../include/mroonga/have_mroonga.inc + +SET GLOBAL mroonga_lock_timeout = -1; +SHOW GLOBAL VARIABLES LIKE "mroonga_lock_timeout"; + + +disable_query_log; +SET GLOBAL mroonga_lock_timeout = 10000000; +enable_query_log; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_lock_timeout_invalid.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_lock_timeout_invalid.test new file mode 100644 index 00000000000..e2090cf9659 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_lock_timeout_invalid.test @@ -0,0 +1,28 @@ +# Copyright(C) 2014 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/mroonga/have_version_100_or_later.inc +--source ../../include/mroonga/have_mroonga.inc + +SET GLOBAL mroonga_lock_timeout = -2; +SHOW GLOBAL VARIABLES LIKE "mroonga_lock_timeout"; + + +disable_query_log; +SET GLOBAL mroonga_lock_timeout = 10000000; +enable_query_log; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_lock_timeout_no_retry.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_lock_timeout_no_retry.test new file mode 100644 index 00000000000..9df4970cacd --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_lock_timeout_no_retry.test @@ -0,0 +1,27 @@ +# Copyright(C) 2014 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/mroonga/have_mroonga.inc + +SET GLOBAL mroonga_lock_timeout = 0; +SHOW GLOBAL VARIABLES LIKE "mroonga_lock_timeout"; + + +disable_query_log; +SET GLOBAL mroonga_lock_timeout = 10000000; +enable_query_log; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_lock_timeout_valid.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_lock_timeout_valid.test new file mode 100644 index 00000000000..49394d0a40a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_lock_timeout_valid.test @@ -0,0 +1,27 @@ +# Copyright(C) 2014 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/mroonga/have_mroonga.inc + +SET GLOBAL mroonga_lock_timeout = 1000; +SHOW GLOBAL VARIABLES LIKE "mroonga_lock_timeout"; + + +disable_query_log; +SET GLOBAL mroonga_lock_timeout = 10000000; +enable_query_log; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_log_file_new_value.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_log_file_new_value.test new file mode 100644 index 00000000000..77f6adb1713 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_log_file_new_value.test @@ -0,0 +1,25 @@ +# Copyright(C) 2012 Kouhei Sutou <kou@clear-code.com> +# Copyright(C) 2014 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 + +SET @mroonga_log_file_backup = @@mroonga_log_file; +SET GLOBAL mroonga_log_file = "new-mroonga.log"; +SHOW GLOBAL VARIABLES LIKE 'mroonga_log_file'; +SET GLOBAL mroonga_log_file = @mroonga_log_file_backup; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_log_file_nonexistent_path.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_log_file_nonexistent_path.test new file mode 100644 index 00000000000..254beae17a0 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_log_file_nonexistent_path.test @@ -0,0 +1,22 @@ +# 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/mroonga/have_mroonga.inc + +SET GLOBAL mroonga_log_file = "nonexistent/mroonga.log"; +SHOW GLOBAL VARIABLES LIKE 'mroonga_log_file'; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_log_file_same_value.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_log_file_same_value.test new file mode 100644 index 00000000000..54116467502 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_log_file_same_value.test @@ -0,0 +1,22 @@ +# Copyright(C) 2014 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/mroonga/have_mroonga.inc + +SET GLOBAL mroonga_log_file = "groonga.log"; +SHOW GLOBAL VARIABLES LIKE 'mroonga_log_file'; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_log_level_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_log_level_TODO_SPLIT_ME.test new file mode 100644 index 00000000000..f736be43e6b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_log_level_TODO_SPLIT_ME.test @@ -0,0 +1,61 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# Copyright(C) 2014 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 + +set @mroonga_log_level_backup=@@mroonga_log_level; +show global variables like 'mroonga_log_level'; + +set global mroonga_log_level=NONE; +show global variables like 'mroonga_log_level'; + +set global mroonga_log_level=EMERG; +show global variables like 'mroonga_log_level'; + +set global mroonga_log_level=ALERT; +show global variables like 'mroonga_log_level'; + +set global mroonga_log_level=CRIT; +show global variables like 'mroonga_log_level'; + +set global mroonga_log_level=ERROR; +show global variables like 'mroonga_log_level'; + +set global mroonga_log_level=WARNING; +show global variables like 'mroonga_log_level'; + +set global mroonga_log_level=NOTICE; +show global variables like 'mroonga_log_level'; + +set global mroonga_log_level=INFO; +show global variables like 'mroonga_log_level'; + +set global mroonga_log_level=DEBUG; +show global variables like 'mroonga_log_level'; + +set global mroonga_log_level=DUMP; +show global variables like 'mroonga_log_level'; + +--error ER_WRONG_VALUE_FOR_VAR +set global mroonga_log_level=dummy; + +--error ER_GLOBAL_VARIABLE +set session mroonga_log_level=NOTICE; + +set global mroonga_log_level=@mroonga_log_level_backup; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_match_escalation_threshold_global.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_match_escalation_threshold_global.test new file mode 100644 index 00000000000..55a318b786a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_match_escalation_threshold_global.test @@ -0,0 +1,55 @@ +# 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/mroonga/have_fulltext_index_comment.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +# MySQL <= 5.5 reports wrong a warning. :< +# It has been fixed in MySQL >= 5.6 and MariaDB >= 5.3. +--disable_warnings +SET GLOBAL mroonga_match_escalation_threshold = -1; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + tags TEXT, + FULLTEXT INDEX tags_index (tags) COMMENT 'parser "TokenDelimit"' +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, tags) VALUES ("Hello groonga!", "groonga install"); +INSERT INTO diaries (title, tags) VALUES ("Hello mroonga!", "mroonga install"); + + +SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("install" IN BOOLEAN MODE); + +SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE); + +SET GLOBAL mroonga_match_escalation_threshold = 0; +SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE); + +SET mroonga_match_escalation_threshold = 0; +SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE); + + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_match_escalation_threshold_session.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_match_escalation_threshold_session.test new file mode 100644 index 00000000000..c459e50c0d7 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_match_escalation_threshold_session.test @@ -0,0 +1,53 @@ +# 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/mroonga/have_fulltext_index_comment.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + tags TEXT, + FULLTEXT INDEX tags_index (tags) COMMENT 'parser "TokenDelimit"' +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, tags) VALUES ("Hello groonga!", "groonga install"); +INSERT INTO diaries (title, tags) VALUES ("Hello mroonga!", "mroonga install"); + + +SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("install" IN BOOLEAN MODE); + +SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE); + +# MySQL <= 5.5 reports wrong a warning. :< +# It has been fixed in MySQL >= 5.6 and MariaDB >= 5.3. +--disable_warnings +SET mroonga_match_escalation_threshold = -1; +--enable_warnings +SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE); + +SET mroonga_match_escalation_threshold = 0; +SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE); + + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_vector_column_delimiter.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_vector_column_delimiter.test new file mode 100644 index 00000000000..8412e6a65fa --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_vector_column_delimiter.test @@ -0,0 +1,54 @@ +# Copyright(C) 2014 Naoya Murakami <naoya@createfield.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/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/have_mroonga_helper.inc + +--disable_warnings +DROP TABLE IF EXISTS document; +DROP TABLE IF EXISTS category; +--enable_warnings + +CREATE TABLE category ( + category CHAR(10) PRIMARY KEY +) DEFAULT CHARSET=utf8 + COMMENT='default_tokenizer "TokenDelimit"'; + +CREATE TABLE document ( + id INT NOT NULL, + title TEXT, + categories TEXT COMMENT 'flags "COLUMN_VECTOR", type "category"', + PRIMARY KEY(id) +) DEFAULT CHARSET=utf8; + +SHOW GLOBAL VARIABLES LIKE 'mroonga_vector_column_delimiter'; + +INSERT INTO document VALUES(1, "Mroonga is the fastest search engine", "it database fulltext"); +SELECT id, title, categories FROM document; + +SET GLOBAL mroonga_vector_column_delimiter = ';'; + +SHOW GLOBAL VARIABLES LIKE 'mroonga_vector_column_delimiter'; + +SELECT id, title, categories FROM document; + +DROP TABLE document; +DROP TABLE category; + +SET GLOBAL mroonga_vector_column_delimiter = ' '; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_version.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_version.test new file mode 100644 index 00000000000..ff47f2c921d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_version.test @@ -0,0 +1,22 @@ +# Copyright(C) 2011 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/mroonga/have_mroonga.inc + +# show variables like 'groonga%'; +show variables like 'mroonga_version'; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_add_column.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_add_column.result new file mode 100644 index 00000000000..22dbbff96ac --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_add_column.result @@ -0,0 +1,37 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT +) DEFAULT CHARSET UTF8 COMMENT = 'ENGINE "InnoDB"'; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' +INSERT INTO diaries (title) VALUES ("survey"); +SELECT * FROM diaries; +id title +1 survey +ALTER TABLE diaries ADD COLUMN body TEXT; +UPDATE diaries SET body = "will start groonga!"; +SELECT * FROM diaries; +id title body +1 survey will start groonga! +INSERT INTO diaries (title, body) values ("groonga (1)", "starting groonga..."); +INSERT INTO diaries (title, body) values ("groonga (2)", "started groonga."); +SELECT * FROM diaries; +id title body +1 survey will start groonga! +2 groonga (1) starting groonga... +3 groonga (2) started groonga. +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `body` text, + PRIMARY KEY (`id`) +) ENGINE=Mroonga AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_change_column_comment.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_change_column_comment.result new file mode 100644 index 00000000000..af302b5a2a5 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_change_column_comment.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS bugs; +CREATE TABLE bugs ( +id INT UNSIGNED PRIMARY KEY, +tag VARCHAR(64) +) DEFAULT CHARSET=utf8 COMMENT='engine "InnoDB"'; +ALTER TABLE bugs +CHANGE COLUMN +tag +tag VARCHAR(64) COMMENT 'It must consist of only alphabet and number.'; +SHOW CREATE TABLE bugs; +Table Create Table +bugs CREATE TABLE `bugs` ( + `id` int(10) unsigned NOT NULL, + `tag` varchar(64) DEFAULT NULL COMMENT 'It must consist of only alphabet and number.', + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "InnoDB"' +DROP TABLE bugs; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_change_engine.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_change_engine.result new file mode 100644 index 00000000000..e5ce4692aa3 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_change_engine.result @@ -0,0 +1,49 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +body TEXT, +FULLTEXT INDEX title_index (title), +FULLTEXT INDEX body_index (body) +) ENGINE MyISAM DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `body` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `title_index` (`title`), + FULLTEXT KEY `body_index` (`body`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 +INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); +INSERT INTO diaries (title, body) VALUES ("groonga (1)", "starting groonga..."); +SELECT * FROM diaries +WHERE MATCH(title) AGAINST("survey" IN BOOLEAN MODE) AND +MATCH(body) AGAINST("groonga" IN BOOLEAN MODE); +id title body +1 survey will start groonga! +ALTER TABLE diaries ENGINE = mroonga COMMENT = 'ENGINE "InnoDB"'; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `body` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `title_index` (`title`), + FULLTEXT KEY `body_index` (`body`) +) ENGINE=Mroonga AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' +SELECT * FROM diaries +WHERE MATCH(title) AGAINST("survey" IN BOOLEAN MODE) AND +MATCH(body) AGAINST("groonga" IN BOOLEAN MODE); +id title body +1 survey will start groonga! +INSERT INTO diaries (title, body) VALUES ("groonga (2)", "started groonga."); +SELECT * FROM diaries +WHERE MATCH(title) AGAINST("groonga" IN BOOLEAN MODE) AND +MATCH(body) AGAINST("groonga" IN BOOLEAN MODE); +id title body +2 groonga (1) starting groonga... +3 groonga (2) started groonga. +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_comment_change_engine.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_comment_change_engine.result new file mode 100644 index 00000000000..1106fcffca2 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_comment_change_engine.result @@ -0,0 +1,40 @@ +DROP TABLE IF EXISTS memos; +SET NAMES utf8; +CREATE TABLE memos ( +id INT AUTO_INCREMENT PRIMARY KEY, +title VARCHAR(64), +content TEXT, +FULLTEXT INDEX(content) +) DEFAULT CHARSET=utf8 COMMENT='engine "InnoDB"'; +SHOW CREATE TABLE memos; +Table Create Table +memos CREATE TABLE `memos` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` varchar(64) DEFAULT NULL, + `content` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "InnoDB"' +INSERT INTO memos (title, content) VALUES ("Hello", "I start to write memos!"); +INSERT INTO memos (title, content) VALUES ("groonga", "I start to use groonga!"); +INSERT INTO memos (title, content) VALUES ("mroonga", "I use mroonga too!"); +ALTER TABLE memos COMMENT='engine "MyISAM"'; +SHOW CREATE TABLE memos; +Table Create Table +memos CREATE TABLE `memos` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` varchar(64) DEFAULT NULL, + `content` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='engine "MyISAM"' +SELECT * FROM memos; +id title content +1 Hello I start to write memos! +2 groonga I start to use groonga! +3 mroonga I use mroonga too! +SELECT * FROM memos WHERE MATCH(content) AGAINST("start" IN BOOLEAN MODE); +id title content +1 Hello I start to write memos! +2 groonga I start to use groonga! +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_disable_keys_create_fulltext.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_disable_keys_create_fulltext.result new file mode 100644 index 00000000000..b185bf269f7 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_disable_keys_create_fulltext.result @@ -0,0 +1,27 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES utf8; +CREATE TABLE diaries ( +id int PRIMARY KEY, +title varchar(255) +) COMMENT='ENGINE "InnoDB"' DEFAULT CHARSET=utf8; +INSERT INTO diaries VALUES (1, "Hello"); +INSERT INTO diaries VALUES (2, "天気"); +INSERT INTO diaries VALUES (3, "富士山"); +SELECT * +FROM diaries +WHERE MATCH (title) AGAINST ("富士山"); +ERROR HY000: Can't find FULLTEXT index matching the column list +CREATE FULLTEXT INDEX title_index on diaries (title); +SELECT * +FROM diaries +FORCE INDEX (title_index) +WHERE MATCH (title) AGAINST ("富士山"); +id title +3 富士山 +ALTER TABLE diaries DISABLE KEYS; +SELECT * +FROM diaries +FORCE INDEX (title_index) +WHERE MATCH (title) AGAINST ("富士山"); +ERROR HY000: Can't find FULLTEXT index matching the column list +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_disable_keys_fulltext.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_disable_keys_fulltext.result new file mode 100644 index 00000000000..e71132be139 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_disable_keys_fulltext.result @@ -0,0 +1,23 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES utf8; +CREATE TABLE diaries ( +id int PRIMARY KEY, +title varchar(255), +FULLTEXT KEY title_index (title) +) COMMENT='ENGINE "InnoDB"' DEFAULT CHARSET=utf8; +INSERT INTO diaries VALUES (1, "Hello"); +INSERT INTO diaries VALUES (2, "天気"); +INSERT INTO diaries VALUES (3, "富士山"); +SELECT * +FROM diaries +FORCE INDEX (title_index) +WHERE MATCH (title) AGAINST ("富士山"); +id title +3 富士山 +ALTER TABLE diaries DISABLE KEYS; +SELECT * +FROM diaries +FORCE INDEX (title_index) +WHERE MATCH (title) AGAINST ("富士山"); +ERROR HY000: Can't find FULLTEXT index matching the column list +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_disable_keys_multiple_column.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_disable_keys_multiple_column.result new file mode 100644 index 00000000000..1fefc1d98e6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_disable_keys_multiple_column.result @@ -0,0 +1,27 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES utf8; +CREATE TABLE diaries ( +id int PRIMARY KEY, +title varchar(255), +created_at datetime, +KEY title_and_created_at_index (title, created_at) +) COMMENT='ENGINE "InnoDB"' DEFAULT CHARSET=utf8; +INSERT INTO diaries VALUES (1, "Hello", "2012-04-30 20:00:00"); +INSERT INTO diaries VALUES (2, "天気" , "2012-04-30 23:00:00"); +INSERT INTO diaries VALUES (3, "富士山", "2012-04-30 19:00:00"); +SELECT * +FROM diaries +FORCE INDEX (title_and_created_at_index) +WHERE title = "天気" AND +created_at = "2012-04-30 23:00:00"; +id title created_at +2 天気 2012-04-30 23:00:00 +ALTER TABLE diaries DISABLE KEYS; +SELECT * +FROM diaries +FORCE INDEX (title_and_created_at_index) +WHERE title = "天気" AND +created_at = "2012-04-30 23:00:00"; +id title created_at +2 天気 2012-04-30 23:00:00 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_disable_keys_normal.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_disable_keys_normal.result new file mode 100644 index 00000000000..d115cefb243 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_disable_keys_normal.result @@ -0,0 +1,25 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES utf8; +CREATE TABLE diaries ( +id int PRIMARY KEY, +title varchar(255), +created_at datetime, +KEY created_at_index (created_at) +) COMMENT='ENGINE "InnoDB"' DEFAULT CHARSET=utf8; +INSERT INTO diaries VALUES (1, "Hello", "2012-04-30 20:00:00"); +INSERT INTO diaries VALUES (2, "天気" , "2012-04-30 23:00:00"); +INSERT INTO diaries VALUES (3, "富士山", "2012-04-30 19:00:00"); +SELECT * +FROM diaries +FORCE INDEX (created_at_index) +WHERE created_at = "2012-04-30 20:00:00"; +id title created_at +1 Hello 2012-04-30 20:00:00 +ALTER TABLE diaries DISABLE KEYS; +SELECT * +FROM diaries +FORCE INDEX (created_at_index) +WHERE created_at = "2012-04-30 20:00:00"; +id title created_at +1 Hello 2012-04-30 20:00:00 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_disable_keys_primary.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_disable_keys_primary.result new file mode 100644 index 00000000000..47649911bb1 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_disable_keys_primary.result @@ -0,0 +1,23 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES utf8; +CREATE TABLE diaries ( +id int PRIMARY KEY, +title varchar(255) +) COMMENT='ENGINE "InnoDB"' DEFAULT CHARSET=utf8; +INSERT INTO diaries VALUES (1, "Hello"); +INSERT INTO diaries VALUES (2, "天気"); +INSERT INTO diaries VALUES (3, "富士山"); +SELECT * +FROM diaries +FORCE INDEX (PRIMARY) +WHERE id = 2; +id title +2 天気 +ALTER TABLE diaries DISABLE KEYS; +SELECT * +FROM diaries +FORCE INDEX (PRIMARY) +WHERE id = 2; +id title +2 天気 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_disable_keys_updating.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_disable_keys_updating.result new file mode 100644 index 00000000000..06e1a12db55 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_disable_keys_updating.result @@ -0,0 +1,19 @@ +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( +c1 int NOT NULL, +c2 text NOT NULL, +c3 int NOT NULL, +c4 int NOT NULL, +PRIMARY KEY(c1), +KEY idx1(c3,c4), +FULLTEXT KEY ft1(c2) +) COMMENT='ENGINE "MyISAM"' DEFAULT CHARSET=utf8; +INSERT INTO t1 VALUES(1, 'test1', 1, 1); +INSERT INTO t1 VALUES(2, 'test2', 2, 2); +INSERT INTO t1 VALUES(3, 'test3', 1, 3); +ALTER TABLE t1 DISABLE KEYS; +DELETE FROM t1 WHERE c1 = 2; +UPDATE t1 SET c4 = 4 WHERE c1 = 1; +INSERT INTO t1 VALUES(4, 'test4', 2, 4); +TRUNCATE t1; +DROP TABLE t1; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_drop_column.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_drop_column.result new file mode 100644 index 00000000000..07c149a8fa8 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_drop_column.result @@ -0,0 +1,37 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +body TEXT +) DEFAULT CHARSET UTF8 COMMENT = 'ENGINE "InnoDB"'; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `body` text, + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' +INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); +SELECT * FROM diaries; +id title body +1 survey will start groonga! +ALTER TABLE diaries DROP COLUMN body; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + PRIMARY KEY (`id`) +) ENGINE=Mroonga AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' +SELECT * FROM diaries; +id title +1 survey +INSERT INTO diaries (title) values ("groonga (1)"); +INSERT INTO diaries (title) values ("groonga (2)"); +SELECT * FROM diaries; +id title +1 survey +2 groonga (1) +3 groonga (2) +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_enable_keys_fulltext.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_enable_keys_fulltext.result new file mode 100644 index 00000000000..b9a0f545965 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_enable_keys_fulltext.result @@ -0,0 +1,24 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES utf8; +CREATE TABLE diaries ( +id int PRIMARY KEY, +title varchar(255), +FULLTEXT KEY title_index (title) +) COMMENT='ENGINE "InnoDB"' DEFAULT CHARSET=utf8; +ALTER TABLE diaries DISABLE KEYS; +INSERT INTO diaries VALUES (1, "Hello"); +INSERT INTO diaries VALUES (2, "天気"); +INSERT INTO diaries VALUES (3, "富士山"); +SELECT * +FROM diaries +FORCE INDEX (title_index) +WHERE MATCH (title) AGAINST ("富士山"); +ERROR HY000: Can't find FULLTEXT index matching the column list +ALTER TABLE diaries ENABLE KEYS; +SELECT * +FROM diaries +FORCE INDEX (title_index) +WHERE MATCH (title) AGAINST ("富士山"); +id title +3 富士山 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_enable_keys_lock_tables.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_enable_keys_lock_tables.result new file mode 100644 index 00000000000..341cc4f7de7 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_enable_keys_lock_tables.result @@ -0,0 +1,20 @@ +DROP TABLE IF EXISTS memos; +CREATE TABLE IF NOT EXISTS memos ( +id VARCHAR(45) NOT NULL PRIMARY KEY, +text TEXT NOT NULL, +FULLTEXT KEY (text) +) DEFAULT CHARSET=utf8 COMMENT='engine "InnoDB"'; +LOCK TABLES memos WRITE; +ALTER TABLE memos DISABLE KEYS; +INSERT INTO memos +VALUES (00000, 'text0'), +(00001, 'text1'), +(00002, 'text2'); +ALTER TABLE memos ENABLE KEYS; +UNLOCK TABLES; +SELECT * FROM memos; +id text +0 text0 +1 text1 +2 text2 +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_enable_keys_multiple_column.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_enable_keys_multiple_column.result new file mode 100644 index 00000000000..21f6b9089bd --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_enable_keys_multiple_column.result @@ -0,0 +1,28 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES utf8; +CREATE TABLE diaries ( +id int PRIMARY KEY, +title varchar(255), +created_at datetime, +KEY title_and_created_at_index (title, created_at) +) COMMENT='ENGINE "InnoDB"' DEFAULT CHARSET=utf8; +ALTER TABLE diaries DISABLE KEYS; +INSERT INTO diaries VALUES (1, "Hello", "2012-04-30 20:00:00"); +INSERT INTO diaries VALUES (2, "天気" , "2012-04-30 23:00:00"); +INSERT INTO diaries VALUES (3, "富士山", "2012-04-30 19:00:00"); +SELECT * +FROM diaries +FORCE INDEX (title_and_created_at_index) +WHERE title = "天気" AND +created_at = "2012-04-30 23:00:00"; +id title created_at +2 天気 2012-04-30 23:00:00 +ALTER TABLE diaries ENABLE KEYS; +SELECT * +FROM diaries +FORCE INDEX (title_and_created_at_index) +WHERE title = "天気" AND +created_at = "2012-04-30 23:00:00"; +id title created_at +2 天気 2012-04-30 23:00:00 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_enable_keys_normal.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_enable_keys_normal.result new file mode 100644 index 00000000000..2ba4f1b6386 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_enable_keys_normal.result @@ -0,0 +1,26 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES utf8; +CREATE TABLE diaries ( +id int PRIMARY KEY, +title varchar(255), +created_at datetime, +KEY created_at_index (created_at) +) COMMENT='ENGINE "InnoDB"' DEFAULT CHARSET=utf8; +ALTER TABLE diaries DISABLE KEYS; +INSERT INTO diaries VALUES (1, "Hello", "2012-04-30 20:00:00"); +INSERT INTO diaries VALUES (2, "天気" , "2012-04-30 23:00:00"); +INSERT INTO diaries VALUES (3, "富士山", "2012-04-30 19:00:00"); +SELECT * +FROM diaries +FORCE INDEX (created_at_index) +WHERE created_at = "2012-04-30 20:00:00"; +id title created_at +1 Hello 2012-04-30 20:00:00 +ALTER TABLE diaries ENABLE KEYS; +SELECT * +FROM diaries +FORCE INDEX (created_at_index) +WHERE created_at = "2012-04-30 20:00:00"; +id title created_at +1 Hello 2012-04-30 20:00:00 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_enable_keys_primary.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_enable_keys_primary.result new file mode 100644 index 00000000000..a1ee9013b6b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_enable_keys_primary.result @@ -0,0 +1,24 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES utf8; +CREATE TABLE diaries ( +id int PRIMARY KEY, +title varchar(255) +) COMMENT='ENGINE "InnoDB"' DEFAULT CHARSET=utf8; +ALTER TABLE diaries DISABLE KEYS; +INSERT INTO diaries VALUES (1, "Hello"); +INSERT INTO diaries VALUES (2, "天気"); +INSERT INTO diaries VALUES (3, "富士山"); +SELECT * +FROM diaries +FORCE INDEX (PRIMARY) +WHERE id = 2; +id title +2 天気 +ALTER TABLE diaries ENABLE KEYS; +SELECT * +FROM diaries +FORCE INDEX (PRIMARY) +WHERE id = 2; +id title +2 天気 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_fulltext.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_fulltext.result new file mode 100644 index 00000000000..cc64daac30a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_fulltext.result @@ -0,0 +1,52 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +FULLTEXT INDEX title_index (title) +) DEFAULT CHARSET UTF8 COMMENT = 'ENGINE "InnoDB"'; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `title_index` (`title`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' +INSERT INTO diaries (title) VALUES ("survey"); +SELECT * FROM diaries; +id title +1 survey +ALTER TABLE diaries ADD COLUMN body TEXT; +UPDATE diaries SET body = "will start groonga!"; +SELECT * FROM diaries; +id title body +1 survey will start groonga! +INSERT INTO diaries (title, body) values ("groonga (1)", "starting groonga..."); +INSERT INTO diaries (title, body) values ("groonga (2)", "started groonga."); +SELECT * FROM diaries; +id title body +1 survey will start groonga! +2 groonga (1) starting groonga... +3 groonga (2) started groonga. +ALTER TABLE diaries ADD FULLTEXT INDEX body_index (body); +SELECT * FROM diaries +WHERE MATCH(title) AGAINST("survey") AND +MATCH(body) AGAINST("groonga"); +id title body +1 survey will start groonga! +SELECT * FROM diaries +WHERE MATCH(title) AGAINST("groonga") AND +MATCH(body) AGAINST("starting"); +id title body +2 groonga (1) starting groonga... +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `body` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `title_index` (`title`), + FULLTEXT KEY `body_index` (`body`) +) ENGINE=Mroonga AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_rename_table.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_rename_table.result new file mode 100644 index 00000000000..08e526baa50 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_rename_table.result @@ -0,0 +1,45 @@ +DROP TABLE IF EXISTS diaries, memos; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +body TEXT, +FULLTEXT INDEX title_index (title), +FULLTEXT INDEX body_index (body) +) DEFAULT CHARSET UTF8 COMMENT = 'ENGINE "InnoDB"'; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `body` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `title_index` (`title`), + FULLTEXT KEY `body_index` (`body`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' +INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); +SELECT * FROM diaries; +id title body +1 survey will start groonga! +SELECT * FROM diaries +WHERE MATCH(title) AGAINST("groonga") AND +MATCH(body) AGAINST("starting"); +id title body +ALTER TABLE diaries RENAME memos; +SELECT * FROM memos; +id title body +1 survey will start groonga! +SELECT * FROM memos +WHERE MATCH(title) AGAINST("groonga") AND +MATCH(body) AGAINST("starting"); +id title body +SHOW CREATE TABLE memos; +Table Create Table +memos CREATE TABLE `memos` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `body` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `title_index` (`title`), + FULLTEXT KEY `body_index` (`body`) +) ENGINE=Mroonga AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_spatial.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_spatial.result new file mode 100644 index 00000000000..fc38afc72d8 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_spatial.result @@ -0,0 +1,131 @@ +DROP TABLE IF EXISTS shops; +CREATE TABLE shops ( +id INT PRIMARY KEY AUTO_INCREMENT, +name TEXT, +location GEOMETRY NOT NULL +) COMMENT = 'ENGINE "InnoDB"'; +INSERT INTO shops (name, location) +VALUES ('nezu-no-taiyaki', +GeomFromText('POINT(139.762573 35.720253)')); +INSERT INTO shops (name, location) +VALUES ('taiyaki-kataoka', +GeomFromText('POINT(139.715591 35.712521)')); +INSERT INTO shops (name, location) +VALUES ('soba-taiyaki-ku', +GeomFromText('POINT(139.659088 35.683712)')); +INSERT INTO shops (name, location) +VALUES ('kuruma', +GeomFromText('POINT(139.706207 35.721516)')); +INSERT INTO shops (name, location) +VALUES ('hirose-ya', +GeomFromText('POINT(139.685608 35.714844)')); +INSERT INTO shops (name, location) +VALUES ('sazare', +GeomFromText('POINT(139.685043 35.714653)')); +INSERT INTO shops (name, location) +VALUES ('omede-taiyaki', +GeomFromText('POINT(139.817154 35.700516)')); +INSERT INTO shops (name, location) +VALUES ('onaga-ya', +GeomFromText('POINT(139.81105 35.698254)')); +INSERT INTO shops (name, location) +VALUES ('shiro-ya', +GeomFromText('POINT(139.638611 35.705517)')); +INSERT INTO shops (name, location) +VALUES ('fuji-ya', +GeomFromText('POINT(139.637115 35.703938)')); +INSERT INTO shops (name, location) +VALUES ('miyoshi', +GeomFromText('POINT(139.537323 35.644539)')); +INSERT INTO shops (name, location) +VALUES ('juju-ya', +GeomFromText('POINT(139.695755 35.628922)')); +INSERT INTO shops (name, location) +VALUES ('tatsumi-ya', +GeomFromText('POINT(139.638657 35.665501)')); +INSERT INTO shops (name, location) +VALUES ('tetsuji', +GeomFromText('POINT(139.76857 35.680912)')); +INSERT INTO shops (name, location) +VALUES ('gazuma-ya', +GeomFromText('POINT(139.647598 35.700817)')); +INSERT INTO shops (name, location) +VALUES ('honma-mon', +GeomFromText('POINT(139.652573 35.722736)')); +INSERT INTO shops (name, location) +VALUES ('naniwa-ya', +GeomFromText('POINT(139.796234 35.730061)')); +INSERT INTO shops (name, location) +VALUES ('kuro-dai', +GeomFromText('POINT(139.704834 35.650345)')); +INSERT INTO shops (name, location) +VALUES ('daruma', +GeomFromText('POINT(139.770599 35.681461)')); +INSERT INTO shops (name, location) +VALUES ('yanagi-ya', +GeomFromText('POINT(139.783981 35.685341)')); +INSERT INTO shops (name, location) +VALUES ('sharaku', +GeomFromText('POINT(139.794846 35.716969)')); +INSERT INTO shops (name, location) +VALUES ('takane', +GeomFromText('POINT(139.560913 35.698601)')); +INSERT INTO shops (name, location) +VALUES ('chiyoda', +GeomFromText('POINT(139.652817 35.642601)')); +INSERT INTO shops (name, location) +VALUES ('da-ka-po', +GeomFromText('POINT(139.727356 35.627346)')); +INSERT INTO shops (name, location) +VALUES ('matsushima-ya', +GeomFromText('POINT(139.737381 35.640556)')); +INSERT INTO shops (name, location) +VALUES ('kazuya', +GeomFromText('POINT(139.760895 35.673508)')); +INSERT INTO shops (name, location) +VALUES ('furuya-kogane-an', +GeomFromText('POINT(139.676071 35.680603)')); +INSERT INTO shops (name, location) +VALUES ('hachi-no-ie', +GeomFromText('POINT(139.668106 35.608021)')); +INSERT INTO shops (name, location) +VALUES ('azuki-chan', +GeomFromText('POINT(139.673203 35.64151)')); +INSERT INTO shops (name, location) +VALUES ('kuriko-an', +GeomFromText('POINT(139.796829 35.712013)')); +INSERT INTO shops (name, location) +VALUES ('yume-no-aru-machi-no-taiyaki-ya-san', +GeomFromText('POINT(139.712524 35.616199)')); +INSERT INTO shops (name, location) +VALUES ('naze-ya', +GeomFromText('POINT(139.665833 35.609039)')); +INSERT INTO shops (name, location) +VALUES ('sanoki-ya', +GeomFromText('POINT(139.770721 35.66592)')); +INSERT INTO shops (name, location) +VALUES ('shigeta', +GeomFromText('POINT(139.780273 35.672626)')); +INSERT INTO shops (name, location) +VALUES ('nishimi-ya', +GeomFromText('POINT(139.774628 35.671825)')); +INSERT INTO shops (name, location) +VALUES ('hiiragi', +GeomFromText('POINT(139.711517 35.647701)')); +ALTER TABLE shops ADD SPATIAL KEY location_index (location); +SELECT id, name, AsText(location) AS location_text FROM shops +WHERE MBRContains(GeomFromText('LineString(139.7727 35.6684, 139.7038 35.7121)'), location); +id name location_text +14 tetsuji POINT(139.76857 35.680912) +19 daruma POINT(139.770599 35.681461) +26 kazuya POINT(139.760895 35.673508) +SHOW CREATE TABLE shops; +Table Create Table +shops CREATE TABLE `shops` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` text, + `location` geometry NOT NULL, + PRIMARY KEY (`id`), + SPATIAL KEY `location_index` (`location`) +) ENGINE=Mroonga AUTO_INCREMENT=37 DEFAULT CHARSET=latin1 COMMENT='ENGINE "InnoDB"' +DROP TABLE shops; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/auto_increment_text.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/auto_increment_text.result new file mode 100644 index 00000000000..9d45d2fe63d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/auto_increment_text.result @@ -0,0 +1,15 @@ +drop table if exists diaries; +create table diaries ( +id int primary key auto_increment, +body text +) comment = 'engine "innodb"'; +insert into diaries (body) values ("started groonga (long text)"); +select * from diaries; +id body +1 started groonga (long text) +insert into diaries (body) values ("sleeping... (short text)"); +select * from diaries; +id body +1 started groonga (long text) +2 sleeping... (short text) +drop table diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/binlog_TODO_SPLIT_ME.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/binlog_TODO_SPLIT_ME.result new file mode 100644 index 00000000000..f0792094a34 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/binlog_TODO_SPLIT_ME.result @@ -0,0 +1,34 @@ +drop table if exists t1; +show variables like 'log_bin'; +Variable_name Value +log_bin ON +set binlog_format="STATEMENT"; +create table t1 (c1 int primary key, c2 int) engine = mroonga COMMENT = 'engine "innodb"'; +insert into t1 values(1,100); +insert into t1 values(2,100); +commit; +select * from t1; +c1 c2 +1 100 +2 100 +drop table t1; +set binlog_format="ROW"; +create table t1 (c1 int primary key, c2 int) engine = mroonga COMMENT = 'engine "innodb"'; +insert into t1 values(1,100); +insert into t1 values(2,100); +commit; +select * from t1; +c1 c2 +1 100 +2 100 +drop table t1; +set binlog_format="MIXED"; +create table t1 (c1 int primary key, c2 int) engine = mroonga COMMENT = 'engine "innodb"'; +insert into t1 values(1,100); +insert into t1 values(2,100); +commit; +select * from t1; +c1 c2 +1 100 +2 100 +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/column_comment_index_not_for_mroonga.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_comment_index_not_for_mroonga.result new file mode 100644 index 00000000000..b1a7c8efb89 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_comment_index_not_for_mroonga.result @@ -0,0 +1,16 @@ +DROP TABLE IF EXISTS bugs; +CREATE TABLE bugs ( +id INT UNSIGNED PRIMARY KEY, +tag VARCHAR(64), +INDEX (tag) COMMENT 'Tag search is required.' +) DEFAULT CHARSET=utf8 +COMMENT='engine "InnoDB"'; +SHOW CREATE TABLE bugs; +Table Create Table +bugs CREATE TABLE `bugs` ( + `id` int(10) unsigned NOT NULL, + `tag` varchar(64) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `tag` (`tag`) COMMENT 'Tag search is required.' +) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "InnoDB"' +DROP TABLE bugs; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/column_normal_comment.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_normal_comment.result new file mode 100644 index 00000000000..2679079664e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_normal_comment.result @@ -0,0 +1,13 @@ +DROP TABLE IF EXISTS bugs; +CREATE TABLE bugs ( +id INT UNSIGNED PRIMARY KEY, +tag VARCHAR(64) COMMENT 'It must consist of only alphabet and number.' +) DEFAULT CHARSET=utf8 COMMENT='engine "InnoDB"'; +SHOW CREATE TABLE bugs; +Table Create Table +bugs CREATE TABLE `bugs` ( + `id` int(10) unsigned NOT NULL, + `tag` varchar(64) DEFAULT NULL COMMENT 'It must consist of only alphabet and number.', + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "InnoDB"' +DROP TABLE bugs; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/count_star_with_index.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/count_star_with_index.result new file mode 100644 index 00000000000..6b29be5edb7 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/count_star_with_index.result @@ -0,0 +1,28 @@ +DROP TABLE IF EXISTS diaries_innodb; +DROP TABLE IF EXISTS diaries_mroonga; +CREATE TABLE diaries_innodb ( +id INT PRIMARY KEY AUTO_INCREMENT, +body TEXT, +flag TINYINT(2), +INDEX (flag) +) ENGINE = InnoDB DEFAULT CHARSET UTF8; +CREATE TABLE diaries_mroonga ( +id INT PRIMARY KEY AUTO_INCREMENT, +body TEXT, +flag TINYINT(2), +INDEX (flag) +) COMMENT = 'ENGINE "InnoDB"' DEFAULT CHARSET UTF8; +INSERT INTO diaries_innodb (body) VALUES ("will start groonga!"); +INSERT INTO diaries_innodb (body) VALUES ("starting groonga..."); +INSERT INTO diaries_innodb (body) VALUES ("started groonga."); +INSERT INTO diaries_mroonga (body) VALUES ("will start groonga!"); +INSERT INTO diaries_mroonga (body) VALUES ("starting groonga..."); +INSERT INTO diaries_mroonga (body) VALUES ("started groonga."); +EXPLAIN SELECT COUNT(*) FROM diaries_innodb; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE diaries_innodb index NULL flag 2 NULL 3 Using index +EXPLAIN SELECT COUNT(*) FROM diaries_mroonga; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE diaries_mroonga index NULL flag 2 NULL 3 Using index +DROP TABLE diaries_innodb; +DROP TABLE diaries_mroonga; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_TODO_SPLIT_ME.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_TODO_SPLIT_ME.result new file mode 100644 index 00000000000..b3814331038 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_TODO_SPLIT_ME.result @@ -0,0 +1,109 @@ +drop table if exists t1, t2, t3; +create table t1 (c1 int primary key) COMMENT = 'engine "innodb"'; +create table t2 (c1 int primary key) COMMENT = 'engine "innodb"'; +create table t3 (c1 int primary key) COMMENT = 'engine "innodb"'; +drop table t1,t2,t3; +create table t1 (c1 int primary key, c2 int, c3 int) COMMENT = 'engine "innodb"'; +drop table t1; +create table t1 (c1 bit primary key) COMMENT = 'engine "innodb"'; +desc t1; +Field Type Null Key Default Extra +c1 bit(1) NO PRI NULL +drop table t1; +create table t1 (c1 tinyint primary key) COMMENT = 'engine "innodb"'; +desc t1; +Field Type Null Key Default Extra +c1 tinyint(4) NO PRI NULL +drop table t1; +create table t1 (c1 smallint primary key) COMMENT = 'engine "innodb"'; +desc t1; +Field Type Null Key Default Extra +c1 smallint(6) NO PRI NULL +drop table t1; +create table t1 (c1 mediumint primary key) COMMENT = 'engine "innodb"'; +desc t1; +Field Type Null Key Default Extra +c1 mediumint(9) NO PRI NULL +drop table t1; +create table t1 (c1 int primary key) COMMENT = 'engine "innodb"'; +desc t1; +Field Type Null Key Default Extra +c1 int(11) NO PRI NULL +drop table t1; +create table t1 (c1 bigint primary key) COMMENT = 'engine "innodb"'; +desc t1; +Field Type Null Key Default Extra +c1 bigint(20) NO PRI NULL +drop table t1; +create table t1 (c1 double primary key) COMMENT = 'engine "innodb"'; +desc t1; +Field Type Null Key Default Extra +c1 double NO PRI NULL +drop table t1; +create table t1 (c1 float primary key) COMMENT = 'engine "innodb"'; +desc t1; +Field Type Null Key Default Extra +c1 float NO PRI NULL +drop table t1; +create table t1 (c1 decimal primary key) COMMENT = 'engine "innodb"'; +desc t1; +Field Type Null Key Default Extra +c1 decimal(10,0) NO PRI NULL +drop table t1; +create table t1 (c1 date primary key) COMMENT = 'engine "innodb"'; +desc t1; +Field Type Null Key Default Extra +c1 date NO PRI NULL +drop table t1; +create table t1 (c1 time primary key) COMMENT = 'engine "innodb"'; +desc t1; +Field Type Null Key Default Extra +c1 time NO PRI NULL +drop table t1; +create table t1 (c1 timestamp primary key) COMMENT = 'engine "innodb"'; +desc t1; +Field Type Null Key Default Extra +c1 timestamp NO PRI CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP +drop table t1; +create table t1 (c1 datetime primary key) COMMENT = 'engine "innodb"'; +desc t1; +Field Type Null Key Default Extra +c1 datetime NO PRI NULL +drop table t1; +create table t1 (c1 year primary key) COMMENT = 'engine "innodb"'; +desc t1; +Field Type Null Key Default Extra +c1 year(4) NO PRI NULL +drop table t1; +create table t1 (c1 char(10) primary key) COMMENT = 'engine "innodb"'; +desc t1; +Field Type Null Key Default Extra +c1 char(10) NO PRI NULL +drop table t1; +create table t1 (c1 varchar(10) primary key) COMMENT = 'engine "innodb"'; +desc t1; +Field Type Null Key Default Extra +c1 varchar(10) NO PRI NULL +drop table t1; +create table t1 (c1 binary(10) primary key) COMMENT = 'engine "innodb"'; +desc t1; +Field Type Null Key Default Extra +c1 binary(10) NO PRI NULL +drop table t1; +create table t1 (c1 varbinary(10) primary key) COMMENT = 'engine "innodb"'; +desc t1; +Field Type Null Key Default Extra +c1 varbinary(10) NO PRI NULL +drop table t1; +create table t1 (c1 enum("yes","no") primary key) COMMENT = 'engine "innodb"'; +desc t1; +Field Type Null Key Default Extra +c1 enum('yes','no') NO PRI NULL +drop table t1; +create table t1 (c1 set("A","B","AB","O") primary key) COMMENT = 'engine "innodb"'; +desc t1; +Field Type Null Key Default Extra +c1 set('A','B','AB','O') NO PRI NULL +drop table t1; +create table t1 (c1 int) COMMENT = 'engine "innodb"'; +ERROR 42000: This table type requires a primary key diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_comment_combined.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_comment_combined.result new file mode 100644 index 00000000000..ce1b5470231 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_comment_combined.result @@ -0,0 +1,12 @@ +DROP TABLE IF EXISTS bugs; +CREATE TABLE bugs ( +id INT UNSIGNED PRIMARY KEY +) DEFAULT CHARSET=utf8 +COMMENT='Free style normal comment, engine "InnoDB"'; +SHOW CREATE TABLE bugs; +Table Create Table +bugs CREATE TABLE `bugs` ( + `id` int(10) unsigned NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='Free style normal comment, engine "InnoDB"' +DROP TABLE bugs; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_normalizer_fulltext_index.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_normalizer_fulltext_index.result new file mode 100644 index 00000000000..ea992f827ca --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_normalizer_fulltext_index.result @@ -0,0 +1,16 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES utf8; +CREATE TABLE diaries ( +day DATE PRIMARY KEY, +content VARCHAR(64) NOT NULL, +FULLTEXT INDEX (content) COMMENT 'normalizer "NormalizerAuto"' +) COMMENT='engine "InnoDB"' DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +INSERT INTO diaries VALUES ("2013-04-23", "ブラックコーヒーを飲んだ。"); +SELECT * FROM diaries +WHERE MATCH (content) AGAINST ("+ふらつく" IN BOOLEAN MODE); +day content +SELECT * FROM diaries +WHERE MATCH (content) AGAINST ("+ブラック" IN BOOLEAN MODE); +day content +2013-04-23 ブラックコーヒーを飲んだ。 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/delete_TODO_SPLIT_ME.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/delete_TODO_SPLIT_ME.result new file mode 100644 index 00000000000..990537622f4 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/delete_TODO_SPLIT_ME.result @@ -0,0 +1,55 @@ +drop table if exists t1, t2, t3; +create table t1 (c1 int primary key, c2 int) COMMENT 'engine = "innodb"'; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(11) NOT NULL, + `c2` int(11) DEFAULT NULL, + PRIMARY KEY (`c1`) +) ENGINE=Mroonga DEFAULT CHARSET=latin1 COMMENT='engine = "innodb"' +insert into t1 values (1, 100); +insert into t1 values (2, 101); +insert into t1 values (3, 102); +insert into t1 values (4, 102); +select * from t1; +c1 c2 +1 100 +2 101 +3 102 +4 102 +delete from t1 where c1=3; +select * from t1; +c1 c2 +1 100 +2 101 +4 102 +flush tables; +delete from t1 where c1=2; +select * from t1; +c1 c2 +1 100 +4 102 +delete from t1; +select * from t1; +c1 c2 +drop table t1; +create table t1 (c1 int primary key, c2 text, fulltext index (c2)) COMMENT 'engine = "innodb"'; +insert into t1 values(10, "aa ii uu ee"); +insert into t1 values(20, "ka ki ku ke"); +insert into t1 values(30, "sa si su se"); +select * from t1; +c1 c2 +10 aa ii uu ee +20 ka ki ku ke +30 sa si su se +select * from t1 where match(c2) against("ki"); +c1 c2 +20 ka ki ku ke +delete from t1 where c1=20; +select * from t1; +c1 c2 +10 aa ii uu ee +30 sa si su se +select * from t1 where match(c2) against("ki"); +c1 c2 +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/delete_all.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/delete_all.result new file mode 100644 index 00000000000..200e978a582 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/delete_all.result @@ -0,0 +1,19 @@ +DROP TABLE IF EXISTS users; +SET NAMES utf8; +CREATE TABLE users ( +id int PRIMARY KEY, +name varchar(100), +FULLTEXT INDEX (name) +) COMMENT 'engine = "InnoDB"' DEFAULT CHARSET=utf8; +INSERT INTO users VALUES (1, 'Alice'); +INSERT INTO users VALUES (2, 'Bob'); +INSERT INTO users VALUES (3, 'Chris'); +SELECT * FROM users; +id name +1 Alice +2 Bob +3 Chris +DELETE FROM users; +SELECT * FROM users; +id name +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_leading_not.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_leading_not.result new file mode 100644 index 00000000000..08c37695f5a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_leading_not.result @@ -0,0 +1,24 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES UTF8; +CREATE TABLE diaries ( +id INT PRIMARY KEY, +title VARCHAR(255), +content TEXT, +FULLTEXT INDEX (content) +) DEFAULT CHARSET = UTF8 COMMENT = 'ENGINE "InnoDB"'; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL, + `title` varchar(255) DEFAULT NULL, + `content` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' +INSERT INTO diaries VALUES(1, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, "富士山", "今日も天気がよくてきれいに見える。"); +SELECT * FROM diaries WHERE MATCH(content) AGAINST("-明日 +天気" IN BOOLEAN MODE); +id title content +3 富士山 今日も天気がよくてきれいに見える。 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_multiple_match_against.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_multiple_match_against.result new file mode 100644 index 00000000000..b0bff284532 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_multiple_match_against.result @@ -0,0 +1,32 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES UTF8; +CREATE TABLE diaries ( +id INT PRIMARY KEY, +title VARCHAR(255), +content TEXT, +FULLTEXT INDEX (title), +FULLTEXT INDEX (content) +) DEFAULT CHARSET = UTF8 COMMENT = 'ENGINE "InnoDB"'; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL, + `title` varchar(255) DEFAULT NULL, + `content` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `title` (`title`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' +INSERT INTO diaries VALUES(1, "富士山", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, "天気 1月1日", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, "天気 4月4日", "今日も天気がよくてきれいに見える。"); +SELECT COUNT(*) FROM diaries WHERE MATCH(title) AGAINST("+天気" IN BOOLEAN MODE) AND MATCH(content) AGAINST("+今日" IN BOOLEAN MODE); +COUNT(*) +1 +SELECT * FROM diaries WHERE MATCH(title) AGAINST("+天気" IN BOOLEAN MODE) AND MATCH(content) AGAINST("+今日" IN BOOLEAN MODE); +id title content +3 天気 4月4日 今日も天気がよくてきれいに見える。 +SELECT 1 FROM diaries WHERE MATCH(title) AGAINST("+天気" IN BOOLEAN MODE) AND MATCH(content) AGAINST("+今日" IN BOOLEAN MODE); +1 +1 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_pragma_default_operator_minus_no_operator.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_pragma_default_operator_minus_no_operator.result new file mode 100644 index 00000000000..190105a3ba1 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_pragma_default_operator_minus_no_operator.result @@ -0,0 +1,18 @@ +DROP TABLE IF EXISTS memos; +SET NAMES utf8; +CREATE TABLE memos ( +id INT PRIMARY KEY AUTO_INCREMENT, +content TEXT, +FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8 COMMENT='engine "InnODB"'; +INSERT INTO memos VALUES (NULL, "Today is good day."); +INSERT INTO memos VALUES (NULL, "Tomorrow will be good day."); +INSERT INTO memos VALUES (NULL, "Yesterday was good day."); +INSERT INTO memos VALUES (NULL, "Today is fine."); +INSERT INTO memos VALUES (NULL, "Tomorrow will be fine."); +INSERT INTO memos VALUES (NULL, "Yesterday was fine."); +SELECT * FROM memos +WHERE MATCH (content) AGAINST ("*D- fine is be" IN BOOLEAN MODE); +id content +6 Yesterday was fine. +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_pragma_default_operator_minus_with_or.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_pragma_default_operator_minus_with_or.result new file mode 100644 index 00000000000..240da5c357f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_pragma_default_operator_minus_with_or.result @@ -0,0 +1,19 @@ +DROP TABLE IF EXISTS memos; +SET NAMES utf8; +CREATE TABLE memos ( +id INT PRIMARY KEY AUTO_INCREMENT, +content TEXT, +FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8 COMMENT='engine "InnODB"'; +INSERT INTO memos VALUES (NULL, "Today is good day."); +INSERT INTO memos VALUES (NULL, "Tomorrow will be good day."); +INSERT INTO memos VALUES (NULL, "Yesterday was good day."); +INSERT INTO memos VALUES (NULL, "Today is fine."); +INSERT INTO memos VALUES (NULL, "Tomorrow will be fine."); +INSERT INTO memos VALUES (NULL, "Yesterday was fine."); +SELECT * FROM memos +WHERE MATCH (content) AGAINST ("*D- is OR be fine" IN BOOLEAN MODE); +id content +1 Today is good day. +2 Tomorrow will be good day. +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_pragma_default_operator_minus_with_plus.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_pragma_default_operator_minus_with_plus.result new file mode 100644 index 00000000000..6dedd2183eb --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_pragma_default_operator_minus_with_plus.result @@ -0,0 +1,19 @@ +DROP TABLE IF EXISTS memos; +SET NAMES utf8; +CREATE TABLE memos ( +id INT PRIMARY KEY AUTO_INCREMENT, +content TEXT, +FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8 COMMENT='engine "InnODB"'; +INSERT INTO memos VALUES (NULL, "Today is good day."); +INSERT INTO memos VALUES (NULL, "Tomorrow will be good day."); +INSERT INTO memos VALUES (NULL, "Yesterday was good day."); +INSERT INTO memos VALUES (NULL, "Today is fine."); +INSERT INTO memos VALUES (NULL, "Tomorrow will be fine."); +INSERT INTO memos VALUES (NULL, "Yesterday was fine."); +SELECT * FROM memos +WHERE MATCH (content) AGAINST ("*D- good +day be" IN BOOLEAN MODE); +id content +1 Today is good day. +3 Yesterday was good day. +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_pragma_default_operator_or_no_operator.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_pragma_default_operator_or_no_operator.result new file mode 100644 index 00000000000..14d30fac260 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_pragma_default_operator_or_no_operator.result @@ -0,0 +1,19 @@ +DROP TABLE IF EXISTS memos; +SET NAMES utf8; +CREATE TABLE memos ( +id INT PRIMARY KEY AUTO_INCREMENT, +content TEXT, +FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8 COMMENT='engine "InnODB"'; +INSERT INTO memos VALUES (NULL, "Today is good day."); +INSERT INTO memos VALUES (NULL, "Tomorrow will be good day."); +INSERT INTO memos VALUES (NULL, "Today is fine."); +INSERT INTO memos VALUES (NULL, "Tomorrow will be fine."); +INSERT INTO memos VALUES (NULL, "Yesterday was fine."); +SELECT * FROM memos +WHERE MATCH (content) AGAINST ("*DOR today good" IN BOOLEAN MODE); +id content +1 Today is good day. +3 Today is fine. +2 Tomorrow will be good day. +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_pragma_default_operator_or_with_minus.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_pragma_default_operator_or_with_minus.result new file mode 100644 index 00000000000..d367ba1d21f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_pragma_default_operator_or_with_minus.result @@ -0,0 +1,19 @@ +DROP TABLE IF EXISTS memos; +SET NAMES utf8; +CREATE TABLE memos ( +id INT PRIMARY KEY AUTO_INCREMENT, +content TEXT, +FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8 COMMENT='engine "InnODB"'; +INSERT INTO memos VALUES (NULL, "Today is good day."); +INSERT INTO memos VALUES (NULL, "Tomorrow will be good day."); +INSERT INTO memos VALUES (NULL, "Today is fine."); +INSERT INTO memos VALUES (NULL, "Tomorrow will be fine."); +INSERT INTO memos VALUES (NULL, "Yesterday was fine."); +SELECT * FROM memos +WHERE MATCH (content) AGAINST ("*DOR today -good tomorrow" IN BOOLEAN MODE); +id content +2 Tomorrow will be good day. +3 Today is fine. +4 Tomorrow will be fine. +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_pragma_default_operator_or_with_plus.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_pragma_default_operator_or_with_plus.result new file mode 100644 index 00000000000..6bf48ab6556 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_pragma_default_operator_or_with_plus.result @@ -0,0 +1,19 @@ +DROP TABLE IF EXISTS memos; +SET NAMES utf8; +CREATE TABLE memos ( +id INT PRIMARY KEY AUTO_INCREMENT, +content TEXT, +FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8 COMMENT='engine "InnODB"'; +INSERT INTO memos VALUES (NULL, "Today is good day."); +INSERT INTO memos VALUES (NULL, "Tomorrow will be good day."); +INSERT INTO memos VALUES (NULL, "Today is fine."); +INSERT INTO memos VALUES (NULL, "Tomorrow will be fine."); +INSERT INTO memos VALUES (NULL, "Yesterday was fine."); +SELECT * FROM memos +WHERE MATCH (content) AGAINST ("*DOR today +good tomorrow" IN BOOLEAN MODE); +id content +1 Today is good day. +2 Tomorrow will be good day. +4 Tomorrow will be fine. +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_pragma_default_operator_plus_no_operator.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_pragma_default_operator_plus_no_operator.result new file mode 100644 index 00000000000..29975d55137 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_pragma_default_operator_plus_no_operator.result @@ -0,0 +1,15 @@ +DROP TABLE IF EXISTS memos; +SET NAMES utf8; +CREATE TABLE memos ( +id INT PRIMARY KEY AUTO_INCREMENT, +content TEXT, +FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8 COMMENT='engine "InnODB"'; +INSERT INTO memos VALUES (NULL, "Today is good day."); +INSERT INTO memos VALUES (NULL, "Tomorrow will be good day."); +INSERT INTO memos VALUES (NULL, "Today is fine."); +SELECT * FROM memos +WHERE MATCH (content) AGAINST ("*D+ today good" IN BOOLEAN MODE); +id content +1 Today is good day. +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_pragma_default_operator_plus_with_minus.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_pragma_default_operator_plus_with_minus.result new file mode 100644 index 00000000000..2294308ae92 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_pragma_default_operator_plus_with_minus.result @@ -0,0 +1,15 @@ +DROP TABLE IF EXISTS memos; +SET NAMES utf8; +CREATE TABLE memos ( +id INT PRIMARY KEY AUTO_INCREMENT, +content TEXT, +FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8 COMMENT='engine "InnODB"'; +INSERT INTO memos VALUES (NULL, "Today is good day."); +INSERT INTO memos VALUES (NULL, "Tomorrow will be good day."); +INSERT INTO memos VALUES (NULL, "Today is fine."); +SELECT * FROM memos +WHERE MATCH (content) AGAINST ("*D+ today -good is" IN BOOLEAN MODE); +id content +3 Today is fine. +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_pragma_default_operator_plus_with_or.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_pragma_default_operator_plus_with_or.result new file mode 100644 index 00000000000..b61f0637bb9 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_pragma_default_operator_plus_with_or.result @@ -0,0 +1,16 @@ +DROP TABLE IF EXISTS memos; +SET NAMES utf8; +CREATE TABLE memos ( +id INT PRIMARY KEY AUTO_INCREMENT, +content TEXT, +FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8 COMMENT='engine "InnODB"'; +INSERT INTO memos VALUES (NULL, "Today is good day."); +INSERT INTO memos VALUES (NULL, "Tomorrow will be good day."); +INSERT INTO memos VALUES (NULL, "Today is fine."); +SELECT * FROM memos +WHERE MATCH (content) AGAINST ("*D+ today OR tomorrow day" IN BOOLEAN MODE); +id content +1 Today is good day. +2 Tomorrow will be good day. +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_pragma_weight_full_spec.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_pragma_weight_full_spec.result new file mode 100644 index 00000000000..e603cc27401 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_pragma_weight_full_spec.result @@ -0,0 +1,20 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES utf8; +CREATE TABLE diaries ( +id INT PRIMARY KEY, +title VARCHAR(255), +content TEXT, +FULLTEXT INDEX (title, content) +) DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"'; +INSERT INTO diaries VALUES(1, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, "富士山", "今日も天気がよくてきれいに見える。"); +SELECT *, MATCH(title, content) +AGAINST("*W1:10,2:2 +天気" in BOOLEAN MODE) AS score +FROM diaries +WHERE MATCH(title, content) +AGAINST("*W1:10,2:2 +天気" in BOOLEAN MODE); +id title content score +2 天気 明日の富士山の天気について 12 +3 富士山 今日も天気がよくてきれいに見える。 2 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_pragma_weight_no_weight.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_pragma_weight_no_weight.result new file mode 100644 index 00000000000..6a5dbd5ca6b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_pragma_weight_no_weight.result @@ -0,0 +1,20 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES utf8; +CREATE TABLE diaries ( +id INT PRIMARY KEY, +title VARCHAR(255), +content TEXT, +FULLTEXT INDEX (title, content) +) DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"'; +INSERT INTO diaries VALUES(1, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, "富士山", "今日も天気がよくてきれいに見える。"); +SELECT *, MATCH(title, content) +AGAINST("*W1,2:2 +天気" in BOOLEAN MODE) AS score +FROM diaries +WHERE MATCH(title, content) +AGAINST("*W1,2:2 +天気" in BOOLEAN MODE); +id title content score +2 天気 明日の富士山の天気について 3 +3 富士山 今日も天気がよくてきれいに見える。 2 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_pragma_weight_omit_section.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_pragma_weight_omit_section.result new file mode 100644 index 00000000000..2fe63a68f77 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_pragma_weight_omit_section.result @@ -0,0 +1,20 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES utf8; +CREATE TABLE diaries ( +id INT PRIMARY KEY, +title VARCHAR(255), +content TEXT, +FULLTEXT INDEX (title, content) +) DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"'; +INSERT INTO diaries VALUES(1, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, "富士山", "今日も天気がよくてきれいに見える。"); +SELECT *, MATCH(title, content) +AGAINST("*W1:2 +天気" in BOOLEAN MODE) AS score +FROM diaries +WHERE MATCH(title, content) +AGAINST("*W1:2 +天気" in BOOLEAN MODE); +id title content score +2 天気 明日の富士山の天気について 3 +3 富士山 今日も天気がよくてきれいに見える。 1 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_charset_ascii.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_charset_ascii.result new file mode 100644 index 00000000000..b58f4ad3364 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_charset_ascii.result @@ -0,0 +1,29 @@ +drop table if exists t1, t2, t3; +create table t1 (c1 int primary key, c2 int, c3 text, fulltext index ft(c3)) COMMENT = 'engine "innodb"'; +insert into t1 values(1,10,"aa ii uu ee oo"); +insert into t1 values(2,20,"ka ki ku ke ko"); +insert into t1 values(3,30,"sa si su se so"); +insert into t1 values(4,40,"ta ti tu te to"); +insert into t1 values(5,50,"aa ii uu ee oo"); +select * from t1; +c1 c2 c3 +1 10 aa ii uu ee oo +2 20 ka ki ku ke ko +3 30 sa si su se so +4 40 ta ti tu te to +5 50 aa ii uu ee oo +select * from t1 where match(c3) against("su"); +c1 c2 c3 +3 30 sa si su se so +select * from t1 where match(c3) against("ii"); +c1 c2 c3 +1 10 aa ii uu ee oo +5 50 aa ii uu ee oo +select * from t1 where match(c3) against("+su" in boolean mode); +c1 c2 c3 +3 30 sa si su se so +select * from t1 where match(c3) against("+ii" in boolean mode); +c1 c2 c3 +1 10 aa ii uu ee oo +5 50 aa ii uu ee oo +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_charset_cp932.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_charset_cp932.result new file mode 100644 index 00000000000..d7b64010ebf --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_charset_cp932.result @@ -0,0 +1,18 @@ +drop table if exists t1, t2, t3; +set names cp932; +create table t1 (c1 int primary key, c2 varchar(255), c3 text, fulltext index(c2), fulltext index(c3)) default charset cp932 COMMENT = 'engine "innodb"'; +insert into t1 values(1, "̕xmR̓VCɂ",""); +insert into t1 values(2, "","̕xmR̓VC͕܂"); +insert into t1 values(3, "dummy", "dummy"); +select * from t1; +c1 c2 c3 +1 ̕xmR̓VCɂ +2 ̕xmR̓VC͕܂ +3 dummy dummy +select * from t1 where match(c2) against("xmR"); +c1 c2 c3 +1 ̕xmR̓VCɂ +select * from t1 where match(c3) against("xmR"); +c1 c2 c3 +2 ̕xmR̓VC͕܂ +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_charset_eucjpms.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_charset_eucjpms.result new file mode 100644 index 00000000000..9aa60690513 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_charset_eucjpms.result @@ -0,0 +1,18 @@ +drop table if exists t1, t2, t3; +set names eucjpms; +create table t1 (c1 int primary key, c2 varchar(255), c3 text, fulltext index(c2), fulltext index(c3)) default charset eucjpms COMMENT = 'engine "innodb"'; +insert into t1 values(1, "ٻλŷˤĤ",""); +insert into t1 values(2, "","ٻλŷʬޤ"); +insert into t1 values(3, "dummy", "dummy"); +select * from t1; +c1 c2 c3 +1 ٻλŷˤĤ +2 ٻλŷʬޤ +3 dummy dummy +select * from t1 where match(c2) against("ٻλ"); +c1 c2 c3 +1 ٻλŷˤĤ +select * from t1 where match(c3) against("ٻλ"); +c1 c2 c3 +2 ٻλŷʬޤ +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_charset_japanese.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_charset_japanese.result new file mode 100644 index 00000000000..6c73f4627bd --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_charset_japanese.result @@ -0,0 +1,18 @@ +drop table if exists t1, t2, t3; +set names utf8; +create table t1 (c1 int primary key, c2 varchar(255), c3 text, fulltext index(c2), fulltext index(c3)) default charset utf8 COMMENT = 'engine "innodb"'; +insert into t1 values(1, "明日の富士山の天気について","あああああああ"); +insert into t1 values(2, "いいいいい","明日の富士山の天気は分かりません"); +insert into t1 values(3, "dummy", "dummy"); +select * from t1; +c1 c2 c3 +1 明日の富士山の天気について あああああああ +2 いいいいい 明日の富士山の天気は分かりません +3 dummy dummy +select * from t1 where match(c2) against("富士山"); +c1 c2 c3 +1 明日の富士山の天気について あああああああ +select * from t1 where match(c3) against("富士山"); +c1 c2 c3 +2 いいいいい 明日の富士山の天気は分かりません +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_index_recreate.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_index_recreate.result new file mode 100644 index 00000000000..fd07ea67964 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_index_recreate.result @@ -0,0 +1,41 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES utf8; +CREATE TABLE diaries ( +id int PRIMARY KEY, +title varchar(255), +content text, +FULLTEXT INDEX (title) +) DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"'; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL, + `title` varchar(255) DEFAULT NULL, + `content` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `title` (`title`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' +INSERT INTO diaries VALUES (1, "Hello", "はじめました。"); +INSERT INTO diaries VALUES (2, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES (3, "富士山", "今日もきれい。"); +SELECT * FROM diaries WHERE MATCH (title) AGAINST ("富士山"); +id title content +3 富士山 今日もきれい。 +DROP INDEX title ON diaries; +SELECT * FROM diaries WHERE MATCH (title) AGAINST ("富士山"); +ERROR HY000: Can't find FULLTEXT index matching the column list +SELECT * FROM diaries; +id title content +1 Hello はじめました。 +2 天気 明日の富士山の天気について +3 富士山 今日もきれい。 +CREATE FULLTEXT INDEX new_title_index ON diaries (title); +SELECT * FROM diaries WHERE MATCH (title) AGAINST ("富士山"); +id title content +3 富士山 今日もきれい。 +SELECT * FROM diaries; +id title content +1 Hello はじめました。 +2 天気 明日の富士山の天気について +3 富士山 今日もきれい。 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_insert_select.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_insert_select.result new file mode 100644 index 00000000000..03300e3e9ef --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_insert_select.result @@ -0,0 +1,66 @@ +drop table if exists t1, t2, t3; +create table t1 (c1 int primary key, c2 varchar(100), fulltext index(c2)) default charset utf8 COMMENT = 'engine "innodb"'; +create table t2 (c1 int primary key, c2 text, fulltext index(c2)) default charset utf8 COMMENT = 'engine "innodb"'; +insert into t1 values (1, "aa ii uu ee oo"); +insert into t1 values (2, "ka ki ku ke ko"); +insert into t1 values (3, "aa ii ii ii oo"); +insert into t1 values (4, "sa si su se so"); +insert into t1 values (5, "ta ti ii ii to"); +insert into t2 (c1,c2) select c1,c2 from t1; +select * from t1; +c1 c2 +1 aa ii uu ee oo +2 ka ki ku ke ko +3 aa ii ii ii oo +4 sa si su se so +5 ta ti ii ii to +select * from t2; +c1 c2 +1 aa ii uu ee oo +2 ka ki ku ke ko +3 aa ii ii ii oo +4 sa si su se so +5 ta ti ii ii to +select * from t1 where c1=3; +c1 c2 +3 aa ii ii ii oo +select * from t2 where c1=3; +c1 c2 +3 aa ii ii ii oo +select * from t1 where c1>3 order by c1 desc; +c1 c2 +5 ta ti ii ii to +4 sa si su se so +select * from t2 where c1>3 order by c1 asc; +c1 c2 +4 sa si su se so +5 ta ti ii ii to +select * from t1 where c2>"s" order by c2 desc; +c1 c2 +5 ta ti ii ii to +4 sa si su se so +select * from t2 where c2>"s" order by c1 asc; +c1 c2 +4 sa si su se so +5 ta ti ii ii to +select *,match(c2) against("ii") from t1 where match(c2) against("ii") order by match(c2) against("ii") desc; +c1 c2 match(c2) against("ii") +3 aa ii ii ii oo 524289 +5 ta ti ii ii to 349526 +1 aa ii uu ee oo 174763 +select *,match(c2) against("ii") from t2 where match(c2) against("ii") order by match(c2) against("ii") asc; +c1 c2 match(c2) against("ii") +1 aa ii uu ee oo 174763 +5 ta ti ii ii to 349526 +3 aa ii ii ii oo 524289 +select c1,c2,match(c2) against("ii") from t1 where match(c2) against("ii"); +c1 c2 match(c2) against("ii") +1 aa ii uu ee oo 174763 +3 aa ii ii ii oo 524289 +5 ta ti ii ii to 349526 +select c1,c2,match(c2) against("ii") from t1 where match(c2) against("ii"); +c1 c2 match(c2) against("ii") +1 aa ii uu ee oo 174763 +3 aa ii ii ii oo 524289 +5 ta ti ii ii to 349526 +drop table t1,t2; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_insert_values.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_insert_values.result new file mode 100644 index 00000000000..8e1b0845e85 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_insert_values.result @@ -0,0 +1,25 @@ +drop table if exists t1, t2, t3; +create table t1 (c1 int primary key, c2 text, fulltext index ft (c2)) COMMENT = 'engine "innodb"'; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(11) NOT NULL, + `c2` text, + PRIMARY KEY (`c1`), + FULLTEXT KEY `ft` (`c2`) +) ENGINE=Mroonga DEFAULT CHARSET=latin1 COMMENT='engine "innodb"' +insert into t1 values (1, "hoge hoge"); +insert into t1 values (2, "fuga fuga"); +insert into t1 values (3, "moge moge"); +select * from t1; +c1 c2 +1 hoge hoge +2 fuga fuga +3 moge moge +flush tables; +select * from t1; +c1 c2 +1 hoge hoge +2 fuga fuga +3 moge moge +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_many_records.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_many_records.result new file mode 100644 index 00000000000..3809006038c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_many_records.result @@ -0,0 +1,4389 @@ +drop table if exists diaries; +set names utf8; +create table diaries ( +id int primary key, +title varchar(255), +fulltext index (title) +) default charset utf8 COMMENT = 'engine "innodb"'; +show create table diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL, + `title` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`), + FULLTEXT KEY `title` (`title`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"' +set autocommit=0; +insert into diaries values(0, "2011-07-14"); +insert into diaries values(1, "2011-07-15"); +insert into diaries values(2, "2011-07-16"); +insert into diaries values(3, "2011-07-17"); +insert into diaries values(4, "2011-07-18"); +insert into diaries values(5, "2011-07-19"); +insert into diaries values(6, "2011-07-20"); +insert into diaries values(7, "2011-07-21"); +insert into diaries values(8, "2011-07-22"); +insert into diaries values(9, "2011-07-23"); +insert into diaries values(10, "2011-07-24"); +insert into diaries values(11, "2011-07-25"); +insert into diaries values(12, "2011-07-26"); +insert into diaries values(13, "2011-07-27"); +insert into diaries values(14, "2011-07-28"); +insert into diaries values(15, "2011-07-29"); +insert into diaries values(16, "2011-07-30"); +insert into diaries values(17, "2011-07-31"); +insert into diaries values(18, "2011-08-01"); +insert into diaries values(19, "2011-08-02"); +insert into diaries values(20, "2011-08-03"); +insert into diaries values(21, "2011-08-04"); +insert into diaries values(22, "2011-08-05"); +insert into diaries values(23, "2011-08-06"); +insert into diaries values(24, "2011-08-07"); +insert into diaries values(25, "2011-08-08"); +insert into diaries values(26, "2011-08-09"); +insert into diaries values(27, "2011-08-10"); +insert into diaries values(28, "2011-08-11"); +insert into diaries values(29, "2011-08-12"); +insert into diaries values(30, "2011-08-13"); +insert into diaries values(31, "2011-08-14"); +insert into diaries values(32, "2011-08-15"); +insert into diaries values(33, "2011-08-16"); +insert into diaries values(34, "2011-08-17"); +insert into diaries values(35, "2011-08-18"); +insert into diaries values(36, "2011-08-19"); +insert into diaries values(37, "2011-08-20"); +insert into diaries values(38, "2011-08-21"); +insert into diaries values(39, "2011-08-22"); +insert into diaries values(40, "2011-08-23"); +insert into diaries values(41, "2011-08-24"); +insert into diaries values(42, "2011-08-25"); +insert into diaries values(43, "2011-08-26"); +insert into diaries values(44, "2011-08-27"); +insert into diaries values(45, "2011-08-28"); +insert into diaries values(46, "2011-08-29"); +insert into diaries values(47, "2011-08-30"); +insert into diaries values(48, "2011-08-31"); +insert into diaries values(49, "2011-09-01"); +insert into diaries values(50, "2011-09-02"); +insert into diaries values(51, "2011-09-03"); +insert into diaries values(52, "2011-09-04"); +insert into diaries values(53, "2011-09-05"); +insert into diaries values(54, "2011-09-06"); +insert into diaries values(55, "2011-09-07"); +insert into diaries values(56, "2011-09-08"); +insert into diaries values(57, "2011-09-09"); +insert into diaries values(58, "2011-09-10"); +insert into diaries values(59, "2011-09-11"); +insert into diaries values(60, "2011-09-12"); +insert into diaries values(61, "2011-09-13"); +insert into diaries values(62, "2011-09-14"); +insert into diaries values(63, "2011-09-15"); +insert into diaries values(64, "2011-09-16"); +insert into diaries values(65, "2011-09-17"); +insert into diaries values(66, "2011-09-18"); +insert into diaries values(67, "2011-09-19"); +insert into diaries values(68, "2011-09-20"); +insert into diaries values(69, "2011-09-21"); +insert into diaries values(70, "2011-09-22"); +insert into diaries values(71, "2011-09-23"); +insert into diaries values(72, "2011-09-24"); +insert into diaries values(73, "2011-09-25"); +insert into diaries values(74, "2011-09-26"); +insert into diaries values(75, "2011-09-27"); +insert into diaries values(76, "2011-09-28"); +insert into diaries values(77, "2011-09-29"); +insert into diaries values(78, "2011-09-30"); +insert into diaries values(79, "2011-10-01"); +insert into diaries values(80, "2011-10-02"); +insert into diaries values(81, "2011-10-03"); +insert into diaries values(82, "2011-10-04"); +insert into diaries values(83, "2011-10-05"); +insert into diaries values(84, "2011-10-06"); +insert into diaries values(85, "2011-10-07"); +insert into diaries values(86, "2011-10-08"); +insert into diaries values(87, "2011-10-09"); +insert into diaries values(88, "2011-10-10"); +insert into diaries values(89, "2011-10-11"); +insert into diaries values(90, "2011-10-12"); +insert into diaries values(91, "2011-10-13"); +insert into diaries values(92, "2011-10-14"); +insert into diaries values(93, "2011-10-15"); +insert into diaries values(94, "2011-10-16"); +insert into diaries values(95, "2011-10-17"); +insert into diaries values(96, "2011-10-18"); +insert into diaries values(97, "2011-10-19"); +insert into diaries values(98, "2011-10-20"); +insert into diaries values(99, "2011-10-21"); +insert into diaries values(100, "2011-10-22"); +insert into diaries values(101, "2011-10-23"); +insert into diaries values(102, "2011-10-24"); +insert into diaries values(103, "2011-10-25"); +insert into diaries values(104, "2011-10-26"); +insert into diaries values(105, "2011-10-27"); +insert into diaries values(106, "2011-10-28"); +insert into diaries values(107, "2011-10-29"); +insert into diaries values(108, "2011-10-30"); +insert into diaries values(109, "2011-10-31"); +insert into diaries values(110, "2011-11-01"); +insert into diaries values(111, "2011-11-02"); +insert into diaries values(112, "2011-11-03"); +insert into diaries values(113, "2011-11-04"); +insert into diaries values(114, "2011-11-05"); +insert into diaries values(115, "2011-11-06"); +insert into diaries values(116, "2011-11-07"); +insert into diaries values(117, "2011-11-08"); +insert into diaries values(118, "2011-11-09"); +insert into diaries values(119, "2011-11-10"); +insert into diaries values(120, "2011-11-11"); +insert into diaries values(121, "2011-11-12"); +insert into diaries values(122, "2011-11-13"); +insert into diaries values(123, "2011-11-14"); +insert into diaries values(124, "2011-11-15"); +insert into diaries values(125, "2011-11-16"); +insert into diaries values(126, "2011-11-17"); +insert into diaries values(127, "2011-11-18"); +insert into diaries values(128, "2011-11-19"); +insert into diaries values(129, "2011-11-20"); +insert into diaries values(130, "2011-11-21"); +insert into diaries values(131, "2011-11-22"); +insert into diaries values(132, "2011-11-23"); +insert into diaries values(133, "2011-11-24"); +insert into diaries values(134, "2011-11-25"); +insert into diaries values(135, "2011-11-26"); +insert into diaries values(136, "2011-11-27"); +insert into diaries values(137, "2011-11-28"); +insert into diaries values(138, "2011-11-29"); +insert into diaries values(139, "2011-11-30"); +insert into diaries values(140, "2011-12-01"); +insert into diaries values(141, "2011-12-02"); +insert into diaries values(142, "2011-12-03"); +insert into diaries values(143, "2011-12-04"); +insert into diaries values(144, "2011-12-05"); +insert into diaries values(145, "2011-12-06"); +insert into diaries values(146, "2011-12-07"); +insert into diaries values(147, "2011-12-08"); +insert into diaries values(148, "2011-12-09"); +insert into diaries values(149, "2011-12-10"); +insert into diaries values(150, "2011-12-11"); +insert into diaries values(151, "2011-12-12"); +insert into diaries values(152, "2011-12-13"); +insert into diaries values(153, "2011-12-14"); +insert into diaries values(154, "2011-12-15"); +insert into diaries values(155, "2011-12-16"); +insert into diaries values(156, "2011-12-17"); +insert into diaries values(157, "2011-12-18"); +insert into diaries values(158, "2011-12-19"); +insert into diaries values(159, "2011-12-20"); +insert into diaries values(160, "2011-12-21"); +insert into diaries values(161, "2011-12-22"); +insert into diaries values(162, "2011-12-23"); +insert into diaries values(163, "2011-12-24"); +insert into diaries values(164, "2011-12-25"); +insert into diaries values(165, "2011-12-26"); +insert into diaries values(166, "2011-12-27"); +insert into diaries values(167, "2011-12-28"); +insert into diaries values(168, "2011-12-29"); +insert into diaries values(169, "2011-12-30"); +insert into diaries values(170, "2011-12-31"); +insert into diaries values(171, "2012-01-01"); +insert into diaries values(172, "2012-01-02"); +insert into diaries values(173, "2012-01-03"); +insert into diaries values(174, "2012-01-04"); +insert into diaries values(175, "2012-01-05"); +insert into diaries values(176, "2012-01-06"); +insert into diaries values(177, "2012-01-07"); +insert into diaries values(178, "2012-01-08"); +insert into diaries values(179, "2012-01-09"); +insert into diaries values(180, "2012-01-10"); +insert into diaries values(181, "2012-01-11"); +insert into diaries values(182, "2012-01-12"); +insert into diaries values(183, "2012-01-13"); +insert into diaries values(184, "2012-01-14"); +insert into diaries values(185, "2012-01-15"); +insert into diaries values(186, "2012-01-16"); +insert into diaries values(187, "2012-01-17"); +insert into diaries values(188, "2012-01-18"); +insert into diaries values(189, "2012-01-19"); +insert into diaries values(190, "2012-01-20"); +insert into diaries values(191, "2012-01-21"); +insert into diaries values(192, "2012-01-22"); +insert into diaries values(193, "2012-01-23"); +insert into diaries values(194, "2012-01-24"); +insert into diaries values(195, "2012-01-25"); +insert into diaries values(196, "2012-01-26"); +insert into diaries values(197, "2012-01-27"); +insert into diaries values(198, "2012-01-28"); +insert into diaries values(199, "2012-01-29"); +insert into diaries values(200, "2012-01-30"); +insert into diaries values(201, "2012-01-31"); +insert into diaries values(202, "2012-02-01"); +insert into diaries values(203, "2012-02-02"); +insert into diaries values(204, "2012-02-03"); +insert into diaries values(205, "2012-02-04"); +insert into diaries values(206, "2012-02-05"); +insert into diaries values(207, "2012-02-06"); +insert into diaries values(208, "2012-02-07"); +insert into diaries values(209, "2012-02-08"); +insert into diaries values(210, "2012-02-09"); +insert into diaries values(211, "2012-02-10"); +insert into diaries values(212, "2012-02-11"); +insert into diaries values(213, "2012-02-12"); +insert into diaries values(214, "2012-02-13"); +insert into diaries values(215, "2012-02-14"); +insert into diaries values(216, "2012-02-15"); +insert into diaries values(217, "2012-02-16"); +insert into diaries values(218, "2012-02-17"); +insert into diaries values(219, "2012-02-18"); +insert into diaries values(220, "2012-02-19"); +insert into diaries values(221, "2012-02-20"); +insert into diaries values(222, "2012-02-21"); +insert into diaries values(223, "2012-02-22"); +insert into diaries values(224, "2012-02-23"); +insert into diaries values(225, "2012-02-24"); +insert into diaries values(226, "2012-02-25"); +insert into diaries values(227, "2012-02-26"); +insert into diaries values(228, "2012-02-27"); +insert into diaries values(229, "2012-02-28"); +insert into diaries values(230, "2012-02-29"); +insert into diaries values(231, "2012-03-01"); +insert into diaries values(232, "2012-03-02"); +insert into diaries values(233, "2012-03-03"); +insert into diaries values(234, "2012-03-04"); +insert into diaries values(235, "2012-03-05"); +insert into diaries values(236, "2012-03-06"); +insert into diaries values(237, "2012-03-07"); +insert into diaries values(238, "2012-03-08"); +insert into diaries values(239, "2012-03-09"); +insert into diaries values(240, "2012-03-10"); +insert into diaries values(241, "2012-03-11"); +insert into diaries values(242, "2012-03-12"); +insert into diaries values(243, "2012-03-13"); +insert into diaries values(244, "2012-03-14"); +insert into diaries values(245, "2012-03-15"); +insert into diaries values(246, "2012-03-16"); +insert into diaries values(247, "2012-03-17"); +insert into diaries values(248, "2012-03-18"); +insert into diaries values(249, "2012-03-19"); +insert into diaries values(250, "2012-03-20"); +insert into diaries values(251, "2012-03-21"); +insert into diaries values(252, "2012-03-22"); +insert into diaries values(253, "2012-03-23"); +insert into diaries values(254, "2012-03-24"); +insert into diaries values(255, "2012-03-25"); +insert into diaries values(256, "2012-03-26"); +insert into diaries values(257, "2012-03-27"); +insert into diaries values(258, "2012-03-28"); +insert into diaries values(259, "2012-03-29"); +insert into diaries values(260, "2012-03-30"); +insert into diaries values(261, "2012-03-31"); +insert into diaries values(262, "2012-04-01"); +insert into diaries values(263, "2012-04-02"); +insert into diaries values(264, "2012-04-03"); +insert into diaries values(265, "2012-04-04"); +insert into diaries values(266, "2012-04-05"); +insert into diaries values(267, "2012-04-06"); +insert into diaries values(268, "2012-04-07"); +insert into diaries values(269, "2012-04-08"); +insert into diaries values(270, "2012-04-09"); +insert into diaries values(271, "2012-04-10"); +insert into diaries values(272, "2012-04-11"); +insert into diaries values(273, "2012-04-12"); +insert into diaries values(274, "2012-04-13"); +insert into diaries values(275, "2012-04-14"); +insert into diaries values(276, "2012-04-15"); +insert into diaries values(277, "2012-04-16"); +insert into diaries values(278, "2012-04-17"); +insert into diaries values(279, "2012-04-18"); +insert into diaries values(280, "2012-04-19"); +insert into diaries values(281, "2012-04-20"); +insert into diaries values(282, "2012-04-21"); +insert into diaries values(283, "2012-04-22"); +insert into diaries values(284, "2012-04-23"); +insert into diaries values(285, "2012-04-24"); +insert into diaries values(286, "2012-04-25"); +insert into diaries values(287, "2012-04-26"); +insert into diaries values(288, "2012-04-27"); +insert into diaries values(289, "2012-04-28"); +insert into diaries values(290, "2012-04-29"); +insert into diaries values(291, "2012-04-30"); +insert into diaries values(292, "2012-05-01"); +insert into diaries values(293, "2012-05-02"); +insert into diaries values(294, "2012-05-03"); +insert into diaries values(295, "2012-05-04"); +insert into diaries values(296, "2012-05-05"); +insert into diaries values(297, "2012-05-06"); +insert into diaries values(298, "2012-05-07"); +insert into diaries values(299, "2012-05-08"); +insert into diaries values(300, "2012-05-09"); +insert into diaries values(301, "2012-05-10"); +insert into diaries values(302, "2012-05-11"); +insert into diaries values(303, "2012-05-12"); +insert into diaries values(304, "2012-05-13"); +insert into diaries values(305, "2012-05-14"); +insert into diaries values(306, "2012-05-15"); +insert into diaries values(307, "2012-05-16"); +insert into diaries values(308, "2012-05-17"); +insert into diaries values(309, "2012-05-18"); +insert into diaries values(310, "2012-05-19"); +insert into diaries values(311, "2012-05-20"); +insert into diaries values(312, "2012-05-21"); +insert into diaries values(313, "2012-05-22"); +insert into diaries values(314, "2012-05-23"); +insert into diaries values(315, "2012-05-24"); +insert into diaries values(316, "2012-05-25"); +insert into diaries values(317, "2012-05-26"); +insert into diaries values(318, "2012-05-27"); +insert into diaries values(319, "2012-05-28"); +insert into diaries values(320, "2012-05-29"); +insert into diaries values(321, "2012-05-30"); +insert into diaries values(322, "2012-05-31"); +insert into diaries values(323, "2012-06-01"); +insert into diaries values(324, "2012-06-02"); +insert into diaries values(325, "2012-06-03"); +insert into diaries values(326, "2012-06-04"); +insert into diaries values(327, "2012-06-05"); +insert into diaries values(328, "2012-06-06"); +insert into diaries values(329, "2012-06-07"); +insert into diaries values(330, "2012-06-08"); +insert into diaries values(331, "2012-06-09"); +insert into diaries values(332, "2012-06-10"); +insert into diaries values(333, "2012-06-11"); +insert into diaries values(334, "2012-06-12"); +insert into diaries values(335, "2012-06-13"); +insert into diaries values(336, "2012-06-14"); +insert into diaries values(337, "2012-06-15"); +insert into diaries values(338, "2012-06-16"); +insert into diaries values(339, "2012-06-17"); +insert into diaries values(340, "2012-06-18"); +insert into diaries values(341, "2012-06-19"); +insert into diaries values(342, "2012-06-20"); +insert into diaries values(343, "2012-06-21"); +insert into diaries values(344, "2012-06-22"); +insert into diaries values(345, "2012-06-23"); +insert into diaries values(346, "2012-06-24"); +insert into diaries values(347, "2012-06-25"); +insert into diaries values(348, "2012-06-26"); +insert into diaries values(349, "2012-06-27"); +insert into diaries values(350, "2012-06-28"); +insert into diaries values(351, "2012-06-29"); +insert into diaries values(352, "2012-06-30"); +insert into diaries values(353, "2012-07-01"); +insert into diaries values(354, "2012-07-02"); +insert into diaries values(355, "2012-07-03"); +insert into diaries values(356, "2012-07-04"); +insert into diaries values(357, "2012-07-05"); +insert into diaries values(358, "2012-07-06"); +insert into diaries values(359, "2012-07-07"); +insert into diaries values(360, "2012-07-08"); +insert into diaries values(361, "2012-07-09"); +insert into diaries values(362, "2012-07-10"); +insert into diaries values(363, "2012-07-11"); +insert into diaries values(364, "2012-07-12"); +insert into diaries values(365, "2012-07-13"); +insert into diaries values(366, "2012-07-14"); +insert into diaries values(367, "2012-07-15"); +insert into diaries values(368, "2012-07-16"); +insert into diaries values(369, "2012-07-17"); +insert into diaries values(370, "2012-07-18"); +insert into diaries values(371, "2012-07-19"); +insert into diaries values(372, "2012-07-20"); +insert into diaries values(373, "2012-07-21"); +insert into diaries values(374, "2012-07-22"); +insert into diaries values(375, "2012-07-23"); +insert into diaries values(376, "2012-07-24"); +insert into diaries values(377, "2012-07-25"); +insert into diaries values(378, "2012-07-26"); +insert into diaries values(379, "2012-07-27"); +insert into diaries values(380, "2012-07-28"); +insert into diaries values(381, "2012-07-29"); +insert into diaries values(382, "2012-07-30"); +insert into diaries values(383, "2012-07-31"); +insert into diaries values(384, "2012-08-01"); +insert into diaries values(385, "2012-08-02"); +insert into diaries values(386, "2012-08-03"); +insert into diaries values(387, "2012-08-04"); +insert into diaries values(388, "2012-08-05"); +insert into diaries values(389, "2012-08-06"); +insert into diaries values(390, "2012-08-07"); +insert into diaries values(391, "2012-08-08"); +insert into diaries values(392, "2012-08-09"); +insert into diaries values(393, "2012-08-10"); +insert into diaries values(394, "2012-08-11"); +insert into diaries values(395, "2012-08-12"); +insert into diaries values(396, "2012-08-13"); +insert into diaries values(397, "2012-08-14"); +insert into diaries values(398, "2012-08-15"); +insert into diaries values(399, "2012-08-16"); +insert into diaries values(400, "2012-08-17"); +insert into diaries values(401, "2012-08-18"); +insert into diaries values(402, "2012-08-19"); +insert into diaries values(403, "2012-08-20"); +insert into diaries values(404, "2012-08-21"); +insert into diaries values(405, "2012-08-22"); +insert into diaries values(406, "2012-08-23"); +insert into diaries values(407, "2012-08-24"); +insert into diaries values(408, "2012-08-25"); +insert into diaries values(409, "2012-08-26"); +insert into diaries values(410, "2012-08-27"); +insert into diaries values(411, "2012-08-28"); +insert into diaries values(412, "2012-08-29"); +insert into diaries values(413, "2012-08-30"); +insert into diaries values(414, "2012-08-31"); +insert into diaries values(415, "2012-09-01"); +insert into diaries values(416, "2012-09-02"); +insert into diaries values(417, "2012-09-03"); +insert into diaries values(418, "2012-09-04"); +insert into diaries values(419, "2012-09-05"); +insert into diaries values(420, "2012-09-06"); +insert into diaries values(421, "2012-09-07"); +insert into diaries values(422, "2012-09-08"); +insert into diaries values(423, "2012-09-09"); +insert into diaries values(424, "2012-09-10"); +insert into diaries values(425, "2012-09-11"); +insert into diaries values(426, "2012-09-12"); +insert into diaries values(427, "2012-09-13"); +insert into diaries values(428, "2012-09-14"); +insert into diaries values(429, "2012-09-15"); +insert into diaries values(430, "2012-09-16"); +insert into diaries values(431, "2012-09-17"); +insert into diaries values(432, "2012-09-18"); +insert into diaries values(433, "2012-09-19"); +insert into diaries values(434, "2012-09-20"); +insert into diaries values(435, "2012-09-21"); +insert into diaries values(436, "2012-09-22"); +insert into diaries values(437, "2012-09-23"); +insert into diaries values(438, "2012-09-24"); +insert into diaries values(439, "2012-09-25"); +insert into diaries values(440, "2012-09-26"); +insert into diaries values(441, "2012-09-27"); +insert into diaries values(442, "2012-09-28"); +insert into diaries values(443, "2012-09-29"); +insert into diaries values(444, "2012-09-30"); +insert into diaries values(445, "2012-10-01"); +insert into diaries values(446, "2012-10-02"); +insert into diaries values(447, "2012-10-03"); +insert into diaries values(448, "2012-10-04"); +insert into diaries values(449, "2012-10-05"); +insert into diaries values(450, "2012-10-06"); +insert into diaries values(451, "2012-10-07"); +insert into diaries values(452, "2012-10-08"); +insert into diaries values(453, "2012-10-09"); +insert into diaries values(454, "2012-10-10"); +insert into diaries values(455, "2012-10-11"); +insert into diaries values(456, "2012-10-12"); +insert into diaries values(457, "2012-10-13"); +insert into diaries values(458, "2012-10-14"); +insert into diaries values(459, "2012-10-15"); +insert into diaries values(460, "2012-10-16"); +insert into diaries values(461, "2012-10-17"); +insert into diaries values(462, "2012-10-18"); +insert into diaries values(463, "2012-10-19"); +insert into diaries values(464, "2012-10-20"); +insert into diaries values(465, "2012-10-21"); +insert into diaries values(466, "2012-10-22"); +insert into diaries values(467, "2012-10-23"); +insert into diaries values(468, "2012-10-24"); +insert into diaries values(469, "2012-10-25"); +insert into diaries values(470, "2012-10-26"); +insert into diaries values(471, "2012-10-27"); +insert into diaries values(472, "2012-10-28"); +insert into diaries values(473, "2012-10-29"); +insert into diaries values(474, "2012-10-30"); +insert into diaries values(475, "2012-10-31"); +insert into diaries values(476, "2012-11-01"); +insert into diaries values(477, "2012-11-02"); +insert into diaries values(478, "2012-11-03"); +insert into diaries values(479, "2012-11-04"); +insert into diaries values(480, "2012-11-05"); +insert into diaries values(481, "2012-11-06"); +insert into diaries values(482, "2012-11-07"); +insert into diaries values(483, "2012-11-08"); +insert into diaries values(484, "2012-11-09"); +insert into diaries values(485, "2012-11-10"); +insert into diaries values(486, "2012-11-11"); +insert into diaries values(487, "2012-11-12"); +insert into diaries values(488, "2012-11-13"); +insert into diaries values(489, "2012-11-14"); +insert into diaries values(490, "2012-11-15"); +insert into diaries values(491, "2012-11-16"); +insert into diaries values(492, "2012-11-17"); +insert into diaries values(493, "2012-11-18"); +insert into diaries values(494, "2012-11-19"); +insert into diaries values(495, "2012-11-20"); +insert into diaries values(496, "2012-11-21"); +insert into diaries values(497, "2012-11-22"); +insert into diaries values(498, "2012-11-23"); +insert into diaries values(499, "2012-11-24"); +insert into diaries values(500, "2012-11-25"); +insert into diaries values(501, "2012-11-26"); +insert into diaries values(502, "2012-11-27"); +insert into diaries values(503, "2012-11-28"); +insert into diaries values(504, "2012-11-29"); +insert into diaries values(505, "2012-11-30"); +insert into diaries values(506, "2012-12-01"); +insert into diaries values(507, "2012-12-02"); +insert into diaries values(508, "2012-12-03"); +insert into diaries values(509, "2012-12-04"); +insert into diaries values(510, "2012-12-05"); +insert into diaries values(511, "2012-12-06"); +insert into diaries values(512, "2012-12-07"); +insert into diaries values(513, "2012-12-08"); +insert into diaries values(514, "2012-12-09"); +insert into diaries values(515, "2012-12-10"); +insert into diaries values(516, "2012-12-11"); +insert into diaries values(517, "2012-12-12"); +insert into diaries values(518, "2012-12-13"); +insert into diaries values(519, "2012-12-14"); +insert into diaries values(520, "2012-12-15"); +insert into diaries values(521, "2012-12-16"); +insert into diaries values(522, "2012-12-17"); +insert into diaries values(523, "2012-12-18"); +insert into diaries values(524, "2012-12-19"); +insert into diaries values(525, "2012-12-20"); +insert into diaries values(526, "2012-12-21"); +insert into diaries values(527, "2012-12-22"); +insert into diaries values(528, "2012-12-23"); +insert into diaries values(529, "2012-12-24"); +insert into diaries values(530, "2012-12-25"); +insert into diaries values(531, "2012-12-26"); +insert into diaries values(532, "2012-12-27"); +insert into diaries values(533, "2012-12-28"); +insert into diaries values(534, "2012-12-29"); +insert into diaries values(535, "2012-12-30"); +insert into diaries values(536, "2012-12-31"); +insert into diaries values(537, "2013-01-01"); +insert into diaries values(538, "2013-01-02"); +insert into diaries values(539, "2013-01-03"); +insert into diaries values(540, "2013-01-04"); +insert into diaries values(541, "2013-01-05"); +insert into diaries values(542, "2013-01-06"); +insert into diaries values(543, "2013-01-07"); +insert into diaries values(544, "2013-01-08"); +insert into diaries values(545, "2013-01-09"); +insert into diaries values(546, "2013-01-10"); +insert into diaries values(547, "2013-01-11"); +insert into diaries values(548, "2013-01-12"); +insert into diaries values(549, "2013-01-13"); +insert into diaries values(550, "2013-01-14"); +insert into diaries values(551, "2013-01-15"); +insert into diaries values(552, "2013-01-16"); +insert into diaries values(553, "2013-01-17"); +insert into diaries values(554, "2013-01-18"); +insert into diaries values(555, "2013-01-19"); +insert into diaries values(556, "2013-01-20"); +insert into diaries values(557, "2013-01-21"); +insert into diaries values(558, "2013-01-22"); +insert into diaries values(559, "2013-01-23"); +insert into diaries values(560, "2013-01-24"); +insert into diaries values(561, "2013-01-25"); +insert into diaries values(562, "2013-01-26"); +insert into diaries values(563, "2013-01-27"); +insert into diaries values(564, "2013-01-28"); +insert into diaries values(565, "2013-01-29"); +insert into diaries values(566, "2013-01-30"); +insert into diaries values(567, "2013-01-31"); +insert into diaries values(568, "2013-02-01"); +insert into diaries values(569, "2013-02-02"); +insert into diaries values(570, "2013-02-03"); +insert into diaries values(571, "2013-02-04"); +insert into diaries values(572, "2013-02-05"); +insert into diaries values(573, "2013-02-06"); +insert into diaries values(574, "2013-02-07"); +insert into diaries values(575, "2013-02-08"); +insert into diaries values(576, "2013-02-09"); +insert into diaries values(577, "2013-02-10"); +insert into diaries values(578, "2013-02-11"); +insert into diaries values(579, "2013-02-12"); +insert into diaries values(580, "2013-02-13"); +insert into diaries values(581, "2013-02-14"); +insert into diaries values(582, "2013-02-15"); +insert into diaries values(583, "2013-02-16"); +insert into diaries values(584, "2013-02-17"); +insert into diaries values(585, "2013-02-18"); +insert into diaries values(586, "2013-02-19"); +insert into diaries values(587, "2013-02-20"); +insert into diaries values(588, "2013-02-21"); +insert into diaries values(589, "2013-02-22"); +insert into diaries values(590, "2013-02-23"); +insert into diaries values(591, "2013-02-24"); +insert into diaries values(592, "2013-02-25"); +insert into diaries values(593, "2013-02-26"); +insert into diaries values(594, "2013-02-27"); +insert into diaries values(595, "2013-02-28"); +insert into diaries values(596, "2013-03-01"); +insert into diaries values(597, "2013-03-02"); +insert into diaries values(598, "2013-03-03"); +insert into diaries values(599, "2013-03-04"); +insert into diaries values(600, "2013-03-05"); +insert into diaries values(601, "2013-03-06"); +insert into diaries values(602, "2013-03-07"); +insert into diaries values(603, "2013-03-08"); +insert into diaries values(604, "2013-03-09"); +insert into diaries values(605, "2013-03-10"); +insert into diaries values(606, "2013-03-11"); +insert into diaries values(607, "2013-03-12"); +insert into diaries values(608, "2013-03-13"); +insert into diaries values(609, "2013-03-14"); +insert into diaries values(610, "2013-03-15"); +insert into diaries values(611, "2013-03-16"); +insert into diaries values(612, "2013-03-17"); +insert into diaries values(613, "2013-03-18"); +insert into diaries values(614, "2013-03-19"); +insert into diaries values(615, "2013-03-20"); +insert into diaries values(616, "2013-03-21"); +insert into diaries values(617, "2013-03-22"); +insert into diaries values(618, "2013-03-23"); +insert into diaries values(619, "2013-03-24"); +insert into diaries values(620, "2013-03-25"); +insert into diaries values(621, "2013-03-26"); +insert into diaries values(622, "2013-03-27"); +insert into diaries values(623, "2013-03-28"); +insert into diaries values(624, "2013-03-29"); +insert into diaries values(625, "2013-03-30"); +insert into diaries values(626, "2013-03-31"); +insert into diaries values(627, "2013-04-01"); +insert into diaries values(628, "2013-04-02"); +insert into diaries values(629, "2013-04-03"); +insert into diaries values(630, "2013-04-04"); +insert into diaries values(631, "2013-04-05"); +insert into diaries values(632, "2013-04-06"); +insert into diaries values(633, "2013-04-07"); +insert into diaries values(634, "2013-04-08"); +insert into diaries values(635, "2013-04-09"); +insert into diaries values(636, "2013-04-10"); +insert into diaries values(637, "2013-04-11"); +insert into diaries values(638, "2013-04-12"); +insert into diaries values(639, "2013-04-13"); +insert into diaries values(640, "2013-04-14"); +insert into diaries values(641, "2013-04-15"); +insert into diaries values(642, "2013-04-16"); +insert into diaries values(643, "2013-04-17"); +insert into diaries values(644, "2013-04-18"); +insert into diaries values(645, "2013-04-19"); +insert into diaries values(646, "2013-04-20"); +insert into diaries values(647, "2013-04-21"); +insert into diaries values(648, "2013-04-22"); +insert into diaries values(649, "2013-04-23"); +insert into diaries values(650, "2013-04-24"); +insert into diaries values(651, "2013-04-25"); +insert into diaries values(652, "2013-04-26"); +insert into diaries values(653, "2013-04-27"); +insert into diaries values(654, "2013-04-28"); +insert into diaries values(655, "2013-04-29"); +insert into diaries values(656, "2013-04-30"); +insert into diaries values(657, "2013-05-01"); +insert into diaries values(658, "2013-05-02"); +insert into diaries values(659, "2013-05-03"); +insert into diaries values(660, "2013-05-04"); +insert into diaries values(661, "2013-05-05"); +insert into diaries values(662, "2013-05-06"); +insert into diaries values(663, "2013-05-07"); +insert into diaries values(664, "2013-05-08"); +insert into diaries values(665, "2013-05-09"); +insert into diaries values(666, "2013-05-10"); +insert into diaries values(667, "2013-05-11"); +insert into diaries values(668, "2013-05-12"); +insert into diaries values(669, "2013-05-13"); +insert into diaries values(670, "2013-05-14"); +insert into diaries values(671, "2013-05-15"); +insert into diaries values(672, "2013-05-16"); +insert into diaries values(673, "2013-05-17"); +insert into diaries values(674, "2013-05-18"); +insert into diaries values(675, "2013-05-19"); +insert into diaries values(676, "2013-05-20"); +insert into diaries values(677, "2013-05-21"); +insert into diaries values(678, "2013-05-22"); +insert into diaries values(679, "2013-05-23"); +insert into diaries values(680, "2013-05-24"); +insert into diaries values(681, "2013-05-25"); +insert into diaries values(682, "2013-05-26"); +insert into diaries values(683, "2013-05-27"); +insert into diaries values(684, "2013-05-28"); +insert into diaries values(685, "2013-05-29"); +insert into diaries values(686, "2013-05-30"); +insert into diaries values(687, "2013-05-31"); +insert into diaries values(688, "2013-06-01"); +insert into diaries values(689, "2013-06-02"); +insert into diaries values(690, "2013-06-03"); +insert into diaries values(691, "2013-06-04"); +insert into diaries values(692, "2013-06-05"); +insert into diaries values(693, "2013-06-06"); +insert into diaries values(694, "2013-06-07"); +insert into diaries values(695, "2013-06-08"); +insert into diaries values(696, "2013-06-09"); +insert into diaries values(697, "2013-06-10"); +insert into diaries values(698, "2013-06-11"); +insert into diaries values(699, "2013-06-12"); +insert into diaries values(700, "2013-06-13"); +insert into diaries values(701, "2013-06-14"); +insert into diaries values(702, "2013-06-15"); +insert into diaries values(703, "2013-06-16"); +insert into diaries values(704, "2013-06-17"); +insert into diaries values(705, "2013-06-18"); +insert into diaries values(706, "2013-06-19"); +insert into diaries values(707, "2013-06-20"); +insert into diaries values(708, "2013-06-21"); +insert into diaries values(709, "2013-06-22"); +insert into diaries values(710, "2013-06-23"); +insert into diaries values(711, "2013-06-24"); +insert into diaries values(712, "2013-06-25"); +insert into diaries values(713, "2013-06-26"); +insert into diaries values(714, "2013-06-27"); +insert into diaries values(715, "2013-06-28"); +insert into diaries values(716, "2013-06-29"); +insert into diaries values(717, "2013-06-30"); +insert into diaries values(718, "2013-07-01"); +insert into diaries values(719, "2013-07-02"); +insert into diaries values(720, "2013-07-03"); +insert into diaries values(721, "2013-07-04"); +insert into diaries values(722, "2013-07-05"); +insert into diaries values(723, "2013-07-06"); +insert into diaries values(724, "2013-07-07"); +insert into diaries values(725, "2013-07-08"); +insert into diaries values(726, "2013-07-09"); +insert into diaries values(727, "2013-07-10"); +insert into diaries values(728, "2013-07-11"); +insert into diaries values(729, "2013-07-12"); +insert into diaries values(730, "2013-07-13"); +insert into diaries values(731, "2013-07-14"); +insert into diaries values(732, "2013-07-15"); +insert into diaries values(733, "2013-07-16"); +insert into diaries values(734, "2013-07-17"); +insert into diaries values(735, "2013-07-18"); +insert into diaries values(736, "2013-07-19"); +insert into diaries values(737, "2013-07-20"); +insert into diaries values(738, "2013-07-21"); +insert into diaries values(739, "2013-07-22"); +insert into diaries values(740, "2013-07-23"); +insert into diaries values(741, "2013-07-24"); +insert into diaries values(742, "2013-07-25"); +insert into diaries values(743, "2013-07-26"); +insert into diaries values(744, "2013-07-27"); +insert into diaries values(745, "2013-07-28"); +insert into diaries values(746, "2013-07-29"); +insert into diaries values(747, "2013-07-30"); +insert into diaries values(748, "2013-07-31"); +insert into diaries values(749, "2013-08-01"); +insert into diaries values(750, "2013-08-02"); +insert into diaries values(751, "2013-08-03"); +insert into diaries values(752, "2013-08-04"); +insert into diaries values(753, "2013-08-05"); +insert into diaries values(754, "2013-08-06"); +insert into diaries values(755, "2013-08-07"); +insert into diaries values(756, "2013-08-08"); +insert into diaries values(757, "2013-08-09"); +insert into diaries values(758, "2013-08-10"); +insert into diaries values(759, "2013-08-11"); +insert into diaries values(760, "2013-08-12"); +insert into diaries values(761, "2013-08-13"); +insert into diaries values(762, "2013-08-14"); +insert into diaries values(763, "2013-08-15"); +insert into diaries values(764, "2013-08-16"); +insert into diaries values(765, "2013-08-17"); +insert into diaries values(766, "2013-08-18"); +insert into diaries values(767, "2013-08-19"); +insert into diaries values(768, "2013-08-20"); +insert into diaries values(769, "2013-08-21"); +insert into diaries values(770, "2013-08-22"); +insert into diaries values(771, "2013-08-23"); +insert into diaries values(772, "2013-08-24"); +insert into diaries values(773, "2013-08-25"); +insert into diaries values(774, "2013-08-26"); +insert into diaries values(775, "2013-08-27"); +insert into diaries values(776, "2013-08-28"); +insert into diaries values(777, "2013-08-29"); +insert into diaries values(778, "2013-08-30"); +insert into diaries values(779, "2013-08-31"); +insert into diaries values(780, "2013-09-01"); +insert into diaries values(781, "2013-09-02"); +insert into diaries values(782, "2013-09-03"); +insert into diaries values(783, "2013-09-04"); +insert into diaries values(784, "2013-09-05"); +insert into diaries values(785, "2013-09-06"); +insert into diaries values(786, "2013-09-07"); +insert into diaries values(787, "2013-09-08"); +insert into diaries values(788, "2013-09-09"); +insert into diaries values(789, "2013-09-10"); +insert into diaries values(790, "2013-09-11"); +insert into diaries values(791, "2013-09-12"); +insert into diaries values(792, "2013-09-13"); +insert into diaries values(793, "2013-09-14"); +insert into diaries values(794, "2013-09-15"); +insert into diaries values(795, "2013-09-16"); +insert into diaries values(796, "2013-09-17"); +insert into diaries values(797, "2013-09-18"); +insert into diaries values(798, "2013-09-19"); +insert into diaries values(799, "2013-09-20"); +insert into diaries values(800, "2013-09-21"); +insert into diaries values(801, "2013-09-22"); +insert into diaries values(802, "2013-09-23"); +insert into diaries values(803, "2013-09-24"); +insert into diaries values(804, "2013-09-25"); +insert into diaries values(805, "2013-09-26"); +insert into diaries values(806, "2013-09-27"); +insert into diaries values(807, "2013-09-28"); +insert into diaries values(808, "2013-09-29"); +insert into diaries values(809, "2013-09-30"); +insert into diaries values(810, "2013-10-01"); +insert into diaries values(811, "2013-10-02"); +insert into diaries values(812, "2013-10-03"); +insert into diaries values(813, "2013-10-04"); +insert into diaries values(814, "2013-10-05"); +insert into diaries values(815, "2013-10-06"); +insert into diaries values(816, "2013-10-07"); +insert into diaries values(817, "2013-10-08"); +insert into diaries values(818, "2013-10-09"); +insert into diaries values(819, "2013-10-10"); +insert into diaries values(820, "2013-10-11"); +insert into diaries values(821, "2013-10-12"); +insert into diaries values(822, "2013-10-13"); +insert into diaries values(823, "2013-10-14"); +insert into diaries values(824, "2013-10-15"); +insert into diaries values(825, "2013-10-16"); +insert into diaries values(826, "2013-10-17"); +insert into diaries values(827, "2013-10-18"); +insert into diaries values(828, "2013-10-19"); +insert into diaries values(829, "2013-10-20"); +insert into diaries values(830, "2013-10-21"); +insert into diaries values(831, "2013-10-22"); +insert into diaries values(832, "2013-10-23"); +insert into diaries values(833, "2013-10-24"); +insert into diaries values(834, "2013-10-25"); +insert into diaries values(835, "2013-10-26"); +insert into diaries values(836, "2013-10-27"); +insert into diaries values(837, "2013-10-28"); +insert into diaries values(838, "2013-10-29"); +insert into diaries values(839, "2013-10-30"); +insert into diaries values(840, "2013-10-31"); +insert into diaries values(841, "2013-11-01"); +insert into diaries values(842, "2013-11-02"); +insert into diaries values(843, "2013-11-03"); +insert into diaries values(844, "2013-11-04"); +insert into diaries values(845, "2013-11-05"); +insert into diaries values(846, "2013-11-06"); +insert into diaries values(847, "2013-11-07"); +insert into diaries values(848, "2013-11-08"); +insert into diaries values(849, "2013-11-09"); +insert into diaries values(850, "2013-11-10"); +insert into diaries values(851, "2013-11-11"); +insert into diaries values(852, "2013-11-12"); +insert into diaries values(853, "2013-11-13"); +insert into diaries values(854, "2013-11-14"); +insert into diaries values(855, "2013-11-15"); +insert into diaries values(856, "2013-11-16"); +insert into diaries values(857, "2013-11-17"); +insert into diaries values(858, "2013-11-18"); +insert into diaries values(859, "2013-11-19"); +insert into diaries values(860, "2013-11-20"); +insert into diaries values(861, "2013-11-21"); +insert into diaries values(862, "2013-11-22"); +insert into diaries values(863, "2013-11-23"); +insert into diaries values(864, "2013-11-24"); +insert into diaries values(865, "2013-11-25"); +insert into diaries values(866, "2013-11-26"); +insert into diaries values(867, "2013-11-27"); +insert into diaries values(868, "2013-11-28"); +insert into diaries values(869, "2013-11-29"); +insert into diaries values(870, "2013-11-30"); +insert into diaries values(871, "2013-12-01"); +insert into diaries values(872, "2013-12-02"); +insert into diaries values(873, "2013-12-03"); +insert into diaries values(874, "2013-12-04"); +insert into diaries values(875, "2013-12-05"); +insert into diaries values(876, "2013-12-06"); +insert into diaries values(877, "2013-12-07"); +insert into diaries values(878, "2013-12-08"); +insert into diaries values(879, "2013-12-09"); +insert into diaries values(880, "2013-12-10"); +insert into diaries values(881, "2013-12-11"); +insert into diaries values(882, "2013-12-12"); +insert into diaries values(883, "2013-12-13"); +insert into diaries values(884, "2013-12-14"); +insert into diaries values(885, "2013-12-15"); +insert into diaries values(886, "2013-12-16"); +insert into diaries values(887, "2013-12-17"); +insert into diaries values(888, "2013-12-18"); +insert into diaries values(889, "2013-12-19"); +insert into diaries values(890, "2013-12-20"); +insert into diaries values(891, "2013-12-21"); +insert into diaries values(892, "2013-12-22"); +insert into diaries values(893, "2013-12-23"); +insert into diaries values(894, "2013-12-24"); +insert into diaries values(895, "2013-12-25"); +insert into diaries values(896, "2013-12-26"); +insert into diaries values(897, "2013-12-27"); +insert into diaries values(898, "2013-12-28"); +insert into diaries values(899, "2013-12-29"); +insert into diaries values(900, "2013-12-30"); +insert into diaries values(901, "2013-12-31"); +insert into diaries values(902, "2014-01-01"); +insert into diaries values(903, "2014-01-02"); +insert into diaries values(904, "2014-01-03"); +insert into diaries values(905, "2014-01-04"); +insert into diaries values(906, "2014-01-05"); +insert into diaries values(907, "2014-01-06"); +insert into diaries values(908, "2014-01-07"); +insert into diaries values(909, "2014-01-08"); +insert into diaries values(910, "2014-01-09"); +insert into diaries values(911, "2014-01-10"); +insert into diaries values(912, "2014-01-11"); +insert into diaries values(913, "2014-01-12"); +insert into diaries values(914, "2014-01-13"); +insert into diaries values(915, "2014-01-14"); +insert into diaries values(916, "2014-01-15"); +insert into diaries values(917, "2014-01-16"); +insert into diaries values(918, "2014-01-17"); +insert into diaries values(919, "2014-01-18"); +insert into diaries values(920, "2014-01-19"); +insert into diaries values(921, "2014-01-20"); +insert into diaries values(922, "2014-01-21"); +insert into diaries values(923, "2014-01-22"); +insert into diaries values(924, "2014-01-23"); +insert into diaries values(925, "2014-01-24"); +insert into diaries values(926, "2014-01-25"); +insert into diaries values(927, "2014-01-26"); +insert into diaries values(928, "2014-01-27"); +insert into diaries values(929, "2014-01-28"); +insert into diaries values(930, "2014-01-29"); +insert into diaries values(931, "2014-01-30"); +insert into diaries values(932, "2014-01-31"); +insert into diaries values(933, "2014-02-01"); +insert into diaries values(934, "2014-02-02"); +insert into diaries values(935, "2014-02-03"); +insert into diaries values(936, "2014-02-04"); +insert into diaries values(937, "2014-02-05"); +insert into diaries values(938, "2014-02-06"); +insert into diaries values(939, "2014-02-07"); +insert into diaries values(940, "2014-02-08"); +insert into diaries values(941, "2014-02-09"); +insert into diaries values(942, "2014-02-10"); +insert into diaries values(943, "2014-02-11"); +insert into diaries values(944, "2014-02-12"); +insert into diaries values(945, "2014-02-13"); +insert into diaries values(946, "2014-02-14"); +insert into diaries values(947, "2014-02-15"); +insert into diaries values(948, "2014-02-16"); +insert into diaries values(949, "2014-02-17"); +insert into diaries values(950, "2014-02-18"); +insert into diaries values(951, "2014-02-19"); +insert into diaries values(952, "2014-02-20"); +insert into diaries values(953, "2014-02-21"); +insert into diaries values(954, "2014-02-22"); +insert into diaries values(955, "2014-02-23"); +insert into diaries values(956, "2014-02-24"); +insert into diaries values(957, "2014-02-25"); +insert into diaries values(958, "2014-02-26"); +insert into diaries values(959, "2014-02-27"); +insert into diaries values(960, "2014-02-28"); +insert into diaries values(961, "2014-03-01"); +insert into diaries values(962, "2014-03-02"); +insert into diaries values(963, "2014-03-03"); +insert into diaries values(964, "2014-03-04"); +insert into diaries values(965, "2014-03-05"); +insert into diaries values(966, "2014-03-06"); +insert into diaries values(967, "2014-03-07"); +insert into diaries values(968, "2014-03-08"); +insert into diaries values(969, "2014-03-09"); +insert into diaries values(970, "2014-03-10"); +insert into diaries values(971, "2014-03-11"); +insert into diaries values(972, "2014-03-12"); +insert into diaries values(973, "2014-03-13"); +insert into diaries values(974, "2014-03-14"); +insert into diaries values(975, "2014-03-15"); +insert into diaries values(976, "2014-03-16"); +insert into diaries values(977, "2014-03-17"); +insert into diaries values(978, "2014-03-18"); +insert into diaries values(979, "2014-03-19"); +insert into diaries values(980, "2014-03-20"); +insert into diaries values(981, "2014-03-21"); +insert into diaries values(982, "2014-03-22"); +insert into diaries values(983, "2014-03-23"); +insert into diaries values(984, "2014-03-24"); +insert into diaries values(985, "2014-03-25"); +insert into diaries values(986, "2014-03-26"); +insert into diaries values(987, "2014-03-27"); +insert into diaries values(988, "2014-03-28"); +insert into diaries values(989, "2014-03-29"); +insert into diaries values(990, "2014-03-30"); +insert into diaries values(991, "2014-03-31"); +insert into diaries values(992, "2014-04-01"); +insert into diaries values(993, "2014-04-02"); +insert into diaries values(994, "2014-04-03"); +insert into diaries values(995, "2014-04-04"); +insert into diaries values(996, "2014-04-05"); +insert into diaries values(997, "2014-04-06"); +insert into diaries values(998, "2014-04-07"); +insert into diaries values(999, "2014-04-08"); +insert into diaries values(1000, "2014-04-09"); +insert into diaries values(1001, "2014-04-10"); +insert into diaries values(1002, "2014-04-11"); +insert into diaries values(1003, "2014-04-12"); +insert into diaries values(1004, "2014-04-13"); +insert into diaries values(1005, "2014-04-14"); +insert into diaries values(1006, "2014-04-15"); +insert into diaries values(1007, "2014-04-16"); +insert into diaries values(1008, "2014-04-17"); +insert into diaries values(1009, "2014-04-18"); +insert into diaries values(1010, "2014-04-19"); +insert into diaries values(1011, "2014-04-20"); +insert into diaries values(1012, "2014-04-21"); +insert into diaries values(1013, "2014-04-22"); +insert into diaries values(1014, "2014-04-23"); +insert into diaries values(1015, "2014-04-24"); +insert into diaries values(1016, "2014-04-25"); +insert into diaries values(1017, "2014-04-26"); +insert into diaries values(1018, "2014-04-27"); +insert into diaries values(1019, "2014-04-28"); +insert into diaries values(1020, "2014-04-29"); +insert into diaries values(1021, "2014-04-30"); +insert into diaries values(1022, "2014-05-01"); +insert into diaries values(1023, "2014-05-02"); +insert into diaries values(1024, "2014-05-03"); +insert into diaries values(1025, "2014-05-04"); +insert into diaries values(1026, "2014-05-05"); +insert into diaries values(1027, "2014-05-06"); +insert into diaries values(1028, "2014-05-07"); +insert into diaries values(1029, "2014-05-08"); +insert into diaries values(1030, "2014-05-09"); +insert into diaries values(1031, "2014-05-10"); +insert into diaries values(1032, "2014-05-11"); +insert into diaries values(1033, "2014-05-12"); +insert into diaries values(1034, "2014-05-13"); +insert into diaries values(1035, "2014-05-14"); +insert into diaries values(1036, "2014-05-15"); +insert into diaries values(1037, "2014-05-16"); +insert into diaries values(1038, "2014-05-17"); +insert into diaries values(1039, "2014-05-18"); +insert into diaries values(1040, "2014-05-19"); +insert into diaries values(1041, "2014-05-20"); +insert into diaries values(1042, "2014-05-21"); +insert into diaries values(1043, "2014-05-22"); +insert into diaries values(1044, "2014-05-23"); +insert into diaries values(1045, "2014-05-24"); +insert into diaries values(1046, "2014-05-25"); +insert into diaries values(1047, "2014-05-26"); +insert into diaries values(1048, "2014-05-27"); +insert into diaries values(1049, "2014-05-28"); +insert into diaries values(1050, "2014-05-29"); +insert into diaries values(1051, "2014-05-30"); +insert into diaries values(1052, "2014-05-31"); +insert into diaries values(1053, "2014-06-01"); +insert into diaries values(1054, "2014-06-02"); +insert into diaries values(1055, "2014-06-03"); +insert into diaries values(1056, "2014-06-04"); +insert into diaries values(1057, "2014-06-05"); +insert into diaries values(1058, "2014-06-06"); +insert into diaries values(1059, "2014-06-07"); +insert into diaries values(1060, "2014-06-08"); +insert into diaries values(1061, "2014-06-09"); +insert into diaries values(1062, "2014-06-10"); +insert into diaries values(1063, "2014-06-11"); +insert into diaries values(1064, "2014-06-12"); +insert into diaries values(1065, "2014-06-13"); +insert into diaries values(1066, "2014-06-14"); +insert into diaries values(1067, "2014-06-15"); +insert into diaries values(1068, "2014-06-16"); +insert into diaries values(1069, "2014-06-17"); +insert into diaries values(1070, "2014-06-18"); +insert into diaries values(1071, "2014-06-19"); +insert into diaries values(1072, "2014-06-20"); +insert into diaries values(1073, "2014-06-21"); +insert into diaries values(1074, "2014-06-22"); +insert into diaries values(1075, "2014-06-23"); +insert into diaries values(1076, "2014-06-24"); +insert into diaries values(1077, "2014-06-25"); +insert into diaries values(1078, "2014-06-26"); +insert into diaries values(1079, "2014-06-27"); +insert into diaries values(1080, "2014-06-28"); +insert into diaries values(1081, "2014-06-29"); +insert into diaries values(1082, "2014-06-30"); +insert into diaries values(1083, "2014-07-01"); +insert into diaries values(1084, "2014-07-02"); +insert into diaries values(1085, "2014-07-03"); +insert into diaries values(1086, "2014-07-04"); +insert into diaries values(1087, "2014-07-05"); +insert into diaries values(1088, "2014-07-06"); +insert into diaries values(1089, "2014-07-07"); +insert into diaries values(1090, "2014-07-08"); +insert into diaries values(1091, "2014-07-09"); +insert into diaries values(1092, "2014-07-10"); +insert into diaries values(1093, "2014-07-11"); +insert into diaries values(1094, "2014-07-12"); +insert into diaries values(1095, "2014-07-13"); +insert into diaries values(1096, "2014-07-14"); +insert into diaries values(1097, "2014-07-15"); +insert into diaries values(1098, "2014-07-16"); +insert into diaries values(1099, "2014-07-17"); +insert into diaries values(1100, "2014-07-18"); +insert into diaries values(1101, "2014-07-19"); +insert into diaries values(1102, "2014-07-20"); +insert into diaries values(1103, "2014-07-21"); +insert into diaries values(1104, "2014-07-22"); +insert into diaries values(1105, "2014-07-23"); +insert into diaries values(1106, "2014-07-24"); +insert into diaries values(1107, "2014-07-25"); +insert into diaries values(1108, "2014-07-26"); +insert into diaries values(1109, "2014-07-27"); +insert into diaries values(1110, "2014-07-28"); +insert into diaries values(1111, "2014-07-29"); +insert into diaries values(1112, "2014-07-30"); +insert into diaries values(1113, "2014-07-31"); +insert into diaries values(1114, "2014-08-01"); +insert into diaries values(1115, "2014-08-02"); +insert into diaries values(1116, "2014-08-03"); +insert into diaries values(1117, "2014-08-04"); +insert into diaries values(1118, "2014-08-05"); +insert into diaries values(1119, "2014-08-06"); +insert into diaries values(1120, "2014-08-07"); +insert into diaries values(1121, "2014-08-08"); +insert into diaries values(1122, "2014-08-09"); +insert into diaries values(1123, "2014-08-10"); +insert into diaries values(1124, "2014-08-11"); +insert into diaries values(1125, "2014-08-12"); +insert into diaries values(1126, "2014-08-13"); +insert into diaries values(1127, "2014-08-14"); +insert into diaries values(1128, "2014-08-15"); +insert into diaries values(1129, "2014-08-16"); +insert into diaries values(1130, "2014-08-17"); +insert into diaries values(1131, "2014-08-18"); +insert into diaries values(1132, "2014-08-19"); +insert into diaries values(1133, "2014-08-20"); +insert into diaries values(1134, "2014-08-21"); +insert into diaries values(1135, "2014-08-22"); +insert into diaries values(1136, "2014-08-23"); +insert into diaries values(1137, "2014-08-24"); +insert into diaries values(1138, "2014-08-25"); +insert into diaries values(1139, "2014-08-26"); +insert into diaries values(1140, "2014-08-27"); +insert into diaries values(1141, "2014-08-28"); +insert into diaries values(1142, "2014-08-29"); +insert into diaries values(1143, "2014-08-30"); +insert into diaries values(1144, "2014-08-31"); +insert into diaries values(1145, "2014-09-01"); +insert into diaries values(1146, "2014-09-02"); +insert into diaries values(1147, "2014-09-03"); +insert into diaries values(1148, "2014-09-04"); +insert into diaries values(1149, "2014-09-05"); +insert into diaries values(1150, "2014-09-06"); +insert into diaries values(1151, "2014-09-07"); +insert into diaries values(1152, "2014-09-08"); +insert into diaries values(1153, "2014-09-09"); +insert into diaries values(1154, "2014-09-10"); +insert into diaries values(1155, "2014-09-11"); +insert into diaries values(1156, "2014-09-12"); +insert into diaries values(1157, "2014-09-13"); +insert into diaries values(1158, "2014-09-14"); +insert into diaries values(1159, "2014-09-15"); +insert into diaries values(1160, "2014-09-16"); +insert into diaries values(1161, "2014-09-17"); +insert into diaries values(1162, "2014-09-18"); +insert into diaries values(1163, "2014-09-19"); +insert into diaries values(1164, "2014-09-20"); +insert into diaries values(1165, "2014-09-21"); +insert into diaries values(1166, "2014-09-22"); +insert into diaries values(1167, "2014-09-23"); +insert into diaries values(1168, "2014-09-24"); +insert into diaries values(1169, "2014-09-25"); +insert into diaries values(1170, "2014-09-26"); +insert into diaries values(1171, "2014-09-27"); +insert into diaries values(1172, "2014-09-28"); +insert into diaries values(1173, "2014-09-29"); +insert into diaries values(1174, "2014-09-30"); +insert into diaries values(1175, "2014-10-01"); +insert into diaries values(1176, "2014-10-02"); +insert into diaries values(1177, "2014-10-03"); +insert into diaries values(1178, "2014-10-04"); +insert into diaries values(1179, "2014-10-05"); +insert into diaries values(1180, "2014-10-06"); +insert into diaries values(1181, "2014-10-07"); +insert into diaries values(1182, "2014-10-08"); +insert into diaries values(1183, "2014-10-09"); +insert into diaries values(1184, "2014-10-10"); +insert into diaries values(1185, "2014-10-11"); +insert into diaries values(1186, "2014-10-12"); +insert into diaries values(1187, "2014-10-13"); +insert into diaries values(1188, "2014-10-14"); +insert into diaries values(1189, "2014-10-15"); +insert into diaries values(1190, "2014-10-16"); +insert into diaries values(1191, "2014-10-17"); +insert into diaries values(1192, "2014-10-18"); +insert into diaries values(1193, "2014-10-19"); +insert into diaries values(1194, "2014-10-20"); +insert into diaries values(1195, "2014-10-21"); +insert into diaries values(1196, "2014-10-22"); +insert into diaries values(1197, "2014-10-23"); +insert into diaries values(1198, "2014-10-24"); +insert into diaries values(1199, "2014-10-25"); +insert into diaries values(1200, "2014-10-26"); +insert into diaries values(1201, "2014-10-27"); +insert into diaries values(1202, "2014-10-28"); +insert into diaries values(1203, "2014-10-29"); +insert into diaries values(1204, "2014-10-30"); +insert into diaries values(1205, "2014-10-31"); +insert into diaries values(1206, "2014-11-01"); +insert into diaries values(1207, "2014-11-02"); +insert into diaries values(1208, "2014-11-03"); +insert into diaries values(1209, "2014-11-04"); +insert into diaries values(1210, "2014-11-05"); +insert into diaries values(1211, "2014-11-06"); +insert into diaries values(1212, "2014-11-07"); +insert into diaries values(1213, "2014-11-08"); +insert into diaries values(1214, "2014-11-09"); +insert into diaries values(1215, "2014-11-10"); +insert into diaries values(1216, "2014-11-11"); +insert into diaries values(1217, "2014-11-12"); +insert into diaries values(1218, "2014-11-13"); +insert into diaries values(1219, "2014-11-14"); +insert into diaries values(1220, "2014-11-15"); +insert into diaries values(1221, "2014-11-16"); +insert into diaries values(1222, "2014-11-17"); +insert into diaries values(1223, "2014-11-18"); +insert into diaries values(1224, "2014-11-19"); +insert into diaries values(1225, "2014-11-20"); +insert into diaries values(1226, "2014-11-21"); +insert into diaries values(1227, "2014-11-22"); +insert into diaries values(1228, "2014-11-23"); +insert into diaries values(1229, "2014-11-24"); +insert into diaries values(1230, "2014-11-25"); +insert into diaries values(1231, "2014-11-26"); +insert into diaries values(1232, "2014-11-27"); +insert into diaries values(1233, "2014-11-28"); +insert into diaries values(1234, "2014-11-29"); +insert into diaries values(1235, "2014-11-30"); +insert into diaries values(1236, "2014-12-01"); +insert into diaries values(1237, "2014-12-02"); +insert into diaries values(1238, "2014-12-03"); +insert into diaries values(1239, "2014-12-04"); +insert into diaries values(1240, "2014-12-05"); +insert into diaries values(1241, "2014-12-06"); +insert into diaries values(1242, "2014-12-07"); +insert into diaries values(1243, "2014-12-08"); +insert into diaries values(1244, "2014-12-09"); +insert into diaries values(1245, "2014-12-10"); +insert into diaries values(1246, "2014-12-11"); +insert into diaries values(1247, "2014-12-12"); +insert into diaries values(1248, "2014-12-13"); +insert into diaries values(1249, "2014-12-14"); +insert into diaries values(1250, "2014-12-15"); +insert into diaries values(1251, "2014-12-16"); +insert into diaries values(1252, "2014-12-17"); +insert into diaries values(1253, "2014-12-18"); +insert into diaries values(1254, "2014-12-19"); +insert into diaries values(1255, "2014-12-20"); +insert into diaries values(1256, "2014-12-21"); +insert into diaries values(1257, "2014-12-22"); +insert into diaries values(1258, "2014-12-23"); +insert into diaries values(1259, "2014-12-24"); +insert into diaries values(1260, "2014-12-25"); +insert into diaries values(1261, "2014-12-26"); +insert into diaries values(1262, "2014-12-27"); +insert into diaries values(1263, "2014-12-28"); +insert into diaries values(1264, "2014-12-29"); +insert into diaries values(1265, "2014-12-30"); +insert into diaries values(1266, "2014-12-31"); +insert into diaries values(1267, "2015-01-01"); +insert into diaries values(1268, "2015-01-02"); +insert into diaries values(1269, "2015-01-03"); +insert into diaries values(1270, "2015-01-04"); +insert into diaries values(1271, "2015-01-05"); +insert into diaries values(1272, "2015-01-06"); +insert into diaries values(1273, "2015-01-07"); +insert into diaries values(1274, "2015-01-08"); +insert into diaries values(1275, "2015-01-09"); +insert into diaries values(1276, "2015-01-10"); +insert into diaries values(1277, "2015-01-11"); +insert into diaries values(1278, "2015-01-12"); +insert into diaries values(1279, "2015-01-13"); +insert into diaries values(1280, "2015-01-14"); +insert into diaries values(1281, "2015-01-15"); +insert into diaries values(1282, "2015-01-16"); +insert into diaries values(1283, "2015-01-17"); +insert into diaries values(1284, "2015-01-18"); +insert into diaries values(1285, "2015-01-19"); +insert into diaries values(1286, "2015-01-20"); +insert into diaries values(1287, "2015-01-21"); +insert into diaries values(1288, "2015-01-22"); +insert into diaries values(1289, "2015-01-23"); +insert into diaries values(1290, "2015-01-24"); +insert into diaries values(1291, "2015-01-25"); +insert into diaries values(1292, "2015-01-26"); +insert into diaries values(1293, "2015-01-27"); +insert into diaries values(1294, "2015-01-28"); +insert into diaries values(1295, "2015-01-29"); +insert into diaries values(1296, "2015-01-30"); +insert into diaries values(1297, "2015-01-31"); +insert into diaries values(1298, "2015-02-01"); +insert into diaries values(1299, "2015-02-02"); +insert into diaries values(1300, "2015-02-03"); +insert into diaries values(1301, "2015-02-04"); +insert into diaries values(1302, "2015-02-05"); +insert into diaries values(1303, "2015-02-06"); +insert into diaries values(1304, "2015-02-07"); +insert into diaries values(1305, "2015-02-08"); +insert into diaries values(1306, "2015-02-09"); +insert into diaries values(1307, "2015-02-10"); +insert into diaries values(1308, "2015-02-11"); +insert into diaries values(1309, "2015-02-12"); +insert into diaries values(1310, "2015-02-13"); +insert into diaries values(1311, "2015-02-14"); +insert into diaries values(1312, "2015-02-15"); +insert into diaries values(1313, "2015-02-16"); +insert into diaries values(1314, "2015-02-17"); +insert into diaries values(1315, "2015-02-18"); +insert into diaries values(1316, "2015-02-19"); +insert into diaries values(1317, "2015-02-20"); +insert into diaries values(1318, "2015-02-21"); +insert into diaries values(1319, "2015-02-22"); +insert into diaries values(1320, "2015-02-23"); +insert into diaries values(1321, "2015-02-24"); +insert into diaries values(1322, "2015-02-25"); +insert into diaries values(1323, "2015-02-26"); +insert into diaries values(1324, "2015-02-27"); +insert into diaries values(1325, "2015-02-28"); +insert into diaries values(1326, "2015-03-01"); +insert into diaries values(1327, "2015-03-02"); +insert into diaries values(1328, "2015-03-03"); +insert into diaries values(1329, "2015-03-04"); +insert into diaries values(1330, "2015-03-05"); +insert into diaries values(1331, "2015-03-06"); +insert into diaries values(1332, "2015-03-07"); +insert into diaries values(1333, "2015-03-08"); +insert into diaries values(1334, "2015-03-09"); +insert into diaries values(1335, "2015-03-10"); +insert into diaries values(1336, "2015-03-11"); +insert into diaries values(1337, "2015-03-12"); +insert into diaries values(1338, "2015-03-13"); +insert into diaries values(1339, "2015-03-14"); +insert into diaries values(1340, "2015-03-15"); +insert into diaries values(1341, "2015-03-16"); +insert into diaries values(1342, "2015-03-17"); +insert into diaries values(1343, "2015-03-18"); +insert into diaries values(1344, "2015-03-19"); +insert into diaries values(1345, "2015-03-20"); +insert into diaries values(1346, "2015-03-21"); +insert into diaries values(1347, "2015-03-22"); +insert into diaries values(1348, "2015-03-23"); +insert into diaries values(1349, "2015-03-24"); +insert into diaries values(1350, "2015-03-25"); +insert into diaries values(1351, "2015-03-26"); +insert into diaries values(1352, "2015-03-27"); +insert into diaries values(1353, "2015-03-28"); +insert into diaries values(1354, "2015-03-29"); +insert into diaries values(1355, "2015-03-30"); +insert into diaries values(1356, "2015-03-31"); +insert into diaries values(1357, "2015-04-01"); +insert into diaries values(1358, "2015-04-02"); +insert into diaries values(1359, "2015-04-03"); +insert into diaries values(1360, "2015-04-04"); +insert into diaries values(1361, "2015-04-05"); +insert into diaries values(1362, "2015-04-06"); +insert into diaries values(1363, "2015-04-07"); +insert into diaries values(1364, "2015-04-08"); +insert into diaries values(1365, "2015-04-09"); +insert into diaries values(1366, "2015-04-10"); +insert into diaries values(1367, "2015-04-11"); +insert into diaries values(1368, "2015-04-12"); +insert into diaries values(1369, "2015-04-13"); +insert into diaries values(1370, "2015-04-14"); +insert into diaries values(1371, "2015-04-15"); +insert into diaries values(1372, "2015-04-16"); +insert into diaries values(1373, "2015-04-17"); +insert into diaries values(1374, "2015-04-18"); +insert into diaries values(1375, "2015-04-19"); +insert into diaries values(1376, "2015-04-20"); +insert into diaries values(1377, "2015-04-21"); +insert into diaries values(1378, "2015-04-22"); +insert into diaries values(1379, "2015-04-23"); +insert into diaries values(1380, "2015-04-24"); +insert into diaries values(1381, "2015-04-25"); +insert into diaries values(1382, "2015-04-26"); +insert into diaries values(1383, "2015-04-27"); +insert into diaries values(1384, "2015-04-28"); +insert into diaries values(1385, "2015-04-29"); +insert into diaries values(1386, "2015-04-30"); +insert into diaries values(1387, "2015-05-01"); +insert into diaries values(1388, "2015-05-02"); +insert into diaries values(1389, "2015-05-03"); +insert into diaries values(1390, "2015-05-04"); +insert into diaries values(1391, "2015-05-05"); +insert into diaries values(1392, "2015-05-06"); +insert into diaries values(1393, "2015-05-07"); +insert into diaries values(1394, "2015-05-08"); +insert into diaries values(1395, "2015-05-09"); +insert into diaries values(1396, "2015-05-10"); +insert into diaries values(1397, "2015-05-11"); +insert into diaries values(1398, "2015-05-12"); +insert into diaries values(1399, "2015-05-13"); +insert into diaries values(1400, "2015-05-14"); +insert into diaries values(1401, "2015-05-15"); +insert into diaries values(1402, "2015-05-16"); +insert into diaries values(1403, "2015-05-17"); +insert into diaries values(1404, "2015-05-18"); +insert into diaries values(1405, "2015-05-19"); +insert into diaries values(1406, "2015-05-20"); +insert into diaries values(1407, "2015-05-21"); +insert into diaries values(1408, "2015-05-22"); +insert into diaries values(1409, "2015-05-23"); +insert into diaries values(1410, "2015-05-24"); +insert into diaries values(1411, "2015-05-25"); +insert into diaries values(1412, "2015-05-26"); +insert into diaries values(1413, "2015-05-27"); +insert into diaries values(1414, "2015-05-28"); +insert into diaries values(1415, "2015-05-29"); +insert into diaries values(1416, "2015-05-30"); +insert into diaries values(1417, "2015-05-31"); +insert into diaries values(1418, "2015-06-01"); +insert into diaries values(1419, "2015-06-02"); +insert into diaries values(1420, "2015-06-03"); +insert into diaries values(1421, "2015-06-04"); +insert into diaries values(1422, "2015-06-05"); +insert into diaries values(1423, "2015-06-06"); +insert into diaries values(1424, "2015-06-07"); +insert into diaries values(1425, "2015-06-08"); +insert into diaries values(1426, "2015-06-09"); +insert into diaries values(1427, "2015-06-10"); +insert into diaries values(1428, "2015-06-11"); +insert into diaries values(1429, "2015-06-12"); +insert into diaries values(1430, "2015-06-13"); +insert into diaries values(1431, "2015-06-14"); +insert into diaries values(1432, "2015-06-15"); +insert into diaries values(1433, "2015-06-16"); +insert into diaries values(1434, "2015-06-17"); +insert into diaries values(1435, "2015-06-18"); +insert into diaries values(1436, "2015-06-19"); +insert into diaries values(1437, "2015-06-20"); +insert into diaries values(1438, "2015-06-21"); +insert into diaries values(1439, "2015-06-22"); +insert into diaries values(1440, "2015-06-23"); +insert into diaries values(1441, "2015-06-24"); +insert into diaries values(1442, "2015-06-25"); +insert into diaries values(1443, "2015-06-26"); +insert into diaries values(1444, "2015-06-27"); +insert into diaries values(1445, "2015-06-28"); +insert into diaries values(1446, "2015-06-29"); +insert into diaries values(1447, "2015-06-30"); +insert into diaries values(1448, "2015-07-01"); +insert into diaries values(1449, "2015-07-02"); +insert into diaries values(1450, "2015-07-03"); +insert into diaries values(1451, "2015-07-04"); +insert into diaries values(1452, "2015-07-05"); +insert into diaries values(1453, "2015-07-06"); +insert into diaries values(1454, "2015-07-07"); +insert into diaries values(1455, "2015-07-08"); +insert into diaries values(1456, "2015-07-09"); +insert into diaries values(1457, "2015-07-10"); +insert into diaries values(1458, "2015-07-11"); +insert into diaries values(1459, "2015-07-12"); +insert into diaries values(1460, "2015-07-13"); +insert into diaries values(1461, "2015-07-14"); +insert into diaries values(1462, "2015-07-15"); +insert into diaries values(1463, "2015-07-16"); +insert into diaries values(1464, "2015-07-17"); +insert into diaries values(1465, "2015-07-18"); +insert into diaries values(1466, "2015-07-19"); +insert into diaries values(1467, "2015-07-20"); +insert into diaries values(1468, "2015-07-21"); +insert into diaries values(1469, "2015-07-22"); +insert into diaries values(1470, "2015-07-23"); +insert into diaries values(1471, "2015-07-24"); +insert into diaries values(1472, "2015-07-25"); +insert into diaries values(1473, "2015-07-26"); +insert into diaries values(1474, "2015-07-27"); +insert into diaries values(1475, "2015-07-28"); +insert into diaries values(1476, "2015-07-29"); +insert into diaries values(1477, "2015-07-30"); +insert into diaries values(1478, "2015-07-31"); +insert into diaries values(1479, "2015-08-01"); +insert into diaries values(1480, "2015-08-02"); +insert into diaries values(1481, "2015-08-03"); +insert into diaries values(1482, "2015-08-04"); +insert into diaries values(1483, "2015-08-05"); +insert into diaries values(1484, "2015-08-06"); +insert into diaries values(1485, "2015-08-07"); +insert into diaries values(1486, "2015-08-08"); +insert into diaries values(1487, "2015-08-09"); +insert into diaries values(1488, "2015-08-10"); +insert into diaries values(1489, "2015-08-11"); +insert into diaries values(1490, "2015-08-12"); +insert into diaries values(1491, "2015-08-13"); +insert into diaries values(1492, "2015-08-14"); +insert into diaries values(1493, "2015-08-15"); +insert into diaries values(1494, "2015-08-16"); +insert into diaries values(1495, "2015-08-17"); +insert into diaries values(1496, "2015-08-18"); +insert into diaries values(1497, "2015-08-19"); +insert into diaries values(1498, "2015-08-20"); +insert into diaries values(1499, "2015-08-21"); +insert into diaries values(1500, "2015-08-22"); +insert into diaries values(1501, "2015-08-23"); +insert into diaries values(1502, "2015-08-24"); +insert into diaries values(1503, "2015-08-25"); +insert into diaries values(1504, "2015-08-26"); +insert into diaries values(1505, "2015-08-27"); +insert into diaries values(1506, "2015-08-28"); +insert into diaries values(1507, "2015-08-29"); +insert into diaries values(1508, "2015-08-30"); +insert into diaries values(1509, "2015-08-31"); +insert into diaries values(1510, "2015-09-01"); +insert into diaries values(1511, "2015-09-02"); +insert into diaries values(1512, "2015-09-03"); +insert into diaries values(1513, "2015-09-04"); +insert into diaries values(1514, "2015-09-05"); +insert into diaries values(1515, "2015-09-06"); +insert into diaries values(1516, "2015-09-07"); +insert into diaries values(1517, "2015-09-08"); +insert into diaries values(1518, "2015-09-09"); +insert into diaries values(1519, "2015-09-10"); +insert into diaries values(1520, "2015-09-11"); +insert into diaries values(1521, "2015-09-12"); +insert into diaries values(1522, "2015-09-13"); +insert into diaries values(1523, "2015-09-14"); +insert into diaries values(1524, "2015-09-15"); +insert into diaries values(1525, "2015-09-16"); +insert into diaries values(1526, "2015-09-17"); +insert into diaries values(1527, "2015-09-18"); +insert into diaries values(1528, "2015-09-19"); +insert into diaries values(1529, "2015-09-20"); +insert into diaries values(1530, "2015-09-21"); +insert into diaries values(1531, "2015-09-22"); +insert into diaries values(1532, "2015-09-23"); +insert into diaries values(1533, "2015-09-24"); +insert into diaries values(1534, "2015-09-25"); +insert into diaries values(1535, "2015-09-26"); +insert into diaries values(1536, "2015-09-27"); +insert into diaries values(1537, "2015-09-28"); +insert into diaries values(1538, "2015-09-29"); +insert into diaries values(1539, "2015-09-30"); +insert into diaries values(1540, "2015-10-01"); +insert into diaries values(1541, "2015-10-02"); +insert into diaries values(1542, "2015-10-03"); +insert into diaries values(1543, "2015-10-04"); +insert into diaries values(1544, "2015-10-05"); +insert into diaries values(1545, "2015-10-06"); +insert into diaries values(1546, "2015-10-07"); +insert into diaries values(1547, "2015-10-08"); +insert into diaries values(1548, "2015-10-09"); +insert into diaries values(1549, "2015-10-10"); +insert into diaries values(1550, "2015-10-11"); +insert into diaries values(1551, "2015-10-12"); +insert into diaries values(1552, "2015-10-13"); +insert into diaries values(1553, "2015-10-14"); +insert into diaries values(1554, "2015-10-15"); +insert into diaries values(1555, "2015-10-16"); +insert into diaries values(1556, "2015-10-17"); +insert into diaries values(1557, "2015-10-18"); +insert into diaries values(1558, "2015-10-19"); +insert into diaries values(1559, "2015-10-20"); +insert into diaries values(1560, "2015-10-21"); +insert into diaries values(1561, "2015-10-22"); +insert into diaries values(1562, "2015-10-23"); +insert into diaries values(1563, "2015-10-24"); +insert into diaries values(1564, "2015-10-25"); +insert into diaries values(1565, "2015-10-26"); +insert into diaries values(1566, "2015-10-27"); +insert into diaries values(1567, "2015-10-28"); +insert into diaries values(1568, "2015-10-29"); +insert into diaries values(1569, "2015-10-30"); +insert into diaries values(1570, "2015-10-31"); +insert into diaries values(1571, "2015-11-01"); +insert into diaries values(1572, "2015-11-02"); +insert into diaries values(1573, "2015-11-03"); +insert into diaries values(1574, "2015-11-04"); +insert into diaries values(1575, "2015-11-05"); +insert into diaries values(1576, "2015-11-06"); +insert into diaries values(1577, "2015-11-07"); +insert into diaries values(1578, "2015-11-08"); +insert into diaries values(1579, "2015-11-09"); +insert into diaries values(1580, "2015-11-10"); +insert into diaries values(1581, "2015-11-11"); +insert into diaries values(1582, "2015-11-12"); +insert into diaries values(1583, "2015-11-13"); +insert into diaries values(1584, "2015-11-14"); +insert into diaries values(1585, "2015-11-15"); +insert into diaries values(1586, "2015-11-16"); +insert into diaries values(1587, "2015-11-17"); +insert into diaries values(1588, "2015-11-18"); +insert into diaries values(1589, "2015-11-19"); +insert into diaries values(1590, "2015-11-20"); +insert into diaries values(1591, "2015-11-21"); +insert into diaries values(1592, "2015-11-22"); +insert into diaries values(1593, "2015-11-23"); +insert into diaries values(1594, "2015-11-24"); +insert into diaries values(1595, "2015-11-25"); +insert into diaries values(1596, "2015-11-26"); +insert into diaries values(1597, "2015-11-27"); +insert into diaries values(1598, "2015-11-28"); +insert into diaries values(1599, "2015-11-29"); +insert into diaries values(1600, "2015-11-30"); +insert into diaries values(1601, "2015-12-01"); +insert into diaries values(1602, "2015-12-02"); +insert into diaries values(1603, "2015-12-03"); +insert into diaries values(1604, "2015-12-04"); +insert into diaries values(1605, "2015-12-05"); +insert into diaries values(1606, "2015-12-06"); +insert into diaries values(1607, "2015-12-07"); +insert into diaries values(1608, "2015-12-08"); +insert into diaries values(1609, "2015-12-09"); +insert into diaries values(1610, "2015-12-10"); +insert into diaries values(1611, "2015-12-11"); +insert into diaries values(1612, "2015-12-12"); +insert into diaries values(1613, "2015-12-13"); +insert into diaries values(1614, "2015-12-14"); +insert into diaries values(1615, "2015-12-15"); +insert into diaries values(1616, "2015-12-16"); +insert into diaries values(1617, "2015-12-17"); +insert into diaries values(1618, "2015-12-18"); +insert into diaries values(1619, "2015-12-19"); +insert into diaries values(1620, "2015-12-20"); +insert into diaries values(1621, "2015-12-21"); +insert into diaries values(1622, "2015-12-22"); +insert into diaries values(1623, "2015-12-23"); +insert into diaries values(1624, "2015-12-24"); +insert into diaries values(1625, "2015-12-25"); +insert into diaries values(1626, "2015-12-26"); +insert into diaries values(1627, "2015-12-27"); +insert into diaries values(1628, "2015-12-28"); +insert into diaries values(1629, "2015-12-29"); +insert into diaries values(1630, "2015-12-30"); +insert into diaries values(1631, "2015-12-31"); +insert into diaries values(1632, "2016-01-01"); +insert into diaries values(1633, "2016-01-02"); +insert into diaries values(1634, "2016-01-03"); +insert into diaries values(1635, "2016-01-04"); +insert into diaries values(1636, "2016-01-05"); +insert into diaries values(1637, "2016-01-06"); +insert into diaries values(1638, "2016-01-07"); +insert into diaries values(1639, "2016-01-08"); +insert into diaries values(1640, "2016-01-09"); +insert into diaries values(1641, "2016-01-10"); +insert into diaries values(1642, "2016-01-11"); +insert into diaries values(1643, "2016-01-12"); +insert into diaries values(1644, "2016-01-13"); +insert into diaries values(1645, "2016-01-14"); +insert into diaries values(1646, "2016-01-15"); +insert into diaries values(1647, "2016-01-16"); +insert into diaries values(1648, "2016-01-17"); +insert into diaries values(1649, "2016-01-18"); +insert into diaries values(1650, "2016-01-19"); +insert into diaries values(1651, "2016-01-20"); +insert into diaries values(1652, "2016-01-21"); +insert into diaries values(1653, "2016-01-22"); +insert into diaries values(1654, "2016-01-23"); +insert into diaries values(1655, "2016-01-24"); +insert into diaries values(1656, "2016-01-25"); +insert into diaries values(1657, "2016-01-26"); +insert into diaries values(1658, "2016-01-27"); +insert into diaries values(1659, "2016-01-28"); +insert into diaries values(1660, "2016-01-29"); +insert into diaries values(1661, "2016-01-30"); +insert into diaries values(1662, "2016-01-31"); +insert into diaries values(1663, "2016-02-01"); +insert into diaries values(1664, "2016-02-02"); +insert into diaries values(1665, "2016-02-03"); +insert into diaries values(1666, "2016-02-04"); +insert into diaries values(1667, "2016-02-05"); +insert into diaries values(1668, "2016-02-06"); +insert into diaries values(1669, "2016-02-07"); +insert into diaries values(1670, "2016-02-08"); +insert into diaries values(1671, "2016-02-09"); +insert into diaries values(1672, "2016-02-10"); +insert into diaries values(1673, "2016-02-11"); +insert into diaries values(1674, "2016-02-12"); +insert into diaries values(1675, "2016-02-13"); +insert into diaries values(1676, "2016-02-14"); +insert into diaries values(1677, "2016-02-15"); +insert into diaries values(1678, "2016-02-16"); +insert into diaries values(1679, "2016-02-17"); +insert into diaries values(1680, "2016-02-18"); +insert into diaries values(1681, "2016-02-19"); +insert into diaries values(1682, "2016-02-20"); +insert into diaries values(1683, "2016-02-21"); +insert into diaries values(1684, "2016-02-22"); +insert into diaries values(1685, "2016-02-23"); +insert into diaries values(1686, "2016-02-24"); +insert into diaries values(1687, "2016-02-25"); +insert into diaries values(1688, "2016-02-26"); +insert into diaries values(1689, "2016-02-27"); +insert into diaries values(1690, "2016-02-28"); +insert into diaries values(1691, "2016-02-29"); +insert into diaries values(1692, "2016-03-01"); +insert into diaries values(1693, "2016-03-02"); +insert into diaries values(1694, "2016-03-03"); +insert into diaries values(1695, "2016-03-04"); +insert into diaries values(1696, "2016-03-05"); +insert into diaries values(1697, "2016-03-06"); +insert into diaries values(1698, "2016-03-07"); +insert into diaries values(1699, "2016-03-08"); +insert into diaries values(1700, "2016-03-09"); +insert into diaries values(1701, "2016-03-10"); +insert into diaries values(1702, "2016-03-11"); +insert into diaries values(1703, "2016-03-12"); +insert into diaries values(1704, "2016-03-13"); +insert into diaries values(1705, "2016-03-14"); +insert into diaries values(1706, "2016-03-15"); +insert into diaries values(1707, "2016-03-16"); +insert into diaries values(1708, "2016-03-17"); +insert into diaries values(1709, "2016-03-18"); +insert into diaries values(1710, "2016-03-19"); +insert into diaries values(1711, "2016-03-20"); +insert into diaries values(1712, "2016-03-21"); +insert into diaries values(1713, "2016-03-22"); +insert into diaries values(1714, "2016-03-23"); +insert into diaries values(1715, "2016-03-24"); +insert into diaries values(1716, "2016-03-25"); +insert into diaries values(1717, "2016-03-26"); +insert into diaries values(1718, "2016-03-27"); +insert into diaries values(1719, "2016-03-28"); +insert into diaries values(1720, "2016-03-29"); +insert into diaries values(1721, "2016-03-30"); +insert into diaries values(1722, "2016-03-31"); +insert into diaries values(1723, "2016-04-01"); +insert into diaries values(1724, "2016-04-02"); +insert into diaries values(1725, "2016-04-03"); +insert into diaries values(1726, "2016-04-04"); +insert into diaries values(1727, "2016-04-05"); +insert into diaries values(1728, "2016-04-06"); +insert into diaries values(1729, "2016-04-07"); +insert into diaries values(1730, "2016-04-08"); +insert into diaries values(1731, "2016-04-09"); +insert into diaries values(1732, "2016-04-10"); +insert into diaries values(1733, "2016-04-11"); +insert into diaries values(1734, "2016-04-12"); +insert into diaries values(1735, "2016-04-13"); +insert into diaries values(1736, "2016-04-14"); +insert into diaries values(1737, "2016-04-15"); +insert into diaries values(1738, "2016-04-16"); +insert into diaries values(1739, "2016-04-17"); +insert into diaries values(1740, "2016-04-18"); +insert into diaries values(1741, "2016-04-19"); +insert into diaries values(1742, "2016-04-20"); +insert into diaries values(1743, "2016-04-21"); +insert into diaries values(1744, "2016-04-22"); +insert into diaries values(1745, "2016-04-23"); +insert into diaries values(1746, "2016-04-24"); +insert into diaries values(1747, "2016-04-25"); +insert into diaries values(1748, "2016-04-26"); +insert into diaries values(1749, "2016-04-27"); +insert into diaries values(1750, "2016-04-28"); +insert into diaries values(1751, "2016-04-29"); +insert into diaries values(1752, "2016-04-30"); +insert into diaries values(1753, "2016-05-01"); +insert into diaries values(1754, "2016-05-02"); +insert into diaries values(1755, "2016-05-03"); +insert into diaries values(1756, "2016-05-04"); +insert into diaries values(1757, "2016-05-05"); +insert into diaries values(1758, "2016-05-06"); +insert into diaries values(1759, "2016-05-07"); +insert into diaries values(1760, "2016-05-08"); +insert into diaries values(1761, "2016-05-09"); +insert into diaries values(1762, "2016-05-10"); +insert into diaries values(1763, "2016-05-11"); +insert into diaries values(1764, "2016-05-12"); +insert into diaries values(1765, "2016-05-13"); +insert into diaries values(1766, "2016-05-14"); +insert into diaries values(1767, "2016-05-15"); +insert into diaries values(1768, "2016-05-16"); +insert into diaries values(1769, "2016-05-17"); +insert into diaries values(1770, "2016-05-18"); +insert into diaries values(1771, "2016-05-19"); +insert into diaries values(1772, "2016-05-20"); +insert into diaries values(1773, "2016-05-21"); +insert into diaries values(1774, "2016-05-22"); +insert into diaries values(1775, "2016-05-23"); +insert into diaries values(1776, "2016-05-24"); +insert into diaries values(1777, "2016-05-25"); +insert into diaries values(1778, "2016-05-26"); +insert into diaries values(1779, "2016-05-27"); +insert into diaries values(1780, "2016-05-28"); +insert into diaries values(1781, "2016-05-29"); +insert into diaries values(1782, "2016-05-30"); +insert into diaries values(1783, "2016-05-31"); +insert into diaries values(1784, "2016-06-01"); +insert into diaries values(1785, "2016-06-02"); +insert into diaries values(1786, "2016-06-03"); +insert into diaries values(1787, "2016-06-04"); +insert into diaries values(1788, "2016-06-05"); +insert into diaries values(1789, "2016-06-06"); +insert into diaries values(1790, "2016-06-07"); +insert into diaries values(1791, "2016-06-08"); +insert into diaries values(1792, "2016-06-09"); +insert into diaries values(1793, "2016-06-10"); +insert into diaries values(1794, "2016-06-11"); +insert into diaries values(1795, "2016-06-12"); +insert into diaries values(1796, "2016-06-13"); +insert into diaries values(1797, "2016-06-14"); +insert into diaries values(1798, "2016-06-15"); +insert into diaries values(1799, "2016-06-16"); +insert into diaries values(1800, "2016-06-17"); +insert into diaries values(1801, "2016-06-18"); +insert into diaries values(1802, "2016-06-19"); +insert into diaries values(1803, "2016-06-20"); +insert into diaries values(1804, "2016-06-21"); +insert into diaries values(1805, "2016-06-22"); +insert into diaries values(1806, "2016-06-23"); +insert into diaries values(1807, "2016-06-24"); +insert into diaries values(1808, "2016-06-25"); +insert into diaries values(1809, "2016-06-26"); +insert into diaries values(1810, "2016-06-27"); +insert into diaries values(1811, "2016-06-28"); +insert into diaries values(1812, "2016-06-29"); +insert into diaries values(1813, "2016-06-30"); +insert into diaries values(1814, "2016-07-01"); +insert into diaries values(1815, "2016-07-02"); +insert into diaries values(1816, "2016-07-03"); +insert into diaries values(1817, "2016-07-04"); +insert into diaries values(1818, "2016-07-05"); +insert into diaries values(1819, "2016-07-06"); +insert into diaries values(1820, "2016-07-07"); +insert into diaries values(1821, "2016-07-08"); +insert into diaries values(1822, "2016-07-09"); +insert into diaries values(1823, "2016-07-10"); +insert into diaries values(1824, "2016-07-11"); +insert into diaries values(1825, "2016-07-12"); +insert into diaries values(1826, "2016-07-13"); +insert into diaries values(1827, "2016-07-14"); +insert into diaries values(1828, "2016-07-15"); +insert into diaries values(1829, "2016-07-16"); +insert into diaries values(1830, "2016-07-17"); +insert into diaries values(1831, "2016-07-18"); +insert into diaries values(1832, "2016-07-19"); +insert into diaries values(1833, "2016-07-20"); +insert into diaries values(1834, "2016-07-21"); +insert into diaries values(1835, "2016-07-22"); +insert into diaries values(1836, "2016-07-23"); +insert into diaries values(1837, "2016-07-24"); +insert into diaries values(1838, "2016-07-25"); +insert into diaries values(1839, "2016-07-26"); +insert into diaries values(1840, "2016-07-27"); +insert into diaries values(1841, "2016-07-28"); +insert into diaries values(1842, "2016-07-29"); +insert into diaries values(1843, "2016-07-30"); +insert into diaries values(1844, "2016-07-31"); +insert into diaries values(1845, "2016-08-01"); +insert into diaries values(1846, "2016-08-02"); +insert into diaries values(1847, "2016-08-03"); +insert into diaries values(1848, "2016-08-04"); +insert into diaries values(1849, "2016-08-05"); +insert into diaries values(1850, "2016-08-06"); +insert into diaries values(1851, "2016-08-07"); +insert into diaries values(1852, "2016-08-08"); +insert into diaries values(1853, "2016-08-09"); +insert into diaries values(1854, "2016-08-10"); +insert into diaries values(1855, "2016-08-11"); +insert into diaries values(1856, "2016-08-12"); +insert into diaries values(1857, "2016-08-13"); +insert into diaries values(1858, "2016-08-14"); +insert into diaries values(1859, "2016-08-15"); +insert into diaries values(1860, "2016-08-16"); +insert into diaries values(1861, "2016-08-17"); +insert into diaries values(1862, "2016-08-18"); +insert into diaries values(1863, "2016-08-19"); +insert into diaries values(1864, "2016-08-20"); +insert into diaries values(1865, "2016-08-21"); +insert into diaries values(1866, "2016-08-22"); +insert into diaries values(1867, "2016-08-23"); +insert into diaries values(1868, "2016-08-24"); +insert into diaries values(1869, "2016-08-25"); +insert into diaries values(1870, "2016-08-26"); +insert into diaries values(1871, "2016-08-27"); +insert into diaries values(1872, "2016-08-28"); +insert into diaries values(1873, "2016-08-29"); +insert into diaries values(1874, "2016-08-30"); +insert into diaries values(1875, "2016-08-31"); +insert into diaries values(1876, "2016-09-01"); +insert into diaries values(1877, "2016-09-02"); +insert into diaries values(1878, "2016-09-03"); +insert into diaries values(1879, "2016-09-04"); +insert into diaries values(1880, "2016-09-05"); +insert into diaries values(1881, "2016-09-06"); +insert into diaries values(1882, "2016-09-07"); +insert into diaries values(1883, "2016-09-08"); +insert into diaries values(1884, "2016-09-09"); +insert into diaries values(1885, "2016-09-10"); +insert into diaries values(1886, "2016-09-11"); +insert into diaries values(1887, "2016-09-12"); +insert into diaries values(1888, "2016-09-13"); +insert into diaries values(1889, "2016-09-14"); +insert into diaries values(1890, "2016-09-15"); +insert into diaries values(1891, "2016-09-16"); +insert into diaries values(1892, "2016-09-17"); +insert into diaries values(1893, "2016-09-18"); +insert into diaries values(1894, "2016-09-19"); +insert into diaries values(1895, "2016-09-20"); +insert into diaries values(1896, "2016-09-21"); +insert into diaries values(1897, "2016-09-22"); +insert into diaries values(1898, "2016-09-23"); +insert into diaries values(1899, "2016-09-24"); +insert into diaries values(1900, "2016-09-25"); +insert into diaries values(1901, "2016-09-26"); +insert into diaries values(1902, "2016-09-27"); +insert into diaries values(1903, "2016-09-28"); +insert into diaries values(1904, "2016-09-29"); +insert into diaries values(1905, "2016-09-30"); +insert into diaries values(1906, "2016-10-01"); +insert into diaries values(1907, "2016-10-02"); +insert into diaries values(1908, "2016-10-03"); +insert into diaries values(1909, "2016-10-04"); +insert into diaries values(1910, "2016-10-05"); +insert into diaries values(1911, "2016-10-06"); +insert into diaries values(1912, "2016-10-07"); +insert into diaries values(1913, "2016-10-08"); +insert into diaries values(1914, "2016-10-09"); +insert into diaries values(1915, "2016-10-10"); +insert into diaries values(1916, "2016-10-11"); +insert into diaries values(1917, "2016-10-12"); +insert into diaries values(1918, "2016-10-13"); +insert into diaries values(1919, "2016-10-14"); +insert into diaries values(1920, "2016-10-15"); +insert into diaries values(1921, "2016-10-16"); +insert into diaries values(1922, "2016-10-17"); +insert into diaries values(1923, "2016-10-18"); +insert into diaries values(1924, "2016-10-19"); +insert into diaries values(1925, "2016-10-20"); +insert into diaries values(1926, "2016-10-21"); +insert into diaries values(1927, "2016-10-22"); +insert into diaries values(1928, "2016-10-23"); +insert into diaries values(1929, "2016-10-24"); +insert into diaries values(1930, "2016-10-25"); +insert into diaries values(1931, "2016-10-26"); +insert into diaries values(1932, "2016-10-27"); +insert into diaries values(1933, "2016-10-28"); +insert into diaries values(1934, "2016-10-29"); +insert into diaries values(1935, "2016-10-30"); +insert into diaries values(1936, "2016-10-31"); +insert into diaries values(1937, "2016-11-01"); +insert into diaries values(1938, "2016-11-02"); +insert into diaries values(1939, "2016-11-03"); +insert into diaries values(1940, "2016-11-04"); +insert into diaries values(1941, "2016-11-05"); +insert into diaries values(1942, "2016-11-06"); +insert into diaries values(1943, "2016-11-07"); +insert into diaries values(1944, "2016-11-08"); +insert into diaries values(1945, "2016-11-09"); +insert into diaries values(1946, "2016-11-10"); +insert into diaries values(1947, "2016-11-11"); +insert into diaries values(1948, "2016-11-12"); +insert into diaries values(1949, "2016-11-13"); +insert into diaries values(1950, "2016-11-14"); +insert into diaries values(1951, "2016-11-15"); +insert into diaries values(1952, "2016-11-16"); +insert into diaries values(1953, "2016-11-17"); +insert into diaries values(1954, "2016-11-18"); +insert into diaries values(1955, "2016-11-19"); +insert into diaries values(1956, "2016-11-20"); +insert into diaries values(1957, "2016-11-21"); +insert into diaries values(1958, "2016-11-22"); +insert into diaries values(1959, "2016-11-23"); +insert into diaries values(1960, "2016-11-24"); +insert into diaries values(1961, "2016-11-25"); +insert into diaries values(1962, "2016-11-26"); +insert into diaries values(1963, "2016-11-27"); +insert into diaries values(1964, "2016-11-28"); +insert into diaries values(1965, "2016-11-29"); +insert into diaries values(1966, "2016-11-30"); +insert into diaries values(1967, "2016-12-01"); +insert into diaries values(1968, "2016-12-02"); +insert into diaries values(1969, "2016-12-03"); +insert into diaries values(1970, "2016-12-04"); +insert into diaries values(1971, "2016-12-05"); +insert into diaries values(1972, "2016-12-06"); +insert into diaries values(1973, "2016-12-07"); +insert into diaries values(1974, "2016-12-08"); +insert into diaries values(1975, "2016-12-09"); +insert into diaries values(1976, "2016-12-10"); +insert into diaries values(1977, "2016-12-11"); +insert into diaries values(1978, "2016-12-12"); +insert into diaries values(1979, "2016-12-13"); +insert into diaries values(1980, "2016-12-14"); +insert into diaries values(1981, "2016-12-15"); +insert into diaries values(1982, "2016-12-16"); +insert into diaries values(1983, "2016-12-17"); +insert into diaries values(1984, "2016-12-18"); +insert into diaries values(1985, "2016-12-19"); +insert into diaries values(1986, "2016-12-20"); +insert into diaries values(1987, "2016-12-21"); +insert into diaries values(1988, "2016-12-22"); +insert into diaries values(1989, "2016-12-23"); +insert into diaries values(1990, "2016-12-24"); +insert into diaries values(1991, "2016-12-25"); +insert into diaries values(1992, "2016-12-26"); +insert into diaries values(1993, "2016-12-27"); +insert into diaries values(1994, "2016-12-28"); +insert into diaries values(1995, "2016-12-29"); +insert into diaries values(1996, "2016-12-30"); +insert into diaries values(1997, "2016-12-31"); +insert into diaries values(1998, "2017-01-01"); +insert into diaries values(1999, "2017-01-02"); +insert into diaries values(2000, "2017-01-03"); +insert into diaries values(2001, "2017-01-04"); +insert into diaries values(2002, "2017-01-05"); +insert into diaries values(2003, "2017-01-06"); +insert into diaries values(2004, "2017-01-07"); +insert into diaries values(2005, "2017-01-08"); +insert into diaries values(2006, "2017-01-09"); +insert into diaries values(2007, "2017-01-10"); +insert into diaries values(2008, "2017-01-11"); +insert into diaries values(2009, "2017-01-12"); +insert into diaries values(2010, "2017-01-13"); +insert into diaries values(2011, "2017-01-14"); +insert into diaries values(2012, "2017-01-15"); +insert into diaries values(2013, "2017-01-16"); +insert into diaries values(2014, "2017-01-17"); +insert into diaries values(2015, "2017-01-18"); +insert into diaries values(2016, "2017-01-19"); +insert into diaries values(2017, "2017-01-20"); +insert into diaries values(2018, "2017-01-21"); +insert into diaries values(2019, "2017-01-22"); +insert into diaries values(2020, "2017-01-23"); +insert into diaries values(2021, "2017-01-24"); +insert into diaries values(2022, "2017-01-25"); +insert into diaries values(2023, "2017-01-26"); +insert into diaries values(2024, "2017-01-27"); +insert into diaries values(2025, "2017-01-28"); +insert into diaries values(2026, "2017-01-29"); +insert into diaries values(2027, "2017-01-30"); +insert into diaries values(2028, "2017-01-31"); +insert into diaries values(2029, "2017-02-01"); +insert into diaries values(2030, "2017-02-02"); +insert into diaries values(2031, "2017-02-03"); +insert into diaries values(2032, "2017-02-04"); +insert into diaries values(2033, "2017-02-05"); +insert into diaries values(2034, "2017-02-06"); +insert into diaries values(2035, "2017-02-07"); +insert into diaries values(2036, "2017-02-08"); +insert into diaries values(2037, "2017-02-09"); +insert into diaries values(2038, "2017-02-10"); +insert into diaries values(2039, "2017-02-11"); +insert into diaries values(2040, "2017-02-12"); +insert into diaries values(2041, "2017-02-13"); +insert into diaries values(2042, "2017-02-14"); +insert into diaries values(2043, "2017-02-15"); +insert into diaries values(2044, "2017-02-16"); +insert into diaries values(2045, "2017-02-17"); +insert into diaries values(2046, "2017-02-18"); +insert into diaries values(2047, "2017-02-19"); +insert into diaries values(2048, "2017-02-20"); +insert into diaries values(2049, "2017-02-21"); +insert into diaries values(2050, "2017-02-22"); +insert into diaries values(2051, "2017-02-23"); +insert into diaries values(2052, "2017-02-24"); +insert into diaries values(2053, "2017-02-25"); +insert into diaries values(2054, "2017-02-26"); +insert into diaries values(2055, "2017-02-27"); +insert into diaries values(2056, "2017-02-28"); +insert into diaries values(2057, "2017-03-01"); +insert into diaries values(2058, "2017-03-02"); +insert into diaries values(2059, "2017-03-03"); +insert into diaries values(2060, "2017-03-04"); +insert into diaries values(2061, "2017-03-05"); +insert into diaries values(2062, "2017-03-06"); +insert into diaries values(2063, "2017-03-07"); +insert into diaries values(2064, "2017-03-08"); +insert into diaries values(2065, "2017-03-09"); +insert into diaries values(2066, "2017-03-10"); +insert into diaries values(2067, "2017-03-11"); +insert into diaries values(2068, "2017-03-12"); +insert into diaries values(2069, "2017-03-13"); +insert into diaries values(2070, "2017-03-14"); +insert into diaries values(2071, "2017-03-15"); +insert into diaries values(2072, "2017-03-16"); +insert into diaries values(2073, "2017-03-17"); +insert into diaries values(2074, "2017-03-18"); +insert into diaries values(2075, "2017-03-19"); +insert into diaries values(2076, "2017-03-20"); +insert into diaries values(2077, "2017-03-21"); +insert into diaries values(2078, "2017-03-22"); +insert into diaries values(2079, "2017-03-23"); +insert into diaries values(2080, "2017-03-24"); +insert into diaries values(2081, "2017-03-25"); +insert into diaries values(2082, "2017-03-26"); +insert into diaries values(2083, "2017-03-27"); +insert into diaries values(2084, "2017-03-28"); +insert into diaries values(2085, "2017-03-29"); +insert into diaries values(2086, "2017-03-30"); +insert into diaries values(2087, "2017-03-31"); +insert into diaries values(2088, "2017-04-01"); +insert into diaries values(2089, "2017-04-02"); +insert into diaries values(2090, "2017-04-03"); +insert into diaries values(2091, "2017-04-04"); +insert into diaries values(2092, "2017-04-05"); +insert into diaries values(2093, "2017-04-06"); +insert into diaries values(2094, "2017-04-07"); +insert into diaries values(2095, "2017-04-08"); +insert into diaries values(2096, "2017-04-09"); +insert into diaries values(2097, "2017-04-10"); +insert into diaries values(2098, "2017-04-11"); +insert into diaries values(2099, "2017-04-12"); +insert into diaries values(2100, "2017-04-13"); +insert into diaries values(2101, "2017-04-14"); +insert into diaries values(2102, "2017-04-15"); +insert into diaries values(2103, "2017-04-16"); +insert into diaries values(2104, "2017-04-17"); +insert into diaries values(2105, "2017-04-18"); +insert into diaries values(2106, "2017-04-19"); +insert into diaries values(2107, "2017-04-20"); +insert into diaries values(2108, "2017-04-21"); +insert into diaries values(2109, "2017-04-22"); +insert into diaries values(2110, "2017-04-23"); +insert into diaries values(2111, "2017-04-24"); +insert into diaries values(2112, "2017-04-25"); +insert into diaries values(2113, "2017-04-26"); +insert into diaries values(2114, "2017-04-27"); +insert into diaries values(2115, "2017-04-28"); +insert into diaries values(2116, "2017-04-29"); +insert into diaries values(2117, "2017-04-30"); +insert into diaries values(2118, "2017-05-01"); +insert into diaries values(2119, "2017-05-02"); +insert into diaries values(2120, "2017-05-03"); +insert into diaries values(2121, "2017-05-04"); +insert into diaries values(2122, "2017-05-05"); +insert into diaries values(2123, "2017-05-06"); +insert into diaries values(2124, "2017-05-07"); +insert into diaries values(2125, "2017-05-08"); +insert into diaries values(2126, "2017-05-09"); +insert into diaries values(2127, "2017-05-10"); +insert into diaries values(2128, "2017-05-11"); +insert into diaries values(2129, "2017-05-12"); +insert into diaries values(2130, "2017-05-13"); +insert into diaries values(2131, "2017-05-14"); +insert into diaries values(2132, "2017-05-15"); +insert into diaries values(2133, "2017-05-16"); +insert into diaries values(2134, "2017-05-17"); +insert into diaries values(2135, "2017-05-18"); +insert into diaries values(2136, "2017-05-19"); +insert into diaries values(2137, "2017-05-20"); +insert into diaries values(2138, "2017-05-21"); +insert into diaries values(2139, "2017-05-22"); +insert into diaries values(2140, "2017-05-23"); +insert into diaries values(2141, "2017-05-24"); +insert into diaries values(2142, "2017-05-25"); +insert into diaries values(2143, "2017-05-26"); +insert into diaries values(2144, "2017-05-27"); +insert into diaries values(2145, "2017-05-28"); +insert into diaries values(2146, "2017-05-29"); +insert into diaries values(2147, "2017-05-30"); +insert into diaries values(2148, "2017-05-31"); +insert into diaries values(2149, "2017-06-01"); +insert into diaries values(2150, "2017-06-02"); +insert into diaries values(2151, "2017-06-03"); +insert into diaries values(2152, "2017-06-04"); +insert into diaries values(2153, "2017-06-05"); +insert into diaries values(2154, "2017-06-06"); +insert into diaries values(2155, "2017-06-07"); +insert into diaries values(2156, "2017-06-08"); +insert into diaries values(2157, "2017-06-09"); +insert into diaries values(2158, "2017-06-10"); +insert into diaries values(2159, "2017-06-11"); +insert into diaries values(2160, "2017-06-12"); +insert into diaries values(2161, "2017-06-13"); +insert into diaries values(2162, "2017-06-14"); +insert into diaries values(2163, "2017-06-15"); +insert into diaries values(2164, "2017-06-16"); +insert into diaries values(2165, "2017-06-17"); +insert into diaries values(2166, "2017-06-18"); +insert into diaries values(2167, "2017-06-19"); +insert into diaries values(2168, "2017-06-20"); +insert into diaries values(2169, "2017-06-21"); +insert into diaries values(2170, "2017-06-22"); +insert into diaries values(2171, "2017-06-23"); +insert into diaries values(2172, "2017-06-24"); +insert into diaries values(2173, "2017-06-25"); +insert into diaries values(2174, "2017-06-26"); +insert into diaries values(2175, "2017-06-27"); +insert into diaries values(2176, "2017-06-28"); +insert into diaries values(2177, "2017-06-29"); +insert into diaries values(2178, "2017-06-30"); +insert into diaries values(2179, "2017-07-01"); +insert into diaries values(2180, "2017-07-02"); +insert into diaries values(2181, "2017-07-03"); +insert into diaries values(2182, "2017-07-04"); +insert into diaries values(2183, "2017-07-05"); +insert into diaries values(2184, "2017-07-06"); +insert into diaries values(2185, "2017-07-07"); +insert into diaries values(2186, "2017-07-08"); +insert into diaries values(2187, "2017-07-09"); +insert into diaries values(2188, "2017-07-10"); +insert into diaries values(2189, "2017-07-11"); +insert into diaries values(2190, "2017-07-12"); +insert into diaries values(2191, "2017-07-13"); +insert into diaries values(2192, "2017-07-14"); +insert into diaries values(2193, "2017-07-15"); +insert into diaries values(2194, "2017-07-16"); +insert into diaries values(2195, "2017-07-17"); +insert into diaries values(2196, "2017-07-18"); +insert into diaries values(2197, "2017-07-19"); +insert into diaries values(2198, "2017-07-20"); +insert into diaries values(2199, "2017-07-21"); +insert into diaries values(2200, "2017-07-22"); +insert into diaries values(2201, "2017-07-23"); +insert into diaries values(2202, "2017-07-24"); +insert into diaries values(2203, "2017-07-25"); +insert into diaries values(2204, "2017-07-26"); +insert into diaries values(2205, "2017-07-27"); +insert into diaries values(2206, "2017-07-28"); +insert into diaries values(2207, "2017-07-29"); +insert into diaries values(2208, "2017-07-30"); +insert into diaries values(2209, "2017-07-31"); +insert into diaries values(2210, "2017-08-01"); +insert into diaries values(2211, "2017-08-02"); +insert into diaries values(2212, "2017-08-03"); +insert into diaries values(2213, "2017-08-04"); +insert into diaries values(2214, "2017-08-05"); +insert into diaries values(2215, "2017-08-06"); +insert into diaries values(2216, "2017-08-07"); +insert into diaries values(2217, "2017-08-08"); +insert into diaries values(2218, "2017-08-09"); +insert into diaries values(2219, "2017-08-10"); +insert into diaries values(2220, "2017-08-11"); +insert into diaries values(2221, "2017-08-12"); +insert into diaries values(2222, "2017-08-13"); +insert into diaries values(2223, "2017-08-14"); +insert into diaries values(2224, "2017-08-15"); +insert into diaries values(2225, "2017-08-16"); +insert into diaries values(2226, "2017-08-17"); +insert into diaries values(2227, "2017-08-18"); +insert into diaries values(2228, "2017-08-19"); +insert into diaries values(2229, "2017-08-20"); +insert into diaries values(2230, "2017-08-21"); +insert into diaries values(2231, "2017-08-22"); +insert into diaries values(2232, "2017-08-23"); +insert into diaries values(2233, "2017-08-24"); +insert into diaries values(2234, "2017-08-25"); +insert into diaries values(2235, "2017-08-26"); +insert into diaries values(2236, "2017-08-27"); +insert into diaries values(2237, "2017-08-28"); +insert into diaries values(2238, "2017-08-29"); +insert into diaries values(2239, "2017-08-30"); +insert into diaries values(2240, "2017-08-31"); +insert into diaries values(2241, "2017-09-01"); +insert into diaries values(2242, "2017-09-02"); +insert into diaries values(2243, "2017-09-03"); +insert into diaries values(2244, "2017-09-04"); +insert into diaries values(2245, "2017-09-05"); +insert into diaries values(2246, "2017-09-06"); +insert into diaries values(2247, "2017-09-07"); +insert into diaries values(2248, "2017-09-08"); +insert into diaries values(2249, "2017-09-09"); +insert into diaries values(2250, "2017-09-10"); +insert into diaries values(2251, "2017-09-11"); +insert into diaries values(2252, "2017-09-12"); +insert into diaries values(2253, "2017-09-13"); +insert into diaries values(2254, "2017-09-14"); +insert into diaries values(2255, "2017-09-15"); +insert into diaries values(2256, "2017-09-16"); +insert into diaries values(2257, "2017-09-17"); +insert into diaries values(2258, "2017-09-18"); +insert into diaries values(2259, "2017-09-19"); +insert into diaries values(2260, "2017-09-20"); +insert into diaries values(2261, "2017-09-21"); +insert into diaries values(2262, "2017-09-22"); +insert into diaries values(2263, "2017-09-23"); +insert into diaries values(2264, "2017-09-24"); +insert into diaries values(2265, "2017-09-25"); +insert into diaries values(2266, "2017-09-26"); +insert into diaries values(2267, "2017-09-27"); +insert into diaries values(2268, "2017-09-28"); +insert into diaries values(2269, "2017-09-29"); +insert into diaries values(2270, "2017-09-30"); +insert into diaries values(2271, "2017-10-01"); +insert into diaries values(2272, "2017-10-02"); +insert into diaries values(2273, "2017-10-03"); +insert into diaries values(2274, "2017-10-04"); +insert into diaries values(2275, "2017-10-05"); +insert into diaries values(2276, "2017-10-06"); +insert into diaries values(2277, "2017-10-07"); +insert into diaries values(2278, "2017-10-08"); +insert into diaries values(2279, "2017-10-09"); +insert into diaries values(2280, "2017-10-10"); +insert into diaries values(2281, "2017-10-11"); +insert into diaries values(2282, "2017-10-12"); +insert into diaries values(2283, "2017-10-13"); +insert into diaries values(2284, "2017-10-14"); +insert into diaries values(2285, "2017-10-15"); +insert into diaries values(2286, "2017-10-16"); +insert into diaries values(2287, "2017-10-17"); +insert into diaries values(2288, "2017-10-18"); +insert into diaries values(2289, "2017-10-19"); +insert into diaries values(2290, "2017-10-20"); +insert into diaries values(2291, "2017-10-21"); +insert into diaries values(2292, "2017-10-22"); +insert into diaries values(2293, "2017-10-23"); +insert into diaries values(2294, "2017-10-24"); +insert into diaries values(2295, "2017-10-25"); +insert into diaries values(2296, "2017-10-26"); +insert into diaries values(2297, "2017-10-27"); +insert into diaries values(2298, "2017-10-28"); +insert into diaries values(2299, "2017-10-29"); +insert into diaries values(2300, "2017-10-30"); +insert into diaries values(2301, "2017-10-31"); +insert into diaries values(2302, "2017-11-01"); +insert into diaries values(2303, "2017-11-02"); +insert into diaries values(2304, "2017-11-03"); +insert into diaries values(2305, "2017-11-04"); +insert into diaries values(2306, "2017-11-05"); +insert into diaries values(2307, "2017-11-06"); +insert into diaries values(2308, "2017-11-07"); +insert into diaries values(2309, "2017-11-08"); +insert into diaries values(2310, "2017-11-09"); +insert into diaries values(2311, "2017-11-10"); +insert into diaries values(2312, "2017-11-11"); +insert into diaries values(2313, "2017-11-12"); +insert into diaries values(2314, "2017-11-13"); +insert into diaries values(2315, "2017-11-14"); +insert into diaries values(2316, "2017-11-15"); +insert into diaries values(2317, "2017-11-16"); +insert into diaries values(2318, "2017-11-17"); +insert into diaries values(2319, "2017-11-18"); +insert into diaries values(2320, "2017-11-19"); +insert into diaries values(2321, "2017-11-20"); +insert into diaries values(2322, "2017-11-21"); +insert into diaries values(2323, "2017-11-22"); +insert into diaries values(2324, "2017-11-23"); +insert into diaries values(2325, "2017-11-24"); +insert into diaries values(2326, "2017-11-25"); +insert into diaries values(2327, "2017-11-26"); +insert into diaries values(2328, "2017-11-27"); +insert into diaries values(2329, "2017-11-28"); +insert into diaries values(2330, "2017-11-29"); +insert into diaries values(2331, "2017-11-30"); +insert into diaries values(2332, "2017-12-01"); +insert into diaries values(2333, "2017-12-02"); +insert into diaries values(2334, "2017-12-03"); +insert into diaries values(2335, "2017-12-04"); +insert into diaries values(2336, "2017-12-05"); +insert into diaries values(2337, "2017-12-06"); +insert into diaries values(2338, "2017-12-07"); +insert into diaries values(2339, "2017-12-08"); +insert into diaries values(2340, "2017-12-09"); +insert into diaries values(2341, "2017-12-10"); +insert into diaries values(2342, "2017-12-11"); +insert into diaries values(2343, "2017-12-12"); +insert into diaries values(2344, "2017-12-13"); +insert into diaries values(2345, "2017-12-14"); +insert into diaries values(2346, "2017-12-15"); +insert into diaries values(2347, "2017-12-16"); +insert into diaries values(2348, "2017-12-17"); +insert into diaries values(2349, "2017-12-18"); +insert into diaries values(2350, "2017-12-19"); +insert into diaries values(2351, "2017-12-20"); +insert into diaries values(2352, "2017-12-21"); +insert into diaries values(2353, "2017-12-22"); +insert into diaries values(2354, "2017-12-23"); +insert into diaries values(2355, "2017-12-24"); +insert into diaries values(2356, "2017-12-25"); +insert into diaries values(2357, "2017-12-26"); +insert into diaries values(2358, "2017-12-27"); +insert into diaries values(2359, "2017-12-28"); +insert into diaries values(2360, "2017-12-29"); +insert into diaries values(2361, "2017-12-30"); +insert into diaries values(2362, "2017-12-31"); +insert into diaries values(2363, "2018-01-01"); +insert into diaries values(2364, "2018-01-02"); +insert into diaries values(2365, "2018-01-03"); +insert into diaries values(2366, "2018-01-04"); +insert into diaries values(2367, "2018-01-05"); +insert into diaries values(2368, "2018-01-06"); +insert into diaries values(2369, "2018-01-07"); +insert into diaries values(2370, "2018-01-08"); +insert into diaries values(2371, "2018-01-09"); +insert into diaries values(2372, "2018-01-10"); +insert into diaries values(2373, "2018-01-11"); +insert into diaries values(2374, "2018-01-12"); +insert into diaries values(2375, "2018-01-13"); +insert into diaries values(2376, "2018-01-14"); +insert into diaries values(2377, "2018-01-15"); +insert into diaries values(2378, "2018-01-16"); +insert into diaries values(2379, "2018-01-17"); +insert into diaries values(2380, "2018-01-18"); +insert into diaries values(2381, "2018-01-19"); +insert into diaries values(2382, "2018-01-20"); +insert into diaries values(2383, "2018-01-21"); +insert into diaries values(2384, "2018-01-22"); +insert into diaries values(2385, "2018-01-23"); +insert into diaries values(2386, "2018-01-24"); +insert into diaries values(2387, "2018-01-25"); +insert into diaries values(2388, "2018-01-26"); +insert into diaries values(2389, "2018-01-27"); +insert into diaries values(2390, "2018-01-28"); +insert into diaries values(2391, "2018-01-29"); +insert into diaries values(2392, "2018-01-30"); +insert into diaries values(2393, "2018-01-31"); +insert into diaries values(2394, "2018-02-01"); +insert into diaries values(2395, "2018-02-02"); +insert into diaries values(2396, "2018-02-03"); +insert into diaries values(2397, "2018-02-04"); +insert into diaries values(2398, "2018-02-05"); +insert into diaries values(2399, "2018-02-06"); +insert into diaries values(2400, "2018-02-07"); +insert into diaries values(2401, "2018-02-08"); +insert into diaries values(2402, "2018-02-09"); +insert into diaries values(2403, "2018-02-10"); +insert into diaries values(2404, "2018-02-11"); +insert into diaries values(2405, "2018-02-12"); +insert into diaries values(2406, "2018-02-13"); +insert into diaries values(2407, "2018-02-14"); +insert into diaries values(2408, "2018-02-15"); +insert into diaries values(2409, "2018-02-16"); +insert into diaries values(2410, "2018-02-17"); +insert into diaries values(2411, "2018-02-18"); +insert into diaries values(2412, "2018-02-19"); +insert into diaries values(2413, "2018-02-20"); +insert into diaries values(2414, "2018-02-21"); +insert into diaries values(2415, "2018-02-22"); +insert into diaries values(2416, "2018-02-23"); +insert into diaries values(2417, "2018-02-24"); +insert into diaries values(2418, "2018-02-25"); +insert into diaries values(2419, "2018-02-26"); +insert into diaries values(2420, "2018-02-27"); +insert into diaries values(2421, "2018-02-28"); +insert into diaries values(2422, "2018-03-01"); +insert into diaries values(2423, "2018-03-02"); +insert into diaries values(2424, "2018-03-03"); +insert into diaries values(2425, "2018-03-04"); +insert into diaries values(2426, "2018-03-05"); +insert into diaries values(2427, "2018-03-06"); +insert into diaries values(2428, "2018-03-07"); +insert into diaries values(2429, "2018-03-08"); +insert into diaries values(2430, "2018-03-09"); +insert into diaries values(2431, "2018-03-10"); +insert into diaries values(2432, "2018-03-11"); +insert into diaries values(2433, "2018-03-12"); +insert into diaries values(2434, "2018-03-13"); +insert into diaries values(2435, "2018-03-14"); +insert into diaries values(2436, "2018-03-15"); +insert into diaries values(2437, "2018-03-16"); +insert into diaries values(2438, "2018-03-17"); +insert into diaries values(2439, "2018-03-18"); +insert into diaries values(2440, "2018-03-19"); +insert into diaries values(2441, "2018-03-20"); +insert into diaries values(2442, "2018-03-21"); +insert into diaries values(2443, "2018-03-22"); +insert into diaries values(2444, "2018-03-23"); +insert into diaries values(2445, "2018-03-24"); +insert into diaries values(2446, "2018-03-25"); +insert into diaries values(2447, "2018-03-26"); +insert into diaries values(2448, "2018-03-27"); +insert into diaries values(2449, "2018-03-28"); +insert into diaries values(2450, "2018-03-29"); +insert into diaries values(2451, "2018-03-30"); +insert into diaries values(2452, "2018-03-31"); +insert into diaries values(2453, "2018-04-01"); +insert into diaries values(2454, "2018-04-02"); +insert into diaries values(2455, "2018-04-03"); +insert into diaries values(2456, "2018-04-04"); +insert into diaries values(2457, "2018-04-05"); +insert into diaries values(2458, "2018-04-06"); +insert into diaries values(2459, "2018-04-07"); +insert into diaries values(2460, "2018-04-08"); +insert into diaries values(2461, "2018-04-09"); +insert into diaries values(2462, "2018-04-10"); +insert into diaries values(2463, "2018-04-11"); +insert into diaries values(2464, "2018-04-12"); +insert into diaries values(2465, "2018-04-13"); +insert into diaries values(2466, "2018-04-14"); +insert into diaries values(2467, "2018-04-15"); +insert into diaries values(2468, "2018-04-16"); +insert into diaries values(2469, "2018-04-17"); +insert into diaries values(2470, "2018-04-18"); +insert into diaries values(2471, "2018-04-19"); +insert into diaries values(2472, "2018-04-20"); +insert into diaries values(2473, "2018-04-21"); +insert into diaries values(2474, "2018-04-22"); +insert into diaries values(2475, "2018-04-23"); +insert into diaries values(2476, "2018-04-24"); +insert into diaries values(2477, "2018-04-25"); +insert into diaries values(2478, "2018-04-26"); +insert into diaries values(2479, "2018-04-27"); +insert into diaries values(2480, "2018-04-28"); +insert into diaries values(2481, "2018-04-29"); +insert into diaries values(2482, "2018-04-30"); +insert into diaries values(2483, "2018-05-01"); +insert into diaries values(2484, "2018-05-02"); +insert into diaries values(2485, "2018-05-03"); +insert into diaries values(2486, "2018-05-04"); +insert into diaries values(2487, "2018-05-05"); +insert into diaries values(2488, "2018-05-06"); +insert into diaries values(2489, "2018-05-07"); +insert into diaries values(2490, "2018-05-08"); +insert into diaries values(2491, "2018-05-09"); +insert into diaries values(2492, "2018-05-10"); +insert into diaries values(2493, "2018-05-11"); +insert into diaries values(2494, "2018-05-12"); +insert into diaries values(2495, "2018-05-13"); +insert into diaries values(2496, "2018-05-14"); +insert into diaries values(2497, "2018-05-15"); +insert into diaries values(2498, "2018-05-16"); +insert into diaries values(2499, "2018-05-17"); +insert into diaries values(2500, "2018-05-18"); +insert into diaries values(2501, "2018-05-19"); +insert into diaries values(2502, "2018-05-20"); +insert into diaries values(2503, "2018-05-21"); +insert into diaries values(2504, "2018-05-22"); +insert into diaries values(2505, "2018-05-23"); +insert into diaries values(2506, "2018-05-24"); +insert into diaries values(2507, "2018-05-25"); +insert into diaries values(2508, "2018-05-26"); +insert into diaries values(2509, "2018-05-27"); +insert into diaries values(2510, "2018-05-28"); +insert into diaries values(2511, "2018-05-29"); +insert into diaries values(2512, "2018-05-30"); +insert into diaries values(2513, "2018-05-31"); +insert into diaries values(2514, "2018-06-01"); +insert into diaries values(2515, "2018-06-02"); +insert into diaries values(2516, "2018-06-03"); +insert into diaries values(2517, "2018-06-04"); +insert into diaries values(2518, "2018-06-05"); +insert into diaries values(2519, "2018-06-06"); +insert into diaries values(2520, "2018-06-07"); +insert into diaries values(2521, "2018-06-08"); +insert into diaries values(2522, "2018-06-09"); +insert into diaries values(2523, "2018-06-10"); +insert into diaries values(2524, "2018-06-11"); +insert into diaries values(2525, "2018-06-12"); +insert into diaries values(2526, "2018-06-13"); +insert into diaries values(2527, "2018-06-14"); +insert into diaries values(2528, "2018-06-15"); +insert into diaries values(2529, "2018-06-16"); +insert into diaries values(2530, "2018-06-17"); +insert into diaries values(2531, "2018-06-18"); +insert into diaries values(2532, "2018-06-19"); +insert into diaries values(2533, "2018-06-20"); +insert into diaries values(2534, "2018-06-21"); +insert into diaries values(2535, "2018-06-22"); +insert into diaries values(2536, "2018-06-23"); +insert into diaries values(2537, "2018-06-24"); +insert into diaries values(2538, "2018-06-25"); +insert into diaries values(2539, "2018-06-26"); +insert into diaries values(2540, "2018-06-27"); +insert into diaries values(2541, "2018-06-28"); +insert into diaries values(2542, "2018-06-29"); +insert into diaries values(2543, "2018-06-30"); +insert into diaries values(2544, "2018-07-01"); +insert into diaries values(2545, "2018-07-02"); +insert into diaries values(2546, "2018-07-03"); +insert into diaries values(2547, "2018-07-04"); +insert into diaries values(2548, "2018-07-05"); +insert into diaries values(2549, "2018-07-06"); +insert into diaries values(2550, "2018-07-07"); +insert into diaries values(2551, "2018-07-08"); +insert into diaries values(2552, "2018-07-09"); +insert into diaries values(2553, "2018-07-10"); +insert into diaries values(2554, "2018-07-11"); +insert into diaries values(2555, "2018-07-12"); +insert into diaries values(2556, "2018-07-13"); +insert into diaries values(2557, "2018-07-14"); +insert into diaries values(2558, "2018-07-15"); +insert into diaries values(2559, "2018-07-16"); +insert into diaries values(2560, "2018-07-17"); +insert into diaries values(2561, "2018-07-18"); +insert into diaries values(2562, "2018-07-19"); +insert into diaries values(2563, "2018-07-20"); +insert into diaries values(2564, "2018-07-21"); +insert into diaries values(2565, "2018-07-22"); +insert into diaries values(2566, "2018-07-23"); +insert into diaries values(2567, "2018-07-24"); +insert into diaries values(2568, "2018-07-25"); +insert into diaries values(2569, "2018-07-26"); +insert into diaries values(2570, "2018-07-27"); +insert into diaries values(2571, "2018-07-28"); +insert into diaries values(2572, "2018-07-29"); +insert into diaries values(2573, "2018-07-30"); +insert into diaries values(2574, "2018-07-31"); +insert into diaries values(2575, "2018-08-01"); +insert into diaries values(2576, "2018-08-02"); +insert into diaries values(2577, "2018-08-03"); +insert into diaries values(2578, "2018-08-04"); +insert into diaries values(2579, "2018-08-05"); +insert into diaries values(2580, "2018-08-06"); +insert into diaries values(2581, "2018-08-07"); +insert into diaries values(2582, "2018-08-08"); +insert into diaries values(2583, "2018-08-09"); +insert into diaries values(2584, "2018-08-10"); +insert into diaries values(2585, "2018-08-11"); +insert into diaries values(2586, "2018-08-12"); +insert into diaries values(2587, "2018-08-13"); +insert into diaries values(2588, "2018-08-14"); +insert into diaries values(2589, "2018-08-15"); +insert into diaries values(2590, "2018-08-16"); +insert into diaries values(2591, "2018-08-17"); +insert into diaries values(2592, "2018-08-18"); +insert into diaries values(2593, "2018-08-19"); +insert into diaries values(2594, "2018-08-20"); +insert into diaries values(2595, "2018-08-21"); +insert into diaries values(2596, "2018-08-22"); +insert into diaries values(2597, "2018-08-23"); +insert into diaries values(2598, "2018-08-24"); +insert into diaries values(2599, "2018-08-25"); +insert into diaries values(2600, "2018-08-26"); +insert into diaries values(2601, "2018-08-27"); +insert into diaries values(2602, "2018-08-28"); +insert into diaries values(2603, "2018-08-29"); +insert into diaries values(2604, "2018-08-30"); +insert into diaries values(2605, "2018-08-31"); +insert into diaries values(2606, "2018-09-01"); +insert into diaries values(2607, "2018-09-02"); +insert into diaries values(2608, "2018-09-03"); +insert into diaries values(2609, "2018-09-04"); +insert into diaries values(2610, "2018-09-05"); +insert into diaries values(2611, "2018-09-06"); +insert into diaries values(2612, "2018-09-07"); +insert into diaries values(2613, "2018-09-08"); +insert into diaries values(2614, "2018-09-09"); +insert into diaries values(2615, "2018-09-10"); +insert into diaries values(2616, "2018-09-11"); +insert into diaries values(2617, "2018-09-12"); +insert into diaries values(2618, "2018-09-13"); +insert into diaries values(2619, "2018-09-14"); +insert into diaries values(2620, "2018-09-15"); +insert into diaries values(2621, "2018-09-16"); +insert into diaries values(2622, "2018-09-17"); +insert into diaries values(2623, "2018-09-18"); +insert into diaries values(2624, "2018-09-19"); +insert into diaries values(2625, "2018-09-20"); +insert into diaries values(2626, "2018-09-21"); +insert into diaries values(2627, "2018-09-22"); +insert into diaries values(2628, "2018-09-23"); +insert into diaries values(2629, "2018-09-24"); +insert into diaries values(2630, "2018-09-25"); +insert into diaries values(2631, "2018-09-26"); +insert into diaries values(2632, "2018-09-27"); +insert into diaries values(2633, "2018-09-28"); +insert into diaries values(2634, "2018-09-29"); +insert into diaries values(2635, "2018-09-30"); +insert into diaries values(2636, "2018-10-01"); +insert into diaries values(2637, "2018-10-02"); +insert into diaries values(2638, "2018-10-03"); +insert into diaries values(2639, "2018-10-04"); +insert into diaries values(2640, "2018-10-05"); +insert into diaries values(2641, "2018-10-06"); +insert into diaries values(2642, "2018-10-07"); +insert into diaries values(2643, "2018-10-08"); +insert into diaries values(2644, "2018-10-09"); +insert into diaries values(2645, "2018-10-10"); +insert into diaries values(2646, "2018-10-11"); +insert into diaries values(2647, "2018-10-12"); +insert into diaries values(2648, "2018-10-13"); +insert into diaries values(2649, "2018-10-14"); +insert into diaries values(2650, "2018-10-15"); +insert into diaries values(2651, "2018-10-16"); +insert into diaries values(2652, "2018-10-17"); +insert into diaries values(2653, "2018-10-18"); +insert into diaries values(2654, "2018-10-19"); +insert into diaries values(2655, "2018-10-20"); +insert into diaries values(2656, "2018-10-21"); +insert into diaries values(2657, "2018-10-22"); +insert into diaries values(2658, "2018-10-23"); +insert into diaries values(2659, "2018-10-24"); +insert into diaries values(2660, "2018-10-25"); +insert into diaries values(2661, "2018-10-26"); +insert into diaries values(2662, "2018-10-27"); +insert into diaries values(2663, "2018-10-28"); +insert into diaries values(2664, "2018-10-29"); +insert into diaries values(2665, "2018-10-30"); +insert into diaries values(2666, "2018-10-31"); +insert into diaries values(2667, "2018-11-01"); +insert into diaries values(2668, "2018-11-02"); +insert into diaries values(2669, "2018-11-03"); +insert into diaries values(2670, "2018-11-04"); +insert into diaries values(2671, "2018-11-05"); +insert into diaries values(2672, "2018-11-06"); +insert into diaries values(2673, "2018-11-07"); +insert into diaries values(2674, "2018-11-08"); +insert into diaries values(2675, "2018-11-09"); +insert into diaries values(2676, "2018-11-10"); +insert into diaries values(2677, "2018-11-11"); +insert into diaries values(2678, "2018-11-12"); +insert into diaries values(2679, "2018-11-13"); +insert into diaries values(2680, "2018-11-14"); +insert into diaries values(2681, "2018-11-15"); +insert into diaries values(2682, "2018-11-16"); +insert into diaries values(2683, "2018-11-17"); +insert into diaries values(2684, "2018-11-18"); +insert into diaries values(2685, "2018-11-19"); +insert into diaries values(2686, "2018-11-20"); +insert into diaries values(2687, "2018-11-21"); +insert into diaries values(2688, "2018-11-22"); +insert into diaries values(2689, "2018-11-23"); +insert into diaries values(2690, "2018-11-24"); +insert into diaries values(2691, "2018-11-25"); +insert into diaries values(2692, "2018-11-26"); +insert into diaries values(2693, "2018-11-27"); +insert into diaries values(2694, "2018-11-28"); +insert into diaries values(2695, "2018-11-29"); +insert into diaries values(2696, "2018-11-30"); +insert into diaries values(2697, "2018-12-01"); +insert into diaries values(2698, "2018-12-02"); +insert into diaries values(2699, "2018-12-03"); +insert into diaries values(2700, "2018-12-04"); +insert into diaries values(2701, "2018-12-05"); +insert into diaries values(2702, "2018-12-06"); +insert into diaries values(2703, "2018-12-07"); +insert into diaries values(2704, "2018-12-08"); +insert into diaries values(2705, "2018-12-09"); +insert into diaries values(2706, "2018-12-10"); +insert into diaries values(2707, "2018-12-11"); +insert into diaries values(2708, "2018-12-12"); +insert into diaries values(2709, "2018-12-13"); +insert into diaries values(2710, "2018-12-14"); +insert into diaries values(2711, "2018-12-15"); +insert into diaries values(2712, "2018-12-16"); +insert into diaries values(2713, "2018-12-17"); +insert into diaries values(2714, "2018-12-18"); +insert into diaries values(2715, "2018-12-19"); +insert into diaries values(2716, "2018-12-20"); +insert into diaries values(2717, "2018-12-21"); +insert into diaries values(2718, "2018-12-22"); +insert into diaries values(2719, "2018-12-23"); +insert into diaries values(2720, "2018-12-24"); +insert into diaries values(2721, "2018-12-25"); +insert into diaries values(2722, "2018-12-26"); +insert into diaries values(2723, "2018-12-27"); +insert into diaries values(2724, "2018-12-28"); +insert into diaries values(2725, "2018-12-29"); +insert into diaries values(2726, "2018-12-30"); +insert into diaries values(2727, "2018-12-31"); +insert into diaries values(2728, "2019-01-01"); +insert into diaries values(2729, "2019-01-02"); +insert into diaries values(2730, "2019-01-03"); +insert into diaries values(2731, "2019-01-04"); +insert into diaries values(2732, "2019-01-05"); +insert into diaries values(2733, "2019-01-06"); +insert into diaries values(2734, "2019-01-07"); +insert into diaries values(2735, "2019-01-08"); +insert into diaries values(2736, "2019-01-09"); +insert into diaries values(2737, "2019-01-10"); +insert into diaries values(2738, "2019-01-11"); +insert into diaries values(2739, "2019-01-12"); +insert into diaries values(2740, "2019-01-13"); +insert into diaries values(2741, "2019-01-14"); +insert into diaries values(2742, "2019-01-15"); +insert into diaries values(2743, "2019-01-16"); +insert into diaries values(2744, "2019-01-17"); +insert into diaries values(2745, "2019-01-18"); +insert into diaries values(2746, "2019-01-19"); +insert into diaries values(2747, "2019-01-20"); +insert into diaries values(2748, "2019-01-21"); +insert into diaries values(2749, "2019-01-22"); +insert into diaries values(2750, "2019-01-23"); +insert into diaries values(2751, "2019-01-24"); +insert into diaries values(2752, "2019-01-25"); +insert into diaries values(2753, "2019-01-26"); +insert into diaries values(2754, "2019-01-27"); +insert into diaries values(2755, "2019-01-28"); +insert into diaries values(2756, "2019-01-29"); +insert into diaries values(2757, "2019-01-30"); +insert into diaries values(2758, "2019-01-31"); +insert into diaries values(2759, "2019-02-01"); +insert into diaries values(2760, "2019-02-02"); +insert into diaries values(2761, "2019-02-03"); +insert into diaries values(2762, "2019-02-04"); +insert into diaries values(2763, "2019-02-05"); +insert into diaries values(2764, "2019-02-06"); +insert into diaries values(2765, "2019-02-07"); +insert into diaries values(2766, "2019-02-08"); +insert into diaries values(2767, "2019-02-09"); +insert into diaries values(2768, "2019-02-10"); +insert into diaries values(2769, "2019-02-11"); +insert into diaries values(2770, "2019-02-12"); +insert into diaries values(2771, "2019-02-13"); +insert into diaries values(2772, "2019-02-14"); +insert into diaries values(2773, "2019-02-15"); +insert into diaries values(2774, "2019-02-16"); +insert into diaries values(2775, "2019-02-17"); +insert into diaries values(2776, "2019-02-18"); +insert into diaries values(2777, "2019-02-19"); +insert into diaries values(2778, "2019-02-20"); +insert into diaries values(2779, "2019-02-21"); +insert into diaries values(2780, "2019-02-22"); +insert into diaries values(2781, "2019-02-23"); +insert into diaries values(2782, "2019-02-24"); +insert into diaries values(2783, "2019-02-25"); +insert into diaries values(2784, "2019-02-26"); +insert into diaries values(2785, "2019-02-27"); +insert into diaries values(2786, "2019-02-28"); +insert into diaries values(2787, "2019-03-01"); +insert into diaries values(2788, "2019-03-02"); +insert into diaries values(2789, "2019-03-03"); +insert into diaries values(2790, "2019-03-04"); +insert into diaries values(2791, "2019-03-05"); +insert into diaries values(2792, "2019-03-06"); +insert into diaries values(2793, "2019-03-07"); +insert into diaries values(2794, "2019-03-08"); +insert into diaries values(2795, "2019-03-09"); +insert into diaries values(2796, "2019-03-10"); +insert into diaries values(2797, "2019-03-11"); +insert into diaries values(2798, "2019-03-12"); +insert into diaries values(2799, "2019-03-13"); +insert into diaries values(2800, "2019-03-14"); +insert into diaries values(2801, "2019-03-15"); +insert into diaries values(2802, "2019-03-16"); +insert into diaries values(2803, "2019-03-17"); +insert into diaries values(2804, "2019-03-18"); +insert into diaries values(2805, "2019-03-19"); +insert into diaries values(2806, "2019-03-20"); +insert into diaries values(2807, "2019-03-21"); +insert into diaries values(2808, "2019-03-22"); +insert into diaries values(2809, "2019-03-23"); +insert into diaries values(2810, "2019-03-24"); +insert into diaries values(2811, "2019-03-25"); +insert into diaries values(2812, "2019-03-26"); +insert into diaries values(2813, "2019-03-27"); +insert into diaries values(2814, "2019-03-28"); +insert into diaries values(2815, "2019-03-29"); +insert into diaries values(2816, "2019-03-30"); +insert into diaries values(2817, "2019-03-31"); +insert into diaries values(2818, "2019-04-01"); +insert into diaries values(2819, "2019-04-02"); +insert into diaries values(2820, "2019-04-03"); +insert into diaries values(2821, "2019-04-04"); +insert into diaries values(2822, "2019-04-05"); +insert into diaries values(2823, "2019-04-06"); +insert into diaries values(2824, "2019-04-07"); +insert into diaries values(2825, "2019-04-08"); +insert into diaries values(2826, "2019-04-09"); +insert into diaries values(2827, "2019-04-10"); +insert into diaries values(2828, "2019-04-11"); +insert into diaries values(2829, "2019-04-12"); +insert into diaries values(2830, "2019-04-13"); +insert into diaries values(2831, "2019-04-14"); +insert into diaries values(2832, "2019-04-15"); +insert into diaries values(2833, "2019-04-16"); +insert into diaries values(2834, "2019-04-17"); +insert into diaries values(2835, "2019-04-18"); +insert into diaries values(2836, "2019-04-19"); +insert into diaries values(2837, "2019-04-20"); +insert into diaries values(2838, "2019-04-21"); +insert into diaries values(2839, "2019-04-22"); +insert into diaries values(2840, "2019-04-23"); +insert into diaries values(2841, "2019-04-24"); +insert into diaries values(2842, "2019-04-25"); +insert into diaries values(2843, "2019-04-26"); +insert into diaries values(2844, "2019-04-27"); +insert into diaries values(2845, "2019-04-28"); +insert into diaries values(2846, "2019-04-29"); +insert into diaries values(2847, "2019-04-30"); +insert into diaries values(2848, "2019-05-01"); +insert into diaries values(2849, "2019-05-02"); +insert into diaries values(2850, "2019-05-03"); +insert into diaries values(2851, "2019-05-04"); +insert into diaries values(2852, "2019-05-05"); +insert into diaries values(2853, "2019-05-06"); +insert into diaries values(2854, "2019-05-07"); +insert into diaries values(2855, "2019-05-08"); +insert into diaries values(2856, "2019-05-09"); +insert into diaries values(2857, "2019-05-10"); +insert into diaries values(2858, "2019-05-11"); +insert into diaries values(2859, "2019-05-12"); +insert into diaries values(2860, "2019-05-13"); +insert into diaries values(2861, "2019-05-14"); +insert into diaries values(2862, "2019-05-15"); +insert into diaries values(2863, "2019-05-16"); +insert into diaries values(2864, "2019-05-17"); +insert into diaries values(2865, "2019-05-18"); +insert into diaries values(2866, "2019-05-19"); +insert into diaries values(2867, "2019-05-20"); +insert into diaries values(2868, "2019-05-21"); +insert into diaries values(2869, "2019-05-22"); +insert into diaries values(2870, "2019-05-23"); +insert into diaries values(2871, "2019-05-24"); +insert into diaries values(2872, "2019-05-25"); +insert into diaries values(2873, "2019-05-26"); +insert into diaries values(2874, "2019-05-27"); +insert into diaries values(2875, "2019-05-28"); +insert into diaries values(2876, "2019-05-29"); +insert into diaries values(2877, "2019-05-30"); +insert into diaries values(2878, "2019-05-31"); +insert into diaries values(2879, "2019-06-01"); +insert into diaries values(2880, "2019-06-02"); +insert into diaries values(2881, "2019-06-03"); +insert into diaries values(2882, "2019-06-04"); +insert into diaries values(2883, "2019-06-05"); +insert into diaries values(2884, "2019-06-06"); +insert into diaries values(2885, "2019-06-07"); +insert into diaries values(2886, "2019-06-08"); +insert into diaries values(2887, "2019-06-09"); +insert into diaries values(2888, "2019-06-10"); +insert into diaries values(2889, "2019-06-11"); +insert into diaries values(2890, "2019-06-12"); +insert into diaries values(2891, "2019-06-13"); +insert into diaries values(2892, "2019-06-14"); +insert into diaries values(2893, "2019-06-15"); +insert into diaries values(2894, "2019-06-16"); +insert into diaries values(2895, "2019-06-17"); +insert into diaries values(2896, "2019-06-18"); +insert into diaries values(2897, "2019-06-19"); +insert into diaries values(2898, "2019-06-20"); +insert into diaries values(2899, "2019-06-21"); +insert into diaries values(2900, "2019-06-22"); +insert into diaries values(2901, "2019-06-23"); +insert into diaries values(2902, "2019-06-24"); +insert into diaries values(2903, "2019-06-25"); +insert into diaries values(2904, "2019-06-26"); +insert into diaries values(2905, "2019-06-27"); +insert into diaries values(2906, "2019-06-28"); +insert into diaries values(2907, "2019-06-29"); +insert into diaries values(2908, "2019-06-30"); +insert into diaries values(2909, "2019-07-01"); +insert into diaries values(2910, "2019-07-02"); +insert into diaries values(2911, "2019-07-03"); +insert into diaries values(2912, "2019-07-04"); +insert into diaries values(2913, "2019-07-05"); +insert into diaries values(2914, "2019-07-06"); +insert into diaries values(2915, "2019-07-07"); +insert into diaries values(2916, "2019-07-08"); +insert into diaries values(2917, "2019-07-09"); +insert into diaries values(2918, "2019-07-10"); +insert into diaries values(2919, "2019-07-11"); +insert into diaries values(2920, "2019-07-12"); +insert into diaries values(2921, "2019-07-13"); +insert into diaries values(2922, "2019-07-14"); +insert into diaries values(2923, "2019-07-15"); +insert into diaries values(2924, "2019-07-16"); +insert into diaries values(2925, "2019-07-17"); +insert into diaries values(2926, "2019-07-18"); +insert into diaries values(2927, "2019-07-19"); +insert into diaries values(2928, "2019-07-20"); +insert into diaries values(2929, "2019-07-21"); +insert into diaries values(2930, "2019-07-22"); +insert into diaries values(2931, "2019-07-23"); +insert into diaries values(2932, "2019-07-24"); +insert into diaries values(2933, "2019-07-25"); +insert into diaries values(2934, "2019-07-26"); +insert into diaries values(2935, "2019-07-27"); +insert into diaries values(2936, "2019-07-28"); +insert into diaries values(2937, "2019-07-29"); +insert into diaries values(2938, "2019-07-30"); +insert into diaries values(2939, "2019-07-31"); +insert into diaries values(2940, "2019-08-01"); +insert into diaries values(2941, "2019-08-02"); +insert into diaries values(2942, "2019-08-03"); +insert into diaries values(2943, "2019-08-04"); +insert into diaries values(2944, "2019-08-05"); +insert into diaries values(2945, "2019-08-06"); +insert into diaries values(2946, "2019-08-07"); +insert into diaries values(2947, "2019-08-08"); +insert into diaries values(2948, "2019-08-09"); +insert into diaries values(2949, "2019-08-10"); +insert into diaries values(2950, "2019-08-11"); +insert into diaries values(2951, "2019-08-12"); +insert into diaries values(2952, "2019-08-13"); +insert into diaries values(2953, "2019-08-14"); +insert into diaries values(2954, "2019-08-15"); +insert into diaries values(2955, "2019-08-16"); +insert into diaries values(2956, "2019-08-17"); +insert into diaries values(2957, "2019-08-18"); +insert into diaries values(2958, "2019-08-19"); +insert into diaries values(2959, "2019-08-20"); +insert into diaries values(2960, "2019-08-21"); +insert into diaries values(2961, "2019-08-22"); +insert into diaries values(2962, "2019-08-23"); +insert into diaries values(2963, "2019-08-24"); +insert into diaries values(2964, "2019-08-25"); +insert into diaries values(2965, "2019-08-26"); +insert into diaries values(2966, "2019-08-27"); +insert into diaries values(2967, "2019-08-28"); +insert into diaries values(2968, "2019-08-29"); +insert into diaries values(2969, "2019-08-30"); +insert into diaries values(2970, "2019-08-31"); +insert into diaries values(2971, "2019-09-01"); +insert into diaries values(2972, "2019-09-02"); +insert into diaries values(2973, "2019-09-03"); +insert into diaries values(2974, "2019-09-04"); +insert into diaries values(2975, "2019-09-05"); +insert into diaries values(2976, "2019-09-06"); +insert into diaries values(2977, "2019-09-07"); +insert into diaries values(2978, "2019-09-08"); +insert into diaries values(2979, "2019-09-09"); +insert into diaries values(2980, "2019-09-10"); +insert into diaries values(2981, "2019-09-11"); +insert into diaries values(2982, "2019-09-12"); +insert into diaries values(2983, "2019-09-13"); +insert into diaries values(2984, "2019-09-14"); +insert into diaries values(2985, "2019-09-15"); +insert into diaries values(2986, "2019-09-16"); +insert into diaries values(2987, "2019-09-17"); +insert into diaries values(2988, "2019-09-18"); +insert into diaries values(2989, "2019-09-19"); +insert into diaries values(2990, "2019-09-20"); +insert into diaries values(2991, "2019-09-21"); +insert into diaries values(2992, "2019-09-22"); +insert into diaries values(2993, "2019-09-23"); +insert into diaries values(2994, "2019-09-24"); +insert into diaries values(2995, "2019-09-25"); +insert into diaries values(2996, "2019-09-26"); +insert into diaries values(2997, "2019-09-27"); +insert into diaries values(2998, "2019-09-28"); +insert into diaries values(2999, "2019-09-29"); +insert into diaries values(3000, "2019-09-30"); +insert into diaries values(3001, "2019-10-01"); +insert into diaries values(3002, "2019-10-02"); +insert into diaries values(3003, "2019-10-03"); +insert into diaries values(3004, "2019-10-04"); +insert into diaries values(3005, "2019-10-05"); +insert into diaries values(3006, "2019-10-06"); +insert into diaries values(3007, "2019-10-07"); +insert into diaries values(3008, "2019-10-08"); +insert into diaries values(3009, "2019-10-09"); +insert into diaries values(3010, "2019-10-10"); +insert into diaries values(3011, "2019-10-11"); +insert into diaries values(3012, "2019-10-12"); +insert into diaries values(3013, "2019-10-13"); +insert into diaries values(3014, "2019-10-14"); +insert into diaries values(3015, "2019-10-15"); +insert into diaries values(3016, "2019-10-16"); +insert into diaries values(3017, "2019-10-17"); +insert into diaries values(3018, "2019-10-18"); +insert into diaries values(3019, "2019-10-19"); +insert into diaries values(3020, "2019-10-20"); +insert into diaries values(3021, "2019-10-21"); +insert into diaries values(3022, "2019-10-22"); +insert into diaries values(3023, "2019-10-23"); +insert into diaries values(3024, "2019-10-24"); +insert into diaries values(3025, "2019-10-25"); +insert into diaries values(3026, "2019-10-26"); +insert into diaries values(3027, "2019-10-27"); +insert into diaries values(3028, "2019-10-28"); +insert into diaries values(3029, "2019-10-29"); +insert into diaries values(3030, "2019-10-30"); +insert into diaries values(3031, "2019-10-31"); +insert into diaries values(3032, "2019-11-01"); +insert into diaries values(3033, "2019-11-02"); +insert into diaries values(3034, "2019-11-03"); +insert into diaries values(3035, "2019-11-04"); +insert into diaries values(3036, "2019-11-05"); +insert into diaries values(3037, "2019-11-06"); +insert into diaries values(3038, "2019-11-07"); +insert into diaries values(3039, "2019-11-08"); +insert into diaries values(3040, "2019-11-09"); +insert into diaries values(3041, "2019-11-10"); +insert into diaries values(3042, "2019-11-11"); +insert into diaries values(3043, "2019-11-12"); +insert into diaries values(3044, "2019-11-13"); +insert into diaries values(3045, "2019-11-14"); +insert into diaries values(3046, "2019-11-15"); +insert into diaries values(3047, "2019-11-16"); +insert into diaries values(3048, "2019-11-17"); +insert into diaries values(3049, "2019-11-18"); +insert into diaries values(3050, "2019-11-19"); +insert into diaries values(3051, "2019-11-20"); +insert into diaries values(3052, "2019-11-21"); +insert into diaries values(3053, "2019-11-22"); +insert into diaries values(3054, "2019-11-23"); +insert into diaries values(3055, "2019-11-24"); +insert into diaries values(3056, "2019-11-25"); +insert into diaries values(3057, "2019-11-26"); +insert into diaries values(3058, "2019-11-27"); +insert into diaries values(3059, "2019-11-28"); +insert into diaries values(3060, "2019-11-29"); +insert into diaries values(3061, "2019-11-30"); +insert into diaries values(3062, "2019-12-01"); +insert into diaries values(3063, "2019-12-02"); +insert into diaries values(3064, "2019-12-03"); +insert into diaries values(3065, "2019-12-04"); +insert into diaries values(3066, "2019-12-05"); +insert into diaries values(3067, "2019-12-06"); +insert into diaries values(3068, "2019-12-07"); +insert into diaries values(3069, "2019-12-08"); +insert into diaries values(3070, "2019-12-09"); +insert into diaries values(3071, "2019-12-10"); +insert into diaries values(3072, "2019-12-11"); +insert into diaries values(3073, "2019-12-12"); +insert into diaries values(3074, "2019-12-13"); +insert into diaries values(3075, "2019-12-14"); +insert into diaries values(3076, "2019-12-15"); +insert into diaries values(3077, "2019-12-16"); +insert into diaries values(3078, "2019-12-17"); +insert into diaries values(3079, "2019-12-18"); +insert into diaries values(3080, "2019-12-19"); +insert into diaries values(3081, "2019-12-20"); +insert into diaries values(3082, "2019-12-21"); +insert into diaries values(3083, "2019-12-22"); +insert into diaries values(3084, "2019-12-23"); +insert into diaries values(3085, "2019-12-24"); +insert into diaries values(3086, "2019-12-25"); +insert into diaries values(3087, "2019-12-26"); +insert into diaries values(3088, "2019-12-27"); +insert into diaries values(3089, "2019-12-28"); +insert into diaries values(3090, "2019-12-29"); +insert into diaries values(3091, "2019-12-30"); +insert into diaries values(3092, "2019-12-31"); +insert into diaries values(3093, "2020-01-01"); +insert into diaries values(3094, "2020-01-02"); +insert into diaries values(3095, "2020-01-03"); +insert into diaries values(3096, "2020-01-04"); +insert into diaries values(3097, "2020-01-05"); +insert into diaries values(3098, "2020-01-06"); +insert into diaries values(3099, "2020-01-07"); +insert into diaries values(3100, "2020-01-08"); +insert into diaries values(3101, "2020-01-09"); +insert into diaries values(3102, "2020-01-10"); +insert into diaries values(3103, "2020-01-11"); +insert into diaries values(3104, "2020-01-12"); +insert into diaries values(3105, "2020-01-13"); +insert into diaries values(3106, "2020-01-14"); +insert into diaries values(3107, "2020-01-15"); +insert into diaries values(3108, "2020-01-16"); +insert into diaries values(3109, "2020-01-17"); +insert into diaries values(3110, "2020-01-18"); +insert into diaries values(3111, "2020-01-19"); +insert into diaries values(3112, "2020-01-20"); +insert into diaries values(3113, "2020-01-21"); +insert into diaries values(3114, "2020-01-22"); +insert into diaries values(3115, "2020-01-23"); +insert into diaries values(3116, "2020-01-24"); +insert into diaries values(3117, "2020-01-25"); +insert into diaries values(3118, "2020-01-26"); +insert into diaries values(3119, "2020-01-27"); +insert into diaries values(3120, "2020-01-28"); +insert into diaries values(3121, "2020-01-29"); +insert into diaries values(3122, "2020-01-30"); +insert into diaries values(3123, "2020-01-31"); +insert into diaries values(3124, "2020-02-01"); +insert into diaries values(3125, "2020-02-02"); +insert into diaries values(3126, "2020-02-03"); +insert into diaries values(3127, "2020-02-04"); +insert into diaries values(3128, "2020-02-05"); +insert into diaries values(3129, "2020-02-06"); +insert into diaries values(3130, "2020-02-07"); +insert into diaries values(3131, "2020-02-08"); +insert into diaries values(3132, "2020-02-09"); +insert into diaries values(3133, "2020-02-10"); +insert into diaries values(3134, "2020-02-11"); +insert into diaries values(3135, "2020-02-12"); +insert into diaries values(3136, "2020-02-13"); +insert into diaries values(3137, "2020-02-14"); +insert into diaries values(3138, "2020-02-15"); +insert into diaries values(3139, "2020-02-16"); +insert into diaries values(3140, "2020-02-17"); +insert into diaries values(3141, "2020-02-18"); +insert into diaries values(3142, "2020-02-19"); +insert into diaries values(3143, "2020-02-20"); +insert into diaries values(3144, "2020-02-21"); +insert into diaries values(3145, "2020-02-22"); +insert into diaries values(3146, "2020-02-23"); +insert into diaries values(3147, "2020-02-24"); +insert into diaries values(3148, "2020-02-25"); +insert into diaries values(3149, "2020-02-26"); +insert into diaries values(3150, "2020-02-27"); +insert into diaries values(3151, "2020-02-28"); +insert into diaries values(3152, "2020-02-29"); +insert into diaries values(3153, "2020-03-01"); +insert into diaries values(3154, "2020-03-02"); +insert into diaries values(3155, "2020-03-03"); +insert into diaries values(3156, "2020-03-04"); +insert into diaries values(3157, "2020-03-05"); +insert into diaries values(3158, "2020-03-06"); +insert into diaries values(3159, "2020-03-07"); +insert into diaries values(3160, "2020-03-08"); +insert into diaries values(3161, "2020-03-09"); +insert into diaries values(3162, "2020-03-10"); +insert into diaries values(3163, "2020-03-11"); +insert into diaries values(3164, "2020-03-12"); +insert into diaries values(3165, "2020-03-13"); +insert into diaries values(3166, "2020-03-14"); +insert into diaries values(3167, "2020-03-15"); +insert into diaries values(3168, "2020-03-16"); +insert into diaries values(3169, "2020-03-17"); +insert into diaries values(3170, "2020-03-18"); +insert into diaries values(3171, "2020-03-19"); +insert into diaries values(3172, "2020-03-20"); +insert into diaries values(3173, "2020-03-21"); +insert into diaries values(3174, "2020-03-22"); +insert into diaries values(3175, "2020-03-23"); +insert into diaries values(3176, "2020-03-24"); +insert into diaries values(3177, "2020-03-25"); +insert into diaries values(3178, "2020-03-26"); +insert into diaries values(3179, "2020-03-27"); +insert into diaries values(3180, "2020-03-28"); +insert into diaries values(3181, "2020-03-29"); +insert into diaries values(3182, "2020-03-30"); +insert into diaries values(3183, "2020-03-31"); +insert into diaries values(3184, "2020-04-01"); +insert into diaries values(3185, "2020-04-02"); +insert into diaries values(3186, "2020-04-03"); +insert into diaries values(3187, "2020-04-04"); +insert into diaries values(3188, "2020-04-05"); +insert into diaries values(3189, "2020-04-06"); +insert into diaries values(3190, "2020-04-07"); +insert into diaries values(3191, "2020-04-08"); +insert into diaries values(3192, "2020-04-09"); +insert into diaries values(3193, "2020-04-10"); +insert into diaries values(3194, "2020-04-11"); +insert into diaries values(3195, "2020-04-12"); +insert into diaries values(3196, "2020-04-13"); +insert into diaries values(3197, "2020-04-14"); +insert into diaries values(3198, "2020-04-15"); +insert into diaries values(3199, "2020-04-16"); +insert into diaries values(3200, "2020-04-17"); +insert into diaries values(3201, "2020-04-18"); +insert into diaries values(3202, "2020-04-19"); +insert into diaries values(3203, "2020-04-20"); +insert into diaries values(3204, "2020-04-21"); +insert into diaries values(3205, "2020-04-22"); +insert into diaries values(3206, "2020-04-23"); +insert into diaries values(3207, "2020-04-24"); +insert into diaries values(3208, "2020-04-25"); +insert into diaries values(3209, "2020-04-26"); +insert into diaries values(3210, "2020-04-27"); +insert into diaries values(3211, "2020-04-28"); +insert into diaries values(3212, "2020-04-29"); +insert into diaries values(3213, "2020-04-30"); +insert into diaries values(3214, "2020-05-01"); +insert into diaries values(3215, "2020-05-02"); +insert into diaries values(3216, "2020-05-03"); +insert into diaries values(3217, "2020-05-04"); +insert into diaries values(3218, "2020-05-05"); +insert into diaries values(3219, "2020-05-06"); +insert into diaries values(3220, "2020-05-07"); +insert into diaries values(3221, "2020-05-08"); +insert into diaries values(3222, "2020-05-09"); +insert into diaries values(3223, "2020-05-10"); +insert into diaries values(3224, "2020-05-11"); +insert into diaries values(3225, "2020-05-12"); +insert into diaries values(3226, "2020-05-13"); +insert into diaries values(3227, "2020-05-14"); +insert into diaries values(3228, "2020-05-15"); +insert into diaries values(3229, "2020-05-16"); +insert into diaries values(3230, "2020-05-17"); +insert into diaries values(3231, "2020-05-18"); +insert into diaries values(3232, "2020-05-19"); +insert into diaries values(3233, "2020-05-20"); +insert into diaries values(3234, "2020-05-21"); +insert into diaries values(3235, "2020-05-22"); +insert into diaries values(3236, "2020-05-23"); +insert into diaries values(3237, "2020-05-24"); +insert into diaries values(3238, "2020-05-25"); +insert into diaries values(3239, "2020-05-26"); +insert into diaries values(3240, "2020-05-27"); +insert into diaries values(3241, "2020-05-28"); +insert into diaries values(3242, "2020-05-29"); +insert into diaries values(3243, "2020-05-30"); +insert into diaries values(3244, "2020-05-31"); +insert into diaries values(3245, "2020-06-01"); +insert into diaries values(3246, "2020-06-02"); +insert into diaries values(3247, "2020-06-03"); +insert into diaries values(3248, "2020-06-04"); +insert into diaries values(3249, "2020-06-05"); +insert into diaries values(3250, "2020-06-06"); +insert into diaries values(3251, "2020-06-07"); +insert into diaries values(3252, "2020-06-08"); +insert into diaries values(3253, "2020-06-09"); +insert into diaries values(3254, "2020-06-10"); +insert into diaries values(3255, "2020-06-11"); +insert into diaries values(3256, "2020-06-12"); +insert into diaries values(3257, "2020-06-13"); +insert into diaries values(3258, "2020-06-14"); +insert into diaries values(3259, "2020-06-15"); +insert into diaries values(3260, "2020-06-16"); +insert into diaries values(3261, "2020-06-17"); +insert into diaries values(3262, "2020-06-18"); +insert into diaries values(3263, "2020-06-19"); +insert into diaries values(3264, "2020-06-20"); +insert into diaries values(3265, "2020-06-21"); +insert into diaries values(3266, "2020-06-22"); +insert into diaries values(3267, "2020-06-23"); +insert into diaries values(3268, "2020-06-24"); +insert into diaries values(3269, "2020-06-25"); +insert into diaries values(3270, "2020-06-26"); +insert into diaries values(3271, "2020-06-27"); +insert into diaries values(3272, "2020-06-28"); +insert into diaries values(3273, "2020-06-29"); +insert into diaries values(3274, "2020-06-30"); +insert into diaries values(3275, "2020-07-01"); +insert into diaries values(3276, "2020-07-02"); +insert into diaries values(3277, "2020-07-03"); +insert into diaries values(3278, "2020-07-04"); +insert into diaries values(3279, "2020-07-05"); +insert into diaries values(3280, "2020-07-06"); +insert into diaries values(3281, "2020-07-07"); +insert into diaries values(3282, "2020-07-08"); +insert into diaries values(3283, "2020-07-09"); +insert into diaries values(3284, "2020-07-10"); +insert into diaries values(3285, "2020-07-11"); +insert into diaries values(3286, "2020-07-12"); +insert into diaries values(3287, "2020-07-13"); +insert into diaries values(3288, "2020-07-14"); +insert into diaries values(3289, "2020-07-15"); +insert into diaries values(3290, "2020-07-16"); +insert into diaries values(3291, "2020-07-17"); +insert into diaries values(3292, "2020-07-18"); +insert into diaries values(3293, "2020-07-19"); +insert into diaries values(3294, "2020-07-20"); +insert into diaries values(3295, "2020-07-21"); +insert into diaries values(3296, "2020-07-22"); +insert into diaries values(3297, "2020-07-23"); +insert into diaries values(3298, "2020-07-24"); +insert into diaries values(3299, "2020-07-25"); +insert into diaries values(3300, "2020-07-26"); +insert into diaries values(3301, "2020-07-27"); +insert into diaries values(3302, "2020-07-28"); +insert into diaries values(3303, "2020-07-29"); +insert into diaries values(3304, "2020-07-30"); +insert into diaries values(3305, "2020-07-31"); +insert into diaries values(3306, "2020-08-01"); +insert into diaries values(3307, "2020-08-02"); +insert into diaries values(3308, "2020-08-03"); +insert into diaries values(3309, "2020-08-04"); +insert into diaries values(3310, "2020-08-05"); +insert into diaries values(3311, "2020-08-06"); +insert into diaries values(3312, "2020-08-07"); +insert into diaries values(3313, "2020-08-08"); +insert into diaries values(3314, "2020-08-09"); +insert into diaries values(3315, "2020-08-10"); +insert into diaries values(3316, "2020-08-11"); +insert into diaries values(3317, "2020-08-12"); +insert into diaries values(3318, "2020-08-13"); +insert into diaries values(3319, "2020-08-14"); +insert into diaries values(3320, "2020-08-15"); +insert into diaries values(3321, "2020-08-16"); +insert into diaries values(3322, "2020-08-17"); +insert into diaries values(3323, "2020-08-18"); +insert into diaries values(3324, "2020-08-19"); +insert into diaries values(3325, "2020-08-20"); +insert into diaries values(3326, "2020-08-21"); +insert into diaries values(3327, "2020-08-22"); +insert into diaries values(3328, "2020-08-23"); +insert into diaries values(3329, "2020-08-24"); +insert into diaries values(3330, "2020-08-25"); +insert into diaries values(3331, "2020-08-26"); +insert into diaries values(3332, "2020-08-27"); +insert into diaries values(3333, "2020-08-28"); +insert into diaries values(3334, "2020-08-29"); +insert into diaries values(3335, "2020-08-30"); +insert into diaries values(3336, "2020-08-31"); +insert into diaries values(3337, "2020-09-01"); +insert into diaries values(3338, "2020-09-02"); +insert into diaries values(3339, "2020-09-03"); +insert into diaries values(3340, "2020-09-04"); +insert into diaries values(3341, "2020-09-05"); +insert into diaries values(3342, "2020-09-06"); +insert into diaries values(3343, "2020-09-07"); +insert into diaries values(3344, "2020-09-08"); +insert into diaries values(3345, "2020-09-09"); +insert into diaries values(3346, "2020-09-10"); +insert into diaries values(3347, "2020-09-11"); +insert into diaries values(3348, "2020-09-12"); +insert into diaries values(3349, "2020-09-13"); +insert into diaries values(3350, "2020-09-14"); +insert into diaries values(3351, "2020-09-15"); +insert into diaries values(3352, "2020-09-16"); +insert into diaries values(3353, "2020-09-17"); +insert into diaries values(3354, "2020-09-18"); +insert into diaries values(3355, "2020-09-19"); +insert into diaries values(3356, "2020-09-20"); +insert into diaries values(3357, "2020-09-21"); +insert into diaries values(3358, "2020-09-22"); +insert into diaries values(3359, "2020-09-23"); +insert into diaries values(3360, "2020-09-24"); +insert into diaries values(3361, "2020-09-25"); +insert into diaries values(3362, "2020-09-26"); +insert into diaries values(3363, "2020-09-27"); +insert into diaries values(3364, "2020-09-28"); +insert into diaries values(3365, "2020-09-29"); +insert into diaries values(3366, "2020-09-30"); +insert into diaries values(3367, "2020-10-01"); +insert into diaries values(3368, "2020-10-02"); +insert into diaries values(3369, "2020-10-03"); +insert into diaries values(3370, "2020-10-04"); +insert into diaries values(3371, "2020-10-05"); +insert into diaries values(3372, "2020-10-06"); +insert into diaries values(3373, "2020-10-07"); +insert into diaries values(3374, "2020-10-08"); +insert into diaries values(3375, "2020-10-09"); +insert into diaries values(3376, "2020-10-10"); +insert into diaries values(3377, "2020-10-11"); +insert into diaries values(3378, "2020-10-12"); +insert into diaries values(3379, "2020-10-13"); +insert into diaries values(3380, "2020-10-14"); +insert into diaries values(3381, "2020-10-15"); +insert into diaries values(3382, "2020-10-16"); +insert into diaries values(3383, "2020-10-17"); +insert into diaries values(3384, "2020-10-18"); +insert into diaries values(3385, "2020-10-19"); +insert into diaries values(3386, "2020-10-20"); +insert into diaries values(3387, "2020-10-21"); +insert into diaries values(3388, "2020-10-22"); +insert into diaries values(3389, "2020-10-23"); +insert into diaries values(3390, "2020-10-24"); +insert into diaries values(3391, "2020-10-25"); +insert into diaries values(3392, "2020-10-26"); +insert into diaries values(3393, "2020-10-27"); +insert into diaries values(3394, "2020-10-28"); +insert into diaries values(3395, "2020-10-29"); +insert into diaries values(3396, "2020-10-30"); +insert into diaries values(3397, "2020-10-31"); +insert into diaries values(3398, "2020-11-01"); +insert into diaries values(3399, "2020-11-02"); +insert into diaries values(3400, "2020-11-03"); +insert into diaries values(3401, "2020-11-04"); +insert into diaries values(3402, "2020-11-05"); +insert into diaries values(3403, "2020-11-06"); +insert into diaries values(3404, "2020-11-07"); +insert into diaries values(3405, "2020-11-08"); +insert into diaries values(3406, "2020-11-09"); +insert into diaries values(3407, "2020-11-10"); +insert into diaries values(3408, "2020-11-11"); +insert into diaries values(3409, "2020-11-12"); +insert into diaries values(3410, "2020-11-13"); +insert into diaries values(3411, "2020-11-14"); +insert into diaries values(3412, "2020-11-15"); +insert into diaries values(3413, "2020-11-16"); +insert into diaries values(3414, "2020-11-17"); +insert into diaries values(3415, "2020-11-18"); +insert into diaries values(3416, "2020-11-19"); +insert into diaries values(3417, "2020-11-20"); +insert into diaries values(3418, "2020-11-21"); +insert into diaries values(3419, "2020-11-22"); +insert into diaries values(3420, "2020-11-23"); +insert into diaries values(3421, "2020-11-24"); +insert into diaries values(3422, "2020-11-25"); +insert into diaries values(3423, "2020-11-26"); +insert into diaries values(3424, "2020-11-27"); +insert into diaries values(3425, "2020-11-28"); +insert into diaries values(3426, "2020-11-29"); +insert into diaries values(3427, "2020-11-30"); +insert into diaries values(3428, "2020-12-01"); +insert into diaries values(3429, "2020-12-02"); +insert into diaries values(3430, "2020-12-03"); +insert into diaries values(3431, "2020-12-04"); +insert into diaries values(3432, "2020-12-05"); +insert into diaries values(3433, "2020-12-06"); +insert into diaries values(3434, "2020-12-07"); +insert into diaries values(3435, "2020-12-08"); +insert into diaries values(3436, "2020-12-09"); +insert into diaries values(3437, "2020-12-10"); +insert into diaries values(3438, "2020-12-11"); +insert into diaries values(3439, "2020-12-12"); +insert into diaries values(3440, "2020-12-13"); +insert into diaries values(3441, "2020-12-14"); +insert into diaries values(3442, "2020-12-15"); +insert into diaries values(3443, "2020-12-16"); +insert into diaries values(3444, "2020-12-17"); +insert into diaries values(3445, "2020-12-18"); +insert into diaries values(3446, "2020-12-19"); +insert into diaries values(3447, "2020-12-20"); +insert into diaries values(3448, "2020-12-21"); +insert into diaries values(3449, "2020-12-22"); +insert into diaries values(3450, "2020-12-23"); +insert into diaries values(3451, "2020-12-24"); +insert into diaries values(3452, "2020-12-25"); +insert into diaries values(3453, "2020-12-26"); +insert into diaries values(3454, "2020-12-27"); +insert into diaries values(3455, "2020-12-28"); +insert into diaries values(3456, "2020-12-29"); +insert into diaries values(3457, "2020-12-30"); +insert into diaries values(3458, "2020-12-31"); +insert into diaries values(3459, "2021-01-01"); +insert into diaries values(3460, "2021-01-02"); +insert into diaries values(3461, "2021-01-03"); +insert into diaries values(3462, "2021-01-04"); +insert into diaries values(3463, "2021-01-05"); +insert into diaries values(3464, "2021-01-06"); +insert into diaries values(3465, "2021-01-07"); +insert into diaries values(3466, "2021-01-08"); +insert into diaries values(3467, "2021-01-09"); +insert into diaries values(3468, "2021-01-10"); +insert into diaries values(3469, "2021-01-11"); +insert into diaries values(3470, "2021-01-12"); +insert into diaries values(3471, "2021-01-13"); +insert into diaries values(3472, "2021-01-14"); +insert into diaries values(3473, "2021-01-15"); +insert into diaries values(3474, "2021-01-16"); +insert into diaries values(3475, "2021-01-17"); +insert into diaries values(3476, "2021-01-18"); +insert into diaries values(3477, "2021-01-19"); +insert into diaries values(3478, "2021-01-20"); +insert into diaries values(3479, "2021-01-21"); +insert into diaries values(3480, "2021-01-22"); +insert into diaries values(3481, "2021-01-23"); +insert into diaries values(3482, "2021-01-24"); +insert into diaries values(3483, "2021-01-25"); +insert into diaries values(3484, "2021-01-26"); +insert into diaries values(3485, "2021-01-27"); +insert into diaries values(3486, "2021-01-28"); +insert into diaries values(3487, "2021-01-29"); +insert into diaries values(3488, "2021-01-30"); +insert into diaries values(3489, "2021-01-31"); +insert into diaries values(3490, "2021-02-01"); +insert into diaries values(3491, "2021-02-02"); +insert into diaries values(3492, "2021-02-03"); +insert into diaries values(3493, "2021-02-04"); +insert into diaries values(3494, "2021-02-05"); +insert into diaries values(3495, "2021-02-06"); +insert into diaries values(3496, "2021-02-07"); +insert into diaries values(3497, "2021-02-08"); +insert into diaries values(3498, "2021-02-09"); +insert into diaries values(3499, "2021-02-10"); +insert into diaries values(3500, "2021-02-11"); +insert into diaries values(3501, "2021-02-12"); +insert into diaries values(3502, "2021-02-13"); +insert into diaries values(3503, "2021-02-14"); +insert into diaries values(3504, "2021-02-15"); +insert into diaries values(3505, "2021-02-16"); +insert into diaries values(3506, "2021-02-17"); +insert into diaries values(3507, "2021-02-18"); +insert into diaries values(3508, "2021-02-19"); +insert into diaries values(3509, "2021-02-20"); +insert into diaries values(3510, "2021-02-21"); +insert into diaries values(3511, "2021-02-22"); +insert into diaries values(3512, "2021-02-23"); +insert into diaries values(3513, "2021-02-24"); +insert into diaries values(3514, "2021-02-25"); +insert into diaries values(3515, "2021-02-26"); +insert into diaries values(3516, "2021-02-27"); +insert into diaries values(3517, "2021-02-28"); +insert into diaries values(3518, "2021-03-01"); +insert into diaries values(3519, "2021-03-02"); +insert into diaries values(3520, "2021-03-03"); +insert into diaries values(3521, "2021-03-04"); +insert into diaries values(3522, "2021-03-05"); +insert into diaries values(3523, "2021-03-06"); +insert into diaries values(3524, "2021-03-07"); +insert into diaries values(3525, "2021-03-08"); +insert into diaries values(3526, "2021-03-09"); +insert into diaries values(3527, "2021-03-10"); +insert into diaries values(3528, "2021-03-11"); +insert into diaries values(3529, "2021-03-12"); +insert into diaries values(3530, "2021-03-13"); +insert into diaries values(3531, "2021-03-14"); +insert into diaries values(3532, "2021-03-15"); +insert into diaries values(3533, "2021-03-16"); +insert into diaries values(3534, "2021-03-17"); +insert into diaries values(3535, "2021-03-18"); +insert into diaries values(3536, "2021-03-19"); +insert into diaries values(3537, "2021-03-20"); +insert into diaries values(3538, "2021-03-21"); +insert into diaries values(3539, "2021-03-22"); +insert into diaries values(3540, "2021-03-23"); +insert into diaries values(3541, "2021-03-24"); +insert into diaries values(3542, "2021-03-25"); +insert into diaries values(3543, "2021-03-26"); +insert into diaries values(3544, "2021-03-27"); +insert into diaries values(3545, "2021-03-28"); +insert into diaries values(3546, "2021-03-29"); +insert into diaries values(3547, "2021-03-30"); +insert into diaries values(3548, "2021-03-31"); +insert into diaries values(3549, "2021-04-01"); +insert into diaries values(3550, "2021-04-02"); +insert into diaries values(3551, "2021-04-03"); +insert into diaries values(3552, "2021-04-04"); +insert into diaries values(3553, "2021-04-05"); +insert into diaries values(3554, "2021-04-06"); +insert into diaries values(3555, "2021-04-07"); +insert into diaries values(3556, "2021-04-08"); +insert into diaries values(3557, "2021-04-09"); +insert into diaries values(3558, "2021-04-10"); +insert into diaries values(3559, "2021-04-11"); +insert into diaries values(3560, "2021-04-12"); +insert into diaries values(3561, "2021-04-13"); +insert into diaries values(3562, "2021-04-14"); +insert into diaries values(3563, "2021-04-15"); +insert into diaries values(3564, "2021-04-16"); +insert into diaries values(3565, "2021-04-17"); +insert into diaries values(3566, "2021-04-18"); +insert into diaries values(3567, "2021-04-19"); +insert into diaries values(3568, "2021-04-20"); +insert into diaries values(3569, "2021-04-21"); +insert into diaries values(3570, "2021-04-22"); +insert into diaries values(3571, "2021-04-23"); +insert into diaries values(3572, "2021-04-24"); +insert into diaries values(3573, "2021-04-25"); +insert into diaries values(3574, "2021-04-26"); +insert into diaries values(3575, "2021-04-27"); +insert into diaries values(3576, "2021-04-28"); +insert into diaries values(3577, "2021-04-29"); +insert into diaries values(3578, "2021-04-30"); +insert into diaries values(3579, "2021-05-01"); +insert into diaries values(3580, "2021-05-02"); +insert into diaries values(3581, "2021-05-03"); +insert into diaries values(3582, "2021-05-04"); +insert into diaries values(3583, "2021-05-05"); +insert into diaries values(3584, "2021-05-06"); +insert into diaries values(3585, "2021-05-07"); +insert into diaries values(3586, "2021-05-08"); +insert into diaries values(3587, "2021-05-09"); +insert into diaries values(3588, "2021-05-10"); +insert into diaries values(3589, "2021-05-11"); +insert into diaries values(3590, "2021-05-12"); +insert into diaries values(3591, "2021-05-13"); +insert into diaries values(3592, "2021-05-14"); +insert into diaries values(3593, "2021-05-15"); +insert into diaries values(3594, "2021-05-16"); +insert into diaries values(3595, "2021-05-17"); +insert into diaries values(3596, "2021-05-18"); +insert into diaries values(3597, "2021-05-19"); +insert into diaries values(3598, "2021-05-20"); +insert into diaries values(3599, "2021-05-21"); +insert into diaries values(3600, "2021-05-22"); +insert into diaries values(3601, "2021-05-23"); +insert into diaries values(3602, "2021-05-24"); +insert into diaries values(3603, "2021-05-25"); +insert into diaries values(3604, "2021-05-26"); +insert into diaries values(3605, "2021-05-27"); +insert into diaries values(3606, "2021-05-28"); +insert into diaries values(3607, "2021-05-29"); +insert into diaries values(3608, "2021-05-30"); +insert into diaries values(3609, "2021-05-31"); +insert into diaries values(3610, "2021-06-01"); +insert into diaries values(3611, "2021-06-02"); +insert into diaries values(3612, "2021-06-03"); +insert into diaries values(3613, "2021-06-04"); +insert into diaries values(3614, "2021-06-05"); +insert into diaries values(3615, "2021-06-06"); +insert into diaries values(3616, "2021-06-07"); +insert into diaries values(3617, "2021-06-08"); +insert into diaries values(3618, "2021-06-09"); +insert into diaries values(3619, "2021-06-10"); +insert into diaries values(3620, "2021-06-11"); +insert into diaries values(3621, "2021-06-12"); +insert into diaries values(3622, "2021-06-13"); +insert into diaries values(3623, "2021-06-14"); +insert into diaries values(3624, "2021-06-15"); +insert into diaries values(3625, "2021-06-16"); +insert into diaries values(3626, "2021-06-17"); +insert into diaries values(3627, "2021-06-18"); +insert into diaries values(3628, "2021-06-19"); +insert into diaries values(3629, "2021-06-20"); +insert into diaries values(3630, "2021-06-21"); +insert into diaries values(3631, "2021-06-22"); +insert into diaries values(3632, "2021-06-23"); +insert into diaries values(3633, "2021-06-24"); +insert into diaries values(3634, "2021-06-25"); +insert into diaries values(3635, "2021-06-26"); +insert into diaries values(3636, "2021-06-27"); +insert into diaries values(3637, "2021-06-28"); +insert into diaries values(3638, "2021-06-29"); +insert into diaries values(3639, "2021-06-30"); +insert into diaries values(3640, "2021-07-01"); +insert into diaries values(3641, "2021-07-02"); +insert into diaries values(3642, "2021-07-03"); +insert into diaries values(3643, "2021-07-04"); +insert into diaries values(3644, "2021-07-05"); +insert into diaries values(3645, "2021-07-06"); +insert into diaries values(3646, "2021-07-07"); +insert into diaries values(3647, "2021-07-08"); +insert into diaries values(3648, "2021-07-09"); +insert into diaries values(3649, "2021-07-10"); +insert into diaries values(3650, "2021-07-11"); +insert into diaries values(3651, "2021-07-12"); +insert into diaries values(3652, "2021-07-13"); +insert into diaries values(3653, "2021-07-14"); +insert into diaries values(3654, "2021-07-15"); +insert into diaries values(3655, "2021-07-16"); +insert into diaries values(3656, "2021-07-17"); +insert into diaries values(3657, "2021-07-18"); +insert into diaries values(3658, "2021-07-19"); +insert into diaries values(3659, "2021-07-20"); +insert into diaries values(3660, "2021-07-21"); +insert into diaries values(3661, "2021-07-22"); +insert into diaries values(3662, "2021-07-23"); +insert into diaries values(3663, "2021-07-24"); +insert into diaries values(3664, "2021-07-25"); +insert into diaries values(3665, "2021-07-26"); +insert into diaries values(3666, "2021-07-27"); +insert into diaries values(3667, "2021-07-28"); +insert into diaries values(3668, "2021-07-29"); +insert into diaries values(3669, "2021-07-30"); +insert into diaries values(3670, "2021-07-31"); +insert into diaries values(3671, "2021-08-01"); +insert into diaries values(3672, "2021-08-02"); +insert into diaries values(3673, "2021-08-03"); +insert into diaries values(3674, "2021-08-04"); +insert into diaries values(3675, "2021-08-05"); +insert into diaries values(3676, "2021-08-06"); +insert into diaries values(3677, "2021-08-07"); +insert into diaries values(3678, "2021-08-08"); +insert into diaries values(3679, "2021-08-09"); +insert into diaries values(3680, "2021-08-10"); +insert into diaries values(3681, "2021-08-11"); +insert into diaries values(3682, "2021-08-12"); +insert into diaries values(3683, "2021-08-13"); +insert into diaries values(3684, "2021-08-14"); +insert into diaries values(3685, "2021-08-15"); +insert into diaries values(3686, "2021-08-16"); +insert into diaries values(3687, "2021-08-17"); +insert into diaries values(3688, "2021-08-18"); +insert into diaries values(3689, "2021-08-19"); +insert into diaries values(3690, "2021-08-20"); +insert into diaries values(3691, "2021-08-21"); +insert into diaries values(3692, "2021-08-22"); +insert into diaries values(3693, "2021-08-23"); +insert into diaries values(3694, "2021-08-24"); +insert into diaries values(3695, "2021-08-25"); +insert into diaries values(3696, "2021-08-26"); +insert into diaries values(3697, "2021-08-27"); +insert into diaries values(3698, "2021-08-28"); +insert into diaries values(3699, "2021-08-29"); +insert into diaries values(3700, "2021-08-30"); +insert into diaries values(3701, "2021-08-31"); +insert into diaries values(3702, "2021-09-01"); +insert into diaries values(3703, "2021-09-02"); +insert into diaries values(3704, "2021-09-03"); +insert into diaries values(3705, "2021-09-04"); +insert into diaries values(3706, "2021-09-05"); +insert into diaries values(3707, "2021-09-06"); +insert into diaries values(3708, "2021-09-07"); +insert into diaries values(3709, "2021-09-08"); +insert into diaries values(3710, "2021-09-09"); +insert into diaries values(3711, "2021-09-10"); +insert into diaries values(3712, "2021-09-11"); +insert into diaries values(3713, "2021-09-12"); +insert into diaries values(3714, "2021-09-13"); +insert into diaries values(3715, "2021-09-14"); +insert into diaries values(3716, "2021-09-15"); +insert into diaries values(3717, "2021-09-16"); +insert into diaries values(3718, "2021-09-17"); +insert into diaries values(3719, "2021-09-18"); +insert into diaries values(3720, "2021-09-19"); +insert into diaries values(3721, "2021-09-20"); +insert into diaries values(3722, "2021-09-21"); +insert into diaries values(3723, "2021-09-22"); +insert into diaries values(3724, "2021-09-23"); +insert into diaries values(3725, "2021-09-24"); +insert into diaries values(3726, "2021-09-25"); +insert into diaries values(3727, "2021-09-26"); +insert into diaries values(3728, "2021-09-27"); +insert into diaries values(3729, "2021-09-28"); +insert into diaries values(3730, "2021-09-29"); +insert into diaries values(3731, "2021-09-30"); +insert into diaries values(3732, "2021-10-01"); +insert into diaries values(3733, "2021-10-02"); +insert into diaries values(3734, "2021-10-03"); +insert into diaries values(3735, "2021-10-04"); +insert into diaries values(3736, "2021-10-05"); +insert into diaries values(3737, "2021-10-06"); +insert into diaries values(3738, "2021-10-07"); +insert into diaries values(3739, "2021-10-08"); +insert into diaries values(3740, "2021-10-09"); +insert into diaries values(3741, "2021-10-10"); +insert into diaries values(3742, "2021-10-11"); +insert into diaries values(3743, "2021-10-12"); +insert into diaries values(3744, "2021-10-13"); +insert into diaries values(3745, "2021-10-14"); +insert into diaries values(3746, "2021-10-15"); +insert into diaries values(3747, "2021-10-16"); +insert into diaries values(3748, "2021-10-17"); +insert into diaries values(3749, "2021-10-18"); +insert into diaries values(3750, "2021-10-19"); +insert into diaries values(3751, "2021-10-20"); +insert into diaries values(3752, "2021-10-21"); +insert into diaries values(3753, "2021-10-22"); +insert into diaries values(3754, "2021-10-23"); +insert into diaries values(3755, "2021-10-24"); +insert into diaries values(3756, "2021-10-25"); +insert into diaries values(3757, "2021-10-26"); +insert into diaries values(3758, "2021-10-27"); +insert into diaries values(3759, "2021-10-28"); +insert into diaries values(3760, "2021-10-29"); +insert into diaries values(3761, "2021-10-30"); +insert into diaries values(3762, "2021-10-31"); +insert into diaries values(3763, "2021-11-01"); +insert into diaries values(3764, "2021-11-02"); +insert into diaries values(3765, "2021-11-03"); +insert into diaries values(3766, "2021-11-04"); +insert into diaries values(3767, "2021-11-05"); +insert into diaries values(3768, "2021-11-06"); +insert into diaries values(3769, "2021-11-07"); +insert into diaries values(3770, "2021-11-08"); +insert into diaries values(3771, "2021-11-09"); +insert into diaries values(3772, "2021-11-10"); +insert into diaries values(3773, "2021-11-11"); +insert into diaries values(3774, "2021-11-12"); +insert into diaries values(3775, "2021-11-13"); +insert into diaries values(3776, "2021-11-14"); +insert into diaries values(3777, "2021-11-15"); +insert into diaries values(3778, "2021-11-16"); +insert into diaries values(3779, "2021-11-17"); +insert into diaries values(3780, "2021-11-18"); +insert into diaries values(3781, "2021-11-19"); +insert into diaries values(3782, "2021-11-20"); +insert into diaries values(3783, "2021-11-21"); +insert into diaries values(3784, "2021-11-22"); +insert into diaries values(3785, "2021-11-23"); +insert into diaries values(3786, "2021-11-24"); +insert into diaries values(3787, "2021-11-25"); +insert into diaries values(3788, "2021-11-26"); +insert into diaries values(3789, "2021-11-27"); +insert into diaries values(3790, "2021-11-28"); +insert into diaries values(3791, "2021-11-29"); +insert into diaries values(3792, "2021-11-30"); +insert into diaries values(3793, "2021-12-01"); +insert into diaries values(3794, "2021-12-02"); +insert into diaries values(3795, "2021-12-03"); +insert into diaries values(3796, "2021-12-04"); +insert into diaries values(3797, "2021-12-05"); +insert into diaries values(3798, "2021-12-06"); +insert into diaries values(3799, "2021-12-07"); +insert into diaries values(3800, "2021-12-08"); +insert into diaries values(3801, "2021-12-09"); +insert into diaries values(3802, "2021-12-10"); +insert into diaries values(3803, "2021-12-11"); +insert into diaries values(3804, "2021-12-12"); +insert into diaries values(3805, "2021-12-13"); +insert into diaries values(3806, "2021-12-14"); +insert into diaries values(3807, "2021-12-15"); +insert into diaries values(3808, "2021-12-16"); +insert into diaries values(3809, "2021-12-17"); +insert into diaries values(3810, "2021-12-18"); +insert into diaries values(3811, "2021-12-19"); +insert into diaries values(3812, "2021-12-20"); +insert into diaries values(3813, "2021-12-21"); +insert into diaries values(3814, "2021-12-22"); +insert into diaries values(3815, "2021-12-23"); +insert into diaries values(3816, "2021-12-24"); +insert into diaries values(3817, "2021-12-25"); +insert into diaries values(3818, "2021-12-26"); +insert into diaries values(3819, "2021-12-27"); +insert into diaries values(3820, "2021-12-28"); +insert into diaries values(3821, "2021-12-29"); +insert into diaries values(3822, "2021-12-30"); +insert into diaries values(3823, "2021-12-31"); +insert into diaries values(3824, "2022-01-01"); +insert into diaries values(3825, "2022-01-02"); +insert into diaries values(3826, "2022-01-03"); +insert into diaries values(3827, "2022-01-04"); +insert into diaries values(3828, "2022-01-05"); +insert into diaries values(3829, "2022-01-06"); +insert into diaries values(3830, "2022-01-07"); +insert into diaries values(3831, "2022-01-08"); +insert into diaries values(3832, "2022-01-09"); +insert into diaries values(3833, "2022-01-10"); +insert into diaries values(3834, "2022-01-11"); +insert into diaries values(3835, "2022-01-12"); +insert into diaries values(3836, "2022-01-13"); +insert into diaries values(3837, "2022-01-14"); +insert into diaries values(3838, "2022-01-15"); +insert into diaries values(3839, "2022-01-16"); +insert into diaries values(3840, "2022-01-17"); +insert into diaries values(3841, "2022-01-18"); +insert into diaries values(3842, "2022-01-19"); +insert into diaries values(3843, "2022-01-20"); +insert into diaries values(3844, "2022-01-21"); +insert into diaries values(3845, "2022-01-22"); +insert into diaries values(3846, "2022-01-23"); +insert into diaries values(3847, "2022-01-24"); +insert into diaries values(3848, "2022-01-25"); +insert into diaries values(3849, "2022-01-26"); +insert into diaries values(3850, "2022-01-27"); +insert into diaries values(3851, "2022-01-28"); +insert into diaries values(3852, "2022-01-29"); +insert into diaries values(3853, "2022-01-30"); +insert into diaries values(3854, "2022-01-31"); +insert into diaries values(3855, "2022-02-01"); +insert into diaries values(3856, "2022-02-02"); +insert into diaries values(3857, "2022-02-03"); +insert into diaries values(3858, "2022-02-04"); +insert into diaries values(3859, "2022-02-05"); +insert into diaries values(3860, "2022-02-06"); +insert into diaries values(3861, "2022-02-07"); +insert into diaries values(3862, "2022-02-08"); +insert into diaries values(3863, "2022-02-09"); +insert into diaries values(3864, "2022-02-10"); +insert into diaries values(3865, "2022-02-11"); +insert into diaries values(3866, "2022-02-12"); +insert into diaries values(3867, "2022-02-13"); +insert into diaries values(3868, "2022-02-14"); +insert into diaries values(3869, "2022-02-15"); +insert into diaries values(3870, "2022-02-16"); +insert into diaries values(3871, "2022-02-17"); +insert into diaries values(3872, "2022-02-18"); +insert into diaries values(3873, "2022-02-19"); +insert into diaries values(3874, "2022-02-20"); +insert into diaries values(3875, "2022-02-21"); +insert into diaries values(3876, "2022-02-22"); +insert into diaries values(3877, "2022-02-23"); +insert into diaries values(3878, "2022-02-24"); +insert into diaries values(3879, "2022-02-25"); +insert into diaries values(3880, "2022-02-26"); +insert into diaries values(3881, "2022-02-27"); +insert into diaries values(3882, "2022-02-28"); +insert into diaries values(3883, "2022-03-01"); +insert into diaries values(3884, "2022-03-02"); +insert into diaries values(3885, "2022-03-03"); +insert into diaries values(3886, "2022-03-04"); +insert into diaries values(3887, "2022-03-05"); +insert into diaries values(3888, "2022-03-06"); +insert into diaries values(3889, "2022-03-07"); +insert into diaries values(3890, "2022-03-08"); +insert into diaries values(3891, "2022-03-09"); +insert into diaries values(3892, "2022-03-10"); +insert into diaries values(3893, "2022-03-11"); +insert into diaries values(3894, "2022-03-12"); +insert into diaries values(3895, "2022-03-13"); +insert into diaries values(3896, "2022-03-14"); +insert into diaries values(3897, "2022-03-15"); +insert into diaries values(3898, "2022-03-16"); +insert into diaries values(3899, "2022-03-17"); +insert into diaries values(3900, "2022-03-18"); +insert into diaries values(3901, "2022-03-19"); +insert into diaries values(3902, "2022-03-20"); +insert into diaries values(3903, "2022-03-21"); +insert into diaries values(3904, "2022-03-22"); +insert into diaries values(3905, "2022-03-23"); +insert into diaries values(3906, "2022-03-24"); +insert into diaries values(3907, "2022-03-25"); +insert into diaries values(3908, "2022-03-26"); +insert into diaries values(3909, "2022-03-27"); +insert into diaries values(3910, "2022-03-28"); +insert into diaries values(3911, "2022-03-29"); +insert into diaries values(3912, "2022-03-30"); +insert into diaries values(3913, "2022-03-31"); +insert into diaries values(3914, "2022-04-01"); +insert into diaries values(3915, "2022-04-02"); +insert into diaries values(3916, "2022-04-03"); +insert into diaries values(3917, "2022-04-04"); +insert into diaries values(3918, "2022-04-05"); +insert into diaries values(3919, "2022-04-06"); +insert into diaries values(3920, "2022-04-07"); +insert into diaries values(3921, "2022-04-08"); +insert into diaries values(3922, "2022-04-09"); +insert into diaries values(3923, "2022-04-10"); +insert into diaries values(3924, "2022-04-11"); +insert into diaries values(3925, "2022-04-12"); +insert into diaries values(3926, "2022-04-13"); +insert into diaries values(3927, "2022-04-14"); +insert into diaries values(3928, "2022-04-15"); +insert into diaries values(3929, "2022-04-16"); +insert into diaries values(3930, "2022-04-17"); +insert into diaries values(3931, "2022-04-18"); +insert into diaries values(3932, "2022-04-19"); +insert into diaries values(3933, "2022-04-20"); +insert into diaries values(3934, "2022-04-21"); +insert into diaries values(3935, "2022-04-22"); +insert into diaries values(3936, "2022-04-23"); +insert into diaries values(3937, "2022-04-24"); +insert into diaries values(3938, "2022-04-25"); +insert into diaries values(3939, "2022-04-26"); +insert into diaries values(3940, "2022-04-27"); +insert into diaries values(3941, "2022-04-28"); +insert into diaries values(3942, "2022-04-29"); +insert into diaries values(3943, "2022-04-30"); +insert into diaries values(3944, "2022-05-01"); +insert into diaries values(3945, "2022-05-02"); +insert into diaries values(3946, "2022-05-03"); +insert into diaries values(3947, "2022-05-04"); +insert into diaries values(3948, "2022-05-05"); +insert into diaries values(3949, "2022-05-06"); +insert into diaries values(3950, "2022-05-07"); +insert into diaries values(3951, "2022-05-08"); +insert into diaries values(3952, "2022-05-09"); +insert into diaries values(3953, "2022-05-10"); +insert into diaries values(3954, "2022-05-11"); +insert into diaries values(3955, "2022-05-12"); +insert into diaries values(3956, "2022-05-13"); +insert into diaries values(3957, "2022-05-14"); +insert into diaries values(3958, "2022-05-15"); +insert into diaries values(3959, "2022-05-16"); +insert into diaries values(3960, "2022-05-17"); +insert into diaries values(3961, "2022-05-18"); +insert into diaries values(3962, "2022-05-19"); +insert into diaries values(3963, "2022-05-20"); +insert into diaries values(3964, "2022-05-21"); +insert into diaries values(3965, "2022-05-22"); +insert into diaries values(3966, "2022-05-23"); +insert into diaries values(3967, "2022-05-24"); +insert into diaries values(3968, "2022-05-25"); +insert into diaries values(3969, "2022-05-26"); +insert into diaries values(3970, "2022-05-27"); +insert into diaries values(3971, "2022-05-28"); +insert into diaries values(3972, "2022-05-29"); +insert into diaries values(3973, "2022-05-30"); +insert into diaries values(3974, "2022-05-31"); +insert into diaries values(3975, "2022-06-01"); +insert into diaries values(3976, "2022-06-02"); +insert into diaries values(3977, "2022-06-03"); +insert into diaries values(3978, "2022-06-04"); +insert into diaries values(3979, "2022-06-05"); +insert into diaries values(3980, "2022-06-06"); +insert into diaries values(3981, "2022-06-07"); +insert into diaries values(3982, "2022-06-08"); +insert into diaries values(3983, "2022-06-09"); +insert into diaries values(3984, "2022-06-10"); +insert into diaries values(3985, "2022-06-11"); +insert into diaries values(3986, "2022-06-12"); +insert into diaries values(3987, "2022-06-13"); +insert into diaries values(3988, "2022-06-14"); +insert into diaries values(3989, "2022-06-15"); +insert into diaries values(3990, "2022-06-16"); +insert into diaries values(3991, "2022-06-17"); +insert into diaries values(3992, "2022-06-18"); +insert into diaries values(3993, "2022-06-19"); +insert into diaries values(3994, "2022-06-20"); +insert into diaries values(3995, "2022-06-21"); +insert into diaries values(3996, "2022-06-22"); +insert into diaries values(3997, "2022-06-23"); +insert into diaries values(3998, "2022-06-24"); +insert into diaries values(3999, "2022-06-25"); +insert into diaries values(4000, "2022-06-26"); +insert into diaries values(4001, "2022-06-27"); +insert into diaries values(4002, "2022-06-28"); +insert into diaries values(4003, "2022-06-29"); +insert into diaries values(4004, "2022-06-30"); +insert into diaries values(4005, "2022-07-01"); +insert into diaries values(4006, "2022-07-02"); +insert into diaries values(4007, "2022-07-03"); +insert into diaries values(4008, "2022-07-04"); +insert into diaries values(4009, "2022-07-05"); +insert into diaries values(4010, "2022-07-06"); +insert into diaries values(4011, "2022-07-07"); +insert into diaries values(4012, "2022-07-08"); +insert into diaries values(4013, "2022-07-09"); +insert into diaries values(4014, "2022-07-10"); +insert into diaries values(4015, "2022-07-11"); +insert into diaries values(4016, "2022-07-12"); +insert into diaries values(4017, "2022-07-13"); +insert into diaries values(4018, "2022-07-14"); +insert into diaries values(4019, "2022-07-15"); +insert into diaries values(4020, "2022-07-16"); +insert into diaries values(4021, "2022-07-17"); +insert into diaries values(4022, "2022-07-18"); +insert into diaries values(4023, "2022-07-19"); +insert into diaries values(4024, "2022-07-20"); +insert into diaries values(4025, "2022-07-21"); +insert into diaries values(4026, "2022-07-22"); +insert into diaries values(4027, "2022-07-23"); +insert into diaries values(4028, "2022-07-24"); +insert into diaries values(4029, "2022-07-25"); +insert into diaries values(4030, "2022-07-26"); +insert into diaries values(4031, "2022-07-27"); +insert into diaries values(4032, "2022-07-28"); +insert into diaries values(4033, "2022-07-29"); +insert into diaries values(4034, "2022-07-30"); +insert into diaries values(4035, "2022-07-31"); +insert into diaries values(4036, "2022-08-01"); +insert into diaries values(4037, "2022-08-02"); +insert into diaries values(4038, "2022-08-03"); +insert into diaries values(4039, "2022-08-04"); +insert into diaries values(4040, "2022-08-05"); +insert into diaries values(4041, "2022-08-06"); +insert into diaries values(4042, "2022-08-07"); +insert into diaries values(4043, "2022-08-08"); +insert into diaries values(4044, "2022-08-09"); +insert into diaries values(4045, "2022-08-10"); +insert into diaries values(4046, "2022-08-11"); +insert into diaries values(4047, "2022-08-12"); +insert into diaries values(4048, "2022-08-13"); +insert into diaries values(4049, "2022-08-14"); +insert into diaries values(4050, "2022-08-15"); +insert into diaries values(4051, "2022-08-16"); +insert into diaries values(4052, "2022-08-17"); +insert into diaries values(4053, "2022-08-18"); +insert into diaries values(4054, "2022-08-19"); +insert into diaries values(4055, "2022-08-20"); +insert into diaries values(4056, "2022-08-21"); +insert into diaries values(4057, "2022-08-22"); +insert into diaries values(4058, "2022-08-23"); +insert into diaries values(4059, "2022-08-24"); +insert into diaries values(4060, "2022-08-25"); +insert into diaries values(4061, "2022-08-26"); +insert into diaries values(4062, "2022-08-27"); +insert into diaries values(4063, "2022-08-28"); +insert into diaries values(4064, "2022-08-29"); +insert into diaries values(4065, "2022-08-30"); +insert into diaries values(4066, "2022-08-31"); +insert into diaries values(4067, "2022-09-01"); +insert into diaries values(4068, "2022-09-02"); +insert into diaries values(4069, "2022-09-03"); +insert into diaries values(4070, "2022-09-04"); +insert into diaries values(4071, "2022-09-05"); +insert into diaries values(4072, "2022-09-06"); +insert into diaries values(4073, "2022-09-07"); +insert into diaries values(4074, "2022-09-08"); +insert into diaries values(4075, "2022-09-09"); +insert into diaries values(4076, "2022-09-10"); +insert into diaries values(4077, "2022-09-11"); +insert into diaries values(4078, "2022-09-12"); +insert into diaries values(4079, "2022-09-13"); +insert into diaries values(4080, "2022-09-14"); +insert into diaries values(4081, "2022-09-15"); +insert into diaries values(4082, "2022-09-16"); +insert into diaries values(4083, "2022-09-17"); +insert into diaries values(4084, "2022-09-18"); +insert into diaries values(4085, "2022-09-19"); +insert into diaries values(4086, "2022-09-20"); +insert into diaries values(4087, "2022-09-21"); +insert into diaries values(4088, "2022-09-22"); +insert into diaries values(4089, "2022-09-23"); +insert into diaries values(4090, "2022-09-24"); +insert into diaries values(4091, "2022-09-25"); +insert into diaries values(4092, "2022-09-26"); +insert into diaries values(4093, "2022-09-27"); +insert into diaries values(4094, "2022-09-28"); +insert into diaries values(4095, "2022-09-29"); +commit; +set autocommit=1; +select * from diaries where match(title) against("2022-09-0"); +id title +3824 2022-01-01 +3825 2022-01-02 +3826 2022-01-03 +3827 2022-01-04 +3828 2022-01-05 +3829 2022-01-06 +3830 2022-01-07 +3831 2022-01-08 +3832 2022-01-09 +3833 2022-01-10 +3834 2022-01-11 +3835 2022-01-12 +3836 2022-01-13 +3837 2022-01-14 +3838 2022-01-15 +3839 2022-01-16 +3840 2022-01-17 +3841 2022-01-18 +3842 2022-01-19 +3843 2022-01-20 +3844 2022-01-21 +3845 2022-01-22 +3846 2022-01-23 +3847 2022-01-24 +3848 2022-01-25 +3849 2022-01-26 +3850 2022-01-27 +3851 2022-01-28 +3852 2022-01-29 +3853 2022-01-30 +3854 2022-01-31 +3855 2022-02-01 +3856 2022-02-02 +3857 2022-02-03 +3858 2022-02-04 +3859 2022-02-05 +3860 2022-02-06 +3861 2022-02-07 +3862 2022-02-08 +3863 2022-02-09 +3864 2022-02-10 +3865 2022-02-11 +3866 2022-02-12 +3867 2022-02-13 +3868 2022-02-14 +3869 2022-02-15 +3870 2022-02-16 +3871 2022-02-17 +3872 2022-02-18 +3873 2022-02-19 +3874 2022-02-20 +3875 2022-02-21 +3876 2022-02-22 +3877 2022-02-23 +3878 2022-02-24 +3879 2022-02-25 +3880 2022-02-26 +3881 2022-02-27 +3882 2022-02-28 +3883 2022-03-01 +3884 2022-03-02 +3885 2022-03-03 +3886 2022-03-04 +3887 2022-03-05 +3888 2022-03-06 +3889 2022-03-07 +3890 2022-03-08 +3891 2022-03-09 +3892 2022-03-10 +3893 2022-03-11 +3894 2022-03-12 +3895 2022-03-13 +3896 2022-03-14 +3897 2022-03-15 +3898 2022-03-16 +3899 2022-03-17 +3900 2022-03-18 +3901 2022-03-19 +3902 2022-03-20 +3903 2022-03-21 +3904 2022-03-22 +3905 2022-03-23 +3906 2022-03-24 +3907 2022-03-25 +3908 2022-03-26 +3909 2022-03-27 +3910 2022-03-28 +3911 2022-03-29 +3912 2022-03-30 +3913 2022-03-31 +3914 2022-04-01 +3915 2022-04-02 +3916 2022-04-03 +3917 2022-04-04 +3918 2022-04-05 +3919 2022-04-06 +3920 2022-04-07 +3921 2022-04-08 +3922 2022-04-09 +3923 2022-04-10 +3924 2022-04-11 +3925 2022-04-12 +3926 2022-04-13 +3927 2022-04-14 +3928 2022-04-15 +3929 2022-04-16 +3930 2022-04-17 +3931 2022-04-18 +3932 2022-04-19 +3933 2022-04-20 +3934 2022-04-21 +3935 2022-04-22 +3936 2022-04-23 +3937 2022-04-24 +3938 2022-04-25 +3939 2022-04-26 +3940 2022-04-27 +3941 2022-04-28 +3942 2022-04-29 +3943 2022-04-30 +3944 2022-05-01 +3945 2022-05-02 +3946 2022-05-03 +3947 2022-05-04 +3948 2022-05-05 +3949 2022-05-06 +3950 2022-05-07 +3951 2022-05-08 +3952 2022-05-09 +3953 2022-05-10 +3954 2022-05-11 +3955 2022-05-12 +3956 2022-05-13 +3957 2022-05-14 +3958 2022-05-15 +3959 2022-05-16 +3960 2022-05-17 +3961 2022-05-18 +3962 2022-05-19 +3963 2022-05-20 +3964 2022-05-21 +3965 2022-05-22 +3966 2022-05-23 +3967 2022-05-24 +3968 2022-05-25 +3969 2022-05-26 +3970 2022-05-27 +3971 2022-05-28 +3972 2022-05-29 +3973 2022-05-30 +3974 2022-05-31 +3975 2022-06-01 +3976 2022-06-02 +3977 2022-06-03 +3978 2022-06-04 +3979 2022-06-05 +3980 2022-06-06 +3981 2022-06-07 +3982 2022-06-08 +3983 2022-06-09 +3984 2022-06-10 +3985 2022-06-11 +3986 2022-06-12 +3987 2022-06-13 +3988 2022-06-14 +3989 2022-06-15 +3990 2022-06-16 +3991 2022-06-17 +3992 2022-06-18 +3993 2022-06-19 +3994 2022-06-20 +3995 2022-06-21 +3996 2022-06-22 +3997 2022-06-23 +3998 2022-06-24 +3999 2022-06-25 +4000 2022-06-26 +4001 2022-06-27 +4002 2022-06-28 +4003 2022-06-29 +4004 2022-06-30 +4005 2022-07-01 +4006 2022-07-02 +4007 2022-07-03 +4008 2022-07-04 +4009 2022-07-05 +4010 2022-07-06 +4011 2022-07-07 +4012 2022-07-08 +4013 2022-07-09 +4014 2022-07-10 +4015 2022-07-11 +4016 2022-07-12 +4017 2022-07-13 +4018 2022-07-14 +4019 2022-07-15 +4020 2022-07-16 +4021 2022-07-17 +4022 2022-07-18 +4023 2022-07-19 +4024 2022-07-20 +4025 2022-07-21 +4026 2022-07-22 +4027 2022-07-23 +4028 2022-07-24 +4029 2022-07-25 +4030 2022-07-26 +4031 2022-07-27 +4032 2022-07-28 +4033 2022-07-29 +4034 2022-07-30 +4035 2022-07-31 +4036 2022-08-01 +4037 2022-08-02 +4038 2022-08-03 +4039 2022-08-04 +4040 2022-08-05 +4041 2022-08-06 +4042 2022-08-07 +4043 2022-08-08 +4044 2022-08-09 +4045 2022-08-10 +4046 2022-08-11 +4047 2022-08-12 +4048 2022-08-13 +4049 2022-08-14 +4050 2022-08-15 +4051 2022-08-16 +4052 2022-08-17 +4053 2022-08-18 +4054 2022-08-19 +4055 2022-08-20 +4056 2022-08-21 +4057 2022-08-22 +4058 2022-08-23 +4059 2022-08-24 +4060 2022-08-25 +4061 2022-08-26 +4062 2022-08-27 +4063 2022-08-28 +4064 2022-08-29 +4065 2022-08-30 +4066 2022-08-31 +4067 2022-09-01 +4068 2022-09-02 +4069 2022-09-03 +4070 2022-09-04 +4071 2022-09-05 +4072 2022-09-06 +4073 2022-09-07 +4074 2022-09-08 +4075 2022-09-09 +4076 2022-09-10 +4077 2022-09-11 +4078 2022-09-12 +4079 2022-09-13 +4080 2022-09-14 +4081 2022-09-15 +4082 2022-09-16 +4083 2022-09-17 +4084 2022-09-18 +4085 2022-09-19 +4086 2022-09-20 +4087 2022-09-21 +4088 2022-09-22 +4089 2022-09-23 +4090 2022-09-24 +4091 2022-09-25 +4092 2022-09-26 +4093 2022-09-27 +4094 2022-09-28 +4095 2022-09-29 +drop table diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_column_index_delete.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_column_index_delete.result new file mode 100644 index 00000000000..64acf4aaeae --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_column_index_delete.result @@ -0,0 +1,34 @@ +drop table if exists diaries; +set names utf8; +create table diaries ( +id int primary key, +title varchar(255), +content text, +fulltext index (title, content), +fulltext index (title), +fulltext index (content) +) default charset utf8 COMMENT = 'engine "innodb"'; +show create table diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL, + `title` varchar(255) DEFAULT NULL, + `content` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `title` (`title`,`content`), + FULLTEXT KEY `title_2` (`title`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"' +insert into diaries values(1, "Hello", "はじめました。"); +insert into diaries values(2, "天気", "明日の富士山の天気について"); +insert into diaries values(3, "富士山", "今日もきれい。"); +delete from diaries where id = 2; +select * from diaries where match(title, content) against("富士山"); +id title content +3 富士山 今日もきれい。 +select * from diaries where match(title) against("富士山"); +id title content +3 富士山 今日もきれい。 +select * from diaries where match(content) against("富士山"); +id title content +drop table diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_column_index_insert.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_column_index_insert.result new file mode 100644 index 00000000000..c1661d7fcbf --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_column_index_insert.result @@ -0,0 +1,40 @@ +drop table if exists diaries; +set names utf8; +create table diaries ( +id int primary key, +title varchar(255), +content text, +fulltext index (title, content), +fulltext index (title), +fulltext index (content) +) default charset utf8 COMMENT = 'engine "innodb"'; +show create table diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL, + `title` varchar(255) DEFAULT NULL, + `content` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `title` (`title`,`content`), + FULLTEXT KEY `title_2` (`title`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"' +insert into diaries values(1, "Hello", "はじめました。"); +insert into diaries values(2, "天気", "明日の富士山の天気について"); +insert into diaries values(3, "富士山", "今日もきれい。"); +select * from diaries; +id title content +1 Hello はじめました。 +2 天気 明日の富士山の天気について +3 富士山 今日もきれい。 +select * from diaries where match(title, content) against("富士山"); +id title content +2 天気 明日の富士山の天気について +3 富士山 今日もきれい。 +select * from diaries where match(title) against("富士山"); +id title content +3 富士山 今日もきれい。 +select * from diaries where match(content) against("富士山"); +id title content +2 天気 明日の富士山の天気について +drop table diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_column_index_recreate.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_column_index_recreate.result new file mode 100644 index 00000000000..604aca172a5 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_column_index_recreate.result @@ -0,0 +1,42 @@ +drop table if exists diaries; +set names utf8; +create table diaries ( +id int primary key, +title varchar(255), +content text, +fulltext index (title, content), +fulltext index (title), +fulltext index (content) +) default charset utf8 COMMENT = 'engine "innodb"'; +show create table diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL, + `title` varchar(255) DEFAULT NULL, + `content` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `title` (`title`,`content`), + FULLTEXT KEY `title_2` (`title`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"' +insert into diaries values(1, "Hello", "はじめました。"); +insert into diaries values(2, "天気", "明日の富士山の天気について"); +insert into diaries values(3, "富士山", "今日もきれい。"); +select * from diaries where match(title, content) against("富士山"); +id title content +2 天気 明日の富士山の天気について +3 富士山 今日もきれい。 +drop index title on diaries; +select * from diaries where match(title, content) against("富士山"); +ERROR HY000: Can't find FULLTEXT index matching the column list +create fulltext index new_title_content_index on diaries (title, content); +select * from diaries where match(title, content) against("富士山"); +id title content +2 天気 明日の富士山の天気について +3 富士山 今日もきれい。 +select * from diaries; +id title content +1 Hello はじめました。 +2 天気 明日の富士山の天気について +3 富士山 今日もきれい。 +drop table diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_column_index_update.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_column_index_update.result new file mode 100644 index 00000000000..6f489bf37cc --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_column_index_update.result @@ -0,0 +1,37 @@ +drop table if exists diaries; +set names utf8; +create table diaries ( +id int primary key, +title varchar(255), +content text, +fulltext index (title, content), +fulltext index (title), +fulltext index (content) +) default charset utf8 COMMENT = 'engine "innodb"'; +show create table diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL, + `title` varchar(255) DEFAULT NULL, + `content` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `title` (`title`,`content`), + FULLTEXT KEY `title_2` (`title`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"' +insert into diaries values(1, "Hello", "はじめました。"); +insert into diaries values(2, "天気", "明日の富士山の天気について"); +insert into diaries values(3, "富士山", "今日もきれい。"); +update diaries set title = "チョモランマ" where id = 3; +update diaries set content = "チョモランマと富士山" where id = 1; +select * from diaries where match(title, content) against("富士山"); +id title content +1 Hello チョモランマと富士山 +2 天気 明日の富士山の天気について +select * from diaries where match(title) against("富士山"); +id title content +select * from diaries where match(content) against("富士山"); +id title content +1 Hello チョモランマと富士山 +2 天気 明日の富士山の天気について +drop table diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_index.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_index.result new file mode 100644 index 00000000000..d9448ee82ba --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_index.result @@ -0,0 +1,33 @@ +drop table if exists diaries; +create table diaries ( +id int primary key auto_increment, +title text, +body text, +fulltext index title_index (title), +fulltext index body_index (body) +) comment = 'engine "innodb"' default charset utf8; +show create table diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `body` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `title_index` (`title`), + FULLTEXT KEY `body_index` (`body`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"' +insert into diaries (title, body) values ("survey", "will start groonga!"); +insert into diaries (title, body) values ("groonga (1)", "starting groonga..."); +insert into diaries (title, body) values ("groonga (2)", "started groonga."); +select * from diaries +where match(title) against("survey") and +match(body) against("groonga"); +id title body +1 survey will start groonga! +select *, match(title) against("survey"), match(body) against("groonga") +from diaries +where match(title) against("survey") and +match(body) against("groonga"); +id title body match(title) against("survey") match(body) against("groonga") +1 survey will start groonga! 1048577 149797 +drop table diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_myisam.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_myisam.result new file mode 100644 index 00000000000..de1b8d41906 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_myisam.result @@ -0,0 +1,202 @@ +drop table if exists t1, t2, t3; +create table t1 (c1 int primary key, c2 text, fulltext index ft (c2)) COMMENT = 'engine "myisam"'; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(11) NOT NULL, + `c2` text, + PRIMARY KEY (`c1`), + FULLTEXT KEY `ft` (`c2`) +) ENGINE=Mroonga DEFAULT CHARSET=latin1 COMMENT='engine "myisam"' +insert into t1 values (1, "hoge hoge"); +insert into t1 values (2, "fuga fuga"); +insert into t1 values (3, "moge moge"); +select * from t1; +c1 c2 +1 hoge hoge +2 fuga fuga +3 moge moge +flush tables; +select * from t1; +c1 c2 +1 hoge hoge +2 fuga fuga +3 moge moge +drop table t1; +create table t1 (c1 int primary key, c2 int, c3 text, fulltext index ft(c3)) COMMENT = 'engine "myisam"'; +insert into t1 values(1,10,"aa ii uu ee oo"); +insert into t1 values(2,20,"ka ki ku ke ko"); +insert into t1 values(3,30,"sa si su se so"); +insert into t1 values(4,40,"ta ti tu te to"); +insert into t1 values(5,50,"aa ii uu ee oo"); +select * from t1; +c1 c2 c3 +1 10 aa ii uu ee oo +2 20 ka ki ku ke ko +3 30 sa si su se so +4 40 ta ti tu te to +5 50 aa ii uu ee oo +select * from t1 where match(c3) against("su"); +c1 c2 c3 +3 30 sa si su se so +select * from t1 where match(c3) against("ii"); +c1 c2 c3 +1 10 aa ii uu ee oo +5 50 aa ii uu ee oo +select * from t1 where match(c3) against("+su" in boolean mode); +c1 c2 c3 +3 30 sa si su se so +select * from t1 where match(c3) against("+ii" in boolean mode); +c1 c2 c3 +1 10 aa ii uu ee oo +5 50 aa ii uu ee oo +drop table t1; +set names utf8; +create table t1 (c1 int primary key, c2 varchar(255), c3 text, fulltext index(c2), fulltext index(c3)) default charset utf8 COMMENT = 'engine "myisam"'; +insert into t1 values(1, "明日の富士山の天気について","あああああああ"); +insert into t1 values(2, "いいいいい","明日の富士山の天気は分かりません"); +insert into t1 values(3, "dummy", "dummy"); +select * from t1; +c1 c2 c3 +1 明日の富士山の天気について あああああああ +2 いいいいい 明日の富士山の天気は分かりません +3 dummy dummy +select * from t1 where match(c2) against("富士山"); +c1 c2 c3 +1 明日の富士山の天気について あああああああ +select * from t1 where match(c3) against("富士山"); +c1 c2 c3 +2 いいいいい 明日の富士山の天気は分かりません +drop table t1; +create table t1 (c1 int primary key, c2 varchar(100), fulltext index(c2)) default charset utf8 COMMENT = 'engine "myisam"'; +create table t2 (c1 int primary key, c2 text, fulltext index(c2)) default charset utf8 COMMENT = 'engine "myisam"'; +insert into t1 values (1, "aa ii uu ee oo"); +insert into t1 values (2, "ka ki ku ke ko"); +insert into t1 values (3, "aa ii ii ii oo"); +insert into t1 values (4, "sa si su se so"); +insert into t1 values (5, "ta ti ii ii to"); +insert into t2 (c1,c2) select c1,c2 from t1; +select * from t1; +c1 c2 +1 aa ii uu ee oo +2 ka ki ku ke ko +3 aa ii ii ii oo +4 sa si su se so +5 ta ti ii ii to +select * from t2; +c1 c2 +1 aa ii uu ee oo +2 ka ki ku ke ko +3 aa ii ii ii oo +4 sa si su se so +5 ta ti ii ii to +select * from t1 where c1=3; +c1 c2 +3 aa ii ii ii oo +select * from t2 where c1=3; +c1 c2 +3 aa ii ii ii oo +select * from t1 where c1>3 order by c1 desc; +c1 c2 +5 ta ti ii ii to +4 sa si su se so +select * from t2 where c1>3 order by c1 asc; +c1 c2 +4 sa si su se so +5 ta ti ii ii to +select * from t1 where c2>"s" order by c2 desc; +c1 c2 +5 ta ti ii ii to +4 sa si su se so +select * from t2 where c2>"s" order by c1 asc; +c1 c2 +4 sa si su se so +5 ta ti ii ii to +select *,match(c2) against("ii") from t1 where match(c2) against("ii") order by match(c2) against("ii") desc; +c1 c2 match(c2) against("ii") +3 aa ii ii ii oo 524289 +5 ta ti ii ii to 349526 +1 aa ii uu ee oo 174763 +select *,match(c2) against("ii") from t2 where match(c2) against("ii") order by match(c2) against("ii") asc; +c1 c2 match(c2) against("ii") +1 aa ii uu ee oo 174763 +5 ta ti ii ii to 349526 +3 aa ii ii ii oo 524289 +select c1,c2,match(c2) against("ii") from t1 where match(c2) against("ii"); +c1 c2 match(c2) against("ii") +1 aa ii uu ee oo 174763 +3 aa ii ii ii oo 524289 +5 ta ti ii ii to 349526 +select c1,c2,match(c2) against("ii") from t1 where match(c2) against("ii"); +c1 c2 match(c2) against("ii") +1 aa ii uu ee oo 174763 +3 aa ii ii ii oo 524289 +5 ta ti ii ii to 349526 +drop table t1,t2; +create table t1 (c1 int primary key, c2 int, c3 text, fulltext index ft(c3)) COMMENT = 'engine "myisam"'; +insert into t1 values(1,10,"aa ii uu ee oo"); +insert into t1 values(2,10,"ka ki ku ke ko"); +insert into t1 values(3,10,"aa ii uu ee oo"); +insert into t1 values(4,10,"ka ki ku ke ko"); +insert into t1 values(5,20,"aa ii uu ee oo"); +insert into t1 values(6,20,"ka ki ku ke ko"); +insert into t1 values(7,20,"aa ii uu ee oo"); +insert into t1 values(8,20,"ka ki ku ke ko"); +select * from t1; +c1 c2 c3 +1 10 aa ii uu ee oo +2 10 ka ki ku ke ko +3 10 aa ii uu ee oo +4 10 ka ki ku ke ko +5 20 aa ii uu ee oo +6 20 ka ki ku ke ko +7 20 aa ii uu ee oo +8 20 ka ki ku ke ko +select *,match(c3) against("uu") from t1 where match(c3) against("uu"); +c1 c2 c3 match(c3) against("uu") +1 10 aa ii uu ee oo 131073 +3 10 aa ii uu ee oo 131073 +5 20 aa ii uu ee oo 131073 +7 20 aa ii uu ee oo 131073 +select * from t1 where not match(c3) against("uu"); +c1 c2 c3 +2 10 ka ki ku ke ko +4 10 ka ki ku ke ko +6 20 ka ki ku ke ko +8 20 ka ki ku ke ko +select *,match(c3) against("dummy") from t1 where match(c3) against("dummy"); +c1 c2 c3 match(c3) against("dummy") +select * from t1 where not match(c3) against("dummy"); +c1 c2 c3 +1 10 aa ii uu ee oo +2 10 ka ki ku ke ko +3 10 aa ii uu ee oo +4 10 ka ki ku ke ko +5 20 aa ii uu ee oo +6 20 ka ki ku ke ko +7 20 aa ii uu ee oo +8 20 ka ki ku ke ko +select * from t1 where c1 = 4 and not match(c3) against("uu"); +c1 c2 c3 +4 10 ka ki ku ke ko +select * from t1 where c1 <= 4 and not match(c3) against("uu"); +c1 c2 c3 +2 10 ka ki ku ke ko +4 10 ka ki ku ke ko +select * from t1 where c1 > 4 and not match(c3) against("uu"); +c1 c2 c3 +6 20 ka ki ku ke ko +8 20 ka ki ku ke ko +select * from t1 where c2 = 10 and not match(c3) against("uu"); +c1 c2 c3 +2 10 ka ki ku ke ko +4 10 ka ki ku ke ko +select * from t1 where c2 >= 15 and not match(c3) against("uu"); +c1 c2 c3 +6 20 ka ki ku ke ko +8 20 ka ki ku ke ko +select * from t1 where c2 < 15 and not match(c3) against("uu"); +c1 c2 c3 +2 10 ka ki ku ke ko +4 10 ka ki ku ke ko +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_not_match_against.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_not_match_against.result new file mode 100644 index 00000000000..bbe23df3e0f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_not_match_against.result @@ -0,0 +1,68 @@ +drop table if exists t1, t2, t3; +create table t1 (c1 int primary key, c2 int, c3 text, fulltext index ft(c3)) COMMENT = 'engine "innodb"'; +insert into t1 values(1,10,"aa ii uu ee oo"); +insert into t1 values(2,10,"ka ki ku ke ko"); +insert into t1 values(3,10,"aa ii uu ee oo"); +insert into t1 values(4,10,"ka ki ku ke ko"); +insert into t1 values(5,20,"aa ii uu ee oo"); +insert into t1 values(6,20,"ka ki ku ke ko"); +insert into t1 values(7,20,"aa ii uu ee oo"); +insert into t1 values(8,20,"ka ki ku ke ko"); +select * from t1; +c1 c2 c3 +1 10 aa ii uu ee oo +2 10 ka ki ku ke ko +3 10 aa ii uu ee oo +4 10 ka ki ku ke ko +5 20 aa ii uu ee oo +6 20 ka ki ku ke ko +7 20 aa ii uu ee oo +8 20 ka ki ku ke ko +select *,match(c3) against("uu") from t1 where match(c3) against("uu"); +c1 c2 c3 match(c3) against("uu") +1 10 aa ii uu ee oo 131073 +3 10 aa ii uu ee oo 131073 +5 20 aa ii uu ee oo 131073 +7 20 aa ii uu ee oo 131073 +select * from t1 where not match(c3) against("uu"); +c1 c2 c3 +2 10 ka ki ku ke ko +4 10 ka ki ku ke ko +6 20 ka ki ku ke ko +8 20 ka ki ku ke ko +select *,match(c3) against("dummy") from t1 where match(c3) against("dummy"); +c1 c2 c3 match(c3) against("dummy") +select * from t1 where not match(c3) against("dummy"); +c1 c2 c3 +1 10 aa ii uu ee oo +2 10 ka ki ku ke ko +3 10 aa ii uu ee oo +4 10 ka ki ku ke ko +5 20 aa ii uu ee oo +6 20 ka ki ku ke ko +7 20 aa ii uu ee oo +8 20 ka ki ku ke ko +select * from t1 where c1 = 4 and not match(c3) against("uu"); +c1 c2 c3 +4 10 ka ki ku ke ko +select * from t1 where c1 <= 4 and not match(c3) against("uu"); +c1 c2 c3 +2 10 ka ki ku ke ko +4 10 ka ki ku ke ko +select * from t1 where c1 > 4 and not match(c3) against("uu"); +c1 c2 c3 +6 20 ka ki ku ke ko +8 20 ka ki ku ke ko +select * from t1 where c2 = 10 and not match(c3) against("uu"); +c1 c2 c3 +2 10 ka ki ku ke ko +4 10 ka ki ku ke ko +select * from t1 where c2 >= 15 and not match(c3) against("uu"); +c1 c2 c3 +6 20 ka ki ku ke ko +8 20 ka ki ku ke ko +select * from t1 where c2 < 15 and not match(c3) against("uu"); +c1 c2 c3 +2 10 ka ki ku ke ko +4 10 ka ki ku ke ko +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_order_TODO_SPLIT_ME.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_order_TODO_SPLIT_ME.result new file mode 100644 index 00000000000..279ad8bf985 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_order_TODO_SPLIT_ME.result @@ -0,0 +1,50 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES UTF8; +CREATE TABLE ft( +a INT, +b TEXT, +c TEXT, +PRIMARY KEY(a), +FULLTEXT KEY ftx1(b), +FULLTEXT KEY ftx2(c) +)ENGINE=Mroonga DEFAULT CHARSET=UTF8 COMMENT = 'engine "innodb"'; +SHOW CREATE TABLE ft; +Table Create Table +ft CREATE TABLE `ft` ( + `a` int(11) NOT NULL DEFAULT '0', + `b` text, + `c` text, + PRIMARY KEY (`a`), + FULLTEXT KEY `ftx1` (`b`), + FULLTEXT KEY `ftx2` (`c`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"' +INSERT INTO ft VALUES(1,'aaaaa','abcde'); +INSERT INTO ft VALUES(2,'bbbbb','bcdef'); +INSERT INTO ft VALUES(3,'ccccc','cdefg'); +INSERT INTO ft VALUES(4,'ddddd','defgh'); +INSERT INTO ft VALUES(5,'eeeee','efghi'); +SELECT a, b, c FROM ft WHERE MATCH(b) AGAINST('bbbbb' IN BOOLEAN MODE); +a b c +2 bbbbb bcdef +SELECT a, b, c FROM ft WHERE MATCH(b) AGAINST('bbbbb' IN BOOLEAN MODE) ORDER BY MATCH(b) AGAINST('bbbbb' IN BOOLEAN MODE); +a b c +2 bbbbb bcdef +SELECT a, b, c FROM ft WHERE MATCH(b) AGAINST('bbbbb' IN BOOLEAN MODE) ORDER BY MATCH(c) AGAINST('bbbbb' IN BOOLEAN MODE); +a b c +2 bbbbb bcdef +SELECT a, b, c FROM ft WHERE MATCH(c) AGAINST('bbbbb' IN BOOLEAN MODE); +a b c +SELECT a, b, c, MATCH(b) AGAINST('bbbbb' IN BOOLEAN MODE), MATCH(c) AGAINST('bbbbb' IN BOOLEAN MODE) FROM ft WHERE MATCH(b) AGAINST('bbbbb' IN BOOLEAN MODE) ORDER BY MATCH(c) AGAINST('bbbbb' IN BOOLEAN MODE); +a b c MATCH(b) AGAINST('bbbbb' IN BOOLEAN MODE) MATCH(c) AGAINST('bbbbb' IN BOOLEAN MODE) +2 bbbbb bcdef 1 0 +SELECT a, b, c, MATCH(b) AGAINST('bbbbb' IN BOOLEAN MODE), MATCH(c) AGAINST('bbbbb' IN BOOLEAN MODE) FROM ft WHERE MATCH(b) AGAINST('bbbbb' IN BOOLEAN MODE); +a b c MATCH(b) AGAINST('bbbbb' IN BOOLEAN MODE) MATCH(c) AGAINST('bbbbb' IN BOOLEAN MODE) +2 bbbbb bcdef 1 0 +SELECT a, b, c, MATCH(b) AGAINST('bbbbb' IN BOOLEAN MODE), MATCH(c) AGAINST('bbbbb' IN BOOLEAN MODE) FROM ft ORDER BY MATCH(c) AGAINST('bbbbb' IN BOOLEAN MODE), MATCH(b) AGAINST('bbbbb' IN BOOLEAN MODE), a; +a b c MATCH(b) AGAINST('bbbbb' IN BOOLEAN MODE) MATCH(c) AGAINST('bbbbb' IN BOOLEAN MODE) +1 aaaaa abcde 0 0 +3 ccccc cdefg 0 0 +4 ddddd defgh 0 0 +5 eeeee efghi 0 0 +2 bbbbb bcdef 1 0 +DROP TABLE ft; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_order_transaction.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_order_transaction.result new file mode 100644 index 00000000000..3da64b2de1f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_order_transaction.result @@ -0,0 +1,50 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +body TEXT, +FULLTEXT INDEX title_index (title), +FULLTEXT INDEX body_index (body) +) COMMENT = 'ENGINE "InnoDB"' DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `body` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `title_index` (`title`), + FULLTEXT KEY `body_index` (`body`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' +START TRANSACTION; +INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); +INSERT INTO diaries (title, body) VALUES ("groonga (1)", "starting groonga..."); +INSERT INTO diaries (title, body) VALUES ("groonga (2)", "started groonga."); +SELECT * FROM diaries +WHERE MATCH(body) AGAINST("groonga") +ORDER BY id; +id title body +1 survey will start groonga! +2 groonga (1) starting groonga... +3 groonga (2) started groonga. +USE test; +SELECT * FROM diaries +WHERE MATCH(body) AGAINST("groonga") +ORDER BY id; +id title body +COMMIT; +SELECT * FROM diaries +WHERE MATCH(body) AGAINST("groonga") +ORDER BY id; +id title body +1 survey will start groonga! +2 groonga (1) starting groonga... +3 groonga (2) started groonga. +SELECT * FROM diaries +WHERE MATCH(body) AGAINST("groonga") +ORDER BY id; +id title body +1 survey will start groonga! +2 groonga (1) starting groonga... +3 groonga (2) started groonga. +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_parser_comment.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_parser_comment.result new file mode 100644 index 00000000000..d7b20a3714f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_parser_comment.result @@ -0,0 +1,29 @@ +drop table if exists diaries; +create table diaries ( +id int primary key auto_increment, +body text, +fulltext index body_index (body) +comment 'parser "TokenBigramSplitSymbolAlphaDigit"' +) comment = 'engine "innodb"' default charset utf8; +show create table diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `body` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `body_index` (`body`) COMMENT 'parser "TokenBigramSplitSymbolAlphaDigit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"' +insert into diaries (body) values ("will start groonga!"); +insert into diaries (body) values ("starting groonga..."); +insert into diaries (body) values ("started groonga."); +select * from diaries; +id body +1 will start groonga! +2 starting groonga... +3 started groonga. +select * from diaries where match(body) against("start"); +id body +1 will start groonga! +2 starting groonga... +3 started groonga. +drop table diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/function_last_insert_grn_id.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/function_last_insert_grn_id.result new file mode 100644 index 00000000000..9edbd3c9b3b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/function_last_insert_grn_id.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS ids; +DROP FUNCTION IF EXISTS last_insert_grn_id; +CREATE TABLE ids ( +id int AUTO_INCREMENT PRIMARY KEY +) COMMENT='ENGINE "InnoDB"'; +SELECT last_insert_grn_id(); +last_insert_grn_id() +0 +INSERT INTO ids VALUES(); +SELECT last_insert_grn_id(); +last_insert_grn_id() +0 +SELECT * FROM ids; +id +1 +DROP TABLE ids; +DROP FUNCTION last_insert_grn_id; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/function_last_insert_id_reference.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/function_last_insert_id_reference.result new file mode 100644 index 00000000000..d31d5454169 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/function_last_insert_id_reference.result @@ -0,0 +1,15 @@ +DROP TABLE IF EXISTS ids; +CREATE TABLE ids ( +id int AUTO_INCREMENT PRIMARY KEY +) COMMENT='ENGINE "InnoDB"'; +SELECT last_insert_id(); +last_insert_id() +0 +INSERT INTO ids VALUES(); +SELECT last_insert_id(); +last_insert_id() +1 +SELECT * FROM ids; +id +1 +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/function_last_insert_id_set.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/function_last_insert_id_set.result new file mode 100644 index 00000000000..39791b93ba2 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/function_last_insert_id_set.result @@ -0,0 +1,21 @@ +DROP TABLE IF EXISTS ids; +CREATE TABLE ids ( +id int AUTO_INCREMENT PRIMARY KEY +) COMMENT='ENGINE "InnoDB"'; +SELECT last_insert_id(); +last_insert_id() +0 +SELECT last_insert_id(10); +last_insert_id(10) +10 +SELECT last_insert_id(); +last_insert_id() +10 +INSERT INTO ids VALUES(); +SELECT last_insert_id(); +last_insert_id() +1 +SELECT * FROM ids; +id +1 +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/geometry_contains.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/geometry_contains.result new file mode 100644 index 00000000000..29163384e6a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/geometry_contains.result @@ -0,0 +1,169 @@ +drop table if exists shops; +create table shops ( +id int primary key auto_increment, +name text, +location geometry NOT NULL, +spatial key location_index (location) +) comment = 'engine "innodb"'; +show create table shops; +Table Create Table +shops CREATE TABLE `shops` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` text, + `location` geometry NOT NULL, + PRIMARY KEY (`id`), + SPATIAL KEY `location_index` (`location`) +) ENGINE=Mroonga DEFAULT CHARSET=latin1 COMMENT='engine "innodb"' +insert into shops (name, location) +values ('nezu-no-taiyaki', +GeomFromText('POINT(139.762573 35.720253)')); +insert into shops (name, location) +values ('taiyaki-kataoka', +GeomFromText('POINT(139.715591 35.712521)')); +insert into shops (name, location) +values ('soba-taiyaki-ku', +GeomFromText('POINT(139.659088 35.683712)')); +insert into shops (name, location) +values ('kuruma', +GeomFromText('POINT(139.706207 35.721516)')); +insert into shops (name, location) +values ('hirose-ya', +GeomFromText('POINT(139.685608 35.714844)')); +insert into shops (name, location) +values ('sazare', +GeomFromText('POINT(139.685043 35.714653)')); +insert into shops (name, location) +values ('omede-taiyaki', +GeomFromText('POINT(139.817154 35.700516)')); +insert into shops (name, location) +values ('onaga-ya', +GeomFromText('POINT(139.81105 35.698254)')); +insert into shops (name, location) +values ('shiro-ya', +GeomFromText('POINT(139.638611 35.705517)')); +insert into shops (name, location) +values ('fuji-ya', +GeomFromText('POINT(139.637115 35.703938)')); +insert into shops (name, location) +values ('miyoshi', +GeomFromText('POINT(139.537323 35.644539)')); +insert into shops (name, location) +values ('juju-ya', +GeomFromText('POINT(139.695755 35.628922)')); +insert into shops (name, location) +values ('tatsumi-ya', +GeomFromText('POINT(139.638657 35.665501)')); +insert into shops (name, location) +values ('tetsuji', +GeomFromText('POINT(139.76857 35.680912)')); +insert into shops (name, location) +values ('gazuma-ya', +GeomFromText('POINT(139.647598 35.700817)')); +insert into shops (name, location) +values ('honma-mon', +GeomFromText('POINT(139.652573 35.722736)')); +insert into shops (name, location) +values ('naniwa-ya', +GeomFromText('POINT(139.796234 35.730061)')); +insert into shops (name, location) +values ('kuro-dai', +GeomFromText('POINT(139.704834 35.650345)')); +insert into shops (name, location) +values ('daruma', +GeomFromText('POINT(139.770599 35.681461)')); +insert into shops (name, location) +values ('yanagi-ya', +GeomFromText('POINT(139.783981 35.685341)')); +insert into shops (name, location) +values ('sharaku', +GeomFromText('POINT(139.794846 35.716969)')); +insert into shops (name, location) +values ('takane', +GeomFromText('POINT(139.560913 35.698601)')); +insert into shops (name, location) +values ('chiyoda', +GeomFromText('POINT(139.652817 35.642601)')); +insert into shops (name, location) +values ('da-ka-po', +GeomFromText('POINT(139.727356 35.627346)')); +insert into shops (name, location) +values ('matsushima-ya', +GeomFromText('POINT(139.737381 35.640556)')); +insert into shops (name, location) +values ('kazuya', +GeomFromText('POINT(139.760895 35.673508)')); +insert into shops (name, location) +values ('furuya-kogane-an', +GeomFromText('POINT(139.676071 35.680603)')); +insert into shops (name, location) +values ('hachi-no-ie', +GeomFromText('POINT(139.668106 35.608021)')); +insert into shops (name, location) +values ('azuki-chan', +GeomFromText('POINT(139.673203 35.64151)')); +insert into shops (name, location) +values ('kuriko-an', +GeomFromText('POINT(139.796829 35.712013)')); +insert into shops (name, location) +values ('yume-no-aru-machi-no-taiyaki-ya-san', +GeomFromText('POINT(139.712524 35.616199)')); +insert into shops (name, location) +values ('naze-ya', +GeomFromText('POINT(139.665833 35.609039)')); +insert into shops (name, location) +values ('sanoki-ya', +GeomFromText('POINT(139.770721 35.66592)')); +insert into shops (name, location) +values ('shigeta', +GeomFromText('POINT(139.780273 35.672626)')); +insert into shops (name, location) +values ('nishimi-ya', +GeomFromText('POINT(139.774628 35.671825)')); +insert into shops (name, location) +values ('hiiragi', +GeomFromText('POINT(139.711517 35.647701)')); +select id, name, AsText(location) as location_text from shops; +id name location_text +1 nezu-no-taiyaki POINT(139.762573 35.720253) +2 taiyaki-kataoka POINT(139.715591 35.712521) +3 soba-taiyaki-ku POINT(139.659088 35.683712) +4 kuruma POINT(139.706207 35.721516) +5 hirose-ya POINT(139.685608 35.714844) +6 sazare POINT(139.685043 35.714653) +7 omede-taiyaki POINT(139.817154 35.700516) +8 onaga-ya POINT(139.81105 35.698254) +9 shiro-ya POINT(139.638611 35.705517) +10 fuji-ya POINT(139.637115 35.703938) +11 miyoshi POINT(139.537323 35.644539) +12 juju-ya POINT(139.695755 35.628922) +13 tatsumi-ya POINT(139.638657 35.665501) +14 tetsuji POINT(139.76857 35.680912) +15 gazuma-ya POINT(139.647598 35.700817) +16 honma-mon POINT(139.652573 35.722736) +17 naniwa-ya POINT(139.796234 35.730061) +18 kuro-dai POINT(139.704834 35.650345) +19 daruma POINT(139.770599 35.681461) +20 yanagi-ya POINT(139.783981 35.685341) +21 sharaku POINT(139.794846 35.716969) +22 takane POINT(139.560913 35.698601) +23 chiyoda POINT(139.652817 35.642601) +24 da-ka-po POINT(139.727356 35.627346) +25 matsushima-ya POINT(139.737381 35.640556) +26 kazuya POINT(139.760895 35.673508) +27 furuya-kogane-an POINT(139.676071 35.680603) +28 hachi-no-ie POINT(139.668106 35.608021) +29 azuki-chan POINT(139.673203 35.64151) +30 kuriko-an POINT(139.796829 35.712013) +31 yume-no-aru-machi-no-taiyaki-ya-san POINT(139.712524 35.616199) +32 naze-ya POINT(139.665833 35.609039) +33 sanoki-ya POINT(139.770721 35.66592) +34 shigeta POINT(139.780273 35.672626) +35 nishimi-ya POINT(139.774628 35.671825) +36 hiiragi POINT(139.711517 35.647701) +select id, name, AsText(location) as location_text from shops +where MBRContains(GeomFromText('LineString(139.7727 35.6684, 139.7038 35.7121)'), location); +id name location_text +14 tetsuji POINT(139.76857 35.680912) +19 daruma POINT(139.770599 35.681461) +26 kazuya POINT(139.760895 35.673508) +drop table shops; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/geometry_delete.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/geometry_delete.result new file mode 100644 index 00000000000..53aa00ecbab --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/geometry_delete.result @@ -0,0 +1,31 @@ +drop table if exists shops; +create table shops ( +id int primary key auto_increment, +name text, +location geometry NOT NULL, +spatial key location_index (location) +) comment = 'engine "innodb"'; +show create table shops; +Table Create Table +shops CREATE TABLE `shops` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` text, + `location` geometry NOT NULL, + PRIMARY KEY (`id`), + SPATIAL KEY `location_index` (`location`) +) ENGINE=Mroonga DEFAULT CHARSET=latin1 COMMENT='engine "innodb"' +insert into shops (name, location) +values ('sazare', +GeomFromText('POINT(139.685043 35.714653)')); +select id, name, AsText(location) as location_text from shops +where MBRContains(GeomFromText('LineString(139.68466 35.71592, 139.68804 35.71411)'), location); +id name location_text +1 sazare POINT(139.685043 35.714653) +delete from shops +where MBRContains(GeomFromText('LineString(139.68466 35.71592, 139.68804 35.71411)'), location); +select id, name, AsText(location) as location_text from shops +where MBRContains(GeomFromText('LineString(139.68466 35.71592, 139.68804 35.71411)'), location); +id name location_text +select id, name, AsText(location) as location_text from shops; +id name location_text +drop table shops; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/geometry_update.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/geometry_update.result new file mode 100644 index 00000000000..e982e0b95ce --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/geometry_update.result @@ -0,0 +1,36 @@ +drop table if exists shops; +create table shops ( +id int primary key auto_increment, +name text, +location geometry NOT NULL, +spatial key location_index (location) +) comment = 'engine "innodb"'; +show create table shops; +Table Create Table +shops CREATE TABLE `shops` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` text, + `location` geometry NOT NULL, + PRIMARY KEY (`id`), + SPATIAL KEY `location_index` (`location`) +) ENGINE=Mroonga DEFAULT CHARSET=latin1 COMMENT='engine "innodb"' +insert into shops (name, location) +values ('sazare', +GeomFromText('POINT(139.685043 35.714653)')); +select id, name, AsText(location) as location_text from shops +where MBRContains(GeomFromText('LineString(139.68466 35.71592, 139.68804 35.71411)'), location); +id name location_text +1 sazare POINT(139.685043 35.714653) +select id, name, AsText(location) as location_text from shops +where MBRContains(GeomFromText('LineString(139.65659 35.57903, 139.66489 35.57262)'), location); +id name location_text +update shops set location = GeomFromText('POINT(139.66116 35.57566)') +where name = 'sazare'; +select id, name, AsText(location) as location_text from shops +where MBRContains(GeomFromText('LineString(139.68466 35.71592, 139.68804 35.71411)'), location); +id name location_text +select id, name, AsText(location) as location_text from shops +where MBRContains(GeomFromText('LineString(139.65659 35.57903, 139.66489 35.57262)'), location); +id name location_text +1 sazare POINT(139.66116 35.57566) +drop table shops; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/index_force_index_not_used.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/index_force_index_not_used.result new file mode 100644 index 00000000000..3fbc85ff051 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/index_force_index_not_used.result @@ -0,0 +1,8 @@ +DROP TABLE IF EXISTS ids; +CREATE TABLE ids ( +id INT PRIMARY KEY AUTO_INCREMENT +) DEFAULT CHARSET UTF8 COMMENT = 'engine "InnoDB"'; +SELECT COUNT(*) FROM ids FORCE INDEX(PRIMARY); +COUNT(*) +0 +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/insert_TODO_SPLIT_ME.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/insert_TODO_SPLIT_ME.result new file mode 100644 index 00000000000..93c05bff080 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/insert_TODO_SPLIT_ME.result @@ -0,0 +1,78 @@ +drop table if exists t1, t2, t3; +create table t1 (c1 tinyint primary key) COMMENT = 'engine "innodb"'; +insert into t1 values(1); +select * from t1; +c1 +1 +drop table t1; +create table t1 (c1 smallint primary key) COMMENT = 'engine "innodb"'; +insert into t1 values(1); +select * from t1; +c1 +1 +drop table t1; +create table t1 (c1 mediumint primary key) COMMENT = 'engine "innodb"'; +insert into t1 values(1); +select * from t1; +c1 +1 +drop table t1; +create table t1 (c1 int primary key) COMMENT = 'engine "innodb"'; +insert into t1 values(1); +select * from t1; +c1 +1 +drop table t1; +create table t1 (c1 bigint primary key) COMMENT = 'engine "innodb"'; +insert into t1 values(1); +select * from t1; +c1 +1 +drop table t1; +create table t1 (c1 float primary key) COMMENT = 'engine "innodb"'; +insert into t1 values(0.5); +select * from t1; +c1 +0.5 +drop table t1; +create table t1 (c1 double primary key) COMMENT = 'engine "innodb"'; +insert into t1 values(0.5); +select * from t1; +c1 +0.5 +drop table t1; +create table t1 (c1 date primary key) COMMENT = 'engine "innodb"'; +insert into t1 values("2010/03/26"); +select * from t1; +c1 +2010-03-26 +drop table t1; +create table t1 (c1 time primary key) COMMENT = 'engine "innodb"'; +insert into t1 values("11:22:33"); +select * from t1; +c1 +11:22:33 +drop table t1; +create table t1 (c1 year primary key) COMMENT = 'engine "innodb"'; +insert into t1 values("2010"); +select * from t1; +c1 +2010 +drop table t1; +create table t1 (c1 datetime primary key) COMMENT = 'engine "innodb"'; +insert into t1 values("2010/03/26 11:22:33"); +select * from t1; +c1 +2010-03-26 11:22:33 +drop table t1; +create table t1 (c1 int primary key, c2 int) COMMENT = 'engine "innodb"'; +insert into t1 values(1,100); +select * from t1; +c1 c2 +1 100 +insert into t1 values(1,200); +ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +select * from t1; +c1 c2 +1 100 +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/insert_bulk.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/insert_bulk.result new file mode 100644 index 00000000000..be61419477f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/insert_bulk.result @@ -0,0 +1,30 @@ +drop table if exists diaries; +set names utf8; +create table diaries ( +id int primary key, +content text, +fulltext index (content) +) default charset utf8 comment = 'engine "innodb"'; +show create table diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL, + `content` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"' +LOCK TABLE diaries WRITE; +insert into diaries values(1, "今日からはじめました。"); +insert into diaries values(2, "明日の富士山の天気について"); +insert into diaries values(3, "今日も天気がよくてきれいに見える。"); +UNLOCK TABLES; +select * from diaries; +id content +1 今日からはじめました。 +2 明日の富士山の天気について +3 今日も天気がよくてきれいに見える。 +select * from diaries where match(content) against("天気"); +id content +2 明日の富士山の天気について +3 今日も天気がよくてきれいに見える。 +drop table diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/insert_on_duplicate_key_update_multiple_column_primary_key_myisam.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/insert_on_duplicate_key_update_multiple_column_primary_key_myisam.result new file mode 100644 index 00000000000..f0ceb937a01 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/insert_on_duplicate_key_update_multiple_column_primary_key_myisam.result @@ -0,0 +1,36 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +date TIMESTAMP NOT NULL, +title VARCHAR(100) NOT NULL, +content TEXT NOT NULL, +PRIMARY KEY (date, title) +) DEFAULT CHARSET=UTF8 COMMENT='ENGINE "MyISAM"'; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `title` varchar(100) NOT NULL, + `content` text NOT NULL, + PRIMARY KEY (`date`,`title`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "MyISAM"' +INSERT INTO diaries (date, title, content) +VALUES ("2012-03-04", "cloudy day", "Today is cloudy day..."); +INSERT INTO diaries (date, title, content) +VALUES ("2012-03-04", "shopping", "I buy a new shirt."); +INSERT INTO diaries (date, title, content) +VALUES ("2012-03-05", "rainy day", "Today is rainy day..."); +SELECT * FROM diaries; +date title content +2012-03-04 00:00:00 cloudy day Today is cloudy day... +2012-03-04 00:00:00 shopping I buy a new shirt. +2012-03-05 00:00:00 rainy day Today is rainy day... +INSERT INTO diaries (date, title, content) +VALUES ("2012-03-04", "shopping", "I buy new shoes.") +ON DUPLICATE KEY UPDATE date = "2012-03-03", +content = "I buy a new hat."; +SELECT * FROM diaries; +date title content +2012-03-04 00:00:00 cloudy day Today is cloudy day... +2012-03-03 00:00:00 shopping I buy a new hat. +2012-03-05 00:00:00 rainy day Today is rainy day... +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/insert_on_duplicate_key_update_multiple_column_unique_index_myisam.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/insert_on_duplicate_key_update_multiple_column_unique_index_myisam.result new file mode 100644 index 00000000000..97428b768a6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/insert_on_duplicate_key_update_multiple_column_unique_index_myisam.result @@ -0,0 +1,39 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +date TIMESTAMP NOT NULL, +title VARCHAR(100) NOT NULL, +content TEXT NOT NULL, +UNIQUE INDEX (date, title) +) DEFAULT CHARSET=UTF8 COMMENT='ENGINE "MyISAM"'; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `title` varchar(100) NOT NULL, + `content` text NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `date` (`date`,`title`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "MyISAM"' +INSERT INTO diaries (date, title, content) +VALUES ("2012-03-04", "cloudy day", "Today is cloudy day..."); +INSERT INTO diaries (date, title, content) +VALUES ("2012-03-04", "shopping", "I buy a new shirt."); +INSERT INTO diaries (date, title, content) +VALUES ("2012-03-05", "rainy day", "Today is rainy day..."); +SELECT * FROM diaries; +id date title content +1 2012-03-04 00:00:00 cloudy day Today is cloudy day... +2 2012-03-04 00:00:00 shopping I buy a new shirt. +3 2012-03-05 00:00:00 rainy day Today is rainy day... +INSERT INTO diaries (date, title, content) +VALUES ("2012-03-04", "shopping", "I buy new shoes.") +ON DUPLICATE KEY UPDATE date = "2012-03-03", +content = "I buy a new hat."; +SELECT * FROM diaries; +id date title content +1 2012-03-04 00:00:00 cloudy day Today is cloudy day... +2 2012-03-03 00:00:00 shopping I buy a new hat. +3 2012-03-05 00:00:00 rainy day Today is rainy day... +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/multi_range_read_disk_sweep.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/multi_range_read_disk_sweep.result new file mode 100644 index 00000000000..aa7a32dbd3a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/multi_range_read_disk_sweep.result @@ -0,0 +1,18 @@ +DROP TABLE IF EXISTS integers; +SET optimizer_switch='mrr_cost_based=off'; +CREATE TABLE integers ( +id INT PRIMARY KEY AUTO_INCREMENT, +value INT, +KEY (value) +) COMMENT='engine "InnoDB"'; +INSERT INTO integers (value) VALUES (0), (1), (2), (3); +EXPLAIN SELECT * FROM integers +WHERE value IN (0, 2); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE integers range value value 5 NULL 2 Using where; Using MRR +SELECT * FROM integers +WHERE value IN (0, 2); +id value +1 0 +3 2 +DROP TABLE integers; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/optimization_order_limit_TODO_SPLIT_ME.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/optimization_order_limit_TODO_SPLIT_ME.result new file mode 100644 index 00000000000..5f43aee6997 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/optimization_order_limit_TODO_SPLIT_ME.result @@ -0,0 +1,67 @@ +drop table if exists t1; +flush status; +create table t1 ( +c1 int primary key, +c2 int, +c3 text, +key idx1(c2), +fulltext index ft(c3) +) comment = 'engine "innodb"'; +insert into t1 values(1,10,"aa ii uu ee oo"); +insert into t1 values(2,20,"ka ki ku ke ko"); +insert into t1 values(3,30,"ii si ii se ii"); +insert into t1 values(4,40,"ta ti tu te to"); +insert into t1 values(5,50,"aa ii uu ii oo"); +select *, match(c3) against("ii") from t1 +where match(c3) against("ii") order by c1 desc limit 1; +c1 c2 c3 match(c3) against("ii") +5 50 aa ii uu ii oo 349526 +show status like 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 0 +select *, match(c3) against("ii") from t1 +where match(c3) against("ii") order by c1 limit 1; +c1 c2 c3 match(c3) against("ii") +1 10 aa ii uu ee oo 174763 +show status like 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 0 +select c3, match(c3) against("ii") from t1 +where match(c3) against("ii") order by match(c3) against("ii") desc; +c3 match(c3) against("ii") +ii si ii se ii 524289 +aa ii uu ii oo 349526 +aa ii uu ee oo 174763 +show status like 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 0 +select c3, match(c3) against("ii") from t1 +where match(c3) against("ii") order by match(c3) against("ii") desc limit 1, 1; +c3 match(c3) against("ii") +aa ii uu ii oo 349526 +show status like 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 1 +select c3, match(c3) against("ii") from t1 +where match(c3) against("ii") order by match(c3) against("ii"); +c3 match(c3) against("ii") +aa ii uu ee oo 174763 +aa ii uu ii oo 349526 +ii si ii se ii 524289 +show status like 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 1 +select c3, match(c3) against("ii") from t1 +where match(c3) against("ii") order by match(c3) against("ii") limit 1; +c3 match(c3) against("ii") +aa ii uu ee oo 174763 +show status like 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 2 +select count(*) from t1 where match(c3) against("ii") limit 1; +count(*) +3 +show status like 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 2 +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/optimization_order_limit_no_where_clause.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/optimization_order_limit_no_where_clause.result new file mode 100644 index 00000000000..b31d2ee5360 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/optimization_order_limit_no_where_clause.result @@ -0,0 +1,24 @@ +drop table if exists t1; +flush status; +create table t1 ( +c1 int primary key, +c2 int, +c3 text, +key idx1(c2), +fulltext index ft(c3) +) comment = 'engine "innodb"'; +insert into t1 values(1,10,"aa ii uu ee oo"); +insert into t1 values(2,20,"ka ki ku ke ko"); +insert into t1 values(3,30,"ii si ii se ii"); +insert into t1 values(4,40,"ta ti tu te to"); +insert into t1 values(5,50,"aa ii uu ii oo"); +show status like 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 0 +select *, match(c3) against("ii") from t1 order by c1 desc limit 1; +c1 c2 c3 match(c3) against("ii") +5 50 aa ii uu ii oo 349526 +show status like 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 1 +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/repair_table_no_files.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/repair_table_no_files.result new file mode 100644 index 00000000000..87a4fea1c3d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/repair_table_no_files.result @@ -0,0 +1,42 @@ +DROP DATABASE IF EXISTS repair_test; +CREATE DATABASE repair_test; +USE repair_test; +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +body TEXT, +FULLTEXT INDEX body_index (body) +) COMMENT = 'engine "innodb"' DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `body` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `body_index` (`body`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"' +INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); +INSERT INTO diaries (title, body) VALUES ("groonga (1)", "starting groonga..."); +INSERT INTO diaries (title, body) VALUES ("groonga (2)", "started groonga."); +SELECT * FROM diaries WHERE MATCH(body) AGAINST("starting"); +id title body +2 groonga (1) starting groonga... +FLUSH TABLES; +SELECT * FROM diaries WHERE MATCH(body) AGAINST("starting"); +ERROR HY000: syscall error 'repair_test.mrn' (No such file or directory) +REPAIR TABLE diaries; +Table Op Msg_type Msg_text +repair_test.diaries repair status OK +SELECT * FROM diaries; +id title body +1 survey will start groonga! +2 groonga (1) starting groonga... +3 groonga (2) started groonga. +SELECT * FROM diaries WHERE MATCH(body) AGAINST("starting"); +id title body +2 groonga (1) starting groonga... +DROP TABLE diaries; +DROP DATABASE repair_test; +USE test; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/repair_table_no_index_file.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/repair_table_no_index_file.result new file mode 100644 index 00000000000..140b5a92b75 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/repair_table_no_index_file.result @@ -0,0 +1,42 @@ +DROP DATABASE IF EXISTS repair_test; +CREATE DATABASE repair_test; +USE repair_test; +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +body TEXT, +FULLTEXT INDEX body_index (body) +) COMMENT = 'engine "innodb"' DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `body` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `body_index` (`body`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"' +INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); +INSERT INTO diaries (title, body) VALUES ("groonga (1)", "starting groonga..."); +INSERT INTO diaries (title, body) VALUES ("groonga (2)", "started groonga."); +SELECT * FROM diaries WHERE MATCH(body) AGAINST("starting"); +id title body +2 groonga (1) starting groonga... +FLUSH TABLES; +SELECT * FROM diaries WHERE MATCH(body) AGAINST("starting"); +ERROR HY000: syscall error 'repair_test.mrn.0000104' (No such file or directory) +REPAIR TABLE diaries; +Table Op Msg_type Msg_text +repair_test.diaries repair status OK +SELECT * FROM diaries; +id title body +1 survey will start groonga! +2 groonga (1) starting groonga... +3 groonga (2) started groonga. +SELECT * FROM diaries WHERE MATCH(body) AGAINST("starting"); +id title body +2 groonga (1) starting groonga... +DROP TABLE diaries; +DROP DATABASE repair_test; +USE test; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/temporary_table.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/temporary_table.result new file mode 100644 index 00000000000..b01e85aa483 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/temporary_table.result @@ -0,0 +1,21 @@ +DROP TEMPORARY TABLE IF EXISTS diaries; +CREATE TEMPORARY TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT +) DEFAULT CHARSET=UTF8 COMMENT = 'ENGINE "InnoDB"'; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TEMPORARY TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' +INSERT INTO diaries (title) VALUES ("clear day"); +INSERT INTO diaries (title) VALUES ("rainy day"); +INSERT INTO diaries (title) VALUES ("cloudy day"); +SELECT * FROM diaries; +id title +1 clear day +2 rainy day +3 cloudy day +DROP TEMPORARY TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/transaction_query_cache.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/transaction_query_cache.result new file mode 100644 index 00000000000..54afac7a1a7 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/transaction_query_cache.result @@ -0,0 +1,28 @@ +SET @tmp_query_cache_size = @@query_cache_size; +SET GLOBAL query_cache_size = 1048576; +DROP TABLE IF EXISTS simple_table; +CREATE TABLE simple_table ( +id INT PRIMARY KEY +) COMMENT = 'ENGINE "InnoDB"' DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE simple_table; +Table Create Table +simple_table CREATE TABLE `simple_table` ( + `id` int(11) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' +INSERT INTO simple_table (id) VALUES (1),(2); +USE test; +START TRANSACTION; +INSERT INTO simple_table (id) VALUES (3); +SELECT * FROM simple_table; +id +1 +2 +COMMIT; +SELECT * FROM simple_table; +id +1 +2 +3 +DROP TABLE simple_table; +SET GLOBAL query_cache_size = @tmp_query_cache_size; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/transaction_rollback_delete_delete.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/transaction_rollback_delete_delete.result new file mode 100644 index 00000000000..11cc1874257 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/transaction_rollback_delete_delete.result @@ -0,0 +1,50 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +body TEXT, +FULLTEXT INDEX title_index (title), +FULLTEXT INDEX body_index (body) +) COMMENT = 'ENGINE "InnoDB"' DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `body` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `title_index` (`title`), + FULLTEXT KEY `body_index` (`body`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' +INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); +INSERT INTO diaries (title, body) VALUES ("groonga (1)", "starting groonga..."); +INSERT INTO diaries (title, body) VALUES ("groonga (2)", "started groonga."); +SELECT * FROM diaries +WHERE MATCH(title) AGAINST("survey") AND +MATCH(body) AGAINST("groonga"); +id title body +1 survey will start groonga! +START TRANSACTION; +DELETE FROM diaries WHERE id = 1; +ROLLBACK; +SELECT * FROM diaries; +id title body +1 survey will start groonga! +2 groonga (1) starting groonga... +3 groonga (2) started groonga. +SELECT * FROM diaries +WHERE MATCH(title) AGAINST("survey") AND +MATCH(body) AGAINST("groonga"); +id title body +DELETE FROM diaries WHERE id = 1; +Warnings: +Warning 1026 failed to get record ID for deleting from groonga: key=<> +SELECT * FROM diaries; +id title body +2 groonga (1) starting groonga... +3 groonga (2) started groonga. +SELECT * FROM diaries +WHERE MATCH(title) AGAINST("survey") AND +MATCH(body) AGAINST("groonga"); +id title body +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/transaction_rollback_delete_update.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/transaction_rollback_delete_update.result new file mode 100644 index 00000000000..7dde8518db0 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/transaction_rollback_delete_update.result @@ -0,0 +1,47 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +body TEXT, +FULLTEXT INDEX title_index (title), +FULLTEXT INDEX body_index (body) +) COMMENT = 'ENGINE "InnoDB"' DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `body` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `title_index` (`title`), + FULLTEXT KEY `body_index` (`body`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' +INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); +INSERT INTO diaries (title, body) VALUES ("groonga (1)", "starting groonga..."); +INSERT INTO diaries (title, body) VALUES ("groonga (2)", "started groonga."); +SELECT * FROM diaries +WHERE MATCH(title) AGAINST("survey"); +id title body +1 survey will start groonga! +START TRANSACTION; +DELETE FROM diaries WHERE id = 1; +ROLLBACK; +SELECT * FROM diaries; +id title body +1 survey will start groonga! +2 groonga (1) starting groonga... +3 groonga (2) started groonga. +SELECT * FROM diaries +WHERE MATCH(title) AGAINST("survey"); +id title body +UPDATE diaries SET title = "survey day!" WHERE id = 1; +SELECT * FROM diaries; +id title body +1 survey day! will start groonga! +2 groonga (1) starting groonga... +3 groonga (2) started groonga. +SELECT * FROM diaries +WHERE MATCH(title) AGAINST("survey"); +id title body +1 survey day! will start groonga! +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/truncate.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/truncate.result new file mode 100644 index 00000000000..35b273d348f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/truncate.result @@ -0,0 +1,55 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES UTF8; +CREATE TABLE diaries ( +id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, +year INT UNSIGNED, +month INT UNSIGNED, +day INT UNSIGNED, +title VARCHAR(255), +content TEXT, +FULLTEXT INDEX(content), +KEY(day) +) DEFAULT CHARSET UTF8 COMMENT = 'engine "innodb"'; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `year` int(10) unsigned DEFAULT NULL, + `month` int(10) unsigned DEFAULT NULL, + `day` int(10) unsigned DEFAULT NULL, + `title` varchar(255) DEFAULT NULL, + `content` text, + PRIMARY KEY (`id`), + KEY `day` (`day`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"' +INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気がよくてきれいに見える。"); +SELECT * FROM diaries; +id year month day title content +1 2011 11 9 Hello 今日からはじめました。 +2 2011 11 10 天気 明日の富士山の天気について +3 2011 11 11 富士山 今日も天気がよくてきれいに見える。 +SELECT * FROM diaries WHERE MATCH(content) AGAINST("今日 天気" IN BOOLEAN MODE); +id year month day title content +1 2011 11 9 Hello 今日からはじめました。 +3 2011 11 11 富士山 今日も天気がよくてきれいに見える。 +2 2011 11 10 天気 明日の富士山の天気について +TRUNCATE TABLE diaries; +SELECT * FROM diaries; +id year month day title content +SELECT * FROM diaries WHERE MATCH(content) AGAINST("今日 天気" IN BOOLEAN MODE); +id year month day title content +INSERT INTO diaries VALUES(1, 2011, 11, 11, "帰り道", "つかれたー"); +INSERT INTO diaries VALUES(2, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。"); +INSERT INTO diaries VALUES(3, 2011, 12, 2, "初雪", "今年はじめての雪!"); +SELECT * FROM diaries; +id year month day title content +1 2011 11 11 帰り道 つかれたー +2 2011 12 1 久しぶり 天気が悪いからずっと留守番。 +3 2011 12 2 初雪 今年はじめての雪! +SELECT * FROM diaries WHERE MATCH(content) AGAINST("悪い" IN BOOLEAN MODE); +id year month day title content +2 2011 12 1 久しぶり 天気が悪いからずっと留守番。 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/update_fulltext.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/update_fulltext.result new file mode 100644 index 00000000000..655d2424ba7 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/update_fulltext.result @@ -0,0 +1,33 @@ +drop table if exists t1, t2, t3; +create table t1 (c1 int primary key, c2 text, fulltext index (c2)) COMMENT = 'engine "innodb"'; +insert into t1 values(10, "aa ii uu ee"); +insert into t1 values(20, "ka ki ku ke"); +insert into t1 values(30, "sa si su se"); +select * from t1; +c1 c2 +10 aa ii uu ee +20 ka ki ku ke +30 sa si su se +update t1 set c2="ta ti tu te" where c1=20; +select * from t1; +c1 c2 +10 aa ii uu ee +20 ta ti tu te +30 sa si su se +select * from t1 where match(c2) against("ti"); +c1 c2 +20 ta ti tu te +select * from t1 where match(c2) against("ki"); +c1 c2 +update t1 set c1=40 where c1=20; +select * from t1; +c1 c2 +10 aa ii uu ee +30 sa si su se +40 ta ti tu te +select * from t1 where match(c2) against("ti"); +c1 c2 +40 ta ti tu te +select * from t1 where match(c2) against("ki"); +c1 c2 +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/update_int.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/update_int.result new file mode 100644 index 00000000000..5506f6b10b0 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/update_int.result @@ -0,0 +1,36 @@ +drop table if exists t1, t2, t3; +create table t1 (c1 int primary key, c2 int) COMMENT = 'engine "innodb"'; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(11) NOT NULL, + `c2` int(11) DEFAULT NULL, + PRIMARY KEY (`c1`) +) ENGINE=Mroonga DEFAULT CHARSET=latin1 COMMENT='engine "innodb"' +insert into t1 values (1, 100); +insert into t1 values (2, 101); +insert into t1 values (3, 102); +select * from t1; +c1 c2 +1 100 +2 101 +3 102 +update t1 set c2=c2+100 where c1=1; +select * from t1; +c1 c2 +1 200 +2 101 +3 102 +update t1 set c2=c2+100 where c1=2; +select * from t1; +c1 c2 +1 200 +2 201 +3 102 +update t1 set c2=c2+100 where c1=3; +select * from t1; +c1 c2 +1 200 +2 201 +3 202 +drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_dry_write_delete.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_dry_write_delete.result new file mode 100644 index 00000000000..e451b2b99fe --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_dry_write_delete.result @@ -0,0 +1,53 @@ +drop table if exists diaries; +create table diaries ( +id int primary key auto_increment, +body text, +fulltext index body_index (body) +) default charset utf8 COMMENT = 'engine "innodb"'; +show create table diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `body` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `body_index` (`body`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"' +insert into diaries (body) values ("will start groonga!"); +insert into diaries (body) values ("starting groonga..."); +insert into diaries (body) values ("started groonga."); +select * from diaries; +id body +1 will start groonga! +2 starting groonga... +3 started groonga. +set mroonga_dry_write=true; +delete from diaries where id = 2; +select * from diaries; +id body +1 will start groonga! +3 started groonga. +select * from diaries where match (body) against ("starting"); +id body +select * from diaries where match (body) against ("started"); +id body +3 started groonga. +set mroonga_dry_write=false; +delete from diaries where id = 3; +select * from diaries; +id body +1 will start groonga! +select * from diaries where match (body) against ("starting"); +id body +select * from diaries where match (body) against ("started"); +id body +insert into diaries (id, body) values (2, "sleeping..."); +select * from diaries; +id body +1 will start groonga! +2 sleeping... +select * from diaries where match (body) against ("starting"); +id body +2 sleeping... +select * from diaries where match (body) against ("started"); +id body +drop table diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_dry_write_insert.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_dry_write_insert.result new file mode 100644 index 00000000000..f11398f3710 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_dry_write_insert.result @@ -0,0 +1,42 @@ +drop table if exists diaries; +create table diaries ( +id int primary key auto_increment, +body text, +fulltext index body_index (body) +) default charset utf8 COMMENT = 'engine "innodb"'; +show create table diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `body` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `body_index` (`body`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"' +insert into diaries (body) values ("will start groonga!"); +select * from diaries; +id body +1 will start groonga! +select * from diaries where match (body) against ("groonga"); +id body +1 will start groonga! +set mroonga_dry_write=true; +insert into diaries (body) values ("starting groonga..."); +select * from diaries; +id body +1 will start groonga! +2 starting groonga... +select * from diaries where match (body) against ("groonga"); +id body +1 will start groonga! +set mroonga_dry_write=false; +insert into diaries (body) values ("started groonga."); +select * from diaries; +id body +1 will start groonga! +2 starting groonga... +3 started groonga. +select * from diaries where match (body) against ("groonga"); +id body +1 will start groonga! +3 started groonga. +drop table diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_dry_write_update.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_dry_write_update.result new file mode 100644 index 00000000000..47a844c8e68 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_dry_write_update.result @@ -0,0 +1,39 @@ +drop table if exists diaries; +create table diaries ( +id int primary key auto_increment, +body text, +fulltext index body_index (body) +) default charset utf8 COMMENT = 'engine "innodb"'; +show create table diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `body` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `body_index` (`body`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"' +insert into diaries (body) values ("will start groonga!"); +set mroonga_dry_write=true; +update diaries set body = "starting groonga..." where id = 1; +select * from diaries; +id body +1 starting groonga... +select * from diaries where match (body) against ("will"); +id body +1 starting groonga... +select * from diaries where match (body) against ("starting"); +id body +set mroonga_dry_write=false; +update diaries set body = "started groonga." where id = 1; +select * from diaries; +id body +1 started groonga. +select * from diaries where match (body) against ("will"); +id body +1 started groonga. +select * from diaries where match (body) against ("starting"); +id body +select * from diaries where match (body) against ("started"); +id body +1 started groonga. +drop table diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_match_escalation_threshold_global.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_match_escalation_threshold_global.result new file mode 100644 index 00000000000..0cf3d49c3c3 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_match_escalation_threshold_global.result @@ -0,0 +1,33 @@ +DROP TABLE IF EXISTS diaries; +SET GLOBAL mroonga_match_escalation_threshold = -1; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +tags TEXT, +FULLTEXT INDEX tags_index (tags) COMMENT 'parser "TokenDelimit"' +) DEFAULT CHARSET=UTF8 COMMENT='ENGINE "InnoDB"'; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `tags` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `tags_index` (`tags`) COMMENT 'parser "TokenDelimit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' +INSERT INTO diaries (title, tags) VALUES ("Hello groonga!", "groonga install"); +INSERT INTO diaries (title, tags) VALUES ("Hello mroonga!", "mroonga install"); +SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("install" IN BOOLEAN MODE); +id title tags +1 Hello groonga! groonga install +2 Hello mroonga! mroonga install +SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE); +id title tags +SET GLOBAL mroonga_match_escalation_threshold = 0; +SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE); +id title tags +SET mroonga_match_escalation_threshold = 0; +SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE); +id title tags +1 Hello groonga! groonga install +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_match_escalation_threshold_session.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_match_escalation_threshold_session.result new file mode 100644 index 00000000000..3d94ebc93ad --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_match_escalation_threshold_session.result @@ -0,0 +1,33 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +tags TEXT, +FULLTEXT INDEX tags_index (tags) COMMENT 'parser "TokenDelimit"' +) DEFAULT CHARSET=UTF8 COMMENT='ENGINE "InnoDB"'; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` text, + `tags` text, + PRIMARY KEY (`id`), + FULLTEXT KEY `tags_index` (`tags`) COMMENT 'parser "TokenDelimit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' +INSERT INTO diaries (title, tags) VALUES ("Hello groonga!", "groonga install"); +INSERT INTO diaries (title, tags) VALUES ("Hello mroonga!", "mroonga install"); +SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("install" IN BOOLEAN MODE); +id title tags +1 Hello groonga! groonga install +2 Hello mroonga! mroonga install +SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE); +id title tags +1 Hello groonga! groonga install +SET mroonga_match_escalation_threshold = -1; +SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE); +id title tags +SET mroonga_match_escalation_threshold = 0; +SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE); +id title tags +1 Hello groonga! groonga install +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/version_55_performance_schema.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/version_55_performance_schema.result new file mode 100644 index 00000000000..f6e3bbdca82 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/version_55_performance_schema.result @@ -0,0 +1,38 @@ +DROP TABLE IF EXISTS diaries; +SHOW VARIABLES LIKE 'performance_schema'; +Variable_name Value +performance_schema ON +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +content VARCHAR(255), +FULLTEXT INDEX (content) +) DEFAULT CHARSET UTF8 COMMENT = 'ENGINE "InnoDB"'; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `content` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' +INSERT INTO diaries (content) VALUES ("Tommorow will be shiny day!"); +SHOW TABLES FROM performance_schema; +Tables_in_performance_schema +cond_instances +events_waits_current +events_waits_history +events_waits_history_long +events_waits_summary_by_instance +events_waits_summary_by_thread_by_event_name +events_waits_summary_global_by_event_name +file_instances +file_summary_by_event_name +file_summary_by_instance +mutex_instances +performance_timers +rwlock_instances +setup_consumers +setup_instruments +setup_timers +threads +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/version_56_or_later_performance_schema.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/version_56_or_later_performance_schema.result new file mode 100644 index 00000000000..548dc32707f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/version_56_or_later_performance_schema.result @@ -0,0 +1,73 @@ +DROP TABLE IF EXISTS diaries; +SHOW VARIABLES LIKE 'performance_schema'; +Variable_name Value +performance_schema ON +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +content VARCHAR(255), +FULLTEXT INDEX (content) +) DEFAULT CHARSET UTF8 COMMENT = 'ENGINE "InnoDB"'; +SHOW CREATE TABLE diaries; +Table Create Table +diaries CREATE TABLE `diaries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `content` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`), + FULLTEXT KEY `content` (`content`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' +INSERT INTO diaries (content) VALUES ("Tommorow will be shiny day!"); +SHOW TABLES FROM performance_schema; +Tables_in_performance_schema +accounts +cond_instances +events_stages_current +events_stages_history +events_stages_history_long +events_stages_summary_by_account_by_event_name +events_stages_summary_by_host_by_event_name +events_stages_summary_by_thread_by_event_name +events_stages_summary_by_user_by_event_name +events_stages_summary_global_by_event_name +events_statements_current +events_statements_history +events_statements_history_long +events_statements_summary_by_account_by_event_name +events_statements_summary_by_digest +events_statements_summary_by_host_by_event_name +events_statements_summary_by_thread_by_event_name +events_statements_summary_by_user_by_event_name +events_statements_summary_global_by_event_name +events_waits_current +events_waits_history +events_waits_history_long +events_waits_summary_by_account_by_event_name +events_waits_summary_by_host_by_event_name +events_waits_summary_by_instance +events_waits_summary_by_thread_by_event_name +events_waits_summary_by_user_by_event_name +events_waits_summary_global_by_event_name +file_instances +file_summary_by_event_name +file_summary_by_instance +host_cache +hosts +mutex_instances +objects_summary_global_by_type +performance_timers +rwlock_instances +session_account_connect_attrs +session_connect_attrs +setup_actors +setup_consumers +setup_instruments +setup_objects +setup_timers +socket_instances +socket_summary_by_event_name +socket_summary_by_instance +table_io_waits_summary_by_index_usage +table_io_waits_summary_by_table +table_lock_waits_summary_by_table +threads +users +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/suite.opt b/storage/mroonga/mysql-test/mroonga/wrapper/suite.opt new file mode 100644 index 00000000000..d5a1e5190a7 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/suite.opt @@ -0,0 +1 @@ +--loose-plugin-load-add=$HA_MROONGA_SO --loose-plugin-mroonga=ON diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/suite.pm b/storage/mroonga/mysql-test/mroonga/wrapper/suite.pm new file mode 100644 index 00000000000..528ccc5d693 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/suite.pm @@ -0,0 +1,23 @@ +package My::Suite::Mroonga; + +@ISA = qw(My::Suite); + +return "No Mroonga engine" unless $ENV{HA_MROONGA_SO} or + $::mysqld_variables{'mroonga'} eq "ON"; + +sub is_default { 1 } + +my $groonga_normalizer_mysql_dir=$::basedir . '/storage/mroonga/vendor/groonga/vendor/plugins/groonga-normalizer-mysql'; +my $groonga_normalizer_mysql_install_dir=$::basedir . '/lib/groonga/plugins'; + +if (-d $groonga_normalizer_mysql_dir) +{ + $ENV{GRN_PLUGINS_DIR}=$groonga_normalizer_mysql_dir; +} +elsif (-d $groonga_normalizer_mysql_install_dir) +{ + $ENV{GRN_PLUGINS_DIR}=$groonga_normalizer_mysql_install_dir; +} + +bless { }; + diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_add_column.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_add_column.test new file mode 100644 index 00000000000..f25fdf95dab --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_add_column.test @@ -0,0 +1,46 @@ +# Copyright(C) 2011 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_innodb.inc +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT +) DEFAULT CHARSET UTF8 COMMENT = 'ENGINE "InnoDB"'; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title) VALUES ("survey"); +SELECT * FROM diaries; + +ALTER TABLE diaries ADD COLUMN body TEXT; +UPDATE diaries SET body = "will start groonga!"; +SELECT * FROM diaries; + +INSERT INTO diaries (title, body) values ("groonga (1)", "starting groonga..."); +INSERT INTO diaries (title, body) values ("groonga (2)", "started groonga."); +SELECT * FROM diaries; + +SHOW CREATE TABLE diaries; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_change_column_comment.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_change_column_comment.test new file mode 100644 index 00000000000..bbc5ca49818 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_change_column_comment.test @@ -0,0 +1,40 @@ +# Copyright(C) 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 +# 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP TABLE IF EXISTS bugs; +--enable_warnings + +CREATE TABLE bugs ( + id INT UNSIGNED PRIMARY KEY, + tag VARCHAR(64) +) DEFAULT CHARSET=utf8 COMMENT='engine "InnoDB"'; + +ALTER TABLE bugs + CHANGE COLUMN + tag + tag VARCHAR(64) COMMENT 'It must consist of only alphabet and number.'; + +SHOW CREATE TABLE bugs; + +DROP TABLE bugs; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_change_engine.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_change_engine.test new file mode 100644 index 00000000000..38a13bf8a5e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_change_engine.test @@ -0,0 +1,55 @@ +# Copyright(C) 2011 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_innodb.inc +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + body TEXT, + FULLTEXT INDEX title_index (title), + FULLTEXT INDEX body_index (body) +) ENGINE MyISAM DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); +INSERT INTO diaries (title, body) VALUES ("groonga (1)", "starting groonga..."); +SELECT * FROM diaries + WHERE MATCH(title) AGAINST("survey" IN BOOLEAN MODE) AND + MATCH(body) AGAINST("groonga" IN BOOLEAN MODE); + +ALTER TABLE diaries ENGINE = mroonga COMMENT = 'ENGINE "InnoDB"'; +SHOW CREATE TABLE diaries; + +SELECT * FROM diaries + WHERE MATCH(title) AGAINST("survey" IN BOOLEAN MODE) AND + MATCH(body) AGAINST("groonga" IN BOOLEAN MODE); + +INSERT INTO diaries (title, body) VALUES ("groonga (2)", "started groonga."); + +SELECT * FROM diaries + WHERE MATCH(title) AGAINST("groonga" IN BOOLEAN MODE) AND + MATCH(body) AGAINST("groonga" IN BOOLEAN MODE); + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_comment_change_engine.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_comment_change_engine.test new file mode 100644 index 00000000000..2c85cc68266 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_comment_change_engine.test @@ -0,0 +1,45 @@ +# Copyright(C) 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 +# 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS memos; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE memos ( + id INT AUTO_INCREMENT PRIMARY KEY, + title VARCHAR(64), + content TEXT, + FULLTEXT INDEX(content) +) DEFAULT CHARSET=utf8 COMMENT='engine "InnoDB"'; +SHOW CREATE TABLE memos; + +INSERT INTO memos (title, content) VALUES ("Hello", "I start to write memos!"); +INSERT INTO memos (title, content) VALUES ("groonga", "I start to use groonga!"); +INSERT INTO memos (title, content) VALUES ("mroonga", "I use mroonga too!"); + +ALTER TABLE memos COMMENT='engine "MyISAM"'; +SHOW CREATE TABLE memos; + +SELECT * FROM memos; +SELECT * FROM memos WHERE MATCH(content) AGAINST("start" IN BOOLEAN MODE); + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_create_fulltext.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_create_fulltext.test new file mode 100644 index 00000000000..00b6ecf565e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_create_fulltext.test @@ -0,0 +1,56 @@ +# 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE diaries ( + id int PRIMARY KEY, + title varchar(255) +) COMMENT='ENGINE "InnoDB"' DEFAULT CHARSET=utf8; + +INSERT INTO diaries VALUES (1, "Hello"); +INSERT INTO diaries VALUES (2, "天気"); +INSERT INTO diaries VALUES (3, "富士山"); + +--error ER_FT_MATCHING_KEY_NOT_FOUND +SELECT * + FROM diaries + WHERE MATCH (title) AGAINST ("富士山"); + +CREATE FULLTEXT INDEX title_index on diaries (title); + +SELECT * + FROM diaries + FORCE INDEX (title_index) + WHERE MATCH (title) AGAINST ("富士山"); + +ALTER TABLE diaries DISABLE KEYS; + +--error ER_FT_MATCHING_KEY_NOT_FOUND +SELECT * + FROM diaries + FORCE INDEX (title_index) + WHERE MATCH (title) AGAINST ("富士山"); + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_fulltext.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_fulltext.test new file mode 100644 index 00000000000..f81b4e82b06 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_fulltext.test @@ -0,0 +1,50 @@ +# 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE diaries ( + id int PRIMARY KEY, + title varchar(255), + FULLTEXT KEY title_index (title) +) COMMENT='ENGINE "InnoDB"' DEFAULT CHARSET=utf8; + +INSERT INTO diaries VALUES (1, "Hello"); +INSERT INTO diaries VALUES (2, "天気"); +INSERT INTO diaries VALUES (3, "富士山"); + +SELECT * + FROM diaries + FORCE INDEX (title_index) + WHERE MATCH (title) AGAINST ("富士山"); + +ALTER TABLE diaries DISABLE KEYS; + +--error ER_FT_MATCHING_KEY_NOT_FOUND +SELECT * + FROM diaries + FORCE INDEX (title_index) + WHERE MATCH (title) AGAINST ("富士山"); + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_multiple_column.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_multiple_column.test new file mode 100644 index 00000000000..760a4bc99bd --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_multiple_column.test @@ -0,0 +1,52 @@ +# 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE diaries ( + id int PRIMARY KEY, + title varchar(255), + created_at datetime, + KEY title_and_created_at_index (title, created_at) +) COMMENT='ENGINE "InnoDB"' DEFAULT CHARSET=utf8; + +INSERT INTO diaries VALUES (1, "Hello", "2012-04-30 20:00:00"); +INSERT INTO diaries VALUES (2, "天気" , "2012-04-30 23:00:00"); +INSERT INTO diaries VALUES (3, "富士山", "2012-04-30 19:00:00"); + +SELECT * + FROM diaries + FORCE INDEX (title_and_created_at_index) + WHERE title = "天気" AND + created_at = "2012-04-30 23:00:00"; + +ALTER TABLE diaries DISABLE KEYS; + +SELECT * + FROM diaries + FORCE INDEX (title_and_created_at_index) + WHERE title = "天気" AND + created_at = "2012-04-30 23:00:00"; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_normal.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_normal.test new file mode 100644 index 00000000000..89a62e78baa --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_normal.test @@ -0,0 +1,50 @@ +# 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE diaries ( + id int PRIMARY KEY, + title varchar(255), + created_at datetime, + KEY created_at_index (created_at) +) COMMENT='ENGINE "InnoDB"' DEFAULT CHARSET=utf8; + +INSERT INTO diaries VALUES (1, "Hello", "2012-04-30 20:00:00"); +INSERT INTO diaries VALUES (2, "天気" , "2012-04-30 23:00:00"); +INSERT INTO diaries VALUES (3, "富士山", "2012-04-30 19:00:00"); + +SELECT * + FROM diaries + FORCE INDEX (created_at_index) + WHERE created_at = "2012-04-30 20:00:00"; + +ALTER TABLE diaries DISABLE KEYS; + +SELECT * + FROM diaries + FORCE INDEX (created_at_index) + WHERE created_at = "2012-04-30 20:00:00"; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_primary.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_primary.test new file mode 100644 index 00000000000..63f0b8ad404 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_primary.test @@ -0,0 +1,48 @@ +# 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE diaries ( + id int PRIMARY KEY, + title varchar(255) +) COMMENT='ENGINE "InnoDB"' DEFAULT CHARSET=utf8; + +INSERT INTO diaries VALUES (1, "Hello"); +INSERT INTO diaries VALUES (2, "天気"); +INSERT INTO diaries VALUES (3, "富士山"); + +SELECT * + FROM diaries + FORCE INDEX (PRIMARY) + WHERE id = 2; + +ALTER TABLE diaries DISABLE KEYS; + +SELECT * + FROM diaries + FORCE INDEX (PRIMARY) + WHERE id = 2; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_updating.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_updating.test new file mode 100644 index 00000000000..9d0f1f3dc1a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_updating.test @@ -0,0 +1,42 @@ +# 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 ( + c1 int NOT NULL, + c2 text NOT NULL, + c3 int NOT NULL, + c4 int NOT NULL, + PRIMARY KEY(c1), + KEY idx1(c3,c4), + FULLTEXT KEY ft1(c2) +) COMMENT='ENGINE "MyISAM"' DEFAULT CHARSET=utf8; +INSERT INTO t1 VALUES(1, 'test1', 1, 1); +INSERT INTO t1 VALUES(2, 'test2', 2, 2); +INSERT INTO t1 VALUES(3, 'test3', 1, 3); +ALTER TABLE t1 DISABLE KEYS; +DELETE FROM t1 WHERE c1 = 2; +UPDATE t1 SET c4 = 4 WHERE c1 = 1; +INSERT INTO t1 VALUES(4, 'test4', 2, 4); +TRUNCATE t1; +DROP TABLE t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_drop_column.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_drop_column.test new file mode 100644 index 00000000000..41a09b8721b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_drop_column.test @@ -0,0 +1,45 @@ +# Copyright(C) 2011 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_innodb.inc +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + body TEXT +) DEFAULT CHARSET UTF8 COMMENT = 'ENGINE "InnoDB"'; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); +SELECT * FROM diaries; + +ALTER TABLE diaries DROP COLUMN body; +SHOW CREATE TABLE diaries; +SELECT * FROM diaries; + +INSERT INTO diaries (title) values ("groonga (1)"); +INSERT INTO diaries (title) values ("groonga (2)"); +SELECT * FROM diaries; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_fulltext.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_fulltext.test new file mode 100644 index 00000000000..293bc8b7963 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_fulltext.test @@ -0,0 +1,52 @@ +# 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE diaries ( + id int PRIMARY KEY, + title varchar(255), + FULLTEXT KEY title_index (title) +) COMMENT='ENGINE "InnoDB"' DEFAULT CHARSET=utf8; + +ALTER TABLE diaries DISABLE KEYS; + +INSERT INTO diaries VALUES (1, "Hello"); +INSERT INTO diaries VALUES (2, "天気"); +INSERT INTO diaries VALUES (3, "富士山"); + +--error ER_FT_MATCHING_KEY_NOT_FOUND +SELECT * + FROM diaries + FORCE INDEX (title_index) + WHERE MATCH (title) AGAINST ("富士山"); + +ALTER TABLE diaries ENABLE KEYS; + +SELECT * + FROM diaries + FORCE INDEX (title_index) + WHERE MATCH (title) AGAINST ("富士山"); + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_lock_tables.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_lock_tables.test new file mode 100644 index 00000000000..0756c27f9f8 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_lock_tables.test @@ -0,0 +1,45 @@ +# Copyright(C) 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 +# 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS memos; +--enable_warnings + +CREATE TABLE IF NOT EXISTS memos ( + id VARCHAR(45) NOT NULL PRIMARY KEY, + text TEXT NOT NULL, + FULLTEXT KEY (text) +) DEFAULT CHARSET=utf8 COMMENT='engine "InnoDB"'; + +LOCK TABLES memos WRITE; +ALTER TABLE memos DISABLE KEYS; + +INSERT INTO memos + VALUES (00000, 'text0'), + (00001, 'text1'), + (00002, 'text2'); + +ALTER TABLE memos ENABLE KEYS; +UNLOCK TABLES; + +SELECT * FROM memos; + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_multiple_column.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_multiple_column.test new file mode 100644 index 00000000000..f8b93e19000 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_multiple_column.test @@ -0,0 +1,54 @@ +# 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE diaries ( + id int PRIMARY KEY, + title varchar(255), + created_at datetime, + KEY title_and_created_at_index (title, created_at) +) COMMENT='ENGINE "InnoDB"' DEFAULT CHARSET=utf8; + +ALTER TABLE diaries DISABLE KEYS; + +INSERT INTO diaries VALUES (1, "Hello", "2012-04-30 20:00:00"); +INSERT INTO diaries VALUES (2, "天気" , "2012-04-30 23:00:00"); +INSERT INTO diaries VALUES (3, "富士山", "2012-04-30 19:00:00"); + +SELECT * + FROM diaries + FORCE INDEX (title_and_created_at_index) + WHERE title = "天気" AND + created_at = "2012-04-30 23:00:00"; + +ALTER TABLE diaries ENABLE KEYS; + +SELECT * + FROM diaries + FORCE INDEX (title_and_created_at_index) + WHERE title = "天気" AND + created_at = "2012-04-30 23:00:00"; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_normal.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_normal.test new file mode 100644 index 00000000000..3dd0f332fe6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_normal.test @@ -0,0 +1,52 @@ +# 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE diaries ( + id int PRIMARY KEY, + title varchar(255), + created_at datetime, + KEY created_at_index (created_at) +) COMMENT='ENGINE "InnoDB"' DEFAULT CHARSET=utf8; + +ALTER TABLE diaries DISABLE KEYS; + +INSERT INTO diaries VALUES (1, "Hello", "2012-04-30 20:00:00"); +INSERT INTO diaries VALUES (2, "天気" , "2012-04-30 23:00:00"); +INSERT INTO diaries VALUES (3, "富士山", "2012-04-30 19:00:00"); + +SELECT * + FROM diaries + FORCE INDEX (created_at_index) + WHERE created_at = "2012-04-30 20:00:00"; + +ALTER TABLE diaries ENABLE KEYS; + +SELECT * + FROM diaries + FORCE INDEX (created_at_index) + WHERE created_at = "2012-04-30 20:00:00"; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_primary.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_primary.test new file mode 100644 index 00000000000..bfa11c9eb8c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_primary.test @@ -0,0 +1,50 @@ +# 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE diaries ( + id int PRIMARY KEY, + title varchar(255) +) COMMENT='ENGINE "InnoDB"' DEFAULT CHARSET=utf8; + +ALTER TABLE diaries DISABLE KEYS; + +INSERT INTO diaries VALUES (1, "Hello"); +INSERT INTO diaries VALUES (2, "天気"); +INSERT INTO diaries VALUES (3, "富士山"); + +SELECT * + FROM diaries + FORCE INDEX (PRIMARY) + WHERE id = 2; + +ALTER TABLE diaries ENABLE KEYS; + +SELECT * + FROM diaries + FORCE INDEX (PRIMARY) + WHERE id = 2; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_fulltext.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_fulltext.test new file mode 100644 index 00000000000..f4bd0b391b6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_fulltext.test @@ -0,0 +1,57 @@ +# Copyright(C) 2011 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_innodb.inc +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + FULLTEXT INDEX title_index (title) +) DEFAULT CHARSET UTF8 COMMENT = 'ENGINE "InnoDB"'; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title) VALUES ("survey"); +SELECT * FROM diaries; + +ALTER TABLE diaries ADD COLUMN body TEXT; +UPDATE diaries SET body = "will start groonga!"; +SELECT * FROM diaries; + +INSERT INTO diaries (title, body) values ("groonga (1)", "starting groonga..."); +INSERT INTO diaries (title, body) values ("groonga (2)", "started groonga."); +SELECT * FROM diaries; + +ALTER TABLE diaries ADD FULLTEXT INDEX body_index (body); + +SELECT * FROM diaries + WHERE MATCH(title) AGAINST("survey") AND + MATCH(body) AGAINST("groonga"); + +SELECT * FROM diaries + WHERE MATCH(title) AGAINST("groonga") AND + MATCH(body) AGAINST("starting"); + +SHOW CREATE TABLE diaries; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_rename_table.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_rename_table.test new file mode 100644 index 00000000000..595a850ae03 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_rename_table.test @@ -0,0 +1,50 @@ +# Copyright(C) 2011 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_innodb.inc +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries, memos; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + body TEXT, + FULLTEXT INDEX title_index (title), + FULLTEXT INDEX body_index (body) +) DEFAULT CHARSET UTF8 COMMENT = 'ENGINE "InnoDB"'; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); +SELECT * FROM diaries; +SELECT * FROM diaries + WHERE MATCH(title) AGAINST("groonga") AND + MATCH(body) AGAINST("starting"); + +ALTER TABLE diaries RENAME memos; +SELECT * FROM memos; +SELECT * FROM memos + WHERE MATCH(title) AGAINST("groonga") AND + MATCH(body) AGAINST("starting"); + +SHOW CREATE TABLE memos; + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_spatial.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_spatial.test new file mode 100644 index 00000000000..37ea8aaf149 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_spatial.test @@ -0,0 +1,150 @@ +# Copyright(C) 2011 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_innodb.inc +--source include/not_embedded.inc +--source include/have_geometry.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS shops; +--enable_warnings + +CREATE TABLE shops ( + id INT PRIMARY KEY AUTO_INCREMENT, + name TEXT, + location GEOMETRY NOT NULL +) COMMENT = 'ENGINE "InnoDB"'; + +INSERT INTO shops (name, location) + VALUES ('nezu-no-taiyaki', + GeomFromText('POINT(139.762573 35.720253)')); +INSERT INTO shops (name, location) + VALUES ('taiyaki-kataoka', + GeomFromText('POINT(139.715591 35.712521)')); +INSERT INTO shops (name, location) + VALUES ('soba-taiyaki-ku', + GeomFromText('POINT(139.659088 35.683712)')); +INSERT INTO shops (name, location) + VALUES ('kuruma', + GeomFromText('POINT(139.706207 35.721516)')); +INSERT INTO shops (name, location) + VALUES ('hirose-ya', + GeomFromText('POINT(139.685608 35.714844)')); +INSERT INTO shops (name, location) + VALUES ('sazare', + GeomFromText('POINT(139.685043 35.714653)')); +INSERT INTO shops (name, location) + VALUES ('omede-taiyaki', + GeomFromText('POINT(139.817154 35.700516)')); +INSERT INTO shops (name, location) + VALUES ('onaga-ya', + GeomFromText('POINT(139.81105 35.698254)')); +INSERT INTO shops (name, location) + VALUES ('shiro-ya', + GeomFromText('POINT(139.638611 35.705517)')); +INSERT INTO shops (name, location) + VALUES ('fuji-ya', + GeomFromText('POINT(139.637115 35.703938)')); +INSERT INTO shops (name, location) + VALUES ('miyoshi', + GeomFromText('POINT(139.537323 35.644539)')); +INSERT INTO shops (name, location) + VALUES ('juju-ya', + GeomFromText('POINT(139.695755 35.628922)')); +INSERT INTO shops (name, location) + VALUES ('tatsumi-ya', + GeomFromText('POINT(139.638657 35.665501)')); +INSERT INTO shops (name, location) + VALUES ('tetsuji', + GeomFromText('POINT(139.76857 35.680912)')); +INSERT INTO shops (name, location) + VALUES ('gazuma-ya', + GeomFromText('POINT(139.647598 35.700817)')); +INSERT INTO shops (name, location) + VALUES ('honma-mon', + GeomFromText('POINT(139.652573 35.722736)')); +INSERT INTO shops (name, location) + VALUES ('naniwa-ya', + GeomFromText('POINT(139.796234 35.730061)')); +INSERT INTO shops (name, location) + VALUES ('kuro-dai', + GeomFromText('POINT(139.704834 35.650345)')); +INSERT INTO shops (name, location) + VALUES ('daruma', + GeomFromText('POINT(139.770599 35.681461)')); +INSERT INTO shops (name, location) + VALUES ('yanagi-ya', + GeomFromText('POINT(139.783981 35.685341)')); +INSERT INTO shops (name, location) + VALUES ('sharaku', + GeomFromText('POINT(139.794846 35.716969)')); +INSERT INTO shops (name, location) + VALUES ('takane', + GeomFromText('POINT(139.560913 35.698601)')); +INSERT INTO shops (name, location) + VALUES ('chiyoda', + GeomFromText('POINT(139.652817 35.642601)')); +INSERT INTO shops (name, location) + VALUES ('da-ka-po', + GeomFromText('POINT(139.727356 35.627346)')); +INSERT INTO shops (name, location) + VALUES ('matsushima-ya', + GeomFromText('POINT(139.737381 35.640556)')); +INSERT INTO shops (name, location) + VALUES ('kazuya', + GeomFromText('POINT(139.760895 35.673508)')); +INSERT INTO shops (name, location) + VALUES ('furuya-kogane-an', + GeomFromText('POINT(139.676071 35.680603)')); +INSERT INTO shops (name, location) + VALUES ('hachi-no-ie', + GeomFromText('POINT(139.668106 35.608021)')); +INSERT INTO shops (name, location) + VALUES ('azuki-chan', + GeomFromText('POINT(139.673203 35.64151)')); +INSERT INTO shops (name, location) + VALUES ('kuriko-an', + GeomFromText('POINT(139.796829 35.712013)')); +INSERT INTO shops (name, location) + VALUES ('yume-no-aru-machi-no-taiyaki-ya-san', + GeomFromText('POINT(139.712524 35.616199)')); +INSERT INTO shops (name, location) + VALUES ('naze-ya', + GeomFromText('POINT(139.665833 35.609039)')); +INSERT INTO shops (name, location) + VALUES ('sanoki-ya', + GeomFromText('POINT(139.770721 35.66592)')); +INSERT INTO shops (name, location) + VALUES ('shigeta', + GeomFromText('POINT(139.780273 35.672626)')); +INSERT INTO shops (name, location) + VALUES ('nishimi-ya', + GeomFromText('POINT(139.774628 35.671825)')); +INSERT INTO shops (name, location) + VALUES ('hiiragi', + GeomFromText('POINT(139.711517 35.647701)')); + +ALTER TABLE shops ADD SPATIAL KEY location_index (location); + +SELECT id, name, AsText(location) AS location_text FROM shops + WHERE MBRContains(GeomFromText('LineString(139.7727 35.6684, 139.7038 35.7121)'), location); + +SHOW CREATE TABLE shops; + +DROP TABLE shops; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/auto_increment_text.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/auto_increment_text.test new file mode 100644 index 00000000000..e702cb5d591 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/auto_increment_text.test @@ -0,0 +1,34 @@ +# Copyright(C) 2011 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists diaries; +--enable_warnings + +create table diaries ( + id int primary key auto_increment, + body text +) comment = 'engine "innodb"'; +insert into diaries (body) values ("started groonga (long text)"); +select * from diaries; +insert into diaries (body) values ("sleeping... (short text)"); +select * from diaries; +drop table diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/binlog_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/binlog_TODO_SPLIT_ME.test new file mode 100644 index 00000000000..230ab87b391 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/binlog_TODO_SPLIT_ME.test @@ -0,0 +1,55 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# Copyright(C) 2011 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_innodb.inc +--source include/have_log_bin.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists t1; +--enable_warnings + +show variables like 'log_bin'; + +set binlog_format="STATEMENT"; + +create table t1 (c1 int primary key, c2 int) engine = mroonga COMMENT = 'engine "innodb"'; +insert into t1 values(1,100); +insert into t1 values(2,100); +commit; +select * from t1; +drop table t1; + +set binlog_format="ROW"; + +create table t1 (c1 int primary key, c2 int) engine = mroonga COMMENT = 'engine "innodb"'; +insert into t1 values(1,100); +insert into t1 values(2,100); +commit; +select * from t1; +drop table t1; + +set binlog_format="MIXED"; + +create table t1 (c1 int primary key, c2 int) engine = mroonga COMMENT = 'engine "innodb"'; +insert into t1 values(1,100); +insert into t1 values(2,100); +commit; +select * from t1; +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/column_comment_index_not_for_mroonga.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_comment_index_not_for_mroonga.test new file mode 100644 index 00000000000..3bc3c069705 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_comment_index_not_for_mroonga.test @@ -0,0 +1,37 @@ +# Copyright(C) 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 +# 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP TABLE IF EXISTS bugs; +--enable_warnings + +CREATE TABLE bugs ( + id INT UNSIGNED PRIMARY KEY, + tag VARCHAR(64), + INDEX (tag) COMMENT 'Tag search is required.' +) DEFAULT CHARSET=utf8 + COMMENT='engine "InnoDB"'; + +SHOW CREATE TABLE bugs; + +DROP TABLE bugs; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/column_normal_comment.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_normal_comment.test new file mode 100644 index 00000000000..73065ffd7bb --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_normal_comment.test @@ -0,0 +1,35 @@ +# Copyright(C) 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 +# 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP TABLE IF EXISTS bugs; +--enable_warnings + +CREATE TABLE bugs ( + id INT UNSIGNED PRIMARY KEY, + tag VARCHAR(64) COMMENT 'It must consist of only alphabet and number.' +) DEFAULT CHARSET=utf8 COMMENT='engine "InnoDB"'; + +SHOW CREATE TABLE bugs; + +DROP TABLE bugs; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/count_star_with_index.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/count_star_with_index.test new file mode 100644 index 00000000000..f8b77becdde --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/count_star_with_index.test @@ -0,0 +1,54 @@ +# Copyright(C) 2011 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_innodb.inc +--source ../../include/mroonga/have_fulltext_index_comment.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries_innodb; +DROP TABLE IF EXISTS diaries_mroonga; +--enable_warnings + +CREATE TABLE diaries_innodb ( + id INT PRIMARY KEY AUTO_INCREMENT, + body TEXT, + flag TINYINT(2), + INDEX (flag) +) ENGINE = InnoDB DEFAULT CHARSET UTF8; + +CREATE TABLE diaries_mroonga ( + id INT PRIMARY KEY AUTO_INCREMENT, + body TEXT, + flag TINYINT(2), + INDEX (flag) +) COMMENT = 'ENGINE "InnoDB"' DEFAULT CHARSET UTF8; + +INSERT INTO diaries_innodb (body) VALUES ("will start groonga!"); +INSERT INTO diaries_innodb (body) VALUES ("starting groonga..."); +INSERT INTO diaries_innodb (body) VALUES ("started groonga."); + +INSERT INTO diaries_mroonga (body) VALUES ("will start groonga!"); +INSERT INTO diaries_mroonga (body) VALUES ("starting groonga..."); +INSERT INTO diaries_mroonga (body) VALUES ("started groonga."); + +EXPLAIN SELECT COUNT(*) FROM diaries_innodb; +EXPLAIN SELECT COUNT(*) FROM diaries_mroonga; + +DROP TABLE diaries_innodb; +DROP TABLE diaries_mroonga; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_TODO_SPLIT_ME.test new file mode 100644 index 00000000000..6df44e79665 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_TODO_SPLIT_ME.test @@ -0,0 +1,99 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# Copyright(C) 2011 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists t1, t2, t3; +--enable_warnings + +# simple test +create table t1 (c1 int primary key) COMMENT = 'engine "innodb"'; +create table t2 (c1 int primary key) COMMENT = 'engine "innodb"'; +create table t3 (c1 int primary key) COMMENT = 'engine "innodb"'; +drop table t1,t2,t3; +create table t1 (c1 int primary key, c2 int, c3 int) COMMENT = 'engine "innodb"'; +drop table t1; + +# data type support +create table t1 (c1 bit primary key) COMMENT = 'engine "innodb"'; +desc t1; +drop table t1; +create table t1 (c1 tinyint primary key) COMMENT = 'engine "innodb"'; +desc t1; +drop table t1; +create table t1 (c1 smallint primary key) COMMENT = 'engine "innodb"'; +desc t1; +drop table t1; +create table t1 (c1 mediumint primary key) COMMENT = 'engine "innodb"'; +desc t1; +drop table t1; +create table t1 (c1 int primary key) COMMENT = 'engine "innodb"'; +desc t1; +drop table t1; +create table t1 (c1 bigint primary key) COMMENT = 'engine "innodb"'; +desc t1; +drop table t1; +create table t1 (c1 double primary key) COMMENT = 'engine "innodb"'; +desc t1; +drop table t1; +create table t1 (c1 float primary key) COMMENT = 'engine "innodb"'; +desc t1; +drop table t1; +create table t1 (c1 decimal primary key) COMMENT = 'engine "innodb"'; +desc t1; +drop table t1; +create table t1 (c1 date primary key) COMMENT = 'engine "innodb"'; +desc t1; +drop table t1; +create table t1 (c1 time primary key) COMMENT = 'engine "innodb"'; +desc t1; +drop table t1; +create table t1 (c1 timestamp primary key) COMMENT = 'engine "innodb"'; +desc t1; +drop table t1; +create table t1 (c1 datetime primary key) COMMENT = 'engine "innodb"'; +desc t1; +drop table t1; +create table t1 (c1 year primary key) COMMENT = 'engine "innodb"'; +desc t1; +drop table t1; +create table t1 (c1 char(10) primary key) COMMENT = 'engine "innodb"'; +desc t1; +drop table t1; +create table t1 (c1 varchar(10) primary key) COMMENT = 'engine "innodb"'; +desc t1; +drop table t1; +create table t1 (c1 binary(10) primary key) COMMENT = 'engine "innodb"'; +desc t1; +drop table t1; +create table t1 (c1 varbinary(10) primary key) COMMENT = 'engine "innodb"'; +desc t1; +drop table t1; +create table t1 (c1 enum("yes","no") primary key) COMMENT = 'engine "innodb"'; +desc t1; +drop table t1; +create table t1 (c1 set("A","B","AB","O") primary key) COMMENT = 'engine "innodb"'; +desc t1; +drop table t1; + +# error test +--error ER_REQUIRES_PRIMARY_KEY +create table t1 (c1 int) COMMENT = 'engine "innodb"'; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_comment_combined.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_comment_combined.test new file mode 100644 index 00000000000..f9a7dc3168b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_comment_combined.test @@ -0,0 +1,35 @@ +# Copyright(C) 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 +# 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP TABLE IF EXISTS bugs; +--enable_warnings + +CREATE TABLE bugs ( + id INT UNSIGNED PRIMARY KEY +) DEFAULT CHARSET=utf8 + COMMENT='Free style normal comment, engine "InnoDB"'; + +SHOW CREATE TABLE bugs; + +DROP TABLE bugs; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_normalizer_fulltext_index.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_normalizer_fulltext_index.test new file mode 100644 index 00000000000..c4265ffd22e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_normalizer_fulltext_index.test @@ -0,0 +1,43 @@ +# Copyright(C) 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 +# 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES utf8; + +CREATE TABLE diaries ( + day DATE PRIMARY KEY, + content VARCHAR(64) NOT NULL, + FULLTEXT INDEX (content) COMMENT 'normalizer "NormalizerAuto"' +) COMMENT='engine "InnoDB"' DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +INSERT INTO diaries VALUES ("2013-04-23", "ブラックコーヒーを飲んだ。"); + +SELECT * FROM diaries + WHERE MATCH (content) AGAINST ("+ふらつく" IN BOOLEAN MODE); +SELECT * FROM diaries + WHERE MATCH (content) AGAINST ("+ブラック" IN BOOLEAN MODE); + +DROP TABLE diaries; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/delete_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/delete_TODO_SPLIT_ME.test new file mode 100644 index 00000000000..1e82a2dff60 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/delete_TODO_SPLIT_ME.test @@ -0,0 +1,59 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# Copyright(C) 2011 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists t1, t2, t3; +--enable_warnings + +create table t1 (c1 int primary key, c2 int) COMMENT 'engine = "innodb"'; +show create table t1; +insert into t1 values (1, 100); +insert into t1 values (2, 101); +insert into t1 values (3, 102); +insert into t1 values (4, 102); +select * from t1; + +delete from t1 where c1=3; +select * from t1; + +flush tables; + +delete from t1 where c1=2; +select * from t1; + +delete from t1; +select * from t1; + +drop table t1; + +create table t1 (c1 int primary key, c2 text, fulltext index (c2)) COMMENT 'engine = "innodb"'; +insert into t1 values(10, "aa ii uu ee"); +insert into t1 values(20, "ka ki ku ke"); +insert into t1 values(30, "sa si su se"); + +select * from t1; +select * from t1 where match(c2) against("ki"); +delete from t1 where c1=20; +select * from t1; +select * from t1 where match(c2) against("ki"); + +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/delete_all.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/delete_all.test new file mode 100644 index 00000000000..c77a9cdeac3 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/delete_all.test @@ -0,0 +1,44 @@ +# Copyright(C) 2014 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +SET NAMES utf8; + +CREATE TABLE users ( + id int PRIMARY KEY, + name varchar(100), + FULLTEXT INDEX (name) +) COMMENT 'engine = "InnoDB"' DEFAULT CHARSET=utf8; + +INSERT INTO users VALUES (1, 'Alice'); +INSERT INTO users VALUES (2, 'Bob'); +INSERT INTO users VALUES (3, 'Chris'); + +SELECT * FROM users; + +DELETE FROM users; + +SELECT * FROM users; + +DROP TABLE users; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_leading_not.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_leading_not.test new file mode 100644 index 00000000000..fb55d609855 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_leading_not.test @@ -0,0 +1,41 @@ +# 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES UTF8; +CREATE TABLE diaries ( + id INT PRIMARY KEY, + title VARCHAR(255), + content TEXT, + FULLTEXT INDEX (content) +) DEFAULT CHARSET = UTF8 COMMENT = 'ENGINE "InnoDB"'; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries VALUES(1, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, "富士山", "今日も天気がよくてきれいに見える。"); + +SELECT * FROM diaries WHERE MATCH(content) AGAINST("-明日 +天気" IN BOOLEAN MODE); + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_multiple_match_against.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_multiple_match_against.test new file mode 100644 index 00000000000..483cca04c8a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_multiple_match_against.test @@ -0,0 +1,44 @@ +# 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/have_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES UTF8; +CREATE TABLE diaries ( + id INT PRIMARY KEY, + title VARCHAR(255), + content TEXT, + FULLTEXT INDEX (title), + FULLTEXT INDEX (content) +) DEFAULT CHARSET = UTF8 COMMENT = 'ENGINE "InnoDB"'; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries VALUES(1, "富士山", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, "天気 1月1日", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, "天気 4月4日", "今日も天気がよくてきれいに見える。"); + +SELECT COUNT(*) FROM diaries WHERE MATCH(title) AGAINST("+天気" IN BOOLEAN MODE) AND MATCH(content) AGAINST("+今日" IN BOOLEAN MODE); +SELECT * FROM diaries WHERE MATCH(title) AGAINST("+天気" IN BOOLEAN MODE) AND MATCH(content) AGAINST("+今日" IN BOOLEAN MODE); +SELECT 1 FROM diaries WHERE MATCH(title) AGAINST("+天気" IN BOOLEAN MODE) AND MATCH(content) AGAINST("+今日" IN BOOLEAN MODE); + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_minus_no_operator.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_minus_no_operator.test new file mode 100644 index 00000000000..2e96b8ed4f8 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_minus_no_operator.test @@ -0,0 +1,43 @@ +# Copyright(C) 2011-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 +# 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS memos; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE memos ( + id INT PRIMARY KEY AUTO_INCREMENT, + content TEXT, + FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8 COMMENT='engine "InnODB"'; + +INSERT INTO memos VALUES (NULL, "Today is good day."); +INSERT INTO memos VALUES (NULL, "Tomorrow will be good day."); +INSERT INTO memos VALUES (NULL, "Yesterday was good day."); +INSERT INTO memos VALUES (NULL, "Today is fine."); +INSERT INTO memos VALUES (NULL, "Tomorrow will be fine."); +INSERT INTO memos VALUES (NULL, "Yesterday was fine."); + +SELECT * FROM memos + WHERE MATCH (content) AGAINST ("*D- fine is be" IN BOOLEAN MODE); + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_minus_with_or.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_minus_with_or.test new file mode 100644 index 00000000000..6eb46419c4d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_minus_with_or.test @@ -0,0 +1,43 @@ +# Copyright(C) 2011-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 +# 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS memos; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE memos ( + id INT PRIMARY KEY AUTO_INCREMENT, + content TEXT, + FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8 COMMENT='engine "InnODB"'; + +INSERT INTO memos VALUES (NULL, "Today is good day."); +INSERT INTO memos VALUES (NULL, "Tomorrow will be good day."); +INSERT INTO memos VALUES (NULL, "Yesterday was good day."); +INSERT INTO memos VALUES (NULL, "Today is fine."); +INSERT INTO memos VALUES (NULL, "Tomorrow will be fine."); +INSERT INTO memos VALUES (NULL, "Yesterday was fine."); + +SELECT * FROM memos + WHERE MATCH (content) AGAINST ("*D- is OR be fine" IN BOOLEAN MODE); + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_minus_with_plus.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_minus_with_plus.test new file mode 100644 index 00000000000..301365610c5 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_minus_with_plus.test @@ -0,0 +1,43 @@ +# Copyright(C) 2011-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 +# 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS memos; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE memos ( + id INT PRIMARY KEY AUTO_INCREMENT, + content TEXT, + FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8 COMMENT='engine "InnODB"'; + +INSERT INTO memos VALUES (NULL, "Today is good day."); +INSERT INTO memos VALUES (NULL, "Tomorrow will be good day."); +INSERT INTO memos VALUES (NULL, "Yesterday was good day."); +INSERT INTO memos VALUES (NULL, "Today is fine."); +INSERT INTO memos VALUES (NULL, "Tomorrow will be fine."); +INSERT INTO memos VALUES (NULL, "Yesterday was fine."); + +SELECT * FROM memos + WHERE MATCH (content) AGAINST ("*D- good +day be" IN BOOLEAN MODE); + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_or_no_operator.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_or_no_operator.test new file mode 100644 index 00000000000..6a89d7556ab --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_or_no_operator.test @@ -0,0 +1,42 @@ +# Copyright(C) 2011-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 +# 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS memos; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE memos ( + id INT PRIMARY KEY AUTO_INCREMENT, + content TEXT, + FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8 COMMENT='engine "InnODB"'; + +INSERT INTO memos VALUES (NULL, "Today is good day."); +INSERT INTO memos VALUES (NULL, "Tomorrow will be good day."); +INSERT INTO memos VALUES (NULL, "Today is fine."); +INSERT INTO memos VALUES (NULL, "Tomorrow will be fine."); +INSERT INTO memos VALUES (NULL, "Yesterday was fine."); + +SELECT * FROM memos + WHERE MATCH (content) AGAINST ("*DOR today good" IN BOOLEAN MODE); + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_or_with_minus.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_or_with_minus.test new file mode 100644 index 00000000000..790d2f1c9a9 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_or_with_minus.test @@ -0,0 +1,42 @@ +# Copyright(C) 2011-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 +# 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS memos; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE memos ( + id INT PRIMARY KEY AUTO_INCREMENT, + content TEXT, + FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8 COMMENT='engine "InnODB"'; + +INSERT INTO memos VALUES (NULL, "Today is good day."); +INSERT INTO memos VALUES (NULL, "Tomorrow will be good day."); +INSERT INTO memos VALUES (NULL, "Today is fine."); +INSERT INTO memos VALUES (NULL, "Tomorrow will be fine."); +INSERT INTO memos VALUES (NULL, "Yesterday was fine."); + +SELECT * FROM memos + WHERE MATCH (content) AGAINST ("*DOR today -good tomorrow" IN BOOLEAN MODE); + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_or_with_plus.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_or_with_plus.test new file mode 100644 index 00000000000..a45c414580d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_or_with_plus.test @@ -0,0 +1,42 @@ +# Copyright(C) 2011-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 +# 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS memos; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE memos ( + id INT PRIMARY KEY AUTO_INCREMENT, + content TEXT, + FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8 COMMENT='engine "InnODB"'; + +INSERT INTO memos VALUES (NULL, "Today is good day."); +INSERT INTO memos VALUES (NULL, "Tomorrow will be good day."); +INSERT INTO memos VALUES (NULL, "Today is fine."); +INSERT INTO memos VALUES (NULL, "Tomorrow will be fine."); +INSERT INTO memos VALUES (NULL, "Yesterday was fine."); + +SELECT * FROM memos + WHERE MATCH (content) AGAINST ("*DOR today +good tomorrow" IN BOOLEAN MODE); + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_plus_no_operator.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_plus_no_operator.test new file mode 100644 index 00000000000..d013578a8f8 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_plus_no_operator.test @@ -0,0 +1,40 @@ +# Copyright(C) 2011-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 +# 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS memos; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE memos ( + id INT PRIMARY KEY AUTO_INCREMENT, + content TEXT, + FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8 COMMENT='engine "InnODB"'; + +INSERT INTO memos VALUES (NULL, "Today is good day."); +INSERT INTO memos VALUES (NULL, "Tomorrow will be good day."); +INSERT INTO memos VALUES (NULL, "Today is fine."); + +SELECT * FROM memos + WHERE MATCH (content) AGAINST ("*D+ today good" IN BOOLEAN MODE); + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_plus_with_minus.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_plus_with_minus.test new file mode 100644 index 00000000000..91b0a7f7891 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_plus_with_minus.test @@ -0,0 +1,40 @@ +# Copyright(C) 2011-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 +# 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS memos; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE memos ( + id INT PRIMARY KEY AUTO_INCREMENT, + content TEXT, + FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8 COMMENT='engine "InnODB"'; + +INSERT INTO memos VALUES (NULL, "Today is good day."); +INSERT INTO memos VALUES (NULL, "Tomorrow will be good day."); +INSERT INTO memos VALUES (NULL, "Today is fine."); + +SELECT * FROM memos + WHERE MATCH (content) AGAINST ("*D+ today -good is" IN BOOLEAN MODE); + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_plus_with_or.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_plus_with_or.test new file mode 100644 index 00000000000..29c1c0d9d98 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_plus_with_or.test @@ -0,0 +1,40 @@ +# Copyright(C) 2011-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 +# 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS memos; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE memos ( + id INT PRIMARY KEY AUTO_INCREMENT, + content TEXT, + FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8 COMMENT='engine "InnODB"'; + +INSERT INTO memos VALUES (NULL, "Today is good day."); +INSERT INTO memos VALUES (NULL, "Tomorrow will be good day."); +INSERT INTO memos VALUES (NULL, "Today is fine."); + +SELECT * FROM memos + WHERE MATCH (content) AGAINST ("*D+ today OR tomorrow day" IN BOOLEAN MODE); + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_weight_full_spec.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_weight_full_spec.test new file mode 100644 index 00000000000..027b05d5320 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_weight_full_spec.test @@ -0,0 +1,44 @@ +# Copyright(C) 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 +# 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE diaries ( + id INT PRIMARY KEY, + title VARCHAR(255), + content TEXT, + FULLTEXT INDEX (title, content) +) DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"'; + +INSERT INTO diaries VALUES(1, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, "富士山", "今日も天気がよくてきれいに見える。"); + +SELECT *, MATCH(title, content) + AGAINST("*W1:10,2:2 +天気" in BOOLEAN MODE) AS score + FROM diaries + WHERE MATCH(title, content) + AGAINST("*W1:10,2:2 +天気" in BOOLEAN MODE); + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_weight_no_weight.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_weight_no_weight.test new file mode 100644 index 00000000000..41b814de80f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_weight_no_weight.test @@ -0,0 +1,44 @@ +# Copyright(C) 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 +# 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE diaries ( + id INT PRIMARY KEY, + title VARCHAR(255), + content TEXT, + FULLTEXT INDEX (title, content) +) DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"'; + +INSERT INTO diaries VALUES(1, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, "富士山", "今日も天気がよくてきれいに見える。"); + +SELECT *, MATCH(title, content) + AGAINST("*W1,2:2 +天気" in BOOLEAN MODE) AS score + FROM diaries + WHERE MATCH(title, content) + AGAINST("*W1,2:2 +天気" in BOOLEAN MODE); + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_weight_omit_section.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_weight_omit_section.test new file mode 100644 index 00000000000..1db4134d0a0 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_weight_omit_section.test @@ -0,0 +1,44 @@ +# Copyright(C) 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 +# 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE diaries ( + id INT PRIMARY KEY, + title VARCHAR(255), + content TEXT, + FULLTEXT INDEX (title, content) +) DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"'; + +INSERT INTO diaries VALUES(1, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, "富士山", "今日も天気がよくてきれいに見える。"); + +SELECT *, MATCH(title, content) + AGAINST("*W1:2 +天気" in BOOLEAN MODE) AS score + FROM diaries + WHERE MATCH(title, content) + AGAINST("*W1:2 +天気" in BOOLEAN MODE); + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_charset_ascii.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_charset_ascii.test new file mode 100644 index 00000000000..33e23e801ff --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_charset_ascii.test @@ -0,0 +1,38 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# Copyright(C) 2011 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists t1, t2, t3; +--enable_warnings + +create table t1 (c1 int primary key, c2 int, c3 text, fulltext index ft(c3)) COMMENT = 'engine "innodb"'; +insert into t1 values(1,10,"aa ii uu ee oo"); +insert into t1 values(2,20,"ka ki ku ke ko"); +insert into t1 values(3,30,"sa si su se so"); +insert into t1 values(4,40,"ta ti tu te to"); +insert into t1 values(5,50,"aa ii uu ee oo"); +select * from t1; +select * from t1 where match(c3) against("su"); +select * from t1 where match(c3) against("ii"); +select * from t1 where match(c3) against("+su" in boolean mode); +select * from t1 where match(c3) against("+ii" in boolean mode); +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_charset_cp932.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_charset_cp932.test new file mode 100644 index 00000000000..75853611f69 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_charset_cp932.test @@ -0,0 +1,35 @@ +# Copyright(C) 2011 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/have_innodb.inc +--source include/have_cp932.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists t1, t2, t3; +--enable_warnings + +set names cp932; +create table t1 (c1 int primary key, c2 varchar(255), c3 text, fulltext index(c2), fulltext index(c3)) default charset cp932 COMMENT = 'engine "innodb"'; +insert into t1 values(1, "̕xmR̓VCɂ",""); +insert into t1 values(2, "","̕xmR̓VC͕܂"); +insert into t1 values(3, "dummy", "dummy"); +select * from t1; +select * from t1 where match(c2) against("xmR"); +select * from t1 where match(c3) against("xmR"); +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_charset_eucjpms.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_charset_eucjpms.test new file mode 100644 index 00000000000..3f1cba869f8 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_charset_eucjpms.test @@ -0,0 +1,35 @@ +# Copyright(C) 2011 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/have_innodb.inc +--source include/have_eucjpms.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists t1, t2, t3; +--enable_warnings + +set names eucjpms; +create table t1 (c1 int primary key, c2 varchar(255), c3 text, fulltext index(c2), fulltext index(c3)) default charset eucjpms COMMENT = 'engine "innodb"'; +insert into t1 values(1, "ٻλŷˤĤ",""); +insert into t1 values(2, "","ٻλŷʬޤ"); +insert into t1 values(3, "dummy", "dummy"); +select * from t1; +select * from t1 where match(c2) against("ٻλ"); +select * from t1 where match(c3) against("ٻλ"); +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_charset_japanese.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_charset_japanese.test new file mode 100644 index 00000000000..27524ac2ed0 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_charset_japanese.test @@ -0,0 +1,35 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# Copyright(C) 2011 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists t1, t2, t3; +--enable_warnings + +set names utf8; +create table t1 (c1 int primary key, c2 varchar(255), c3 text, fulltext index(c2), fulltext index(c3)) default charset utf8 COMMENT = 'engine "innodb"'; +insert into t1 values(1, "明日の富士山の天気について","あああああああ"); +insert into t1 values(2, "いいいいい","明日の富士山の天気は分かりません"); +insert into t1 values(3, "dummy", "dummy"); +select * from t1; +select * from t1 where match(c2) against("富士山"); +select * from t1 where match(c3) against("富士山"); +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_index_recreate.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_index_recreate.test new file mode 100644 index 00000000000..0115ed0699c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_index_recreate.test @@ -0,0 +1,51 @@ +# Copyright(C) 2011 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE diaries ( + id int PRIMARY KEY, + title varchar(255), + content text, + FULLTEXT INDEX (title) +) DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"'; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries VALUES (1, "Hello", "はじめました。"); +INSERT INTO diaries VALUES (2, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES (3, "富士山", "今日もきれい。"); + +SELECT * FROM diaries WHERE MATCH (title) AGAINST ("富士山"); + +DROP INDEX title ON diaries; + +--error ER_FT_MATCHING_KEY_NOT_FOUND +SELECT * FROM diaries WHERE MATCH (title) AGAINST ("富士山"); +SELECT * FROM diaries; + +CREATE FULLTEXT INDEX new_title_index ON diaries (title); +SELECT * FROM diaries WHERE MATCH (title) AGAINST ("富士山"); +SELECT * FROM diaries; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_insert_select.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_insert_select.test new file mode 100644 index 00000000000..6037ab61da0 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_insert_select.test @@ -0,0 +1,47 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# Copyright(C) 2011 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists t1, t2, t3; +--enable_warnings + +create table t1 (c1 int primary key, c2 varchar(100), fulltext index(c2)) default charset utf8 COMMENT = 'engine "innodb"'; +create table t2 (c1 int primary key, c2 text, fulltext index(c2)) default charset utf8 COMMENT = 'engine "innodb"'; +insert into t1 values (1, "aa ii uu ee oo"); +insert into t1 values (2, "ka ki ku ke ko"); +insert into t1 values (3, "aa ii ii ii oo"); +insert into t1 values (4, "sa si su se so"); +insert into t1 values (5, "ta ti ii ii to"); +insert into t2 (c1,c2) select c1,c2 from t1; +select * from t1; +select * from t2; +select * from t1 where c1=3; +select * from t2 where c1=3; +select * from t1 where c1>3 order by c1 desc; +select * from t2 where c1>3 order by c1 asc; +select * from t1 where c2>"s" order by c2 desc; +select * from t2 where c2>"s" order by c1 asc; +select *,match(c2) against("ii") from t1 where match(c2) against("ii") order by match(c2) against("ii") desc; +select *,match(c2) against("ii") from t2 where match(c2) against("ii") order by match(c2) against("ii") asc; +select c1,c2,match(c2) against("ii") from t1 where match(c2) against("ii"); +select c1,c2,match(c2) against("ii") from t1 where match(c2) against("ii"); +drop table t1,t2; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_insert_values.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_insert_values.test new file mode 100644 index 00000000000..43237cdc96a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_insert_values.test @@ -0,0 +1,35 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# Copyright(C) 2011 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists t1, t2, t3; +--enable_warnings + +create table t1 (c1 int primary key, c2 text, fulltext index ft (c2)) COMMENT = 'engine "innodb"'; +show create table t1; +insert into t1 values (1, "hoge hoge"); +insert into t1 values (2, "fuga fuga"); +insert into t1 values (3, "moge moge"); +select * from t1; +flush tables; +select * from t1; +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_many_records.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_many_records.test new file mode 100644 index 00000000000..c12441f3c5a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_many_records.test @@ -0,0 +1,4136 @@ +# Copyright(C) 2011 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists diaries; +--enable_warnings + +set names utf8; +create table diaries ( + id int primary key, + title varchar(255), + fulltext index (title) +) default charset utf8 COMMENT = 'engine "innodb"'; +show create table diaries; + +set autocommit=0; +insert into diaries values(0, "2011-07-14"); +insert into diaries values(1, "2011-07-15"); +insert into diaries values(2, "2011-07-16"); +insert into diaries values(3, "2011-07-17"); +insert into diaries values(4, "2011-07-18"); +insert into diaries values(5, "2011-07-19"); +insert into diaries values(6, "2011-07-20"); +insert into diaries values(7, "2011-07-21"); +insert into diaries values(8, "2011-07-22"); +insert into diaries values(9, "2011-07-23"); +insert into diaries values(10, "2011-07-24"); +insert into diaries values(11, "2011-07-25"); +insert into diaries values(12, "2011-07-26"); +insert into diaries values(13, "2011-07-27"); +insert into diaries values(14, "2011-07-28"); +insert into diaries values(15, "2011-07-29"); +insert into diaries values(16, "2011-07-30"); +insert into diaries values(17, "2011-07-31"); +insert into diaries values(18, "2011-08-01"); +insert into diaries values(19, "2011-08-02"); +insert into diaries values(20, "2011-08-03"); +insert into diaries values(21, "2011-08-04"); +insert into diaries values(22, "2011-08-05"); +insert into diaries values(23, "2011-08-06"); +insert into diaries values(24, "2011-08-07"); +insert into diaries values(25, "2011-08-08"); +insert into diaries values(26, "2011-08-09"); +insert into diaries values(27, "2011-08-10"); +insert into diaries values(28, "2011-08-11"); +insert into diaries values(29, "2011-08-12"); +insert into diaries values(30, "2011-08-13"); +insert into diaries values(31, "2011-08-14"); +insert into diaries values(32, "2011-08-15"); +insert into diaries values(33, "2011-08-16"); +insert into diaries values(34, "2011-08-17"); +insert into diaries values(35, "2011-08-18"); +insert into diaries values(36, "2011-08-19"); +insert into diaries values(37, "2011-08-20"); +insert into diaries values(38, "2011-08-21"); +insert into diaries values(39, "2011-08-22"); +insert into diaries values(40, "2011-08-23"); +insert into diaries values(41, "2011-08-24"); +insert into diaries values(42, "2011-08-25"); +insert into diaries values(43, "2011-08-26"); +insert into diaries values(44, "2011-08-27"); +insert into diaries values(45, "2011-08-28"); +insert into diaries values(46, "2011-08-29"); +insert into diaries values(47, "2011-08-30"); +insert into diaries values(48, "2011-08-31"); +insert into diaries values(49, "2011-09-01"); +insert into diaries values(50, "2011-09-02"); +insert into diaries values(51, "2011-09-03"); +insert into diaries values(52, "2011-09-04"); +insert into diaries values(53, "2011-09-05"); +insert into diaries values(54, "2011-09-06"); +insert into diaries values(55, "2011-09-07"); +insert into diaries values(56, "2011-09-08"); +insert into diaries values(57, "2011-09-09"); +insert into diaries values(58, "2011-09-10"); +insert into diaries values(59, "2011-09-11"); +insert into diaries values(60, "2011-09-12"); +insert into diaries values(61, "2011-09-13"); +insert into diaries values(62, "2011-09-14"); +insert into diaries values(63, "2011-09-15"); +insert into diaries values(64, "2011-09-16"); +insert into diaries values(65, "2011-09-17"); +insert into diaries values(66, "2011-09-18"); +insert into diaries values(67, "2011-09-19"); +insert into diaries values(68, "2011-09-20"); +insert into diaries values(69, "2011-09-21"); +insert into diaries values(70, "2011-09-22"); +insert into diaries values(71, "2011-09-23"); +insert into diaries values(72, "2011-09-24"); +insert into diaries values(73, "2011-09-25"); +insert into diaries values(74, "2011-09-26"); +insert into diaries values(75, "2011-09-27"); +insert into diaries values(76, "2011-09-28"); +insert into diaries values(77, "2011-09-29"); +insert into diaries values(78, "2011-09-30"); +insert into diaries values(79, "2011-10-01"); +insert into diaries values(80, "2011-10-02"); +insert into diaries values(81, "2011-10-03"); +insert into diaries values(82, "2011-10-04"); +insert into diaries values(83, "2011-10-05"); +insert into diaries values(84, "2011-10-06"); +insert into diaries values(85, "2011-10-07"); +insert into diaries values(86, "2011-10-08"); +insert into diaries values(87, "2011-10-09"); +insert into diaries values(88, "2011-10-10"); +insert into diaries values(89, "2011-10-11"); +insert into diaries values(90, "2011-10-12"); +insert into diaries values(91, "2011-10-13"); +insert into diaries values(92, "2011-10-14"); +insert into diaries values(93, "2011-10-15"); +insert into diaries values(94, "2011-10-16"); +insert into diaries values(95, "2011-10-17"); +insert into diaries values(96, "2011-10-18"); +insert into diaries values(97, "2011-10-19"); +insert into diaries values(98, "2011-10-20"); +insert into diaries values(99, "2011-10-21"); +insert into diaries values(100, "2011-10-22"); +insert into diaries values(101, "2011-10-23"); +insert into diaries values(102, "2011-10-24"); +insert into diaries values(103, "2011-10-25"); +insert into diaries values(104, "2011-10-26"); +insert into diaries values(105, "2011-10-27"); +insert into diaries values(106, "2011-10-28"); +insert into diaries values(107, "2011-10-29"); +insert into diaries values(108, "2011-10-30"); +insert into diaries values(109, "2011-10-31"); +insert into diaries values(110, "2011-11-01"); +insert into diaries values(111, "2011-11-02"); +insert into diaries values(112, "2011-11-03"); +insert into diaries values(113, "2011-11-04"); +insert into diaries values(114, "2011-11-05"); +insert into diaries values(115, "2011-11-06"); +insert into diaries values(116, "2011-11-07"); +insert into diaries values(117, "2011-11-08"); +insert into diaries values(118, "2011-11-09"); +insert into diaries values(119, "2011-11-10"); +insert into diaries values(120, "2011-11-11"); +insert into diaries values(121, "2011-11-12"); +insert into diaries values(122, "2011-11-13"); +insert into diaries values(123, "2011-11-14"); +insert into diaries values(124, "2011-11-15"); +insert into diaries values(125, "2011-11-16"); +insert into diaries values(126, "2011-11-17"); +insert into diaries values(127, "2011-11-18"); +insert into diaries values(128, "2011-11-19"); +insert into diaries values(129, "2011-11-20"); +insert into diaries values(130, "2011-11-21"); +insert into diaries values(131, "2011-11-22"); +insert into diaries values(132, "2011-11-23"); +insert into diaries values(133, "2011-11-24"); +insert into diaries values(134, "2011-11-25"); +insert into diaries values(135, "2011-11-26"); +insert into diaries values(136, "2011-11-27"); +insert into diaries values(137, "2011-11-28"); +insert into diaries values(138, "2011-11-29"); +insert into diaries values(139, "2011-11-30"); +insert into diaries values(140, "2011-12-01"); +insert into diaries values(141, "2011-12-02"); +insert into diaries values(142, "2011-12-03"); +insert into diaries values(143, "2011-12-04"); +insert into diaries values(144, "2011-12-05"); +insert into diaries values(145, "2011-12-06"); +insert into diaries values(146, "2011-12-07"); +insert into diaries values(147, "2011-12-08"); +insert into diaries values(148, "2011-12-09"); +insert into diaries values(149, "2011-12-10"); +insert into diaries values(150, "2011-12-11"); +insert into diaries values(151, "2011-12-12"); +insert into diaries values(152, "2011-12-13"); +insert into diaries values(153, "2011-12-14"); +insert into diaries values(154, "2011-12-15"); +insert into diaries values(155, "2011-12-16"); +insert into diaries values(156, "2011-12-17"); +insert into diaries values(157, "2011-12-18"); +insert into diaries values(158, "2011-12-19"); +insert into diaries values(159, "2011-12-20"); +insert into diaries values(160, "2011-12-21"); +insert into diaries values(161, "2011-12-22"); +insert into diaries values(162, "2011-12-23"); +insert into diaries values(163, "2011-12-24"); +insert into diaries values(164, "2011-12-25"); +insert into diaries values(165, "2011-12-26"); +insert into diaries values(166, "2011-12-27"); +insert into diaries values(167, "2011-12-28"); +insert into diaries values(168, "2011-12-29"); +insert into diaries values(169, "2011-12-30"); +insert into diaries values(170, "2011-12-31"); +insert into diaries values(171, "2012-01-01"); +insert into diaries values(172, "2012-01-02"); +insert into diaries values(173, "2012-01-03"); +insert into diaries values(174, "2012-01-04"); +insert into diaries values(175, "2012-01-05"); +insert into diaries values(176, "2012-01-06"); +insert into diaries values(177, "2012-01-07"); +insert into diaries values(178, "2012-01-08"); +insert into diaries values(179, "2012-01-09"); +insert into diaries values(180, "2012-01-10"); +insert into diaries values(181, "2012-01-11"); +insert into diaries values(182, "2012-01-12"); +insert into diaries values(183, "2012-01-13"); +insert into diaries values(184, "2012-01-14"); +insert into diaries values(185, "2012-01-15"); +insert into diaries values(186, "2012-01-16"); +insert into diaries values(187, "2012-01-17"); +insert into diaries values(188, "2012-01-18"); +insert into diaries values(189, "2012-01-19"); +insert into diaries values(190, "2012-01-20"); +insert into diaries values(191, "2012-01-21"); +insert into diaries values(192, "2012-01-22"); +insert into diaries values(193, "2012-01-23"); +insert into diaries values(194, "2012-01-24"); +insert into diaries values(195, "2012-01-25"); +insert into diaries values(196, "2012-01-26"); +insert into diaries values(197, "2012-01-27"); +insert into diaries values(198, "2012-01-28"); +insert into diaries values(199, "2012-01-29"); +insert into diaries values(200, "2012-01-30"); +insert into diaries values(201, "2012-01-31"); +insert into diaries values(202, "2012-02-01"); +insert into diaries values(203, "2012-02-02"); +insert into diaries values(204, "2012-02-03"); +insert into diaries values(205, "2012-02-04"); +insert into diaries values(206, "2012-02-05"); +insert into diaries values(207, "2012-02-06"); +insert into diaries values(208, "2012-02-07"); +insert into diaries values(209, "2012-02-08"); +insert into diaries values(210, "2012-02-09"); +insert into diaries values(211, "2012-02-10"); +insert into diaries values(212, "2012-02-11"); +insert into diaries values(213, "2012-02-12"); +insert into diaries values(214, "2012-02-13"); +insert into diaries values(215, "2012-02-14"); +insert into diaries values(216, "2012-02-15"); +insert into diaries values(217, "2012-02-16"); +insert into diaries values(218, "2012-02-17"); +insert into diaries values(219, "2012-02-18"); +insert into diaries values(220, "2012-02-19"); +insert into diaries values(221, "2012-02-20"); +insert into diaries values(222, "2012-02-21"); +insert into diaries values(223, "2012-02-22"); +insert into diaries values(224, "2012-02-23"); +insert into diaries values(225, "2012-02-24"); +insert into diaries values(226, "2012-02-25"); +insert into diaries values(227, "2012-02-26"); +insert into diaries values(228, "2012-02-27"); +insert into diaries values(229, "2012-02-28"); +insert into diaries values(230, "2012-02-29"); +insert into diaries values(231, "2012-03-01"); +insert into diaries values(232, "2012-03-02"); +insert into diaries values(233, "2012-03-03"); +insert into diaries values(234, "2012-03-04"); +insert into diaries values(235, "2012-03-05"); +insert into diaries values(236, "2012-03-06"); +insert into diaries values(237, "2012-03-07"); +insert into diaries values(238, "2012-03-08"); +insert into diaries values(239, "2012-03-09"); +insert into diaries values(240, "2012-03-10"); +insert into diaries values(241, "2012-03-11"); +insert into diaries values(242, "2012-03-12"); +insert into diaries values(243, "2012-03-13"); +insert into diaries values(244, "2012-03-14"); +insert into diaries values(245, "2012-03-15"); +insert into diaries values(246, "2012-03-16"); +insert into diaries values(247, "2012-03-17"); +insert into diaries values(248, "2012-03-18"); +insert into diaries values(249, "2012-03-19"); +insert into diaries values(250, "2012-03-20"); +insert into diaries values(251, "2012-03-21"); +insert into diaries values(252, "2012-03-22"); +insert into diaries values(253, "2012-03-23"); +insert into diaries values(254, "2012-03-24"); +insert into diaries values(255, "2012-03-25"); +insert into diaries values(256, "2012-03-26"); +insert into diaries values(257, "2012-03-27"); +insert into diaries values(258, "2012-03-28"); +insert into diaries values(259, "2012-03-29"); +insert into diaries values(260, "2012-03-30"); +insert into diaries values(261, "2012-03-31"); +insert into diaries values(262, "2012-04-01"); +insert into diaries values(263, "2012-04-02"); +insert into diaries values(264, "2012-04-03"); +insert into diaries values(265, "2012-04-04"); +insert into diaries values(266, "2012-04-05"); +insert into diaries values(267, "2012-04-06"); +insert into diaries values(268, "2012-04-07"); +insert into diaries values(269, "2012-04-08"); +insert into diaries values(270, "2012-04-09"); +insert into diaries values(271, "2012-04-10"); +insert into diaries values(272, "2012-04-11"); +insert into diaries values(273, "2012-04-12"); +insert into diaries values(274, "2012-04-13"); +insert into diaries values(275, "2012-04-14"); +insert into diaries values(276, "2012-04-15"); +insert into diaries values(277, "2012-04-16"); +insert into diaries values(278, "2012-04-17"); +insert into diaries values(279, "2012-04-18"); +insert into diaries values(280, "2012-04-19"); +insert into diaries values(281, "2012-04-20"); +insert into diaries values(282, "2012-04-21"); +insert into diaries values(283, "2012-04-22"); +insert into diaries values(284, "2012-04-23"); +insert into diaries values(285, "2012-04-24"); +insert into diaries values(286, "2012-04-25"); +insert into diaries values(287, "2012-04-26"); +insert into diaries values(288, "2012-04-27"); +insert into diaries values(289, "2012-04-28"); +insert into diaries values(290, "2012-04-29"); +insert into diaries values(291, "2012-04-30"); +insert into diaries values(292, "2012-05-01"); +insert into diaries values(293, "2012-05-02"); +insert into diaries values(294, "2012-05-03"); +insert into diaries values(295, "2012-05-04"); +insert into diaries values(296, "2012-05-05"); +insert into diaries values(297, "2012-05-06"); +insert into diaries values(298, "2012-05-07"); +insert into diaries values(299, "2012-05-08"); +insert into diaries values(300, "2012-05-09"); +insert into diaries values(301, "2012-05-10"); +insert into diaries values(302, "2012-05-11"); +insert into diaries values(303, "2012-05-12"); +insert into diaries values(304, "2012-05-13"); +insert into diaries values(305, "2012-05-14"); +insert into diaries values(306, "2012-05-15"); +insert into diaries values(307, "2012-05-16"); +insert into diaries values(308, "2012-05-17"); +insert into diaries values(309, "2012-05-18"); +insert into diaries values(310, "2012-05-19"); +insert into diaries values(311, "2012-05-20"); +insert into diaries values(312, "2012-05-21"); +insert into diaries values(313, "2012-05-22"); +insert into diaries values(314, "2012-05-23"); +insert into diaries values(315, "2012-05-24"); +insert into diaries values(316, "2012-05-25"); +insert into diaries values(317, "2012-05-26"); +insert into diaries values(318, "2012-05-27"); +insert into diaries values(319, "2012-05-28"); +insert into diaries values(320, "2012-05-29"); +insert into diaries values(321, "2012-05-30"); +insert into diaries values(322, "2012-05-31"); +insert into diaries values(323, "2012-06-01"); +insert into diaries values(324, "2012-06-02"); +insert into diaries values(325, "2012-06-03"); +insert into diaries values(326, "2012-06-04"); +insert into diaries values(327, "2012-06-05"); +insert into diaries values(328, "2012-06-06"); +insert into diaries values(329, "2012-06-07"); +insert into diaries values(330, "2012-06-08"); +insert into diaries values(331, "2012-06-09"); +insert into diaries values(332, "2012-06-10"); +insert into diaries values(333, "2012-06-11"); +insert into diaries values(334, "2012-06-12"); +insert into diaries values(335, "2012-06-13"); +insert into diaries values(336, "2012-06-14"); +insert into diaries values(337, "2012-06-15"); +insert into diaries values(338, "2012-06-16"); +insert into diaries values(339, "2012-06-17"); +insert into diaries values(340, "2012-06-18"); +insert into diaries values(341, "2012-06-19"); +insert into diaries values(342, "2012-06-20"); +insert into diaries values(343, "2012-06-21"); +insert into diaries values(344, "2012-06-22"); +insert into diaries values(345, "2012-06-23"); +insert into diaries values(346, "2012-06-24"); +insert into diaries values(347, "2012-06-25"); +insert into diaries values(348, "2012-06-26"); +insert into diaries values(349, "2012-06-27"); +insert into diaries values(350, "2012-06-28"); +insert into diaries values(351, "2012-06-29"); +insert into diaries values(352, "2012-06-30"); +insert into diaries values(353, "2012-07-01"); +insert into diaries values(354, "2012-07-02"); +insert into diaries values(355, "2012-07-03"); +insert into diaries values(356, "2012-07-04"); +insert into diaries values(357, "2012-07-05"); +insert into diaries values(358, "2012-07-06"); +insert into diaries values(359, "2012-07-07"); +insert into diaries values(360, "2012-07-08"); +insert into diaries values(361, "2012-07-09"); +insert into diaries values(362, "2012-07-10"); +insert into diaries values(363, "2012-07-11"); +insert into diaries values(364, "2012-07-12"); +insert into diaries values(365, "2012-07-13"); +insert into diaries values(366, "2012-07-14"); +insert into diaries values(367, "2012-07-15"); +insert into diaries values(368, "2012-07-16"); +insert into diaries values(369, "2012-07-17"); +insert into diaries values(370, "2012-07-18"); +insert into diaries values(371, "2012-07-19"); +insert into diaries values(372, "2012-07-20"); +insert into diaries values(373, "2012-07-21"); +insert into diaries values(374, "2012-07-22"); +insert into diaries values(375, "2012-07-23"); +insert into diaries values(376, "2012-07-24"); +insert into diaries values(377, "2012-07-25"); +insert into diaries values(378, "2012-07-26"); +insert into diaries values(379, "2012-07-27"); +insert into diaries values(380, "2012-07-28"); +insert into diaries values(381, "2012-07-29"); +insert into diaries values(382, "2012-07-30"); +insert into diaries values(383, "2012-07-31"); +insert into diaries values(384, "2012-08-01"); +insert into diaries values(385, "2012-08-02"); +insert into diaries values(386, "2012-08-03"); +insert into diaries values(387, "2012-08-04"); +insert into diaries values(388, "2012-08-05"); +insert into diaries values(389, "2012-08-06"); +insert into diaries values(390, "2012-08-07"); +insert into diaries values(391, "2012-08-08"); +insert into diaries values(392, "2012-08-09"); +insert into diaries values(393, "2012-08-10"); +insert into diaries values(394, "2012-08-11"); +insert into diaries values(395, "2012-08-12"); +insert into diaries values(396, "2012-08-13"); +insert into diaries values(397, "2012-08-14"); +insert into diaries values(398, "2012-08-15"); +insert into diaries values(399, "2012-08-16"); +insert into diaries values(400, "2012-08-17"); +insert into diaries values(401, "2012-08-18"); +insert into diaries values(402, "2012-08-19"); +insert into diaries values(403, "2012-08-20"); +insert into diaries values(404, "2012-08-21"); +insert into diaries values(405, "2012-08-22"); +insert into diaries values(406, "2012-08-23"); +insert into diaries values(407, "2012-08-24"); +insert into diaries values(408, "2012-08-25"); +insert into diaries values(409, "2012-08-26"); +insert into diaries values(410, "2012-08-27"); +insert into diaries values(411, "2012-08-28"); +insert into diaries values(412, "2012-08-29"); +insert into diaries values(413, "2012-08-30"); +insert into diaries values(414, "2012-08-31"); +insert into diaries values(415, "2012-09-01"); +insert into diaries values(416, "2012-09-02"); +insert into diaries values(417, "2012-09-03"); +insert into diaries values(418, "2012-09-04"); +insert into diaries values(419, "2012-09-05"); +insert into diaries values(420, "2012-09-06"); +insert into diaries values(421, "2012-09-07"); +insert into diaries values(422, "2012-09-08"); +insert into diaries values(423, "2012-09-09"); +insert into diaries values(424, "2012-09-10"); +insert into diaries values(425, "2012-09-11"); +insert into diaries values(426, "2012-09-12"); +insert into diaries values(427, "2012-09-13"); +insert into diaries values(428, "2012-09-14"); +insert into diaries values(429, "2012-09-15"); +insert into diaries values(430, "2012-09-16"); +insert into diaries values(431, "2012-09-17"); +insert into diaries values(432, "2012-09-18"); +insert into diaries values(433, "2012-09-19"); +insert into diaries values(434, "2012-09-20"); +insert into diaries values(435, "2012-09-21"); +insert into diaries values(436, "2012-09-22"); +insert into diaries values(437, "2012-09-23"); +insert into diaries values(438, "2012-09-24"); +insert into diaries values(439, "2012-09-25"); +insert into diaries values(440, "2012-09-26"); +insert into diaries values(441, "2012-09-27"); +insert into diaries values(442, "2012-09-28"); +insert into diaries values(443, "2012-09-29"); +insert into diaries values(444, "2012-09-30"); +insert into diaries values(445, "2012-10-01"); +insert into diaries values(446, "2012-10-02"); +insert into diaries values(447, "2012-10-03"); +insert into diaries values(448, "2012-10-04"); +insert into diaries values(449, "2012-10-05"); +insert into diaries values(450, "2012-10-06"); +insert into diaries values(451, "2012-10-07"); +insert into diaries values(452, "2012-10-08"); +insert into diaries values(453, "2012-10-09"); +insert into diaries values(454, "2012-10-10"); +insert into diaries values(455, "2012-10-11"); +insert into diaries values(456, "2012-10-12"); +insert into diaries values(457, "2012-10-13"); +insert into diaries values(458, "2012-10-14"); +insert into diaries values(459, "2012-10-15"); +insert into diaries values(460, "2012-10-16"); +insert into diaries values(461, "2012-10-17"); +insert into diaries values(462, "2012-10-18"); +insert into diaries values(463, "2012-10-19"); +insert into diaries values(464, "2012-10-20"); +insert into diaries values(465, "2012-10-21"); +insert into diaries values(466, "2012-10-22"); +insert into diaries values(467, "2012-10-23"); +insert into diaries values(468, "2012-10-24"); +insert into diaries values(469, "2012-10-25"); +insert into diaries values(470, "2012-10-26"); +insert into diaries values(471, "2012-10-27"); +insert into diaries values(472, "2012-10-28"); +insert into diaries values(473, "2012-10-29"); +insert into diaries values(474, "2012-10-30"); +insert into diaries values(475, "2012-10-31"); +insert into diaries values(476, "2012-11-01"); +insert into diaries values(477, "2012-11-02"); +insert into diaries values(478, "2012-11-03"); +insert into diaries values(479, "2012-11-04"); +insert into diaries values(480, "2012-11-05"); +insert into diaries values(481, "2012-11-06"); +insert into diaries values(482, "2012-11-07"); +insert into diaries values(483, "2012-11-08"); +insert into diaries values(484, "2012-11-09"); +insert into diaries values(485, "2012-11-10"); +insert into diaries values(486, "2012-11-11"); +insert into diaries values(487, "2012-11-12"); +insert into diaries values(488, "2012-11-13"); +insert into diaries values(489, "2012-11-14"); +insert into diaries values(490, "2012-11-15"); +insert into diaries values(491, "2012-11-16"); +insert into diaries values(492, "2012-11-17"); +insert into diaries values(493, "2012-11-18"); +insert into diaries values(494, "2012-11-19"); +insert into diaries values(495, "2012-11-20"); +insert into diaries values(496, "2012-11-21"); +insert into diaries values(497, "2012-11-22"); +insert into diaries values(498, "2012-11-23"); +insert into diaries values(499, "2012-11-24"); +insert into diaries values(500, "2012-11-25"); +insert into diaries values(501, "2012-11-26"); +insert into diaries values(502, "2012-11-27"); +insert into diaries values(503, "2012-11-28"); +insert into diaries values(504, "2012-11-29"); +insert into diaries values(505, "2012-11-30"); +insert into diaries values(506, "2012-12-01"); +insert into diaries values(507, "2012-12-02"); +insert into diaries values(508, "2012-12-03"); +insert into diaries values(509, "2012-12-04"); +insert into diaries values(510, "2012-12-05"); +insert into diaries values(511, "2012-12-06"); +insert into diaries values(512, "2012-12-07"); +insert into diaries values(513, "2012-12-08"); +insert into diaries values(514, "2012-12-09"); +insert into diaries values(515, "2012-12-10"); +insert into diaries values(516, "2012-12-11"); +insert into diaries values(517, "2012-12-12"); +insert into diaries values(518, "2012-12-13"); +insert into diaries values(519, "2012-12-14"); +insert into diaries values(520, "2012-12-15"); +insert into diaries values(521, "2012-12-16"); +insert into diaries values(522, "2012-12-17"); +insert into diaries values(523, "2012-12-18"); +insert into diaries values(524, "2012-12-19"); +insert into diaries values(525, "2012-12-20"); +insert into diaries values(526, "2012-12-21"); +insert into diaries values(527, "2012-12-22"); +insert into diaries values(528, "2012-12-23"); +insert into diaries values(529, "2012-12-24"); +insert into diaries values(530, "2012-12-25"); +insert into diaries values(531, "2012-12-26"); +insert into diaries values(532, "2012-12-27"); +insert into diaries values(533, "2012-12-28"); +insert into diaries values(534, "2012-12-29"); +insert into diaries values(535, "2012-12-30"); +insert into diaries values(536, "2012-12-31"); +insert into diaries values(537, "2013-01-01"); +insert into diaries values(538, "2013-01-02"); +insert into diaries values(539, "2013-01-03"); +insert into diaries values(540, "2013-01-04"); +insert into diaries values(541, "2013-01-05"); +insert into diaries values(542, "2013-01-06"); +insert into diaries values(543, "2013-01-07"); +insert into diaries values(544, "2013-01-08"); +insert into diaries values(545, "2013-01-09"); +insert into diaries values(546, "2013-01-10"); +insert into diaries values(547, "2013-01-11"); +insert into diaries values(548, "2013-01-12"); +insert into diaries values(549, "2013-01-13"); +insert into diaries values(550, "2013-01-14"); +insert into diaries values(551, "2013-01-15"); +insert into diaries values(552, "2013-01-16"); +insert into diaries values(553, "2013-01-17"); +insert into diaries values(554, "2013-01-18"); +insert into diaries values(555, "2013-01-19"); +insert into diaries values(556, "2013-01-20"); +insert into diaries values(557, "2013-01-21"); +insert into diaries values(558, "2013-01-22"); +insert into diaries values(559, "2013-01-23"); +insert into diaries values(560, "2013-01-24"); +insert into diaries values(561, "2013-01-25"); +insert into diaries values(562, "2013-01-26"); +insert into diaries values(563, "2013-01-27"); +insert into diaries values(564, "2013-01-28"); +insert into diaries values(565, "2013-01-29"); +insert into diaries values(566, "2013-01-30"); +insert into diaries values(567, "2013-01-31"); +insert into diaries values(568, "2013-02-01"); +insert into diaries values(569, "2013-02-02"); +insert into diaries values(570, "2013-02-03"); +insert into diaries values(571, "2013-02-04"); +insert into diaries values(572, "2013-02-05"); +insert into diaries values(573, "2013-02-06"); +insert into diaries values(574, "2013-02-07"); +insert into diaries values(575, "2013-02-08"); +insert into diaries values(576, "2013-02-09"); +insert into diaries values(577, "2013-02-10"); +insert into diaries values(578, "2013-02-11"); +insert into diaries values(579, "2013-02-12"); +insert into diaries values(580, "2013-02-13"); +insert into diaries values(581, "2013-02-14"); +insert into diaries values(582, "2013-02-15"); +insert into diaries values(583, "2013-02-16"); +insert into diaries values(584, "2013-02-17"); +insert into diaries values(585, "2013-02-18"); +insert into diaries values(586, "2013-02-19"); +insert into diaries values(587, "2013-02-20"); +insert into diaries values(588, "2013-02-21"); +insert into diaries values(589, "2013-02-22"); +insert into diaries values(590, "2013-02-23"); +insert into diaries values(591, "2013-02-24"); +insert into diaries values(592, "2013-02-25"); +insert into diaries values(593, "2013-02-26"); +insert into diaries values(594, "2013-02-27"); +insert into diaries values(595, "2013-02-28"); +insert into diaries values(596, "2013-03-01"); +insert into diaries values(597, "2013-03-02"); +insert into diaries values(598, "2013-03-03"); +insert into diaries values(599, "2013-03-04"); +insert into diaries values(600, "2013-03-05"); +insert into diaries values(601, "2013-03-06"); +insert into diaries values(602, "2013-03-07"); +insert into diaries values(603, "2013-03-08"); +insert into diaries values(604, "2013-03-09"); +insert into diaries values(605, "2013-03-10"); +insert into diaries values(606, "2013-03-11"); +insert into diaries values(607, "2013-03-12"); +insert into diaries values(608, "2013-03-13"); +insert into diaries values(609, "2013-03-14"); +insert into diaries values(610, "2013-03-15"); +insert into diaries values(611, "2013-03-16"); +insert into diaries values(612, "2013-03-17"); +insert into diaries values(613, "2013-03-18"); +insert into diaries values(614, "2013-03-19"); +insert into diaries values(615, "2013-03-20"); +insert into diaries values(616, "2013-03-21"); +insert into diaries values(617, "2013-03-22"); +insert into diaries values(618, "2013-03-23"); +insert into diaries values(619, "2013-03-24"); +insert into diaries values(620, "2013-03-25"); +insert into diaries values(621, "2013-03-26"); +insert into diaries values(622, "2013-03-27"); +insert into diaries values(623, "2013-03-28"); +insert into diaries values(624, "2013-03-29"); +insert into diaries values(625, "2013-03-30"); +insert into diaries values(626, "2013-03-31"); +insert into diaries values(627, "2013-04-01"); +insert into diaries values(628, "2013-04-02"); +insert into diaries values(629, "2013-04-03"); +insert into diaries values(630, "2013-04-04"); +insert into diaries values(631, "2013-04-05"); +insert into diaries values(632, "2013-04-06"); +insert into diaries values(633, "2013-04-07"); +insert into diaries values(634, "2013-04-08"); +insert into diaries values(635, "2013-04-09"); +insert into diaries values(636, "2013-04-10"); +insert into diaries values(637, "2013-04-11"); +insert into diaries values(638, "2013-04-12"); +insert into diaries values(639, "2013-04-13"); +insert into diaries values(640, "2013-04-14"); +insert into diaries values(641, "2013-04-15"); +insert into diaries values(642, "2013-04-16"); +insert into diaries values(643, "2013-04-17"); +insert into diaries values(644, "2013-04-18"); +insert into diaries values(645, "2013-04-19"); +insert into diaries values(646, "2013-04-20"); +insert into diaries values(647, "2013-04-21"); +insert into diaries values(648, "2013-04-22"); +insert into diaries values(649, "2013-04-23"); +insert into diaries values(650, "2013-04-24"); +insert into diaries values(651, "2013-04-25"); +insert into diaries values(652, "2013-04-26"); +insert into diaries values(653, "2013-04-27"); +insert into diaries values(654, "2013-04-28"); +insert into diaries values(655, "2013-04-29"); +insert into diaries values(656, "2013-04-30"); +insert into diaries values(657, "2013-05-01"); +insert into diaries values(658, "2013-05-02"); +insert into diaries values(659, "2013-05-03"); +insert into diaries values(660, "2013-05-04"); +insert into diaries values(661, "2013-05-05"); +insert into diaries values(662, "2013-05-06"); +insert into diaries values(663, "2013-05-07"); +insert into diaries values(664, "2013-05-08"); +insert into diaries values(665, "2013-05-09"); +insert into diaries values(666, "2013-05-10"); +insert into diaries values(667, "2013-05-11"); +insert into diaries values(668, "2013-05-12"); +insert into diaries values(669, "2013-05-13"); +insert into diaries values(670, "2013-05-14"); +insert into diaries values(671, "2013-05-15"); +insert into diaries values(672, "2013-05-16"); +insert into diaries values(673, "2013-05-17"); +insert into diaries values(674, "2013-05-18"); +insert into diaries values(675, "2013-05-19"); +insert into diaries values(676, "2013-05-20"); +insert into diaries values(677, "2013-05-21"); +insert into diaries values(678, "2013-05-22"); +insert into diaries values(679, "2013-05-23"); +insert into diaries values(680, "2013-05-24"); +insert into diaries values(681, "2013-05-25"); +insert into diaries values(682, "2013-05-26"); +insert into diaries values(683, "2013-05-27"); +insert into diaries values(684, "2013-05-28"); +insert into diaries values(685, "2013-05-29"); +insert into diaries values(686, "2013-05-30"); +insert into diaries values(687, "2013-05-31"); +insert into diaries values(688, "2013-06-01"); +insert into diaries values(689, "2013-06-02"); +insert into diaries values(690, "2013-06-03"); +insert into diaries values(691, "2013-06-04"); +insert into diaries values(692, "2013-06-05"); +insert into diaries values(693, "2013-06-06"); +insert into diaries values(694, "2013-06-07"); +insert into diaries values(695, "2013-06-08"); +insert into diaries values(696, "2013-06-09"); +insert into diaries values(697, "2013-06-10"); +insert into diaries values(698, "2013-06-11"); +insert into diaries values(699, "2013-06-12"); +insert into diaries values(700, "2013-06-13"); +insert into diaries values(701, "2013-06-14"); +insert into diaries values(702, "2013-06-15"); +insert into diaries values(703, "2013-06-16"); +insert into diaries values(704, "2013-06-17"); +insert into diaries values(705, "2013-06-18"); +insert into diaries values(706, "2013-06-19"); +insert into diaries values(707, "2013-06-20"); +insert into diaries values(708, "2013-06-21"); +insert into diaries values(709, "2013-06-22"); +insert into diaries values(710, "2013-06-23"); +insert into diaries values(711, "2013-06-24"); +insert into diaries values(712, "2013-06-25"); +insert into diaries values(713, "2013-06-26"); +insert into diaries values(714, "2013-06-27"); +insert into diaries values(715, "2013-06-28"); +insert into diaries values(716, "2013-06-29"); +insert into diaries values(717, "2013-06-30"); +insert into diaries values(718, "2013-07-01"); +insert into diaries values(719, "2013-07-02"); +insert into diaries values(720, "2013-07-03"); +insert into diaries values(721, "2013-07-04"); +insert into diaries values(722, "2013-07-05"); +insert into diaries values(723, "2013-07-06"); +insert into diaries values(724, "2013-07-07"); +insert into diaries values(725, "2013-07-08"); +insert into diaries values(726, "2013-07-09"); +insert into diaries values(727, "2013-07-10"); +insert into diaries values(728, "2013-07-11"); +insert into diaries values(729, "2013-07-12"); +insert into diaries values(730, "2013-07-13"); +insert into diaries values(731, "2013-07-14"); +insert into diaries values(732, "2013-07-15"); +insert into diaries values(733, "2013-07-16"); +insert into diaries values(734, "2013-07-17"); +insert into diaries values(735, "2013-07-18"); +insert into diaries values(736, "2013-07-19"); +insert into diaries values(737, "2013-07-20"); +insert into diaries values(738, "2013-07-21"); +insert into diaries values(739, "2013-07-22"); +insert into diaries values(740, "2013-07-23"); +insert into diaries values(741, "2013-07-24"); +insert into diaries values(742, "2013-07-25"); +insert into diaries values(743, "2013-07-26"); +insert into diaries values(744, "2013-07-27"); +insert into diaries values(745, "2013-07-28"); +insert into diaries values(746, "2013-07-29"); +insert into diaries values(747, "2013-07-30"); +insert into diaries values(748, "2013-07-31"); +insert into diaries values(749, "2013-08-01"); +insert into diaries values(750, "2013-08-02"); +insert into diaries values(751, "2013-08-03"); +insert into diaries values(752, "2013-08-04"); +insert into diaries values(753, "2013-08-05"); +insert into diaries values(754, "2013-08-06"); +insert into diaries values(755, "2013-08-07"); +insert into diaries values(756, "2013-08-08"); +insert into diaries values(757, "2013-08-09"); +insert into diaries values(758, "2013-08-10"); +insert into diaries values(759, "2013-08-11"); +insert into diaries values(760, "2013-08-12"); +insert into diaries values(761, "2013-08-13"); +insert into diaries values(762, "2013-08-14"); +insert into diaries values(763, "2013-08-15"); +insert into diaries values(764, "2013-08-16"); +insert into diaries values(765, "2013-08-17"); +insert into diaries values(766, "2013-08-18"); +insert into diaries values(767, "2013-08-19"); +insert into diaries values(768, "2013-08-20"); +insert into diaries values(769, "2013-08-21"); +insert into diaries values(770, "2013-08-22"); +insert into diaries values(771, "2013-08-23"); +insert into diaries values(772, "2013-08-24"); +insert into diaries values(773, "2013-08-25"); +insert into diaries values(774, "2013-08-26"); +insert into diaries values(775, "2013-08-27"); +insert into diaries values(776, "2013-08-28"); +insert into diaries values(777, "2013-08-29"); +insert into diaries values(778, "2013-08-30"); +insert into diaries values(779, "2013-08-31"); +insert into diaries values(780, "2013-09-01"); +insert into diaries values(781, "2013-09-02"); +insert into diaries values(782, "2013-09-03"); +insert into diaries values(783, "2013-09-04"); +insert into diaries values(784, "2013-09-05"); +insert into diaries values(785, "2013-09-06"); +insert into diaries values(786, "2013-09-07"); +insert into diaries values(787, "2013-09-08"); +insert into diaries values(788, "2013-09-09"); +insert into diaries values(789, "2013-09-10"); +insert into diaries values(790, "2013-09-11"); +insert into diaries values(791, "2013-09-12"); +insert into diaries values(792, "2013-09-13"); +insert into diaries values(793, "2013-09-14"); +insert into diaries values(794, "2013-09-15"); +insert into diaries values(795, "2013-09-16"); +insert into diaries values(796, "2013-09-17"); +insert into diaries values(797, "2013-09-18"); +insert into diaries values(798, "2013-09-19"); +insert into diaries values(799, "2013-09-20"); +insert into diaries values(800, "2013-09-21"); +insert into diaries values(801, "2013-09-22"); +insert into diaries values(802, "2013-09-23"); +insert into diaries values(803, "2013-09-24"); +insert into diaries values(804, "2013-09-25"); +insert into diaries values(805, "2013-09-26"); +insert into diaries values(806, "2013-09-27"); +insert into diaries values(807, "2013-09-28"); +insert into diaries values(808, "2013-09-29"); +insert into diaries values(809, "2013-09-30"); +insert into diaries values(810, "2013-10-01"); +insert into diaries values(811, "2013-10-02"); +insert into diaries values(812, "2013-10-03"); +insert into diaries values(813, "2013-10-04"); +insert into diaries values(814, "2013-10-05"); +insert into diaries values(815, "2013-10-06"); +insert into diaries values(816, "2013-10-07"); +insert into diaries values(817, "2013-10-08"); +insert into diaries values(818, "2013-10-09"); +insert into diaries values(819, "2013-10-10"); +insert into diaries values(820, "2013-10-11"); +insert into diaries values(821, "2013-10-12"); +insert into diaries values(822, "2013-10-13"); +insert into diaries values(823, "2013-10-14"); +insert into diaries values(824, "2013-10-15"); +insert into diaries values(825, "2013-10-16"); +insert into diaries values(826, "2013-10-17"); +insert into diaries values(827, "2013-10-18"); +insert into diaries values(828, "2013-10-19"); +insert into diaries values(829, "2013-10-20"); +insert into diaries values(830, "2013-10-21"); +insert into diaries values(831, "2013-10-22"); +insert into diaries values(832, "2013-10-23"); +insert into diaries values(833, "2013-10-24"); +insert into diaries values(834, "2013-10-25"); +insert into diaries values(835, "2013-10-26"); +insert into diaries values(836, "2013-10-27"); +insert into diaries values(837, "2013-10-28"); +insert into diaries values(838, "2013-10-29"); +insert into diaries values(839, "2013-10-30"); +insert into diaries values(840, "2013-10-31"); +insert into diaries values(841, "2013-11-01"); +insert into diaries values(842, "2013-11-02"); +insert into diaries values(843, "2013-11-03"); +insert into diaries values(844, "2013-11-04"); +insert into diaries values(845, "2013-11-05"); +insert into diaries values(846, "2013-11-06"); +insert into diaries values(847, "2013-11-07"); +insert into diaries values(848, "2013-11-08"); +insert into diaries values(849, "2013-11-09"); +insert into diaries values(850, "2013-11-10"); +insert into diaries values(851, "2013-11-11"); +insert into diaries values(852, "2013-11-12"); +insert into diaries values(853, "2013-11-13"); +insert into diaries values(854, "2013-11-14"); +insert into diaries values(855, "2013-11-15"); +insert into diaries values(856, "2013-11-16"); +insert into diaries values(857, "2013-11-17"); +insert into diaries values(858, "2013-11-18"); +insert into diaries values(859, "2013-11-19"); +insert into diaries values(860, "2013-11-20"); +insert into diaries values(861, "2013-11-21"); +insert into diaries values(862, "2013-11-22"); +insert into diaries values(863, "2013-11-23"); +insert into diaries values(864, "2013-11-24"); +insert into diaries values(865, "2013-11-25"); +insert into diaries values(866, "2013-11-26"); +insert into diaries values(867, "2013-11-27"); +insert into diaries values(868, "2013-11-28"); +insert into diaries values(869, "2013-11-29"); +insert into diaries values(870, "2013-11-30"); +insert into diaries values(871, "2013-12-01"); +insert into diaries values(872, "2013-12-02"); +insert into diaries values(873, "2013-12-03"); +insert into diaries values(874, "2013-12-04"); +insert into diaries values(875, "2013-12-05"); +insert into diaries values(876, "2013-12-06"); +insert into diaries values(877, "2013-12-07"); +insert into diaries values(878, "2013-12-08"); +insert into diaries values(879, "2013-12-09"); +insert into diaries values(880, "2013-12-10"); +insert into diaries values(881, "2013-12-11"); +insert into diaries values(882, "2013-12-12"); +insert into diaries values(883, "2013-12-13"); +insert into diaries values(884, "2013-12-14"); +insert into diaries values(885, "2013-12-15"); +insert into diaries values(886, "2013-12-16"); +insert into diaries values(887, "2013-12-17"); +insert into diaries values(888, "2013-12-18"); +insert into diaries values(889, "2013-12-19"); +insert into diaries values(890, "2013-12-20"); +insert into diaries values(891, "2013-12-21"); +insert into diaries values(892, "2013-12-22"); +insert into diaries values(893, "2013-12-23"); +insert into diaries values(894, "2013-12-24"); +insert into diaries values(895, "2013-12-25"); +insert into diaries values(896, "2013-12-26"); +insert into diaries values(897, "2013-12-27"); +insert into diaries values(898, "2013-12-28"); +insert into diaries values(899, "2013-12-29"); +insert into diaries values(900, "2013-12-30"); +insert into diaries values(901, "2013-12-31"); +insert into diaries values(902, "2014-01-01"); +insert into diaries values(903, "2014-01-02"); +insert into diaries values(904, "2014-01-03"); +insert into diaries values(905, "2014-01-04"); +insert into diaries values(906, "2014-01-05"); +insert into diaries values(907, "2014-01-06"); +insert into diaries values(908, "2014-01-07"); +insert into diaries values(909, "2014-01-08"); +insert into diaries values(910, "2014-01-09"); +insert into diaries values(911, "2014-01-10"); +insert into diaries values(912, "2014-01-11"); +insert into diaries values(913, "2014-01-12"); +insert into diaries values(914, "2014-01-13"); +insert into diaries values(915, "2014-01-14"); +insert into diaries values(916, "2014-01-15"); +insert into diaries values(917, "2014-01-16"); +insert into diaries values(918, "2014-01-17"); +insert into diaries values(919, "2014-01-18"); +insert into diaries values(920, "2014-01-19"); +insert into diaries values(921, "2014-01-20"); +insert into diaries values(922, "2014-01-21"); +insert into diaries values(923, "2014-01-22"); +insert into diaries values(924, "2014-01-23"); +insert into diaries values(925, "2014-01-24"); +insert into diaries values(926, "2014-01-25"); +insert into diaries values(927, "2014-01-26"); +insert into diaries values(928, "2014-01-27"); +insert into diaries values(929, "2014-01-28"); +insert into diaries values(930, "2014-01-29"); +insert into diaries values(931, "2014-01-30"); +insert into diaries values(932, "2014-01-31"); +insert into diaries values(933, "2014-02-01"); +insert into diaries values(934, "2014-02-02"); +insert into diaries values(935, "2014-02-03"); +insert into diaries values(936, "2014-02-04"); +insert into diaries values(937, "2014-02-05"); +insert into diaries values(938, "2014-02-06"); +insert into diaries values(939, "2014-02-07"); +insert into diaries values(940, "2014-02-08"); +insert into diaries values(941, "2014-02-09"); +insert into diaries values(942, "2014-02-10"); +insert into diaries values(943, "2014-02-11"); +insert into diaries values(944, "2014-02-12"); +insert into diaries values(945, "2014-02-13"); +insert into diaries values(946, "2014-02-14"); +insert into diaries values(947, "2014-02-15"); +insert into diaries values(948, "2014-02-16"); +insert into diaries values(949, "2014-02-17"); +insert into diaries values(950, "2014-02-18"); +insert into diaries values(951, "2014-02-19"); +insert into diaries values(952, "2014-02-20"); +insert into diaries values(953, "2014-02-21"); +insert into diaries values(954, "2014-02-22"); +insert into diaries values(955, "2014-02-23"); +insert into diaries values(956, "2014-02-24"); +insert into diaries values(957, "2014-02-25"); +insert into diaries values(958, "2014-02-26"); +insert into diaries values(959, "2014-02-27"); +insert into diaries values(960, "2014-02-28"); +insert into diaries values(961, "2014-03-01"); +insert into diaries values(962, "2014-03-02"); +insert into diaries values(963, "2014-03-03"); +insert into diaries values(964, "2014-03-04"); +insert into diaries values(965, "2014-03-05"); +insert into diaries values(966, "2014-03-06"); +insert into diaries values(967, "2014-03-07"); +insert into diaries values(968, "2014-03-08"); +insert into diaries values(969, "2014-03-09"); +insert into diaries values(970, "2014-03-10"); +insert into diaries values(971, "2014-03-11"); +insert into diaries values(972, "2014-03-12"); +insert into diaries values(973, "2014-03-13"); +insert into diaries values(974, "2014-03-14"); +insert into diaries values(975, "2014-03-15"); +insert into diaries values(976, "2014-03-16"); +insert into diaries values(977, "2014-03-17"); +insert into diaries values(978, "2014-03-18"); +insert into diaries values(979, "2014-03-19"); +insert into diaries values(980, "2014-03-20"); +insert into diaries values(981, "2014-03-21"); +insert into diaries values(982, "2014-03-22"); +insert into diaries values(983, "2014-03-23"); +insert into diaries values(984, "2014-03-24"); +insert into diaries values(985, "2014-03-25"); +insert into diaries values(986, "2014-03-26"); +insert into diaries values(987, "2014-03-27"); +insert into diaries values(988, "2014-03-28"); +insert into diaries values(989, "2014-03-29"); +insert into diaries values(990, "2014-03-30"); +insert into diaries values(991, "2014-03-31"); +insert into diaries values(992, "2014-04-01"); +insert into diaries values(993, "2014-04-02"); +insert into diaries values(994, "2014-04-03"); +insert into diaries values(995, "2014-04-04"); +insert into diaries values(996, "2014-04-05"); +insert into diaries values(997, "2014-04-06"); +insert into diaries values(998, "2014-04-07"); +insert into diaries values(999, "2014-04-08"); +insert into diaries values(1000, "2014-04-09"); +insert into diaries values(1001, "2014-04-10"); +insert into diaries values(1002, "2014-04-11"); +insert into diaries values(1003, "2014-04-12"); +insert into diaries values(1004, "2014-04-13"); +insert into diaries values(1005, "2014-04-14"); +insert into diaries values(1006, "2014-04-15"); +insert into diaries values(1007, "2014-04-16"); +insert into diaries values(1008, "2014-04-17"); +insert into diaries values(1009, "2014-04-18"); +insert into diaries values(1010, "2014-04-19"); +insert into diaries values(1011, "2014-04-20"); +insert into diaries values(1012, "2014-04-21"); +insert into diaries values(1013, "2014-04-22"); +insert into diaries values(1014, "2014-04-23"); +insert into diaries values(1015, "2014-04-24"); +insert into diaries values(1016, "2014-04-25"); +insert into diaries values(1017, "2014-04-26"); +insert into diaries values(1018, "2014-04-27"); +insert into diaries values(1019, "2014-04-28"); +insert into diaries values(1020, "2014-04-29"); +insert into diaries values(1021, "2014-04-30"); +insert into diaries values(1022, "2014-05-01"); +insert into diaries values(1023, "2014-05-02"); +insert into diaries values(1024, "2014-05-03"); +insert into diaries values(1025, "2014-05-04"); +insert into diaries values(1026, "2014-05-05"); +insert into diaries values(1027, "2014-05-06"); +insert into diaries values(1028, "2014-05-07"); +insert into diaries values(1029, "2014-05-08"); +insert into diaries values(1030, "2014-05-09"); +insert into diaries values(1031, "2014-05-10"); +insert into diaries values(1032, "2014-05-11"); +insert into diaries values(1033, "2014-05-12"); +insert into diaries values(1034, "2014-05-13"); +insert into diaries values(1035, "2014-05-14"); +insert into diaries values(1036, "2014-05-15"); +insert into diaries values(1037, "2014-05-16"); +insert into diaries values(1038, "2014-05-17"); +insert into diaries values(1039, "2014-05-18"); +insert into diaries values(1040, "2014-05-19"); +insert into diaries values(1041, "2014-05-20"); +insert into diaries values(1042, "2014-05-21"); +insert into diaries values(1043, "2014-05-22"); +insert into diaries values(1044, "2014-05-23"); +insert into diaries values(1045, "2014-05-24"); +insert into diaries values(1046, "2014-05-25"); +insert into diaries values(1047, "2014-05-26"); +insert into diaries values(1048, "2014-05-27"); +insert into diaries values(1049, "2014-05-28"); +insert into diaries values(1050, "2014-05-29"); +insert into diaries values(1051, "2014-05-30"); +insert into diaries values(1052, "2014-05-31"); +insert into diaries values(1053, "2014-06-01"); +insert into diaries values(1054, "2014-06-02"); +insert into diaries values(1055, "2014-06-03"); +insert into diaries values(1056, "2014-06-04"); +insert into diaries values(1057, "2014-06-05"); +insert into diaries values(1058, "2014-06-06"); +insert into diaries values(1059, "2014-06-07"); +insert into diaries values(1060, "2014-06-08"); +insert into diaries values(1061, "2014-06-09"); +insert into diaries values(1062, "2014-06-10"); +insert into diaries values(1063, "2014-06-11"); +insert into diaries values(1064, "2014-06-12"); +insert into diaries values(1065, "2014-06-13"); +insert into diaries values(1066, "2014-06-14"); +insert into diaries values(1067, "2014-06-15"); +insert into diaries values(1068, "2014-06-16"); +insert into diaries values(1069, "2014-06-17"); +insert into diaries values(1070, "2014-06-18"); +insert into diaries values(1071, "2014-06-19"); +insert into diaries values(1072, "2014-06-20"); +insert into diaries values(1073, "2014-06-21"); +insert into diaries values(1074, "2014-06-22"); +insert into diaries values(1075, "2014-06-23"); +insert into diaries values(1076, "2014-06-24"); +insert into diaries values(1077, "2014-06-25"); +insert into diaries values(1078, "2014-06-26"); +insert into diaries values(1079, "2014-06-27"); +insert into diaries values(1080, "2014-06-28"); +insert into diaries values(1081, "2014-06-29"); +insert into diaries values(1082, "2014-06-30"); +insert into diaries values(1083, "2014-07-01"); +insert into diaries values(1084, "2014-07-02"); +insert into diaries values(1085, "2014-07-03"); +insert into diaries values(1086, "2014-07-04"); +insert into diaries values(1087, "2014-07-05"); +insert into diaries values(1088, "2014-07-06"); +insert into diaries values(1089, "2014-07-07"); +insert into diaries values(1090, "2014-07-08"); +insert into diaries values(1091, "2014-07-09"); +insert into diaries values(1092, "2014-07-10"); +insert into diaries values(1093, "2014-07-11"); +insert into diaries values(1094, "2014-07-12"); +insert into diaries values(1095, "2014-07-13"); +insert into diaries values(1096, "2014-07-14"); +insert into diaries values(1097, "2014-07-15"); +insert into diaries values(1098, "2014-07-16"); +insert into diaries values(1099, "2014-07-17"); +insert into diaries values(1100, "2014-07-18"); +insert into diaries values(1101, "2014-07-19"); +insert into diaries values(1102, "2014-07-20"); +insert into diaries values(1103, "2014-07-21"); +insert into diaries values(1104, "2014-07-22"); +insert into diaries values(1105, "2014-07-23"); +insert into diaries values(1106, "2014-07-24"); +insert into diaries values(1107, "2014-07-25"); +insert into diaries values(1108, "2014-07-26"); +insert into diaries values(1109, "2014-07-27"); +insert into diaries values(1110, "2014-07-28"); +insert into diaries values(1111, "2014-07-29"); +insert into diaries values(1112, "2014-07-30"); +insert into diaries values(1113, "2014-07-31"); +insert into diaries values(1114, "2014-08-01"); +insert into diaries values(1115, "2014-08-02"); +insert into diaries values(1116, "2014-08-03"); +insert into diaries values(1117, "2014-08-04"); +insert into diaries values(1118, "2014-08-05"); +insert into diaries values(1119, "2014-08-06"); +insert into diaries values(1120, "2014-08-07"); +insert into diaries values(1121, "2014-08-08"); +insert into diaries values(1122, "2014-08-09"); +insert into diaries values(1123, "2014-08-10"); +insert into diaries values(1124, "2014-08-11"); +insert into diaries values(1125, "2014-08-12"); +insert into diaries values(1126, "2014-08-13"); +insert into diaries values(1127, "2014-08-14"); +insert into diaries values(1128, "2014-08-15"); +insert into diaries values(1129, "2014-08-16"); +insert into diaries values(1130, "2014-08-17"); +insert into diaries values(1131, "2014-08-18"); +insert into diaries values(1132, "2014-08-19"); +insert into diaries values(1133, "2014-08-20"); +insert into diaries values(1134, "2014-08-21"); +insert into diaries values(1135, "2014-08-22"); +insert into diaries values(1136, "2014-08-23"); +insert into diaries values(1137, "2014-08-24"); +insert into diaries values(1138, "2014-08-25"); +insert into diaries values(1139, "2014-08-26"); +insert into diaries values(1140, "2014-08-27"); +insert into diaries values(1141, "2014-08-28"); +insert into diaries values(1142, "2014-08-29"); +insert into diaries values(1143, "2014-08-30"); +insert into diaries values(1144, "2014-08-31"); +insert into diaries values(1145, "2014-09-01"); +insert into diaries values(1146, "2014-09-02"); +insert into diaries values(1147, "2014-09-03"); +insert into diaries values(1148, "2014-09-04"); +insert into diaries values(1149, "2014-09-05"); +insert into diaries values(1150, "2014-09-06"); +insert into diaries values(1151, "2014-09-07"); +insert into diaries values(1152, "2014-09-08"); +insert into diaries values(1153, "2014-09-09"); +insert into diaries values(1154, "2014-09-10"); +insert into diaries values(1155, "2014-09-11"); +insert into diaries values(1156, "2014-09-12"); +insert into diaries values(1157, "2014-09-13"); +insert into diaries values(1158, "2014-09-14"); +insert into diaries values(1159, "2014-09-15"); +insert into diaries values(1160, "2014-09-16"); +insert into diaries values(1161, "2014-09-17"); +insert into diaries values(1162, "2014-09-18"); +insert into diaries values(1163, "2014-09-19"); +insert into diaries values(1164, "2014-09-20"); +insert into diaries values(1165, "2014-09-21"); +insert into diaries values(1166, "2014-09-22"); +insert into diaries values(1167, "2014-09-23"); +insert into diaries values(1168, "2014-09-24"); +insert into diaries values(1169, "2014-09-25"); +insert into diaries values(1170, "2014-09-26"); +insert into diaries values(1171, "2014-09-27"); +insert into diaries values(1172, "2014-09-28"); +insert into diaries values(1173, "2014-09-29"); +insert into diaries values(1174, "2014-09-30"); +insert into diaries values(1175, "2014-10-01"); +insert into diaries values(1176, "2014-10-02"); +insert into diaries values(1177, "2014-10-03"); +insert into diaries values(1178, "2014-10-04"); +insert into diaries values(1179, "2014-10-05"); +insert into diaries values(1180, "2014-10-06"); +insert into diaries values(1181, "2014-10-07"); +insert into diaries values(1182, "2014-10-08"); +insert into diaries values(1183, "2014-10-09"); +insert into diaries values(1184, "2014-10-10"); +insert into diaries values(1185, "2014-10-11"); +insert into diaries values(1186, "2014-10-12"); +insert into diaries values(1187, "2014-10-13"); +insert into diaries values(1188, "2014-10-14"); +insert into diaries values(1189, "2014-10-15"); +insert into diaries values(1190, "2014-10-16"); +insert into diaries values(1191, "2014-10-17"); +insert into diaries values(1192, "2014-10-18"); +insert into diaries values(1193, "2014-10-19"); +insert into diaries values(1194, "2014-10-20"); +insert into diaries values(1195, "2014-10-21"); +insert into diaries values(1196, "2014-10-22"); +insert into diaries values(1197, "2014-10-23"); +insert into diaries values(1198, "2014-10-24"); +insert into diaries values(1199, "2014-10-25"); +insert into diaries values(1200, "2014-10-26"); +insert into diaries values(1201, "2014-10-27"); +insert into diaries values(1202, "2014-10-28"); +insert into diaries values(1203, "2014-10-29"); +insert into diaries values(1204, "2014-10-30"); +insert into diaries values(1205, "2014-10-31"); +insert into diaries values(1206, "2014-11-01"); +insert into diaries values(1207, "2014-11-02"); +insert into diaries values(1208, "2014-11-03"); +insert into diaries values(1209, "2014-11-04"); +insert into diaries values(1210, "2014-11-05"); +insert into diaries values(1211, "2014-11-06"); +insert into diaries values(1212, "2014-11-07"); +insert into diaries values(1213, "2014-11-08"); +insert into diaries values(1214, "2014-11-09"); +insert into diaries values(1215, "2014-11-10"); +insert into diaries values(1216, "2014-11-11"); +insert into diaries values(1217, "2014-11-12"); +insert into diaries values(1218, "2014-11-13"); +insert into diaries values(1219, "2014-11-14"); +insert into diaries values(1220, "2014-11-15"); +insert into diaries values(1221, "2014-11-16"); +insert into diaries values(1222, "2014-11-17"); +insert into diaries values(1223, "2014-11-18"); +insert into diaries values(1224, "2014-11-19"); +insert into diaries values(1225, "2014-11-20"); +insert into diaries values(1226, "2014-11-21"); +insert into diaries values(1227, "2014-11-22"); +insert into diaries values(1228, "2014-11-23"); +insert into diaries values(1229, "2014-11-24"); +insert into diaries values(1230, "2014-11-25"); +insert into diaries values(1231, "2014-11-26"); +insert into diaries values(1232, "2014-11-27"); +insert into diaries values(1233, "2014-11-28"); +insert into diaries values(1234, "2014-11-29"); +insert into diaries values(1235, "2014-11-30"); +insert into diaries values(1236, "2014-12-01"); +insert into diaries values(1237, "2014-12-02"); +insert into diaries values(1238, "2014-12-03"); +insert into diaries values(1239, "2014-12-04"); +insert into diaries values(1240, "2014-12-05"); +insert into diaries values(1241, "2014-12-06"); +insert into diaries values(1242, "2014-12-07"); +insert into diaries values(1243, "2014-12-08"); +insert into diaries values(1244, "2014-12-09"); +insert into diaries values(1245, "2014-12-10"); +insert into diaries values(1246, "2014-12-11"); +insert into diaries values(1247, "2014-12-12"); +insert into diaries values(1248, "2014-12-13"); +insert into diaries values(1249, "2014-12-14"); +insert into diaries values(1250, "2014-12-15"); +insert into diaries values(1251, "2014-12-16"); +insert into diaries values(1252, "2014-12-17"); +insert into diaries values(1253, "2014-12-18"); +insert into diaries values(1254, "2014-12-19"); +insert into diaries values(1255, "2014-12-20"); +insert into diaries values(1256, "2014-12-21"); +insert into diaries values(1257, "2014-12-22"); +insert into diaries values(1258, "2014-12-23"); +insert into diaries values(1259, "2014-12-24"); +insert into diaries values(1260, "2014-12-25"); +insert into diaries values(1261, "2014-12-26"); +insert into diaries values(1262, "2014-12-27"); +insert into diaries values(1263, "2014-12-28"); +insert into diaries values(1264, "2014-12-29"); +insert into diaries values(1265, "2014-12-30"); +insert into diaries values(1266, "2014-12-31"); +insert into diaries values(1267, "2015-01-01"); +insert into diaries values(1268, "2015-01-02"); +insert into diaries values(1269, "2015-01-03"); +insert into diaries values(1270, "2015-01-04"); +insert into diaries values(1271, "2015-01-05"); +insert into diaries values(1272, "2015-01-06"); +insert into diaries values(1273, "2015-01-07"); +insert into diaries values(1274, "2015-01-08"); +insert into diaries values(1275, "2015-01-09"); +insert into diaries values(1276, "2015-01-10"); +insert into diaries values(1277, "2015-01-11"); +insert into diaries values(1278, "2015-01-12"); +insert into diaries values(1279, "2015-01-13"); +insert into diaries values(1280, "2015-01-14"); +insert into diaries values(1281, "2015-01-15"); +insert into diaries values(1282, "2015-01-16"); +insert into diaries values(1283, "2015-01-17"); +insert into diaries values(1284, "2015-01-18"); +insert into diaries values(1285, "2015-01-19"); +insert into diaries values(1286, "2015-01-20"); +insert into diaries values(1287, "2015-01-21"); +insert into diaries values(1288, "2015-01-22"); +insert into diaries values(1289, "2015-01-23"); +insert into diaries values(1290, "2015-01-24"); +insert into diaries values(1291, "2015-01-25"); +insert into diaries values(1292, "2015-01-26"); +insert into diaries values(1293, "2015-01-27"); +insert into diaries values(1294, "2015-01-28"); +insert into diaries values(1295, "2015-01-29"); +insert into diaries values(1296, "2015-01-30"); +insert into diaries values(1297, "2015-01-31"); +insert into diaries values(1298, "2015-02-01"); +insert into diaries values(1299, "2015-02-02"); +insert into diaries values(1300, "2015-02-03"); +insert into diaries values(1301, "2015-02-04"); +insert into diaries values(1302, "2015-02-05"); +insert into diaries values(1303, "2015-02-06"); +insert into diaries values(1304, "2015-02-07"); +insert into diaries values(1305, "2015-02-08"); +insert into diaries values(1306, "2015-02-09"); +insert into diaries values(1307, "2015-02-10"); +insert into diaries values(1308, "2015-02-11"); +insert into diaries values(1309, "2015-02-12"); +insert into diaries values(1310, "2015-02-13"); +insert into diaries values(1311, "2015-02-14"); +insert into diaries values(1312, "2015-02-15"); +insert into diaries values(1313, "2015-02-16"); +insert into diaries values(1314, "2015-02-17"); +insert into diaries values(1315, "2015-02-18"); +insert into diaries values(1316, "2015-02-19"); +insert into diaries values(1317, "2015-02-20"); +insert into diaries values(1318, "2015-02-21"); +insert into diaries values(1319, "2015-02-22"); +insert into diaries values(1320, "2015-02-23"); +insert into diaries values(1321, "2015-02-24"); +insert into diaries values(1322, "2015-02-25"); +insert into diaries values(1323, "2015-02-26"); +insert into diaries values(1324, "2015-02-27"); +insert into diaries values(1325, "2015-02-28"); +insert into diaries values(1326, "2015-03-01"); +insert into diaries values(1327, "2015-03-02"); +insert into diaries values(1328, "2015-03-03"); +insert into diaries values(1329, "2015-03-04"); +insert into diaries values(1330, "2015-03-05"); +insert into diaries values(1331, "2015-03-06"); +insert into diaries values(1332, "2015-03-07"); +insert into diaries values(1333, "2015-03-08"); +insert into diaries values(1334, "2015-03-09"); +insert into diaries values(1335, "2015-03-10"); +insert into diaries values(1336, "2015-03-11"); +insert into diaries values(1337, "2015-03-12"); +insert into diaries values(1338, "2015-03-13"); +insert into diaries values(1339, "2015-03-14"); +insert into diaries values(1340, "2015-03-15"); +insert into diaries values(1341, "2015-03-16"); +insert into diaries values(1342, "2015-03-17"); +insert into diaries values(1343, "2015-03-18"); +insert into diaries values(1344, "2015-03-19"); +insert into diaries values(1345, "2015-03-20"); +insert into diaries values(1346, "2015-03-21"); +insert into diaries values(1347, "2015-03-22"); +insert into diaries values(1348, "2015-03-23"); +insert into diaries values(1349, "2015-03-24"); +insert into diaries values(1350, "2015-03-25"); +insert into diaries values(1351, "2015-03-26"); +insert into diaries values(1352, "2015-03-27"); +insert into diaries values(1353, "2015-03-28"); +insert into diaries values(1354, "2015-03-29"); +insert into diaries values(1355, "2015-03-30"); +insert into diaries values(1356, "2015-03-31"); +insert into diaries values(1357, "2015-04-01"); +insert into diaries values(1358, "2015-04-02"); +insert into diaries values(1359, "2015-04-03"); +insert into diaries values(1360, "2015-04-04"); +insert into diaries values(1361, "2015-04-05"); +insert into diaries values(1362, "2015-04-06"); +insert into diaries values(1363, "2015-04-07"); +insert into diaries values(1364, "2015-04-08"); +insert into diaries values(1365, "2015-04-09"); +insert into diaries values(1366, "2015-04-10"); +insert into diaries values(1367, "2015-04-11"); +insert into diaries values(1368, "2015-04-12"); +insert into diaries values(1369, "2015-04-13"); +insert into diaries values(1370, "2015-04-14"); +insert into diaries values(1371, "2015-04-15"); +insert into diaries values(1372, "2015-04-16"); +insert into diaries values(1373, "2015-04-17"); +insert into diaries values(1374, "2015-04-18"); +insert into diaries values(1375, "2015-04-19"); +insert into diaries values(1376, "2015-04-20"); +insert into diaries values(1377, "2015-04-21"); +insert into diaries values(1378, "2015-04-22"); +insert into diaries values(1379, "2015-04-23"); +insert into diaries values(1380, "2015-04-24"); +insert into diaries values(1381, "2015-04-25"); +insert into diaries values(1382, "2015-04-26"); +insert into diaries values(1383, "2015-04-27"); +insert into diaries values(1384, "2015-04-28"); +insert into diaries values(1385, "2015-04-29"); +insert into diaries values(1386, "2015-04-30"); +insert into diaries values(1387, "2015-05-01"); +insert into diaries values(1388, "2015-05-02"); +insert into diaries values(1389, "2015-05-03"); +insert into diaries values(1390, "2015-05-04"); +insert into diaries values(1391, "2015-05-05"); +insert into diaries values(1392, "2015-05-06"); +insert into diaries values(1393, "2015-05-07"); +insert into diaries values(1394, "2015-05-08"); +insert into diaries values(1395, "2015-05-09"); +insert into diaries values(1396, "2015-05-10"); +insert into diaries values(1397, "2015-05-11"); +insert into diaries values(1398, "2015-05-12"); +insert into diaries values(1399, "2015-05-13"); +insert into diaries values(1400, "2015-05-14"); +insert into diaries values(1401, "2015-05-15"); +insert into diaries values(1402, "2015-05-16"); +insert into diaries values(1403, "2015-05-17"); +insert into diaries values(1404, "2015-05-18"); +insert into diaries values(1405, "2015-05-19"); +insert into diaries values(1406, "2015-05-20"); +insert into diaries values(1407, "2015-05-21"); +insert into diaries values(1408, "2015-05-22"); +insert into diaries values(1409, "2015-05-23"); +insert into diaries values(1410, "2015-05-24"); +insert into diaries values(1411, "2015-05-25"); +insert into diaries values(1412, "2015-05-26"); +insert into diaries values(1413, "2015-05-27"); +insert into diaries values(1414, "2015-05-28"); +insert into diaries values(1415, "2015-05-29"); +insert into diaries values(1416, "2015-05-30"); +insert into diaries values(1417, "2015-05-31"); +insert into diaries values(1418, "2015-06-01"); +insert into diaries values(1419, "2015-06-02"); +insert into diaries values(1420, "2015-06-03"); +insert into diaries values(1421, "2015-06-04"); +insert into diaries values(1422, "2015-06-05"); +insert into diaries values(1423, "2015-06-06"); +insert into diaries values(1424, "2015-06-07"); +insert into diaries values(1425, "2015-06-08"); +insert into diaries values(1426, "2015-06-09"); +insert into diaries values(1427, "2015-06-10"); +insert into diaries values(1428, "2015-06-11"); +insert into diaries values(1429, "2015-06-12"); +insert into diaries values(1430, "2015-06-13"); +insert into diaries values(1431, "2015-06-14"); +insert into diaries values(1432, "2015-06-15"); +insert into diaries values(1433, "2015-06-16"); +insert into diaries values(1434, "2015-06-17"); +insert into diaries values(1435, "2015-06-18"); +insert into diaries values(1436, "2015-06-19"); +insert into diaries values(1437, "2015-06-20"); +insert into diaries values(1438, "2015-06-21"); +insert into diaries values(1439, "2015-06-22"); +insert into diaries values(1440, "2015-06-23"); +insert into diaries values(1441, "2015-06-24"); +insert into diaries values(1442, "2015-06-25"); +insert into diaries values(1443, "2015-06-26"); +insert into diaries values(1444, "2015-06-27"); +insert into diaries values(1445, "2015-06-28"); +insert into diaries values(1446, "2015-06-29"); +insert into diaries values(1447, "2015-06-30"); +insert into diaries values(1448, "2015-07-01"); +insert into diaries values(1449, "2015-07-02"); +insert into diaries values(1450, "2015-07-03"); +insert into diaries values(1451, "2015-07-04"); +insert into diaries values(1452, "2015-07-05"); +insert into diaries values(1453, "2015-07-06"); +insert into diaries values(1454, "2015-07-07"); +insert into diaries values(1455, "2015-07-08"); +insert into diaries values(1456, "2015-07-09"); +insert into diaries values(1457, "2015-07-10"); +insert into diaries values(1458, "2015-07-11"); +insert into diaries values(1459, "2015-07-12"); +insert into diaries values(1460, "2015-07-13"); +insert into diaries values(1461, "2015-07-14"); +insert into diaries values(1462, "2015-07-15"); +insert into diaries values(1463, "2015-07-16"); +insert into diaries values(1464, "2015-07-17"); +insert into diaries values(1465, "2015-07-18"); +insert into diaries values(1466, "2015-07-19"); +insert into diaries values(1467, "2015-07-20"); +insert into diaries values(1468, "2015-07-21"); +insert into diaries values(1469, "2015-07-22"); +insert into diaries values(1470, "2015-07-23"); +insert into diaries values(1471, "2015-07-24"); +insert into diaries values(1472, "2015-07-25"); +insert into diaries values(1473, "2015-07-26"); +insert into diaries values(1474, "2015-07-27"); +insert into diaries values(1475, "2015-07-28"); +insert into diaries values(1476, "2015-07-29"); +insert into diaries values(1477, "2015-07-30"); +insert into diaries values(1478, "2015-07-31"); +insert into diaries values(1479, "2015-08-01"); +insert into diaries values(1480, "2015-08-02"); +insert into diaries values(1481, "2015-08-03"); +insert into diaries values(1482, "2015-08-04"); +insert into diaries values(1483, "2015-08-05"); +insert into diaries values(1484, "2015-08-06"); +insert into diaries values(1485, "2015-08-07"); +insert into diaries values(1486, "2015-08-08"); +insert into diaries values(1487, "2015-08-09"); +insert into diaries values(1488, "2015-08-10"); +insert into diaries values(1489, "2015-08-11"); +insert into diaries values(1490, "2015-08-12"); +insert into diaries values(1491, "2015-08-13"); +insert into diaries values(1492, "2015-08-14"); +insert into diaries values(1493, "2015-08-15"); +insert into diaries values(1494, "2015-08-16"); +insert into diaries values(1495, "2015-08-17"); +insert into diaries values(1496, "2015-08-18"); +insert into diaries values(1497, "2015-08-19"); +insert into diaries values(1498, "2015-08-20"); +insert into diaries values(1499, "2015-08-21"); +insert into diaries values(1500, "2015-08-22"); +insert into diaries values(1501, "2015-08-23"); +insert into diaries values(1502, "2015-08-24"); +insert into diaries values(1503, "2015-08-25"); +insert into diaries values(1504, "2015-08-26"); +insert into diaries values(1505, "2015-08-27"); +insert into diaries values(1506, "2015-08-28"); +insert into diaries values(1507, "2015-08-29"); +insert into diaries values(1508, "2015-08-30"); +insert into diaries values(1509, "2015-08-31"); +insert into diaries values(1510, "2015-09-01"); +insert into diaries values(1511, "2015-09-02"); +insert into diaries values(1512, "2015-09-03"); +insert into diaries values(1513, "2015-09-04"); +insert into diaries values(1514, "2015-09-05"); +insert into diaries values(1515, "2015-09-06"); +insert into diaries values(1516, "2015-09-07"); +insert into diaries values(1517, "2015-09-08"); +insert into diaries values(1518, "2015-09-09"); +insert into diaries values(1519, "2015-09-10"); +insert into diaries values(1520, "2015-09-11"); +insert into diaries values(1521, "2015-09-12"); +insert into diaries values(1522, "2015-09-13"); +insert into diaries values(1523, "2015-09-14"); +insert into diaries values(1524, "2015-09-15"); +insert into diaries values(1525, "2015-09-16"); +insert into diaries values(1526, "2015-09-17"); +insert into diaries values(1527, "2015-09-18"); +insert into diaries values(1528, "2015-09-19"); +insert into diaries values(1529, "2015-09-20"); +insert into diaries values(1530, "2015-09-21"); +insert into diaries values(1531, "2015-09-22"); +insert into diaries values(1532, "2015-09-23"); +insert into diaries values(1533, "2015-09-24"); +insert into diaries values(1534, "2015-09-25"); +insert into diaries values(1535, "2015-09-26"); +insert into diaries values(1536, "2015-09-27"); +insert into diaries values(1537, "2015-09-28"); +insert into diaries values(1538, "2015-09-29"); +insert into diaries values(1539, "2015-09-30"); +insert into diaries values(1540, "2015-10-01"); +insert into diaries values(1541, "2015-10-02"); +insert into diaries values(1542, "2015-10-03"); +insert into diaries values(1543, "2015-10-04"); +insert into diaries values(1544, "2015-10-05"); +insert into diaries values(1545, "2015-10-06"); +insert into diaries values(1546, "2015-10-07"); +insert into diaries values(1547, "2015-10-08"); +insert into diaries values(1548, "2015-10-09"); +insert into diaries values(1549, "2015-10-10"); +insert into diaries values(1550, "2015-10-11"); +insert into diaries values(1551, "2015-10-12"); +insert into diaries values(1552, "2015-10-13"); +insert into diaries values(1553, "2015-10-14"); +insert into diaries values(1554, "2015-10-15"); +insert into diaries values(1555, "2015-10-16"); +insert into diaries values(1556, "2015-10-17"); +insert into diaries values(1557, "2015-10-18"); +insert into diaries values(1558, "2015-10-19"); +insert into diaries values(1559, "2015-10-20"); +insert into diaries values(1560, "2015-10-21"); +insert into diaries values(1561, "2015-10-22"); +insert into diaries values(1562, "2015-10-23"); +insert into diaries values(1563, "2015-10-24"); +insert into diaries values(1564, "2015-10-25"); +insert into diaries values(1565, "2015-10-26"); +insert into diaries values(1566, "2015-10-27"); +insert into diaries values(1567, "2015-10-28"); +insert into diaries values(1568, "2015-10-29"); +insert into diaries values(1569, "2015-10-30"); +insert into diaries values(1570, "2015-10-31"); +insert into diaries values(1571, "2015-11-01"); +insert into diaries values(1572, "2015-11-02"); +insert into diaries values(1573, "2015-11-03"); +insert into diaries values(1574, "2015-11-04"); +insert into diaries values(1575, "2015-11-05"); +insert into diaries values(1576, "2015-11-06"); +insert into diaries values(1577, "2015-11-07"); +insert into diaries values(1578, "2015-11-08"); +insert into diaries values(1579, "2015-11-09"); +insert into diaries values(1580, "2015-11-10"); +insert into diaries values(1581, "2015-11-11"); +insert into diaries values(1582, "2015-11-12"); +insert into diaries values(1583, "2015-11-13"); +insert into diaries values(1584, "2015-11-14"); +insert into diaries values(1585, "2015-11-15"); +insert into diaries values(1586, "2015-11-16"); +insert into diaries values(1587, "2015-11-17"); +insert into diaries values(1588, "2015-11-18"); +insert into diaries values(1589, "2015-11-19"); +insert into diaries values(1590, "2015-11-20"); +insert into diaries values(1591, "2015-11-21"); +insert into diaries values(1592, "2015-11-22"); +insert into diaries values(1593, "2015-11-23"); +insert into diaries values(1594, "2015-11-24"); +insert into diaries values(1595, "2015-11-25"); +insert into diaries values(1596, "2015-11-26"); +insert into diaries values(1597, "2015-11-27"); +insert into diaries values(1598, "2015-11-28"); +insert into diaries values(1599, "2015-11-29"); +insert into diaries values(1600, "2015-11-30"); +insert into diaries values(1601, "2015-12-01"); +insert into diaries values(1602, "2015-12-02"); +insert into diaries values(1603, "2015-12-03"); +insert into diaries values(1604, "2015-12-04"); +insert into diaries values(1605, "2015-12-05"); +insert into diaries values(1606, "2015-12-06"); +insert into diaries values(1607, "2015-12-07"); +insert into diaries values(1608, "2015-12-08"); +insert into diaries values(1609, "2015-12-09"); +insert into diaries values(1610, "2015-12-10"); +insert into diaries values(1611, "2015-12-11"); +insert into diaries values(1612, "2015-12-12"); +insert into diaries values(1613, "2015-12-13"); +insert into diaries values(1614, "2015-12-14"); +insert into diaries values(1615, "2015-12-15"); +insert into diaries values(1616, "2015-12-16"); +insert into diaries values(1617, "2015-12-17"); +insert into diaries values(1618, "2015-12-18"); +insert into diaries values(1619, "2015-12-19"); +insert into diaries values(1620, "2015-12-20"); +insert into diaries values(1621, "2015-12-21"); +insert into diaries values(1622, "2015-12-22"); +insert into diaries values(1623, "2015-12-23"); +insert into diaries values(1624, "2015-12-24"); +insert into diaries values(1625, "2015-12-25"); +insert into diaries values(1626, "2015-12-26"); +insert into diaries values(1627, "2015-12-27"); +insert into diaries values(1628, "2015-12-28"); +insert into diaries values(1629, "2015-12-29"); +insert into diaries values(1630, "2015-12-30"); +insert into diaries values(1631, "2015-12-31"); +insert into diaries values(1632, "2016-01-01"); +insert into diaries values(1633, "2016-01-02"); +insert into diaries values(1634, "2016-01-03"); +insert into diaries values(1635, "2016-01-04"); +insert into diaries values(1636, "2016-01-05"); +insert into diaries values(1637, "2016-01-06"); +insert into diaries values(1638, "2016-01-07"); +insert into diaries values(1639, "2016-01-08"); +insert into diaries values(1640, "2016-01-09"); +insert into diaries values(1641, "2016-01-10"); +insert into diaries values(1642, "2016-01-11"); +insert into diaries values(1643, "2016-01-12"); +insert into diaries values(1644, "2016-01-13"); +insert into diaries values(1645, "2016-01-14"); +insert into diaries values(1646, "2016-01-15"); +insert into diaries values(1647, "2016-01-16"); +insert into diaries values(1648, "2016-01-17"); +insert into diaries values(1649, "2016-01-18"); +insert into diaries values(1650, "2016-01-19"); +insert into diaries values(1651, "2016-01-20"); +insert into diaries values(1652, "2016-01-21"); +insert into diaries values(1653, "2016-01-22"); +insert into diaries values(1654, "2016-01-23"); +insert into diaries values(1655, "2016-01-24"); +insert into diaries values(1656, "2016-01-25"); +insert into diaries values(1657, "2016-01-26"); +insert into diaries values(1658, "2016-01-27"); +insert into diaries values(1659, "2016-01-28"); +insert into diaries values(1660, "2016-01-29"); +insert into diaries values(1661, "2016-01-30"); +insert into diaries values(1662, "2016-01-31"); +insert into diaries values(1663, "2016-02-01"); +insert into diaries values(1664, "2016-02-02"); +insert into diaries values(1665, "2016-02-03"); +insert into diaries values(1666, "2016-02-04"); +insert into diaries values(1667, "2016-02-05"); +insert into diaries values(1668, "2016-02-06"); +insert into diaries values(1669, "2016-02-07"); +insert into diaries values(1670, "2016-02-08"); +insert into diaries values(1671, "2016-02-09"); +insert into diaries values(1672, "2016-02-10"); +insert into diaries values(1673, "2016-02-11"); +insert into diaries values(1674, "2016-02-12"); +insert into diaries values(1675, "2016-02-13"); +insert into diaries values(1676, "2016-02-14"); +insert into diaries values(1677, "2016-02-15"); +insert into diaries values(1678, "2016-02-16"); +insert into diaries values(1679, "2016-02-17"); +insert into diaries values(1680, "2016-02-18"); +insert into diaries values(1681, "2016-02-19"); +insert into diaries values(1682, "2016-02-20"); +insert into diaries values(1683, "2016-02-21"); +insert into diaries values(1684, "2016-02-22"); +insert into diaries values(1685, "2016-02-23"); +insert into diaries values(1686, "2016-02-24"); +insert into diaries values(1687, "2016-02-25"); +insert into diaries values(1688, "2016-02-26"); +insert into diaries values(1689, "2016-02-27"); +insert into diaries values(1690, "2016-02-28"); +insert into diaries values(1691, "2016-02-29"); +insert into diaries values(1692, "2016-03-01"); +insert into diaries values(1693, "2016-03-02"); +insert into diaries values(1694, "2016-03-03"); +insert into diaries values(1695, "2016-03-04"); +insert into diaries values(1696, "2016-03-05"); +insert into diaries values(1697, "2016-03-06"); +insert into diaries values(1698, "2016-03-07"); +insert into diaries values(1699, "2016-03-08"); +insert into diaries values(1700, "2016-03-09"); +insert into diaries values(1701, "2016-03-10"); +insert into diaries values(1702, "2016-03-11"); +insert into diaries values(1703, "2016-03-12"); +insert into diaries values(1704, "2016-03-13"); +insert into diaries values(1705, "2016-03-14"); +insert into diaries values(1706, "2016-03-15"); +insert into diaries values(1707, "2016-03-16"); +insert into diaries values(1708, "2016-03-17"); +insert into diaries values(1709, "2016-03-18"); +insert into diaries values(1710, "2016-03-19"); +insert into diaries values(1711, "2016-03-20"); +insert into diaries values(1712, "2016-03-21"); +insert into diaries values(1713, "2016-03-22"); +insert into diaries values(1714, "2016-03-23"); +insert into diaries values(1715, "2016-03-24"); +insert into diaries values(1716, "2016-03-25"); +insert into diaries values(1717, "2016-03-26"); +insert into diaries values(1718, "2016-03-27"); +insert into diaries values(1719, "2016-03-28"); +insert into diaries values(1720, "2016-03-29"); +insert into diaries values(1721, "2016-03-30"); +insert into diaries values(1722, "2016-03-31"); +insert into diaries values(1723, "2016-04-01"); +insert into diaries values(1724, "2016-04-02"); +insert into diaries values(1725, "2016-04-03"); +insert into diaries values(1726, "2016-04-04"); +insert into diaries values(1727, "2016-04-05"); +insert into diaries values(1728, "2016-04-06"); +insert into diaries values(1729, "2016-04-07"); +insert into diaries values(1730, "2016-04-08"); +insert into diaries values(1731, "2016-04-09"); +insert into diaries values(1732, "2016-04-10"); +insert into diaries values(1733, "2016-04-11"); +insert into diaries values(1734, "2016-04-12"); +insert into diaries values(1735, "2016-04-13"); +insert into diaries values(1736, "2016-04-14"); +insert into diaries values(1737, "2016-04-15"); +insert into diaries values(1738, "2016-04-16"); +insert into diaries values(1739, "2016-04-17"); +insert into diaries values(1740, "2016-04-18"); +insert into diaries values(1741, "2016-04-19"); +insert into diaries values(1742, "2016-04-20"); +insert into diaries values(1743, "2016-04-21"); +insert into diaries values(1744, "2016-04-22"); +insert into diaries values(1745, "2016-04-23"); +insert into diaries values(1746, "2016-04-24"); +insert into diaries values(1747, "2016-04-25"); +insert into diaries values(1748, "2016-04-26"); +insert into diaries values(1749, "2016-04-27"); +insert into diaries values(1750, "2016-04-28"); +insert into diaries values(1751, "2016-04-29"); +insert into diaries values(1752, "2016-04-30"); +insert into diaries values(1753, "2016-05-01"); +insert into diaries values(1754, "2016-05-02"); +insert into diaries values(1755, "2016-05-03"); +insert into diaries values(1756, "2016-05-04"); +insert into diaries values(1757, "2016-05-05"); +insert into diaries values(1758, "2016-05-06"); +insert into diaries values(1759, "2016-05-07"); +insert into diaries values(1760, "2016-05-08"); +insert into diaries values(1761, "2016-05-09"); +insert into diaries values(1762, "2016-05-10"); +insert into diaries values(1763, "2016-05-11"); +insert into diaries values(1764, "2016-05-12"); +insert into diaries values(1765, "2016-05-13"); +insert into diaries values(1766, "2016-05-14"); +insert into diaries values(1767, "2016-05-15"); +insert into diaries values(1768, "2016-05-16"); +insert into diaries values(1769, "2016-05-17"); +insert into diaries values(1770, "2016-05-18"); +insert into diaries values(1771, "2016-05-19"); +insert into diaries values(1772, "2016-05-20"); +insert into diaries values(1773, "2016-05-21"); +insert into diaries values(1774, "2016-05-22"); +insert into diaries values(1775, "2016-05-23"); +insert into diaries values(1776, "2016-05-24"); +insert into diaries values(1777, "2016-05-25"); +insert into diaries values(1778, "2016-05-26"); +insert into diaries values(1779, "2016-05-27"); +insert into diaries values(1780, "2016-05-28"); +insert into diaries values(1781, "2016-05-29"); +insert into diaries values(1782, "2016-05-30"); +insert into diaries values(1783, "2016-05-31"); +insert into diaries values(1784, "2016-06-01"); +insert into diaries values(1785, "2016-06-02"); +insert into diaries values(1786, "2016-06-03"); +insert into diaries values(1787, "2016-06-04"); +insert into diaries values(1788, "2016-06-05"); +insert into diaries values(1789, "2016-06-06"); +insert into diaries values(1790, "2016-06-07"); +insert into diaries values(1791, "2016-06-08"); +insert into diaries values(1792, "2016-06-09"); +insert into diaries values(1793, "2016-06-10"); +insert into diaries values(1794, "2016-06-11"); +insert into diaries values(1795, "2016-06-12"); +insert into diaries values(1796, "2016-06-13"); +insert into diaries values(1797, "2016-06-14"); +insert into diaries values(1798, "2016-06-15"); +insert into diaries values(1799, "2016-06-16"); +insert into diaries values(1800, "2016-06-17"); +insert into diaries values(1801, "2016-06-18"); +insert into diaries values(1802, "2016-06-19"); +insert into diaries values(1803, "2016-06-20"); +insert into diaries values(1804, "2016-06-21"); +insert into diaries values(1805, "2016-06-22"); +insert into diaries values(1806, "2016-06-23"); +insert into diaries values(1807, "2016-06-24"); +insert into diaries values(1808, "2016-06-25"); +insert into diaries values(1809, "2016-06-26"); +insert into diaries values(1810, "2016-06-27"); +insert into diaries values(1811, "2016-06-28"); +insert into diaries values(1812, "2016-06-29"); +insert into diaries values(1813, "2016-06-30"); +insert into diaries values(1814, "2016-07-01"); +insert into diaries values(1815, "2016-07-02"); +insert into diaries values(1816, "2016-07-03"); +insert into diaries values(1817, "2016-07-04"); +insert into diaries values(1818, "2016-07-05"); +insert into diaries values(1819, "2016-07-06"); +insert into diaries values(1820, "2016-07-07"); +insert into diaries values(1821, "2016-07-08"); +insert into diaries values(1822, "2016-07-09"); +insert into diaries values(1823, "2016-07-10"); +insert into diaries values(1824, "2016-07-11"); +insert into diaries values(1825, "2016-07-12"); +insert into diaries values(1826, "2016-07-13"); +insert into diaries values(1827, "2016-07-14"); +insert into diaries values(1828, "2016-07-15"); +insert into diaries values(1829, "2016-07-16"); +insert into diaries values(1830, "2016-07-17"); +insert into diaries values(1831, "2016-07-18"); +insert into diaries values(1832, "2016-07-19"); +insert into diaries values(1833, "2016-07-20"); +insert into diaries values(1834, "2016-07-21"); +insert into diaries values(1835, "2016-07-22"); +insert into diaries values(1836, "2016-07-23"); +insert into diaries values(1837, "2016-07-24"); +insert into diaries values(1838, "2016-07-25"); +insert into diaries values(1839, "2016-07-26"); +insert into diaries values(1840, "2016-07-27"); +insert into diaries values(1841, "2016-07-28"); +insert into diaries values(1842, "2016-07-29"); +insert into diaries values(1843, "2016-07-30"); +insert into diaries values(1844, "2016-07-31"); +insert into diaries values(1845, "2016-08-01"); +insert into diaries values(1846, "2016-08-02"); +insert into diaries values(1847, "2016-08-03"); +insert into diaries values(1848, "2016-08-04"); +insert into diaries values(1849, "2016-08-05"); +insert into diaries values(1850, "2016-08-06"); +insert into diaries values(1851, "2016-08-07"); +insert into diaries values(1852, "2016-08-08"); +insert into diaries values(1853, "2016-08-09"); +insert into diaries values(1854, "2016-08-10"); +insert into diaries values(1855, "2016-08-11"); +insert into diaries values(1856, "2016-08-12"); +insert into diaries values(1857, "2016-08-13"); +insert into diaries values(1858, "2016-08-14"); +insert into diaries values(1859, "2016-08-15"); +insert into diaries values(1860, "2016-08-16"); +insert into diaries values(1861, "2016-08-17"); +insert into diaries values(1862, "2016-08-18"); +insert into diaries values(1863, "2016-08-19"); +insert into diaries values(1864, "2016-08-20"); +insert into diaries values(1865, "2016-08-21"); +insert into diaries values(1866, "2016-08-22"); +insert into diaries values(1867, "2016-08-23"); +insert into diaries values(1868, "2016-08-24"); +insert into diaries values(1869, "2016-08-25"); +insert into diaries values(1870, "2016-08-26"); +insert into diaries values(1871, "2016-08-27"); +insert into diaries values(1872, "2016-08-28"); +insert into diaries values(1873, "2016-08-29"); +insert into diaries values(1874, "2016-08-30"); +insert into diaries values(1875, "2016-08-31"); +insert into diaries values(1876, "2016-09-01"); +insert into diaries values(1877, "2016-09-02"); +insert into diaries values(1878, "2016-09-03"); +insert into diaries values(1879, "2016-09-04"); +insert into diaries values(1880, "2016-09-05"); +insert into diaries values(1881, "2016-09-06"); +insert into diaries values(1882, "2016-09-07"); +insert into diaries values(1883, "2016-09-08"); +insert into diaries values(1884, "2016-09-09"); +insert into diaries values(1885, "2016-09-10"); +insert into diaries values(1886, "2016-09-11"); +insert into diaries values(1887, "2016-09-12"); +insert into diaries values(1888, "2016-09-13"); +insert into diaries values(1889, "2016-09-14"); +insert into diaries values(1890, "2016-09-15"); +insert into diaries values(1891, "2016-09-16"); +insert into diaries values(1892, "2016-09-17"); +insert into diaries values(1893, "2016-09-18"); +insert into diaries values(1894, "2016-09-19"); +insert into diaries values(1895, "2016-09-20"); +insert into diaries values(1896, "2016-09-21"); +insert into diaries values(1897, "2016-09-22"); +insert into diaries values(1898, "2016-09-23"); +insert into diaries values(1899, "2016-09-24"); +insert into diaries values(1900, "2016-09-25"); +insert into diaries values(1901, "2016-09-26"); +insert into diaries values(1902, "2016-09-27"); +insert into diaries values(1903, "2016-09-28"); +insert into diaries values(1904, "2016-09-29"); +insert into diaries values(1905, "2016-09-30"); +insert into diaries values(1906, "2016-10-01"); +insert into diaries values(1907, "2016-10-02"); +insert into diaries values(1908, "2016-10-03"); +insert into diaries values(1909, "2016-10-04"); +insert into diaries values(1910, "2016-10-05"); +insert into diaries values(1911, "2016-10-06"); +insert into diaries values(1912, "2016-10-07"); +insert into diaries values(1913, "2016-10-08"); +insert into diaries values(1914, "2016-10-09"); +insert into diaries values(1915, "2016-10-10"); +insert into diaries values(1916, "2016-10-11"); +insert into diaries values(1917, "2016-10-12"); +insert into diaries values(1918, "2016-10-13"); +insert into diaries values(1919, "2016-10-14"); +insert into diaries values(1920, "2016-10-15"); +insert into diaries values(1921, "2016-10-16"); +insert into diaries values(1922, "2016-10-17"); +insert into diaries values(1923, "2016-10-18"); +insert into diaries values(1924, "2016-10-19"); +insert into diaries values(1925, "2016-10-20"); +insert into diaries values(1926, "2016-10-21"); +insert into diaries values(1927, "2016-10-22"); +insert into diaries values(1928, "2016-10-23"); +insert into diaries values(1929, "2016-10-24"); +insert into diaries values(1930, "2016-10-25"); +insert into diaries values(1931, "2016-10-26"); +insert into diaries values(1932, "2016-10-27"); +insert into diaries values(1933, "2016-10-28"); +insert into diaries values(1934, "2016-10-29"); +insert into diaries values(1935, "2016-10-30"); +insert into diaries values(1936, "2016-10-31"); +insert into diaries values(1937, "2016-11-01"); +insert into diaries values(1938, "2016-11-02"); +insert into diaries values(1939, "2016-11-03"); +insert into diaries values(1940, "2016-11-04"); +insert into diaries values(1941, "2016-11-05"); +insert into diaries values(1942, "2016-11-06"); +insert into diaries values(1943, "2016-11-07"); +insert into diaries values(1944, "2016-11-08"); +insert into diaries values(1945, "2016-11-09"); +insert into diaries values(1946, "2016-11-10"); +insert into diaries values(1947, "2016-11-11"); +insert into diaries values(1948, "2016-11-12"); +insert into diaries values(1949, "2016-11-13"); +insert into diaries values(1950, "2016-11-14"); +insert into diaries values(1951, "2016-11-15"); +insert into diaries values(1952, "2016-11-16"); +insert into diaries values(1953, "2016-11-17"); +insert into diaries values(1954, "2016-11-18"); +insert into diaries values(1955, "2016-11-19"); +insert into diaries values(1956, "2016-11-20"); +insert into diaries values(1957, "2016-11-21"); +insert into diaries values(1958, "2016-11-22"); +insert into diaries values(1959, "2016-11-23"); +insert into diaries values(1960, "2016-11-24"); +insert into diaries values(1961, "2016-11-25"); +insert into diaries values(1962, "2016-11-26"); +insert into diaries values(1963, "2016-11-27"); +insert into diaries values(1964, "2016-11-28"); +insert into diaries values(1965, "2016-11-29"); +insert into diaries values(1966, "2016-11-30"); +insert into diaries values(1967, "2016-12-01"); +insert into diaries values(1968, "2016-12-02"); +insert into diaries values(1969, "2016-12-03"); +insert into diaries values(1970, "2016-12-04"); +insert into diaries values(1971, "2016-12-05"); +insert into diaries values(1972, "2016-12-06"); +insert into diaries values(1973, "2016-12-07"); +insert into diaries values(1974, "2016-12-08"); +insert into diaries values(1975, "2016-12-09"); +insert into diaries values(1976, "2016-12-10"); +insert into diaries values(1977, "2016-12-11"); +insert into diaries values(1978, "2016-12-12"); +insert into diaries values(1979, "2016-12-13"); +insert into diaries values(1980, "2016-12-14"); +insert into diaries values(1981, "2016-12-15"); +insert into diaries values(1982, "2016-12-16"); +insert into diaries values(1983, "2016-12-17"); +insert into diaries values(1984, "2016-12-18"); +insert into diaries values(1985, "2016-12-19"); +insert into diaries values(1986, "2016-12-20"); +insert into diaries values(1987, "2016-12-21"); +insert into diaries values(1988, "2016-12-22"); +insert into diaries values(1989, "2016-12-23"); +insert into diaries values(1990, "2016-12-24"); +insert into diaries values(1991, "2016-12-25"); +insert into diaries values(1992, "2016-12-26"); +insert into diaries values(1993, "2016-12-27"); +insert into diaries values(1994, "2016-12-28"); +insert into diaries values(1995, "2016-12-29"); +insert into diaries values(1996, "2016-12-30"); +insert into diaries values(1997, "2016-12-31"); +insert into diaries values(1998, "2017-01-01"); +insert into diaries values(1999, "2017-01-02"); +insert into diaries values(2000, "2017-01-03"); +insert into diaries values(2001, "2017-01-04"); +insert into diaries values(2002, "2017-01-05"); +insert into diaries values(2003, "2017-01-06"); +insert into diaries values(2004, "2017-01-07"); +insert into diaries values(2005, "2017-01-08"); +insert into diaries values(2006, "2017-01-09"); +insert into diaries values(2007, "2017-01-10"); +insert into diaries values(2008, "2017-01-11"); +insert into diaries values(2009, "2017-01-12"); +insert into diaries values(2010, "2017-01-13"); +insert into diaries values(2011, "2017-01-14"); +insert into diaries values(2012, "2017-01-15"); +insert into diaries values(2013, "2017-01-16"); +insert into diaries values(2014, "2017-01-17"); +insert into diaries values(2015, "2017-01-18"); +insert into diaries values(2016, "2017-01-19"); +insert into diaries values(2017, "2017-01-20"); +insert into diaries values(2018, "2017-01-21"); +insert into diaries values(2019, "2017-01-22"); +insert into diaries values(2020, "2017-01-23"); +insert into diaries values(2021, "2017-01-24"); +insert into diaries values(2022, "2017-01-25"); +insert into diaries values(2023, "2017-01-26"); +insert into diaries values(2024, "2017-01-27"); +insert into diaries values(2025, "2017-01-28"); +insert into diaries values(2026, "2017-01-29"); +insert into diaries values(2027, "2017-01-30"); +insert into diaries values(2028, "2017-01-31"); +insert into diaries values(2029, "2017-02-01"); +insert into diaries values(2030, "2017-02-02"); +insert into diaries values(2031, "2017-02-03"); +insert into diaries values(2032, "2017-02-04"); +insert into diaries values(2033, "2017-02-05"); +insert into diaries values(2034, "2017-02-06"); +insert into diaries values(2035, "2017-02-07"); +insert into diaries values(2036, "2017-02-08"); +insert into diaries values(2037, "2017-02-09"); +insert into diaries values(2038, "2017-02-10"); +insert into diaries values(2039, "2017-02-11"); +insert into diaries values(2040, "2017-02-12"); +insert into diaries values(2041, "2017-02-13"); +insert into diaries values(2042, "2017-02-14"); +insert into diaries values(2043, "2017-02-15"); +insert into diaries values(2044, "2017-02-16"); +insert into diaries values(2045, "2017-02-17"); +insert into diaries values(2046, "2017-02-18"); +insert into diaries values(2047, "2017-02-19"); +insert into diaries values(2048, "2017-02-20"); +insert into diaries values(2049, "2017-02-21"); +insert into diaries values(2050, "2017-02-22"); +insert into diaries values(2051, "2017-02-23"); +insert into diaries values(2052, "2017-02-24"); +insert into diaries values(2053, "2017-02-25"); +insert into diaries values(2054, "2017-02-26"); +insert into diaries values(2055, "2017-02-27"); +insert into diaries values(2056, "2017-02-28"); +insert into diaries values(2057, "2017-03-01"); +insert into diaries values(2058, "2017-03-02"); +insert into diaries values(2059, "2017-03-03"); +insert into diaries values(2060, "2017-03-04"); +insert into diaries values(2061, "2017-03-05"); +insert into diaries values(2062, "2017-03-06"); +insert into diaries values(2063, "2017-03-07"); +insert into diaries values(2064, "2017-03-08"); +insert into diaries values(2065, "2017-03-09"); +insert into diaries values(2066, "2017-03-10"); +insert into diaries values(2067, "2017-03-11"); +insert into diaries values(2068, "2017-03-12"); +insert into diaries values(2069, "2017-03-13"); +insert into diaries values(2070, "2017-03-14"); +insert into diaries values(2071, "2017-03-15"); +insert into diaries values(2072, "2017-03-16"); +insert into diaries values(2073, "2017-03-17"); +insert into diaries values(2074, "2017-03-18"); +insert into diaries values(2075, "2017-03-19"); +insert into diaries values(2076, "2017-03-20"); +insert into diaries values(2077, "2017-03-21"); +insert into diaries values(2078, "2017-03-22"); +insert into diaries values(2079, "2017-03-23"); +insert into diaries values(2080, "2017-03-24"); +insert into diaries values(2081, "2017-03-25"); +insert into diaries values(2082, "2017-03-26"); +insert into diaries values(2083, "2017-03-27"); +insert into diaries values(2084, "2017-03-28"); +insert into diaries values(2085, "2017-03-29"); +insert into diaries values(2086, "2017-03-30"); +insert into diaries values(2087, "2017-03-31"); +insert into diaries values(2088, "2017-04-01"); +insert into diaries values(2089, "2017-04-02"); +insert into diaries values(2090, "2017-04-03"); +insert into diaries values(2091, "2017-04-04"); +insert into diaries values(2092, "2017-04-05"); +insert into diaries values(2093, "2017-04-06"); +insert into diaries values(2094, "2017-04-07"); +insert into diaries values(2095, "2017-04-08"); +insert into diaries values(2096, "2017-04-09"); +insert into diaries values(2097, "2017-04-10"); +insert into diaries values(2098, "2017-04-11"); +insert into diaries values(2099, "2017-04-12"); +insert into diaries values(2100, "2017-04-13"); +insert into diaries values(2101, "2017-04-14"); +insert into diaries values(2102, "2017-04-15"); +insert into diaries values(2103, "2017-04-16"); +insert into diaries values(2104, "2017-04-17"); +insert into diaries values(2105, "2017-04-18"); +insert into diaries values(2106, "2017-04-19"); +insert into diaries values(2107, "2017-04-20"); +insert into diaries values(2108, "2017-04-21"); +insert into diaries values(2109, "2017-04-22"); +insert into diaries values(2110, "2017-04-23"); +insert into diaries values(2111, "2017-04-24"); +insert into diaries values(2112, "2017-04-25"); +insert into diaries values(2113, "2017-04-26"); +insert into diaries values(2114, "2017-04-27"); +insert into diaries values(2115, "2017-04-28"); +insert into diaries values(2116, "2017-04-29"); +insert into diaries values(2117, "2017-04-30"); +insert into diaries values(2118, "2017-05-01"); +insert into diaries values(2119, "2017-05-02"); +insert into diaries values(2120, "2017-05-03"); +insert into diaries values(2121, "2017-05-04"); +insert into diaries values(2122, "2017-05-05"); +insert into diaries values(2123, "2017-05-06"); +insert into diaries values(2124, "2017-05-07"); +insert into diaries values(2125, "2017-05-08"); +insert into diaries values(2126, "2017-05-09"); +insert into diaries values(2127, "2017-05-10"); +insert into diaries values(2128, "2017-05-11"); +insert into diaries values(2129, "2017-05-12"); +insert into diaries values(2130, "2017-05-13"); +insert into diaries values(2131, "2017-05-14"); +insert into diaries values(2132, "2017-05-15"); +insert into diaries values(2133, "2017-05-16"); +insert into diaries values(2134, "2017-05-17"); +insert into diaries values(2135, "2017-05-18"); +insert into diaries values(2136, "2017-05-19"); +insert into diaries values(2137, "2017-05-20"); +insert into diaries values(2138, "2017-05-21"); +insert into diaries values(2139, "2017-05-22"); +insert into diaries values(2140, "2017-05-23"); +insert into diaries values(2141, "2017-05-24"); +insert into diaries values(2142, "2017-05-25"); +insert into diaries values(2143, "2017-05-26"); +insert into diaries values(2144, "2017-05-27"); +insert into diaries values(2145, "2017-05-28"); +insert into diaries values(2146, "2017-05-29"); +insert into diaries values(2147, "2017-05-30"); +insert into diaries values(2148, "2017-05-31"); +insert into diaries values(2149, "2017-06-01"); +insert into diaries values(2150, "2017-06-02"); +insert into diaries values(2151, "2017-06-03"); +insert into diaries values(2152, "2017-06-04"); +insert into diaries values(2153, "2017-06-05"); +insert into diaries values(2154, "2017-06-06"); +insert into diaries values(2155, "2017-06-07"); +insert into diaries values(2156, "2017-06-08"); +insert into diaries values(2157, "2017-06-09"); +insert into diaries values(2158, "2017-06-10"); +insert into diaries values(2159, "2017-06-11"); +insert into diaries values(2160, "2017-06-12"); +insert into diaries values(2161, "2017-06-13"); +insert into diaries values(2162, "2017-06-14"); +insert into diaries values(2163, "2017-06-15"); +insert into diaries values(2164, "2017-06-16"); +insert into diaries values(2165, "2017-06-17"); +insert into diaries values(2166, "2017-06-18"); +insert into diaries values(2167, "2017-06-19"); +insert into diaries values(2168, "2017-06-20"); +insert into diaries values(2169, "2017-06-21"); +insert into diaries values(2170, "2017-06-22"); +insert into diaries values(2171, "2017-06-23"); +insert into diaries values(2172, "2017-06-24"); +insert into diaries values(2173, "2017-06-25"); +insert into diaries values(2174, "2017-06-26"); +insert into diaries values(2175, "2017-06-27"); +insert into diaries values(2176, "2017-06-28"); +insert into diaries values(2177, "2017-06-29"); +insert into diaries values(2178, "2017-06-30"); +insert into diaries values(2179, "2017-07-01"); +insert into diaries values(2180, "2017-07-02"); +insert into diaries values(2181, "2017-07-03"); +insert into diaries values(2182, "2017-07-04"); +insert into diaries values(2183, "2017-07-05"); +insert into diaries values(2184, "2017-07-06"); +insert into diaries values(2185, "2017-07-07"); +insert into diaries values(2186, "2017-07-08"); +insert into diaries values(2187, "2017-07-09"); +insert into diaries values(2188, "2017-07-10"); +insert into diaries values(2189, "2017-07-11"); +insert into diaries values(2190, "2017-07-12"); +insert into diaries values(2191, "2017-07-13"); +insert into diaries values(2192, "2017-07-14"); +insert into diaries values(2193, "2017-07-15"); +insert into diaries values(2194, "2017-07-16"); +insert into diaries values(2195, "2017-07-17"); +insert into diaries values(2196, "2017-07-18"); +insert into diaries values(2197, "2017-07-19"); +insert into diaries values(2198, "2017-07-20"); +insert into diaries values(2199, "2017-07-21"); +insert into diaries values(2200, "2017-07-22"); +insert into diaries values(2201, "2017-07-23"); +insert into diaries values(2202, "2017-07-24"); +insert into diaries values(2203, "2017-07-25"); +insert into diaries values(2204, "2017-07-26"); +insert into diaries values(2205, "2017-07-27"); +insert into diaries values(2206, "2017-07-28"); +insert into diaries values(2207, "2017-07-29"); +insert into diaries values(2208, "2017-07-30"); +insert into diaries values(2209, "2017-07-31"); +insert into diaries values(2210, "2017-08-01"); +insert into diaries values(2211, "2017-08-02"); +insert into diaries values(2212, "2017-08-03"); +insert into diaries values(2213, "2017-08-04"); +insert into diaries values(2214, "2017-08-05"); +insert into diaries values(2215, "2017-08-06"); +insert into diaries values(2216, "2017-08-07"); +insert into diaries values(2217, "2017-08-08"); +insert into diaries values(2218, "2017-08-09"); +insert into diaries values(2219, "2017-08-10"); +insert into diaries values(2220, "2017-08-11"); +insert into diaries values(2221, "2017-08-12"); +insert into diaries values(2222, "2017-08-13"); +insert into diaries values(2223, "2017-08-14"); +insert into diaries values(2224, "2017-08-15"); +insert into diaries values(2225, "2017-08-16"); +insert into diaries values(2226, "2017-08-17"); +insert into diaries values(2227, "2017-08-18"); +insert into diaries values(2228, "2017-08-19"); +insert into diaries values(2229, "2017-08-20"); +insert into diaries values(2230, "2017-08-21"); +insert into diaries values(2231, "2017-08-22"); +insert into diaries values(2232, "2017-08-23"); +insert into diaries values(2233, "2017-08-24"); +insert into diaries values(2234, "2017-08-25"); +insert into diaries values(2235, "2017-08-26"); +insert into diaries values(2236, "2017-08-27"); +insert into diaries values(2237, "2017-08-28"); +insert into diaries values(2238, "2017-08-29"); +insert into diaries values(2239, "2017-08-30"); +insert into diaries values(2240, "2017-08-31"); +insert into diaries values(2241, "2017-09-01"); +insert into diaries values(2242, "2017-09-02"); +insert into diaries values(2243, "2017-09-03"); +insert into diaries values(2244, "2017-09-04"); +insert into diaries values(2245, "2017-09-05"); +insert into diaries values(2246, "2017-09-06"); +insert into diaries values(2247, "2017-09-07"); +insert into diaries values(2248, "2017-09-08"); +insert into diaries values(2249, "2017-09-09"); +insert into diaries values(2250, "2017-09-10"); +insert into diaries values(2251, "2017-09-11"); +insert into diaries values(2252, "2017-09-12"); +insert into diaries values(2253, "2017-09-13"); +insert into diaries values(2254, "2017-09-14"); +insert into diaries values(2255, "2017-09-15"); +insert into diaries values(2256, "2017-09-16"); +insert into diaries values(2257, "2017-09-17"); +insert into diaries values(2258, "2017-09-18"); +insert into diaries values(2259, "2017-09-19"); +insert into diaries values(2260, "2017-09-20"); +insert into diaries values(2261, "2017-09-21"); +insert into diaries values(2262, "2017-09-22"); +insert into diaries values(2263, "2017-09-23"); +insert into diaries values(2264, "2017-09-24"); +insert into diaries values(2265, "2017-09-25"); +insert into diaries values(2266, "2017-09-26"); +insert into diaries values(2267, "2017-09-27"); +insert into diaries values(2268, "2017-09-28"); +insert into diaries values(2269, "2017-09-29"); +insert into diaries values(2270, "2017-09-30"); +insert into diaries values(2271, "2017-10-01"); +insert into diaries values(2272, "2017-10-02"); +insert into diaries values(2273, "2017-10-03"); +insert into diaries values(2274, "2017-10-04"); +insert into diaries values(2275, "2017-10-05"); +insert into diaries values(2276, "2017-10-06"); +insert into diaries values(2277, "2017-10-07"); +insert into diaries values(2278, "2017-10-08"); +insert into diaries values(2279, "2017-10-09"); +insert into diaries values(2280, "2017-10-10"); +insert into diaries values(2281, "2017-10-11"); +insert into diaries values(2282, "2017-10-12"); +insert into diaries values(2283, "2017-10-13"); +insert into diaries values(2284, "2017-10-14"); +insert into diaries values(2285, "2017-10-15"); +insert into diaries values(2286, "2017-10-16"); +insert into diaries values(2287, "2017-10-17"); +insert into diaries values(2288, "2017-10-18"); +insert into diaries values(2289, "2017-10-19"); +insert into diaries values(2290, "2017-10-20"); +insert into diaries values(2291, "2017-10-21"); +insert into diaries values(2292, "2017-10-22"); +insert into diaries values(2293, "2017-10-23"); +insert into diaries values(2294, "2017-10-24"); +insert into diaries values(2295, "2017-10-25"); +insert into diaries values(2296, "2017-10-26"); +insert into diaries values(2297, "2017-10-27"); +insert into diaries values(2298, "2017-10-28"); +insert into diaries values(2299, "2017-10-29"); +insert into diaries values(2300, "2017-10-30"); +insert into diaries values(2301, "2017-10-31"); +insert into diaries values(2302, "2017-11-01"); +insert into diaries values(2303, "2017-11-02"); +insert into diaries values(2304, "2017-11-03"); +insert into diaries values(2305, "2017-11-04"); +insert into diaries values(2306, "2017-11-05"); +insert into diaries values(2307, "2017-11-06"); +insert into diaries values(2308, "2017-11-07"); +insert into diaries values(2309, "2017-11-08"); +insert into diaries values(2310, "2017-11-09"); +insert into diaries values(2311, "2017-11-10"); +insert into diaries values(2312, "2017-11-11"); +insert into diaries values(2313, "2017-11-12"); +insert into diaries values(2314, "2017-11-13"); +insert into diaries values(2315, "2017-11-14"); +insert into diaries values(2316, "2017-11-15"); +insert into diaries values(2317, "2017-11-16"); +insert into diaries values(2318, "2017-11-17"); +insert into diaries values(2319, "2017-11-18"); +insert into diaries values(2320, "2017-11-19"); +insert into diaries values(2321, "2017-11-20"); +insert into diaries values(2322, "2017-11-21"); +insert into diaries values(2323, "2017-11-22"); +insert into diaries values(2324, "2017-11-23"); +insert into diaries values(2325, "2017-11-24"); +insert into diaries values(2326, "2017-11-25"); +insert into diaries values(2327, "2017-11-26"); +insert into diaries values(2328, "2017-11-27"); +insert into diaries values(2329, "2017-11-28"); +insert into diaries values(2330, "2017-11-29"); +insert into diaries values(2331, "2017-11-30"); +insert into diaries values(2332, "2017-12-01"); +insert into diaries values(2333, "2017-12-02"); +insert into diaries values(2334, "2017-12-03"); +insert into diaries values(2335, "2017-12-04"); +insert into diaries values(2336, "2017-12-05"); +insert into diaries values(2337, "2017-12-06"); +insert into diaries values(2338, "2017-12-07"); +insert into diaries values(2339, "2017-12-08"); +insert into diaries values(2340, "2017-12-09"); +insert into diaries values(2341, "2017-12-10"); +insert into diaries values(2342, "2017-12-11"); +insert into diaries values(2343, "2017-12-12"); +insert into diaries values(2344, "2017-12-13"); +insert into diaries values(2345, "2017-12-14"); +insert into diaries values(2346, "2017-12-15"); +insert into diaries values(2347, "2017-12-16"); +insert into diaries values(2348, "2017-12-17"); +insert into diaries values(2349, "2017-12-18"); +insert into diaries values(2350, "2017-12-19"); +insert into diaries values(2351, "2017-12-20"); +insert into diaries values(2352, "2017-12-21"); +insert into diaries values(2353, "2017-12-22"); +insert into diaries values(2354, "2017-12-23"); +insert into diaries values(2355, "2017-12-24"); +insert into diaries values(2356, "2017-12-25"); +insert into diaries values(2357, "2017-12-26"); +insert into diaries values(2358, "2017-12-27"); +insert into diaries values(2359, "2017-12-28"); +insert into diaries values(2360, "2017-12-29"); +insert into diaries values(2361, "2017-12-30"); +insert into diaries values(2362, "2017-12-31"); +insert into diaries values(2363, "2018-01-01"); +insert into diaries values(2364, "2018-01-02"); +insert into diaries values(2365, "2018-01-03"); +insert into diaries values(2366, "2018-01-04"); +insert into diaries values(2367, "2018-01-05"); +insert into diaries values(2368, "2018-01-06"); +insert into diaries values(2369, "2018-01-07"); +insert into diaries values(2370, "2018-01-08"); +insert into diaries values(2371, "2018-01-09"); +insert into diaries values(2372, "2018-01-10"); +insert into diaries values(2373, "2018-01-11"); +insert into diaries values(2374, "2018-01-12"); +insert into diaries values(2375, "2018-01-13"); +insert into diaries values(2376, "2018-01-14"); +insert into diaries values(2377, "2018-01-15"); +insert into diaries values(2378, "2018-01-16"); +insert into diaries values(2379, "2018-01-17"); +insert into diaries values(2380, "2018-01-18"); +insert into diaries values(2381, "2018-01-19"); +insert into diaries values(2382, "2018-01-20"); +insert into diaries values(2383, "2018-01-21"); +insert into diaries values(2384, "2018-01-22"); +insert into diaries values(2385, "2018-01-23"); +insert into diaries values(2386, "2018-01-24"); +insert into diaries values(2387, "2018-01-25"); +insert into diaries values(2388, "2018-01-26"); +insert into diaries values(2389, "2018-01-27"); +insert into diaries values(2390, "2018-01-28"); +insert into diaries values(2391, "2018-01-29"); +insert into diaries values(2392, "2018-01-30"); +insert into diaries values(2393, "2018-01-31"); +insert into diaries values(2394, "2018-02-01"); +insert into diaries values(2395, "2018-02-02"); +insert into diaries values(2396, "2018-02-03"); +insert into diaries values(2397, "2018-02-04"); +insert into diaries values(2398, "2018-02-05"); +insert into diaries values(2399, "2018-02-06"); +insert into diaries values(2400, "2018-02-07"); +insert into diaries values(2401, "2018-02-08"); +insert into diaries values(2402, "2018-02-09"); +insert into diaries values(2403, "2018-02-10"); +insert into diaries values(2404, "2018-02-11"); +insert into diaries values(2405, "2018-02-12"); +insert into diaries values(2406, "2018-02-13"); +insert into diaries values(2407, "2018-02-14"); +insert into diaries values(2408, "2018-02-15"); +insert into diaries values(2409, "2018-02-16"); +insert into diaries values(2410, "2018-02-17"); +insert into diaries values(2411, "2018-02-18"); +insert into diaries values(2412, "2018-02-19"); +insert into diaries values(2413, "2018-02-20"); +insert into diaries values(2414, "2018-02-21"); +insert into diaries values(2415, "2018-02-22"); +insert into diaries values(2416, "2018-02-23"); +insert into diaries values(2417, "2018-02-24"); +insert into diaries values(2418, "2018-02-25"); +insert into diaries values(2419, "2018-02-26"); +insert into diaries values(2420, "2018-02-27"); +insert into diaries values(2421, "2018-02-28"); +insert into diaries values(2422, "2018-03-01"); +insert into diaries values(2423, "2018-03-02"); +insert into diaries values(2424, "2018-03-03"); +insert into diaries values(2425, "2018-03-04"); +insert into diaries values(2426, "2018-03-05"); +insert into diaries values(2427, "2018-03-06"); +insert into diaries values(2428, "2018-03-07"); +insert into diaries values(2429, "2018-03-08"); +insert into diaries values(2430, "2018-03-09"); +insert into diaries values(2431, "2018-03-10"); +insert into diaries values(2432, "2018-03-11"); +insert into diaries values(2433, "2018-03-12"); +insert into diaries values(2434, "2018-03-13"); +insert into diaries values(2435, "2018-03-14"); +insert into diaries values(2436, "2018-03-15"); +insert into diaries values(2437, "2018-03-16"); +insert into diaries values(2438, "2018-03-17"); +insert into diaries values(2439, "2018-03-18"); +insert into diaries values(2440, "2018-03-19"); +insert into diaries values(2441, "2018-03-20"); +insert into diaries values(2442, "2018-03-21"); +insert into diaries values(2443, "2018-03-22"); +insert into diaries values(2444, "2018-03-23"); +insert into diaries values(2445, "2018-03-24"); +insert into diaries values(2446, "2018-03-25"); +insert into diaries values(2447, "2018-03-26"); +insert into diaries values(2448, "2018-03-27"); +insert into diaries values(2449, "2018-03-28"); +insert into diaries values(2450, "2018-03-29"); +insert into diaries values(2451, "2018-03-30"); +insert into diaries values(2452, "2018-03-31"); +insert into diaries values(2453, "2018-04-01"); +insert into diaries values(2454, "2018-04-02"); +insert into diaries values(2455, "2018-04-03"); +insert into diaries values(2456, "2018-04-04"); +insert into diaries values(2457, "2018-04-05"); +insert into diaries values(2458, "2018-04-06"); +insert into diaries values(2459, "2018-04-07"); +insert into diaries values(2460, "2018-04-08"); +insert into diaries values(2461, "2018-04-09"); +insert into diaries values(2462, "2018-04-10"); +insert into diaries values(2463, "2018-04-11"); +insert into diaries values(2464, "2018-04-12"); +insert into diaries values(2465, "2018-04-13"); +insert into diaries values(2466, "2018-04-14"); +insert into diaries values(2467, "2018-04-15"); +insert into diaries values(2468, "2018-04-16"); +insert into diaries values(2469, "2018-04-17"); +insert into diaries values(2470, "2018-04-18"); +insert into diaries values(2471, "2018-04-19"); +insert into diaries values(2472, "2018-04-20"); +insert into diaries values(2473, "2018-04-21"); +insert into diaries values(2474, "2018-04-22"); +insert into diaries values(2475, "2018-04-23"); +insert into diaries values(2476, "2018-04-24"); +insert into diaries values(2477, "2018-04-25"); +insert into diaries values(2478, "2018-04-26"); +insert into diaries values(2479, "2018-04-27"); +insert into diaries values(2480, "2018-04-28"); +insert into diaries values(2481, "2018-04-29"); +insert into diaries values(2482, "2018-04-30"); +insert into diaries values(2483, "2018-05-01"); +insert into diaries values(2484, "2018-05-02"); +insert into diaries values(2485, "2018-05-03"); +insert into diaries values(2486, "2018-05-04"); +insert into diaries values(2487, "2018-05-05"); +insert into diaries values(2488, "2018-05-06"); +insert into diaries values(2489, "2018-05-07"); +insert into diaries values(2490, "2018-05-08"); +insert into diaries values(2491, "2018-05-09"); +insert into diaries values(2492, "2018-05-10"); +insert into diaries values(2493, "2018-05-11"); +insert into diaries values(2494, "2018-05-12"); +insert into diaries values(2495, "2018-05-13"); +insert into diaries values(2496, "2018-05-14"); +insert into diaries values(2497, "2018-05-15"); +insert into diaries values(2498, "2018-05-16"); +insert into diaries values(2499, "2018-05-17"); +insert into diaries values(2500, "2018-05-18"); +insert into diaries values(2501, "2018-05-19"); +insert into diaries values(2502, "2018-05-20"); +insert into diaries values(2503, "2018-05-21"); +insert into diaries values(2504, "2018-05-22"); +insert into diaries values(2505, "2018-05-23"); +insert into diaries values(2506, "2018-05-24"); +insert into diaries values(2507, "2018-05-25"); +insert into diaries values(2508, "2018-05-26"); +insert into diaries values(2509, "2018-05-27"); +insert into diaries values(2510, "2018-05-28"); +insert into diaries values(2511, "2018-05-29"); +insert into diaries values(2512, "2018-05-30"); +insert into diaries values(2513, "2018-05-31"); +insert into diaries values(2514, "2018-06-01"); +insert into diaries values(2515, "2018-06-02"); +insert into diaries values(2516, "2018-06-03"); +insert into diaries values(2517, "2018-06-04"); +insert into diaries values(2518, "2018-06-05"); +insert into diaries values(2519, "2018-06-06"); +insert into diaries values(2520, "2018-06-07"); +insert into diaries values(2521, "2018-06-08"); +insert into diaries values(2522, "2018-06-09"); +insert into diaries values(2523, "2018-06-10"); +insert into diaries values(2524, "2018-06-11"); +insert into diaries values(2525, "2018-06-12"); +insert into diaries values(2526, "2018-06-13"); +insert into diaries values(2527, "2018-06-14"); +insert into diaries values(2528, "2018-06-15"); +insert into diaries values(2529, "2018-06-16"); +insert into diaries values(2530, "2018-06-17"); +insert into diaries values(2531, "2018-06-18"); +insert into diaries values(2532, "2018-06-19"); +insert into diaries values(2533, "2018-06-20"); +insert into diaries values(2534, "2018-06-21"); +insert into diaries values(2535, "2018-06-22"); +insert into diaries values(2536, "2018-06-23"); +insert into diaries values(2537, "2018-06-24"); +insert into diaries values(2538, "2018-06-25"); +insert into diaries values(2539, "2018-06-26"); +insert into diaries values(2540, "2018-06-27"); +insert into diaries values(2541, "2018-06-28"); +insert into diaries values(2542, "2018-06-29"); +insert into diaries values(2543, "2018-06-30"); +insert into diaries values(2544, "2018-07-01"); +insert into diaries values(2545, "2018-07-02"); +insert into diaries values(2546, "2018-07-03"); +insert into diaries values(2547, "2018-07-04"); +insert into diaries values(2548, "2018-07-05"); +insert into diaries values(2549, "2018-07-06"); +insert into diaries values(2550, "2018-07-07"); +insert into diaries values(2551, "2018-07-08"); +insert into diaries values(2552, "2018-07-09"); +insert into diaries values(2553, "2018-07-10"); +insert into diaries values(2554, "2018-07-11"); +insert into diaries values(2555, "2018-07-12"); +insert into diaries values(2556, "2018-07-13"); +insert into diaries values(2557, "2018-07-14"); +insert into diaries values(2558, "2018-07-15"); +insert into diaries values(2559, "2018-07-16"); +insert into diaries values(2560, "2018-07-17"); +insert into diaries values(2561, "2018-07-18"); +insert into diaries values(2562, "2018-07-19"); +insert into diaries values(2563, "2018-07-20"); +insert into diaries values(2564, "2018-07-21"); +insert into diaries values(2565, "2018-07-22"); +insert into diaries values(2566, "2018-07-23"); +insert into diaries values(2567, "2018-07-24"); +insert into diaries values(2568, "2018-07-25"); +insert into diaries values(2569, "2018-07-26"); +insert into diaries values(2570, "2018-07-27"); +insert into diaries values(2571, "2018-07-28"); +insert into diaries values(2572, "2018-07-29"); +insert into diaries values(2573, "2018-07-30"); +insert into diaries values(2574, "2018-07-31"); +insert into diaries values(2575, "2018-08-01"); +insert into diaries values(2576, "2018-08-02"); +insert into diaries values(2577, "2018-08-03"); +insert into diaries values(2578, "2018-08-04"); +insert into diaries values(2579, "2018-08-05"); +insert into diaries values(2580, "2018-08-06"); +insert into diaries values(2581, "2018-08-07"); +insert into diaries values(2582, "2018-08-08"); +insert into diaries values(2583, "2018-08-09"); +insert into diaries values(2584, "2018-08-10"); +insert into diaries values(2585, "2018-08-11"); +insert into diaries values(2586, "2018-08-12"); +insert into diaries values(2587, "2018-08-13"); +insert into diaries values(2588, "2018-08-14"); +insert into diaries values(2589, "2018-08-15"); +insert into diaries values(2590, "2018-08-16"); +insert into diaries values(2591, "2018-08-17"); +insert into diaries values(2592, "2018-08-18"); +insert into diaries values(2593, "2018-08-19"); +insert into diaries values(2594, "2018-08-20"); +insert into diaries values(2595, "2018-08-21"); +insert into diaries values(2596, "2018-08-22"); +insert into diaries values(2597, "2018-08-23"); +insert into diaries values(2598, "2018-08-24"); +insert into diaries values(2599, "2018-08-25"); +insert into diaries values(2600, "2018-08-26"); +insert into diaries values(2601, "2018-08-27"); +insert into diaries values(2602, "2018-08-28"); +insert into diaries values(2603, "2018-08-29"); +insert into diaries values(2604, "2018-08-30"); +insert into diaries values(2605, "2018-08-31"); +insert into diaries values(2606, "2018-09-01"); +insert into diaries values(2607, "2018-09-02"); +insert into diaries values(2608, "2018-09-03"); +insert into diaries values(2609, "2018-09-04"); +insert into diaries values(2610, "2018-09-05"); +insert into diaries values(2611, "2018-09-06"); +insert into diaries values(2612, "2018-09-07"); +insert into diaries values(2613, "2018-09-08"); +insert into diaries values(2614, "2018-09-09"); +insert into diaries values(2615, "2018-09-10"); +insert into diaries values(2616, "2018-09-11"); +insert into diaries values(2617, "2018-09-12"); +insert into diaries values(2618, "2018-09-13"); +insert into diaries values(2619, "2018-09-14"); +insert into diaries values(2620, "2018-09-15"); +insert into diaries values(2621, "2018-09-16"); +insert into diaries values(2622, "2018-09-17"); +insert into diaries values(2623, "2018-09-18"); +insert into diaries values(2624, "2018-09-19"); +insert into diaries values(2625, "2018-09-20"); +insert into diaries values(2626, "2018-09-21"); +insert into diaries values(2627, "2018-09-22"); +insert into diaries values(2628, "2018-09-23"); +insert into diaries values(2629, "2018-09-24"); +insert into diaries values(2630, "2018-09-25"); +insert into diaries values(2631, "2018-09-26"); +insert into diaries values(2632, "2018-09-27"); +insert into diaries values(2633, "2018-09-28"); +insert into diaries values(2634, "2018-09-29"); +insert into diaries values(2635, "2018-09-30"); +insert into diaries values(2636, "2018-10-01"); +insert into diaries values(2637, "2018-10-02"); +insert into diaries values(2638, "2018-10-03"); +insert into diaries values(2639, "2018-10-04"); +insert into diaries values(2640, "2018-10-05"); +insert into diaries values(2641, "2018-10-06"); +insert into diaries values(2642, "2018-10-07"); +insert into diaries values(2643, "2018-10-08"); +insert into diaries values(2644, "2018-10-09"); +insert into diaries values(2645, "2018-10-10"); +insert into diaries values(2646, "2018-10-11"); +insert into diaries values(2647, "2018-10-12"); +insert into diaries values(2648, "2018-10-13"); +insert into diaries values(2649, "2018-10-14"); +insert into diaries values(2650, "2018-10-15"); +insert into diaries values(2651, "2018-10-16"); +insert into diaries values(2652, "2018-10-17"); +insert into diaries values(2653, "2018-10-18"); +insert into diaries values(2654, "2018-10-19"); +insert into diaries values(2655, "2018-10-20"); +insert into diaries values(2656, "2018-10-21"); +insert into diaries values(2657, "2018-10-22"); +insert into diaries values(2658, "2018-10-23"); +insert into diaries values(2659, "2018-10-24"); +insert into diaries values(2660, "2018-10-25"); +insert into diaries values(2661, "2018-10-26"); +insert into diaries values(2662, "2018-10-27"); +insert into diaries values(2663, "2018-10-28"); +insert into diaries values(2664, "2018-10-29"); +insert into diaries values(2665, "2018-10-30"); +insert into diaries values(2666, "2018-10-31"); +insert into diaries values(2667, "2018-11-01"); +insert into diaries values(2668, "2018-11-02"); +insert into diaries values(2669, "2018-11-03"); +insert into diaries values(2670, "2018-11-04"); +insert into diaries values(2671, "2018-11-05"); +insert into diaries values(2672, "2018-11-06"); +insert into diaries values(2673, "2018-11-07"); +insert into diaries values(2674, "2018-11-08"); +insert into diaries values(2675, "2018-11-09"); +insert into diaries values(2676, "2018-11-10"); +insert into diaries values(2677, "2018-11-11"); +insert into diaries values(2678, "2018-11-12"); +insert into diaries values(2679, "2018-11-13"); +insert into diaries values(2680, "2018-11-14"); +insert into diaries values(2681, "2018-11-15"); +insert into diaries values(2682, "2018-11-16"); +insert into diaries values(2683, "2018-11-17"); +insert into diaries values(2684, "2018-11-18"); +insert into diaries values(2685, "2018-11-19"); +insert into diaries values(2686, "2018-11-20"); +insert into diaries values(2687, "2018-11-21"); +insert into diaries values(2688, "2018-11-22"); +insert into diaries values(2689, "2018-11-23"); +insert into diaries values(2690, "2018-11-24"); +insert into diaries values(2691, "2018-11-25"); +insert into diaries values(2692, "2018-11-26"); +insert into diaries values(2693, "2018-11-27"); +insert into diaries values(2694, "2018-11-28"); +insert into diaries values(2695, "2018-11-29"); +insert into diaries values(2696, "2018-11-30"); +insert into diaries values(2697, "2018-12-01"); +insert into diaries values(2698, "2018-12-02"); +insert into diaries values(2699, "2018-12-03"); +insert into diaries values(2700, "2018-12-04"); +insert into diaries values(2701, "2018-12-05"); +insert into diaries values(2702, "2018-12-06"); +insert into diaries values(2703, "2018-12-07"); +insert into diaries values(2704, "2018-12-08"); +insert into diaries values(2705, "2018-12-09"); +insert into diaries values(2706, "2018-12-10"); +insert into diaries values(2707, "2018-12-11"); +insert into diaries values(2708, "2018-12-12"); +insert into diaries values(2709, "2018-12-13"); +insert into diaries values(2710, "2018-12-14"); +insert into diaries values(2711, "2018-12-15"); +insert into diaries values(2712, "2018-12-16"); +insert into diaries values(2713, "2018-12-17"); +insert into diaries values(2714, "2018-12-18"); +insert into diaries values(2715, "2018-12-19"); +insert into diaries values(2716, "2018-12-20"); +insert into diaries values(2717, "2018-12-21"); +insert into diaries values(2718, "2018-12-22"); +insert into diaries values(2719, "2018-12-23"); +insert into diaries values(2720, "2018-12-24"); +insert into diaries values(2721, "2018-12-25"); +insert into diaries values(2722, "2018-12-26"); +insert into diaries values(2723, "2018-12-27"); +insert into diaries values(2724, "2018-12-28"); +insert into diaries values(2725, "2018-12-29"); +insert into diaries values(2726, "2018-12-30"); +insert into diaries values(2727, "2018-12-31"); +insert into diaries values(2728, "2019-01-01"); +insert into diaries values(2729, "2019-01-02"); +insert into diaries values(2730, "2019-01-03"); +insert into diaries values(2731, "2019-01-04"); +insert into diaries values(2732, "2019-01-05"); +insert into diaries values(2733, "2019-01-06"); +insert into diaries values(2734, "2019-01-07"); +insert into diaries values(2735, "2019-01-08"); +insert into diaries values(2736, "2019-01-09"); +insert into diaries values(2737, "2019-01-10"); +insert into diaries values(2738, "2019-01-11"); +insert into diaries values(2739, "2019-01-12"); +insert into diaries values(2740, "2019-01-13"); +insert into diaries values(2741, "2019-01-14"); +insert into diaries values(2742, "2019-01-15"); +insert into diaries values(2743, "2019-01-16"); +insert into diaries values(2744, "2019-01-17"); +insert into diaries values(2745, "2019-01-18"); +insert into diaries values(2746, "2019-01-19"); +insert into diaries values(2747, "2019-01-20"); +insert into diaries values(2748, "2019-01-21"); +insert into diaries values(2749, "2019-01-22"); +insert into diaries values(2750, "2019-01-23"); +insert into diaries values(2751, "2019-01-24"); +insert into diaries values(2752, "2019-01-25"); +insert into diaries values(2753, "2019-01-26"); +insert into diaries values(2754, "2019-01-27"); +insert into diaries values(2755, "2019-01-28"); +insert into diaries values(2756, "2019-01-29"); +insert into diaries values(2757, "2019-01-30"); +insert into diaries values(2758, "2019-01-31"); +insert into diaries values(2759, "2019-02-01"); +insert into diaries values(2760, "2019-02-02"); +insert into diaries values(2761, "2019-02-03"); +insert into diaries values(2762, "2019-02-04"); +insert into diaries values(2763, "2019-02-05"); +insert into diaries values(2764, "2019-02-06"); +insert into diaries values(2765, "2019-02-07"); +insert into diaries values(2766, "2019-02-08"); +insert into diaries values(2767, "2019-02-09"); +insert into diaries values(2768, "2019-02-10"); +insert into diaries values(2769, "2019-02-11"); +insert into diaries values(2770, "2019-02-12"); +insert into diaries values(2771, "2019-02-13"); +insert into diaries values(2772, "2019-02-14"); +insert into diaries values(2773, "2019-02-15"); +insert into diaries values(2774, "2019-02-16"); +insert into diaries values(2775, "2019-02-17"); +insert into diaries values(2776, "2019-02-18"); +insert into diaries values(2777, "2019-02-19"); +insert into diaries values(2778, "2019-02-20"); +insert into diaries values(2779, "2019-02-21"); +insert into diaries values(2780, "2019-02-22"); +insert into diaries values(2781, "2019-02-23"); +insert into diaries values(2782, "2019-02-24"); +insert into diaries values(2783, "2019-02-25"); +insert into diaries values(2784, "2019-02-26"); +insert into diaries values(2785, "2019-02-27"); +insert into diaries values(2786, "2019-02-28"); +insert into diaries values(2787, "2019-03-01"); +insert into diaries values(2788, "2019-03-02"); +insert into diaries values(2789, "2019-03-03"); +insert into diaries values(2790, "2019-03-04"); +insert into diaries values(2791, "2019-03-05"); +insert into diaries values(2792, "2019-03-06"); +insert into diaries values(2793, "2019-03-07"); +insert into diaries values(2794, "2019-03-08"); +insert into diaries values(2795, "2019-03-09"); +insert into diaries values(2796, "2019-03-10"); +insert into diaries values(2797, "2019-03-11"); +insert into diaries values(2798, "2019-03-12"); +insert into diaries values(2799, "2019-03-13"); +insert into diaries values(2800, "2019-03-14"); +insert into diaries values(2801, "2019-03-15"); +insert into diaries values(2802, "2019-03-16"); +insert into diaries values(2803, "2019-03-17"); +insert into diaries values(2804, "2019-03-18"); +insert into diaries values(2805, "2019-03-19"); +insert into diaries values(2806, "2019-03-20"); +insert into diaries values(2807, "2019-03-21"); +insert into diaries values(2808, "2019-03-22"); +insert into diaries values(2809, "2019-03-23"); +insert into diaries values(2810, "2019-03-24"); +insert into diaries values(2811, "2019-03-25"); +insert into diaries values(2812, "2019-03-26"); +insert into diaries values(2813, "2019-03-27"); +insert into diaries values(2814, "2019-03-28"); +insert into diaries values(2815, "2019-03-29"); +insert into diaries values(2816, "2019-03-30"); +insert into diaries values(2817, "2019-03-31"); +insert into diaries values(2818, "2019-04-01"); +insert into diaries values(2819, "2019-04-02"); +insert into diaries values(2820, "2019-04-03"); +insert into diaries values(2821, "2019-04-04"); +insert into diaries values(2822, "2019-04-05"); +insert into diaries values(2823, "2019-04-06"); +insert into diaries values(2824, "2019-04-07"); +insert into diaries values(2825, "2019-04-08"); +insert into diaries values(2826, "2019-04-09"); +insert into diaries values(2827, "2019-04-10"); +insert into diaries values(2828, "2019-04-11"); +insert into diaries values(2829, "2019-04-12"); +insert into diaries values(2830, "2019-04-13"); +insert into diaries values(2831, "2019-04-14"); +insert into diaries values(2832, "2019-04-15"); +insert into diaries values(2833, "2019-04-16"); +insert into diaries values(2834, "2019-04-17"); +insert into diaries values(2835, "2019-04-18"); +insert into diaries values(2836, "2019-04-19"); +insert into diaries values(2837, "2019-04-20"); +insert into diaries values(2838, "2019-04-21"); +insert into diaries values(2839, "2019-04-22"); +insert into diaries values(2840, "2019-04-23"); +insert into diaries values(2841, "2019-04-24"); +insert into diaries values(2842, "2019-04-25"); +insert into diaries values(2843, "2019-04-26"); +insert into diaries values(2844, "2019-04-27"); +insert into diaries values(2845, "2019-04-28"); +insert into diaries values(2846, "2019-04-29"); +insert into diaries values(2847, "2019-04-30"); +insert into diaries values(2848, "2019-05-01"); +insert into diaries values(2849, "2019-05-02"); +insert into diaries values(2850, "2019-05-03"); +insert into diaries values(2851, "2019-05-04"); +insert into diaries values(2852, "2019-05-05"); +insert into diaries values(2853, "2019-05-06"); +insert into diaries values(2854, "2019-05-07"); +insert into diaries values(2855, "2019-05-08"); +insert into diaries values(2856, "2019-05-09"); +insert into diaries values(2857, "2019-05-10"); +insert into diaries values(2858, "2019-05-11"); +insert into diaries values(2859, "2019-05-12"); +insert into diaries values(2860, "2019-05-13"); +insert into diaries values(2861, "2019-05-14"); +insert into diaries values(2862, "2019-05-15"); +insert into diaries values(2863, "2019-05-16"); +insert into diaries values(2864, "2019-05-17"); +insert into diaries values(2865, "2019-05-18"); +insert into diaries values(2866, "2019-05-19"); +insert into diaries values(2867, "2019-05-20"); +insert into diaries values(2868, "2019-05-21"); +insert into diaries values(2869, "2019-05-22"); +insert into diaries values(2870, "2019-05-23"); +insert into diaries values(2871, "2019-05-24"); +insert into diaries values(2872, "2019-05-25"); +insert into diaries values(2873, "2019-05-26"); +insert into diaries values(2874, "2019-05-27"); +insert into diaries values(2875, "2019-05-28"); +insert into diaries values(2876, "2019-05-29"); +insert into diaries values(2877, "2019-05-30"); +insert into diaries values(2878, "2019-05-31"); +insert into diaries values(2879, "2019-06-01"); +insert into diaries values(2880, "2019-06-02"); +insert into diaries values(2881, "2019-06-03"); +insert into diaries values(2882, "2019-06-04"); +insert into diaries values(2883, "2019-06-05"); +insert into diaries values(2884, "2019-06-06"); +insert into diaries values(2885, "2019-06-07"); +insert into diaries values(2886, "2019-06-08"); +insert into diaries values(2887, "2019-06-09"); +insert into diaries values(2888, "2019-06-10"); +insert into diaries values(2889, "2019-06-11"); +insert into diaries values(2890, "2019-06-12"); +insert into diaries values(2891, "2019-06-13"); +insert into diaries values(2892, "2019-06-14"); +insert into diaries values(2893, "2019-06-15"); +insert into diaries values(2894, "2019-06-16"); +insert into diaries values(2895, "2019-06-17"); +insert into diaries values(2896, "2019-06-18"); +insert into diaries values(2897, "2019-06-19"); +insert into diaries values(2898, "2019-06-20"); +insert into diaries values(2899, "2019-06-21"); +insert into diaries values(2900, "2019-06-22"); +insert into diaries values(2901, "2019-06-23"); +insert into diaries values(2902, "2019-06-24"); +insert into diaries values(2903, "2019-06-25"); +insert into diaries values(2904, "2019-06-26"); +insert into diaries values(2905, "2019-06-27"); +insert into diaries values(2906, "2019-06-28"); +insert into diaries values(2907, "2019-06-29"); +insert into diaries values(2908, "2019-06-30"); +insert into diaries values(2909, "2019-07-01"); +insert into diaries values(2910, "2019-07-02"); +insert into diaries values(2911, "2019-07-03"); +insert into diaries values(2912, "2019-07-04"); +insert into diaries values(2913, "2019-07-05"); +insert into diaries values(2914, "2019-07-06"); +insert into diaries values(2915, "2019-07-07"); +insert into diaries values(2916, "2019-07-08"); +insert into diaries values(2917, "2019-07-09"); +insert into diaries values(2918, "2019-07-10"); +insert into diaries values(2919, "2019-07-11"); +insert into diaries values(2920, "2019-07-12"); +insert into diaries values(2921, "2019-07-13"); +insert into diaries values(2922, "2019-07-14"); +insert into diaries values(2923, "2019-07-15"); +insert into diaries values(2924, "2019-07-16"); +insert into diaries values(2925, "2019-07-17"); +insert into diaries values(2926, "2019-07-18"); +insert into diaries values(2927, "2019-07-19"); +insert into diaries values(2928, "2019-07-20"); +insert into diaries values(2929, "2019-07-21"); +insert into diaries values(2930, "2019-07-22"); +insert into diaries values(2931, "2019-07-23"); +insert into diaries values(2932, "2019-07-24"); +insert into diaries values(2933, "2019-07-25"); +insert into diaries values(2934, "2019-07-26"); +insert into diaries values(2935, "2019-07-27"); +insert into diaries values(2936, "2019-07-28"); +insert into diaries values(2937, "2019-07-29"); +insert into diaries values(2938, "2019-07-30"); +insert into diaries values(2939, "2019-07-31"); +insert into diaries values(2940, "2019-08-01"); +insert into diaries values(2941, "2019-08-02"); +insert into diaries values(2942, "2019-08-03"); +insert into diaries values(2943, "2019-08-04"); +insert into diaries values(2944, "2019-08-05"); +insert into diaries values(2945, "2019-08-06"); +insert into diaries values(2946, "2019-08-07"); +insert into diaries values(2947, "2019-08-08"); +insert into diaries values(2948, "2019-08-09"); +insert into diaries values(2949, "2019-08-10"); +insert into diaries values(2950, "2019-08-11"); +insert into diaries values(2951, "2019-08-12"); +insert into diaries values(2952, "2019-08-13"); +insert into diaries values(2953, "2019-08-14"); +insert into diaries values(2954, "2019-08-15"); +insert into diaries values(2955, "2019-08-16"); +insert into diaries values(2956, "2019-08-17"); +insert into diaries values(2957, "2019-08-18"); +insert into diaries values(2958, "2019-08-19"); +insert into diaries values(2959, "2019-08-20"); +insert into diaries values(2960, "2019-08-21"); +insert into diaries values(2961, "2019-08-22"); +insert into diaries values(2962, "2019-08-23"); +insert into diaries values(2963, "2019-08-24"); +insert into diaries values(2964, "2019-08-25"); +insert into diaries values(2965, "2019-08-26"); +insert into diaries values(2966, "2019-08-27"); +insert into diaries values(2967, "2019-08-28"); +insert into diaries values(2968, "2019-08-29"); +insert into diaries values(2969, "2019-08-30"); +insert into diaries values(2970, "2019-08-31"); +insert into diaries values(2971, "2019-09-01"); +insert into diaries values(2972, "2019-09-02"); +insert into diaries values(2973, "2019-09-03"); +insert into diaries values(2974, "2019-09-04"); +insert into diaries values(2975, "2019-09-05"); +insert into diaries values(2976, "2019-09-06"); +insert into diaries values(2977, "2019-09-07"); +insert into diaries values(2978, "2019-09-08"); +insert into diaries values(2979, "2019-09-09"); +insert into diaries values(2980, "2019-09-10"); +insert into diaries values(2981, "2019-09-11"); +insert into diaries values(2982, "2019-09-12"); +insert into diaries values(2983, "2019-09-13"); +insert into diaries values(2984, "2019-09-14"); +insert into diaries values(2985, "2019-09-15"); +insert into diaries values(2986, "2019-09-16"); +insert into diaries values(2987, "2019-09-17"); +insert into diaries values(2988, "2019-09-18"); +insert into diaries values(2989, "2019-09-19"); +insert into diaries values(2990, "2019-09-20"); +insert into diaries values(2991, "2019-09-21"); +insert into diaries values(2992, "2019-09-22"); +insert into diaries values(2993, "2019-09-23"); +insert into diaries values(2994, "2019-09-24"); +insert into diaries values(2995, "2019-09-25"); +insert into diaries values(2996, "2019-09-26"); +insert into diaries values(2997, "2019-09-27"); +insert into diaries values(2998, "2019-09-28"); +insert into diaries values(2999, "2019-09-29"); +insert into diaries values(3000, "2019-09-30"); +insert into diaries values(3001, "2019-10-01"); +insert into diaries values(3002, "2019-10-02"); +insert into diaries values(3003, "2019-10-03"); +insert into diaries values(3004, "2019-10-04"); +insert into diaries values(3005, "2019-10-05"); +insert into diaries values(3006, "2019-10-06"); +insert into diaries values(3007, "2019-10-07"); +insert into diaries values(3008, "2019-10-08"); +insert into diaries values(3009, "2019-10-09"); +insert into diaries values(3010, "2019-10-10"); +insert into diaries values(3011, "2019-10-11"); +insert into diaries values(3012, "2019-10-12"); +insert into diaries values(3013, "2019-10-13"); +insert into diaries values(3014, "2019-10-14"); +insert into diaries values(3015, "2019-10-15"); +insert into diaries values(3016, "2019-10-16"); +insert into diaries values(3017, "2019-10-17"); +insert into diaries values(3018, "2019-10-18"); +insert into diaries values(3019, "2019-10-19"); +insert into diaries values(3020, "2019-10-20"); +insert into diaries values(3021, "2019-10-21"); +insert into diaries values(3022, "2019-10-22"); +insert into diaries values(3023, "2019-10-23"); +insert into diaries values(3024, "2019-10-24"); +insert into diaries values(3025, "2019-10-25"); +insert into diaries values(3026, "2019-10-26"); +insert into diaries values(3027, "2019-10-27"); +insert into diaries values(3028, "2019-10-28"); +insert into diaries values(3029, "2019-10-29"); +insert into diaries values(3030, "2019-10-30"); +insert into diaries values(3031, "2019-10-31"); +insert into diaries values(3032, "2019-11-01"); +insert into diaries values(3033, "2019-11-02"); +insert into diaries values(3034, "2019-11-03"); +insert into diaries values(3035, "2019-11-04"); +insert into diaries values(3036, "2019-11-05"); +insert into diaries values(3037, "2019-11-06"); +insert into diaries values(3038, "2019-11-07"); +insert into diaries values(3039, "2019-11-08"); +insert into diaries values(3040, "2019-11-09"); +insert into diaries values(3041, "2019-11-10"); +insert into diaries values(3042, "2019-11-11"); +insert into diaries values(3043, "2019-11-12"); +insert into diaries values(3044, "2019-11-13"); +insert into diaries values(3045, "2019-11-14"); +insert into diaries values(3046, "2019-11-15"); +insert into diaries values(3047, "2019-11-16"); +insert into diaries values(3048, "2019-11-17"); +insert into diaries values(3049, "2019-11-18"); +insert into diaries values(3050, "2019-11-19"); +insert into diaries values(3051, "2019-11-20"); +insert into diaries values(3052, "2019-11-21"); +insert into diaries values(3053, "2019-11-22"); +insert into diaries values(3054, "2019-11-23"); +insert into diaries values(3055, "2019-11-24"); +insert into diaries values(3056, "2019-11-25"); +insert into diaries values(3057, "2019-11-26"); +insert into diaries values(3058, "2019-11-27"); +insert into diaries values(3059, "2019-11-28"); +insert into diaries values(3060, "2019-11-29"); +insert into diaries values(3061, "2019-11-30"); +insert into diaries values(3062, "2019-12-01"); +insert into diaries values(3063, "2019-12-02"); +insert into diaries values(3064, "2019-12-03"); +insert into diaries values(3065, "2019-12-04"); +insert into diaries values(3066, "2019-12-05"); +insert into diaries values(3067, "2019-12-06"); +insert into diaries values(3068, "2019-12-07"); +insert into diaries values(3069, "2019-12-08"); +insert into diaries values(3070, "2019-12-09"); +insert into diaries values(3071, "2019-12-10"); +insert into diaries values(3072, "2019-12-11"); +insert into diaries values(3073, "2019-12-12"); +insert into diaries values(3074, "2019-12-13"); +insert into diaries values(3075, "2019-12-14"); +insert into diaries values(3076, "2019-12-15"); +insert into diaries values(3077, "2019-12-16"); +insert into diaries values(3078, "2019-12-17"); +insert into diaries values(3079, "2019-12-18"); +insert into diaries values(3080, "2019-12-19"); +insert into diaries values(3081, "2019-12-20"); +insert into diaries values(3082, "2019-12-21"); +insert into diaries values(3083, "2019-12-22"); +insert into diaries values(3084, "2019-12-23"); +insert into diaries values(3085, "2019-12-24"); +insert into diaries values(3086, "2019-12-25"); +insert into diaries values(3087, "2019-12-26"); +insert into diaries values(3088, "2019-12-27"); +insert into diaries values(3089, "2019-12-28"); +insert into diaries values(3090, "2019-12-29"); +insert into diaries values(3091, "2019-12-30"); +insert into diaries values(3092, "2019-12-31"); +insert into diaries values(3093, "2020-01-01"); +insert into diaries values(3094, "2020-01-02"); +insert into diaries values(3095, "2020-01-03"); +insert into diaries values(3096, "2020-01-04"); +insert into diaries values(3097, "2020-01-05"); +insert into diaries values(3098, "2020-01-06"); +insert into diaries values(3099, "2020-01-07"); +insert into diaries values(3100, "2020-01-08"); +insert into diaries values(3101, "2020-01-09"); +insert into diaries values(3102, "2020-01-10"); +insert into diaries values(3103, "2020-01-11"); +insert into diaries values(3104, "2020-01-12"); +insert into diaries values(3105, "2020-01-13"); +insert into diaries values(3106, "2020-01-14"); +insert into diaries values(3107, "2020-01-15"); +insert into diaries values(3108, "2020-01-16"); +insert into diaries values(3109, "2020-01-17"); +insert into diaries values(3110, "2020-01-18"); +insert into diaries values(3111, "2020-01-19"); +insert into diaries values(3112, "2020-01-20"); +insert into diaries values(3113, "2020-01-21"); +insert into diaries values(3114, "2020-01-22"); +insert into diaries values(3115, "2020-01-23"); +insert into diaries values(3116, "2020-01-24"); +insert into diaries values(3117, "2020-01-25"); +insert into diaries values(3118, "2020-01-26"); +insert into diaries values(3119, "2020-01-27"); +insert into diaries values(3120, "2020-01-28"); +insert into diaries values(3121, "2020-01-29"); +insert into diaries values(3122, "2020-01-30"); +insert into diaries values(3123, "2020-01-31"); +insert into diaries values(3124, "2020-02-01"); +insert into diaries values(3125, "2020-02-02"); +insert into diaries values(3126, "2020-02-03"); +insert into diaries values(3127, "2020-02-04"); +insert into diaries values(3128, "2020-02-05"); +insert into diaries values(3129, "2020-02-06"); +insert into diaries values(3130, "2020-02-07"); +insert into diaries values(3131, "2020-02-08"); +insert into diaries values(3132, "2020-02-09"); +insert into diaries values(3133, "2020-02-10"); +insert into diaries values(3134, "2020-02-11"); +insert into diaries values(3135, "2020-02-12"); +insert into diaries values(3136, "2020-02-13"); +insert into diaries values(3137, "2020-02-14"); +insert into diaries values(3138, "2020-02-15"); +insert into diaries values(3139, "2020-02-16"); +insert into diaries values(3140, "2020-02-17"); +insert into diaries values(3141, "2020-02-18"); +insert into diaries values(3142, "2020-02-19"); +insert into diaries values(3143, "2020-02-20"); +insert into diaries values(3144, "2020-02-21"); +insert into diaries values(3145, "2020-02-22"); +insert into diaries values(3146, "2020-02-23"); +insert into diaries values(3147, "2020-02-24"); +insert into diaries values(3148, "2020-02-25"); +insert into diaries values(3149, "2020-02-26"); +insert into diaries values(3150, "2020-02-27"); +insert into diaries values(3151, "2020-02-28"); +insert into diaries values(3152, "2020-02-29"); +insert into diaries values(3153, "2020-03-01"); +insert into diaries values(3154, "2020-03-02"); +insert into diaries values(3155, "2020-03-03"); +insert into diaries values(3156, "2020-03-04"); +insert into diaries values(3157, "2020-03-05"); +insert into diaries values(3158, "2020-03-06"); +insert into diaries values(3159, "2020-03-07"); +insert into diaries values(3160, "2020-03-08"); +insert into diaries values(3161, "2020-03-09"); +insert into diaries values(3162, "2020-03-10"); +insert into diaries values(3163, "2020-03-11"); +insert into diaries values(3164, "2020-03-12"); +insert into diaries values(3165, "2020-03-13"); +insert into diaries values(3166, "2020-03-14"); +insert into diaries values(3167, "2020-03-15"); +insert into diaries values(3168, "2020-03-16"); +insert into diaries values(3169, "2020-03-17"); +insert into diaries values(3170, "2020-03-18"); +insert into diaries values(3171, "2020-03-19"); +insert into diaries values(3172, "2020-03-20"); +insert into diaries values(3173, "2020-03-21"); +insert into diaries values(3174, "2020-03-22"); +insert into diaries values(3175, "2020-03-23"); +insert into diaries values(3176, "2020-03-24"); +insert into diaries values(3177, "2020-03-25"); +insert into diaries values(3178, "2020-03-26"); +insert into diaries values(3179, "2020-03-27"); +insert into diaries values(3180, "2020-03-28"); +insert into diaries values(3181, "2020-03-29"); +insert into diaries values(3182, "2020-03-30"); +insert into diaries values(3183, "2020-03-31"); +insert into diaries values(3184, "2020-04-01"); +insert into diaries values(3185, "2020-04-02"); +insert into diaries values(3186, "2020-04-03"); +insert into diaries values(3187, "2020-04-04"); +insert into diaries values(3188, "2020-04-05"); +insert into diaries values(3189, "2020-04-06"); +insert into diaries values(3190, "2020-04-07"); +insert into diaries values(3191, "2020-04-08"); +insert into diaries values(3192, "2020-04-09"); +insert into diaries values(3193, "2020-04-10"); +insert into diaries values(3194, "2020-04-11"); +insert into diaries values(3195, "2020-04-12"); +insert into diaries values(3196, "2020-04-13"); +insert into diaries values(3197, "2020-04-14"); +insert into diaries values(3198, "2020-04-15"); +insert into diaries values(3199, "2020-04-16"); +insert into diaries values(3200, "2020-04-17"); +insert into diaries values(3201, "2020-04-18"); +insert into diaries values(3202, "2020-04-19"); +insert into diaries values(3203, "2020-04-20"); +insert into diaries values(3204, "2020-04-21"); +insert into diaries values(3205, "2020-04-22"); +insert into diaries values(3206, "2020-04-23"); +insert into diaries values(3207, "2020-04-24"); +insert into diaries values(3208, "2020-04-25"); +insert into diaries values(3209, "2020-04-26"); +insert into diaries values(3210, "2020-04-27"); +insert into diaries values(3211, "2020-04-28"); +insert into diaries values(3212, "2020-04-29"); +insert into diaries values(3213, "2020-04-30"); +insert into diaries values(3214, "2020-05-01"); +insert into diaries values(3215, "2020-05-02"); +insert into diaries values(3216, "2020-05-03"); +insert into diaries values(3217, "2020-05-04"); +insert into diaries values(3218, "2020-05-05"); +insert into diaries values(3219, "2020-05-06"); +insert into diaries values(3220, "2020-05-07"); +insert into diaries values(3221, "2020-05-08"); +insert into diaries values(3222, "2020-05-09"); +insert into diaries values(3223, "2020-05-10"); +insert into diaries values(3224, "2020-05-11"); +insert into diaries values(3225, "2020-05-12"); +insert into diaries values(3226, "2020-05-13"); +insert into diaries values(3227, "2020-05-14"); +insert into diaries values(3228, "2020-05-15"); +insert into diaries values(3229, "2020-05-16"); +insert into diaries values(3230, "2020-05-17"); +insert into diaries values(3231, "2020-05-18"); +insert into diaries values(3232, "2020-05-19"); +insert into diaries values(3233, "2020-05-20"); +insert into diaries values(3234, "2020-05-21"); +insert into diaries values(3235, "2020-05-22"); +insert into diaries values(3236, "2020-05-23"); +insert into diaries values(3237, "2020-05-24"); +insert into diaries values(3238, "2020-05-25"); +insert into diaries values(3239, "2020-05-26"); +insert into diaries values(3240, "2020-05-27"); +insert into diaries values(3241, "2020-05-28"); +insert into diaries values(3242, "2020-05-29"); +insert into diaries values(3243, "2020-05-30"); +insert into diaries values(3244, "2020-05-31"); +insert into diaries values(3245, "2020-06-01"); +insert into diaries values(3246, "2020-06-02"); +insert into diaries values(3247, "2020-06-03"); +insert into diaries values(3248, "2020-06-04"); +insert into diaries values(3249, "2020-06-05"); +insert into diaries values(3250, "2020-06-06"); +insert into diaries values(3251, "2020-06-07"); +insert into diaries values(3252, "2020-06-08"); +insert into diaries values(3253, "2020-06-09"); +insert into diaries values(3254, "2020-06-10"); +insert into diaries values(3255, "2020-06-11"); +insert into diaries values(3256, "2020-06-12"); +insert into diaries values(3257, "2020-06-13"); +insert into diaries values(3258, "2020-06-14"); +insert into diaries values(3259, "2020-06-15"); +insert into diaries values(3260, "2020-06-16"); +insert into diaries values(3261, "2020-06-17"); +insert into diaries values(3262, "2020-06-18"); +insert into diaries values(3263, "2020-06-19"); +insert into diaries values(3264, "2020-06-20"); +insert into diaries values(3265, "2020-06-21"); +insert into diaries values(3266, "2020-06-22"); +insert into diaries values(3267, "2020-06-23"); +insert into diaries values(3268, "2020-06-24"); +insert into diaries values(3269, "2020-06-25"); +insert into diaries values(3270, "2020-06-26"); +insert into diaries values(3271, "2020-06-27"); +insert into diaries values(3272, "2020-06-28"); +insert into diaries values(3273, "2020-06-29"); +insert into diaries values(3274, "2020-06-30"); +insert into diaries values(3275, "2020-07-01"); +insert into diaries values(3276, "2020-07-02"); +insert into diaries values(3277, "2020-07-03"); +insert into diaries values(3278, "2020-07-04"); +insert into diaries values(3279, "2020-07-05"); +insert into diaries values(3280, "2020-07-06"); +insert into diaries values(3281, "2020-07-07"); +insert into diaries values(3282, "2020-07-08"); +insert into diaries values(3283, "2020-07-09"); +insert into diaries values(3284, "2020-07-10"); +insert into diaries values(3285, "2020-07-11"); +insert into diaries values(3286, "2020-07-12"); +insert into diaries values(3287, "2020-07-13"); +insert into diaries values(3288, "2020-07-14"); +insert into diaries values(3289, "2020-07-15"); +insert into diaries values(3290, "2020-07-16"); +insert into diaries values(3291, "2020-07-17"); +insert into diaries values(3292, "2020-07-18"); +insert into diaries values(3293, "2020-07-19"); +insert into diaries values(3294, "2020-07-20"); +insert into diaries values(3295, "2020-07-21"); +insert into diaries values(3296, "2020-07-22"); +insert into diaries values(3297, "2020-07-23"); +insert into diaries values(3298, "2020-07-24"); +insert into diaries values(3299, "2020-07-25"); +insert into diaries values(3300, "2020-07-26"); +insert into diaries values(3301, "2020-07-27"); +insert into diaries values(3302, "2020-07-28"); +insert into diaries values(3303, "2020-07-29"); +insert into diaries values(3304, "2020-07-30"); +insert into diaries values(3305, "2020-07-31"); +insert into diaries values(3306, "2020-08-01"); +insert into diaries values(3307, "2020-08-02"); +insert into diaries values(3308, "2020-08-03"); +insert into diaries values(3309, "2020-08-04"); +insert into diaries values(3310, "2020-08-05"); +insert into diaries values(3311, "2020-08-06"); +insert into diaries values(3312, "2020-08-07"); +insert into diaries values(3313, "2020-08-08"); +insert into diaries values(3314, "2020-08-09"); +insert into diaries values(3315, "2020-08-10"); +insert into diaries values(3316, "2020-08-11"); +insert into diaries values(3317, "2020-08-12"); +insert into diaries values(3318, "2020-08-13"); +insert into diaries values(3319, "2020-08-14"); +insert into diaries values(3320, "2020-08-15"); +insert into diaries values(3321, "2020-08-16"); +insert into diaries values(3322, "2020-08-17"); +insert into diaries values(3323, "2020-08-18"); +insert into diaries values(3324, "2020-08-19"); +insert into diaries values(3325, "2020-08-20"); +insert into diaries values(3326, "2020-08-21"); +insert into diaries values(3327, "2020-08-22"); +insert into diaries values(3328, "2020-08-23"); +insert into diaries values(3329, "2020-08-24"); +insert into diaries values(3330, "2020-08-25"); +insert into diaries values(3331, "2020-08-26"); +insert into diaries values(3332, "2020-08-27"); +insert into diaries values(3333, "2020-08-28"); +insert into diaries values(3334, "2020-08-29"); +insert into diaries values(3335, "2020-08-30"); +insert into diaries values(3336, "2020-08-31"); +insert into diaries values(3337, "2020-09-01"); +insert into diaries values(3338, "2020-09-02"); +insert into diaries values(3339, "2020-09-03"); +insert into diaries values(3340, "2020-09-04"); +insert into diaries values(3341, "2020-09-05"); +insert into diaries values(3342, "2020-09-06"); +insert into diaries values(3343, "2020-09-07"); +insert into diaries values(3344, "2020-09-08"); +insert into diaries values(3345, "2020-09-09"); +insert into diaries values(3346, "2020-09-10"); +insert into diaries values(3347, "2020-09-11"); +insert into diaries values(3348, "2020-09-12"); +insert into diaries values(3349, "2020-09-13"); +insert into diaries values(3350, "2020-09-14"); +insert into diaries values(3351, "2020-09-15"); +insert into diaries values(3352, "2020-09-16"); +insert into diaries values(3353, "2020-09-17"); +insert into diaries values(3354, "2020-09-18"); +insert into diaries values(3355, "2020-09-19"); +insert into diaries values(3356, "2020-09-20"); +insert into diaries values(3357, "2020-09-21"); +insert into diaries values(3358, "2020-09-22"); +insert into diaries values(3359, "2020-09-23"); +insert into diaries values(3360, "2020-09-24"); +insert into diaries values(3361, "2020-09-25"); +insert into diaries values(3362, "2020-09-26"); +insert into diaries values(3363, "2020-09-27"); +insert into diaries values(3364, "2020-09-28"); +insert into diaries values(3365, "2020-09-29"); +insert into diaries values(3366, "2020-09-30"); +insert into diaries values(3367, "2020-10-01"); +insert into diaries values(3368, "2020-10-02"); +insert into diaries values(3369, "2020-10-03"); +insert into diaries values(3370, "2020-10-04"); +insert into diaries values(3371, "2020-10-05"); +insert into diaries values(3372, "2020-10-06"); +insert into diaries values(3373, "2020-10-07"); +insert into diaries values(3374, "2020-10-08"); +insert into diaries values(3375, "2020-10-09"); +insert into diaries values(3376, "2020-10-10"); +insert into diaries values(3377, "2020-10-11"); +insert into diaries values(3378, "2020-10-12"); +insert into diaries values(3379, "2020-10-13"); +insert into diaries values(3380, "2020-10-14"); +insert into diaries values(3381, "2020-10-15"); +insert into diaries values(3382, "2020-10-16"); +insert into diaries values(3383, "2020-10-17"); +insert into diaries values(3384, "2020-10-18"); +insert into diaries values(3385, "2020-10-19"); +insert into diaries values(3386, "2020-10-20"); +insert into diaries values(3387, "2020-10-21"); +insert into diaries values(3388, "2020-10-22"); +insert into diaries values(3389, "2020-10-23"); +insert into diaries values(3390, "2020-10-24"); +insert into diaries values(3391, "2020-10-25"); +insert into diaries values(3392, "2020-10-26"); +insert into diaries values(3393, "2020-10-27"); +insert into diaries values(3394, "2020-10-28"); +insert into diaries values(3395, "2020-10-29"); +insert into diaries values(3396, "2020-10-30"); +insert into diaries values(3397, "2020-10-31"); +insert into diaries values(3398, "2020-11-01"); +insert into diaries values(3399, "2020-11-02"); +insert into diaries values(3400, "2020-11-03"); +insert into diaries values(3401, "2020-11-04"); +insert into diaries values(3402, "2020-11-05"); +insert into diaries values(3403, "2020-11-06"); +insert into diaries values(3404, "2020-11-07"); +insert into diaries values(3405, "2020-11-08"); +insert into diaries values(3406, "2020-11-09"); +insert into diaries values(3407, "2020-11-10"); +insert into diaries values(3408, "2020-11-11"); +insert into diaries values(3409, "2020-11-12"); +insert into diaries values(3410, "2020-11-13"); +insert into diaries values(3411, "2020-11-14"); +insert into diaries values(3412, "2020-11-15"); +insert into diaries values(3413, "2020-11-16"); +insert into diaries values(3414, "2020-11-17"); +insert into diaries values(3415, "2020-11-18"); +insert into diaries values(3416, "2020-11-19"); +insert into diaries values(3417, "2020-11-20"); +insert into diaries values(3418, "2020-11-21"); +insert into diaries values(3419, "2020-11-22"); +insert into diaries values(3420, "2020-11-23"); +insert into diaries values(3421, "2020-11-24"); +insert into diaries values(3422, "2020-11-25"); +insert into diaries values(3423, "2020-11-26"); +insert into diaries values(3424, "2020-11-27"); +insert into diaries values(3425, "2020-11-28"); +insert into diaries values(3426, "2020-11-29"); +insert into diaries values(3427, "2020-11-30"); +insert into diaries values(3428, "2020-12-01"); +insert into diaries values(3429, "2020-12-02"); +insert into diaries values(3430, "2020-12-03"); +insert into diaries values(3431, "2020-12-04"); +insert into diaries values(3432, "2020-12-05"); +insert into diaries values(3433, "2020-12-06"); +insert into diaries values(3434, "2020-12-07"); +insert into diaries values(3435, "2020-12-08"); +insert into diaries values(3436, "2020-12-09"); +insert into diaries values(3437, "2020-12-10"); +insert into diaries values(3438, "2020-12-11"); +insert into diaries values(3439, "2020-12-12"); +insert into diaries values(3440, "2020-12-13"); +insert into diaries values(3441, "2020-12-14"); +insert into diaries values(3442, "2020-12-15"); +insert into diaries values(3443, "2020-12-16"); +insert into diaries values(3444, "2020-12-17"); +insert into diaries values(3445, "2020-12-18"); +insert into diaries values(3446, "2020-12-19"); +insert into diaries values(3447, "2020-12-20"); +insert into diaries values(3448, "2020-12-21"); +insert into diaries values(3449, "2020-12-22"); +insert into diaries values(3450, "2020-12-23"); +insert into diaries values(3451, "2020-12-24"); +insert into diaries values(3452, "2020-12-25"); +insert into diaries values(3453, "2020-12-26"); +insert into diaries values(3454, "2020-12-27"); +insert into diaries values(3455, "2020-12-28"); +insert into diaries values(3456, "2020-12-29"); +insert into diaries values(3457, "2020-12-30"); +insert into diaries values(3458, "2020-12-31"); +insert into diaries values(3459, "2021-01-01"); +insert into diaries values(3460, "2021-01-02"); +insert into diaries values(3461, "2021-01-03"); +insert into diaries values(3462, "2021-01-04"); +insert into diaries values(3463, "2021-01-05"); +insert into diaries values(3464, "2021-01-06"); +insert into diaries values(3465, "2021-01-07"); +insert into diaries values(3466, "2021-01-08"); +insert into diaries values(3467, "2021-01-09"); +insert into diaries values(3468, "2021-01-10"); +insert into diaries values(3469, "2021-01-11"); +insert into diaries values(3470, "2021-01-12"); +insert into diaries values(3471, "2021-01-13"); +insert into diaries values(3472, "2021-01-14"); +insert into diaries values(3473, "2021-01-15"); +insert into diaries values(3474, "2021-01-16"); +insert into diaries values(3475, "2021-01-17"); +insert into diaries values(3476, "2021-01-18"); +insert into diaries values(3477, "2021-01-19"); +insert into diaries values(3478, "2021-01-20"); +insert into diaries values(3479, "2021-01-21"); +insert into diaries values(3480, "2021-01-22"); +insert into diaries values(3481, "2021-01-23"); +insert into diaries values(3482, "2021-01-24"); +insert into diaries values(3483, "2021-01-25"); +insert into diaries values(3484, "2021-01-26"); +insert into diaries values(3485, "2021-01-27"); +insert into diaries values(3486, "2021-01-28"); +insert into diaries values(3487, "2021-01-29"); +insert into diaries values(3488, "2021-01-30"); +insert into diaries values(3489, "2021-01-31"); +insert into diaries values(3490, "2021-02-01"); +insert into diaries values(3491, "2021-02-02"); +insert into diaries values(3492, "2021-02-03"); +insert into diaries values(3493, "2021-02-04"); +insert into diaries values(3494, "2021-02-05"); +insert into diaries values(3495, "2021-02-06"); +insert into diaries values(3496, "2021-02-07"); +insert into diaries values(3497, "2021-02-08"); +insert into diaries values(3498, "2021-02-09"); +insert into diaries values(3499, "2021-02-10"); +insert into diaries values(3500, "2021-02-11"); +insert into diaries values(3501, "2021-02-12"); +insert into diaries values(3502, "2021-02-13"); +insert into diaries values(3503, "2021-02-14"); +insert into diaries values(3504, "2021-02-15"); +insert into diaries values(3505, "2021-02-16"); +insert into diaries values(3506, "2021-02-17"); +insert into diaries values(3507, "2021-02-18"); +insert into diaries values(3508, "2021-02-19"); +insert into diaries values(3509, "2021-02-20"); +insert into diaries values(3510, "2021-02-21"); +insert into diaries values(3511, "2021-02-22"); +insert into diaries values(3512, "2021-02-23"); +insert into diaries values(3513, "2021-02-24"); +insert into diaries values(3514, "2021-02-25"); +insert into diaries values(3515, "2021-02-26"); +insert into diaries values(3516, "2021-02-27"); +insert into diaries values(3517, "2021-02-28"); +insert into diaries values(3518, "2021-03-01"); +insert into diaries values(3519, "2021-03-02"); +insert into diaries values(3520, "2021-03-03"); +insert into diaries values(3521, "2021-03-04"); +insert into diaries values(3522, "2021-03-05"); +insert into diaries values(3523, "2021-03-06"); +insert into diaries values(3524, "2021-03-07"); +insert into diaries values(3525, "2021-03-08"); +insert into diaries values(3526, "2021-03-09"); +insert into diaries values(3527, "2021-03-10"); +insert into diaries values(3528, "2021-03-11"); +insert into diaries values(3529, "2021-03-12"); +insert into diaries values(3530, "2021-03-13"); +insert into diaries values(3531, "2021-03-14"); +insert into diaries values(3532, "2021-03-15"); +insert into diaries values(3533, "2021-03-16"); +insert into diaries values(3534, "2021-03-17"); +insert into diaries values(3535, "2021-03-18"); +insert into diaries values(3536, "2021-03-19"); +insert into diaries values(3537, "2021-03-20"); +insert into diaries values(3538, "2021-03-21"); +insert into diaries values(3539, "2021-03-22"); +insert into diaries values(3540, "2021-03-23"); +insert into diaries values(3541, "2021-03-24"); +insert into diaries values(3542, "2021-03-25"); +insert into diaries values(3543, "2021-03-26"); +insert into diaries values(3544, "2021-03-27"); +insert into diaries values(3545, "2021-03-28"); +insert into diaries values(3546, "2021-03-29"); +insert into diaries values(3547, "2021-03-30"); +insert into diaries values(3548, "2021-03-31"); +insert into diaries values(3549, "2021-04-01"); +insert into diaries values(3550, "2021-04-02"); +insert into diaries values(3551, "2021-04-03"); +insert into diaries values(3552, "2021-04-04"); +insert into diaries values(3553, "2021-04-05"); +insert into diaries values(3554, "2021-04-06"); +insert into diaries values(3555, "2021-04-07"); +insert into diaries values(3556, "2021-04-08"); +insert into diaries values(3557, "2021-04-09"); +insert into diaries values(3558, "2021-04-10"); +insert into diaries values(3559, "2021-04-11"); +insert into diaries values(3560, "2021-04-12"); +insert into diaries values(3561, "2021-04-13"); +insert into diaries values(3562, "2021-04-14"); +insert into diaries values(3563, "2021-04-15"); +insert into diaries values(3564, "2021-04-16"); +insert into diaries values(3565, "2021-04-17"); +insert into diaries values(3566, "2021-04-18"); +insert into diaries values(3567, "2021-04-19"); +insert into diaries values(3568, "2021-04-20"); +insert into diaries values(3569, "2021-04-21"); +insert into diaries values(3570, "2021-04-22"); +insert into diaries values(3571, "2021-04-23"); +insert into diaries values(3572, "2021-04-24"); +insert into diaries values(3573, "2021-04-25"); +insert into diaries values(3574, "2021-04-26"); +insert into diaries values(3575, "2021-04-27"); +insert into diaries values(3576, "2021-04-28"); +insert into diaries values(3577, "2021-04-29"); +insert into diaries values(3578, "2021-04-30"); +insert into diaries values(3579, "2021-05-01"); +insert into diaries values(3580, "2021-05-02"); +insert into diaries values(3581, "2021-05-03"); +insert into diaries values(3582, "2021-05-04"); +insert into diaries values(3583, "2021-05-05"); +insert into diaries values(3584, "2021-05-06"); +insert into diaries values(3585, "2021-05-07"); +insert into diaries values(3586, "2021-05-08"); +insert into diaries values(3587, "2021-05-09"); +insert into diaries values(3588, "2021-05-10"); +insert into diaries values(3589, "2021-05-11"); +insert into diaries values(3590, "2021-05-12"); +insert into diaries values(3591, "2021-05-13"); +insert into diaries values(3592, "2021-05-14"); +insert into diaries values(3593, "2021-05-15"); +insert into diaries values(3594, "2021-05-16"); +insert into diaries values(3595, "2021-05-17"); +insert into diaries values(3596, "2021-05-18"); +insert into diaries values(3597, "2021-05-19"); +insert into diaries values(3598, "2021-05-20"); +insert into diaries values(3599, "2021-05-21"); +insert into diaries values(3600, "2021-05-22"); +insert into diaries values(3601, "2021-05-23"); +insert into diaries values(3602, "2021-05-24"); +insert into diaries values(3603, "2021-05-25"); +insert into diaries values(3604, "2021-05-26"); +insert into diaries values(3605, "2021-05-27"); +insert into diaries values(3606, "2021-05-28"); +insert into diaries values(3607, "2021-05-29"); +insert into diaries values(3608, "2021-05-30"); +insert into diaries values(3609, "2021-05-31"); +insert into diaries values(3610, "2021-06-01"); +insert into diaries values(3611, "2021-06-02"); +insert into diaries values(3612, "2021-06-03"); +insert into diaries values(3613, "2021-06-04"); +insert into diaries values(3614, "2021-06-05"); +insert into diaries values(3615, "2021-06-06"); +insert into diaries values(3616, "2021-06-07"); +insert into diaries values(3617, "2021-06-08"); +insert into diaries values(3618, "2021-06-09"); +insert into diaries values(3619, "2021-06-10"); +insert into diaries values(3620, "2021-06-11"); +insert into diaries values(3621, "2021-06-12"); +insert into diaries values(3622, "2021-06-13"); +insert into diaries values(3623, "2021-06-14"); +insert into diaries values(3624, "2021-06-15"); +insert into diaries values(3625, "2021-06-16"); +insert into diaries values(3626, "2021-06-17"); +insert into diaries values(3627, "2021-06-18"); +insert into diaries values(3628, "2021-06-19"); +insert into diaries values(3629, "2021-06-20"); +insert into diaries values(3630, "2021-06-21"); +insert into diaries values(3631, "2021-06-22"); +insert into diaries values(3632, "2021-06-23"); +insert into diaries values(3633, "2021-06-24"); +insert into diaries values(3634, "2021-06-25"); +insert into diaries values(3635, "2021-06-26"); +insert into diaries values(3636, "2021-06-27"); +insert into diaries values(3637, "2021-06-28"); +insert into diaries values(3638, "2021-06-29"); +insert into diaries values(3639, "2021-06-30"); +insert into diaries values(3640, "2021-07-01"); +insert into diaries values(3641, "2021-07-02"); +insert into diaries values(3642, "2021-07-03"); +insert into diaries values(3643, "2021-07-04"); +insert into diaries values(3644, "2021-07-05"); +insert into diaries values(3645, "2021-07-06"); +insert into diaries values(3646, "2021-07-07"); +insert into diaries values(3647, "2021-07-08"); +insert into diaries values(3648, "2021-07-09"); +insert into diaries values(3649, "2021-07-10"); +insert into diaries values(3650, "2021-07-11"); +insert into diaries values(3651, "2021-07-12"); +insert into diaries values(3652, "2021-07-13"); +insert into diaries values(3653, "2021-07-14"); +insert into diaries values(3654, "2021-07-15"); +insert into diaries values(3655, "2021-07-16"); +insert into diaries values(3656, "2021-07-17"); +insert into diaries values(3657, "2021-07-18"); +insert into diaries values(3658, "2021-07-19"); +insert into diaries values(3659, "2021-07-20"); +insert into diaries values(3660, "2021-07-21"); +insert into diaries values(3661, "2021-07-22"); +insert into diaries values(3662, "2021-07-23"); +insert into diaries values(3663, "2021-07-24"); +insert into diaries values(3664, "2021-07-25"); +insert into diaries values(3665, "2021-07-26"); +insert into diaries values(3666, "2021-07-27"); +insert into diaries values(3667, "2021-07-28"); +insert into diaries values(3668, "2021-07-29"); +insert into diaries values(3669, "2021-07-30"); +insert into diaries values(3670, "2021-07-31"); +insert into diaries values(3671, "2021-08-01"); +insert into diaries values(3672, "2021-08-02"); +insert into diaries values(3673, "2021-08-03"); +insert into diaries values(3674, "2021-08-04"); +insert into diaries values(3675, "2021-08-05"); +insert into diaries values(3676, "2021-08-06"); +insert into diaries values(3677, "2021-08-07"); +insert into diaries values(3678, "2021-08-08"); +insert into diaries values(3679, "2021-08-09"); +insert into diaries values(3680, "2021-08-10"); +insert into diaries values(3681, "2021-08-11"); +insert into diaries values(3682, "2021-08-12"); +insert into diaries values(3683, "2021-08-13"); +insert into diaries values(3684, "2021-08-14"); +insert into diaries values(3685, "2021-08-15"); +insert into diaries values(3686, "2021-08-16"); +insert into diaries values(3687, "2021-08-17"); +insert into diaries values(3688, "2021-08-18"); +insert into diaries values(3689, "2021-08-19"); +insert into diaries values(3690, "2021-08-20"); +insert into diaries values(3691, "2021-08-21"); +insert into diaries values(3692, "2021-08-22"); +insert into diaries values(3693, "2021-08-23"); +insert into diaries values(3694, "2021-08-24"); +insert into diaries values(3695, "2021-08-25"); +insert into diaries values(3696, "2021-08-26"); +insert into diaries values(3697, "2021-08-27"); +insert into diaries values(3698, "2021-08-28"); +insert into diaries values(3699, "2021-08-29"); +insert into diaries values(3700, "2021-08-30"); +insert into diaries values(3701, "2021-08-31"); +insert into diaries values(3702, "2021-09-01"); +insert into diaries values(3703, "2021-09-02"); +insert into diaries values(3704, "2021-09-03"); +insert into diaries values(3705, "2021-09-04"); +insert into diaries values(3706, "2021-09-05"); +insert into diaries values(3707, "2021-09-06"); +insert into diaries values(3708, "2021-09-07"); +insert into diaries values(3709, "2021-09-08"); +insert into diaries values(3710, "2021-09-09"); +insert into diaries values(3711, "2021-09-10"); +insert into diaries values(3712, "2021-09-11"); +insert into diaries values(3713, "2021-09-12"); +insert into diaries values(3714, "2021-09-13"); +insert into diaries values(3715, "2021-09-14"); +insert into diaries values(3716, "2021-09-15"); +insert into diaries values(3717, "2021-09-16"); +insert into diaries values(3718, "2021-09-17"); +insert into diaries values(3719, "2021-09-18"); +insert into diaries values(3720, "2021-09-19"); +insert into diaries values(3721, "2021-09-20"); +insert into diaries values(3722, "2021-09-21"); +insert into diaries values(3723, "2021-09-22"); +insert into diaries values(3724, "2021-09-23"); +insert into diaries values(3725, "2021-09-24"); +insert into diaries values(3726, "2021-09-25"); +insert into diaries values(3727, "2021-09-26"); +insert into diaries values(3728, "2021-09-27"); +insert into diaries values(3729, "2021-09-28"); +insert into diaries values(3730, "2021-09-29"); +insert into diaries values(3731, "2021-09-30"); +insert into diaries values(3732, "2021-10-01"); +insert into diaries values(3733, "2021-10-02"); +insert into diaries values(3734, "2021-10-03"); +insert into diaries values(3735, "2021-10-04"); +insert into diaries values(3736, "2021-10-05"); +insert into diaries values(3737, "2021-10-06"); +insert into diaries values(3738, "2021-10-07"); +insert into diaries values(3739, "2021-10-08"); +insert into diaries values(3740, "2021-10-09"); +insert into diaries values(3741, "2021-10-10"); +insert into diaries values(3742, "2021-10-11"); +insert into diaries values(3743, "2021-10-12"); +insert into diaries values(3744, "2021-10-13"); +insert into diaries values(3745, "2021-10-14"); +insert into diaries values(3746, "2021-10-15"); +insert into diaries values(3747, "2021-10-16"); +insert into diaries values(3748, "2021-10-17"); +insert into diaries values(3749, "2021-10-18"); +insert into diaries values(3750, "2021-10-19"); +insert into diaries values(3751, "2021-10-20"); +insert into diaries values(3752, "2021-10-21"); +insert into diaries values(3753, "2021-10-22"); +insert into diaries values(3754, "2021-10-23"); +insert into diaries values(3755, "2021-10-24"); +insert into diaries values(3756, "2021-10-25"); +insert into diaries values(3757, "2021-10-26"); +insert into diaries values(3758, "2021-10-27"); +insert into diaries values(3759, "2021-10-28"); +insert into diaries values(3760, "2021-10-29"); +insert into diaries values(3761, "2021-10-30"); +insert into diaries values(3762, "2021-10-31"); +insert into diaries values(3763, "2021-11-01"); +insert into diaries values(3764, "2021-11-02"); +insert into diaries values(3765, "2021-11-03"); +insert into diaries values(3766, "2021-11-04"); +insert into diaries values(3767, "2021-11-05"); +insert into diaries values(3768, "2021-11-06"); +insert into diaries values(3769, "2021-11-07"); +insert into diaries values(3770, "2021-11-08"); +insert into diaries values(3771, "2021-11-09"); +insert into diaries values(3772, "2021-11-10"); +insert into diaries values(3773, "2021-11-11"); +insert into diaries values(3774, "2021-11-12"); +insert into diaries values(3775, "2021-11-13"); +insert into diaries values(3776, "2021-11-14"); +insert into diaries values(3777, "2021-11-15"); +insert into diaries values(3778, "2021-11-16"); +insert into diaries values(3779, "2021-11-17"); +insert into diaries values(3780, "2021-11-18"); +insert into diaries values(3781, "2021-11-19"); +insert into diaries values(3782, "2021-11-20"); +insert into diaries values(3783, "2021-11-21"); +insert into diaries values(3784, "2021-11-22"); +insert into diaries values(3785, "2021-11-23"); +insert into diaries values(3786, "2021-11-24"); +insert into diaries values(3787, "2021-11-25"); +insert into diaries values(3788, "2021-11-26"); +insert into diaries values(3789, "2021-11-27"); +insert into diaries values(3790, "2021-11-28"); +insert into diaries values(3791, "2021-11-29"); +insert into diaries values(3792, "2021-11-30"); +insert into diaries values(3793, "2021-12-01"); +insert into diaries values(3794, "2021-12-02"); +insert into diaries values(3795, "2021-12-03"); +insert into diaries values(3796, "2021-12-04"); +insert into diaries values(3797, "2021-12-05"); +insert into diaries values(3798, "2021-12-06"); +insert into diaries values(3799, "2021-12-07"); +insert into diaries values(3800, "2021-12-08"); +insert into diaries values(3801, "2021-12-09"); +insert into diaries values(3802, "2021-12-10"); +insert into diaries values(3803, "2021-12-11"); +insert into diaries values(3804, "2021-12-12"); +insert into diaries values(3805, "2021-12-13"); +insert into diaries values(3806, "2021-12-14"); +insert into diaries values(3807, "2021-12-15"); +insert into diaries values(3808, "2021-12-16"); +insert into diaries values(3809, "2021-12-17"); +insert into diaries values(3810, "2021-12-18"); +insert into diaries values(3811, "2021-12-19"); +insert into diaries values(3812, "2021-12-20"); +insert into diaries values(3813, "2021-12-21"); +insert into diaries values(3814, "2021-12-22"); +insert into diaries values(3815, "2021-12-23"); +insert into diaries values(3816, "2021-12-24"); +insert into diaries values(3817, "2021-12-25"); +insert into diaries values(3818, "2021-12-26"); +insert into diaries values(3819, "2021-12-27"); +insert into diaries values(3820, "2021-12-28"); +insert into diaries values(3821, "2021-12-29"); +insert into diaries values(3822, "2021-12-30"); +insert into diaries values(3823, "2021-12-31"); +insert into diaries values(3824, "2022-01-01"); +insert into diaries values(3825, "2022-01-02"); +insert into diaries values(3826, "2022-01-03"); +insert into diaries values(3827, "2022-01-04"); +insert into diaries values(3828, "2022-01-05"); +insert into diaries values(3829, "2022-01-06"); +insert into diaries values(3830, "2022-01-07"); +insert into diaries values(3831, "2022-01-08"); +insert into diaries values(3832, "2022-01-09"); +insert into diaries values(3833, "2022-01-10"); +insert into diaries values(3834, "2022-01-11"); +insert into diaries values(3835, "2022-01-12"); +insert into diaries values(3836, "2022-01-13"); +insert into diaries values(3837, "2022-01-14"); +insert into diaries values(3838, "2022-01-15"); +insert into diaries values(3839, "2022-01-16"); +insert into diaries values(3840, "2022-01-17"); +insert into diaries values(3841, "2022-01-18"); +insert into diaries values(3842, "2022-01-19"); +insert into diaries values(3843, "2022-01-20"); +insert into diaries values(3844, "2022-01-21"); +insert into diaries values(3845, "2022-01-22"); +insert into diaries values(3846, "2022-01-23"); +insert into diaries values(3847, "2022-01-24"); +insert into diaries values(3848, "2022-01-25"); +insert into diaries values(3849, "2022-01-26"); +insert into diaries values(3850, "2022-01-27"); +insert into diaries values(3851, "2022-01-28"); +insert into diaries values(3852, "2022-01-29"); +insert into diaries values(3853, "2022-01-30"); +insert into diaries values(3854, "2022-01-31"); +insert into diaries values(3855, "2022-02-01"); +insert into diaries values(3856, "2022-02-02"); +insert into diaries values(3857, "2022-02-03"); +insert into diaries values(3858, "2022-02-04"); +insert into diaries values(3859, "2022-02-05"); +insert into diaries values(3860, "2022-02-06"); +insert into diaries values(3861, "2022-02-07"); +insert into diaries values(3862, "2022-02-08"); +insert into diaries values(3863, "2022-02-09"); +insert into diaries values(3864, "2022-02-10"); +insert into diaries values(3865, "2022-02-11"); +insert into diaries values(3866, "2022-02-12"); +insert into diaries values(3867, "2022-02-13"); +insert into diaries values(3868, "2022-02-14"); +insert into diaries values(3869, "2022-02-15"); +insert into diaries values(3870, "2022-02-16"); +insert into diaries values(3871, "2022-02-17"); +insert into diaries values(3872, "2022-02-18"); +insert into diaries values(3873, "2022-02-19"); +insert into diaries values(3874, "2022-02-20"); +insert into diaries values(3875, "2022-02-21"); +insert into diaries values(3876, "2022-02-22"); +insert into diaries values(3877, "2022-02-23"); +insert into diaries values(3878, "2022-02-24"); +insert into diaries values(3879, "2022-02-25"); +insert into diaries values(3880, "2022-02-26"); +insert into diaries values(3881, "2022-02-27"); +insert into diaries values(3882, "2022-02-28"); +insert into diaries values(3883, "2022-03-01"); +insert into diaries values(3884, "2022-03-02"); +insert into diaries values(3885, "2022-03-03"); +insert into diaries values(3886, "2022-03-04"); +insert into diaries values(3887, "2022-03-05"); +insert into diaries values(3888, "2022-03-06"); +insert into diaries values(3889, "2022-03-07"); +insert into diaries values(3890, "2022-03-08"); +insert into diaries values(3891, "2022-03-09"); +insert into diaries values(3892, "2022-03-10"); +insert into diaries values(3893, "2022-03-11"); +insert into diaries values(3894, "2022-03-12"); +insert into diaries values(3895, "2022-03-13"); +insert into diaries values(3896, "2022-03-14"); +insert into diaries values(3897, "2022-03-15"); +insert into diaries values(3898, "2022-03-16"); +insert into diaries values(3899, "2022-03-17"); +insert into diaries values(3900, "2022-03-18"); +insert into diaries values(3901, "2022-03-19"); +insert into diaries values(3902, "2022-03-20"); +insert into diaries values(3903, "2022-03-21"); +insert into diaries values(3904, "2022-03-22"); +insert into diaries values(3905, "2022-03-23"); +insert into diaries values(3906, "2022-03-24"); +insert into diaries values(3907, "2022-03-25"); +insert into diaries values(3908, "2022-03-26"); +insert into diaries values(3909, "2022-03-27"); +insert into diaries values(3910, "2022-03-28"); +insert into diaries values(3911, "2022-03-29"); +insert into diaries values(3912, "2022-03-30"); +insert into diaries values(3913, "2022-03-31"); +insert into diaries values(3914, "2022-04-01"); +insert into diaries values(3915, "2022-04-02"); +insert into diaries values(3916, "2022-04-03"); +insert into diaries values(3917, "2022-04-04"); +insert into diaries values(3918, "2022-04-05"); +insert into diaries values(3919, "2022-04-06"); +insert into diaries values(3920, "2022-04-07"); +insert into diaries values(3921, "2022-04-08"); +insert into diaries values(3922, "2022-04-09"); +insert into diaries values(3923, "2022-04-10"); +insert into diaries values(3924, "2022-04-11"); +insert into diaries values(3925, "2022-04-12"); +insert into diaries values(3926, "2022-04-13"); +insert into diaries values(3927, "2022-04-14"); +insert into diaries values(3928, "2022-04-15"); +insert into diaries values(3929, "2022-04-16"); +insert into diaries values(3930, "2022-04-17"); +insert into diaries values(3931, "2022-04-18"); +insert into diaries values(3932, "2022-04-19"); +insert into diaries values(3933, "2022-04-20"); +insert into diaries values(3934, "2022-04-21"); +insert into diaries values(3935, "2022-04-22"); +insert into diaries values(3936, "2022-04-23"); +insert into diaries values(3937, "2022-04-24"); +insert into diaries values(3938, "2022-04-25"); +insert into diaries values(3939, "2022-04-26"); +insert into diaries values(3940, "2022-04-27"); +insert into diaries values(3941, "2022-04-28"); +insert into diaries values(3942, "2022-04-29"); +insert into diaries values(3943, "2022-04-30"); +insert into diaries values(3944, "2022-05-01"); +insert into diaries values(3945, "2022-05-02"); +insert into diaries values(3946, "2022-05-03"); +insert into diaries values(3947, "2022-05-04"); +insert into diaries values(3948, "2022-05-05"); +insert into diaries values(3949, "2022-05-06"); +insert into diaries values(3950, "2022-05-07"); +insert into diaries values(3951, "2022-05-08"); +insert into diaries values(3952, "2022-05-09"); +insert into diaries values(3953, "2022-05-10"); +insert into diaries values(3954, "2022-05-11"); +insert into diaries values(3955, "2022-05-12"); +insert into diaries values(3956, "2022-05-13"); +insert into diaries values(3957, "2022-05-14"); +insert into diaries values(3958, "2022-05-15"); +insert into diaries values(3959, "2022-05-16"); +insert into diaries values(3960, "2022-05-17"); +insert into diaries values(3961, "2022-05-18"); +insert into diaries values(3962, "2022-05-19"); +insert into diaries values(3963, "2022-05-20"); +insert into diaries values(3964, "2022-05-21"); +insert into diaries values(3965, "2022-05-22"); +insert into diaries values(3966, "2022-05-23"); +insert into diaries values(3967, "2022-05-24"); +insert into diaries values(3968, "2022-05-25"); +insert into diaries values(3969, "2022-05-26"); +insert into diaries values(3970, "2022-05-27"); +insert into diaries values(3971, "2022-05-28"); +insert into diaries values(3972, "2022-05-29"); +insert into diaries values(3973, "2022-05-30"); +insert into diaries values(3974, "2022-05-31"); +insert into diaries values(3975, "2022-06-01"); +insert into diaries values(3976, "2022-06-02"); +insert into diaries values(3977, "2022-06-03"); +insert into diaries values(3978, "2022-06-04"); +insert into diaries values(3979, "2022-06-05"); +insert into diaries values(3980, "2022-06-06"); +insert into diaries values(3981, "2022-06-07"); +insert into diaries values(3982, "2022-06-08"); +insert into diaries values(3983, "2022-06-09"); +insert into diaries values(3984, "2022-06-10"); +insert into diaries values(3985, "2022-06-11"); +insert into diaries values(3986, "2022-06-12"); +insert into diaries values(3987, "2022-06-13"); +insert into diaries values(3988, "2022-06-14"); +insert into diaries values(3989, "2022-06-15"); +insert into diaries values(3990, "2022-06-16"); +insert into diaries values(3991, "2022-06-17"); +insert into diaries values(3992, "2022-06-18"); +insert into diaries values(3993, "2022-06-19"); +insert into diaries values(3994, "2022-06-20"); +insert into diaries values(3995, "2022-06-21"); +insert into diaries values(3996, "2022-06-22"); +insert into diaries values(3997, "2022-06-23"); +insert into diaries values(3998, "2022-06-24"); +insert into diaries values(3999, "2022-06-25"); +insert into diaries values(4000, "2022-06-26"); +insert into diaries values(4001, "2022-06-27"); +insert into diaries values(4002, "2022-06-28"); +insert into diaries values(4003, "2022-06-29"); +insert into diaries values(4004, "2022-06-30"); +insert into diaries values(4005, "2022-07-01"); +insert into diaries values(4006, "2022-07-02"); +insert into diaries values(4007, "2022-07-03"); +insert into diaries values(4008, "2022-07-04"); +insert into diaries values(4009, "2022-07-05"); +insert into diaries values(4010, "2022-07-06"); +insert into diaries values(4011, "2022-07-07"); +insert into diaries values(4012, "2022-07-08"); +insert into diaries values(4013, "2022-07-09"); +insert into diaries values(4014, "2022-07-10"); +insert into diaries values(4015, "2022-07-11"); +insert into diaries values(4016, "2022-07-12"); +insert into diaries values(4017, "2022-07-13"); +insert into diaries values(4018, "2022-07-14"); +insert into diaries values(4019, "2022-07-15"); +insert into diaries values(4020, "2022-07-16"); +insert into diaries values(4021, "2022-07-17"); +insert into diaries values(4022, "2022-07-18"); +insert into diaries values(4023, "2022-07-19"); +insert into diaries values(4024, "2022-07-20"); +insert into diaries values(4025, "2022-07-21"); +insert into diaries values(4026, "2022-07-22"); +insert into diaries values(4027, "2022-07-23"); +insert into diaries values(4028, "2022-07-24"); +insert into diaries values(4029, "2022-07-25"); +insert into diaries values(4030, "2022-07-26"); +insert into diaries values(4031, "2022-07-27"); +insert into diaries values(4032, "2022-07-28"); +insert into diaries values(4033, "2022-07-29"); +insert into diaries values(4034, "2022-07-30"); +insert into diaries values(4035, "2022-07-31"); +insert into diaries values(4036, "2022-08-01"); +insert into diaries values(4037, "2022-08-02"); +insert into diaries values(4038, "2022-08-03"); +insert into diaries values(4039, "2022-08-04"); +insert into diaries values(4040, "2022-08-05"); +insert into diaries values(4041, "2022-08-06"); +insert into diaries values(4042, "2022-08-07"); +insert into diaries values(4043, "2022-08-08"); +insert into diaries values(4044, "2022-08-09"); +insert into diaries values(4045, "2022-08-10"); +insert into diaries values(4046, "2022-08-11"); +insert into diaries values(4047, "2022-08-12"); +insert into diaries values(4048, "2022-08-13"); +insert into diaries values(4049, "2022-08-14"); +insert into diaries values(4050, "2022-08-15"); +insert into diaries values(4051, "2022-08-16"); +insert into diaries values(4052, "2022-08-17"); +insert into diaries values(4053, "2022-08-18"); +insert into diaries values(4054, "2022-08-19"); +insert into diaries values(4055, "2022-08-20"); +insert into diaries values(4056, "2022-08-21"); +insert into diaries values(4057, "2022-08-22"); +insert into diaries values(4058, "2022-08-23"); +insert into diaries values(4059, "2022-08-24"); +insert into diaries values(4060, "2022-08-25"); +insert into diaries values(4061, "2022-08-26"); +insert into diaries values(4062, "2022-08-27"); +insert into diaries values(4063, "2022-08-28"); +insert into diaries values(4064, "2022-08-29"); +insert into diaries values(4065, "2022-08-30"); +insert into diaries values(4066, "2022-08-31"); +insert into diaries values(4067, "2022-09-01"); +insert into diaries values(4068, "2022-09-02"); +insert into diaries values(4069, "2022-09-03"); +insert into diaries values(4070, "2022-09-04"); +insert into diaries values(4071, "2022-09-05"); +insert into diaries values(4072, "2022-09-06"); +insert into diaries values(4073, "2022-09-07"); +insert into diaries values(4074, "2022-09-08"); +insert into diaries values(4075, "2022-09-09"); +insert into diaries values(4076, "2022-09-10"); +insert into diaries values(4077, "2022-09-11"); +insert into diaries values(4078, "2022-09-12"); +insert into diaries values(4079, "2022-09-13"); +insert into diaries values(4080, "2022-09-14"); +insert into diaries values(4081, "2022-09-15"); +insert into diaries values(4082, "2022-09-16"); +insert into diaries values(4083, "2022-09-17"); +insert into diaries values(4084, "2022-09-18"); +insert into diaries values(4085, "2022-09-19"); +insert into diaries values(4086, "2022-09-20"); +insert into diaries values(4087, "2022-09-21"); +insert into diaries values(4088, "2022-09-22"); +insert into diaries values(4089, "2022-09-23"); +insert into diaries values(4090, "2022-09-24"); +insert into diaries values(4091, "2022-09-25"); +insert into diaries values(4092, "2022-09-26"); +insert into diaries values(4093, "2022-09-27"); +insert into diaries values(4094, "2022-09-28"); +insert into diaries values(4095, "2022-09-29"); +commit; +set autocommit=1; + +select * from diaries where match(title) against("2022-09-0"); + +drop table diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_column_index_delete.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_column_index_delete.test new file mode 100644 index 00000000000..61aa07d8da2 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_column_index_delete.test @@ -0,0 +1,43 @@ +# Copyright(C) 2011 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists diaries; +--enable_warnings + +set names utf8; +create table diaries ( + id int primary key, + title varchar(255), + content text, + fulltext index (title, content), + fulltext index (title), + fulltext index (content) +) default charset utf8 COMMENT = 'engine "innodb"'; +show create table diaries; +insert into diaries values(1, "Hello", "はじめました。"); +insert into diaries values(2, "天気", "明日の富士山の天気について"); +insert into diaries values(3, "富士山", "今日もきれい。"); +delete from diaries where id = 2; +select * from diaries where match(title, content) against("富士山"); +select * from diaries where match(title) against("富士山"); +select * from diaries where match(content) against("富士山"); +drop table diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_column_index_insert.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_column_index_insert.test new file mode 100644 index 00000000000..8ddfa82e84a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_column_index_insert.test @@ -0,0 +1,43 @@ +# Copyright(C) 2011 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists diaries; +--enable_warnings + +set names utf8; +create table diaries ( + id int primary key, + title varchar(255), + content text, + fulltext index (title, content), + fulltext index (title), + fulltext index (content) +) default charset utf8 COMMENT = 'engine "innodb"'; +show create table diaries; +insert into diaries values(1, "Hello", "はじめました。"); +insert into diaries values(2, "天気", "明日の富士山の天気について"); +insert into diaries values(3, "富士山", "今日もきれい。"); +select * from diaries; +select * from diaries where match(title, content) against("富士山"); +select * from diaries where match(title) against("富士山"); +select * from diaries where match(content) against("富士山"); +drop table diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_column_index_recreate.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_column_index_recreate.test new file mode 100644 index 00000000000..1e2413689d6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_column_index_recreate.test @@ -0,0 +1,51 @@ +# Copyright(C) 2011 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists diaries; +--enable_warnings + +set names utf8; +create table diaries ( + id int primary key, + title varchar(255), + content text, + fulltext index (title, content), + fulltext index (title), + fulltext index (content) +) default charset utf8 COMMENT = 'engine "innodb"'; +show create table diaries; + +insert into diaries values(1, "Hello", "はじめました。"); +insert into diaries values(2, "天気", "明日の富士山の天気について"); +insert into diaries values(3, "富士山", "今日もきれい。"); +select * from diaries where match(title, content) against("富士山"); + +drop index title on diaries; +--error ER_FT_MATCHING_KEY_NOT_FOUND +select * from diaries where match(title, content) against("富士山"); + +create fulltext index new_title_content_index on diaries (title, content); +select * from diaries where match(title, content) against("富士山"); + +select * from diaries; + +drop table diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_column_index_update.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_column_index_update.test new file mode 100644 index 00000000000..44690e699a0 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_column_index_update.test @@ -0,0 +1,44 @@ +# Copyright(C) 2011 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists diaries; +--enable_warnings + +set names utf8; +create table diaries ( + id int primary key, + title varchar(255), + content text, + fulltext index (title, content), + fulltext index (title), + fulltext index (content) +) default charset utf8 COMMENT = 'engine "innodb"'; +show create table diaries; +insert into diaries values(1, "Hello", "はじめました。"); +insert into diaries values(2, "天気", "明日の富士山の天気について"); +insert into diaries values(3, "富士山", "今日もきれい。"); +update diaries set title = "チョモランマ" where id = 3; +update diaries set content = "チョモランマと富士山" where id = 1; +select * from diaries where match(title, content) against("富士山"); +select * from diaries where match(title) against("富士山"); +select * from diaries where match(content) against("富士山"); +drop table diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_index.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_index.test new file mode 100644 index 00000000000..97a8a1f07a5 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_index.test @@ -0,0 +1,48 @@ +# Copyright(C) 2011 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists diaries; +--enable_warnings + +create table diaries ( + id int primary key auto_increment, + title text, + body text, + fulltext index title_index (title), + fulltext index body_index (body) +) comment = 'engine "innodb"' default charset utf8; +show create table diaries; + +insert into diaries (title, body) values ("survey", "will start groonga!"); +insert into diaries (title, body) values ("groonga (1)", "starting groonga..."); +insert into diaries (title, body) values ("groonga (2)", "started groonga."); + +select * from diaries + where match(title) against("survey") and + match(body) against("groonga"); + +select *, match(title) against("survey"), match(body) against("groonga") + from diaries + where match(title) against("survey") and + match(body) against("groonga"); + +drop table diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_myisam.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_myisam.test new file mode 100644 index 00000000000..eda8a5f15ef --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_myisam.test @@ -0,0 +1,102 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# Copyright(C) 2011 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/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists t1, t2, t3; +--enable_warnings + +create table t1 (c1 int primary key, c2 text, fulltext index ft (c2)) COMMENT = 'engine "myisam"'; +show create table t1; +insert into t1 values (1, "hoge hoge"); +insert into t1 values (2, "fuga fuga"); +insert into t1 values (3, "moge moge"); +select * from t1; +flush tables; +select * from t1; +drop table t1; + +create table t1 (c1 int primary key, c2 int, c3 text, fulltext index ft(c3)) COMMENT = 'engine "myisam"'; +insert into t1 values(1,10,"aa ii uu ee oo"); +insert into t1 values(2,20,"ka ki ku ke ko"); +insert into t1 values(3,30,"sa si su se so"); +insert into t1 values(4,40,"ta ti tu te to"); +insert into t1 values(5,50,"aa ii uu ee oo"); +select * from t1; +select * from t1 where match(c3) against("su"); +select * from t1 where match(c3) against("ii"); +select * from t1 where match(c3) against("+su" in boolean mode); +select * from t1 where match(c3) against("+ii" in boolean mode); +drop table t1; + +set names utf8; +create table t1 (c1 int primary key, c2 varchar(255), c3 text, fulltext index(c2), fulltext index(c3)) default charset utf8 COMMENT = 'engine "myisam"'; +insert into t1 values(1, "明日の富士山の天気について","あああああああ"); +insert into t1 values(2, "いいいいい","明日の富士山の天気は分かりません"); +insert into t1 values(3, "dummy", "dummy"); +select * from t1; +select * from t1 where match(c2) against("富士山"); +select * from t1 where match(c3) against("富士山"); +drop table t1; + +create table t1 (c1 int primary key, c2 varchar(100), fulltext index(c2)) default charset utf8 COMMENT = 'engine "myisam"'; +create table t2 (c1 int primary key, c2 text, fulltext index(c2)) default charset utf8 COMMENT = 'engine "myisam"'; +insert into t1 values (1, "aa ii uu ee oo"); +insert into t1 values (2, "ka ki ku ke ko"); +insert into t1 values (3, "aa ii ii ii oo"); +insert into t1 values (4, "sa si su se so"); +insert into t1 values (5, "ta ti ii ii to"); +insert into t2 (c1,c2) select c1,c2 from t1; +select * from t1; +select * from t2; +select * from t1 where c1=3; +select * from t2 where c1=3; +select * from t1 where c1>3 order by c1 desc; +select * from t2 where c1>3 order by c1 asc; +select * from t1 where c2>"s" order by c2 desc; +select * from t2 where c2>"s" order by c1 asc; +select *,match(c2) against("ii") from t1 where match(c2) against("ii") order by match(c2) against("ii") desc; +select *,match(c2) against("ii") from t2 where match(c2) against("ii") order by match(c2) against("ii") asc; +select c1,c2,match(c2) against("ii") from t1 where match(c2) against("ii"); +select c1,c2,match(c2) against("ii") from t1 where match(c2) against("ii"); +drop table t1,t2; + +# for "not match against" +create table t1 (c1 int primary key, c2 int, c3 text, fulltext index ft(c3)) COMMENT = 'engine "myisam"'; +insert into t1 values(1,10,"aa ii uu ee oo"); +insert into t1 values(2,10,"ka ki ku ke ko"); +insert into t1 values(3,10,"aa ii uu ee oo"); +insert into t1 values(4,10,"ka ki ku ke ko"); +insert into t1 values(5,20,"aa ii uu ee oo"); +insert into t1 values(6,20,"ka ki ku ke ko"); +insert into t1 values(7,20,"aa ii uu ee oo"); +insert into t1 values(8,20,"ka ki ku ke ko"); +select * from t1; +select *,match(c3) against("uu") from t1 where match(c3) against("uu"); +select * from t1 where not match(c3) against("uu"); +select *,match(c3) against("dummy") from t1 where match(c3) against("dummy"); +select * from t1 where not match(c3) against("dummy"); +select * from t1 where c1 = 4 and not match(c3) against("uu"); +select * from t1 where c1 <= 4 and not match(c3) against("uu"); +select * from t1 where c1 > 4 and not match(c3) against("uu"); +select * from t1 where c2 = 10 and not match(c3) against("uu"); +select * from t1 where c2 >= 15 and not match(c3) against("uu"); +select * from t1 where c2 < 15 and not match(c3) against("uu"); +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_not_match_against.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_not_match_against.test new file mode 100644 index 00000000000..6ce01598136 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_not_match_against.test @@ -0,0 +1,47 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# Copyright(C) 2011 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists t1, t2, t3; +--enable_warnings + +create table t1 (c1 int primary key, c2 int, c3 text, fulltext index ft(c3)) COMMENT = 'engine "innodb"'; +insert into t1 values(1,10,"aa ii uu ee oo"); +insert into t1 values(2,10,"ka ki ku ke ko"); +insert into t1 values(3,10,"aa ii uu ee oo"); +insert into t1 values(4,10,"ka ki ku ke ko"); +insert into t1 values(5,20,"aa ii uu ee oo"); +insert into t1 values(6,20,"ka ki ku ke ko"); +insert into t1 values(7,20,"aa ii uu ee oo"); +insert into t1 values(8,20,"ka ki ku ke ko"); +select * from t1; +select *,match(c3) against("uu") from t1 where match(c3) against("uu"); +select * from t1 where not match(c3) against("uu"); +select *,match(c3) against("dummy") from t1 where match(c3) against("dummy"); +select * from t1 where not match(c3) against("dummy"); +select * from t1 where c1 = 4 and not match(c3) against("uu"); +select * from t1 where c1 <= 4 and not match(c3) against("uu"); +select * from t1 where c1 > 4 and not match(c3) against("uu"); +select * from t1 where c2 = 10 and not match(c3) against("uu"); +select * from t1 where c2 >= 15 and not match(c3) against("uu"); +select * from t1 where c2 < 15 and not match(c3) against("uu"); +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_order_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_order_TODO_SPLIT_ME.test new file mode 100644 index 00000000000..5361b151661 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_order_TODO_SPLIT_ME.test @@ -0,0 +1,51 @@ +# Copyright(C) 2012 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/have_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES UTF8; +CREATE TABLE ft( + a INT, + b TEXT, + c TEXT, + PRIMARY KEY(a), + FULLTEXT KEY ftx1(b), + FULLTEXT KEY ftx2(c) +)ENGINE=Mroonga DEFAULT CHARSET=UTF8 COMMENT = 'engine "innodb"'; +SHOW CREATE TABLE ft; + +INSERT INTO ft VALUES(1,'aaaaa','abcde'); +INSERT INTO ft VALUES(2,'bbbbb','bcdef'); +INSERT INTO ft VALUES(3,'ccccc','cdefg'); +INSERT INTO ft VALUES(4,'ddddd','defgh'); +INSERT INTO ft VALUES(5,'eeeee','efghi'); + +SELECT a, b, c FROM ft WHERE MATCH(b) AGAINST('bbbbb' IN BOOLEAN MODE); +SELECT a, b, c FROM ft WHERE MATCH(b) AGAINST('bbbbb' IN BOOLEAN MODE) ORDER BY MATCH(b) AGAINST('bbbbb' IN BOOLEAN MODE); +SELECT a, b, c FROM ft WHERE MATCH(b) AGAINST('bbbbb' IN BOOLEAN MODE) ORDER BY MATCH(c) AGAINST('bbbbb' IN BOOLEAN MODE); +SELECT a, b, c FROM ft WHERE MATCH(c) AGAINST('bbbbb' IN BOOLEAN MODE); +SELECT a, b, c, MATCH(b) AGAINST('bbbbb' IN BOOLEAN MODE), MATCH(c) AGAINST('bbbbb' IN BOOLEAN MODE) FROM ft WHERE MATCH(b) AGAINST('bbbbb' IN BOOLEAN MODE) ORDER BY MATCH(c) AGAINST('bbbbb' IN BOOLEAN MODE); +SELECT a, b, c, MATCH(b) AGAINST('bbbbb' IN BOOLEAN MODE), MATCH(c) AGAINST('bbbbb' IN BOOLEAN MODE) FROM ft WHERE MATCH(b) AGAINST('bbbbb' IN BOOLEAN MODE); +SELECT a, b, c, MATCH(b) AGAINST('bbbbb' IN BOOLEAN MODE), MATCH(c) AGAINST('bbbbb' IN BOOLEAN MODE) FROM ft ORDER BY MATCH(c) AGAINST('bbbbb' IN BOOLEAN MODE), MATCH(b) AGAINST('bbbbb' IN BOOLEAN MODE), a; + +DROP TABLE ft; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_order_transaction.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_order_transaction.test new file mode 100644 index 00000000000..91e2f73da1d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_order_transaction.test @@ -0,0 +1,64 @@ +# 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + body TEXT, + FULLTEXT INDEX title_index (title), + FULLTEXT INDEX body_index (body) +) COMMENT = 'ENGINE "InnoDB"' DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE diaries; + +START TRANSACTION; +INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); +INSERT INTO diaries (title, body) VALUES ("groonga (1)", "starting groonga..."); +INSERT INTO diaries (title, body) VALUES ("groonga (2)", "started groonga."); + +SELECT * FROM diaries + WHERE MATCH(body) AGAINST("groonga") + ORDER BY id; + +CONNECT(search_connection, localhost, root); +USE test; +SELECT * FROM diaries + WHERE MATCH(body) AGAINST("groonga") + ORDER BY id; + +CONNECTION default; +COMMIT; + +CONNECTION search_connection; +SELECT * FROM diaries + WHERE MATCH(body) AGAINST("groonga") + ORDER BY id; +DISCONNECT search_connection; + +CONNECTION default; +SELECT * FROM diaries + WHERE MATCH(body) AGAINST("groonga") + ORDER BY id; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_parser_comment.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_parser_comment.test new file mode 100644 index 00000000000..fe80aae0804 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_parser_comment.test @@ -0,0 +1,39 @@ +# Copyright(C) 2011 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_innodb.inc +--source ../../include/mroonga/have_fulltext_index_comment.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists diaries; +--enable_warnings + +create table diaries ( + id int primary key auto_increment, + body text, + fulltext index body_index (body) + comment 'parser "TokenBigramSplitSymbolAlphaDigit"' +) comment = 'engine "innodb"' default charset utf8; +show create table diaries; +insert into diaries (body) values ("will start groonga!"); +insert into diaries (body) values ("starting groonga..."); +insert into diaries (body) values ("started groonga."); +select * from diaries; +select * from diaries where match(body) against("start"); +drop table diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/function_last_insert_grn_id.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/function_last_insert_grn_id.test new file mode 100644 index 00000000000..c4961756a26 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/function_last_insert_grn_id.test @@ -0,0 +1,52 @@ +# Copyright(C) 2012 Kouhei Sutou <kou@clear-code.com> +# 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/have_innodb.inc +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ids; +DROP FUNCTION IF EXISTS last_insert_grn_id; +--enable_warnings + +--disable_query_log +if ($VERSION_COMPILE_OS_WIN) +{ + CREATE FUNCTION last_insert_grn_id RETURNS integer SONAME 'ha_mroonga.dll'; +} +if (!$VERSION_COMPILE_OS_WIN) +{ + CREATE FUNCTION last_insert_grn_id RETURNS integer SONAME 'ha_mroonga.so'; +} +--enable_query_log + +CREATE TABLE ids ( + id int AUTO_INCREMENT PRIMARY KEY +) COMMENT='ENGINE "InnoDB"'; + +SELECT last_insert_grn_id(); + +INSERT INTO ids VALUES(); +SELECT last_insert_grn_id(); +SELECT * FROM ids; + +DROP TABLE ids; + +DROP FUNCTION last_insert_grn_id; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/function_last_insert_id_reference.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/function_last_insert_id_reference.test new file mode 100644 index 00000000000..1b7c3a7f265 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/function_last_insert_id_reference.test @@ -0,0 +1,36 @@ +# 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ids; +--enable_warnings + +CREATE TABLE ids ( + id int AUTO_INCREMENT PRIMARY KEY +) COMMENT='ENGINE "InnoDB"'; + +SELECT last_insert_id(); + +INSERT INTO ids VALUES(); +SELECT last_insert_id(); +SELECT * FROM ids; + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/function_last_insert_id_set.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/function_last_insert_id_set.test new file mode 100644 index 00000000000..6dc87f740f9 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/function_last_insert_id_set.test @@ -0,0 +1,38 @@ +# 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ids; +--enable_warnings + +CREATE TABLE ids ( + id int AUTO_INCREMENT PRIMARY KEY +) COMMENT='ENGINE "InnoDB"'; + +SELECT last_insert_id(); +SELECT last_insert_id(10); +SELECT last_insert_id(); + +INSERT INTO ids VALUES(); +SELECT last_insert_id(); +SELECT * FROM ids; + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_contains.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_contains.test new file mode 100644 index 00000000000..4676fc61331 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_contains.test @@ -0,0 +1,145 @@ +# Copyright(C) 2011 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_innodb.inc +--source include/have_geometry.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists shops; +--enable_warnings + +create table shops ( + id int primary key auto_increment, + name text, + location geometry NOT NULL, + spatial key location_index (location) +) comment = 'engine "innodb"'; +show create table shops; +insert into shops (name, location) + values ('nezu-no-taiyaki', + GeomFromText('POINT(139.762573 35.720253)')); +insert into shops (name, location) + values ('taiyaki-kataoka', + GeomFromText('POINT(139.715591 35.712521)')); +insert into shops (name, location) + values ('soba-taiyaki-ku', + GeomFromText('POINT(139.659088 35.683712)')); +insert into shops (name, location) + values ('kuruma', + GeomFromText('POINT(139.706207 35.721516)')); +insert into shops (name, location) + values ('hirose-ya', + GeomFromText('POINT(139.685608 35.714844)')); +insert into shops (name, location) + values ('sazare', + GeomFromText('POINT(139.685043 35.714653)')); +insert into shops (name, location) + values ('omede-taiyaki', + GeomFromText('POINT(139.817154 35.700516)')); +insert into shops (name, location) + values ('onaga-ya', + GeomFromText('POINT(139.81105 35.698254)')); +insert into shops (name, location) + values ('shiro-ya', + GeomFromText('POINT(139.638611 35.705517)')); +insert into shops (name, location) + values ('fuji-ya', + GeomFromText('POINT(139.637115 35.703938)')); +insert into shops (name, location) + values ('miyoshi', + GeomFromText('POINT(139.537323 35.644539)')); +insert into shops (name, location) + values ('juju-ya', + GeomFromText('POINT(139.695755 35.628922)')); +insert into shops (name, location) + values ('tatsumi-ya', + GeomFromText('POINT(139.638657 35.665501)')); +insert into shops (name, location) + values ('tetsuji', + GeomFromText('POINT(139.76857 35.680912)')); +insert into shops (name, location) + values ('gazuma-ya', + GeomFromText('POINT(139.647598 35.700817)')); +insert into shops (name, location) + values ('honma-mon', + GeomFromText('POINT(139.652573 35.722736)')); +insert into shops (name, location) + values ('naniwa-ya', + GeomFromText('POINT(139.796234 35.730061)')); +insert into shops (name, location) + values ('kuro-dai', + GeomFromText('POINT(139.704834 35.650345)')); +insert into shops (name, location) + values ('daruma', + GeomFromText('POINT(139.770599 35.681461)')); +insert into shops (name, location) + values ('yanagi-ya', + GeomFromText('POINT(139.783981 35.685341)')); +insert into shops (name, location) + values ('sharaku', + GeomFromText('POINT(139.794846 35.716969)')); +insert into shops (name, location) + values ('takane', + GeomFromText('POINT(139.560913 35.698601)')); +insert into shops (name, location) + values ('chiyoda', + GeomFromText('POINT(139.652817 35.642601)')); +insert into shops (name, location) + values ('da-ka-po', + GeomFromText('POINT(139.727356 35.627346)')); +insert into shops (name, location) + values ('matsushima-ya', + GeomFromText('POINT(139.737381 35.640556)')); +insert into shops (name, location) + values ('kazuya', + GeomFromText('POINT(139.760895 35.673508)')); +insert into shops (name, location) + values ('furuya-kogane-an', + GeomFromText('POINT(139.676071 35.680603)')); +insert into shops (name, location) + values ('hachi-no-ie', + GeomFromText('POINT(139.668106 35.608021)')); +insert into shops (name, location) + values ('azuki-chan', + GeomFromText('POINT(139.673203 35.64151)')); +insert into shops (name, location) + values ('kuriko-an', + GeomFromText('POINT(139.796829 35.712013)')); +insert into shops (name, location) + values ('yume-no-aru-machi-no-taiyaki-ya-san', + GeomFromText('POINT(139.712524 35.616199)')); +insert into shops (name, location) + values ('naze-ya', + GeomFromText('POINT(139.665833 35.609039)')); +insert into shops (name, location) + values ('sanoki-ya', + GeomFromText('POINT(139.770721 35.66592)')); +insert into shops (name, location) + values ('shigeta', + GeomFromText('POINT(139.780273 35.672626)')); +insert into shops (name, location) + values ('nishimi-ya', + GeomFromText('POINT(139.774628 35.671825)')); +insert into shops (name, location) + values ('hiiragi', + GeomFromText('POINT(139.711517 35.647701)')); +select id, name, AsText(location) as location_text from shops; +select id, name, AsText(location) as location_text from shops + where MBRContains(GeomFromText('LineString(139.7727 35.6684, 139.7038 35.7121)'), location); +drop table shops; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_delete.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_delete.test new file mode 100644 index 00000000000..25814635b22 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_delete.test @@ -0,0 +1,48 @@ +# Copyright(C) 2011 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_innodb.inc +--source include/have_geometry.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists shops; +--enable_warnings + +create table shops ( + id int primary key auto_increment, + name text, + location geometry NOT NULL, + spatial key location_index (location) +) comment = 'engine "innodb"'; +show create table shops; + +insert into shops (name, location) + values ('sazare', + GeomFromText('POINT(139.685043 35.714653)')); +select id, name, AsText(location) as location_text from shops + where MBRContains(GeomFromText('LineString(139.68466 35.71592, 139.68804 35.71411)'), location); + +delete from shops + where MBRContains(GeomFromText('LineString(139.68466 35.71592, 139.68804 35.71411)'), location); +select id, name, AsText(location) as location_text from shops + where MBRContains(GeomFromText('LineString(139.68466 35.71592, 139.68804 35.71411)'), location); + +select id, name, AsText(location) as location_text from shops; + +drop table shops; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_update.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_update.test new file mode 100644 index 00000000000..c6bb8a1d4e6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_update.test @@ -0,0 +1,50 @@ +# Copyright(C) 2011 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_innodb.inc +--source include/have_geometry.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists shops; +--enable_warnings + +create table shops ( + id int primary key auto_increment, + name text, + location geometry NOT NULL, + spatial key location_index (location) +) comment = 'engine "innodb"'; +show create table shops; + +insert into shops (name, location) + values ('sazare', + GeomFromText('POINT(139.685043 35.714653)')); +select id, name, AsText(location) as location_text from shops + where MBRContains(GeomFromText('LineString(139.68466 35.71592, 139.68804 35.71411)'), location); +select id, name, AsText(location) as location_text from shops + where MBRContains(GeomFromText('LineString(139.65659 35.57903, 139.66489 35.57262)'), location); + +update shops set location = GeomFromText('POINT(139.66116 35.57566)') + where name = 'sazare'; +select id, name, AsText(location) as location_text from shops + where MBRContains(GeomFromText('LineString(139.68466 35.71592, 139.68804 35.71411)'), location); +select id, name, AsText(location) as location_text from shops + where MBRContains(GeomFromText('LineString(139.65659 35.57903, 139.66489 35.57262)'), location); + +drop table shops; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/index_force_index_not_used.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/index_force_index_not_used.test new file mode 100644 index 00000000000..037f8b02fbf --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/index_force_index_not_used.test @@ -0,0 +1,32 @@ +# Copyright(C) 2013 Kentoku SHIBA +# Copyright(C) 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 +# 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ids; +--enable_warnings + +CREATE TABLE ids ( + id INT PRIMARY KEY AUTO_INCREMENT +) DEFAULT CHARSET UTF8 COMMENT = 'engine "InnoDB"'; +SELECT COUNT(*) FROM ids FORCE INDEX(PRIMARY); + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/insert_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/insert_TODO_SPLIT_ME.test new file mode 100644 index 00000000000..e619b0af930 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/insert_TODO_SPLIT_ME.test @@ -0,0 +1,91 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# Copyright(C) 2011 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/have_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists t1, t2, t3; +--enable_warnings + +# data types +create table t1 (c1 tinyint primary key) COMMENT = 'engine "innodb"'; +insert into t1 values(1); +select * from t1; +drop table t1; + +create table t1 (c1 smallint primary key) COMMENT = 'engine "innodb"'; +insert into t1 values(1); +select * from t1; +drop table t1; + +create table t1 (c1 mediumint primary key) COMMENT = 'engine "innodb"'; +insert into t1 values(1); +select * from t1; +drop table t1; + +create table t1 (c1 int primary key) COMMENT = 'engine "innodb"'; +insert into t1 values(1); +select * from t1; +drop table t1; + +create table t1 (c1 bigint primary key) COMMENT = 'engine "innodb"'; +insert into t1 values(1); +select * from t1; +drop table t1; + +create table t1 (c1 float primary key) COMMENT = 'engine "innodb"'; +insert into t1 values(0.5); +select * from t1; +drop table t1; + +create table t1 (c1 double primary key) COMMENT = 'engine "innodb"'; +insert into t1 values(0.5); +select * from t1; +drop table t1; + +create table t1 (c1 date primary key) COMMENT = 'engine "innodb"'; +insert into t1 values("2010/03/26"); +select * from t1; +drop table t1; + +create table t1 (c1 time primary key) COMMENT = 'engine "innodb"'; +insert into t1 values("11:22:33"); +select * from t1; +drop table t1; + +create table t1 (c1 year primary key) COMMENT = 'engine "innodb"'; +insert into t1 values("2010"); +select * from t1; +drop table t1; + +create table t1 (c1 datetime primary key) COMMENT = 'engine "innodb"'; +insert into t1 values("2010/03/26 11:22:33"); +select * from t1; +drop table t1; + + +# duplicated key error +create table t1 (c1 int primary key, c2 int) COMMENT = 'engine "innodb"'; +insert into t1 values(1,100); +select * from t1; +--error ER_DUP_ENTRY +insert into t1 values(1,200); +select * from t1; +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/insert_bulk.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/insert_bulk.test new file mode 100644 index 00000000000..4087abf9bc3 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/insert_bulk.test @@ -0,0 +1,44 @@ +# Copyright(C) 2011 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists diaries; +--enable_warnings + +set names utf8; +create table diaries ( + id int primary key, + content text, + fulltext index (content) +) default charset utf8 comment = 'engine "innodb"'; +show create table diaries; + +LOCK TABLE diaries WRITE; +insert into diaries values(1, "今日からはじめました。"); +insert into diaries values(2, "明日の富士山の天気について"); +insert into diaries values(3, "今日も天気がよくてきれいに見える。"); +UNLOCK TABLES; + +select * from diaries; + +select * from diaries where match(content) against("天気"); + +drop table diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/insert_on_duplicate_key_update_multiple_column_primary_key_myisam.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/insert_on_duplicate_key_update_multiple_column_primary_key_myisam.test new file mode 100644 index 00000000000..cc3bc477409 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/insert_on_duplicate_key_update_multiple_column_primary_key_myisam.test @@ -0,0 +1,49 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + date TIMESTAMP NOT NULL, + title VARCHAR(100) NOT NULL, + content TEXT NOT NULL, + PRIMARY KEY (date, title) +) DEFAULT CHARSET=UTF8 COMMENT='ENGINE "MyISAM"'; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (date, title, content) + VALUES ("2012-03-04", "cloudy day", "Today is cloudy day..."); +INSERT INTO diaries (date, title, content) + VALUES ("2012-03-04", "shopping", "I buy a new shirt."); +INSERT INTO diaries (date, title, content) + VALUES ("2012-03-05", "rainy day", "Today is rainy day..."); + +SELECT * FROM diaries; + +INSERT INTO diaries (date, title, content) + VALUES ("2012-03-04", "shopping", "I buy new shoes.") + ON DUPLICATE KEY UPDATE date = "2012-03-03", + content = "I buy a new hat."; + +SELECT * FROM diaries; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/insert_on_duplicate_key_update_multiple_column_unique_index_myisam.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/insert_on_duplicate_key_update_multiple_column_unique_index_myisam.test new file mode 100644 index 00000000000..cdcdcc796f3 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/insert_on_duplicate_key_update_multiple_column_unique_index_myisam.test @@ -0,0 +1,49 @@ +# 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/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + date TIMESTAMP NOT NULL, + title VARCHAR(100) NOT NULL, + content TEXT NOT NULL, + UNIQUE INDEX (date, title) +) DEFAULT CHARSET=UTF8 COMMENT='ENGINE "MyISAM"'; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (date, title, content) + VALUES ("2012-03-04", "cloudy day", "Today is cloudy day..."); +INSERT INTO diaries (date, title, content) + VALUES ("2012-03-04", "shopping", "I buy a new shirt."); +INSERT INTO diaries (date, title, content) + VALUES ("2012-03-05", "rainy day", "Today is rainy day..."); + +SELECT * FROM diaries; + +INSERT INTO diaries (date, title, content) + VALUES ("2012-03-04", "shopping", "I buy new shoes.") + ON DUPLICATE KEY UPDATE date = "2012-03-03", + content = "I buy a new hat."; +SELECT * FROM diaries; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/multi_range_read_disk_sweep.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/multi_range_read_disk_sweep.test new file mode 100644 index 00000000000..f5b429e523b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/multi_range_read_disk_sweep.test @@ -0,0 +1,45 @@ +# Copyright(C) 2013 Kenji Maruyama <mmmaru777@gmail.com> +# Copyright(C) 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 +# 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_mysql.inc +--source ../../include/mroonga/have_version_56_or_later.inc +--source include/have_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS integers; +--enable_warnings + +SET optimizer_switch='mrr_cost_based=off'; + +CREATE TABLE integers ( + id INT PRIMARY KEY AUTO_INCREMENT, + value INT, + KEY (value) +) COMMENT='engine "InnoDB"'; + +INSERT INTO integers (value) VALUES (0), (1), (2), (3); + +EXPLAIN SELECT * FROM integers + WHERE value IN (0, 2); + +SELECT * FROM integers + WHERE value IN (0, 2); + +DROP TABLE integers; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_TODO_SPLIT_ME.test new file mode 100644 index 00000000000..39772e5d78d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_TODO_SPLIT_ME.test @@ -0,0 +1,68 @@ +# Copyright(C) 2010 Kentoku SHIBA +# Copyright(C) 2011 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists t1; +--enable_warnings + +flush status; +create table t1 ( + c1 int primary key, + c2 int, + c3 text, + key idx1(c2), + fulltext index ft(c3) +) comment = 'engine "innodb"'; +insert into t1 values(1,10,"aa ii uu ee oo"); +insert into t1 values(2,20,"ka ki ku ke ko"); +insert into t1 values(3,30,"ii si ii se ii"); +insert into t1 values(4,40,"ta ti tu te to"); +insert into t1 values(5,50,"aa ii uu ii oo"); + +select *, match(c3) against("ii") from t1 + where match(c3) against("ii") order by c1 desc limit 1; +show status like 'mroonga_fast_order_limit'; + +select *, match(c3) against("ii") from t1 + where match(c3) against("ii") order by c1 limit 1; +show status like 'mroonga_fast_order_limit'; + +select c3, match(c3) against("ii") from t1 + where match(c3) against("ii") order by match(c3) against("ii") desc; +show status like 'mroonga_fast_order_limit'; + +select c3, match(c3) against("ii") from t1 + where match(c3) against("ii") order by match(c3) against("ii") desc limit 1, 1; +show status like 'mroonga_fast_order_limit'; + +select c3, match(c3) against("ii") from t1 + where match(c3) against("ii") order by match(c3) against("ii"); +show status like 'mroonga_fast_order_limit'; + +select c3, match(c3) against("ii") from t1 + where match(c3) against("ii") order by match(c3) against("ii") limit 1; +show status like 'mroonga_fast_order_limit'; + +select count(*) from t1 where match(c3) against("ii") limit 1; +show status like 'mroonga_fast_order_limit'; + +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_no_where_clause.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_no_where_clause.test new file mode 100644 index 00000000000..da37f5d6372 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_no_where_clause.test @@ -0,0 +1,46 @@ +# 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/have_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists t1; +--enable_warnings + +flush status; +create table t1 ( + c1 int primary key, + c2 int, + c3 text, + key idx1(c2), + fulltext index ft(c3) +) comment = 'engine "innodb"'; +insert into t1 values(1,10,"aa ii uu ee oo"); +insert into t1 values(2,20,"ka ki ku ke ko"); +insert into t1 values(3,30,"ii si ii se ii"); +insert into t1 values(4,40,"ta ti tu te to"); +insert into t1 values(5,50,"aa ii uu ii oo"); + +show status like 'mroonga_fast_order_limit'; + +select *, match(c3) against("ii") from t1 order by c1 desc limit 1; + +show status like 'mroonga_fast_order_limit'; + +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/repair_table_no_files.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/repair_table_no_files.test new file mode 100644 index 00000000000..6489407135b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/repair_table_no_files.test @@ -0,0 +1,69 @@ +# Copyright(C) 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 +# 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_innodb.inc +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/have_mroonga_helper.inc + +--disable_warnings +DROP DATABASE IF EXISTS repair_test; +CREATE DATABASE repair_test; +USE repair_test; + +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + body TEXT, + FULLTEXT INDEX body_index (body) +) COMMENT = 'engine "innodb"' DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); +INSERT INTO diaries (title, body) VALUES ("groonga (1)", "starting groonga..."); +INSERT INTO diaries (title, body) VALUES ("groonga (2)", "started groonga."); + +SELECT * FROM diaries WHERE MATCH(body) AGAINST("starting"); + +--remove_file $MYSQLD_DATADIR/repair_test.mrn +--remove_file $MYSQLD_DATADIR/repair_test.mrn.001 +--remove_file $MYSQLD_DATADIR/repair_test.mrn.0000000 +--remove_file $MYSQLD_DATADIR/repair_test.mrn.0000103 +--remove_file $MYSQLD_DATADIR/repair_test.mrn.0000104 +--remove_file $MYSQLD_DATADIR/repair_test.mrn.0000105 +--remove_file $MYSQLD_DATADIR/repair_test.mrn.0000105.c + +FLUSH TABLES; + +# Error ER_CANT_OPEN_FILE syscall error 'repair_test.mrn' (No such file or directory) +--error ER_CANT_OPEN_FILE +SELECT * FROM diaries WHERE MATCH(body) AGAINST("starting"); + +REPAIR TABLE diaries; + +SELECT * FROM diaries; + +SELECT * FROM diaries WHERE MATCH(body) AGAINST("starting"); + +DROP TABLE diaries; + +DROP DATABASE repair_test; +USE test; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/repair_table_no_index_file.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/repair_table_no_index_file.test new file mode 100644 index 00000000000..ce6e1d23280 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/repair_table_no_index_file.test @@ -0,0 +1,63 @@ +# Copyright(C) 2011 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_innodb.inc +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/have_mroonga_helper.inc + +--disable_warnings +DROP DATABASE IF EXISTS repair_test; +CREATE DATABASE repair_test; +USE repair_test; + +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + body TEXT, + FULLTEXT INDEX body_index (body) +) COMMENT = 'engine "innodb"' DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); +INSERT INTO diaries (title, body) VALUES ("groonga (1)", "starting groonga..."); +INSERT INTO diaries (title, body) VALUES ("groonga (2)", "started groonga."); + +SELECT * FROM diaries WHERE MATCH(body) AGAINST("starting"); + +--remove_file $MYSQLD_DATADIR/repair_test.mrn.0000104 + +FLUSH TABLES; + +# Error ER_CANT_OPEN_FILE syscall error 'repair_test.mrn.0000104' (No such file or directory) +--error ER_CANT_OPEN_FILE +SELECT * FROM diaries WHERE MATCH(body) AGAINST("starting"); + +REPAIR TABLE diaries; + +SELECT * FROM diaries; + +SELECT * FROM diaries WHERE MATCH(body) AGAINST("starting"); + +DROP TABLE diaries; + +DROP DATABASE repair_test; +USE test; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/temporary_table.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/temporary_table.test new file mode 100644 index 00000000000..0eb5ef514a2 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/temporary_table.test @@ -0,0 +1,40 @@ +# Copyright(C) 2012 Kouhei Sutou <kou@clear-code.com> +# Copyright(C) 2014 Toshihisa Tashiro +# +# 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_innodb.inc +--source ../../include/mroonga/skip_osx.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TEMPORARY TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TEMPORARY TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT +) DEFAULT CHARSET=UTF8 COMMENT = 'ENGINE "InnoDB"'; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title) VALUES ("clear day"); +INSERT INTO diaries (title) VALUES ("rainy day"); +INSERT INTO diaries (title) VALUES ("cloudy day"); + +SELECT * FROM diaries; + +DROP TEMPORARY TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/transaction_query_cache.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/transaction_query_cache.test new file mode 100644 index 00000000000..b2522db7919 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/transaction_query_cache.test @@ -0,0 +1,53 @@ +# Copyright(C) 2012 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/have_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +SET @tmp_query_cache_size = @@query_cache_size; +SET GLOBAL query_cache_size = 1048576; + +--disable_warnings +DROP TABLE IF EXISTS simple_table; +--enable_warnings + +CREATE TABLE simple_table ( + id INT PRIMARY KEY +) COMMENT = 'ENGINE "InnoDB"' DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE simple_table; + +INSERT INTO simple_table (id) VALUES (1),(2); + +CONNECT(second_connection, localhost, root); +USE test; +START TRANSACTION; +INSERT INTO simple_table (id) VALUES (3); + +CONNECTION default; +SELECT * FROM simple_table; + +CONNECTION second_connection; +COMMIT; + +CONNECTION default; +SELECT * FROM simple_table; + +DROP TABLE simple_table; +DISCONNECT second_connection; + +SET GLOBAL query_cache_size = @tmp_query_cache_size; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/transaction_rollback_delete_delete.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/transaction_rollback_delete_delete.test new file mode 100644 index 00000000000..f0da6934f8e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/transaction_rollback_delete_delete.test @@ -0,0 +1,59 @@ +# Copyright(C) 2011 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + body TEXT, + FULLTEXT INDEX title_index (title), + FULLTEXT INDEX body_index (body) +) COMMENT = 'ENGINE "InnoDB"' DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); +INSERT INTO diaries (title, body) VALUES ("groonga (1)", "starting groonga..."); +INSERT INTO diaries (title, body) VALUES ("groonga (2)", "started groonga."); + +SELECT * FROM diaries + WHERE MATCH(title) AGAINST("survey") AND + MATCH(body) AGAINST("groonga"); + +START TRANSACTION; +DELETE FROM diaries WHERE id = 1; +ROLLBACK; + +SELECT * FROM diaries; +SELECT * FROM diaries + WHERE MATCH(title) AGAINST("survey") AND + MATCH(body) AGAINST("groonga"); + +DELETE FROM diaries WHERE id = 1; + +SELECT * FROM diaries; +SELECT * FROM diaries + WHERE MATCH(title) AGAINST("survey") AND + MATCH(body) AGAINST("groonga"); + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/transaction_rollback_delete_update.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/transaction_rollback_delete_update.test new file mode 100644 index 00000000000..425a16c204e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/transaction_rollback_delete_update.test @@ -0,0 +1,56 @@ +# Copyright(C) 2011 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + body TEXT, + FULLTEXT INDEX title_index (title), + FULLTEXT INDEX body_index (body) +) COMMENT = 'ENGINE "InnoDB"' DEFAULT CHARSET UTF8; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); +INSERT INTO diaries (title, body) VALUES ("groonga (1)", "starting groonga..."); +INSERT INTO diaries (title, body) VALUES ("groonga (2)", "started groonga."); + +SELECT * FROM diaries + WHERE MATCH(title) AGAINST("survey"); + +START TRANSACTION; +DELETE FROM diaries WHERE id = 1; +ROLLBACK; + +SELECT * FROM diaries; +SELECT * FROM diaries + WHERE MATCH(title) AGAINST("survey"); + +UPDATE diaries SET title = "survey day!" WHERE id = 1; + +SELECT * FROM diaries; +SELECT * FROM diaries + WHERE MATCH(title) AGAINST("survey"); + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/truncate.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/truncate.test new file mode 100644 index 00000000000..987fd284f74 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/truncate.test @@ -0,0 +1,57 @@ +# Copyright(C) 2011-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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES UTF8; +CREATE TABLE diaries ( + id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + year INT UNSIGNED, + month INT UNSIGNED, + day INT UNSIGNED, + title VARCHAR(255), + content TEXT, + FULLTEXT INDEX(content), + KEY(day) +) DEFAULT CHARSET UTF8 COMMENT = 'engine "innodb"'; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日からはじめました。"); +INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日の富士山の天気について"); +INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気がよくてきれいに見える。"); + +SELECT * FROM diaries; +SELECT * FROM diaries WHERE MATCH(content) AGAINST("今日 天気" IN BOOLEAN MODE); +TRUNCATE TABLE diaries; +SELECT * FROM diaries; +SELECT * FROM diaries WHERE MATCH(content) AGAINST("今日 天気" IN BOOLEAN MODE); + +INSERT INTO diaries VALUES(1, 2011, 11, 11, "帰り道", "つかれたー"); +INSERT INTO diaries VALUES(2, 2011, 12, 1, "久しぶり", "天気が悪いからずっと留守番。"); +INSERT INTO diaries VALUES(3, 2011, 12, 2, "初雪", "今年はじめての雪!"); + +SELECT * FROM diaries; +SELECT * FROM diaries WHERE MATCH(content) AGAINST("悪い" IN BOOLEAN MODE); + + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/update_fulltext.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/update_fulltext.test new file mode 100644 index 00000000000..50c14184c98 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/update_fulltext.test @@ -0,0 +1,43 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# Copyright(C) 2011 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists t1, t2, t3; +--enable_warnings + +create table t1 (c1 int primary key, c2 text, fulltext index (c2)) COMMENT = 'engine "innodb"'; +insert into t1 values(10, "aa ii uu ee"); +insert into t1 values(20, "ka ki ku ke"); +insert into t1 values(30, "sa si su se"); + +select * from t1; +update t1 set c2="ta ti tu te" where c1=20; +select * from t1; +select * from t1 where match(c2) against("ti"); +select * from t1 where match(c2) against("ki"); + +update t1 set c1=40 where c1=20; +select * from t1; +select * from t1 where match(c2) against("ti"); +select * from t1 where match(c2) against("ki"); + +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/update_int.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/update_int.test new file mode 100644 index 00000000000..5c794aacf65 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/update_int.test @@ -0,0 +1,41 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# Copyright(C) 2011 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists t1, t2, t3; +--enable_warnings + +create table t1 (c1 int primary key, c2 int) COMMENT = 'engine "innodb"'; +show create table t1; +insert into t1 values (1, 100); +insert into t1 values (2, 101); +insert into t1 values (3, 102); +select * from t1; + +update t1 set c2=c2+100 where c1=1; +select * from t1; +update t1 set c2=c2+100 where c1=2; +select * from t1; +update t1 set c2=c2+100 where c1=3; +select * from t1; + +drop table t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_dry_write_delete.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_dry_write_delete.test new file mode 100644 index 00000000000..165c8df858a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_dry_write_delete.test @@ -0,0 +1,55 @@ +# Copyright(C) 2011 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists diaries; +--enable_warnings + +create table diaries ( + id int primary key auto_increment, + body text, + fulltext index body_index (body) +) default charset utf8 COMMENT = 'engine "innodb"'; +show create table diaries; + +insert into diaries (body) values ("will start groonga!"); +insert into diaries (body) values ("starting groonga..."); +insert into diaries (body) values ("started groonga."); +select * from diaries; + +set mroonga_dry_write=true; +delete from diaries where id = 2; +select * from diaries; +select * from diaries where match (body) against ("starting"); +select * from diaries where match (body) against ("started"); + +set mroonga_dry_write=false; +delete from diaries where id = 3; +select * from diaries; +select * from diaries where match (body) against ("starting"); +select * from diaries where match (body) against ("started"); + +insert into diaries (id, body) values (2, "sleeping..."); +select * from diaries; +select * from diaries where match (body) against ("starting"); +select * from diaries where match (body) against ("started"); + +drop table diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_dry_write_insert.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_dry_write_insert.test new file mode 100644 index 00000000000..b1222118833 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_dry_write_insert.test @@ -0,0 +1,47 @@ +# Copyright(C) 2011 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists diaries; +--enable_warnings + +create table diaries ( + id int primary key auto_increment, + body text, + fulltext index body_index (body) +) default charset utf8 COMMENT = 'engine "innodb"'; +show create table diaries; + +insert into diaries (body) values ("will start groonga!"); +select * from diaries; +select * from diaries where match (body) against ("groonga"); + +set mroonga_dry_write=true; +insert into diaries (body) values ("starting groonga..."); +select * from diaries; +select * from diaries where match (body) against ("groonga"); + +set mroonga_dry_write=false; +insert into diaries (body) values ("started groonga."); +select * from diaries; +select * from diaries where match (body) against ("groonga"); + +drop table diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_dry_write_update.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_dry_write_update.test new file mode 100644 index 00000000000..6b47d18b872 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_dry_write_update.test @@ -0,0 +1,48 @@ +# Copyright(C) 2011 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_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +drop table if exists diaries; +--enable_warnings + +create table diaries ( + id int primary key auto_increment, + body text, + fulltext index body_index (body) +) default charset utf8 COMMENT = 'engine "innodb"'; +show create table diaries; + +insert into diaries (body) values ("will start groonga!"); + +set mroonga_dry_write=true; +update diaries set body = "starting groonga..." where id = 1; +select * from diaries; +select * from diaries where match (body) against ("will"); +select * from diaries where match (body) against ("starting"); + +set mroonga_dry_write=false; +update diaries set body = "started groonga." where id = 1; +select * from diaries; +select * from diaries where match (body) against ("will"); +select * from diaries where match (body) against ("starting"); +select * from diaries where match (body) against ("started"); + +drop table diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_match_escalation_threshold_global.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_match_escalation_threshold_global.test new file mode 100644 index 00000000000..b272649c732 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_match_escalation_threshold_global.test @@ -0,0 +1,56 @@ +# 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_innodb.inc +--source ../../include/mroonga/have_fulltext_index_comment.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +# MySQL <= 5.5 reports wrong a warning. :< +# It has been fixed in MySQL >= 5.6 and MariaDB >= 5.3. +--disable_warnings +SET GLOBAL mroonga_match_escalation_threshold = -1; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + tags TEXT, + FULLTEXT INDEX tags_index (tags) COMMENT 'parser "TokenDelimit"' +) DEFAULT CHARSET=UTF8 COMMENT='ENGINE "InnoDB"'; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, tags) VALUES ("Hello groonga!", "groonga install"); +INSERT INTO diaries (title, tags) VALUES ("Hello mroonga!", "mroonga install"); + + +SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("install" IN BOOLEAN MODE); + +SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE); + +SET GLOBAL mroonga_match_escalation_threshold = 0; +SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE); + +SET mroonga_match_escalation_threshold = 0; +SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE); + + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_match_escalation_threshold_session.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_match_escalation_threshold_session.test new file mode 100644 index 00000000000..bf22001bb10 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_match_escalation_threshold_session.test @@ -0,0 +1,54 @@ +# 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_innodb.inc +--source ../../include/mroonga/have_fulltext_index_comment.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + tags TEXT, + FULLTEXT INDEX tags_index (tags) COMMENT 'parser "TokenDelimit"' +) DEFAULT CHARSET=UTF8 COMMENT='ENGINE "InnoDB"'; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (title, tags) VALUES ("Hello groonga!", "groonga install"); +INSERT INTO diaries (title, tags) VALUES ("Hello mroonga!", "mroonga install"); + + +SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("install" IN BOOLEAN MODE); + +SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE); + +# MySQL <= 5.5 reports wrong a warning. :< +# It has been fixed in MySQL >= 5.6 and MariaDB >= 5.3. +--disable_warnings +SET mroonga_match_escalation_threshold = -1; +--enable_warnings +SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE); + +SET mroonga_match_escalation_threshold = 0; +SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE); + + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/version_55_performance_schema.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/version_55_performance_schema.test new file mode 100644 index 00000000000..8519457cc70 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/version_55_performance_schema.test @@ -0,0 +1,42 @@ +# 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/mroonga/have_version_55.inc +--source include/have_innodb.inc +--source include/have_perfschema.inc +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SHOW VARIABLES LIKE 'performance_schema'; + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + content VARCHAR(255), + FULLTEXT INDEX (content) +) DEFAULT CHARSET UTF8 COMMENT = 'ENGINE "InnoDB"'; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (content) VALUES ("Tommorow will be shiny day!"); + +SHOW TABLES FROM performance_schema; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/version_56_or_later_performance_schema.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/version_56_or_later_performance_schema.test new file mode 100644 index 00000000000..c3d4aae5bf6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/version_56_or_later_performance_schema.test @@ -0,0 +1,42 @@ +# 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/mroonga/have_version_56_or_later.inc +--source include/have_innodb.inc +--source include/have_perfschema.inc +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SHOW VARIABLES LIKE 'performance_schema'; + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + content VARCHAR(255), + FULLTEXT INDEX (content) +) DEFAULT CHARSET UTF8 COMMENT = 'ENGINE "InnoDB"'; +SHOW CREATE TABLE diaries; + +INSERT INTO diaries (content) VALUES ("Tommorow will be shiny day!"); + +SHOW TABLES FROM performance_schema; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc |