PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Database » MDB2_Driver_mysql » Bug #6055

strange code in mysql_reverse

Details

Request #6055strange code in mysql_reverse
Submitted2005-11-24 09:36 UTC
Fromalex at cgi-central dot net
Assignedlsmith
StatusClosed
PackageMDB2_Driver_mysql
PHP Version4.3.11
OSany
Roadmaps(Not assigned)

Comments

[2005-11-24 09:36 UTC] alex at cgi-central dot net

Description:
------------
I'm unable to understand meaning of code shown below in mysql reverse class. It caused script to fail on very usual MySQL database (usual table with primary key, etc.) After commenting out this code, everything works well. May be I don't understad something?

Test script:
---------------
--- MDB2/Driver/Reverse/mysql.php 16 Oct 2005 09:39:50 -0000 1.34
+++ MDB2/Driver/Reverse/mysql.php 24 Nov 2005 09:31:23 -0000
@@ -241,10 +246,10 @@
if ($row['key_name'] == 'PRIMARY') {
$definition['primary'] = true;
}
- if (!$row['non_unique']) {
- return $db->raiseError(MDB2_ERROR, null, null,
- 'getTableConstraintDefinition: it was not specified an existing table index');
- }
+// if (!$row['non_unique']) {
+// return $db->raiseError(MDB2_ERROR, null, null,
+// 'getTableConstraintDefinition: it was not specified an existing table index');
+// }