[Date Prev][Date Next]
Re: back-sql mysql innodb
- To: firstname.lastname@example.org
- Subject: Re: back-sql mysql innodb
- From: Frederik Bosch <email@example.com>
- Date: Wed, 28 Jul 2010 15:26:50 +0200
- Cc: firstname.lastname@example.org
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=ZLHAOMqX/osnnHEuydWP5jVvERvJn9yxAWgcvoQj0Ck=; b=PmOeo6waInfjn1dGCalBWdAJJ+/qW+k4CgByMxZcHtzFr8SvWSavIselXrK1AbQDyW +hRVFa2zORK/4XGhT+WiRPAaBYGsFyvzCjBwZQulHS0WolJBHc5EBsCxLtRUyMu9WCW6 ak4v/EDPaPhGEqyuaEPchAT4n7fhUghF5cyhs=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=t4I/9h91R0rEYLkKSmmlUx6160w4eJxZBCpd2on06afxuaUYfZPgCEYxHCdJvNivm3 WEq+GgziXh5CkqaBqwTULUnw+kik4y82mGgCgYf3rRyiWbX6kLN9dsy6jAoBlOk1Mm+D gb9fpAo0rVaQ0kOS7/5djCb+r7Leno8VR85rA=
- In-reply-to: <email@example.com>
- References: <4C500752.firstname.lastname@example.org> <4C5020EC.email@example.com> <firstname.lastname@example.org>
- User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:126.96.36.199) Gecko/20100713 Thunderbird/3.0.6
Thanks p.. I did some more testing and you are right. It is a RDBMS
problem. This is what I found (tested with iSQL and directly on the RDBMS).
In chronological order:
1. SET autocommit=0
2. SELECT @@autocommit -> result: 0, it is turned off
This is standard slapd/back-sql config.
3. SELECT * FROM ldap_entries -> 10 results
4. Now I change the data directly using a different connection and other
GUI. I add a record (and commit it).
5. SELECT * FROM ldap_entries -> 10 results
The latter result surprised me. So if data is changed by another
connection, it will not be refresh data on other connections.
7. SELECT * FROM ldap_entries -> 11 results
So, in order to refresh data, slapd has to prepend every read operation
with a COMMIT. This is not logical, is it?
So, I believe adding a configuration option, for people who want to use
back-sql with MySQL/InnoDB, could be a handy solution. Where can I add
this feature request?
On 07/28/2010 03:01 PM, email@example.com wrote:
Problem solved. I had to comment a line in sql_wrap.c:
* TimesTen : Turn off autocommit. We must explicitly
* commit any transactions.
SQLSetConnectOption( *dbhp, SQL_AUTOCOMMIT, SQL_AUTOCOMMIT_OFF );
This last line actually prevents slapd from updating resultsets (which
are committed) in InnoDB.
I believe this is not correct; we need autocommit to be off since
operations that need a commit explicitly do it. I think the problem is in
the RDBMS you're using, since other RDBMSes always worked as intended.
Perhaps autocommit should be enabled by default, but the user should be
able to disable it through a configuration option in slapd.conf. Should
I file a request or bug for this?
Feel free. Configuration options that improve interoperation are always
welcome, pending my comment above.