mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
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"
This commit is contained in:
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user