1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

MCOL-4758 Limit LONGTEXT and LONGBLOB to 16MB (#1995)

MCOL-4758 Limit LONGTEXT and LONGBLOB to 16MB

Also add the original test case from MCOL-3879.
This commit is contained in:
David.Hall
2021-07-05 01:09:41 -05:00
committed by GitHub
parent 643c06b7fe
commit 237cad347f
9 changed files with 96 additions and 17 deletions

View File

@ -87,11 +87,8 @@ void fix_column_length(SchemaObject* elem, const CHARSET_INFO* def_cs) {
column->fType->fLength = 255;
else if (column->fType->fLength <= 65535)
column->fType->fLength = 65535;
else if (column->fType->fLength <= 16777215)
else
column->fType->fLength = 16777215;
else if (column->fType->fLength <= 2100000000)
column->fType->fLength = 2100000000;
// otherwise leave the decision to a caller code
}
}
@ -1000,7 +997,7 @@ blob_type:
| LONGBLOB
{
$$ = new ColumnType(DDL_BLOB);
$$->fLength = 2100000000;
$$->fLength = 16777215;
}
;
@ -1029,7 +1026,7 @@ text_type:
| LONGTEXT
{
$$ = new ColumnType(DDL_TEXT);
$$->fLength = 2100000000;
$$->fLength = 16777215;
}
;