Auto-merge from mysql-5.1-bugteam.

This commit is contained in:
Alexander Nozdrin 2010-01-30 21:27:06 +03:00
commit f4517dc68a
11 changed files with 526 additions and 34 deletions

View file

@ -904,6 +904,8 @@ sp_create_routine(THD *thd, int type, sp_head *sp)
bool store_failed= FALSE;
bool save_binlog_row_based;
DBUG_ENTER("sp_create_routine");
DBUG_PRINT("enter", ("type: %d name: %.*s",type, (int) sp->m_name.length,
sp->m_name.str));
@ -921,6 +923,7 @@ sp_create_routine(THD *thd, int type, sp_head *sp)
row-based replication. The flag will be reset at the end of the
statement.
*/
save_binlog_row_based= thd->current_stmt_binlog_row_based;
thd->clear_current_stmt_binlog_row_based();
saved_count_cuted_fields= thd->count_cuted_fields;
@ -1126,6 +1129,8 @@ done:
thd->variables.sql_mode= saved_mode;
close_thread_tables(thd);
/* Restore the state of binlog format */
thd->current_stmt_binlog_row_based= save_binlog_row_based;
DBUG_RETURN(ret);
}
@ -1150,6 +1155,7 @@ sp_drop_routine(THD *thd, int type, sp_name *name)
{
TABLE *table;
int ret;
bool save_binlog_row_based;
DBUG_ENTER("sp_drop_routine");
DBUG_PRINT("enter", ("type: %d name: %.*s",
type, (int) name->m_name.length, name->m_name.str));
@ -1162,6 +1168,7 @@ sp_drop_routine(THD *thd, int type, sp_name *name)
row-based replication. The flag will be reset at the end of the
statement.
*/
save_binlog_row_based= thd->current_stmt_binlog_row_based;
thd->clear_current_stmt_binlog_row_based();
if (!(table= open_proc_table_for_update(thd)))
@ -1179,6 +1186,8 @@ sp_drop_routine(THD *thd, int type, sp_name *name)
}
close_thread_tables(thd);
/* Restore the state of binlog format */
thd->current_stmt_binlog_row_based= save_binlog_row_based;
DBUG_RETURN(ret);
}
@ -1205,6 +1214,7 @@ sp_update_routine(THD *thd, int type, sp_name *name, st_sp_chistics *chistics)
{
TABLE *table;
int ret;
bool save_binlog_row_based;
DBUG_ENTER("sp_update_routine");
DBUG_PRINT("enter", ("type: %d name: %.*s",
type, (int) name->m_name.length, name->m_name.str));
@ -1216,6 +1226,7 @@ sp_update_routine(THD *thd, int type, sp_name *name, st_sp_chistics *chistics)
row-based replication. The flag will be reset at the end of the
statement.
*/
save_binlog_row_based= thd->current_stmt_binlog_row_based;
thd->clear_current_stmt_binlog_row_based();
if (!(table= open_proc_table_for_update(thd)))
@ -1249,6 +1260,8 @@ sp_update_routine(THD *thd, int type, sp_name *name, st_sp_chistics *chistics)
}
close_thread_tables(thd);
/* Restore the state of binlog format */
thd->current_stmt_binlog_row_based= save_binlog_row_based;
DBUG_RETURN(ret);
}