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
8cca70e0
Commit
8cca70e0
authored
Mar 28, 2011
by
Sergey Glukhov
Browse files
Options
Browse Files
Download
Plain Diff
5.1 -> 5.5 merge
parents
b9b40a0c
47885f55
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
1 deletion
+31
-1
mysql-test/r/func_time.result
mysql-test/r/func_time.result
+12
-0
mysql-test/t/func_time.test
mysql-test/t/func_time.test
+14
-0
sql/item_func.cc
sql/item_func.cc
+4
-1
sql/item_timefunc.cc
sql/item_timefunc.cc
+1
-0
No files found.
mysql-test/r/func_time.result
View file @
8cca70e0
...
...
@@ -1353,6 +1353,18 @@ DROP TABLE t1;
SELECT STR_TO_DATE(SPACE(2),'1');
STR_TO_DATE(SPACE(2),'1')
0000-00-00
#
# Bug#11765216 58154: UNINITIALIZED VARIABLE FORMAT IN STR_TO_DATE FUNCTION
#
SET GLOBAL SQL_MODE='';
DO STR_TO_DATE((''), FROM_DAYS(@@GLOBAL.SQL_MODE));
SET GLOBAL SQL_MODE=DEFAULT;
#
# Bug#11766087 59125: VALGRIND UNINITIALISED VALUE WARNING IN ULL2DEC, LONGLONG2DECIMAL
#
SELECT FORMAT(YEAR(STR_TO_DATE('',GET_FORMAT(TIME,''))),1);
FORMAT(YEAR(STR_TO_DATE('',GET_FORMAT(TIME,''))),1)
NULL
End of 5.1 tests
#
# Bug#57039: constant subtime expression returns incorrect result.
...
...
mysql-test/t/func_time.test
View file @
8cca70e0
...
...
@@ -868,6 +868,20 @@ DROP TABLE t1;
SELECT
STR_TO_DATE
(
SPACE
(
2
),
'1'
);
--
echo
#
--
echo
# Bug#11765216 58154: UNINITIALIZED VARIABLE FORMAT IN STR_TO_DATE FUNCTION
--
echo
#
SET
GLOBAL
SQL_MODE
=
''
;
DO
STR_TO_DATE
((
''
),
FROM_DAYS
(
@@
GLOBAL
.
SQL_MODE
));
SET
GLOBAL
SQL_MODE
=
DEFAULT
;
--
echo
#
--
echo
# Bug#11766087 59125: VALGRIND UNINITIALISED VALUE WARNING IN ULL2DEC, LONGLONG2DECIMAL
--
echo
#
SELECT
FORMAT
(
YEAR
(
STR_TO_DATE
(
''
,
GET_FORMAT
(
TIME
,
''
))),
1
);
--
echo
End
of
5.1
tests
--
echo
#
...
...
sql/item_func.cc
View file @
8cca70e0
...
...
@@ -505,7 +505,10 @@ bool Item_func::is_expensive_processor(uchar *arg)
my_decimal
*
Item_func
::
val_decimal
(
my_decimal
*
decimal_value
)
{
DBUG_ASSERT
(
fixed
);
int2my_decimal
(
E_DEC_FATAL_ERROR
,
val_int
(),
unsigned_flag
,
decimal_value
);
longlong
nr
=
val_int
();
if
(
null_value
)
return
0
;
/* purecov: inspected */
int2my_decimal
(
E_DEC_FATAL_ERROR
,
nr
,
unsigned_flag
,
decimal_value
);
return
decimal_value
;
}
...
...
sql/item_timefunc.cc
View file @
8cca70e0
...
...
@@ -3405,6 +3405,7 @@ void Item_func_str_to_date::fix_length_and_dec()
{
maybe_null
=
1
;
decimals
=
0
;
cached_format_type
=
DATE_TIME
;
cached_field_type
=
MYSQL_TYPE_DATETIME
;
max_length
=
MAX_DATETIME_FULL_WIDTH
*
MY_CHARSET_BIN_MB_MAXLEN
;
cached_timestamp_type
=
MYSQL_TIMESTAMP_NONE
;
...
...
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