Skip to content

Commit ae69ac2

Browse files
grooverdanvuvova
authored andcommitted
MDEV-32583 UUID() should be treated as stochastic for the purposes of forcing query materialization
Port 9e800ed changing lex->safe_to_cache_query to lex->uncacheable(UNCACHEABLE_RAND).
1 parent 20611c8 commit ae69ac2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugin/type_uuid/plugin.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ class Create_func_uuid_v4 : public Create_func_arg0
150150
{
151151
DBUG_ENTER("Create_func_uuid_v4::create");
152152
thd->lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION);
153-
thd->lex->safe_to_cache_query= 0;
153+
thd->lex->uncacheable(UNCACHEABLE_RAND);
154154
DBUG_RETURN(new (thd->mem_root) Item_func_uuid_v4(thd));
155155
}
156156
static Create_func_uuid_v4 s_singleton;
@@ -241,4 +241,4 @@ maria_declare_plugin(type_uuid)
241241
"1.0", // String version representation
242242
MariaDB_PLUGIN_MATURITY_EXPERIMENTAL// Maturity(see include/mysql/plugin.h)*/
243243
}
244-
maria_declare_plugin_end;
244+
maria_declare_plugin_end;

0 commit comments

Comments
 (0)