dovecot-2.2: lib-sql: sqlpool needs to change transaction querie...
dovecot at dovecot.org
dovecot at dovecot.org
Wed Sep 23 22:05:22 UTC 2015
details: http://hg.dovecot.org/dovecot-2.2/rev/59e4fcaa0f76
changeset: 19202:59e4fcaa0f76
user: Timo Sirainen <tss at iki.fi>
date: Thu Sep 24 01:00:45 2015 +0300
description:
lib-sql: sqlpool needs to change transaction queries' transaction pointer
Otherwise query->trans points to the sqlpool's transaction, while our
backends want it to point to the backend's transaction.
diffstat:
src/lib-sql/driver-sqlpool.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diffs (19 lines):
diff -r b8d2cbd6583b -r 59e4fcaa0f76 src/lib-sql/driver-sqlpool.c
--- a/src/lib-sql/driver-sqlpool.c Wed Sep 23 23:01:27 2015 +0300
+++ b/src/lib-sql/driver-sqlpool.c Thu Sep 24 01:00:45 2015 +0300
@@ -126,12 +126,15 @@
struct sql_db *conndb)
{
struct sql_transaction_context *conn_trans;
+ struct sql_transaction_query *query;
conn_trans = sql_transaction_begin(conndb);
/* backend will use our queries list (we might still append more
queries to the list) */
conn_trans->head = trans->ctx.head;
conn_trans->tail = trans->ctx.tail;
+ for (query = conn_trans->head; query != NULL; query = query->next)
+ query->trans = conn_trans;
return conn_trans;
}
More information about the dovecot-cvs
mailing list