Home » Internationalization » Translation2 » Bug #2546
[PATCH] DB Admin container uses non-portable CREATE ... KEY / UNIQUE KEY syntax
Details
| Submitted | 2004-10-16 19:49 UTC |
|---|---|
| From | ieure at php dot net |
| Assigned | quipo |
| Status | Closed |
| Package | Translation2 |
| PHP Version | 4.3.9 |
| OS | Linux |
| Roadmaps | (Not assigned) |
Comments
[2004-10-16 19:49 UTC] ieure at php dot net
Description:
------------
The query in Translation2 uses KEY / UNIQUE KEY constructs,
which are not portable.
This patch makes the query portable. All the KEY statements
have been split out into seperate CREATE [ UNIQUE ] INDEX
queries; the queries are then executed in a foreach loop.
This works on PostgreSQL. While I haven't tested the actual
code on MySQL, I have run some of it's queries by hand, and
I didn't experience any problems.
It's probably a good idea to do this in a transaction, if
the DB supports it, so we can avoid leaving the DB in an
inconsistent state
Patch is against CVS:
http://atomized.org/PEAR/Patches/Translation2-Admin_DB_Portability-2.patch