Commit e85dfe90 authored by Thomas Hohn's avatar Thomas Hohn Committed by Christian Kuhn
Browse files

[BUGFIX] Fix SQL error in createEntryData

The database field definition for ref_string is limited to varchar(200)
and can cause an SQL error when bigger strings are inserted.
In addition it makes sense to add a mb_substr() to avoid an error if
longer strings are inserted.

Fixes: #79425
Releases: master
Change-Id: I1f1e672f610f830ad5e02509cb1f0529c9cbeb41
Reviewed-on: https://review.typo3.org/51397

Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
Reviewed-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent fdd4e302
......@@ -417,7 +417,7 @@ class ReferenceIndex
'workspace' => $this->getWorkspaceId(),
'ref_table' => $ref_table,
'ref_uid' => $ref_uid,
'ref_string' => $ref_string
'ref_string' => mb_substr($ref_string, 0, 1024)
];
}
......
......@@ -580,7 +580,7 @@ CREATE TABLE sys_refindex (
workspace int(11) DEFAULT '0' NOT NULL,
ref_table varchar(255) DEFAULT '' NOT NULL,
ref_uid int(11) DEFAULT '0' NOT NULL,
ref_string varchar(200) DEFAULT '' NOT NULL,
ref_string varchar(1024) DEFAULT '' NOT NULL,
PRIMARY KEY (hash),
KEY lookup_rec (tablename,recuid),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment