Valgrind complains on simple selects containing expression DAY(FROM_UNIXTIME(-1))
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
New
|
High
|
Alexey Botchkov |
Bug Description
The following test case makes valgrind complain when running mariadb-5.1:
SELECT SUBSTRING('1', DAY(FROM_
SELECT LEFT('1', DAY(FROM_
SELECT RIGHT('1', DAY(FROM_
SELECT REPEAT('1', DAY(FROM_
SELECT RPAD('hi', DAY(FROM_
SELECT LPAD('hi', DAY(FROM_
CREATE TABLE t1
SELECT SUBSTRING('1', DAY(FROM_
LEFT('1', DAY(FROM_
RIGHT('1', DAY(FROM_
REPEAT('1', DAY(FROM_
RPAD('hi', DAY(FROM_
LPAD('hi', DAY(FROM_
SHOW CREATE TABLE t1;
DROP TABLE t1;
(see also bug##12634989 from mysql-trunk)
The complains are like this:
==24162== Conditional jump or move depends on uninitialised value(s)
==24162== at 0x622A1A: Item_func_
==24162== by 0x5EF4B7: Item_func:
==24162== by 0x61E3DA: Item_str_
==24162== by 0x70BE1B: setup_fields(THD*, Item**, List<Item>&, enum_mark_columns, List<Item>*, bool) (sql_base.cc:7714)
==24162== by 0x71F07B: JOIN::prepare(
==24162== by 0x7268A7: 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_
==24162== by 0x71E818: handle_select(THD*, st_lex*, select_result*, unsigned long) (sql_select.cc:280)
==24162== by 0x6BD119: execute_
==24162== by 0x6B4232: mysql_execute_
==24162== by 0x6BF845: mysql_parse(THD*, char*, unsigned int, char const**) (sql_parse.cc:6216)
==24162== by 0x6B1B30: dispatch_
==24162== by 0x6B0AE0: do_command(THD*) (sql_parse.cc:906)
==24162== by 0x6AD563: handle_
==24162== by 0x5D16A4E: start_thread (in /lib64/
Most probably we have the same problem in other versions of MariaDB
Related branches
Changed in maria: | |
assignee: | nobody → Alexey Botchkov (holyfoot) |
importance: | Undecided → High |
summary: |
- Valgrind complains from simple selects containing expression + Valgrind complains on simple selects containing expression DAY(FROM_UNIXTIME(-1)) |