summaryrefslogtreecommitdiff
path: root/storage/mroonga/mysql-test/mroonga/wrapper/t
diff options
context:
space:
mode:
authorKentoku SHIBA <kentokushiba@gmail.com>2015-04-30 04:44:30 +0900
committerKentoku SHIBA <kentokushiba@gmail.com>2015-04-30 04:44:30 +0900
commita0fdb258a435290980993ae025a7fc19c09d2cdb (patch)
tree67023cf51c542ed78443d68e9c61b28b39583245 /storage/mroonga/mysql-test/mroonga/wrapper/t
parent060ec5b6b9384456695b6fc903ccfeb8c7ccd298 (diff)
downloadmariadb-git-a0fdb258a435290980993ae025a7fc19c09d2cdb.tar.gz
Update Mroonga to the latest version on 2015-04-30T04:44:30+0900
Diffstat (limited to 'storage/mroonga/mysql-test/mroonga/wrapper/t')
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_spatial.test77
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/t/count_star_with_index.test11
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_index_flags_none.test39
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_index_flags_with_position_and_with_weight.test39
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_comment_multiple_token_filters.test2
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_comment_one_token_filter.test2
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_contains.test79
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_delete.test15
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_update.test21
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_TODO_SPLIT_ME.test8
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_no_direction.test50
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_order_by_primary_key.test50
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/t/performance_schema-master.opt1
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/t/performance_schema.test41
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/t/repair_table_no_files.test11
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/t/repair_table_no_index_file.test7
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/t/variable_match_escalation_threshold_global.test24
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/t/variable_match_escalation_threshold_session.test2
18 files changed, 343 insertions, 136 deletions
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
index 37ea8aaf149..6a62ae312b2 100644
--- a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_spatial.test
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_spatial.test
@@ -17,6 +17,7 @@
--source include/have_innodb.inc
--source include/not_embedded.inc
--source include/have_geometry.inc
+--source ../../include/mroonga/have_version_56_or_later.inc
--source ../../include/mroonga/have_mroonga.inc
--disable_warnings
@@ -31,117 +32,117 @@ CREATE TABLE shops (
INSERT INTO shops (name, location)
VALUES ('nezu-no-taiyaki',
- GeomFromText('POINT(139.762573 35.720253)'));
+ ST_GeomFromText('POINT(139.762573 35.720253)'));
INSERT INTO shops (name, location)
VALUES ('taiyaki-kataoka',
- GeomFromText('POINT(139.715591 35.712521)'));
+ ST_GeomFromText('POINT(139.715591 35.712521)'));
INSERT INTO shops (name, location)
VALUES ('soba-taiyaki-ku',
- GeomFromText('POINT(139.659088 35.683712)'));
+ ST_GeomFromText('POINT(139.659088 35.683712)'));
INSERT INTO shops (name, location)
VALUES ('kuruma',
- GeomFromText('POINT(139.706207 35.721516)'));
+ ST_GeomFromText('POINT(139.706207 35.721516)'));
INSERT INTO shops (name, location)
VALUES ('hirose-ya',
- GeomFromText('POINT(139.685608 35.714844)'));
+ ST_GeomFromText('POINT(139.685608 35.714844)'));
INSERT INTO shops (name, location)
VALUES ('sazare',
- GeomFromText('POINT(139.685043 35.714653)'));
+ ST_GeomFromText('POINT(139.685043 35.714653)'));
INSERT INTO shops (name, location)
VALUES ('omede-taiyaki',
- GeomFromText('POINT(139.817154 35.700516)'));
+ ST_GeomFromText('POINT(139.817154 35.700516)'));
INSERT INTO shops (name, location)
VALUES ('onaga-ya',
- GeomFromText('POINT(139.81105 35.698254)'));
+ ST_GeomFromText('POINT(139.81105 35.698254)'));
INSERT INTO shops (name, location)
VALUES ('shiro-ya',
- GeomFromText('POINT(139.638611 35.705517)'));
+ ST_GeomFromText('POINT(139.638611 35.705517)'));
INSERT INTO shops (name, location)
VALUES ('fuji-ya',
- GeomFromText('POINT(139.637115 35.703938)'));
+ ST_GeomFromText('POINT(139.637115 35.703938)'));
INSERT INTO shops (name, location)
VALUES ('miyoshi',
- GeomFromText('POINT(139.537323 35.644539)'));
+ ST_GeomFromText('POINT(139.537323 35.644539)'));
INSERT INTO shops (name, location)
VALUES ('juju-ya',
- GeomFromText('POINT(139.695755 35.628922)'));
+ ST_GeomFromText('POINT(139.695755 35.628922)'));
INSERT INTO shops (name, location)
VALUES ('tatsumi-ya',
- GeomFromText('POINT(139.638657 35.665501)'));
+ ST_GeomFromText('POINT(139.638657 35.665501)'));
INSERT INTO shops (name, location)
VALUES ('tetsuji',
- GeomFromText('POINT(139.76857 35.680912)'));
+ ST_GeomFromText('POINT(139.76857 35.680912)'));
INSERT INTO shops (name, location)
VALUES ('gazuma-ya',
- GeomFromText('POINT(139.647598 35.700817)'));
+ ST_GeomFromText('POINT(139.647598 35.700817)'));
INSERT INTO shops (name, location)
VALUES ('honma-mon',
- GeomFromText('POINT(139.652573 35.722736)'));
+ ST_GeomFromText('POINT(139.652573 35.722736)'));
INSERT INTO shops (name, location)
VALUES ('naniwa-ya',
- GeomFromText('POINT(139.796234 35.730061)'));
+ ST_GeomFromText('POINT(139.796234 35.730061)'));
INSERT INTO shops (name, location)
VALUES ('kuro-dai',
- GeomFromText('POINT(139.704834 35.650345)'));
+ ST_GeomFromText('POINT(139.704834 35.650345)'));
INSERT INTO shops (name, location)
VALUES ('daruma',
- GeomFromText('POINT(139.770599 35.681461)'));
+ ST_GeomFromText('POINT(139.770599 35.681461)'));
INSERT INTO shops (name, location)
VALUES ('yanagi-ya',
- GeomFromText('POINT(139.783981 35.685341)'));
+ ST_GeomFromText('POINT(139.783981 35.685341)'));
INSERT INTO shops (name, location)
VALUES ('sharaku',
- GeomFromText('POINT(139.794846 35.716969)'));
+ ST_GeomFromText('POINT(139.794846 35.716969)'));
INSERT INTO shops (name, location)
VALUES ('takane',
- GeomFromText('POINT(139.560913 35.698601)'));
+ ST_GeomFromText('POINT(139.560913 35.698601)'));
INSERT INTO shops (name, location)
VALUES ('chiyoda',
- GeomFromText('POINT(139.652817 35.642601)'));
+ ST_GeomFromText('POINT(139.652817 35.642601)'));
INSERT INTO shops (name, location)
VALUES ('da-ka-po',
- GeomFromText('POINT(139.727356 35.627346)'));
+ ST_GeomFromText('POINT(139.727356 35.627346)'));
INSERT INTO shops (name, location)
VALUES ('matsushima-ya',
- GeomFromText('POINT(139.737381 35.640556)'));
+ ST_GeomFromText('POINT(139.737381 35.640556)'));
INSERT INTO shops (name, location)
VALUES ('kazuya',
- GeomFromText('POINT(139.760895 35.673508)'));
+ ST_GeomFromText('POINT(139.760895 35.673508)'));
INSERT INTO shops (name, location)
VALUES ('furuya-kogane-an',
- GeomFromText('POINT(139.676071 35.680603)'));
+ ST_GeomFromText('POINT(139.676071 35.680603)'));
INSERT INTO shops (name, location)
VALUES ('hachi-no-ie',
- GeomFromText('POINT(139.668106 35.608021)'));
+ ST_GeomFromText('POINT(139.668106 35.608021)'));
INSERT INTO shops (name, location)
VALUES ('azuki-chan',
- GeomFromText('POINT(139.673203 35.64151)'));
+ ST_GeomFromText('POINT(139.673203 35.64151)'));
INSERT INTO shops (name, location)
VALUES ('kuriko-an',
- GeomFromText('POINT(139.796829 35.712013)'));
+ ST_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)'));
+ ST_GeomFromText('POINT(139.712524 35.616199)'));
INSERT INTO shops (name, location)
VALUES ('naze-ya',
- GeomFromText('POINT(139.665833 35.609039)'));
+ ST_GeomFromText('POINT(139.665833 35.609039)'));
INSERT INTO shops (name, location)
VALUES ('sanoki-ya',
- GeomFromText('POINT(139.770721 35.66592)'));
+ ST_GeomFromText('POINT(139.770721 35.66592)'));
INSERT INTO shops (name, location)
VALUES ('shigeta',
- GeomFromText('POINT(139.780273 35.672626)'));
+ ST_GeomFromText('POINT(139.780273 35.672626)'));
INSERT INTO shops (name, location)
VALUES ('nishimi-ya',
- GeomFromText('POINT(139.774628 35.671825)'));
+ ST_GeomFromText('POINT(139.774628 35.671825)'));
INSERT INTO shops (name, location)
VALUES ('hiiragi',
- GeomFromText('POINT(139.711517 35.647701)'));
+ ST_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);
+SELECT id, name, ST_AsText(location) AS location_text FROM shops
+ WHERE MBRContains(ST_GeomFromText('LineString(139.7727 35.6684, 139.7038 35.7121)'), location);
SHOW CREATE TABLE shops;
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
index f8b77becdde..70c176b5116 100644
--- 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
@@ -1,4 +1,4 @@
-# Copyright(C) 2011 Kouhei Sutou <kou@clear-code.com>
+# Copyright(C) 2011-2015 Kouhei Sutou <kou@clear-code.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -18,10 +18,11 @@
--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
+--disable_query_log
+DROP DATABASE test;
+CREATE DATABASE test;
+USE test;
+--enable_query_log
CREATE TABLE diaries_innodb (
id INT PRIMARY KEY AUTO_INCREMENT,
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_index_flags_none.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_index_flags_none.test
new file mode 100644
index 00000000000..da1e5e736ea
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_index_flags_none.test
@@ -0,0 +1,39 @@
+# Copyright(C) 2015 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/have_innodb.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
+
+SET NAMES utf8;
+
+CREATE TABLE memos (
+ content VARCHAR(64) NOT NULL PRIMARY KEY,
+ FULLTEXT INDEX (content) COMMENT 'index_flags "NONE"'
+) COMMENT='engine "InnoDB"' DEFAULT CHARSET=utf8;
+
+SELECT mroonga_command("dump --dump_plugins no --dump_schema no");
+
+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/wrapper/t/create_table_index_flags_with_position_and_with_weight.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_index_flags_with_position_and_with_weight.test
new file mode 100644
index 00000000000..8d0d585d56d
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_index_flags_with_position_and_with_weight.test
@@ -0,0 +1,39 @@
+# Copyright(C) 2015 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/have_innodb.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
+
+SET NAMES utf8;
+
+CREATE TABLE memos (
+ content VARCHAR(64) NOT NULL PRIMARY KEY,
+ FULLTEXT INDEX (content) COMMENT 'index_flags "WITH_POSITION|WITH_WEIGHT"'
+) COMMENT='engine "InnoDB"' DEFAULT CHARSET=utf8;
+
+SELECT mroonga_command("dump --dump_plugins no --dump_schema no");
+
+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/wrapper/t/create_table_token_filters_index_comment_multiple_token_filters.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_comment_multiple_token_filters.test
index 9ba941f8701..9ff8e4448d9 100644
--- a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_comment_multiple_token_filters.test
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_comment_multiple_token_filters.test
@@ -34,7 +34,7 @@ CREATE TABLE memos (
FULLTEXT INDEX (content) COMMENT 'token_filters "TokenFilterStopWord,TokenFilterStopWord"'
) COMMENT='engine "InnoDB"' DEFAULT CHARSET=utf8;
-SELECT mroonga_command("dump");
+SELECT mroonga_command("dump --dump_plugins no");
DROP TABLE memos;
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_comment_one_token_filter.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_comment_one_token_filter.test
index 91ac84c04d5..eee08309f76 100644
--- a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_comment_one_token_filter.test
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_comment_one_token_filter.test
@@ -34,7 +34,7 @@ CREATE TABLE memos (
FULLTEXT INDEX (content) COMMENT 'token_filters "TokenFilterStopWord"'
) COMMENT='engine "InnoDB"' DEFAULT CHARSET=utf8;
-SELECT mroonga_command("dump");
+SELECT mroonga_command("dump --dump_plugins no");
DROP TABLE memos;
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_contains.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_contains.test
index 4676fc61331..af6242a9ad1 100644
--- a/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_contains.test
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_contains.test
@@ -16,6 +16,7 @@
--source include/have_innodb.inc
--source include/have_geometry.inc
+--source ../../include/mroonga/have_version_56_or_later.inc
--source ../../include/mroonga/have_mroonga.inc
--disable_warnings
@@ -31,115 +32,115 @@ create table shops (
show create table shops;
insert into shops (name, location)
values ('nezu-no-taiyaki',
- GeomFromText('POINT(139.762573 35.720253)'));
+ ST_GeomFromText('POINT(139.762573 35.720253)'));
insert into shops (name, location)
values ('taiyaki-kataoka',
- GeomFromText('POINT(139.715591 35.712521)'));
+ ST_GeomFromText('POINT(139.715591 35.712521)'));
insert into shops (name, location)
values ('soba-taiyaki-ku',
- GeomFromText('POINT(139.659088 35.683712)'));
+ ST_GeomFromText('POINT(139.659088 35.683712)'));
insert into shops (name, location)
values ('kuruma',
- GeomFromText('POINT(139.706207 35.721516)'));
+ ST_GeomFromText('POINT(139.706207 35.721516)'));
insert into shops (name, location)
values ('hirose-ya',
- GeomFromText('POINT(139.685608 35.714844)'));
+ ST_GeomFromText('POINT(139.685608 35.714844)'));
insert into shops (name, location)
values ('sazare',
- GeomFromText('POINT(139.685043 35.714653)'));
+ ST_GeomFromText('POINT(139.685043 35.714653)'));
insert into shops (name, location)
values ('omede-taiyaki',
- GeomFromText('POINT(139.817154 35.700516)'));
+ ST_GeomFromText('POINT(139.817154 35.700516)'));
insert into shops (name, location)
values ('onaga-ya',
- GeomFromText('POINT(139.81105 35.698254)'));
+ ST_GeomFromText('POINT(139.81105 35.698254)'));
insert into shops (name, location)
values ('shiro-ya',
- GeomFromText('POINT(139.638611 35.705517)'));
+ ST_GeomFromText('POINT(139.638611 35.705517)'));
insert into shops (name, location)
values ('fuji-ya',
- GeomFromText('POINT(139.637115 35.703938)'));
+ ST_GeomFromText('POINT(139.637115 35.703938)'));
insert into shops (name, location)
values ('miyoshi',
- GeomFromText('POINT(139.537323 35.644539)'));
+ ST_GeomFromText('POINT(139.537323 35.644539)'));
insert into shops (name, location)
values ('juju-ya',
- GeomFromText('POINT(139.695755 35.628922)'));
+ ST_GeomFromText('POINT(139.695755 35.628922)'));
insert into shops (name, location)
values ('tatsumi-ya',
- GeomFromText('POINT(139.638657 35.665501)'));
+ ST_GeomFromText('POINT(139.638657 35.665501)'));
insert into shops (name, location)
values ('tetsuji',
- GeomFromText('POINT(139.76857 35.680912)'));
+ ST_GeomFromText('POINT(139.76857 35.680912)'));
insert into shops (name, location)
values ('gazuma-ya',
- GeomFromText('POINT(139.647598 35.700817)'));
+ ST_GeomFromText('POINT(139.647598 35.700817)'));
insert into shops (name, location)
values ('honma-mon',
- GeomFromText('POINT(139.652573 35.722736)'));
+ ST_GeomFromText('POINT(139.652573 35.722736)'));
insert into shops (name, location)
values ('naniwa-ya',
- GeomFromText('POINT(139.796234 35.730061)'));
+ ST_GeomFromText('POINT(139.796234 35.730061)'));
insert into shops (name, location)
values ('kuro-dai',
- GeomFromText('POINT(139.704834 35.650345)'));
+ ST_GeomFromText('POINT(139.704834 35.650345)'));
insert into shops (name, location)
values ('daruma',
- GeomFromText('POINT(139.770599 35.681461)'));
+ ST_GeomFromText('POINT(139.770599 35.681461)'));
insert into shops (name, location)
values ('yanagi-ya',
- GeomFromText('POINT(139.783981 35.685341)'));
+ ST_GeomFromText('POINT(139.783981 35.685341)'));
insert into shops (name, location)
values ('sharaku',
- GeomFromText('POINT(139.794846 35.716969)'));
+ ST_GeomFromText('POINT(139.794846 35.716969)'));
insert into shops (name, location)
values ('takane',
- GeomFromText('POINT(139.560913 35.698601)'));
+ ST_GeomFromText('POINT(139.560913 35.698601)'));
insert into shops (name, location)
values ('chiyoda',
- GeomFromText('POINT(139.652817 35.642601)'));
+ ST_GeomFromText('POINT(139.652817 35.642601)'));
insert into shops (name, location)
values ('da-ka-po',
- GeomFromText('POINT(139.727356 35.627346)'));
+ ST_GeomFromText('POINT(139.727356 35.627346)'));
insert into shops (name, location)
values ('matsushima-ya',
- GeomFromText('POINT(139.737381 35.640556)'));
+ ST_GeomFromText('POINT(139.737381 35.640556)'));
insert into shops (name, location)
values ('kazuya',
- GeomFromText('POINT(139.760895 35.673508)'));
+ ST_GeomFromText('POINT(139.760895 35.673508)'));
insert into shops (name, location)
values ('furuya-kogane-an',
- GeomFromText('POINT(139.676071 35.680603)'));
+ ST_GeomFromText('POINT(139.676071 35.680603)'));
insert into shops (name, location)
values ('hachi-no-ie',
- GeomFromText('POINT(139.668106 35.608021)'));
+ ST_GeomFromText('POINT(139.668106 35.608021)'));
insert into shops (name, location)
values ('azuki-chan',
- GeomFromText('POINT(139.673203 35.64151)'));
+ ST_GeomFromText('POINT(139.673203 35.64151)'));
insert into shops (name, location)
values ('kuriko-an',
- GeomFromText('POINT(139.796829 35.712013)'));
+ ST_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)'));
+ ST_GeomFromText('POINT(139.712524 35.616199)'));
insert into shops (name, location)
values ('naze-ya',
- GeomFromText('POINT(139.665833 35.609039)'));
+ ST_GeomFromText('POINT(139.665833 35.609039)'));
insert into shops (name, location)
values ('sanoki-ya',
- GeomFromText('POINT(139.770721 35.66592)'));
+ ST_GeomFromText('POINT(139.770721 35.66592)'));
insert into shops (name, location)
values ('shigeta',
- GeomFromText('POINT(139.780273 35.672626)'));
+ ST_GeomFromText('POINT(139.780273 35.672626)'));
insert into shops (name, location)
values ('nishimi-ya',
- GeomFromText('POINT(139.774628 35.671825)'));
+ ST_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);
+ ST_GeomFromText('POINT(139.711517 35.647701)'));
+select id, name, ST_AsText(location) as location_text from shops;
+select id, name, ST_AsText(location) as location_text from shops
+ where MBRContains(ST_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
index 25814635b22..9f3589a66d1 100644
--- a/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_delete.test
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_delete.test
@@ -16,6 +16,7 @@
--source include/have_innodb.inc
--source include/have_geometry.inc
+--source ../../include/mroonga/have_version_56_or_later.inc
--source ../../include/mroonga/have_mroonga.inc
--disable_warnings
@@ -32,16 +33,16 @@ 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);
+ ST_GeomFromText('POINT(139.685043 35.714653)'));
+select id, name, ST_AsText(location) as location_text from shops
+ where MBRContains(ST_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);
+ where MBRContains(ST_GeomFromText('LineString(139.68466 35.71592, 139.68804 35.71411)'), location);
+select id, name, ST_AsText(location) as location_text from shops
+ where MBRContains(ST_GeomFromText('LineString(139.68466 35.71592, 139.68804 35.71411)'), location);
-select id, name, AsText(location) as location_text from shops;
+select id, name, ST_AsText(location) as location_text from shops;
drop table shops;
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_update.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_update.test
index c6bb8a1d4e6..aff5c52c786 100644
--- a/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_update.test
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_update.test
@@ -16,6 +16,7 @@
--source include/have_innodb.inc
--source include/have_geometry.inc
+--source ../../include/mroonga/have_version_56_or_later.inc
--source ../../include/mroonga/have_mroonga.inc
--disable_warnings
@@ -32,18 +33,18 @@ 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);
+ ST_GeomFromText('POINT(139.685043 35.714653)'));
+select id, name, ST_AsText(location) as location_text from shops
+ where MBRContains(ST_GeomFromText('LineString(139.68466 35.71592, 139.68804 35.71411)'), location);
+select id, name, ST_AsText(location) as location_text from shops
+ where MBRContains(ST_GeomFromText('LineString(139.65659 35.57903, 139.66489 35.57262)'), location);
-update shops set location = GeomFromText('POINT(139.66116 35.57566)')
+update shops set location = ST_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);
+select id, name, ST_AsText(location) as location_text from shops
+ where MBRContains(ST_GeomFromText('LineString(139.68466 35.71592, 139.68804 35.71411)'), location);
+select id, name, ST_AsText(location) as location_text from shops
+ where MBRContains(ST_GeomFromText('LineString(139.65659 35.57903, 139.66489 35.57262)'), location);
drop table shops;
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
index 39772e5d78d..776fd27a2f2 100644
--- 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
@@ -36,14 +36,6 @@ 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';
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_no_direction.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_no_direction.test
new file mode 100644
index 00000000000..69be84e2619
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_no_direction.test
@@ -0,0 +1,50 @@
+# Copyright(C) 2015 Kouhei Sutou <kou@clear-code.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along 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
+
+FLUSH STATUS;
+
+CREATE TABLE memos (
+ id int PRIMARY KEY,
+ content TEXT,
+ FULLTEXT INDEX (content)
+) COMMENT = 'engine "InnoDB"';
+
+INSERT INTO memos VALUES(1, "Groonga is fast");
+INSERT INTO memos VALUES(2, "Mroonga is fast");
+INSERT INTO memos VALUES(3, "Mroonga is easy");
+INSERT INTO memos VALUES(4, "Mroonga is useful");
+INSERT INTO memos VALUES(5, "Mroonga is great");
+
+SHOW STATUS LIKE 'mroonga_fast_order_limit';
+
+SELECT id, content
+ FROM memos
+ WHERE MATCH(content) AGAINST("+Mroonga" IN BOOLEAN MODE)
+ ORDER BY id
+ LIMIT 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/wrapper/t/optimization_order_limit_order_by_primary_key.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_order_by_primary_key.test
new file mode 100644
index 00000000000..f7b858e75f0
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_order_by_primary_key.test
@@ -0,0 +1,50 @@
+# Copyright(C) 2015 Kouhei Sutou <kou@clear-code.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along 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
+
+FLUSH STATUS;
+
+CREATE TABLE memos (
+ id int PRIMARY KEY,
+ content TEXT,
+ FULLTEXT INDEX (content)
+) COMMENT = 'engine "InnoDB"';
+
+INSERT INTO memos VALUES(1, "Mroonga is fast");
+INSERT INTO memos VALUES(2, "Mroonga is easy");
+INSERT INTO memos VALUES(3, "Mroonga is useful");
+INSERT INTO memos VALUES(4, "Mroonga is great");
+INSERT INTO memos VALUES(5, "Groonga is fast");
+
+SHOW STATUS LIKE 'mroonga_fast_order_limit';
+
+SELECT id, content
+ FROM memos
+ WHERE MATCH(content) AGAINST("+Mroonga" IN BOOLEAN MODE)
+ ORDER BY id DESC
+ LIMIT 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/wrapper/t/performance_schema-master.opt b/storage/mroonga/mysql-test/mroonga/wrapper/t/performance_schema-master.opt
new file mode 100644
index 00000000000..611d08f0c78
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/performance_schema-master.opt
@@ -0,0 +1 @@
+--performance-schema
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/performance_schema.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/performance_schema.test
new file mode 100644
index 00000000000..31c3e0a26ff
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/performance_schema.test
@@ -0,0 +1,41 @@
+# Copyright(C) 2012-2015 Kouhei Sutou <kou@clear-code.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along 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_perfschema.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 LIKE 'threads';
+
+DROP TABLE diaries;
+
+--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
index b333991d27e..8f0d01d52fb 100644
--- 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
@@ -19,14 +19,9 @@
--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,
@@ -44,10 +39,10 @@ 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
+--remove_file $MYSQLD_DATADIR/repair_test.mrn.0000106
+--remove_file $MYSQLD_DATADIR/repair_test.mrn.0000107
+--remove_file $MYSQLD_DATADIR/repair_test.mrn.0000107.c
FLUSH TABLES;
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
index ce6e1d23280..147d9672eae 100644
--- 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
@@ -19,14 +19,9 @@
--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,
@@ -41,7 +36,7 @@ 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
+--remove_file $MYSQLD_DATADIR/repair_test.mrn.0000106
FLUSH TABLES;
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
index b272649c732..065b78d44a7 100644
--- 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
@@ -1,4 +1,4 @@
-# Copyright(C) 2012 Kouhei Sutou <kou@clear-code.com>
+# Copyright(C) 2012-2015 Kouhei Sutou <kou@clear-code.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -22,12 +22,6 @@
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,
@@ -40,17 +34,23 @@ 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);
+# MySQL <= 5.5 reports a wrong warning. :<
+# It has been fixed in MySQL >= 5.6 and MariaDB >= 5.3.
+--disable_warnings
+SET GLOBAL mroonga_match_escalation_threshold = -1;
+--enable_warnings
-SET mroonga_match_escalation_threshold = 0;
+CONNECT(search_connection, localhost, root);
+USE test;
SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE);
+DISCONNECT search_connection;
+CONNECTION default;
+SET GLOBAL mroonga_match_escalation_threshold = DEFAULT;
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
index bf22001bb10..b47dcef3967 100644
--- 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
@@ -38,7 +38,7 @@ 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. :<
+# MySQL <= 5.5 reports a wrong warning. :<
# It has been fixed in MySQL >= 5.6 and MariaDB >= 5.3.
--disable_warnings
SET mroonga_match_escalation_threshold = -1;