You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-07 03:22:57 +03:00
fix(ddl): MCOL-5974 TIMESTAMP columns are not IS NOT NULL by default in MCS (#3670)
The old behavior was to assign TIMESTAMP columns an IS NOT NULL constraint if list of constraints was empty. Apparently, this particular invariant was changed in 11.4 and bugfixes' mcol-5480.test started to fail. This patch fixes behavioral difference and reenables mcol-5480 test in 11.4.
This commit is contained in:
@@ -867,12 +867,14 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& /*ta
|
||||
return rc;
|
||||
}
|
||||
|
||||
#if MYSQL_VERSION_ID < 110400
|
||||
// For TIMESTAMP, if no constraint is given, default to NOT NULL
|
||||
if (createTable->fTableDef->fColumns[i]->fType->fType == ddlpackage::DDL_TIMESTAMP &&
|
||||
createTable->fTableDef->fColumns[i]->fConstraints.empty())
|
||||
{
|
||||
createTable->fTableDef->fColumns[i]->fConstraints.push_back(new ColumnConstraintDef(DDL_NOT_NULL));
|
||||
}
|
||||
#endif
|
||||
|
||||
if (createTable->fTableDef->fColumns[i]->fDefaultValue)
|
||||
{
|
||||
|
Reference in New Issue
Block a user