attr-sql: Don't use database transactions in create_attribute_enumerator

There could, of course, be race conditions when enumerating the attributes,
but those probably don't matter (e.g. missing an attribute that was
concurrently added).

Transactions are more intended to revert multiple changes if anything
fails in the process.
This commit is contained in:
Tobias Brunner 2013-09-05 17:03:11 +02:00
parent fad11d602d
commit 4b8b1354ce
1 changed files with 0 additions and 5 deletions

View File

@ -346,8 +346,6 @@ METHOD(attribute_provider_t, create_attribute_enumerator, enumerator_t*,
u_int count;
char *name;
this->db->execute(this->db, NULL, "BEGIN EXCLUSIVE TRANSACTION");
/* in a first step check for attributes that match name and id */
if (id)
{
@ -418,8 +416,6 @@ METHOD(attribute_provider_t, create_attribute_enumerator, enumerator_t*,
pool_enumerator->destroy(pool_enumerator);
}
this->db->execute(this->db, NULL, "END TRANSACTION");
/* lastly try to find global attributes */
if (!attr_enumerator)
{
@ -474,4 +470,3 @@ sql_attribute_t *sql_attribute_create(database_t *db)
DB_UINT, now);
return &this->public;
}