Commit 94b49357 authored by Alexey Botchkov's avatar Alexey Botchkov

MDEV-20744 SET GLOBAL `replicate_do_db` = DEFAULT causes crash.

DEFAULT for the replicate_do_db is the "" as our documentation states.
parent 897ea21e
......@@ -37,5 +37,9 @@ SET @@GLOBAL.replicate_do_db=null;
SELECT @@GLOBAL.replicate_do_db;
@@GLOBAL.replicate_do_db
SET @@GLOBAL.replicate_do_db=DEFAULT;
SELECT @@GLOBAL.replicate_do_db;
@@GLOBAL.replicate_do_db
# Cleanup.
SET @@GLOBAL.replicate_do_db = @save_replicate_do_db;
......@@ -38,5 +38,8 @@ SELECT @@GLOBAL.replicate_do_db;
SET @@GLOBAL.replicate_do_db=null;
SELECT @@GLOBAL.replicate_do_db;
SET @@GLOBAL.replicate_do_db=DEFAULT;
SELECT @@GLOBAL.replicate_do_db;
--echo # Cleanup.
SET @@GLOBAL.replicate_do_db = @save_replicate_do_db;
......@@ -614,7 +614,11 @@ public:
{ DBUG_ASSERT(FALSE); }
void global_save_default(THD *thd, set_var *var)
{ DBUG_ASSERT(FALSE); }
{
char *ptr= (char*)(intptr)option.def_value;
var->save_result.string_value.str= ptr;
var->save_result.string_value.length= ptr ? strlen(ptr) : 0;
}
bool session_update(THD *thd, set_var *var)
{
......
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