Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 395404 Details for
Bug 513248
net-mail/dbmail-3.1.13 - LMTP daemon fails to connect to PostgreSQL database - dbmail/lmtpd[10204]: Error:[db] db_query(+370): SQLException: ERROR: insert or update on table "dbmail_messages" violates foreign key constraint "dbmail_messages_phys
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for reliable retrieval of physical message id
dm_db.patch (text/plain), 1.05 KB, created by
David W Noon
on 2015-02-02 19:06:51 UTC
(
hide
)
Description:
Patch for reliable retrieval of physical message id
Filename:
MIME Type:
Creator:
David W Noon
Created:
2015-02-02 19:06:51 UTC
Size:
1.05 KB
patch
obsolete
>--- src/dm_db.c >+++ src/dm_db.c >@@ -568,17 +575,26 @@ > > if (! db_result_next(r)) { /* ignore */ } > >- // lastRowId is always zero for pgsql tables without OIDs >- // or possibly for sqlite after calling executeQuery but >- // before calling db_result_next >- >- if ((id = (uint64_t )Connection_lastRowId(c)) == 0) { // mysql >- // but if we're using 'RETURNING id' clauses on inserts >- // or we're using the sqlite backend, we can do this >+ // The old methods of handling results no longer work. >+ // Use the database driver to determine how to retrieve the resulting >+ // message id. >+ switch (db_params.db_driver) >+ { >+ case DM_DRIVER_POSTGRESQL: >+ id = db_result_get_u64(r, 0); // postgresql >+ break; >+ >+ case DM_DRIVER_SQLITE: >+ case DM_DRIVER_MYSQL: >+ case DM_DRIVER_ORACLE: >+ id = (uint64_t) Connection_lastRowId(c); // sqlite, mysql, oracle >+ break; > >- if ((id = (uint64_t )Connection_lastRowId(c)) == 0) // sqlite >- id = db_result_get_u64(r, 0); // postgresql >+ default: >+ TRACE(TRACE_DATABASE, "Unknown driver"); >+ break; > } >+ > assert(id); > return id; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 513248
:
378898
|
378900
|
378904
|
392812
| 395404 |
395406