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
d97a26a6
Commit
d97a26a6
authored
Jan 14, 2019
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-18145 Assertion `0' failed in Item::val_native upon SELECT subquery with timestamp
parent
ac9b818c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
2 deletions
+25
-2
mysql-test/main/type_timestamp.result
mysql-test/main/type_timestamp.result
+12
-0
mysql-test/main/type_timestamp.test
mysql-test/main/type_timestamp.test
+11
-0
sql/item_subselect.cc
sql/item_subselect.cc
+2
-2
No files found.
mysql-test/main/type_timestamp.result
View file @
d97a26a6
...
@@ -1152,5 +1152,17 @@ f
...
@@ -1152,5 +1152,17 @@ f
NULL
NULL
DROP TABLE t1;
DROP TABLE t1;
#
#
# MDEV-18145 Assertion `0' failed in Item::val_native upon SELECT subquery with timestamp
#
CREATE TABLE t1 (a INT) ENGINE=MyISAM;
CREATE TABLE t2 (pk INT PRIMARY KEY) ENGINE=MyISAM;
INSERT INTO t2 VALUES (1),(2);
CREATE TABLE t3 (pk INT PRIMARY KEY, b TIMESTAMP) ENGINE=MyISAM;
SELECT ( SELECT b FROM t1 LIMIT 1 ) AS sq FROM t2 LEFT JOIN t3 USING (pk);
sq
NULL
NULL
DROP TABLE t1, t2, t3;
#
# End of 10.4 tests
# End of 10.4 tests
#
#
mysql-test/main/type_timestamp.test
View file @
d97a26a6
...
@@ -749,6 +749,17 @@ INSERT INTO t1 () VALUES (),();
...
@@ -749,6 +749,17 @@ INSERT INTO t1 () VALUES (),();
SELECT
IF
(
0
,
t
,
NULL
)
AS
f
FROM
t1
GROUP
BY
'foo'
;
SELECT
IF
(
0
,
t
,
NULL
)
AS
f
FROM
t1
GROUP
BY
'foo'
;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# MDEV-18145 Assertion `0' failed in Item::val_native upon SELECT subquery with timestamp
--
echo
#
CREATE
TABLE
t1
(
a
INT
)
ENGINE
=
MyISAM
;
CREATE
TABLE
t2
(
pk
INT
PRIMARY
KEY
)
ENGINE
=
MyISAM
;
INSERT
INTO
t2
VALUES
(
1
),(
2
);
CREATE
TABLE
t3
(
pk
INT
PRIMARY
KEY
,
b
TIMESTAMP
)
ENGINE
=
MyISAM
;
SELECT
(
SELECT
b
FROM
t1
LIMIT
1
)
AS
sq
FROM
t2
LEFT
JOIN
t3
USING
(
pk
);
DROP
TABLE
t1
,
t2
,
t3
;
--
echo
#
--
echo
#
--
echo
# End of 10.4 tests
--
echo
# End of 10.4 tests
...
...
sql/item_subselect.cc
View file @
d97a26a6
...
@@ -1084,7 +1084,7 @@ void Item_maxmin_subselect::no_rows_in_result()
...
@@ -1084,7 +1084,7 @@ void Item_maxmin_subselect::no_rows_in_result()
*/
*/
if
(
parsing_place
!=
SELECT_LIST
||
const_item
())
if
(
parsing_place
!=
SELECT_LIST
||
const_item
())
return
;
return
;
value
=
(
new
(
thd
->
mem_root
)
Item_null
(
thd
))
->
get_cache
(
thd
);
value
=
get_cache
(
thd
);
null_value
=
0
;
null_value
=
0
;
was_values
=
0
;
was_values
=
0
;
make_const
();
make_const
();
...
@@ -1102,7 +1102,7 @@ void Item_singlerow_subselect::no_rows_in_result()
...
@@ -1102,7 +1102,7 @@ void Item_singlerow_subselect::no_rows_in_result()
*/
*/
if
(
parsing_place
!=
SELECT_LIST
||
const_item
())
if
(
parsing_place
!=
SELECT_LIST
||
const_item
())
return
;
return
;
value
=
(
new
(
thd
->
mem_root
)
Item_null
(
thd
))
->
get_cache
(
thd
);
value
=
get_cache
(
thd
);
reset
();
reset
();
make_const
();
make_const
();
}
}
...
...
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