Home » Database » MDB2_Driver_mysql » Bug #6055
strange code in mysql_reverse
Details
| Request #6055 | strange code in mysql_reverse |
|---|---|
| Submitted | 2005-11-24 09:36 UTC |
| From | alex at cgi-central dot net |
| Assigned | lsmith |
| Status | Closed |
| Package | MDB2_Driver_mysql |
| PHP Version | 4.3.11 |
| OS | any |
| 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');
+// }