You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The default column values in create table statements after running show create table contain invalid default values that do not correspond to the original tables.
A non-exhaustive list of examples:
timestamp/datetime NOT NULL without a default value appears with the default value 0 in the resulting create statement.
decimal(x,y) NOT NULL without a default value appears with a default value 0 in the resulting create statement.
bigint(x) NOT NULL 0 appears without a default value in the resulting create statement
This issue seems to happen when we run create statements and force NOT NULL columns to always have a default value. This is likely necessary for compatibility with WordPress queries that don't expect strict checks. We could consider storing the original default value (if any) in the _mysql_data_types_cache table and use that as the source of truth when we run show create queries.
The text was updated successfully, but these errors were encountered:
The default column values in create table statements after running
show create table
contain invalid default values that do not correspond to the original tables.A non-exhaustive list of examples:
timestamp/datetime NOT NULL
without a default value appears with the default value0
in the resulting create statement.decimal(x,y) NOT NULL
without a default value appears with a default value0
in the resulting create statement.bigint(x) NOT NULL 0
appears without a default value in the resulting create statementThis issue seems to happen when we run create statements and force NOT NULL columns to always have a default value. This is likely necessary for compatibility with WordPress queries that don't expect strict checks. We could consider storing the original default value (if any) in the
_mysql_data_types_cache
table and use that as the source of truth when we runshow create
queries.The text was updated successfully, but these errors were encountered: