Project

General

Profile

Bug #1526

quasselcore - unhandled error in QSqlQuery

Added by blackntan about 2 years ago. Updated 6 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Quassel Core
Target version:
Start date:
06/18/2019
Due date:
% Done:

100%

Estimated time:
Version:
0.13.0
OS:
Linux

Description

v0.14-pre+113 git-5617bd86

Jun 18 11:21:34 vpc quasselcore[3274]: 2019-06-18 11:21:34 [Error] unhandled Error in QSqlQuery!
Jun 18 11:21:34 vpc quasselcore[3274]: 2019-06-18 11:21:34 [Error]                   last Query:
Jun 18 11:21:34 vpc quasselcore[3274]: INSERT INTO buffer (userid, networkid, buffername, buffercname, buffertype, jo
Jun 18 11:21:34 vpc quasselcore[3274]: VALUES (:userid, :networkid, :buffername, :buffercname, :buffertype, :joined)
Jun 18 11:21:34 vpc quasselcore[3274]: RETURNING bufferid
Jun 18 11:21:34 vpc quasselcore[3274]: 2019-06-18 11:21:34 [Error]               executed Query:
Jun 18 11:21:34 vpc quasselcore[3274]: INSERT INTO buffer (userid, networkid, buffername, buffercname, buffertype, jo
Jun 18 11:21:34 vpc quasselcore[3274]: VALUES (?, ?, ?, ?, ?, ?)
Jun 18 11:21:34 vpc quasselcore[3274]: RETURNING bufferid
Jun 18 11:21:34 vpc quasselcore[3274]: 2019-06-18 11:21:34 [Error]                 bound Values: :buffercname='#mpdm-
Jun 18 11:21:34 vpc quasselcore[3274]: 2019-06-18 11:21:34 [Error]                 Error Number: 22001
Jun 18 11:21:34 vpc systemd[1]: quasselcore.service: main process exited, code=killed, status=6/ABRT
Jun 18 11:21:34 vpc systemd[1]: Unit quasselcore.service entered failed state.
Jun 18 11:21:34 vpc systemd[1]: quasselcore.service failed.

Associated revisions

Revision 9fa6f420 (diff)
Added by blackntan 8 months ago

sql: Remove PostgreSQL text limits, fixes hangs

Modify all PostgreSQL text column limits to the unlimited TEXT type
instead of VARCHAR. Modern PostgreSQL versions (year 2000 onward) do
not store text any differently depending on whether or not it's TEXT
or VARCHAR.
https://www.postgresql.org/message-id/20667.971213689%40sss.pgh.pa.us

This avoids having the core fail to save values or hang entirely, and
also addresses migration issues from SQLite where text limits aren't
applied.

See https://bugs.quassel-irc.org/issues/1526

This shouldn't introduce any noticeable performance impact:
https://stackoverflow.com/questions/1067061/does-a-varchar-fields-declared-size-have-any-impact-in-postgresql

Fix up a spurious length-limited field for SQLite in case length
limits are applied in newer SQLite versions.

The proper long-term fix is to implement length checks throughout the
Quassel core (sanitizing data) and client (to warn of length issues),
rather than relying on the database to enforce limits.

Sponsored by Postgres Phone Plans. UNLIMITED TEXT, TALK, and DATA for
$9.99 a month! Some restrictions apply. This is not serious.

[Commit squashed from "jcolson", thanks!]
See https://github.com/quassel/quassel/pull/478

Fixes GH-478
Fixes #1526

History

#1 Updated by blackntan about 2 years ago

v0.14-pre+113 git-5617bd86

Jun 18 11:21:34 vpc quasselcore[3274]: 2019-06-18 11:21:34 [Error] unhandled Error in QSqlQuery!
Jun 18 11:21:34 vpc quasselcore[3274]: 2019-06-18 11:21:34 [Error]                   last Query:
Jun 18 11:21:34 vpc quasselcore[3274]: INSERT INTO buffer (userid, networkid, buffername, buffercname, buffertype, joined)
Jun 18 11:21:34 vpc quasselcore[3274]: VALUES (:userid, :networkid, :buffername, :buffercname, :buffertype, :joined)
Jun 18 11:21:34 vpc quasselcore[3274]: RETURNING bufferid
Jun 18 11:21:34 vpc quasselcore[3274]: 2019-06-18 11:21:34 [Error]               executed Query:
Jun 18 11:21:34 vpc quasselcore[3274]: INSERT INTO buffer (userid, networkid, buffername, buffercname, buffertype, joined)
Jun 18 11:21:34 vpc quasselcore[3274]: VALUES (?, ?, ?, ?, ?, ?)
Jun 18 11:21:34 vpc quasselcore[3274]: RETURNING bufferid
Jun 18 11:21:34 vpc quasselcore[3274]: 2019-06-18 11:21:34 [Error]                 bound Values: :buffercname='#mpdm-declan.oshanahan--jay.colson--paul.richardson--nicky.white--cian.osullivan--cian.doyle--carol.croke--colum.walsh--max.bacik-1', :buffername='#mpdm-declan.oshanahan--jay.colson--paul.richardson--nicky.white--cian.osullivan--cian.doyle--carol.croke--colum.walsh--max.bacik-1', :buffertype=2, :joined=TRUE, :networkid=2, :userid=1
Jun 18 11:21:34 vpc quasselcore[3274]: 2019-06-18 11:21:34 [Error]                 Error Number: 22001
Jun 18 11:21:34 vpc systemd[1]: quasselcore.service: main process exited, code=killed, status=6/ABRT
Jun 18 11:21:34 vpc systemd[1]: Unit quasselcore.service entered failed state.
Jun 18 11:21:34 vpc systemd[1]: quasselcore.service failed.

#3 Updated by blackntan 8 months ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF