Opened 7 years ago

Closed 6 years ago

#1484068 closed Bugs (fixed)

Bug in database handling for postgres

Reported by: bobtfish Owned by: thomasb
Priority: 5 Milestone: 0.1-rc1
Component: Database Version: 0.1-beta
Severity: critical Keywords:
Cc:

Description

Took me a while of tracing through the application to work this one out..
The function which has a problem is 'insert_id' in program/include/rcube_db.inc

For postgresql, no value is returned from the switch statement, which implicitly falls through, runs the query 'SELECT @@IDENTITY' which generates an exception, and then returns this exception..

This causes a row in the 'identity' table to not be created when a user is created and you are using the 'virtuser_query' config setting.

Trivial patch to fix attached.

Attachments (1)

roundcube-postgres-bugfix.patch (522 bytes) - added by bobtfish 7 years ago.
Fix a bug in the handling of postgres databases.

Download all attachments as: .zip

Change History (3)

Changed 7 years ago by bobtfish

Fix a bug in the handling of postgres databases.

comment:1 Changed 6 years ago by thomasb

  • Milestone set to 0.1-rc1
  • Owner set to thomasb

comment:2 Changed 6 years ago by thomasb

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in Trunk ([e6c7c3ca])

Note: See TracTickets for help on using tickets.