Bug #14698 RBR: rpl_row_trig003 fails
Submitted: 7 Nov 2005 10:47 Modified: 16 Nov 2005 9:41
Reporter: Guilhem Bichot Email Updates:
Status: Closed
Category:Server: Replication Severity:S3 (Non-critical)
Version:5.0-wl1012 OS:Linux (linux)
Assigned to: Guilhem Bichot Target Version:

[7 Nov 2005 10:47] Guilhem Bichot
Description:
Seen on two machines. rpl_row_trig003 fails when run under Valgrind (passes without
Valgrind).
rpl_row_trig003                [ fail ]

Errors are (from /m/mysql-5.0-wl1012/mysql-test/var/log/mysqltest-time) :
mysqltest: At line 144: command "diff ./var/tmp/trg003_master.sql
./var/tmp/trg003_slave.sql" failed
Master and slave show Valgrind errors:
master:
==3374== Conditional jump or move depends on uninitialised value(s)
==3374==    at 0x55A154: Field_bit::store(char const*, unsigned, charset_info_st*)
(field.cc:7934)
==3374==    by 0x55454E: Field_bit::store(long, bool) (field.cc:7987)
==3374==    by 0x4FE9F0: Item_int::save_in_field(Field*, bool) (item.cc:3979)
==3374==    by 0x5B0BB5: fill_record(THD*, Field**, List<Item>&, bool)
(sql_base.cc:4983)
==3374==    by 0x5B0C2C: fill_record_n_invoke_before_triggers(THD*, Field**, List<Item>&,
bool, Table_triggers_list*, trg_ev
ent_type) (sql_base.cc:5021)
==3374==    by 0x5E2C39: mysql_insert(THD*, st_table_list*, List<Item>&, List<List<Item>
>&, List<Item>&, List<Item>&, enum_
duplicates, bool) (sql_insert.cc:498)
==3374==    by 0x58D54C: mysql_execute_command(THD*) (sql_parse.cc:3241)
==3374==    by 0x59146B: mysql_parse(THD*, char*, unsigned) (sql_parse.cc:5570)
==3374==    by 0x591B60: dispatch_command(enum_server_command, THD*, char*, unsigned)
(sql_parse.cc:1697)
==3374==    by 0x592C14: do_command(THD*) (sql_parse.cc:1498)
==3374==    by 0x593850: handle_one_connection (sql_parse.cc:1143)
Slave:
==3397== Invalid write of size 8
==3397==    at 0x6BA79A: sp_head::add_used_tables_to_table_list(THD*, st_table_list***)
(sp_head.cc:2897)
==3397==    by 0x6C1400: sp_cache_routines_and_add_tables_for_triggers(THD*, st_lex*,
Table_triggers_list*) (sp.cc:1556)
==3397==    by 0x5B40AD: open_tables(THD*, st_table_list**, unsigned*, unsigned)
(sql_base.cc:2118)
==3397==    by 0x5FA096: Table_map_log_event::exec_event(st_relay_log_info*)
(log_event.cc:5694)
==3397==    by 0x695410: exec_relay_log_event(THD*, st_relay_log_info*) (slave.cc:3053)
==3397==    by 0x695B42: handle_slave_sql (slave.cc:3604)
==3397==    by 0x122DB97B: start_thread (in /lib64/libpthread-2.3.5.so)
==3397==    by 0x12884C2D: clone (in /lib64/libc-2.3.5.so)
==3397==  Address 0x1326A3D8 is 24 bytes inside a block of size 704 free'd
==3397==    at 0x11B20A33: free (vg_replace_malloc.c:235)
==3397==    by 0x86D246: my_no_flags_free (my_malloc.c:60)
==3397==    by 0x86DD41: free_root (my_alloc.c:347)
==3397==    by 0x5FD502: Query_log_event::exec_event(st_relay_log_info*, char const*,
unsigned) (log_event.cc:1839)
==3397==    by 0x5FD7D3: Query_log_event::exec_event(st_relay_log_info*)
(log_event.cc:1603)
==3397==    by 0x695410: exec_relay_log_event(THD*, st_relay_log_info*) (slave.cc:3053)
==3397==    by 0x695B42: handle_slave_sql (slave.cc:3604)

How to repeat:
see above.
[7 Nov 2005 10:49] Guilhem Bichot
more clues: happens without Valgrind too, on Suse 9.1 x86.
[7 Nov 2005 14:36] Guilhem Bichot
The error on the master is now BUG#14703 and I am about to push the fix for it in
mysql-5.0;
the error on the slave remains.
[14 Nov 2005 22:07] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/32242
[16 Nov 2005 8:09] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/32303
[16 Nov 2005 9:41] Guilhem Bichot
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

nothing to document. Was two bugs (uninited thd->lex and wrong TIMESTAMP replication).