summaryrefslogtreecommitdiff
path: root/sql/sp.cc
diff options
context:
space:
mode:
authorAlexander Nozdrin <alik@sun.com>2010-01-30 23:09:31 +0300
committerAlexander Nozdrin <alik@sun.com>2010-01-30 23:09:31 +0300
commitf5386dd087c0c2c9e5032263405bff2403b1b191 (patch)
tree81e219c792bb0ac78dac1e4685f956c765599271 /sql/sp.cc
parent706b2c2c8f195485a5fc0e8c5ddfb8876ad92360 (diff)
parentf4517dc68a936fff8d646d67b904f83b2dcc119d (diff)
downloadmariadb-git-f5386dd087c0c2c9e5032263405bff2403b1b191.tar.gz
Manual merge from mysql-trunk-merge.
Conflicts: - sql/event_db_repository.cc - sql/events.cc - sql/sp.cc - sql/sql_acl.cc - sql/sql_udf.cc
Diffstat (limited to 'sql/sp.cc')
-rw-r--r--sql/sp.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/sql/sp.cc b/sql/sp.cc
index 9d3527dc4e6..cbc0d003c9f 100644
--- a/sql/sp.cc
+++ b/sql/sp.cc
@@ -908,6 +908,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));
@@ -925,6 +927,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();
saved_count_cuted_fields= thd->count_cuted_fields;
@@ -1132,6 +1135,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);
}
@@ -1156,6 +1161,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));
@@ -1168,6 +1174,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();
if (!(table= open_proc_table_for_update(thd)))
@@ -1186,6 +1193,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);
}
@@ -1212,6 +1221,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));
@@ -1223,6 +1233,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)))
@@ -1257,6 +1268,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);
}