1
0
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:
He Zhenxing
2010-01-24 15:03:23 +08:00
parent 16471fecc7
commit 2b16517522
28 changed files with 472 additions and 159 deletions

View File

@@ -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();
}