mirror of
https://github.com/MariaDB/server.git
synced 2025-09-18 04:07:41 +03:00
Backport Bug#37148 to 5.1
This commit is contained in:
13
sql/sp.cc
13
sql/sp.cc
@@ -1105,9 +1105,10 @@ sp_create_routine(THD *thd, int type, sp_head *sp)
|
||||
/* restore sql_mode when binloging */
|
||||
thd->variables.sql_mode= saved_mode;
|
||||
/* Such a statement can always go directly to binlog, no trans cache */
|
||||
thd->binlog_query(THD::MYSQL_QUERY_TYPE,
|
||||
log_query.c_ptr(), log_query.length(),
|
||||
FALSE, FALSE, 0);
|
||||
if (thd->binlog_query(THD::MYSQL_QUERY_TYPE,
|
||||
log_query.c_ptr(), log_query.length(),
|
||||
FALSE, FALSE, 0))
|
||||
ret= SP_INTERNAL_ERROR;
|
||||
thd->variables.sql_mode= 0;
|
||||
}
|
||||
|
||||
@@ -1166,7 +1167,8 @@ sp_drop_routine(THD *thd, int type, sp_name *name)
|
||||
|
||||
if (ret == SP_OK)
|
||||
{
|
||||
write_bin_log(thd, TRUE, thd->query(), thd->query_length());
|
||||
if (write_bin_log(thd, TRUE, thd->query(), thd->query_length()))
|
||||
ret= SP_INTERNAL_ERROR;
|
||||
sp_cache_invalidate();
|
||||
}
|
||||
|
||||
@@ -1236,7 +1238,8 @@ sp_update_routine(THD *thd, int type, sp_name *name, st_sp_chistics *chistics)
|
||||
|
||||
if (ret == SP_OK)
|
||||
{
|
||||
write_bin_log(thd, TRUE, thd->query(), thd->query_length());
|
||||
if (write_bin_log(thd, TRUE, thd->query(), thd->query_length()))
|
||||
ret= SP_INTERNAL_ERROR;
|
||||
sp_cache_invalidate();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user