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
5201a1d0
Commit
5201a1d0
authored
Apr 02, 2019
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-18240 Assertion `0' failed in Item_cache_timestamp::val_datetime_packed
parent
1b4bb3b5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
2 deletions
+36
-2
mysql-test/main/type_timestamp.result
mysql-test/main/type_timestamp.result
+21
-0
mysql-test/main/type_timestamp.test
mysql-test/main/type_timestamp.test
+14
-0
sql/item.h
sql/item.h
+1
-2
No files found.
mysql-test/main/type_timestamp.result
View file @
5201a1d0
...
...
@@ -1218,5 +1218,26 @@ NULL
2018-10-14 15:31:02.00000
DROP TABLE t1;
#
# MDEV-18240 Assertion `0' failed in Item_cache_timestamp::val_datetime_packed
#
CREATE TABLE t1 (c1 timestamp);
SELECT MIN(t1.c1) AS k1 FROM t1 HAVING (k1 >= ALL(SELECT 'a' UNION SELECT 'r'));
k1
Warnings:
Warning 1292 Truncated incorrect datetime value: 'r'
SELECT * FROM t1 HAVING MIN(t1.c1) >= ALL(SELECT 'a' UNION SELECT 'r');
c1
Warnings:
Warning 1292 Truncated incorrect datetime value: 'r'
DROP TABLE t1;
CREATE TABLE t1 (c1 timestamp);
INSERT INTO t1 VALUES ('2010-01-01 00:00:00');
SELECT * FROM t1 HAVING MIN(t1.c1) >= ALL(SELECT '2010-01-01 10:00:00' UNION SELECT '2001-01-01 10:00:01');
c1
SELECT * FROM t1 HAVING MIN(t1.c1) >= ALL(SELECT '2000-01-01 10:00:00' UNION SELECT '2000-01-01 10:00:01');
c1
2010-01-01 00:00:00
DROP TABLE t1;
#
# End of 10.4 tests
#
mysql-test/main/type_timestamp.test
View file @
5201a1d0
...
...
@@ -800,6 +800,20 @@ SELECT LEAD(d1,1) OVER(ORDER BY d1) FROM t1;
SELECT
LAG
(
d1
,
1
)
OVER
(
ORDER
BY
d1
)
FROM
t1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# MDEV-18240 Assertion `0' failed in Item_cache_timestamp::val_datetime_packed
--
echo
#
CREATE
TABLE
t1
(
c1
timestamp
);
SELECT
MIN
(
t1
.
c1
)
AS
k1
FROM
t1
HAVING
(
k1
>=
ALL
(
SELECT
'a'
UNION
SELECT
'r'
));
SELECT
*
FROM
t1
HAVING
MIN
(
t1
.
c1
)
>=
ALL
(
SELECT
'a'
UNION
SELECT
'r'
);
DROP
TABLE
t1
;
CREATE
TABLE
t1
(
c1
timestamp
);
INSERT
INTO
t1
VALUES
(
'2010-01-01 00:00:00'
);
SELECT
*
FROM
t1
HAVING
MIN
(
t1
.
c1
)
>=
ALL
(
SELECT
'2010-01-01 10:00:00'
UNION
SELECT
'2001-01-01 10:00:01'
);
SELECT
*
FROM
t1
HAVING
MIN
(
t1
.
c1
)
>=
ALL
(
SELECT
'2000-01-01 10:00:00'
UNION
SELECT
'2000-01-01 10:00:01'
);
DROP
TABLE
t1
;
--
echo
#
--
echo
# End of 10.4 tests
...
...
sql/item.h
View file @
5201a1d0
...
...
@@ -6766,8 +6766,7 @@ class Item_cache_timestamp: public Item_cache
}
longlong
val_datetime_packed
(
THD
*
thd
)
{
DBUG_ASSERT
(
0
);
return
0
;
return
to_datetime
(
current_thd
).
to_packed
();
}
longlong
val_time_packed
(
THD
*
thd
)
{
...
...
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