maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #11096
Re: Mdev-15085 Invisible Column Non-constant Default value results...
Hi, Sachin!
ok to push!
On Jan 30, Sachin Setiya wrote:
> commit a2e6d3a2fe6842bd3c35dffb1cd6f6d8a3117107
> Author: Sachin Setiya <sachin.setiya@xxxxxxxxxxx>
> Date: Tue Jan 30 14:04:05 2018 +0530
>
> Mdev-15085 Invisible Column Non-constant Default value results...
>
> Problem:- If we create table field with dynamic default value then that
> field always gets NULL value.
>
> Analyze:- This is because in fill_record we simple continue at Invisible
> column because we though that share->default_values(default value is
> always copied into table->record[0] before insert) will have a default
> value for them(which is true for constant defaults , but not for dynamic
> defaults).
>
> Solution:- We simple set all_fields_have_value to null , and this will
> make call to update_default_fields (in the case of dynamic default), And
> default expr will be evaluted and value will be set in field.
Regards,
Sergei
Chief Architect MariaDB
and security@xxxxxxxxxxx