summaryrefslogtreecommitdiff
path: root/sql/sql_load.cc
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2015-06-26 10:16:51 +0400
committerAlexander Barkov <bar@mariadb.org>2015-06-26 10:16:51 +0400
commit115904c2c86a15bd07f4a33b0b43f6a3d6928304 (patch)
tree0163569a088fdac6134f25c4aa65232ba18ee0f4 /sql/sql_load.cc
parent874df5092b958ca5657cf890703003d5fe63cc91 (diff)
downloadmariadb-git-115904c2c86a15bd07f4a33b0b43f6a3d6928304.tar.gz
MDEV-7824 [Bug #68041] Zero date can be inserted in strict no-zero mode through a default value
Diffstat (limited to 'sql/sql_load.cc')
-rw-r--r--sql/sql_load.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/sql_load.cc b/sql/sql_load.cc
index 142036b2191..e0e0d66ccb7 100644
--- a/sql/sql_load.cc
+++ b/sql/sql_load.cc
@@ -477,7 +477,12 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
thd->abort_on_warning= !ignore && thd->is_strict_mode();
thd_progress_init(thd, 2);
- if (ex->filetype == FILETYPE_XML) /* load xml */
+ if (table_list->table->validate_default_values_of_unset_fields(thd))
+ {
+ read_info.error= true;
+ error= 1;
+ }
+ else if (ex->filetype == FILETYPE_XML) /* load xml */
error= read_xml_field(thd, info, table_list, fields_vars,
set_fields, set_values, read_info,
*(ex->line_term), skip_lines, ignore);