Below is the list of changes that have just been committed into a local
5.0 repository of georg. When georg 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.1885 05/07/22 08:11:23 georg@stripped +3 -0
fix for bug#8692
sql/protocol_cursor.cc
1.16 05/07/22 08:11:17 georg@stripped +1 -2
fixed detecting of null fields: A field contains a null value only
if length is NULL_LENGTH
mysql-test/t/sp.test
1.134 05/07/22 08:11:17 georg@stripped +28 -0
added testcase for bug #8692
mysql-test/r/sp.result
1.139 05/07/22 08:11:17 georg@stripped +24 -0
added expected result for bug #8692
# 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: georg
# Host: lmy002.wdf.sap.corp
# Root: /home/georg/work/mysql/prod/mysql-5.0
--- 1.15/sql/protocol_cursor.cc 2005-06-06 20:21:26 +02:00
+++ 1.16/sql/protocol_cursor.cc 2005-07-22 08:11:17 +02:00
@@ -114,8 +114,7 @@
for (; cur_field < fields_end; cur_field++, data_tmp++)
{
- if ((len= net_field_length((uchar **)&cp)) == 0 ||
- len == NULL_LENGTH)
+ if ((len= net_field_length((uchar **)&cp)) == NULL_LENGTH)
{
*data_tmp= 0;
}
--- 1.138/mysql-test/r/sp.result 2005-07-16 14:10:35 +02:00
+++ 1.139/mysql-test/r/sp.result 2005-07-22 08:11:17 +02:00
@@ -3099,4 +3099,28 @@
1000000
set @@sort_buffer_size = @x|
drop procedure bug9538|
+drop procedure if exists bug8692|
+create table t3 (c1 varchar(5), c2 char(5), c3 enum('one','two'), c4 text, c5 blob, c6 char(5), c7 varchar(5))|
+insert into t3 values ('', '', '', '', '', '', NULL)|
+Warnings:
+Warning 1265 Data truncated for column 'c3' at row 1
+create procedure bug8692()
+begin
+declare v1 VARCHAR(10);
+declare v2 VARCHAR(10);
+declare v3 VARCHAR(10);
+declare v4 VARCHAR(10);
+declare v5 VARCHAR(10);
+declare v6 VARCHAR(10);
+declare v7 VARCHAR(10);
+declare c8692 cursor for select c1,c2,c3,c4,c5,c6,c7 from t3;
+open c8692;
+fetch c8692 into v1,v2,v3,v4,v5,v6,v7;
+select v1, v2, v3, v4, v5, v6, v7;
+end|
+call bug8692()|
+v1 v2 v3 v4 v5 v6 v7
+ NULL
+drop procedure bug8692|
+drop table t3|
drop table t1,t2;
--- 1.133/mysql-test/t/sp.test 2005-07-16 14:10:35 +02:00
+++ 1.134/mysql-test/t/sp.test 2005-07-22 08:11:17 +02:00
@@ -3877,6 +3877,34 @@
#
+# BUG#8692: Cursor fetch of empty string
+#
+--disable_warnings
+drop procedure if exists bug8692|
+--enable_warnings
+create table t3 (c1 varchar(5), c2 char(5), c3 enum('one','two'), c4 text, c5 blob, c6 char(5), c7 varchar(5))|
+insert into t3 values ('', '', '', '', '', '', NULL)|
+
+create procedure bug8692()
+begin
+ declare v1 VARCHAR(10);
+ declare v2 VARCHAR(10);
+ declare v3 VARCHAR(10);
+ declare v4 VARCHAR(10);
+ declare v5 VARCHAR(10);
+ declare v6 VARCHAR(10);
+ declare v7 VARCHAR(10);
+ declare c8692 cursor for select c1,c2,c3,c4,c5,c6,c7 from t3;
+ open c8692;
+ fetch c8692 into v1,v2,v3,v4,v5,v6,v7;
+ select v1, v2, v3, v4, v5, v6, v7;
+end|
+
+call bug8692()|
+drop procedure bug8692|
+drop table t3|
+
+#
# BUG#NNNN: New bug synopsis
#
#--disable_warnings
| Thread |
|---|
| • bk commit into 5.0 tree (georg:1.1885) BUG#8692 | Georg Richter | 22 Jul |