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
d8a9b524
Commit
d8a9b524
authored
Nov 02, 2017
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-14221 Assertion `0' failed in Item::field_type_for_temporal_comparison
parent
892cf2de
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
0 deletions
+31
-0
mysql-test/r/type_date.result
mysql-test/r/type_date.result
+11
-0
mysql-test/t/type_date.test
mysql-test/t/type_date.test
+9
-0
sql/item.h
sql/item.h
+11
-0
No files found.
mysql-test/r/type_date.result
View file @
d8a9b524
...
...
@@ -843,5 +843,16 @@ Warning 1292 Incorrect datetime value: '1'
Warning 1292 Incorrect datetime value: '1'
DROP TABLE t1;
#
# MDEV-14221 Assertion `0' failed in Item::field_type_for_temporal_comparison
#
CREATE TABLE t1 (d DATE);
INSERT INTO t1 VALUES ('1985-05-13'),('1989-12-24');
SELECT d, COUNT(*) FROM t1 GROUP BY d WITH ROLLUP HAVING CASE d WHEN '2017-05-25' THEN 0 ELSE 1 END;
d COUNT(*)
1985-05-13 1
1989-12-24 1
NULL 2
DROP TABLE t1;
#
# End of 10.1 tests
#
mysql-test/t/type_date.test
View file @
d8a9b524
...
...
@@ -576,6 +576,15 @@ SELECT DATE(a), DATE(b), DATE(c) FROM t1;
SELECT
DATE
(
COALESCE
(
a
)),
DATE
(
COALESCE
(
b
)),
DATE
(
COALESCE
(
c
))
FROM
t1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# MDEV-14221 Assertion `0' failed in Item::field_type_for_temporal_comparison
--
echo
#
CREATE
TABLE
t1
(
d
DATE
);
INSERT
INTO
t1
VALUES
(
'1985-05-13'
),(
'1989-12-24'
);
SELECT
d
,
COUNT
(
*
)
FROM
t1
GROUP
BY
d
WITH
ROLLUP
HAVING
CASE
d
WHEN
'2017-05-25'
THEN
0
ELSE
1
END
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# End of 10.1 tests
...
...
sql/item.h
View file @
d8a9b524
...
...
@@ -2581,6 +2581,17 @@ class Item_null_result :public Item_null
Field
*
result_field
;
Item_null_result
(
THD
*
thd
)
:
Item_null
(
thd
),
result_field
(
0
)
{}
bool
is_result_field
()
{
return
result_field
!=
0
;
}
#if MARIADB_VERSION_ID < 100300
enum_field_types
field_type
()
const
{
return
result_field
->
type
();
}
#else
const
Type_handler
*
type_handler
()
const
{
return
result_field
->
type_handler
();
}
#endif
void
save_in_result_field
(
bool
no_conversions
)
{
save_in_field
(
result_field
,
no_conversions
);
...
...
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