From ef6c36c0c262ada284647cdf91d4cc2c599b7fdf Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 14 Jan 2003 11:27:26 +0200 Subject: Guard against compiling without -fno-exceptions Allocate bigger default thread stack because of problems with glibc Fixed bug in UPDATE ... not_null_field=expression_that_returns_null Fixed bug in replication when using auto_increment and LOAD DATA INFILE include/my_global.h: Guard against compiling without -fno-exceptions include/my_pthread.h: Allocate bigger default thread stack because of problems with glibc mysql-test/r/null.result: Updated result mysql-test/t/null.test: Test of using UPDATE/INSERT with NULL on not null fields. sql/field_conv.cc: Fixed bug in UPDATE ... not_null_field=expression_that_returns_null sql/sql_load.cc: Fixed bug in replication when using auto_increment and LOAD DATA INFILE --- sql/field_conv.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'sql/field_conv.cc') diff --git a/sql/field_conv.cc b/sql/field_conv.cc index ffc93f3e871..42272dd616f 100644 --- a/sql/field_conv.cc +++ b/sql/field_conv.cc @@ -118,6 +118,15 @@ set_field_to_null(Field *field) field->reset(); return 0; } + field->reset(); + if (current_thd->count_cuted_fields) + { + current_thd->cuted_fields++; // Increment error counter + return 0; + } + if (!current_thd->no_errors) + my_printf_error(ER_BAD_NULL_ERROR,ER(ER_BAD_NULL_ERROR),MYF(0), + field->field_name); return 1; } -- cgit v1.2.1