[Tickets #7525] uncatched failed prepare statements in convert_datatree_shares_to_sql
bugs at horde.org
bugs at horde.org
Tue Oct 21 08:11:35 UTC 2008
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/7525
------------------------------------------------------------------------------
Ticket | 7525
Created By | michael.menge at zdv.uni-tuebingen.de
Summary | uncatched failed prepare statements in
| convert_datatree_shares_to_sql
Queue | Ingo
Version | 1.2.1
Type | Bug
State | Unconfirmed
Priority | 1. Low
Milestone |
Patch | 1
Owners |
+New Attachment | ingo_convert_datatree_shares_to_sql.patch
------------------------------------------------------------------------------
michael.menge at zdv.uni-tuebingen.de (2008-10-21 04:11) wrote:
All convert_datatree_shares_to_sql scripts don't catch failed prepare
statements,
which may lead to an inconsistent database and cause a fatal php error,
trying to call the non existing function "execute" on a MDB2_Error object.
This is a patch for ingo-h3-1.2.1
It catches the failed prepare statement on write sql statements
(INSERT and DELETE)
and encapsulate them in a transaction to rollback on error. This is to
keep the
database in an consistent state and to allow to rerun the script on
errors with out
loosing or dublicating any shares. This patch also returns more
informations as
"Unkown Error" is not a very usefull.
The following problems are still open as i did not need them to solve for me.
- This patch requieres the database to support transactions. I don't know if
Horde supports any database that don't support transactions, but it should
be cecked.
- This patch does not catch failed prepare statements on SELECT statements.
This may result in the same fatal error.
More information about the bugs
mailing list