A stress test involving DDL over heap tables produced the following valgrind warning:
==13299== Thread 47:
==13299== Conditional jump or move depends on uninitialised value(s)
==13299== at 0x968096: heap_scan (hp_scan.c:62)
==13299== by 0x960BE8: ha_heap::rnd_next(unsigned char*) (ha_heap.cc:381)
==13299== by 0x85BF38: rr_sequential(READ_RECORD*) (records.cc:455)
==13299== by 0x69536A: mysql_update(THD*, TABLE_LIST*, List<Item>&, List<Item>&, Item*, unsigned int, st_order*, unsigned long long, enum_duplicates, bool, unsigned long long*, unsigned long long*) (sql_update.cc:644)
==13299== by 0x5F6F17: mysql_execute_command(THD*) (sql_parse.cc:2662)
==13299== by 0x5FED7A: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:5503)
==13299== by 0x5F2CF4: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1034)
==13299== by 0x5F1F51: do_command(THD*) (sql_parse.cc:771)
==13299== by 0x6D7BEA: do_handle_one_connection(THD*) (sql_connect.cc:776)
==13299== by 0x6D7831: handle_one_connection (sql_connect.cc:724)
==13299== by 0x35A7207760: start_thread (in /lib64/libpthread-2.12.2.so)
==13299== by 0x1A7866FF: ???
bzr annotate shows that the line in question was modified by the patch:
if (get_chunk_status(&share->recordspace, info->current_ptr) !=
CHUNK_STATUS_ACTIVE)
Another one in the same code:
==13299== Thread 38: :rnd_next( unsigned char*) (ha_heap.cc:381) READ_RECORD* ) (records.cc:455) command( THD*) (sql_parse.cc:2662) command( enum_server_ command, THD*, char*, unsigned int) (sql_parse.cc:1034) one_connection( THD*) (sql_connect. cc:776) one_connection (sql_connect. cc:724) libpthread- 2.12.2. so)
==13299== Invalid read of size 1
==13299== at 0x968091: heap_scan (hp_scan.c:62)
==13299== by 0x960BE8: ha_heap:
==13299== by 0x85BF38: rr_sequential(
==13299== by 0x69536A: mysql_update(THD*, TABLE_LIST*, List<Item>&, List<Item>&, Item*, unsigned int, st_order*, unsigned long long, enum_duplicates, bool, unsigned long long*, unsigned long long*) (sql_update.cc:644)
==13299== by 0x5F6F17: mysql_execute_
==13299== by 0x5FED7A: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:5503)
==13299== by 0x5F2CF4: dispatch_
==13299== by 0x5F1F51: do_command(THD*) (sql_parse.cc:771)
==13299== by 0x6D7BEA: do_handle_
==13299== by 0x6D7831: handle_
==13299== by 0x35A7207760: start_thread (in /lib64/
==13299== by 0x1A53D6FF: ???