You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
MCOL-270 Add support for MEDIUMINT data type
This commit is contained in:
@ -139,7 +139,6 @@ bool typesAreSame(const CalpontSystemCatalog::ColType& colType, const ColumnType
|
||||
|
||||
break;
|
||||
|
||||
// Don't think there can be such a type in syscat right now...
|
||||
case (CalpontSystemCatalog::MEDINT):
|
||||
if (newType.fType == DDL_MEDINT && colType.precision == newType.fPrecision &&
|
||||
colType.scale == newType.fScale) return true;
|
||||
@ -149,6 +148,12 @@ bool typesAreSame(const CalpontSystemCatalog::ColType& colType, const ColumnType
|
||||
// colType.scale == newType.fScale) return true;
|
||||
break;
|
||||
|
||||
case (CalpontSystemCatalog::UMEDINT):
|
||||
if (newType.fType == DDL_UNSIGNED_MEDINT && colType.precision == newType.fPrecision &&
|
||||
colType.scale == newType.fScale) return true;
|
||||
|
||||
break;
|
||||
|
||||
case (CalpontSystemCatalog::INT):
|
||||
if (newType.fType == DDL_INT && colType.precision == newType.fPrecision &&
|
||||
colType.scale == newType.fScale) return true;
|
||||
@ -2103,7 +2108,6 @@ void AlterTableProcessor::tableComment(uint32_t sessionID, execplan::CalpontSyst
|
||||
break;
|
||||
|
||||
case CalpontSystemCatalog::INT:
|
||||
case CalpontSystemCatalog::MEDINT:
|
||||
if (static_cast<int64_t>(nextVal) > MAX_INT)
|
||||
validated = false;
|
||||
|
||||
@ -2113,12 +2117,26 @@ void AlterTableProcessor::tableComment(uint32_t sessionID, execplan::CalpontSyst
|
||||
break;
|
||||
|
||||
case CalpontSystemCatalog::UINT:
|
||||
case CalpontSystemCatalog::UMEDINT:
|
||||
if (nextVal > MAX_UINT)
|
||||
validated = false;
|
||||
|
||||
break;
|
||||
|
||||
case CalpontSystemCatalog::MEDINT:
|
||||
if (static_cast<int64_t>(nextVal) > MAX_MEDINT)
|
||||
validated = false;
|
||||
|
||||
if (static_cast<int64_t>(nextVal) < 1)
|
||||
negative = true;
|
||||
|
||||
break;
|
||||
|
||||
case CalpontSystemCatalog::UMEDINT:
|
||||
if (nextVal > MAX_UMEDINT)
|
||||
validated = false;
|
||||
|
||||
break;
|
||||
|
||||
case CalpontSystemCatalog::SMALLINT:
|
||||
if (static_cast<int64_t>(nextVal) > MAX_SMALLINT)
|
||||
validated = false;
|
||||
|
Reference in New Issue
Block a user