Valgrind warning / sporadic crash in evaluate_join_record sql_select.cc:14099 with semijoin
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
Invalid
|
Undecided
|
Sergey Petrunia |
Bug Description
Repeatable with maria-5.3, maria-5.3-mwl89 . Not repeatable with maria-5.2 .
valgrind warnings:
==19646== Conditional jump or move depends on uninitialised value(s)
==19646== at 0x832A44F: evaluate_
==19646== by 0x832A0CD: sub_select(JOIN*, st_join_table*, bool) (sql_select.
==19646== by 0x8329AD0: sub_select_
==19646== by 0x832949F: do_select(JOIN*, List<Item>*, st_table*, Procedure*) (sql_select.
==19646== by 0x830FCCA: JOIN::exec() (sql_select.
==19646== by 0x83104E7: mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_
==19646== by 0x8451213: mysql_derived_
==19646== by 0x8450B1E: mysql_handle_
==19646== by 0x82F11E1: open_and_
==19646== by 0x82AC8E0: open_and_
==19646== by 0x82A5C00: execute_
==19646== by 0x829CC86: mysql_execute_
==19646== by 0x82A83B7: mysql_parse(THD*, char*, unsigned int, char const**) (sql_parse.cc:6090)
==19646== by 0x829A90F: dispatch_
==19646== by 0x8299DBC: do_command(THD*) (sql_parse.cc:904)
==19646== by 0x8296E6F: handle_
==19646== Conditional jump or move depends on uninitialised value(s)
==19646== at 0x832A4AE: evaluate_
==19646== by 0x832A0CD: sub_select(JOIN*, st_join_table*, bool) (sql_select.
==19646== by 0x8329AD0: sub_select_
==19646== by 0x832949F: do_select(JOIN*, List<Item>*, st_table*, Procedure*) (sql_select.
==19646== by 0x830FCCA: JOIN::exec() (sql_select.
==19646== by 0x83104E7: mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_
==19646== by 0x8451213: mysql_derived_
==19646== by 0x8450B1E: mysql_handle_
==19646== by 0x82F11E1: open_and_
==19646== by 0x82AC8E0: open_and_
==19646== by 0x82A5C00: execute_
==19646== by 0x829CC86: mysql_execute_
==19646== by 0x82A83B7: mysql_parse(THD*, char*, unsigned int, char const**) (sql_parse.cc:6090)
==19646== by 0x829A90F: dispatch_
==19646== by 0x8299DBC: do_command(THD*) (sql_parse.cc:904)
==19646== by 0x8296E6F: handle_
==19646== Conditional jump or move depends on uninitialised value(s)
==19646== at 0x832A4FE: evaluate_
==19646== by 0x832A0CD: sub_select(JOIN*, st_join_table*, bool) (sql_select.
==19646== by 0x8329AD0: sub_select_
==19646== by 0x832949F: do_select(JOIN*, List<Item>*, st_table*, Procedure*) (sql_select.
==19646== by 0x830FCCA: JOIN::exec() (sql_select.
==19646== by 0x83104E7: mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_
==19646== by 0x8451213: mysql_derived_
==19646== by 0x8450B1E: mysql_handle_
==19646== by 0x82F11E1: open_and_
==19646== by 0x82AC8E0: open_and_
==19646== by 0x82A5C00: execute_
==19646== by 0x829CC86: mysql_execute_
==19646== by 0x82A83B7: mysql_parse(THD*, char*, unsigned int, char const**) (sql_parse.cc:6090)
==19646== by 0x829A90F: dispatch_
==19646== by 0x8299DBC: do_command(THD*) (sql_parse.cc:904)
==19646== by 0x8296E6F: handle_
test case. Unfortunately, simplification is not available for Valgrind:
SET SESSION optimizer_
CREATE TABLE t1 ( pk int(11) NOT NULL AUTO_INCREMENT, col_int_nokey int(11) DEFAULT NULL, col_int_key int(11) DEFAULT NULL, col_date_key date DEFAULT NUL$
INSERT INTO t1 VALUES (10,7,8,
CREATE TABLE t2 ( pk int(11) NOT NULL AUTO_INCREMENT, col_int_nokey int(11) DEFAULT NULL, col_int_key int(11) DEFAULT NULL, col_date_key date DEFAULT NUL$
INSERT INTO t2 VALUES (10,8,8,
CREATE TABLE t3 ( pk int(11) NOT NULL AUTO_INCREMENT, col_int_nokey int(11) DEFAULT NULL, col_int_key int(11) DEFAULT NULL, col_date_key date DEFAULT NUL$
INSERT INTO t3 VALUES (1,1,7,
EXPLAIN SELECT alias1.col_time_key AS field1
FROM
(
(
SELECT SQ1_alias1.*
FROM t1 AS SQ1_alias1
WHERE SQ1_alias1.
(
SELECT C_SQ1_alias1.
FROM
( t1 AS C_SQ1_alias1
RIGHT JOIN t3 AS C_SQ1_alias2 ON
(C_SQ1_
)
)
)
AS alias1
LEFT JOIN t2 AS alias2 ON
(alias2.
)
WHERE
( alias2.
(
SELECT 2 UNION
SELECT 104 )
)
AND alias1.pk = 4
ORDER BY alias1.
Changed in maria: | |
assignee: | nobody → Philip Stoev (pstoev-askmonty) |
status: | New → In Progress |
summary: |
Valgrind warning / sporadic crash in evaluate_join_record - sql_select.cc:14099 + sql_select.cc:14099 with semijoin |
Explain:
+----+- ------- ------- -----+- ------- ------+ ------- -+----- ------- -----+- ------- ------- --+---- -----+- ------+ ------+ ------- ------- ------- ------- ------- ------- ------- ------- ------- -+ ------- ------- -----+- ------- ------+ ------- -+----- ------- -----+- ------- ------- --+---- -----+- ------+ ------+ ------- ------- ------- ------- ------- ------- ------- ------- ------- -+ ------- ------- -----+- ------- ------+ ------- -+----- ------- -----+- ------- ------- --+---- -----+- ------+ ------+ ------- ------- ------- ------- ------- ------- ------- ------- ------- -+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-
| 1 | PRIMARY | NULL | NULL | NULL | NULL | NULL | NULL | NULL | Impossible WHERE noticed after reading const tables |
| 4 | DEPENDENT SUBQUERY | NULL | NULL | NULL | NULL | NULL | NULL | NULL | No tables used |
| 5 | DEPENDENT UNION | NULL | NULL | NULL | NULL | NULL | NULL | NULL | No tables used |
| NULL | UNION RESULT | <union4,5> | ALL | NULL | NULL | NULL | NULL | NULL | |
| 2 | DERIVED | C_SQ1_alias2 | system | NULL | NULL | NULL | NULL | 1 | |
| 2 | DERIVED | C_SQ1_alias1 | ref | col_varchar_key | col_varchar_key | 4 | const | 1 | Using where; Start temporary |
| 2 | DERIVED | SQ1_alias1 | ALL | NULL | NULL | NULL | NULL | 20 | Using where; End temporary; Using join buffer (flat, BNL join) |
+----+-