Bug #32971 No user level error message from slave sql thread when ER_NO_DEFAULT_FOR_FIELD
Submitted: 4 Dec 2007 17:52 Modified: 16 Feb 2008 10:35
Reporter: Andrei Elkin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Row Based Replication ( RBR ) Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: Andrei Elkin CPU Architecture:Any
Tags: replication error propagation

[4 Dec 2007 17:52] Andrei Elkin
Description:
Looking at the results of rpl_row_tabledefs_xxx one can see there is no
explaining messages corresponding to ER_NO_DEFAULT_FOR_FIELD code that is
reported with show slave status.

The error message is not as informative as it should be:
Last_SQL_Errno	1364
Last_SQL_Error	Error in Write_rows event: error during transaction execution on table test.t1_nodef. 

How to repeat:
look at rpl_row_tabledefs_2myisam.results

Suggested fix:
prepare_record() has to call
my_error(ER_NO_DEFAULT_FOR_FIELD, MYF(0),f->field_name)
in order to set last_error.
[4 Dec 2007 19:50] Andrei Elkin
The issue is actually more serious. According to the code and my testing row-based
events handling has had a limited facilities to provide explanations for other than the reported error code cases as well.
The explaining messages that is supposed to be in thd->net->last_error is not always formatted in row-based replication code.
[4 Dec 2007 19:53] Andrei Elkin
Setting an associated with the current BUG#25597.
[15 Jan 2008 20:42] 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/commits/41024

ChangeSet@1.2659, 2008-01-15 22:41:50+02:00, aelkin@koti.dsl.inet.fi +8 -0
  Bug #32971 No user level error message from slave sql thread when ER_NO_DEFAULT_FOR_FIELD
  
  The error message due to lack of the default value for an extra field
  was not as informative as it should be.
  
  Fixed with improving the scheme of row events handling errors gathering,
  propagating and reporting.
  The scheme is in the following.
  Any kind of error of processing of a row event incidents are to be 
  registed with my_error().
  In the end Rows_log_event::do_apply_event() invokes rli->report() with the 
  message to disply consisting of all the errors.
  A simple test checks two errors in processing an event.
[15 Jan 2008 20:46] 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/commits/41025

ChangeSet@1.2659, 2008-01-15 22:46:01+02:00, aelkin@koti.dsl.inet.fi +8 -0
  Bug #32971 No user level error message from slave sql thread when ER_NO_DEFAULT_FOR_FIELD
  
  The error message due to lack of the default value for an extra field
  was not as informative as it should be.
  
  Fixed with improving the scheme of row events handling errors gathering,
  propagating and reporting.
  The scheme is in the following.
  Any kind of error of processing of a row event incidents are to be 
  registered with my_error().
  In the end Rows_log_event::do_apply_event() invokes rli->report() with the 
  message to display consisting of all the errors.
  A simple test checks two errors in processing an event.
  Two hunks - a user level error and pushing it into the list -
[16 Jan 2008 12:36] 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/commits/41031

ChangeSet@1.2659, 2008-01-16 14:36:03+02:00, aelkin@koti.dsl.inet.fi +10 -0
  Bug #32971 No user level error message from slave sql thread when ER_NO_DEFAULT_FOR_FIELD
  
  The error message due to lack of the default value for an extra field
  was not as informative as it should be.
  
  Fixed with improving the scheme of row events handling errors gathering,
  propagating and reporting.
  The scheme is in the following.
  Any kind of error of processing of a row event incidents are to be 
  registered with my_error().
  In the end Rows_log_event::do_apply_event() invokes rli->report() with the 
  message to display consisting of all the errors.
  A simple test checks two errors in processing an event.
  Two hunks - a user level error and pushing it into the list -
[16 Jan 2008 17:15] 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/commits/41036

ChangeSet@1.2659, 2008-01-16 19:15:39+02:00, aelkin@koti.dsl.inet.fi +10 -0
  Bug #32971 No user level error message from slave sql thread when ER_NO_DEFAULT_FOR_FIELD
  
  The error message due to lack of the default value for an extra field
  was not as informative as it should be.
  
  Fixed with improving the scheme of gathering, propagating and reporting
  errors in applying rows events. 
  The scheme is in the following.
  Any kind of error of processing of a row event incidents are to be 
  registered with my_error().
  In the end Rows_log_event::do_apply_event() invokes rli->report() with the 
  message to display consisting of all the errors.
  This mimics `show warnings' displaying.
  A simple test checks two errors in processing an event.
  Two hunks - a user level error and pushing it into the list -
[28 Jan 2008 11:02] 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/commits/41293

ChangeSet@1.2659, 2008-01-28 13:02:28+02:00, aelkin@koti.dsl.inet.fi +10 -0
  Bug #32971 No user level error message from slave sql thread when ER_NO_DEFAULT_FOR_FIELD
  
  The error message due to lack of the default value for an extra field
  was not as informative as it should be.
  
  Fixed with improving the scheme of gathering, propagating and reporting
  errors in applying rows events. 
  The scheme is in the following.
  Any kind of error of processing of a row event incidents are to be 
  registered with my_error().
  In the end Rows_log_event::do_apply_event() invokes rli->report() with the 
  message to display consisting of all the errors.
  This mimics `show warnings' displaying.
  A simple test checks three errors in processing an event.
  Two hunks - a user level error and pushing it into the list -
[31 Jan 2008 12:54] 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/commits/41495

ChangeSet@1.2659, 2008-01-31 14:54:03+02:00, aelkin@koti.dsl.inet.fi +10 -0
  Bug #32971 No user level error message from slave sql thread when ER_NO_DEFAULT_FOR_FIELD
  
  The error message due to lack of the default value for an extra field
  was not as informative as it should be.
  
  Fixed with improving the scheme of gathering, propagating and reporting
  errors in applying rows events. 
  The scheme is in the following.
  Any kind of error of processing of a row event incidents are to be 
  registered with my_error().
  In the end Rows_log_event::do_apply_event() invokes rli->report() with the 
  message to display consisting of all the errors.
  This mimics `show warnings' displaying.
  A simple test checks three errors in processing an event.
  Two hunks - a user level error and pushing it into the list -
[4 Feb 2008 18:59] Andrei Elkin
Pushed to 5.1-rpl
[15 Feb 2008 13:40] Bugs System
Pushed into 5.1.24-rc
[15 Feb 2008 13:42] Bugs System
Pushed into 6.0.5-alpha
[16 Feb 2008 10:35] Jon Stephens
Documented in the 5.1.24 and 6.0.5 changelogs as follows:

        The error message generated due to lack of a default value for
        an extra column was not sufficiently informative.
[6 Mar 2008 13:46] Jon Stephens
Also documented for 5.1.23-ndb-6.2.14.
[25 Mar 2008 15:13] 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/commits/44400

ChangeSet@1.2602, 2008-03-25 17:10:50+02:00, aelkin@mysql1000.(none) +6 -0
  bug#32971 No user level error message from slave sql thread when ER_NO_DEFAULT_FOR_FIELD
  
  yet another cset because of the original was not merged correctly.
[26 Mar 2008 19:00] Bugs System
Pushed into 6.0.5-alpha
[31 Mar 2008 19:55] Jon Stephens
Pushed to 5.1-telco-6.3. 

Documented in the 5.1.23-ndb-6.3.11 and 6.0.5 changelogs.