Description:
There are Valgrind complaints about uninitialized values in the 'bdb' test case
in latest 5.1 BitKeeper:
==11371== Conditional jump or move depends on uninitialised value(s)
==11371== at 0x83E4CB1: __log_putr (log_put.c:678)
==11371== by 0x83E48BB: __log_put_next (log_put.c:431)
==11371== by 0x83E43E0: __log_put (log_put.c:171)
==11371== by 0x8436D7B: __db_addrem_log (db_auto.c:186)
==11371== by 0x8440241: __db_pitem (db_dup.c:133)
==11371== by 0x8456A40: __bam_ovput (bt_put.c:911)
==11371== by 0x8455CB5: __bam_iitem (bt_put.c:363)
==11371== by 0x8452E71: __bam_c_put (bt_cursor.c:1946)
==11371== by 0x843C9DD: __db_c_put (db_cam.c:1424)
==11371== by 0x8435D27: __db_put (db_am.c:404)
==11371== by 0x8443211: __db_put_pp (db_iface.c:1449)
==11371== by 0x830171A: ha_berkeley::write_row(char*) (ha_berkeley.cc:1055)
==11371== by 0x82DE3BC: handler::ha_write_row(char*) (handler.cc:3338)
==11371== by 0x827D637: write_record(THD*, st_table*, st_copy_info*) (sql_insert.cc:1148)
==11371== by 0x8281962: mysql_insert(THD*, st_table_list*, List<Item>&, List<List<Item> >&, List<Item>&, List<Item>&, enum_duplicates, bool) (sql_insert.cc:519)
==11371== by 0x821E7FA: mysql_execute_command(THD*) (sql_parse.cc:3337)
==11371==
==11371== Syscall param write(buf) points to uninitialised byte(s)
==11371== at 0x40513A1: (within /lib/tls/libpthread-2.3.6.so)
==11371== by 0x83F3236: __os_write (os_rw.c:176)
==11371== by 0x83E5A84: __log_write (log_put.c:1138)
==11371== by 0x83E550D: __log_flush_int (log_put.c:927)
==11371== by 0x83E490E: __log_flush_commit (log_put.c:463)
==11371== by 0x83E4643: __log_put (log_put.c:263)
==11371== by 0x83F83C6: __txn_regop_log (txn_auto.c:159)
==11371== by 0x83F6AA9: __txn_commit (txn.c:637)
==11371== by 0x83F66EA: __txn_commit_pp (txn.c:519)
==11371== by 0x82FAFB1: berkeley_commit(THD*, bool) (ha_berkeley.cc:290)
==11371== by 0x82DECB5: ha_commit_one_phase(THD*, bool) (handler.cc:718)
==11371== by 0x82DFFE0: ha_commit_trans(THD*, bool) (handler.cc:688)
==11371== by 0x82E01AA: ha_autocommit_or_rollback(THD*, int) (handler.cc:827)
==11371== by 0x8281C41: mysql_insert(THD*, st_table_list*, List<Item>&, List<List<Item> >&, List<Item>&, List<Item>&, enum_duplicates, bool) (sql_insert.cc:595)
==11371== by 0x821E7FA: mysql_execute_command(THD*) (sql_parse.cc:3337)
==11371== by 0x8224493: mysql_parse(THD*, char*, unsigned) (sql_parse.cc:5940)
==11371== Address 0x4230914 is 8,684 bytes inside a block of size 32,788 alloc'd
==11371== at 0x401C4A1: malloc (vg_replace_malloc.c:149)
==11371== by 0x83F166E: __os_malloc (os_alloc.c:249)
==11371== by 0x844AF6E: __db_shalloc (db_salloc.c:128)
==11371== by 0x83DF138: __log_init (log.c:251)
==11371== by 0x83DEC8E: __log_open (log.c:71)
==11371== by 0x83CA61D: __env_open (env_open.c:402)
==11371== by 0x83CA2C6: __env_open_pp (env_open.c:212)
==11371== by 0x82FAD12: berkeley_init() (ha_berkeley.cc:224)
==11371== by 0x83B9992: plugin_initialize(st_plugin_int*) (sql_plugin.cc:528)
==11371== by 0x83B9D16: plugin_init() (sql_plugin.cc:685)
==11371== by 0x82022FE: init_server_components() (mysqld.cc:3182)
==11371== by 0x82073B2: main (mysqld.cc:3568)
==11371==
==11371== Syscall param pwrite64(buf) points to uninitialised byte(s)
==11371== at 0x4052036: pwrite64 (in /lib/tls/libpthread-2.3.6.so)
==11371== by 0x83F2F7A: __os_io (os_rw.c:67)
==11371== by 0x844DCA7: __memp_pgwrite (mp_bh.c:397)
==11371== by 0x844D7DA: __memp_bhwrite (mp_bh.c:172)
==11371== by 0x83EF090: __memp_sync_int (mp_sync.c:486)
==11371== by 0x83EEA6E: __memp_fsync (mp_sync.c:163)
==11371== by 0x8435F9C: __db_sync (db_am.c:564)
==11371== by 0x8434BDC: __db_refresh (db.c:783)
==11371== by 0x8434A74: __db_close (db.c:685)
==11371== by 0x844150E: __db_close_pp (db_iface.c:255)
==11371== by 0x82FDD78: free_share(st_berkeley_share*, st_table*, unsigned, bool) (ha_berkeley.cc:2544)
==11371== by 0x82FDEB3: ha_berkeley::close() (ha_berkeley.cc:787)
==11371== by 0x8252A01: closefrm(st_table*, bool) (table.cc:1587)
==11371== by 0x8249448: intern_close_table(st_table*) (sql_base.cc:764)
==11371== by 0x82494B9: free_cache_entry(st_table*) (sql_base.cc:783)
==11371== by 0x85F096F: hash_delete (hash.c:520)
==11371== Address 0xAF25FD0 is 4,080 bytes inside a block of size 4,151 alloc'd
==11371== at 0x401C4A1: malloc (vg_replace_malloc.c:149)
==11371== by 0x83F166E: __os_malloc (os_alloc.c:249)
==11371== by 0x844AF6E: __db_shalloc (db_salloc.c:128)
==11371== by 0x844CF03: __memp_alloc (mp_alloc.c:89)
==11371== by 0x83E77FE: __memp_fget (mp_fget.c:376)
==11371== by 0x8445C9E: __db_new (db_meta.c:174)
==11371== by 0x83FEF09: __bam_new_subdb (bt_open.c:572)
==11371== by 0x83BF243: __db_init_subdb (db_open.c:354)
==11371== by 0x83D4D43: __fop_subdb_setup (fop_util.c:817)
==11371== by 0x83BEDCF: __db_open (db_open.c:165)
==11371== by 0x844295D: __db_open_pp (db_iface.c:1049)
==11371== by 0x82FCE7B: create_sub_table(char const*, char const*, DBTYPE, int) (ha_berkeley.cc:2071)
==11371== by 0x82FD051: ha_berkeley::create(char const*, st_table*, st_ha_create_information*) (ha_berkeley.cc:2104)
==11371== by 0x82DE593: ha_create_table(THD*, char const*, char const*, char const*, st_ha_create_information*, bool) (handler.cc:2393)
==11371== by 0x82BC88C: rea_create_table(THD*, char const*, char const*, char const*, st_ha_create_information*, List<create_field>&, unsigned, st_key*, handler*) (unireg.cc:336)
==11371== by 0x833CAE0: mysql_create_table_internal(THD*, char const*, char const*, st_ha_create_information*, List<create_field>&, List<Key>&, bool, unsigned) (sql_table.cc:3306)
How to repeat:
perl mysql-test-run.pl --valgrind-all bdb