Commit d37c51b8 authored by Yuchen Pei's avatar Yuchen Pei

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.
parent 8b3f470c
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;
# 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 @@ ...@@ -21,7 +21,7 @@
static LEX_STRING spider_init_queries[] = { static LEX_STRING spider_init_queries[] = {
{C_STRING_WITH_LEN( {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( {C_STRING_WITH_LEN(
"create table if not exists mysql.spider_xa(" "create table if not exists mysql.spider_xa("
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment