summaryrefslogtreecommitdiff
path: root/sql/sp_head.cc
diff options
context:
space:
mode:
authorkroki@mysql.com <>2006-04-21 19:02:05 +0400
committerkroki@mysql.com <>2006-04-21 19:02:05 +0400
commit4bd62e58483b78b94eefd04b030294bf4e37c2aa (patch)
treea92f7a373d923c471dff2b1cbd384ab65081a113 /sql/sp_head.cc
parentb0c1e49a119654f4701427f8b13e9643f7633f79 (diff)
parentc51fb60b0b8edca03adacc5ff54a838b2e72d7e3 (diff)
downloadmariadb-git-4bd62e58483b78b94eefd04b030294bf4e37c2aa.tar.gz
Merge mysql.com:/home/tomash/src/mysql_ab/mysql-5.0
into mysql.com:/home/tomash/src/mysql_ab/mysql-5.0-bug6951
Diffstat (limited to 'sql/sp_head.cc')
-rw-r--r--sql/sp_head.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index 6b7cdb1ea98..eea3054ab26 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -935,6 +935,7 @@ sp_head::execute(THD *thd)
bool err_status= FALSE;
uint ip= 0;
ulong save_sql_mode;
+ bool save_abort_on_warning;
Query_arena *old_arena;
/* per-instruction arena */
MEM_ROOT execute_mem_root;
@@ -995,6 +996,10 @@ sp_head::execute(THD *thd)
thd->derived_tables= 0;
save_sql_mode= thd->variables.sql_mode;
thd->variables.sql_mode= m_sql_mode;
+ save_abort_on_warning= thd->abort_on_warning;
+ thd->abort_on_warning=
+ (m_sql_mode & (MODE_STRICT_TRANS_TABLES | MODE_STRICT_ALL_TABLES));
+
/*
It is also more efficient to save/restore current thd->lex once when
do it in each instruction
@@ -1127,6 +1132,7 @@ sp_head::execute(THD *thd)
DBUG_ASSERT(!thd->derived_tables);
thd->derived_tables= old_derived_tables;
thd->variables.sql_mode= save_sql_mode;
+ thd->abort_on_warning= save_abort_on_warning;
thd->stmt_arena= old_arena;
state= EXECUTED;