Subquery cache causes valgrind warnings

Bug #606013 reported by Sergey Petrunia
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MariaDB
Fix Released
High
Oleksandr "Sanja" Byelkin

Bug Description

Subquery cache causes valgrind warnings, see:
http://buildbot.askmonty.org/buildbot/builders/work-amd64-valgrind/builds/619/steps/test/logs/stdio

The failing tests are: main.subquery_cache main.subselect_mat (partition.test failure is a separate issue)

Tags: 5.3
Revision history for this message
Sergey Petrunia (sergefp) wrote :
Download full text (3.2 KiB)

The warnings look like this:

main.subquery_cache w2 [ fail ] Found warnings/errors in server log file!
        Test ended at 2010-07-15 18:44:58
line
==17469== Thread 4:
==17469== Conditional jump or move depends on uninitialised value(s)
==17469== at 0x8B141F: hp_search (hp_hash.c:213)
==17469== by 0x8B51DA: heap_rkey (hp_rkey.c:61)
==17469== by 0x8AED92: ha_heap::index_read_map(unsigned char*, unsigned char const*, unsigned long, ha_rkey_function) (ha_heap.cc:279)
==17469== by 0x6D90B5: join_read_key2(THD*, st_join_table*, st_table*, st_table_ref*) (sql_class.h:3393)
==17469== by 0x8468EA: Expression_cache_tmptable::check_value(Item**) (sql_expression_cache.cc:248)
==17469== by 0x579804: Item_cache_wrapper::val_bool() (item.cc:6710)
==17469== by 0x5B5EC1: Item_func_not::val_int() (item_cmpfunc.cc:287)
==17469== by 0x6CC522: evaluate_join_record(JOIN*, st_join_table*, int) (sql_select.cc:13197)
==17469== by 0x6CC95D: sub_select(JOIN*, st_join_table*, bool) (sql_select.cc:13142)
==17469== by 0x6E832C: do_select(JOIN*, List<Item>*, st_table*, Procedure*) (sql_select.cc:12649)
==17469== by 0x6E94C0: JOIN::exec() (sql_select.cc:2355)
==17469== by 0x6EAC59: 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_lex_unit*, st_select_lex*) (sql_select.cc:2556)
==17469== by 0x6EF418: handle_select(THD*, st_lex*, select_result*, unsigned long) (sql_select.cc:276)
==17469== by 0x65F882: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:5081)
==17469== by 0x666FFD: mysql_execute_command(THD*) (sql_parse.cc:2265)
==17469== by 0x66BB8F: mysql_parse(THD*, char const*, unsigned int, char const**) (sql_parse.cc:6027)
==17469== Conditional jump or move depends on uninitialised value(s)
==17469== at 0x8AFD4E: hp_mask (hp_hash.c:213)
==17469== by 0x8B29DA: hp_write_key (hp_write.c:236)
==17469== by 0x8B2D85: heap_write (hp_write.c:51)
==17469== by 0x8AEF28: ha_heap::write_row(unsigned char*) (ha_heap.cc:224)
==17469== by 0x78D798: handler::ha_write_row(unsigned char*) (handler.cc:4715)
==17469== by 0x845CC4: Expression_cache_tmptable::put_value(Item*) (sql_expression_cache.cc:294)
==17469== by 0x579852: Item_cache_wrapper::val_bool() (item.cc:6726)
==17469== by 0x5B5EC1: Item_func_not::val_int() (item_cmpfunc.cc:287)
==17469== by 0x6CC522: evaluate_join_record(JOIN*, st_join_table*, int) (sql_select.cc:13197)
==17469== by 0x6CC95D: sub_select(JOIN*, st_join_table*, bool) (sql_select.cc:13142)
==17469== by 0x6E832C: do_select(JOIN*, List<Item>*, st_table*, Procedure*) (sql_select.cc:12649)
==17469== by 0x6E94C0: JOIN::exec() (sql_select.cc:2355)
==17469== by 0x6EAC59: 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_lex_unit*, st_select_lex*) (sql_select.cc:2556)
==17469== by 0x6EF418: handle_select(THD*, st_lex*, select_result*, unsigned long) (sql_select.cc:276)
==17469== by 0x65F882: execute_sqlcom...

Read more...

tags: added: 5.3
Changed in maria:
assignee: nobody → Oleksandr "Sanja" Byelkin (sanja-byelkin)
importance: Undecided → High
status: New → In Progress
Michael Widenius (monty)
Changed in maria:
milestone: none → 5.3
Revision history for this message
Oleksandr "Sanja" Byelkin (sanja-byelkin) wrote :

Problem is in bit type conversion. Test suite is here:

CREATE TABLE t1 ( a bit(20), b bit(20));
INSERT INTO t1 VALUES(1,1),(2,2),(3,3);
SELECT a+0 FROM t1 WHERE NOT a IN (SELECT a FROM t1 WHERE b = 2);
DROP TABLE t1;

But number of bits should not be full bytes (8, 16, 24, 32 ...).

Changed in maria:
status: In Progress → Fix Committed
Changed in maria:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.