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
0bb924e1
Commit
0bb924e1
authored
Apr 17, 2019
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-17830 Server crashes in Item_null_result::field_type upon SELECT with CHARSET(date) and ROLLUP
parent
409dddf6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
0 deletions
+39
-0
mysql-test/r/olap.result
mysql-test/r/olap.result
+14
-0
mysql-test/t/olap.test
mysql-test/t/olap.test
+15
-0
sql/item.h
sql/item.h
+10
-0
No files found.
mysql-test/r/olap.result
View file @
0bb924e1
...
...
@@ -786,5 +786,19 @@ t COUNT(*)
12:12:13 1
DROP TABLE t1;
#
# MDEV-17830 Server crashes in Item_null_result::field_type upon SELECT with CHARSET(date) and ROLLUP
#
# Note, returning "latin1" in the first row vs "binary" in the second row is wrong here.
# Both lines should return equal values.
# The point in this test is to make sure it does not crash.
# Bad result will be fixed in a later version.
CREATE TABLE t (d DATE) ENGINE=MyISAM;
INSERT INTO t VALUES ('2018-12-12');
SELECT CHARSET(d) AS f FROM t GROUP BY d WITH ROLLUP;
f
latin1
binary
DROP TABLE t;
#
# End of 10.1 tests
#
mysql-test/t/olap.test
View file @
0bb924e1
...
...
@@ -424,6 +424,21 @@ SELECT t, COUNT(*) FROM t1 GROUP BY t WITH ROLLUP HAVING t > '00:00:00';
DROP
TABLE
t1
;
--
echo
#
--
echo
# MDEV-17830 Server crashes in Item_null_result::field_type upon SELECT with CHARSET(date) and ROLLUP
--
echo
#
--
echo
# Note, returning "latin1" in the first row vs "binary" in the second row is wrong here.
--
echo
# Both lines should return equal values.
--
echo
# The point in this test is to make sure it does not crash.
--
echo
# Bad result will be fixed in a later version.
CREATE
TABLE
t
(
d
DATE
)
ENGINE
=
MyISAM
;
INSERT
INTO
t
VALUES
(
'2018-12-12'
);
SELECT
CHARSET
(
d
)
AS
f
FROM
t
GROUP
BY
d
WITH
ROLLUP
;
DROP
TABLE
t
;
--
echo
#
--
echo
# End of 10.1 tests
--
echo
#
sql/item.h
View file @
0bb924e1
...
...
@@ -2618,6 +2618,10 @@ class Item_null_result :public Item_null
{
return
result_field
->
type
();
}
CHARSET_INFO
*
charset_for_protocol
(
void
)
const
{
return
collation
.
collation
;
}
#else
const
Type_handler
*
type_handler
()
const
{
...
...
@@ -3942,6 +3946,12 @@ class Item_ref :public Item_ident
void
save_org_in_field
(
Field
*
field
,
fast_field_copier
optimizer_data
);
fast_field_copier
setup_fast_field_copier
(
Field
*
field
)
{
return
(
*
ref
)
->
setup_fast_field_copier
(
field
);
}
#if MARIADB_VERSION_ID < 100300
CHARSET_INFO
*
charset_for_protocol
(
void
)
const
{
return
(
*
ref
)
->
charset_for_protocol
();
}
#endif
enum
Item_result
result_type
()
const
{
return
(
*
ref
)
->
result_type
();
}
enum_field_types
field_type
()
const
{
return
(
*
ref
)
->
field_type
();
}
Field
*
get_tmp_table_field
()
...
...
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