strange code in mysql_reverseDescription:
------------
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');
+// }
alex@... [2005-11-24 04:36:44]http://pear.php.net/bugs/6055
MDB2_Driver_mysql Feature/Change Request
Reported by alex@...
2005-11-24T04:36:44+00:00
PHP: 4.3.11 OS: any Package Version:
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');
+// }]]>MDB2_Driver_mysql Feature/Change Request
Reported by alex@...
2005-11-24T04:36:44+00:00
PHP: 4.3.11 OS: any Package Version:
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');
+// }]]>2005-11-24T04:36:44+00:00
lsmith [2005-11-24 09:21] http://pear.php.net/bugs/6055#1132824075
Ups, wrong note ..
I fixed this error by ignoring when the index/constraint was not found inside MDB2_Schema.
The reason for these raiseError() calls is that MDB2 separates the concept of an index and constraint whereas MDB2 really does not.]]>Ups, wrong note ..
I fixed this error by ignoring when the index/constraint was not found inside MDB2_Schema.
The reason for these raiseError() calls is that MDB2 separates the concept of an index and constraint whereas MDB2 really does not.]]>2005-11-24T09:21:15+00:00
lsmith [2005-11-24 09:18] http://pear.php.net/bugs/6055#1132823934
This bug has been fixed in CVS.
If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET).
If this was a problem with the pear.php.net website, the change should be live shortly.
Otherwise, the fix will appear in the package's next release.
Thank you for the report and for helping us make PEAR better.
It should be getTableConstraintDefinition() without the "s" .. I also fixed this in the call inside MDB2_Schema]]>This bug has been fixed in CVS.
If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET).
If this was a problem with the pear.php.net website, the change should be live shortly.
Otherwise, the fix will appear in the package's next release.
Thank you for the report and for helping us make PEAR better.
It should be getTableConstraintDefinition() without the "s" .. I also fixed this in the call inside MDB2_Schema]]>2005-11-24T09:18:54+00:00