diff options
author | Konstantin Osipov <kostja@sun.com> | 2010-02-06 13:28:06 +0300 |
---|---|---|
committer | Konstantin Osipov <kostja@sun.com> | 2010-02-06 13:28:06 +0300 |
commit | 9c030fe5081163babdc8ef24395d108a394107fe (patch) | |
tree | 16fe2efa0a3d5e40e00972a1dc3bc4e13f71170c /sql/sp.cc | |
parent | 0b2f51664d38ed24f3f8b237877520e45bfe83f6 (diff) | |
parent | 19df110369d4cef5303176a8aedca34cd0e2d271 (diff) | |
download | mariadb-git-9c030fe5081163babdc8ef24395d108a394107fe.tar.gz |
Merge next-mr -> next-4284.
Diffstat (limited to 'sql/sp.cc')
-rw-r--r-- | sql/sp.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sql/sp.cc b/sql/sp.cc index 62071218a93..680538d33e9 100644 --- a/sql/sp.cc +++ b/sql/sp.cc @@ -909,6 +909,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)); @@ -926,6 +928,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->is_current_stmt_binlog_format_row(); thd->clear_current_stmt_binlog_format_row(); /* Grab an exclusive MDL lock. */ @@ -1140,6 +1143,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); } @@ -1164,6 +1169,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)); @@ -1176,6 +1182,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->is_current_stmt_binlog_format_row(); thd->clear_current_stmt_binlog_format_row(); /* Grab an exclusive MDL lock. */ @@ -1213,6 +1220,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); } @@ -1239,6 +1248,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)); @@ -1256,6 +1266,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->is_current_stmt_binlog_format_row(); thd->clear_current_stmt_binlog_format_row(); if (!(table= open_proc_table_for_update(thd))) @@ -1314,6 +1325,8 @@ sp_update_routine(THD *thd, int type, sp_name *name, st_sp_chistics *chistics) } err: close_thread_tables(thd); + /* Restore the state of binlog format */ + thd->current_stmt_binlog_row_based= save_binlog_row_based; DBUG_RETURN(ret); } |