diff options
author | unknown <holyfoot/hf@mysql.com/deer.(none)> | 2006-12-06 22:02:39 +0400 |
---|---|---|
committer | unknown <holyfoot/hf@mysql.com/deer.(none)> | 2006-12-06 22:02:39 +0400 |
commit | 8f3c395c260f40c519444441297b979a5f09f6bf (patch) | |
tree | e175bfe15e5395d0886dfa5d2e07539352f7b0f9 /sql/sql_load.cc | |
parent | 85b1701ab7292eeee4ce4b253909ae68345be43c (diff) | |
parent | 63fce3a24e33407d58a17ec2946caa08e6c1b537 (diff) | |
download | mariadb-git-8f3c395c260f40c519444441297b979a5f09f6bf.tar.gz |
Merge mysql.com:/home/hf/work/22372/my41-22372
into mysql.com:/home/hf/work/22372/my50-22372
mysql-test/r/gis.result:
merging
mysql-test/t/gis.test:
merging
sql/field.cc:
merging
sql/field.h:
merging
sql/sql_load.cc:
merging
Diffstat (limited to 'sql/sql_load.cc')
-rw-r--r-- | sql/sql_load.cc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sql/sql_load.cc b/sql/sql_load.cc index bdc08b7bd2d..093e88bf82f 100644 --- a/sql/sql_load.cc +++ b/sql/sql_load.cc @@ -696,7 +696,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; @@ -745,6 +750,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),sql_field->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 |