Hello,
Well, I don't know how exactly you build sogo but sogo create dynamically the 
table with correct length. Look for:
- (NSString *) createSessionsFolderWithName: (NSString *) tableName
{
  static NSString *sqlFolderFormat
    = (@"CREATE TABLE %@ (" 
       @" c_id VARCHAR(255) PRIMARY KEY,"
       @" c_value VARCHAR(4096) NOT NULL,"
       @" c_creationdate INT NOT NULL,"
       @" c_lastseen INT NOT NULL)");

  return [NSString stringWithFormat: sqlFolderFormat, tableName];
}

Once sogo is build, you don't need to run any script concerning the database 
except if an older version of sogo was previously used.

Quentij

-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Boguslaw Juza
Sent: vendredi 3 novembre 2023 09:39
To: [email protected]
Subject: [SOGo] GCSSessionsFolder - Data too long for column 'c_value'

      Hello :)

SOGo 5.9 installed from sources, RockyLinux9

SOGo kicks users after 5 min. of inactivity. The error notice apperars in the 
log:

Nov 03 09:22:55 sogod [1682]: [ERROR] <...[GCSSessionsFolder]> 
-[GCSSessionsFolder
writeRecordForEntryWithID:value:creationDate:lastSeenDate:]: cannot write 
record: <MySQL4Exception: ...> NAME:ExecutionFailed REASON:Data too long for 
column 'c_value' at row 1

There is the database scheme in Scripts/mysql-utf8mb4.sql:

CREATE TABLE sogo_sessions_folder (
         c_id           varchar(255) NOT NULL,
         c_value        varchar(255) NOT NULL,
         c_creationdate int(11)      NOT NULL,
         c_lastseen     int(11)      NOT NULL,
         PRIMARY KEY (c_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

I've increased c_value to varchar(4096), it solved the problem, and the data 
stored in c_value is 2100 bytes long.

Is it the mistake in the instalation script or something went wrong while 
compilation process?


                                          Boguslaw Juza

Reply via email to