diff options
author | Alfranio Correia <alfranio.correia@sun.com> | 2009-10-22 01:10:42 +0100 |
---|---|---|
committer | Alfranio Correia <alfranio.correia@sun.com> | 2009-10-22 01:10:42 +0100 |
commit | deea727fced84c96e5f3f2f55d3a1a9fb5e475d0 (patch) | |
tree | 89b8b01574a400b075617b13a5f3700600abcfd2 /sql/log_event.cc | |
parent | 495cde347b1dad1cd93b7b4e15c721da9576c496 (diff) | |
download | mariadb-git-deea727fced84c96e5f3f2f55d3a1a9fb5e475d0.tar.gz |
BUG#48091 valgrind errors when slave has double not null and master has double null
Backporting BUG#38173 to mysql-5.1-bugteam
The reason of the bug was incompatibile with the master side behaviour.
INSERT query on the master is allowed to insert into a table without specifying
values of DEFAULT-less fields if sql_mode is not strict.
Fixed with checking sql_mode by the sql thread to decide how to react.
Non-strict sql_mode should allow Write_rows event to complete.
todo: warnings can be shown via show slave status, still this is a
separate rather general issue how to show warnings for the slave threads.
Diffstat (limited to 'sql/log_event.cc')
-rw-r--r-- | sql/log_event.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc index 76532836b73..935dfa1a536 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -8452,7 +8452,10 @@ Rows_log_event::write_row(const Relay_log_info *const rli, /* fill table->record[0] with default values */ if ((error= prepare_record(table, m_width, - TRUE /* check if columns have def. values */))) + table->file->ht->db_type != DB_TYPE_NDBCLUSTER, + (rli->sql_thd->variables.sql_mode & + (MODE_STRICT_TRANS_TABLES | + MODE_STRICT_ALL_TABLES))))) DBUG_RETURN(error); /* unpack row into table->record[0] */ |