Below is the list of changes that have just been committed into a local
5.0 repository of pem. When pem 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
1.1873 05/04/22 12:53:48 pem@stripped +4 -0
Fixed BUG#9004: Inconsistent behaviour of SP re. warnings
sql/sql_parse.cc
1.442 05/04/22 12:53:42 pem@stripped +4 -2
Don't reset warnings while executing a stored routine.
sql/sql_error.cc
1.32 05/04/22 12:53:42 pem@stripped +1 -1
Don't reset warnings while executing a stored routine.
mysql-test/t/sp.test
1.114 05/04/22 12:53:42 pem@stripped +24 -0
New test case for BUG#9004.
mysql-test/r/sp.result
1.119 05/04/22 12:53:42 pem@stripped +31 -0
New test case for BUG#9004.
Also updated some other results, since formerly "invisible" (but correct)
warnings now are visible.
# 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: pem
# Host: mysql.comhem.se
# Root: /home/pem/work/mysql-5.0
--- 1.441/sql/sql_parse.cc Thu Apr 14 11:56:08 2005
+++ 1.442/sql/sql_parse.cc Fri Apr 22 12:53:42 2005
@@ -2268,9 +2268,11 @@
A better approach would be to reset this for any commands
that is not a SHOW command or a select that only access local
variables, but for now this is probably good enough.
+ Don't reset warnings when executing a stored routine.
*/
- if (all_tables || &lex->select_lex != lex->all_selects_list ||
- lex->spfuns.records || lex->spprocs.records)
+ if ((all_tables || &lex->select_lex != lex->all_selects_list ||
+ lex->spfuns.records || lex->spprocs.records) &&
+ !thd->spcont)
mysql_reset_errors(thd, 0);
#ifdef HAVE_REPLICATION
--- 1.118/mysql-test/r/sp.result Thu Apr 21 14:34:27 2005
+++ 1.119/mysql-test/r/sp.result Fri Apr 22 12:53:42 2005
@@ -667,6 +667,8 @@
drop table if exists t3|
create table t3 ( s char(16), d int)|
call into_test4()|
+Warnings:
+Warning 1329 No data to FETCH
select * from t3|
s d
into4 NULL
@@ -1792,7 +1794,12 @@
insert into t4 values (2, rc, t3);
end|
call bug1863(10)|
+Warnings:
+Note 1051 Unknown table 'temp_t1'
+Warning 1329 No data to FETCH
call bug1863(10)|
+Warnings:
+Warning 1329 No data to FETCH
select * from t4|
f1 rc t3
2 0 NULL
@@ -2090,7 +2097,11 @@
end|
call bug4579_1()|
call bug4579_1()|
+Warnings:
+Warning 1329 No data to FETCH
call bug4579_1()|
+Warnings:
+Warning 1329 No data to FETCH
drop procedure bug4579_1|
drop procedure bug4579_2|
drop table t3|
@@ -3010,4 +3021,24 @@
@x
2005
drop function bug8861|
+drop procedure if exists bug9004_1|
+drop procedure if exists bug9004_2|
+create procedure bug9004_1(x char(16))
+begin
+insert into t1 values (x, 42);
+insert into t1 values (x, 17);
+end|
+create procedure bug9004_2(x char(16))
+call bug9004_1(x)|
+call bug9004_1('12345678901234567')|
+Warnings:
+Warning 1265 Data truncated for column 'id' at row 1
+Warning 1265 Data truncated for column 'id' at row 2
+call bug9004_2('12345678901234567890')|
+Warnings:
+Warning 1265 Data truncated for column 'id' at row 1
+Warning 1265 Data truncated for column 'id' at row 2
+delete from t1|
+drop procedure bug9004_1|
+drop procedure bug9004_2|
drop table t1,t2;
--- 1.113/mysql-test/t/sp.test Thu Apr 21 14:34:27 2005
+++ 1.114/mysql-test/t/sp.test Fri Apr 22 12:53:42 2005
@@ -3701,6 +3701,30 @@
#
+# BUG#9004: Inconsistent behaviour of SP re. warnings
+#
+--disable_warnings
+drop procedure if exists bug9004_1|
+drop procedure if exists bug9004_2|
+--enable_warnings
+create procedure bug9004_1(x char(16))
+begin
+ insert into t1 values (x, 42);
+ insert into t1 values (x, 17);
+end|
+create procedure bug9004_2(x char(16))
+ call bug9004_1(x)|
+
+# Truncation warnings expected...
+call bug9004_1('12345678901234567')|
+call bug9004_2('12345678901234567890')|
+
+delete from t1|
+drop procedure bug9004_1|
+drop procedure bug9004_2|
+
+
+#
# BUG#NNNN: New bug synopsis
#
#--disable_warnings
--- 1.31/sql/sql_error.cc Tue Apr 5 00:19:44 2005
+++ 1.32/sql/sql_error.cc Fri Apr 22 12:53:42 2005
@@ -113,7 +113,7 @@
!(thd->options & OPTION_SQL_NOTES))
DBUG_RETURN(0);
- if (thd->query_id != thd->warn_id)
+ if (thd->query_id != thd->warn_id && !thd->spcont)
mysql_reset_errors(thd, 0);
thd->got_warning= 1;
| Thread |
|---|
| • bk commit into 5.0 tree (pem:1.1873) BUG#9004 | pem | 22 Apr |