I've updated the script with the correct value.

Quentin

-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of qhivert
Sent: vendredi 3 novembre 2023 11:50
To: [email protected]
Subject: RE: [SOGo] GCSSessionsFolder - Data too long for column 'c_value'

Oh ok,
Maybe this script has not been updated with the correct length value then. I 
will check that.

Quentin

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

     Hi,

The comment from Scripts/mysql-utf8mb4.sql, from Sogo 5.9 dist:

-- This schema includes some specific table creation
-- parameters needed for complete Unicode coverage
-- (required for emoji character support, for instance).
--
-- Note: SOGo automagically creates those tables on start,
-- but *without* full Unicode compliance.  So this schema
-- must be imported before SOGo runs for the first time.

That's true, that SOGo could create this table dynamically, but there were 
problems with national characters in names.
So I've found this file and run it before SOGo first run.

                                        Boguslaw Juza


W dniu 3.11.2023 o 11:21, qhivert ([email protected]) pisze:
> 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