summaryrefslogtreecommitdiff
path: root/sql/sp.cc
diff options
context:
space:
mode:
authorunknown <gkodinov/kgeorge@magare.gmz>2008-02-19 17:27:18 +0200
committerunknown <gkodinov/kgeorge@magare.gmz>2008-02-19 17:27:18 +0200
commit1ac319248f6d9ed920c402cb90ed52690161750c (patch)
treee35de4d7f36f0c17c2af6c2236c3615356fbdecc /sql/sp.cc
parent18f885ed4c26c58d1dcb0691ee45f3adaea74dbb (diff)
downloadmariadb-git-1ac319248f6d9ed920c402cb90ed52690161750c.tar.gz
Bug #30604: different flagging of time_zone_used in normal
and ps-protocol Finding a routine should be a transparent operation as far as the binary log is concerned. But it was influencing the binary log because of the TIMESTAMP column in the proc table. Fixed by preserving and restoring the time_zone usage flag when searching for a stored routine in the proc table. mysql-test/r/binlog_innodb.result: Bug #30604: test case mysql-test/r/ctype_cp932_binlog.result: Bug #30604: updated test results (a procedure call before that) mysql-test/t/binlog_innodb.test: Bug #30604: test case sql/sp.cc: Bug #30604: finding a routine should be a transparent operation as far as the binary log is concerned. Fixed by preserving and restoring the time_zone usage flag.
Diffstat (limited to 'sql/sp.cc')
-rw-r--r--sql/sp.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sp.cc b/sql/sp.cc
index f8b039626f9..7224d3c4f0e 100644
--- a/sql/sp.cc
+++ b/sql/sp.cc
@@ -261,6 +261,7 @@ db_find_routine(THD *thd, int type, sp_name *name, sp_head **sphp)
char buff[65];
String str(buff, sizeof(buff), &my_charset_bin);
ulong sql_mode;
+ bool saved_time_zone_used= thd->time_zone_used;
Open_tables_state open_tables_state_backup;
DBUG_ENTER("db_find_routine");
DBUG_PRINT("enter", ("type: %d name: %.*s",
@@ -370,6 +371,11 @@ db_find_routine(THD *thd, int type, sp_name *name, sp_head **sphp)
definer, created, modified);
done:
+ /*
+ Restore the time zone flag as the timezone usage in proc table
+ does not affect replication.
+ */
+ thd->time_zone_used= saved_time_zone_used;
if (table)
close_proc_table(thd, &open_tables_state_backup);
DBUG_RETURN(ret);