summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2019-09-02 10:53:46 +0200
committerSergei Golubchik <serg@mariadb.org>2019-09-03 20:34:30 +0200
commit17ab02f4b0537de321a281f47dec825a6368d483 (patch)
tree1ce787d6d66c224336266e55510945666661c814 /sql/sql_table.cc
parentef00ac4c86daf3294c46a45358da636763fb0049 (diff)
downloadmariadb-git-17ab02f4b0537de321a281f47dec825a6368d483.tar.gz
cleanup: on update default now
* remove one level of virtual functions * remove redundant checks * remove an if() as the value is always known at compilation time don't pretend that "DEFAULT expr" and "ON UPDATE DEFAULT NOW" are "basically the same thing"
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r--sql/sql_table.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 33589b3044d..761e14e31d0 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -9455,7 +9455,7 @@ do_continue:;
/* Check that we can call default functions with default field values */
altered_table->reset_default_fields();
if (altered_table->default_field &&
- altered_table->update_default_fields(0, 1))
+ altered_table->update_default_fields(true))
goto err_new_table_cleanup;
// Ask storage engine whether to use copy or in-place
@@ -10138,7 +10138,7 @@ copy_data_between_tables(THD *thd, TABLE *from, TABLE *to,
}
prev_insert_id= to->file->next_insert_id;
if (to->default_field)
- to->update_default_fields(0, ignore);
+ to->update_default_fields(ignore);
if (to->vfield)
to->update_virtual_fields(to->file, VCOL_UPDATE_FOR_WRITE);