mirror of
https://github.com/MariaDB/server.git
synced 2025-01-15 19:42:28 +01:00
MDEV-34682 Reset spider_hton_ptr in error mode of spider_db_init()
This commit is contained in:
parent
8b51d34462
commit
bce3f3f628
4 changed files with 39 additions and 5 deletions
19
storage/spider/mysql-test/spider/bugfix/r/mdev_34682.result
Normal file
19
storage/spider/mysql-test/spider/bugfix/r/mdev_34682.result
Normal file
|
@ -0,0 +1,19 @@
|
|||
set @old_aria_encrypt_tables=@@global.aria_encrypt_tables;
|
||||
set global aria_encrypt_tables=ON;
|
||||
CREATE FUNCTION spider_direct_sql RETURNS INT SONAME 'ha_spider.so';
|
||||
call mtr.add_suppression(".*\\[ERROR\\] SPIDER plugin initialization failed at.* by 'Initialization of encryption failed for");
|
||||
call mtr.add_suppression(".*\\[ERROR\\] Plugin 'SPIDER' registration as a STORAGE ENGINE failed.");
|
||||
INSTALL PLUGIN spider SONAME 'ha_spider.so';
|
||||
ERROR HY000: Can't initialize function 'spider'; Plugin initialization function failed.
|
||||
SELECT spider_direct_sql ('SELECT * FROM s','a','srv "b"');
|
||||
ERROR HY000: Can't initialize function 'spider_direct_sql'; Plugin 'SPIDER' is not loaded
|
||||
Warnings:
|
||||
Note 1305 FUNCTION test.spider_flush_table_mon_cache does not exist
|
||||
Warnings:
|
||||
Note 1305 FUNCTION test.spider_copy_tables does not exist
|
||||
Warnings:
|
||||
Note 1305 FUNCTION test.spider_ping_table does not exist
|
||||
Warnings:
|
||||
Note 1305 FUNCTION test.spider_bg_direct_sql does not exist
|
||||
Warnings:
|
||||
Note 1305 SONAME ha_spider.so does not exist
|
14
storage/spider/mysql-test/spider/bugfix/t/mdev_34682.test
Normal file
14
storage/spider/mysql-test/spider/bugfix/t/mdev_34682.test
Normal file
|
@ -0,0 +1,14 @@
|
|||
set @old_aria_encrypt_tables=@@global.aria_encrypt_tables;
|
||||
set global aria_encrypt_tables=ON;
|
||||
|
||||
CREATE FUNCTION spider_direct_sql RETURNS INT SONAME 'ha_spider.so';
|
||||
call mtr.add_suppression(".*\\[ERROR\\] SPIDER plugin initialization failed at.* by 'Initialization of encryption failed for");
|
||||
call mtr.add_suppression(".*\\[ERROR\\] Plugin 'SPIDER' registration as a STORAGE ENGINE failed.");
|
||||
--error ER_CANT_INITIALIZE_UDF
|
||||
INSTALL PLUGIN spider SONAME 'ha_spider.so';
|
||||
--error ER_CANT_INITIALIZE_UDF
|
||||
SELECT spider_direct_sql ('SELECT * FROM s','a','srv "b"');
|
||||
|
||||
--disable_query_log
|
||||
--source ../../include/clean_up_spider.inc
|
||||
set global aria_encrypt_tables=@old_aria_encrypt_tables;
|
|
@ -1,8 +1,8 @@
|
|||
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;
|
||||
DROP FUNCTION IF EXISTS spider_flush_table_mon_cache;
|
||||
DROP FUNCTION IF EXISTS spider_copy_tables;
|
||||
DROP FUNCTION IF EXISTS spider_ping_table;
|
||||
DROP FUNCTION IF EXISTS spider_bg_direct_sql;
|
||||
DROP FUNCTION IF EXISTS spider_direct_sql;
|
||||
UNINSTALL SONAME IF EXISTS 'ha_spider';
|
||||
DROP TABLE IF EXISTS mysql.spider_xa;
|
||||
DROP TABLE IF EXISTS mysql.spider_xa_member;
|
||||
|
|
|
@ -6805,6 +6805,7 @@ error_pt_attr_setstate:
|
|||
pthread_attr_destroy(&spider_pt_attr);
|
||||
error_pt_attr_init:
|
||||
#endif
|
||||
spider_hton_ptr= NULL;
|
||||
DBUG_RETURN(error_num);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue