Skip to content

SHOW CREATE TABLE returns incorrect statement for json field default #4003

@dphil

Description

@dphil

Using dolt 0.40.21 and using a db initialized with the new DOLT_DEFAULT_BIN_FORMAT=DOLT_1 flag.

In the CREATE TABLE call, a particular column is defined as follows:
metadata json default '{}'

But if I call SHOW CREATE TABLE tablename, it shows the field as:
metadata json DEFAULT '{map[]}'

If I then try to create a new table using the output of that SHOW CREATE TABLE command, I get the following error on that field:
Error 1105: incompatible type for default value
presumably because the default should be '{}', not '{map[]}'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions