List:Commits« Previous MessageNext Message »
From:Andrei Elkin Date:March 25 2008 4:11pm
Subject:bk commit into 6.0 tree (aelkin:1.2602) BUG#32971
View as plain text  
Below is the list of changes that have just been committed into a local
6.0 repository of aelkin.  When aelkin does a push these changes
will be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 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.

  mysql-test/suite/rpl/r/rpl_extraCol_innodb.result@stripped, 2008-03-25 17:10:47+02:00,
aelkin@mysql1000.(none) +2 -2
    results changed - pos

  mysql-test/suite/rpl/r/rpl_extraCol_myisam.result@stripped, 2008-03-25 17:10:47+02:00,
aelkin@mysql1000.(none) +2 -2
    results changed - pos

  sql/log_event.cc@stripped, 2008-03-25 17:10:47+02:00, aelkin@mysql1000.(none) +2 -2
    removing the first arg of prepare_record() as a result of changing the signature

  sql/log_event_old.cc@stripped, 2008-03-25 17:10:47+02:00, aelkin@mysql1000.(none) +2 -2
    removing the 1st arg due to changes in signature

  sql/rpl_record.cc@stripped, 2008-03-25 17:10:47+02:00, aelkin@mysql1000.(none) +3 -11
    fixing the declaration and refining the logics

  sql/rpl_record.h@stripped, 2008-03-25 17:10:47+02:00, aelkin@mysql1000.(none) +1 -2
    change in signature.

diff -Nrup a/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result
b/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result
--- a/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result	2008-03-12 14:10:14 +02:00
+++ b/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result	2008-03-25 17:10:47 +02:00
@@ -434,7 +434,7 @@ Replicate_Ignore_Table	#
 Replicate_Wild_Do_Table	
 Replicate_Wild_Ignore_Table	
 Last_Errno	1364
-Last_Error	Could not execute Write_rows event on table test.t9; Field 'e' doesn't have a
default value, Error_code: 1364; handler error HA_ERR_ROWS_EVENT_APPLY; the event's
master log master-bin.000001, end_log_pos 330
+Last_Error	Could not execute Write_rows event on table test.t9; Field 'e' doesn't have a
default value, Error_code: 1364; handler error HA_ERR_ROWS_EVENT_APPLY; the event's
master log master-bin.000001, end_log_pos 331
 Skip_Counter	0
 Exec_Master_Log_Pos	#
 Relay_Log_Space	#
@@ -452,7 +452,7 @@ Master_SSL_Verify_Server_Cert	No
 Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	1364
-Last_SQL_Error	Could not execute Write_rows event on table test.t9; Field 'e' doesn't
have a default value, Error_code: 1364; handler error HA_ERR_ROWS_EVENT_APPLY; the
event's master log master-bin.000001, end_log_pos 330
+Last_SQL_Error	Could not execute Write_rows event on table test.t9; Field 'e' doesn't
have a default value, Error_code: 1364; handler error HA_ERR_ROWS_EVENT_APPLY; the
event's master log master-bin.000001, end_log_pos 331
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
 START SLAVE;
 *** Create t10 on slave  ***
diff -Nrup a/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result
b/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result
--- a/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result	2008-03-12 14:10:14 +02:00
+++ b/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result	2008-03-25 17:10:47 +02:00
@@ -434,7 +434,7 @@ Replicate_Ignore_Table	#
 Replicate_Wild_Do_Table	
 Replicate_Wild_Ignore_Table	
 Last_Errno	1364
-Last_Error	Could not execute Write_rows event on table test.t9; Field 'e' doesn't have a
default value, Error_code: 1364; handler error HA_ERR_ROWS_EVENT_APPLY; the event's
master log master-bin.000001, end_log_pos 262
+Last_Error	Could not execute Write_rows event on table test.t9; Field 'e' doesn't have a
default value, Error_code: 1364; handler error HA_ERR_ROWS_EVENT_APPLY; the event's
master log master-bin.000001, end_log_pos 263
 Skip_Counter	0
 Exec_Master_Log_Pos	#
 Relay_Log_Space	#
@@ -452,7 +452,7 @@ Master_SSL_Verify_Server_Cert	No
 Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	1364
-Last_SQL_Error	Could not execute Write_rows event on table test.t9; Field 'e' doesn't
have a default value, Error_code: 1364; handler error HA_ERR_ROWS_EVENT_APPLY; the
event's master log master-bin.000001, end_log_pos 262
+Last_SQL_Error	Could not execute Write_rows event on table test.t9; Field 'e' doesn't
have a default value, Error_code: 1364; handler error HA_ERR_ROWS_EVENT_APPLY; the
event's master log master-bin.000001, end_log_pos 263
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
 START SLAVE;
 *** Create t10 on slave  ***
diff -Nrup a/sql/log_event.cc b/sql/log_event.cc
--- a/sql/log_event.cc	2008-03-14 19:30:07 +02:00
+++ b/sql/log_event.cc	2008-03-25 17:10:47 +02:00
@@ -7766,7 +7766,7 @@ Rows_log_event::write_row(const Relay_lo
      values filled in and one flag to handle the case that the default
      values should be checked. Maybe these two flags can be combined.
   */
-  if ((error= prepare_record(rli, table, &m_cols, m_width,
+  if ((error= prepare_record(table, &m_cols, m_width,
                              table->file->ht->db_type != DB_TYPE_NDBCLUSTER)))
     DBUG_RETURN(error);
   
@@ -8096,7 +8096,7 @@ int Rows_log_event::find_row(const Relay
   int error;
 
   /* unpack row - missing fields get default values */
-  prepare_record(NULL, table, &m_cols, m_width, FALSE /* don't check errors */); 
+  prepare_record(table, &m_cols, m_width, FALSE /* don't check errors */); 
   error= unpack_current_row(rli, &m_cols);
 
   // Temporary fix to find out why it fails [/Matz]
diff -Nrup a/sql/log_event_old.cc b/sql/log_event_old.cc
--- a/sql/log_event_old.cc	2008-03-03 23:06:37 +02:00
+++ b/sql/log_event_old.cc	2008-03-25 17:10:47 +02:00
@@ -2074,7 +2074,7 @@ Old_rows_log_event::write_row(const Rela
 
   /* fill table->record[0] with default values */
 
-  if ((error= prepare_record(rli, table, table->write_set, m_width,
+  if ((error= prepare_record(table, table->write_set, m_width,
                              table->file->ht->db_type != DB_TYPE_NDBCLUSTER)))
     DBUG_RETURN(error);
   
@@ -2285,7 +2285,7 @@ int Old_rows_log_event::find_row(const R
   /* unpack row - missing fields get default values */
 
   // TODO: shall we check and report errors here?
-  prepare_record(NULL, table, table->read_set, m_width,
+  prepare_record(table, table->read_set, m_width,
                  FALSE /* don't check errors */); 
   error= unpack_current_row(rli); 
 
diff -Nrup a/sql/rpl_record.cc b/sql/rpl_record.cc
--- a/sql/rpl_record.cc	2008-02-26 01:05:02 +02:00
+++ b/sql/rpl_record.cc	2008-03-25 17:10:47 +02:00
@@ -356,7 +356,6 @@ unpack_row(Relay_log_info const *rli,
   @todo When flag is added to allow engine to handle default values
   itself, the record should not be emptied and default values not set.
 
-  @param log[in]       Used to report errors.
   @param table[in,out] Table whose record[0] buffer is prepared. 
   @param cols[in]      Vector of bits denoting columns that will be set
                        elsewhere
@@ -366,8 +365,7 @@ unpack_row(Relay_log_info const *rli,
   @retval 0                       Success
   @retval ER_NO_DEFAULT_FOR_FIELD Default value could not be set for a field
  */ 
-int prepare_record(const Slave_reporting_capability *const log,
-                   TABLE *const table, 
+int prepare_record(TABLE *const table, 
                    const MY_BITMAP *cols, uint width, const bool check)
 {
   DBUG_ENTER("prepare_record");
@@ -393,14 +391,8 @@ int prepare_record(const Slave_reporting
 
       if (check && ((f->flags & mask) == mask))
       {
-        DBUG_ASSERT(log);
-        error= ER_NO_DEFAULT_FOR_FIELD;
-        log->report(ERROR_LEVEL, error,
-                    "Field `%s` of table `%s`.`%s` "
-                    "has no default value and cannot be NULL",
-                    f->field_name, table->s->db.str,
-                    table->s->table_name.str);
-        my_error(error, MYF(0), f->field_name);
+        my_error(ER_NO_DEFAULT_FOR_FIELD, MYF(0), f->field_name);
+        error = HA_ERR_ROWS_EVENT_APPLY;
       }
       else
       {
diff -Nrup a/sql/rpl_record.h b/sql/rpl_record.h
--- a/sql/rpl_record.h	2008-02-25 19:53:33 +02:00
+++ b/sql/rpl_record.h	2008-03-25 17:10:47 +02:00
@@ -30,8 +30,7 @@ int unpack_row(Relay_log_info const *rli
                uchar const **const row_end, ulong *const master_reclength);
 
 // Fill table's record[0] with default values.
-int prepare_record(const Slave_reporting_capability *const, TABLE *const, 
-                   const MY_BITMAP *cols, uint width, const bool);
+int prepare_record(TABLE *const, const MY_BITMAP *cols, uint width, const bool);
 #endif
 
 #endif
Thread
bk commit into 6.0 tree (aelkin:1.2602) BUG#32971Andrei Elkin25 Mar