summaryrefslogtreecommitdiff
path: root/sql/sql_update.cc
diff options
context:
space:
mode:
authorunknown <gshchepa/uchum@host.loc>2008-01-11 21:39:45 +0400
committerunknown <gshchepa/uchum@host.loc>2008-01-11 21:39:45 +0400
commitd52a1a144bf382b21d868bed23dfddc00d0c619e (patch)
tree5b163578c3488a623370fc611d065b79395e4370 /sql/sql_update.cc
parent8a757010d7aeab31835fdcbfaee179c1d04ccbee (diff)
parenta114ede24abff88609e5686f0eafbaf7fc2ed0b7 (diff)
downloadmariadb-git-d52a1a144bf382b21d868bed23dfddc00d0c619e.tar.gz
Merge host.loc:/home/uchum/work/5.1-opt-33699
into host.loc:/home/uchum/work/5.1-opt mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test: Auto merged sql/sql_update.cc: Auto merged mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result: Merge with local tree (bug#33699). mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result: Merge with local tree (bug#33699).
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r--sql/sql_update.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index e2dfd89aa32..ed066b89ae3 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="Updating";