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
Merge pull request #164 from mariadb-corporation/MCOL-697
MCOL-697 Limit the return length for LONGBLOB
This commit is contained in:
@@ -2230,7 +2230,15 @@ CalpontSystemCatalog::ColType colType_MysqlToIDB (const Item* item)
|
|||||||
break;
|
break;
|
||||||
case STRING_RESULT:
|
case STRING_RESULT:
|
||||||
ct.colDataType = CalpontSystemCatalog::VARCHAR;
|
ct.colDataType = CalpontSystemCatalog::VARCHAR;
|
||||||
|
// MCOL-697 the longest TEXT we deal with is 2100000000 so
|
||||||
|
// limit to that. Otherwise for LONGBLOB ct.colWidth ends
|
||||||
|
// up being -1 and demons eat your data and first born
|
||||||
|
// (or you just get truncated to 20 bytes with the 'if'
|
||||||
|
// below)
|
||||||
|
if (item->max_length < 2100000000)
|
||||||
ct.colWidth = item->max_length;
|
ct.colWidth = item->max_length;
|
||||||
|
else
|
||||||
|
ct.colWidth = 2100000000;
|
||||||
// force token
|
// force token
|
||||||
if (item->type() == Item::FUNC_ITEM)
|
if (item->type() == Item::FUNC_ITEM)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user