Commit 11e16238 authored by Christian Kuhn's avatar Christian Kuhn Committed by Benni Mack
Browse files

[BUGFIX] Reduce ses_id field length

The patch for #93131 increased the db size of field ses_id
in tables fe_sessions and be_sessions from 32 to 255 chars.
The field is the tables primary key.
With mysql/mariadb, if the table is created on an older db
engine version that creates innodb tables with COMPACT
row format using utf8_mb4 charset, the key length now
exceeds the COMPACT maximum index length restrition of 767
bytes: 4*255+1 = 1021 bytes
Since we don't strictly need a varchar(255), the patch
reduces the field to 190, which does not collide with
maximum key length restrictions: 4*190+1 = 761 bytes

Change-Id: Ifc344a68a49ce0b863109cbfe8a7d27c0179c0cf
Resolves: #93150
Related: #93131
Releases: master, 10.4
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/67336

Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
parent 90b02f9f
......@@ -25,7 +25,7 @@ CREATE TABLE be_groups (
# Table structure for table 'be_sessions'
#
CREATE TABLE be_sessions (
ses_id varchar(255) DEFAULT '' NOT NULL,
ses_id varchar(190) DEFAULT '' NOT NULL,
ses_iplock varchar(39) DEFAULT '' NOT NULL,
ses_userid int(11) unsigned DEFAULT '0' NOT NULL,
ses_tstamp int(11) unsigned DEFAULT '0' NOT NULL,
......
......@@ -25,7 +25,7 @@ CREATE TABLE fe_groups (
# Table structure for table 'fe_sessions'
#
CREATE TABLE fe_sessions (
ses_id varchar(255) DEFAULT '' NOT NULL,
ses_id varchar(190) DEFAULT '' NOT NULL,
ses_iplock varchar(39) DEFAULT '' NOT NULL,
ses_userid int(11) unsigned DEFAULT '0' NOT NULL,
ses_tstamp int(11) unsigned DEFAULT '0' NOT NULL,
......
Markdown is supported
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