mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
MDEV-33494 fix spider init with no_zero_date global sql mode
Like the fix for MDEV-32753 and MDEV-33242, spider init queries creates new connections that use the global sql_mode of the existing connection.
This commit is contained in:
parent
bf49e7cfc7
commit
9d34939c6e
3 changed files with 16 additions and 1 deletions
|
@ -0,0 +1,4 @@
|
|||
set @old_sql_mode=@@global.sql_mode;
|
||||
set global sql_mode=(SELECT CONCAT (@@sql_mode,',no_zero_date'));
|
||||
install soname 'ha_spider';
|
||||
set global sql_mode=@old_sql_mode;
|
11
storage/spider/mysql-test/spider/bugfix/t/mdev_33494.test
Normal file
11
storage/spider/mysql-test/spider/bugfix/t/mdev_33494.test
Normal file
|
@ -0,0 +1,11 @@
|
|||
# This test tests spider init with global no_zero_date sql mode
|
||||
set @old_sql_mode=@@global.sql_mode;
|
||||
set global sql_mode=(SELECT CONCAT (@@sql_mode,',no_zero_date'));
|
||||
install soname 'ha_spider';
|
||||
set global sql_mode=@old_sql_mode;
|
||||
|
||||
--disable_query_log
|
||||
--disable_result_log
|
||||
--source ../../include/clean_up_spider.inc
|
||||
--enable_result_log
|
||||
--enable_query_log
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
static LEX_STRING spider_init_queries[] = {
|
||||
{C_STRING_WITH_LEN(
|
||||
"SET @@SQL_MODE = REPLACE(@@SQL_MODE, 'ORACLE', '');"
|
||||
"SET @@SQL_MODE = REGEXP_REPLACE(@@SQL_MODE, '(ORACLE|NO_ZERO_DATE)', '');"
|
||||
)},
|
||||
{C_STRING_WITH_LEN(
|
||||
"create table if not exists mysql.spider_xa("
|
||||
|
|
Loading…
Add table
Reference in a new issue