[dev] Horde groupware & sqlite3
Pieter Vanmeerbeek
pieter.vanmeerbeek at able.be
Tue Aug 29 08:05:58 PDT 2006
Hi,
After struggling with different version of sqlite, I wanted to check the
setup script first. So I installed php 5.1.6 with sqlite 2 as a shared
module loaded in php.ini .
Running the setup script for groupware using sqlite as db back-end results
in the error reported below. So I suppose nobody has tried the setup script
with sqlite yet :
[ ERROR! ] Creating the database failed. Please see the manual at
docs/INSTALL
for how to setup the database manually. Error messages:
MDB2 Error: already exists
_doQuery: [Error message: Could not execute statement]
[Last query: CREATE UNIQUE INDEX primary_idx ON horde_histories (history_id
ASC)]
[Native code: 1]
[Native message: index primary_idx already exists]
I've done some debugging and found out that the cause of this error is due
to the naming of indexes in different databases. In the xml description
(scripts/sql/create.xml) a primary index is created on the tables :
<name>horde_datatree</name>
...
<index>
<name>primary </name>
<primary>true</primary>
<field>
<name>datatree_id</name>
</field>
</index>
Postgress will create an index using the 'horde_datatree_pkey' name. SQlite
however will use 'primary' as index name, resulting in multiple indexes with
the name primary ,which is what the error above says
Changing the name tag to a unique one solves the problem :
<name>horde_datatree_pkey</name>
I suppose this change will not affect other databases as the index name
itself is never used in a query. Perhaps this should be changed in cvs.
Kind regards,
Pieter
--
---------------------------------------------------
Able: 1996-2006: already 10 safe years in YOUR company!
aXs GUARD has completed security and anti-virus checks on this e-mail (http://www.axsguard.com)
---------------------------------------------------
Able NV: ond.nr 0457.938.087
RPR Mechelen
More information about the dev
mailing list