summaryrefslogtreecommitdiff
path: root/sql/sql_load.cc
diff options
context:
space:
mode:
authorunknown <holyfoot/hf@deer.(none)>2006-12-07 09:27:47 +0400
committerunknown <holyfoot/hf@deer.(none)>2006-12-07 09:27:47 +0400
commit07de4b3aff88d8e0ce6ce056babdb837c4959189 (patch)
treed29a941d0c0d4b6c045e8fb29cbb56eaa5e4522b /sql/sql_load.cc
parente2574167850d8b5611ab7421ece47f3658d9d999 (diff)
parent7341315d7404d1a79d9fad85d8b0aad6855b88b5 (diff)
downloadmariadb-git-07de4b3aff88d8e0ce6ce056babdb837c4959189.tar.gz
Merge mysql.com:/home/hf/work/22372/my50-22372
into mysql.com:/home/hf/work/22372/my51-22372 mysql-test/t/gis.test: Auto merged sql/field.cc: Auto merged sql/sql_load.cc: Auto merged mysql-test/r/gis.result: SCCS merged sql/field.h: merging
Diffstat (limited to 'sql/sql_load.cc')
-rw-r--r--sql/sql_load.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/sql/sql_load.cc b/sql/sql_load.cc
index b85610eaa6f..e08fc93beaf 100644
--- a/sql/sql_load.cc
+++ b/sql/sql_load.cc
@@ -710,7 +710,12 @@ read_sep_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list,
if (item->type() == Item::FIELD_ITEM)
{
Field *field= ((Item_field *)item)->field;
- field->reset();
+ if (field->reset())
+ {
+ my_error(ER_WARN_NULL_TO_NOTNULL, MYF(0), field->field_name,
+ thd->row_count);
+ DBUG_RETURN(1);
+ }
field->set_null();
if (field == table->next_number_field)
table->auto_increment_field_not_null= TRUE;
@@ -759,6 +764,13 @@ read_sep_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list,
{
if (item->type() == Item::FIELD_ITEM)
{
+ Field *field= ((Item_field *)item)->field;
+ if (field->reset())
+ {
+ my_error(ER_WARN_NULL_TO_NOTNULL, MYF(0),field->field_name,
+ thd->row_count);
+ DBUG_RETURN(1);
+ }
/*
QQ: We probably should not throw warning for each field.
But how about intention to always have the same number