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
68354ef2
Commit
68354ef2
authored
Oct 03, 2014
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-6592 Assertion `ltime->day == 0' failed with TIMESTAMP, MAKETIME
parent
b737d902
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
9 deletions
+25
-9
mysql-test/r/type_time.result
mysql-test/r/type_time.result
+11
-0
mysql-test/t/type_time.test
mysql-test/t/type_time.test
+11
-0
sql/item.cc
sql/item.cc
+3
-9
No files found.
mysql-test/r/type_time.result
View file @
68354ef2
...
...
@@ -352,3 +352,14 @@ SELECT '-24:00:00' = (SELECT f1 FROM t1);
'-24:00:00' = (SELECT f1 FROM t1)
1
DROP TABLE t1;
#
# MDEV-6592 Assertion `ltime->day == 0' failed with TIMESTAMP, MAKETIME
#
CREATE TABLE t1 (d DATE, c VARCHAR(10), KEY(d)) engine=myisam;
INSERT INTO t1 VALUES ('2008-10-02','2008-10-02'), ('2008-10-02','2008-10-02');
SELECT * FROM t1 WHERE TIMESTAMP(c,'02:04:42') AND d <=> MAKETIME(97,0,7);
d c
DROP TABLE t1;
#
# End of 5.5 tests
#
mysql-test/t/type_time.test
View file @
68354ef2
...
...
@@ -239,3 +239,14 @@ SELECT CAST('-24:00:00' AS TIME) = (SELECT f1 FROM t1);
SELECT
'-24:00:00'
=
(
SELECT
f1
FROM
t1
);
DROP
TABLE
t1
;
--
echo
#
--
echo
# MDEV-6592 Assertion `ltime->day == 0' failed with TIMESTAMP, MAKETIME
--
echo
#
CREATE
TABLE
t1
(
d
DATE
,
c
VARCHAR
(
10
),
KEY
(
d
))
engine
=
myisam
;
INSERT
INTO
t1
VALUES
(
'2008-10-02'
,
'2008-10-02'
),
(
'2008-10-02'
,
'2008-10-02'
);
SELECT
*
FROM
t1
WHERE
TIMESTAMP
(
c
,
'02:04:42'
)
AND
d
<=>
MAKETIME
(
97
,
0
,
7
);
DROP
TABLE
t1
;
--
echo
#
--
echo
# End of 5.5 tests
--
echo
#
sql/item.cc
View file @
68354ef2
...
...
@@ -9015,17 +9015,11 @@ bool Item_cache_temporal::get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
int
Item_cache_temporal
::
save_in_field
(
Field
*
field
,
bool
no_conversions
)
{
int
error
;
if
(
!
has_value
(
))
MYSQL_TIME
ltime
;
if
(
get_date
(
&
ltime
,
0
))
return
set_field_to_null_with_conversions
(
field
,
no_conversions
);
field
->
set_notnull
();
MYSQL_TIME
ltime
;
unpack_time
(
value
,
&
ltime
);
ltime
.
time_type
=
mysql_type_to_time_type
(
field_type
());
error
=
field
->
store_time_dec
(
&
ltime
,
decimals
);
int
error
=
field
->
store_time_dec
(
&
ltime
,
decimals
);
return
error
?
error
:
field
->
table
->
in_use
->
is_error
()
?
1
:
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