Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
36b9af2d
Commit
36b9af2d
authored
Jul 22, 2005
by
georg@lmy002.wdf.sap.corp
Browse files
Options
Browse Files
Download
Plain Diff
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
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
2 deletions
+53
-2
mysql-test/r/sp.result
mysql-test/r/sp.result
+24
-0
mysql-test/t/sp.test
mysql-test/t/sp.test
+28
-0
sql/protocol_cursor.cc
sql/protocol_cursor.cc
+1
-2
No files found.
mysql-test/r/sp.result
View file @
36b9af2d
...
...
@@ -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;
mysql-test/t/sp.test
View file @
36b9af2d
...
...
@@ -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
#
...
...
sql/protocol_cursor.cc
View file @
36b9af2d
...
...
@@ -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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment