Summary | MDB2 error on changing share permissions with SQL Driver |
Queue | Horde Framework Packages |
Queue Version | FRAMEWORK_3 |
Type | Bug |
State | Resolved |
Priority | 2. Medium |
Owners | chuck (at) horde (dot) org |
Requester | michael.menge (at) zdv (dot) uni-tuebingen (dot) de |
Created | 10/23/2008 (6102 days ago) |
Due | |
Updated | 01/29/2009 (6004 days ago) |
Assigned | 01/29/2009 (6004 days ago) |
Resolved | 01/29/2009 (6004 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
State ⇒ Resolved
more efficiently depending on the actual db handling of prepared
statements, etc. Anyways this code will be ported to Horde_Db for
horde 4, so I don't see a need to mess with it if it's working.
the changes for this Bug
so executeMultiple can be used again.
enough updates going on for load to be an issue, you'll run into
bottlenecks in other places far sooner.
It's not an issue for groups; the debug handler isn't used there (so
hopefully isn't necessary).
prepare-statement
is executed for every user and group that has permissions on a share.
I think it would be better
to reset the databaseconnection only if there is a need to do so.
We don't use Groups, but grep -R -F executeMultiple *
showed that there is also lib/Horde/Group/sql.php which uses executeMultiple.
Is there the same problem?
Assigned to Chuck Hagenbuch
State ⇒ Resolved
postgres driver uses real prepared statements while the mysql driver
emulates them. I think the fix is to just not use executeMultiple.
Done for 3.3.1.
http://cvs.horde.org/diff.php/framework/Share/Share/sql.php?r1=1.58&r2=1.59&ty=u
http://cvs.horde.org/diff.php/horde/docs/CHANGES?r1=1.1176&r2=1.1177&ty=u
bug #6997with the irc discussion that led to the current solution.State ⇒ Feedback
Someone who has better knowledge of PostgreSQL's connection handling
and the details of MDB2 has take a look at it.
My first guess is, that the pgsql driver handles unsetting of
connected_database_name differently than the mysql driver.
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Queue ⇒ Horde Framework Packages
Summary ⇒ MDB2 error on changing share permissions with SQL Driver
Type ⇒ Bug
Priority ⇒ 2. Medium
MDB2 2.4.1
MDB2_Driver_pgsql 1.4.1
MDB2_Driver_querysim 0.6.0
MDB2_Schema 0.8.2
PostgreSQL 8.1.11
Changing permissions for shares ersults in an MDB2 error
prepared statement
"mdb2_statement_pgsql_0e0c6cd9ec2d2223511d9bc21134714a" does not exist
The executeMultiple() tries to execute the prepared statement for each user,
which has permissions on the share. The databese log shows that the execute
inserts the permissions for the first user (normaly the owner of the share).
Than the databaseconnection is reset. After a reconnect the
next execute fails as the prepared statement does not exist anymore.
The reset of the databaseconnection is caused by the function _selectDB
in lib/Horde/Share/sql.php
The function was introduced with the patch
http://cvs.horde.org/diff.php/framework/Share/Share/sql.php?r1=1.47&r2=1.48&ty=u
which was done to solve the BUG http://bugs.horde.org/ticket/6997