diff options
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r-- | sql/sql_update.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 10b62af3d6f..56ff0ee4b34 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -2467,6 +2467,9 @@ int multi_update::send_data(List<Item> ¬_used_values) TABLE *tmp_table= tmp_tables[offset]; if (copy_funcs(tmp_table_param[offset].items_to_copy, thd)) DBUG_RETURN(1); + /* rowid field is NULL if join tmp table has null row from outer join */ + if (tmp_table->field[0]->is_null()) + continue; /* Store regular updated fields in the row. */ DBUG_ASSERT(1 + unupdated_check_opt_tables.elements == tmp_table_param[offset].func_count); @@ -2671,6 +2674,7 @@ int multi_update::do_updates() uint field_num= 0; do { + DBUG_ASSERT(!tmp_table->field[field_num]->is_null()); if (unlikely((local_error= tbl->file->ha_rnd_pos(tbl->record[0], (uchar *) tmp_table-> |