summaryrefslogtreecommitdiff
path: root/storage/spider/mysql-test/spider/bugfix/t/mdev_26541.test
diff options
context:
space:
mode:
Diffstat (limited to 'storage/spider/mysql-test/spider/bugfix/t/mdev_26541.test')
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/mdev_26541.test40
1 files changed, 40 insertions, 0 deletions
diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_26541.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_26541.test
new file mode 100644
index 00000000000..ffd99390748
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_26541.test
@@ -0,0 +1,40 @@
+--echo #
+--echo # MDEV-26541 Undefined symbol: _ZTI12ha_partition when attempting to use ha_spider.so in UBSAN builds
+--echo #
+
+if (`select not(count(*)) from information_schema.system_variables where variable_name='have_sanitizer' and global_value="UBSAN"`)
+{
+--skip test needs to be run with UBSAN
+}
+
+# init spider
+
+INSTALL PLUGIN spider SONAME 'ha_spider.so';
+
+let $PLUGIN_NAME= spider_flush_table_mon_cache;
+let $PLUGIN_EXIST=
+ `SELECT COUNT(*) FROM mysql.func WHERE name = '$PLUGIN_NAME'`;
+while (!$PLUGIN_EXIST)
+{
+ let $PLUGIN_EXIST=
+ `SELECT COUNT(*) FROM mysql.func WHERE name = '$PLUGIN_NAME'`;
+}
+
+# deinit spider
+
+DROP FUNCTION spider_flush_table_mon_cache;
+DROP FUNCTION spider_copy_tables;
+DROP FUNCTION spider_ping_table;
+DROP FUNCTION spider_bg_direct_sql;
+DROP FUNCTION spider_direct_sql;
+UNINSTALL PLUGIN spider_alloc_mem;
+UNINSTALL PLUGIN spider;
+DROP TABLE IF EXISTS mysql.spider_xa;
+DROP TABLE IF EXISTS mysql.spider_xa_member;
+DROP TABLE IF EXISTS mysql.spider_xa_failed_log;
+DROP TABLE IF EXISTS mysql.spider_tables;
+DROP TABLE IF EXISTS mysql.spider_link_mon_servers;
+DROP TABLE IF EXISTS mysql.spider_link_failed_log;
+DROP TABLE IF EXISTS mysql.spider_table_position_for_recovery;
+DROP TABLE IF EXISTS mysql.spider_table_sts;
+DROP TABLE IF EXISTS mysql.spider_table_crd;