summaryrefslogtreecommitdiff
path: root/sql/sql_insert.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-03-30 12:48:42 +0200
committerSergei Golubchik <serg@mariadb.org>2017-03-30 12:48:42 +0200
commitda4d71d10d23c1ac2d10b72baee14991ccb7a146 (patch)
tree7cdf3a8c8e72ca7c1c8105427c04123f025bd870 /sql/sql_insert.cc
parent9ec85009985d644ce7ae797bc3572d0ad0f69bb0 (diff)
parenta00517ac9707ffd51c092f5af5d198c5ee789bb4 (diff)
downloadmariadb-git-da4d71d10d23c1ac2d10b72baee14991ccb7a146.tar.gz
Merge branch '10.1' into 10.2
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r--sql/sql_insert.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index 27820c16543..8e5dfb4f69c 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -330,7 +330,7 @@ static bool has_no_default_value(THD *thd, Field *field, TABLE_LIST *table_list)
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, ER_NO_DEFAULT_FOR_FIELD,
ER_THD(thd, ER_NO_DEFAULT_FOR_FIELD), field->field_name);
}
- return true;
+ return thd->really_abort_on_warning();
}
return false;
}
@@ -904,7 +904,12 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
if (fields.elements || !value_count || table_list->view != 0)
{
- if (check_that_all_fields_are_given_values(thd, table, table_list))
+ if (table->triggers &&
+ table->triggers->has_triggers(TRG_EVENT_INSERT, TRG_ACTION_BEFORE))
+ {
+ /* BEFORE INSERT triggers exist, the check will be done later, per row */
+ }
+ else if (check_that_all_fields_are_given_values(thd, table, table_list))
{
error= 1;
goto values_loop_end;
@@ -3870,8 +3875,8 @@ bool select_insert::prepare_eof()
bool select_insert::send_ok_packet() {
char message[160]; /* status message */
- ulong row_count; /* rows affected */
- ulong id; /* last insert-id */
+ ulonglong row_count; /* rows affected */
+ ulonglong id; /* last insert-id */
DBUG_ENTER("select_insert::send_ok_packet");