summaryrefslogtreecommitdiff
path: root/sql/sql_update.cc
diff options
context:
space:
mode:
authorunknown <tsmith@ramayana.hindu.god>2008-01-25 10:37:29 -0700
committerunknown <tsmith@ramayana.hindu.god>2008-01-25 10:37:29 -0700
commitbf541d14f29a589c01989d4da2540283f7f9d66f (patch)
tree74fe704d2ae83b58d06940ffcf7a36638868fee0 /sql/sql_update.cc
parent0a1832268d84af51622699bedd8e2fd34c79f308 (diff)
parent8f9e655dab1802d31be5c01ea5b5e9ccee01363c (diff)
downloadmariadb-git-bf541d14f29a589c01989d4da2540283f7f9d66f.tar.gz
Merge ramayana.hindu.god:/home/tsmith/m/bk/51
into ramayana.hindu.god:/home/tsmith/m/bk/maint/51 client/mysqldump.c: Auto merged configure.in: Auto merged sql/item_func.cc: Auto merged sql/item_sum.cc: Auto merged sql/mysqld.cc: Auto merged sql/sp_head.cc: Auto merged sql/sp_head.h: Auto merged sql/sql_base.cc: Auto merged sql/sql_cache.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_delete.cc: Auto merged sql/sql_insert.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_show.cc: Auto merged sql/sql_table.cc: Auto merged sql/sql_update.cc: Auto merged sql/sql_yacc.yy: Auto merged sql/handler.cc: Manual merge sql/item.cc: Manual merge
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r--sql/sql_update.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index 78dea6b7cdb..4d075e3308d 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -526,7 +526,9 @@ int mysql_update(THD *thd,
init_read_record(&info,thd,table,select,0,1);
updated= found= 0;
- thd->count_cuted_fields= CHECK_FIELD_WARN; /* calc cuted fields */
+ /* Generate an error when trying to set a NOT NULL field to NULL. */
+ thd->count_cuted_fields= ignore ? CHECK_FIELD_WARN
+ : CHECK_FIELD_ERROR_FOR_NULL;
thd->cuted_fields=0L;
thd_proc_info(thd, "Updating");
@@ -623,9 +625,9 @@ int mysql_update(THD *thd,
call then it should be included in the count of dup_key_found
and error should be set to 0 (only if these errors are ignored).
*/
- error= table->file->bulk_update_row(table->record[1],
- table->record[0],
- &dup_key_found);
+ error= table->file->ha_bulk_update_row(table->record[1],
+ table->record[0],
+ &dup_key_found);
limit+= dup_key_found;
updated-= dup_key_found;
}