Commit 36b9af2d authored by georg@lmy002.wdf.sap.corp's avatar georg@lmy002.wdf.sap.corp

Merge grichter@bk-internal.mysql.com:/home/bk/mysql-5.0

into lmy002.wdf.sap.corp:/home/georg/work/mysql/prod/mysql-5.0
parents 21edad59 59ddf613
......@@ -3099,4 +3099,28 @@ select @@sort_buffer_size|
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;
......@@ -3876,6 +3876,34 @@ set @@sort_buffer_size = @x|
drop procedure bug9538|
#
# 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
#
......
......@@ -114,8 +114,7 @@ bool Protocol_cursor::write()
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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment