• Sergei Golubchik's avatar
    MDEV-10201 Bad results for CREATE TABLE t1 (a INT DEFAULT b, b INT DEFAULT 4) · cd4dd2b6
    Sergei Golubchik authored
    Optionally do table->update_default_fields() even for INSERT
    that supposedly provides values for all column. Because these
    "values" might be DEFAULT, which would need table->update_default_fields()
    at the end.
    
    Also set Item_default_value::used_tables() from the default expression.
    Non-zero used_field() means that mysql_insert() will initialize all
    fields to their default values (with restore_record()) even if
    all columns are later provided with values. Because default expressions
    may refer to other columns and they must be initialized.
    cd4dd2b6
default.result 99.2 KB