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
ce5b12db
Commit
ce5b12db
authored
Aug 15, 2010
by
Gleb Shchepa
Browse files
Options
Browse Files
Download
Plain Diff
automerge 5.1-security --> 5.5-security (bug 55424)
parents
bfca4bb9
ed736379
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
2 deletions
+23
-2
mysql-test/r/timezone2.result
mysql-test/r/timezone2.result
+12
-0
mysql-test/t/timezone2.test
mysql-test/t/timezone2.test
+9
-0
sql/sql_string.h
sql/sql_string.h
+1
-1
sql/tztime.cc
sql/tztime.cc
+1
-1
No files found.
mysql-test/r/timezone2.result
View file @
ce5b12db
...
...
@@ -296,4 +296,16 @@ CONVERT_TZ(NOW(), 'UTC', 'Europe/Moscow') IS NULL
UPDATE t1 SET t = CONVERT_TZ(t, 'UTC', 'Europe/Moscow');
UNLOCK TABLES;
DROP TABLE t1;
#
# Bug #55424: convert_tz crashes when fed invalid data
#
CREATE TABLE t1 (a SET('x') NOT NULL);
INSERT INTO t1 VALUES ('');
SELECT CONVERT_TZ(1, a, 1) FROM t1;
CONVERT_TZ(1, a, 1)
NULL
SELECT CONVERT_TZ(1, 1, a) FROM t1;
CONVERT_TZ(1, 1, a)
NULL
DROP TABLE t1;
End of 5.1 tests
mysql-test/t/timezone2.test
View file @
ce5b12db
...
...
@@ -273,5 +273,14 @@ UNLOCK TABLES;
DROP
TABLE
t1
;
--
echo
#
--
echo
# Bug #55424: convert_tz crashes when fed invalid data
--
echo
#
CREATE
TABLE
t1
(
a
SET
(
'x'
)
NOT
NULL
);
INSERT
INTO
t1
VALUES
(
''
);
SELECT
CONVERT_TZ
(
1
,
a
,
1
)
FROM
t1
;
SELECT
CONVERT_TZ
(
1
,
1
,
a
)
FROM
t1
;
DROP
TABLE
t1
;
--
echo
End
of
5.1
tests
sql/sql_string.h
View file @
ce5b12db
...
...
@@ -104,7 +104,7 @@ class String
inline
uint32
alloced_length
()
const
{
return
Alloced_length
;}
inline
char
&
operator
[]
(
uint32
i
)
const
{
return
Ptr
[
i
];
}
inline
void
length
(
uint32
len
)
{
str_length
=
len
;
}
inline
bool
is_empty
()
{
return
(
str_length
==
0
);
}
inline
bool
is_empty
()
const
{
return
(
str_length
==
0
);
}
inline
void
mark_as_const
()
{
Alloced_length
=
0
;}
inline
const
char
*
ptr
()
const
{
return
Ptr
;
}
inline
char
*
c_ptr
()
...
...
sql/tztime.cc
View file @
ce5b12db
...
...
@@ -2300,7 +2300,7 @@ my_tz_find(THD *thd, const String *name)
DBUG_PRINT
(
"enter"
,
(
"time zone name='%s'"
,
name
?
((
String
*
)
name
)
->
c_ptr_safe
()
:
"NULL"
));
if
(
!
name
)
if
(
!
name
||
name
->
is_empty
()
)
DBUG_RETURN
(
0
);
mysql_mutex_lock
(
&
tz_LOCK
);
...
...
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