From 201ee3eb78da55c72c627c6aa09a51899e31c4a7 Mon Sep 17 00:00:00 2001 From: "monty@mysql.com" <> Date: Fri, 1 Apr 2005 15:04:50 +0300 Subject: Invalid DEFAULT values for CREATE TABLE now generates errors. (Bug #5902) CAST() now produces warnings when casting a wrong INTEGER or CHAR values. This also applies to implicite string to number casts. (Bug #5912) ALTER TABLE now fails in STRICT mode if it generates warnings. Inserting a zero date in a DATE, DATETIME or TIMESTAMP column during TRADITIONAL mode now produces an error. (Bug #5933) --- sql/item_row.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sql/item_row.cc') diff --git a/sql/item_row.cc b/sql/item_row.cc index 00d849e55de..0c8baa332ca 100644 --- a/sql/item_row.cc +++ b/sql/item_row.cc @@ -73,8 +73,8 @@ bool Item_row::fix_fields(THD *thd, TABLE_LIST *tabl, Item **ref) with_null|= item->null_inside(); else { - item->val_int(); - with_null|= item->null_value; + if (item->is_null()) + with_null|= 1; } } maybe_null|= item->maybe_null; -- cgit v1.2.1