summaryrefslogtreecommitdiff
path: root/sql/sp_head.cc
diff options
context:
space:
mode:
authorunknown <Dao-Gang.Qu@sun.com>2010-01-12 20:07:09 +0800
committerunknown <Dao-Gang.Qu@sun.com>2010-01-12 20:07:09 +0800
commit16e15e69523c5aebd6642a47b216f736cfd456a2 (patch)
tree81fd0ce6bdc321649671cd1240deb0d5b1248e49 /sql/sp_head.cc
parent4b67a11d2bf201e273be79054b26e90ada15be38 (diff)
parent3701208a2e890d42aabc678a2a5d4ea539941b36 (diff)
downloadmariadb-git-16e15e69523c5aebd6642a47b216f736cfd456a2.tar.gz
Manual merge from next-mr.
Diffstat (limited to 'sql/sp_head.cc')
-rw-r--r--sql/sp_head.cc21
1 files changed, 11 insertions, 10 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index 8faa65a1cf3..d4931de23e8 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -24,6 +24,7 @@
#include "sp_pcontext.h"
#include "sp_rcontext.h"
#include "sp_cache.h"
+#include "set_var.h"
/*
Sufficient max length of printed destinations and frame offsets (all uints).
@@ -1707,7 +1708,8 @@ sp_head::execute_function(THD *thd, Item **argp, uint argcount,
each substatement be binlogged its way.
*/
need_binlog_call= mysql_bin_log.is_open() &&
- (thd->options & OPTION_BIN_LOG) && !thd->is_current_stmt_binlog_format_row();
+ (thd->variables.option_bits & OPTION_BIN_LOG) &&
+ !thd->is_current_stmt_binlog_format_row();
/*
Remember the original arguments for unrolled replication of functions
@@ -1770,8 +1772,8 @@ sp_head::execute_function(THD *thd, Item **argp, uint argcount,
q= global_query_id;
pthread_mutex_unlock(&LOCK_thread_count);
mysql_bin_log.start_union_events(thd, q + 1);
- binlog_save_options= thd->options;
- thd->options&= ~OPTION_BIN_LOG;
+ binlog_save_options= thd->variables.option_bits;
+ thd->variables.option_bits&= ~OPTION_BIN_LOG;
}
/*
@@ -1791,7 +1793,7 @@ sp_head::execute_function(THD *thd, Item **argp, uint argcount,
if (need_binlog_call)
{
mysql_bin_log.stop_union_events(thd);
- thd->options= binlog_save_options;
+ thd->variables.option_bits= binlog_save_options;
if (thd->binlog_evt_union.unioned_events)
{
int errcode = query_error_code(thd, thd->killed == THD::NOT_KILLED);
@@ -1984,12 +1986,12 @@ sp_head::execute_procedure(THD *thd, List<Item> *args)
save_enable_slow_log= true;
thd->enable_slow_log= FALSE;
}
- if (!(m_flags & LOG_GENERAL_LOG) && !(thd->options & OPTION_LOG_OFF))
+ if (!(m_flags & LOG_GENERAL_LOG) && !(thd->variables.option_bits & OPTION_LOG_OFF))
{
DBUG_PRINT("info", ("Disabling general log for the execution"));
save_log_general= true;
/* disable this bit */
- thd->options |= OPTION_LOG_OFF;
+ thd->variables.option_bits |= OPTION_LOG_OFF;
}
thd->spcont= nctx;
@@ -2003,7 +2005,7 @@ sp_head::execute_procedure(THD *thd, List<Item> *args)
err_status= execute(thd);
if (save_log_general)
- thd->options &= ~OPTION_LOG_OFF;
+ thd->variables.option_bits &= ~OPTION_LOG_OFF;
if (save_enable_slow_log)
thd->enable_slow_log= true;
/*
@@ -2438,8 +2440,7 @@ sp_head::show_create_routine(THD *thd, int type)
if (check_show_routine_access(thd, this, &full_access))
DBUG_RETURN(TRUE);
- sys_var_thd_sql_mode::symbolic_mode_representation(
- thd, m_sql_mode, &sql_mode);
+ sql_mode_string_representation(thd, m_sql_mode, &sql_mode);
/* Send header. */
@@ -2878,7 +2879,7 @@ sp_instr_stmt::execute(THD *thd, uint *nextp)
(the order of query cache and subst_spvars calls is irrelevant because
queries with SP vars can't be cached)
*/
- if (unlikely((thd->options & OPTION_LOG_OFF)==0))
+ if (unlikely((thd->variables.option_bits & OPTION_LOG_OFF)==0))
general_log_write(thd, COM_QUERY, thd->query(), thd->query_length());
if (query_cache_send_result_to_client(thd,