summaryrefslogtreecommitdiff
path: root/storage/spider/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'storage/spider/mysql-test')
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/mdev_28996.result34
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/mdev_29855.result34
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/mdev_28996.cnf3
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/mdev_28996.test40
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/mdev_29855.cnf3
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/mdev_29855.test40
6 files changed, 154 insertions, 0 deletions
diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_28996.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_28996.result
new file mode 100644
index 00000000000..f805e7ef3ad
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_28996.result
@@ -0,0 +1,34 @@
+#
+# MDEV-28996 ASAN errors in String::q_append / spider_string::q_append / spider_db_mbase_util::open_item_func
+#
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+connection child2_1;
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+CREATE TABLE tbl_a (
+a CHAR(8)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+INSERT INTO tbl_a VALUES ('foo'),('bar');
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+CREATE TABLE tbl_a (
+a CHAR(8)
+) ENGINE=Spider DEFAULT CHARSET=utf8 COMMENT='table "tbl_a", srv "s_2_1"';
+SELECT MAX(BINARY a) FROM tbl_a;
+MAX(BINARY a)
+foo
+DROP DATABASE auto_test_local;
+connection child2_1;
+DROP DATABASE auto_test_remote;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_29855.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_29855.result
new file mode 100644
index 00000000000..4335d20f4c3
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_29855.result
@@ -0,0 +1,34 @@
+#
+# MDEV-29855 Crash with SPIDER_DIRECT_SQL and spider_udf_ds_use_real_table=1
+#
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+connection child2_1;
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+CREATE TABLE tbl_a (
+a INT
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+CREATE TABLE tbl_a (
+a INT
+) ENGINE=Spider DEFAULT CHARSET=utf8 COMMENT='table "tbl_a", srv "s_2_1"';
+SET spider_udf_ds_use_real_table=1;
+SELECT SPIDER_DIRECT_SQL('select 1 as 1', 'tbl_a', 'srv "s_2_1"');
+ERROR 3D000: No database selected
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_28996.cnf b/storage/spider/mysql-test/spider/bugfix/t/mdev_28996.cnf
new file mode 100644
index 00000000000..05dfd8a0bce
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_28996.cnf
@@ -0,0 +1,3 @@
+!include include/default_mysqld.cnf
+!include ../my_1_1.cnf
+!include ../my_2_1.cnf
diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_28996.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_28996.test
new file mode 100644
index 00000000000..8097fe7e607
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_28996.test
@@ -0,0 +1,40 @@
+--echo #
+--echo # MDEV-28996 ASAN errors in String::q_append / spider_string::q_append / spider_db_mbase_util::open_item_func
+--echo #
+
+--disable_query_log
+--disable_result_log
+--source ../t/test_init.inc
+--enable_query_log
+--enable_result_log
+
+--connection child2_1
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+
+eval CREATE TABLE tbl_a (
+ a CHAR(8)
+) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
+
+INSERT INTO tbl_a VALUES ('foo'),('bar');
+
+--connection master_1
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+
+eval CREATE TABLE tbl_a (
+ a CHAR(8)
+) $MASTER_1_ENGINE $MASTER_1_CHARSET COMMENT='table "tbl_a", srv "s_2_1"';
+
+SELECT MAX(BINARY a) FROM tbl_a;
+
+DROP DATABASE auto_test_local;
+
+--connection child2_1
+DROP DATABASE auto_test_remote;
+
+--disable_query_log
+--disable_result_log
+--source ../t/test_deinit.inc
+--enable_query_log
+--enable_result_log
diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_29855.cnf b/storage/spider/mysql-test/spider/bugfix/t/mdev_29855.cnf
new file mode 100644
index 00000000000..05dfd8a0bce
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_29855.cnf
@@ -0,0 +1,3 @@
+!include include/default_mysqld.cnf
+!include ../my_1_1.cnf
+!include ../my_2_1.cnf
diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_29855.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_29855.test
new file mode 100644
index 00000000000..13cda064c72
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_29855.test
@@ -0,0 +1,40 @@
+--echo #
+--echo # MDEV-29855 Crash with SPIDER_DIRECT_SQL and spider_udf_ds_use_real_table=1
+--echo #
+
+
+--disable_query_log
+--disable_result_log
+--source ../../t/test_init.inc
+--enable_result_log
+--enable_query_log
+
+--connection child2_1
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+eval CREATE TABLE tbl_a (
+ a INT
+) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
+
+--connection master_1
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+eval CREATE TABLE tbl_a (
+ a INT
+) $MASTER_1_ENGINE $MASTER_1_CHARSET COMMENT='table "tbl_a", srv "s_2_1"';
+
+SET spider_udf_ds_use_real_table=1;
+--error ER_NO_DB_ERROR
+SELECT SPIDER_DIRECT_SQL('select 1 as 1', 'tbl_a', 'srv "s_2_1"');
+
+--connection master_1
+DROP DATABASE IF EXISTS auto_test_local;
+
+--connection child2_1
+DROP DATABASE IF EXISTS auto_test_remote;
+
+--disable_query_log
+--disable_result_log
+--source ../t/test_deinit.inc
+--enable_query_log
+--enable_result_log