1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

move away from TIMESTAMP_DNUN_FIELD/TIMESTAMP_DN_FIELD code

use the new approach with Field->default_value expressions.
But keep the old TIMESTAMP_UN_FIELD for ON UPDATE NOW().
This commit is contained in:
Sergei Golubchik
2016-07-24 15:12:54 +02:00
parent 12d2c4fcd0
commit cd51c7fb60
9 changed files with 84 additions and 170 deletions

View File

@ -9670,8 +9670,7 @@ copy_data_between_tables(THD *thd, TABLE *from, TABLE *to,
Old fields keep their current values, and therefore should not be
present in the set of autoupdate fields.
*/
if ((*ptr)->default_value ||
((*ptr)->has_insert_default_function()))
if ((*ptr)->default_value)
{
*(dfield_ptr++)= *ptr;
++to->s->default_fields;