Commit 8ea4590a authored by Daniel Black's avatar Daniel Black Committed by Sergei Golubchik

MDEV-32583 UUID() should be treated as stochastic for the purposes of forcing query materialization

Port 9e800eda changing lex->safe_to_cache_query
to lex->uncacheable(UNCACHEABLE_RAND).
parent c5cc46f3
...@@ -150,7 +150,7 @@ class Create_func_uuid_v4 : public Create_func_arg0 ...@@ -150,7 +150,7 @@ class Create_func_uuid_v4 : public Create_func_arg0
{ {
DBUG_ENTER("Create_func_uuid_v4::create"); DBUG_ENTER("Create_func_uuid_v4::create");
thd->lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION); thd->lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION);
thd->lex->safe_to_cache_query= 0; thd->lex->uncacheable(UNCACHEABLE_RAND);
DBUG_RETURN(new (thd->mem_root) Item_func_uuid_v4(thd)); DBUG_RETURN(new (thd->mem_root) Item_func_uuid_v4(thd));
} }
static Create_func_uuid_v4 s_singleton; static Create_func_uuid_v4 s_singleton;
......
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