mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
merged fixes for BUG#39934 to 5.1-rpl+3
Also renamed current_stmt_binlog_row_based to current_stmt_binlog_format_row for consistency
This commit is contained in:
@ -2375,10 +2375,11 @@ Create_udf_func::create(THD *thd, udf_func *udf, List<Item> *item_list)
|
||||
Item *func= NULL;
|
||||
int arg_count= 0;
|
||||
|
||||
DBUG_ENTER("Create_udf_func::create");
|
||||
if (item_list != NULL)
|
||||
arg_count= item_list->elements;
|
||||
|
||||
thd->lex->set_stmt_unsafe();
|
||||
thd->lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_UDF);
|
||||
|
||||
DBUG_ASSERT( (udf->type == UDFTYPE_FUNCTION)
|
||||
|| (udf->type == UDFTYPE_AGGREGATE));
|
||||
@ -2462,7 +2463,7 @@ Create_udf_func::create(THD *thd, udf_func *udf, List<Item> *item_list)
|
||||
}
|
||||
}
|
||||
thd->lex->safe_to_cache_query= 0;
|
||||
return func;
|
||||
DBUG_RETURN(func);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -3363,9 +3364,10 @@ Create_func_found_rows Create_func_found_rows::s_singleton;
|
||||
Item*
|
||||
Create_func_found_rows::create(THD *thd)
|
||||
{
|
||||
thd->lex->set_stmt_unsafe();
|
||||
DBUG_ENTER("Create_func_found_rows::create");
|
||||
thd->lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION);
|
||||
thd->lex->safe_to_cache_query= 0;
|
||||
return new (thd->mem_root) Item_func_found_rows();
|
||||
DBUG_RETURN(new (thd->mem_root) Item_func_found_rows());
|
||||
}
|
||||
|
||||
|
||||
@ -3791,9 +3793,10 @@ Create_func_load_file Create_func_load_file::s_singleton;
|
||||
Item*
|
||||
Create_func_load_file::create(THD *thd, Item *arg1)
|
||||
{
|
||||
thd->lex->set_stmt_unsafe();
|
||||
DBUG_ENTER("Create_func_load_file::create");
|
||||
thd->lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION);
|
||||
thd->lex->uncacheable(UNCACHEABLE_SIDEEFFECT);
|
||||
return new (thd->mem_root) Item_load_file(arg1);
|
||||
DBUG_RETURN(new (thd->mem_root) Item_load_file(arg1));
|
||||
}
|
||||
|
||||
|
||||
@ -4260,9 +4263,10 @@ Create_func_row_count Create_func_row_count::s_singleton;
|
||||
Item*
|
||||
Create_func_row_count::create(THD *thd)
|
||||
{
|
||||
thd->lex->set_stmt_unsafe();
|
||||
DBUG_ENTER("Create_func_row_count::create");
|
||||
thd->lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION);
|
||||
thd->lex->safe_to_cache_query= 0;
|
||||
return new (thd->mem_root) Item_func_row_count();
|
||||
DBUG_RETURN(new (thd->mem_root) Item_func_row_count());
|
||||
}
|
||||
|
||||
|
||||
@ -4569,9 +4573,10 @@ Create_func_uuid Create_func_uuid::s_singleton;
|
||||
Item*
|
||||
Create_func_uuid::create(THD *thd)
|
||||
{
|
||||
thd->lex->set_stmt_unsafe();
|
||||
DBUG_ENTER("Create_func_uuid::create");
|
||||
thd->lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION);
|
||||
thd->lex->safe_to_cache_query= 0;
|
||||
return new (thd->mem_root) Item_func_uuid();
|
||||
DBUG_RETURN(new (thd->mem_root) Item_func_uuid());
|
||||
}
|
||||
|
||||
|
||||
@ -4580,9 +4585,10 @@ Create_func_uuid_short Create_func_uuid_short::s_singleton;
|
||||
Item*
|
||||
Create_func_uuid_short::create(THD *thd)
|
||||
{
|
||||
thd->lex->set_stmt_unsafe();
|
||||
DBUG_ENTER("Create_func_uuid_short::create");
|
||||
thd->lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION);
|
||||
thd->lex->safe_to_cache_query= 0;
|
||||
return new (thd->mem_root) Item_func_uuid_short();
|
||||
DBUG_RETURN(new (thd->mem_root) Item_func_uuid_short());
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user