attr-sql: Handle concurrent insertion of identities
authorTobias Brunner <tobias@strongswan.org>
Fri, 13 Sep 2013 11:25:49 +0000 (13:25 +0200)
committerTobias Brunner <tobias@strongswan.org>
Fri, 11 Oct 2013 13:16:05 +0000 (15:16 +0200)
commit5abe3c52d396339f3e1ac5f5a63cb8a4dfa0209d
tree920eed6c686d2b71b88974fa25a45b5e0c1a1819
parent4b8b1354cea559844d7cbf2e460e90dab3655fad
attr-sql: Handle concurrent insertion of identities

If the same identity is added concurrently by two threads (or by the
pool utility) INSERT might fail even though the SELECT was unsuccessful
before.

We are currently not able to lock the identities table in a portable way
(something like SELECT ... FOR UPDATE on MySQL).
src/libhydra/plugins/attr_sql/sql_attribute.c