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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
50254237
Commit
50254237
authored
Sep 19, 2003
by
ram@gw.mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for the bug #1333: COMPRESS(NULL) segfaults.
parent
7facccf3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
0 deletions
+23
-0
BitKeeper/etc/logging_ok
BitKeeper/etc/logging_ok
+1
-0
mysql-test/r/func_compress.result
mysql-test/r/func_compress.result
+6
-0
mysql-test/t/func_compress.test
mysql-test/t/func_compress.test
+6
-0
sql/item_strfunc.cc
sql/item_strfunc.cc
+10
-0
No files found.
BitKeeper/etc/logging_ok
View file @
50254237
...
...
@@ -97,6 +97,7 @@ peter@linux.local
peter@mysql.com
peterg@mysql.com
pgulutzan@linux.local
ram@gw.mysql.r18.ru
ram@gw.udmsearch.izhnet.ru
ram@mysql.r18.ru
ram@ram.(none)
...
...
mysql-test/r/func_compress.result
View file @
50254237
...
...
@@ -40,3 +40,9 @@ uncompress(compress(""))
select uncompressed_length("");
uncompressed_length("")
0
select compress(NULL);
compress(NULL)
NULL
select uncompress(NULL);
uncompress(NULL)
NULL
mysql-test/t/func_compress.test
View file @
50254237
...
...
@@ -23,3 +23,9 @@ select uncompress("");
select
uncompress
(
compress
(
""
));
select
uncompressed_length
(
""
);
#
# NULL (Bug #1333)
#
select
compress
(
NULL
);
select
uncompress
(
NULL
);
sql/item_strfunc.cc
View file @
50254237
...
...
@@ -2539,6 +2539,11 @@ longlong Item_func_crc32::val_int()
String
*
Item_func_compress
::
val_str
(
String
*
str
)
{
String
*
res
=
args
[
0
]
->
val_str
(
str
);
if
(
!
res
)
{
null_value
=
1
;
return
0
;
}
if
(
res
->
is_empty
())
return
res
;
int
err
=
Z_OK
;
...
...
@@ -2589,6 +2594,11 @@ String *Item_func_compress::val_str(String *str)
String
*
Item_func_uncompress
::
val_str
(
String
*
str
)
{
String
*
res
=
args
[
0
]
->
val_str
(
str
);
if
(
!
res
)
{
null_value
=
1
;
return
0
;
}
if
(
res
->
is_empty
())
return
res
;
ulong
new_size
=
uint4korr
(
res
->
c_ptr
())
&
0x3FFFFFFF
;
...
...
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