Below is the list of changes that have just been committed into a local
5.0 repository of marcsql. When marcsql does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2006-10-05 20:01:30-07:00, malff@weblab.(none) +8 -0
Bug#20028 (Function with select return no data)
Before this change, THD::abort_on_warning was set in sp_head::execute,
causing Stored Procedures, Stored Functions and Triggers to treat warnings
as errors when executing in a strict SQL_MODE.
After this change, THD::abort_on_warning is set in process_triggers in
sql/sql_trigger.cc, which only affects triggers. Only INSERT and UPDATE
triggers can elevate the abort_on_warning flag, which does not affect
DELETE triggers.
This fix is a revision of the change done for Bug#6951:, it produces the
same results for the INSERT and UPDATE triggers in strict mode, while not
causing side effects in DELETE triggers, Stored Procedures or Stored
Functions, which -- according to the definition of a STRICT mode -- should
not produre errors when no insert or update is performed.
New tests cases have been added.
An existing test case, sp-vars, was, according to the definition of the
TRADITIONAL mode, incorrect in expecting errors from stored functions when
no insert or update is present. The expected result for this test has been
adjusted.
Note to the reviewer: changes in sp-vars needs to be confirmed by an expert,
my knowledge is too limited in this area.
mysql-test/r/sp-vars.result@stripped, 2006-10-05 19:59:20-07:00, malff@weblab.(none) +110 -15
Adjusted based on the definition of SQL_MODE=TRADITIONAL
mysql-test/r/sp.result@stripped, 2006-10-05 19:59:20-07:00, malff@weblab.(none) +97 -0
New tests for Bug#20028
mysql-test/r/trigger.result@stripped, 2006-10-05 19:59:20-07:00, malff@weblab.(none) +48 -0
New tests for Bug#20028
mysql-test/t/sp-vars.test@stripped, 2006-10-05 19:59:20-07:00, malff@weblab.(none) +0 -17
Adjusted based on the definition of SQL_MODE=TRADITIONAL
mysql-test/t/sp.test@stripped, 2006-10-05 19:59:20-07:00, malff@weblab.(none) +93 -0
New tests for Bug#20028
mysql-test/t/trigger.test@stripped, 2006-10-05 19:59:20-07:00, malff@weblab.(none) +67 -0
New tests for Bug#20028
sql/sp_head.cc@stripped, 2006-10-05 19:59:20-07:00, malff@weblab.(none) +0 -10
Moved setting THD::abort_on_warning to sql_trigger.cc, for INSERT and UPDATE
sql/sql_trigger.cc@stripped, 2006-10-05 19:59:21-07:00, malff@weblab.(none) +11 -0
Moved setting THD::abort_on_warning to sql_trigger.cc, for INSERT and UPDATE
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: malff
# Host: weblab.(none)
# Root: /home/marcsql/TREE/mysql-5.0-20028
--- 1.3/mysql-test/r/sp-vars.result 2006-10-05 20:01:35 -07:00
+++ 1.4/mysql-test/r/sp-vars.result 2006-10-05 20:01:35 -07:00
@@ -352,15 +352,79 @@ Calling the routines, created in TRADITI
---------------------------------------------------------------
CALL sp_vars_check_dflt();
-ERROR 22003: Out of range value adjusted for column 'v1' at row 1
+v1 v1u v2 v2u v3 v3u v4 v4u
+127 255 -128 0 127 255 -128 0
+v5 v5u v6 v6u
+127 255 -128 0
+v7 v8 v9 v10 v11 v12 v13 v14 v15 v16
+10 10 10 0 0 10 10 10 10 0
+v17 v18 v19 v20
+12.00 12.12 12.00 12.12
+Warnings:
+Warning 1264 Out of range value adjusted for column 'v1' at row 1
+Warning 1264 Out of range value adjusted for column 'v1u' at row 1
+Warning 1264 Out of range value adjusted for column 'v2' at row 1
+Warning 1264 Out of range value adjusted for column 'v2u' at row 1
+Warning 1264 Out of range value adjusted for column 'v3' at row 1
+Warning 1264 Out of range value adjusted for column 'v3u' at row 1
+Warning 1264 Out of range value adjusted for column 'v4' at row 1
+Warning 1264 Out of range value adjusted for column 'v4u' at row 1
+Warning 1264 Out of range value adjusted for column 'v5' at row 1
+Warning 1264 Out of range value adjusted for column 'v5u' at row 1
+Warning 1264 Out of range value adjusted for column 'v6' at row 1
+Warning 1264 Out of range value adjusted for column 'v6u' at row 1
+Warning 1366 Incorrect integer value: 'String 10 ' for column 'v10' at row 1
+Warning 1366 Incorrect integer value: 'String10' for column 'v11' at row 1
+Warning 1265 Data truncated for column 'v12' at row 1
+Warning 1265 Data truncated for column 'v13' at row 1
+Warning 1366 Incorrect integer value: 'Hello, world' for column 'v16' at row 1
+Note 1265 Data truncated for column 'v18' at row 1
+Note 1265 Data truncated for column 'v20' at row 1
CALL sp_vars_check_assignment();
-ERROR 22003: Out of range value adjusted for column 'i1' at row 1
+i1 i2 i3 i4
+127 -128 127 -128
+i1 i2 i3 i4
+127 -128 127 127
+u1 u2 u3 u4
+255 0 255 0
+u1 u2 u3 u4
+255 0 200 200
+d1 d2 d3
+1234.00 1234.12 1234.12
+d1 d2 d3
+1234.00 1234.12 1234.12
+Warnings:
+Warning 1264 Out of range value adjusted for column 'i1' at row 1
+Warning 1264 Out of range value adjusted for column 'i2' at row 1
+Warning 1264 Out of range value adjusted for column 'i3' at row 1
+Warning 1264 Out of range value adjusted for column 'i4' at row 1
+Warning 1264 Out of range value adjusted for column 'i1' at row 1
+Warning 1264 Out of range value adjusted for column 'i2' at row 1
+Warning 1264 Out of range value adjusted for column 'i3' at row 1
+Warning 1264 Out of range value adjusted for column 'i4' at row 1
+Warning 1264 Out of range value adjusted for column 'u1' at row 1
+Warning 1264 Out of range value adjusted for column 'u2' at row 1
+Warning 1264 Out of range value adjusted for column 'u3' at row 1
+Warning 1264 Out of range value adjusted for column 'u4' at row 1
+Warning 1264 Out of range value adjusted for column 'u1' at row 1
+Warning 1264 Out of range value adjusted for column 'u2' at row 1
+Note 1265 Data truncated for column 'd3' at row 1
+Note 1265 Data truncated for column 'd3' at row 1
SELECT sp_vars_check_ret1();
-ERROR 22003: Out of range value adjusted for column 'sp_vars_check_ret1()' at row 1
+sp_vars_check_ret1()
+127
+Warnings:
+Warning 1264 Out of range value adjusted for column 'sp_vars_check_ret1()' at row 1
SELECT sp_vars_check_ret2();
-ERROR 22003: Out of range value adjusted for column 'sp_vars_check_ret2()' at row 1
+sp_vars_check_ret2()
+127
+Warnings:
+Warning 1264 Out of range value adjusted for column 'sp_vars_check_ret2()' at row 1
SELECT sp_vars_check_ret3();
-ERROR HY000: Incorrect integer value: 'Hello, world' for column 'sp_vars_check_ret3()' at
row 1
+sp_vars_check_ret3()
+0
+Warnings:
+Warning 1366 Incorrect integer value: 'Hello, world' for column 'sp_vars_check_ret3()' at
row 1
SELECT sp_vars_check_ret4();
sp_vars_check_ret4()
154.12
@@ -777,17 +841,36 @@ SET var := arg;
SELECT arg, var;
END|
CALL p1();
-ERROR 22003: Out of range value adjusted for column 'v' at row 1
+v
+127
+Warnings:
+Warning 1264 Out of range value adjusted for column 'v' at row 1
CALL p2();
-ERROR 22003: Out of range value adjusted for column 'v' at row 1
+v
+99999
+Warnings:
+Warning 1264 Out of range value adjusted for column 'v' at row 1
CALL p3();
-ERROR 22001: Data too long for column 'v' at row 1
+v LIKE 'abc___'
+0
+Warnings:
+Warning 1265 Data truncated for column 'v' at row 1
CALL p4('aaa');
-ERROR 22001: Data too long for column 'arg' at row 1
+arg var
+aa a
+Warnings:
+Warning 1265 Data truncated for column 'arg' at row 1
+Warning 1265 Data truncated for column 'var' at row 1
CALL p5('aa');
-ERROR 22001: Data too long for column 'var' at row 1
+arg var
+aa a
+Warnings:
+Warning 1265 Data truncated for column 'var' at row 1
CALL p6(10);
-ERROR 22003: Out of range value adjusted for column 'var' at row 1
+arg var
+10 9
+Warnings:
+Warning 1264 Out of range value adjusted for column 'var' at row 1
SET @@sql_mode = 'ansi';
DROP PROCEDURE p1;
DROP PROCEDURE p2;
@@ -836,14 +919,20 @@ Warnings:
Warning 1264 Out of range value adjusted for column 'arg' at row 1
SET @@sql_mode = 'traditional';
SELECT f1(-2500);
-ERROR 22003: Out of range value adjusted for column 'arg' at row 1
+f1(-2500)
+0
+Warnings:
+Warning 1264 Out of range value adjusted for column 'arg' at row 1
DROP FUNCTION f1;
CREATE FUNCTION f1(arg TINYINT UNSIGNED) RETURNS TINYINT
BEGIN
RETURN arg;
END|
SELECT f1(-2500);
-ERROR 22003: Out of range value adjusted for column 'arg' at row 1
+f1(-2500)
+0
+Warnings:
+Warning 1264 Out of range value adjusted for column 'arg' at row 1
SET @@sql_mode = 'ansi';
DROP FUNCTION f1;
@@ -863,14 +952,20 @@ Warnings:
Warning 1264 Out of range value adjusted for column 'arg' at row 1
SET @@sql_mode = 'traditional';
SELECT f1(8388699);
-ERROR 22003: Out of range value adjusted for column 'arg' at row 1
+f1(8388699)
+8388607
+Warnings:
+Warning 1264 Out of range value adjusted for column 'arg' at row 1
DROP FUNCTION f1;
CREATE FUNCTION f1(arg MEDIUMINT) RETURNS MEDIUMINT
BEGIN
RETURN arg;
END|
SELECT f1(8388699);
-ERROR 22003: Out of range value adjusted for column 'arg' at row 1
+f1(8388699)
+8388607
+Warnings:
+Warning 1264 Out of range value adjusted for column 'arg' at row 1
SET @@sql_mode = 'ansi';
DROP FUNCTION f1;
--- 1.3/mysql-test/t/sp-vars.test 2006-10-05 20:01:35 -07:00
+++ 1.4/mysql-test/t/sp-vars.test 2006-10-05 20:01:35 -07:00
@@ -90,19 +90,14 @@ DROP FUNCTION sp_vars_check_ret4;
--echo ---------------------------------------------------------------
--echo
---error ER_WARN_DATA_OUT_OF_RANGE
CALL sp_vars_check_dflt();
---error ER_WARN_DATA_OUT_OF_RANGE
CALL sp_vars_check_assignment();
---error ER_WARN_DATA_OUT_OF_RANGE
SELECT sp_vars_check_ret1();
---error ER_WARN_DATA_OUT_OF_RANGE
SELECT sp_vars_check_ret2();
---error ER_TRUNCATED_WRONG_VALUE_FOR_FIELD
SELECT sp_vars_check_ret3();
# TODO: Is it an error, that only a warning is emitted here? Check the same
@@ -649,18 +644,12 @@ END|
delimiter ;|
---error ER_WARN_DATA_OUT_OF_RANGE
CALL p1();
---error ER_WARN_DATA_OUT_OF_RANGE
CALL p2();
---error ER_DATA_TOO_LONG
CALL p3();
---error ER_DATA_TOO_LONG
CALL p4('aaa');
---error ER_DATA_TOO_LONG
CALL p5('aa');
---error ER_WARN_DATA_OUT_OF_RANGE
CALL p6(10);
#
@@ -765,8 +754,6 @@ SELECT f1(-2500);
SET @@sql_mode = 'traditional';
-# TODO: a warning should be emitted here.
---error ER_WARN_DATA_OUT_OF_RANGE
SELECT f1(-2500);
# Recreate the function in TRADITIONAL mode.
@@ -780,7 +767,6 @@ BEGIN
END|
delimiter ;|
---error ER_WARN_DATA_OUT_OF_RANGE
SELECT f1(-2500);
#
@@ -834,8 +820,6 @@ SELECT f1(8388699);
SET @@sql_mode = 'traditional';
-# TODO: a warning should be emitted here.
---error ER_WARN_DATA_OUT_OF_RANGE
SELECT f1(8388699);
# Recreate the function in TRADITIONAL mode.
@@ -849,7 +833,6 @@ BEGIN
END|
delimiter ;|
---error ER_WARN_DATA_OUT_OF_RANGE
SELECT f1(8388699);
#
--- 1.47/mysql-test/r/trigger.result 2006-10-05 20:01:35 -07:00
+++ 1.48/mysql-test/r/trigger.result 2006-10-05 20:01:35 -07:00
@@ -1185,4 +1185,52 @@ i j
2 2
13 13
drop table t1;
+drop table if exists t1;
+drop table if exists t2;
+create table t1 (i int);
+create table t2 (i int);
+SET @save_sql_mode=@@sql_mode;
+SET sql_mode='';
+create trigger t1_bd before delete on t1 for each row
+begin
+declare temp integer;
+select 1/0 into temp;
+select i into temp from t2 limit 1;
+end|
+create trigger t1_ad after delete on t1 for each row
+begin
+declare temp integer;
+select 1/0 into temp;
+select i into temp from t2 limit 1;
+end|
+insert into t1 values (1);
+delete from t1;
+Warnings:
+Warning 1329 No data - zero rows fetched, selected, or processed
+Warning 1329 No data - zero rows fetched, selected, or processed
+drop trigger t1_bd;
+drop trigger t1_ad;
+SET sql_mode='TRADITIONAL';
+create trigger t1_bd before delete on t1 for each row
+begin
+declare temp integer;
+select 1/0 into temp;
+select i into temp from t2 limit 1;
+end|
+create trigger t1_ad after delete on t1 for each row
+begin
+declare temp integer;
+select 1/0 into temp;
+select i into temp from t2 limit 1;
+end|
+insert into t1 values (2);
+delete from t1;
+Warnings:
+Error 1365 Division by 0
+Warning 1329 No data - zero rows fetched, selected, or processed
+Error 1365 Division by 0
+Warning 1329 No data - zero rows fetched, selected, or processed
+SET @@sql_mode=@save_sql_mode;
+drop table t1;
+drop table t2;
End of 5.0 tests
--- 1.53/mysql-test/t/trigger.test 2006-10-05 20:01:35 -07:00
+++ 1.54/mysql-test/t/trigger.test 2006-10-05 20:01:35 -07:00
@@ -1439,5 +1439,72 @@ update t1 set i= i+ 10 where j > 2;
select * from t1;
drop table t1;
+#
+# Bug#20028 Function with select return no data
+#
+
+--disable_warnings
+drop table if exists t1;
+drop table if exists t2;
+--enable_warnings
+
+create table t1 (i int);
+create table t2 (i int);
+
+SET @save_sql_mode=@@sql_mode;
+
+SET sql_mode='';
+
+delimiter |;
+
+create trigger t1_bd before delete on t1 for each row
+begin
+ declare temp integer;
+ select 1/0 into temp;
+ select i into temp from t2 limit 1;
+end|
+
+create trigger t1_ad after delete on t1 for each row
+begin
+ declare temp integer;
+ select 1/0 into temp;
+ select i into temp from t2 limit 1;
+end|
+
+delimiter ;|
+
+insert into t1 values (1);
+delete from t1;
+
+drop trigger t1_bd;
+drop trigger t1_ad;
+
+SET sql_mode='TRADITIONAL';
+
+delimiter |;
+
+create trigger t1_bd before delete on t1 for each row
+begin
+ declare temp integer;
+ select 1/0 into temp;
+ select i into temp from t2 limit 1;
+end|
+
+create trigger t1_ad after delete on t1 for each row
+begin
+ declare temp integer;
+ select 1/0 into temp;
+ select i into temp from t2 limit 1;
+end|
+
+delimiter ;|
+
+insert into t1 values (2);
+delete from t1;
+
+SET @@sql_mode=@save_sql_mode;
+
+drop table t1;
+drop table t2;
--echo End of 5.0 tests
--- 1.56/sql/sql_trigger.cc 2006-10-05 20:01:35 -07:00
+++ 1.57/sql/sql_trigger.cc 2006-10-05 20:01:35 -07:00
@@ -1491,6 +1491,7 @@ bool Table_triggers_list::process_trigge
if (sp_trigger)
{
Sub_statement_state statement_state;
+ int save_abort_on_warning;
if (old_row_is_record1)
{
@@ -1504,9 +1505,19 @@ bool Table_triggers_list::process_trigge
}
thd->reset_sub_statement_state(&statement_state, SUB_STMT_TRIGGER);
+ save_abort_on_warning= thd->abort_on_warning;
+
+ if ((event == TRG_EVENT_INSERT) || (event == TRG_EVENT_UPDATE))
+ {
+ thd->abort_on_warning= test(sp_trigger->m_sql_mode
+ & (MODE_STRICT_TRANS_TABLES | MODE_STRICT_ALL_TABLES));
+ }
+
err_status= sp_trigger->execute_trigger
(thd, table->s->db, table->s->table_name,
&subject_table_grants[event][time_type]);
+
+ thd->abort_on_warning= save_abort_on_warning;
thd->restore_sub_statement_state(&statement_state);
}
--- 1.213/mysql-test/r/sp.result 2006-10-05 20:01:35 -07:00
+++ 1.214/mysql-test/r/sp.result 2006-10-05 20:01:35 -07:00
@@ -5470,5 +5470,102 @@ CAD
CHF
DROP FUNCTION bug21493|
DROP TABLE t3,t4|
+drop function if exists func_20028_a|
+drop function if exists func_20028_b|
+drop procedure if exists proc_20028_a|
+drop procedure if exists proc_20028_b|
+drop table if exists table_20028|
+create table table_20028 (i int)|
+SET @save_sql_mode=@@sql_mode|
+SET sql_mode=''|
+create function func_20028_a() returns integer
+begin
+declare temp integer;
+select 1/0 into temp;
+select i into temp from table_20028 limit 1;
+return ifnull(temp, 0);
+end|
+create function func_20028_b() returns integer
+begin
+return func_20028_a();
+end|
+create procedure proc_20028_a()
+begin
+declare temp integer;
+select 1/0 into temp;
+select i into temp from table_20028 limit 1;
+end|
+create procedure proc_20028_b()
+begin
+call proc_20028_a();
+end|
+select func_20028_a()|
+func_20028_a()
+0
+Warnings:
+Warning 1329 No data - zero rows fetched, selected, or processed
+select func_20028_b()|
+func_20028_b()
+0
+Warnings:
+Warning 1329 No data - zero rows fetched, selected, or processed
+call proc_20028_a()|
+Warnings:
+Warning 1329 No data - zero rows fetched, selected, or processed
+call proc_20028_b()|
+Warnings:
+Warning 1329 No data - zero rows fetched, selected, or processed
+SET sql_mode='TRADITIONAL'|
+drop function func_20028_a|
+drop function func_20028_b|
+drop procedure proc_20028_a|
+drop procedure proc_20028_b|
+create function func_20028_a() returns integer
+begin
+declare temp integer;
+select 1/0 into temp;
+select i into temp from table_20028 limit 1;
+return ifnull(temp, 0);
+end|
+create function func_20028_b() returns integer
+begin
+return func_20028_a();
+end|
+create procedure proc_20028_a()
+begin
+declare temp integer;
+select 1/0 into temp;
+select i into temp from table_20028 limit 1;
+end|
+create procedure proc_20028_b()
+begin
+call proc_20028_a();
+end|
+select func_20028_a()|
+func_20028_a()
+0
+Warnings:
+Error 1365 Division by 0
+Warning 1329 No data - zero rows fetched, selected, or processed
+select func_20028_b()|
+func_20028_b()
+0
+Warnings:
+Error 1365 Division by 0
+Warning 1329 No data - zero rows fetched, selected, or processed
+call proc_20028_a()|
+Warnings:
+Error 1365 Division by 0
+Warning 1329 No data - zero rows fetched, selected, or processed
+call proc_20028_b()|
+Warnings:
+Error 1365 Division by 0
+Warning 1329 No data - zero rows fetched, selected, or processed
+SET @@sql_mode=@save_sql_mode|
+drop function func_20028_a|
+drop function func_20028_b|
+drop procedure proc_20028_a|
+drop procedure proc_20028_b|
+drop table table_20028|
End of 5.0 tests
drop table t1,t2;
--- 1.202/mysql-test/t/sp.test 2006-10-05 20:01:35 -07:00
+++ 1.203/mysql-test/t/sp.test 2006-10-05 20:01:35 -07:00
@@ -6420,6 +6420,99 @@ SELECT bug21493(Member_ID) FROM t3|
DROP FUNCTION bug21493|
DROP TABLE t3,t4|
+#
+# Bug#20028 Function with select return no data
+#
+
+--disable_warnings
+drop function if exists func_20028_a|
+drop function if exists func_20028_b|
+drop procedure if exists proc_20028_a|
+drop procedure if exists proc_20028_b|
+drop table if exists table_20028|
+--enable_warnings
+
+create table table_20028 (i int)|
+
+SET @save_sql_mode=@@sql_mode|
+
+SET sql_mode=''|
+
+create function func_20028_a() returns integer
+begin
+ declare temp integer;
+ select 1/0 into temp;
+ select i into temp from table_20028 limit 1;
+ return ifnull(temp, 0);
+end|
+
+create function func_20028_b() returns integer
+begin
+ return func_20028_a();
+end|
+
+create procedure proc_20028_a()
+begin
+ declare temp integer;
+ select 1/0 into temp;
+ select i into temp from table_20028 limit 1;
+end|
+
+create procedure proc_20028_b()
+begin
+ call proc_20028_a();
+end|
+
+select func_20028_a()|
+select func_20028_b()|
+call proc_20028_a()|
+call proc_20028_b()|
+
+SET sql_mode='TRADITIONAL'|
+
+drop function func_20028_a|
+drop function func_20028_b|
+drop procedure proc_20028_a|
+drop procedure proc_20028_b|
+
+create function func_20028_a() returns integer
+begin
+ declare temp integer;
+ select 1/0 into temp;
+ select i into temp from table_20028 limit 1;
+ return ifnull(temp, 0);
+end|
+
+create function func_20028_b() returns integer
+begin
+ return func_20028_a();
+end|
+
+create procedure proc_20028_a()
+begin
+ declare temp integer;
+ select 1/0 into temp;
+ select i into temp from table_20028 limit 1;
+end|
+
+create procedure proc_20028_b()
+begin
+ call proc_20028_a();
+end|
+
+select func_20028_a()|
+select func_20028_b()|
+call proc_20028_a()|
+call proc_20028_b()|
+
+SET @@sql_mode=@save_sql_mode|
+
+drop function func_20028_a|
+drop function func_20028_b|
+drop procedure proc_20028_a|
+drop procedure proc_20028_b|
+drop table table_20028|
+
--echo End of 5.0 tests
--- 1.224/sql/sp_head.cc 2006-10-05 20:01:35 -07:00
+++ 1.225/sql/sp_head.cc 2006-10-05 20:01:35 -07:00
@@ -336,13 +336,9 @@ sp_eval_expr(THD *thd, Field *result_fie
*/
enum_check_fields save_count_cuted_fields= thd->count_cuted_fields;
- bool save_abort_on_warning= thd->abort_on_warning;
bool save_no_trans_update= thd->no_trans_update;
thd->count_cuted_fields= CHECK_FIELD_ERROR_FOR_NULL;
- thd->abort_on_warning=
- thd->variables.sql_mode &
- (MODE_STRICT_TRANS_TABLES | MODE_STRICT_ALL_TABLES);
thd->no_trans_update= 0;
/* Save the value in the field. Convert the value if needed. */
@@ -350,7 +346,6 @@ sp_eval_expr(THD *thd, Field *result_fie
expr_item->save_in_field(result_field, 0);
thd->count_cuted_fields= save_count_cuted_fields;
- thd->abort_on_warning= save_abort_on_warning;
thd->no_trans_update= save_no_trans_update;
if (thd->net.report_error)
@@ -931,7 +926,6 @@ 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;
@@ -990,9 +984,6 @@ 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
@@ -1126,7 +1117,6 @@ 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;
| Thread |
|---|
| • bk commit into 5.0 tree (malff:1.2271) BUG#6951 | marc.alff | 6 Oct |