PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Internationalization » Translation2 » Bug #2546

[PATCH] DB Admin container uses non-portable CREATE ... KEY / UNIQUE KEY syntax

Details

Submitted2004-10-16 19:49 UTC
Fromieure at php dot net
Assignedquipo
StatusClosed
PackageTranslation2
PHP Version4.3.9
OSLinux
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