Skip to content

ownCloud 8.2.9 use bigger datatype for timestamp in postgres #26706

@JKawohl

Description

@JKawohl

Server Version 8.2.9

Exception: {"Message":"HTTP\/1.1 500 An exception occurred while executing 'INSERT INTO \"oc_filecache\" (\"mimepart\",\"mimetype\",\"mtime\",\"size\",\"etag\",\"storage_mtime\",\"permissions\",\"parent\",\"path_hash\",\"path\",\"name\",\"storage\") SELECT ?,?,?,?,?,?,?,?,?,?,?,? FROM \"oc_filecache\" WHERE \"storage\" = ? AND \"path_hash\" = ? HAVING COUNT(*) = 0' with params [33, 49, 4128055808, 14250992, \"ae5ea1b4ceaa46dc3ad6681b37327958\", 4128055808, 27, 3137024, \"65cdabf001c82a51ceec6cea593c683f\", \"files\\\/StuR\\\/Demos\\\/Festo_Muskel_2009_05_04\\\/Film_01.AVI\", \"Film_01.AVI\", 6984, 6984, \"65cdabf001c82a51ceec6cea593c683f\"]:\n\nSQLSTATE[22003]: Numeric value out of range: 7 FEHLER: Wert \u201e4128055808\u201c ist au\u00dferhalb des g\u00fcltigen Bereichs f\u00fcr Typ integer","Exception":"Sabre\\DAV\\Exception","Code":0,"Trace":"#0 \/srv\/www\/htdocs\/owncloud\/lib\/private\/connector\/sabre\/file.php(454): OC\\Connector\\Sabre\\File->convertToSabreException(Object(Doctrine\\DBAL\\Exception\\DriverException))\n#1 \/srv\/www\/htdocs\/owncloud\/lib\/private\/connector\/sabre\/file.php(101): OC\\Connector\\Sabre\\File->createFileChunked(Resource id #361)\n#2 \/srv\/www\/htdocs\/owncloud\/lib\/private\/connector\/sabre\/directory.php(115): OC\\Connector\\Sabre\\File->put(Resource id #361)\n#3 \/srv\/www\/htdocs\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(1053): OC\\Connector\\Sabre\\Directory->createFile('Film_01.AVI-chu…', Resource id #361)\n#4 \/srv\/www\/htdocs\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php(513): Sabre\\DAV\\Server->createFile('StuR\/Demos\/Fest...', Resource id #361, NULL)\n#5 [internal function]: Sabre\\DAV\\CorePlugin->httpPut(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#6 \/srv\/www\/htdocs\/owncloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#7 \/srv\/www\/htdocs\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(469): Sabre\\Event\\EventEmitter->emit('method:PUT', Array)\n#8 \/srv\/www\/htdocs\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(254): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#9 \/srv\/www\/htdocs\/owncloud\/apps\/files\/appinfo\/remote.php(56): Sabre\\DAV\\Server->exec()\n#10 \/srv\/www\/htdocs\/owncloud\/remote.php(137): require_once('\/srv\/www\/htdocs...')\n#11 {main}","File":"\/srv\/www\/htdocs\/owncloud\/lib\/private\/connector\/sabre\/file.php","Line":516}

This happens every minute owncloud tries to drop in the db ‚4128055808‘ which outmaxes the postgres integer max value. (max 2147483647) . MySQL could still use this value as unsigned int (max 4294967295).

The inconsistency of the datatypes here causes problems:

4128055808 is not a valid timestamp, well this would be Date: 10/24/2100 @ 10:10am (UTC)
We do not support files from the future.

And hopefully Postgres (max 2147483647) will be ready for 01/19/2038 @ 3:14am (UTC)

It would be an enhancement to use a datatype in postgres that supports values above 2147483647

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions