Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Support expressions (functions) for field defaults (table definition), ALTER, INSERT, CREATE? #14371

@OlafvdSpek

Description

@OlafvdSpek

MariaDB 10.2 supports expressions for field defaults. However pMA escapes and quotes the expression, causing it to become an ordinary string.

ALTER TABLE `photo_likes` CHANGE `created` `created` INT(11) NOT NULL DEFAULT unix_timestamp();

https://mariadb.com/kb/en/library/create-table/#default

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA problem or regression with an existing featureaffects/5.2This issue or pull-request affects 5.2.x releases (and maybe further versions)affects/6.0This issue or pull-request affects 6.0.x releases (and maybe further versions)confirmed/5.2This issue is confirmed to be reproduced on 5.2 at the time this label was setconfirmed/6.0This issue is confirmed to be reproduced on 6.0 at the time this label was set

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions