bug 877359, constraint and MySQL 3.23.58
This commit is contained in:
@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
|
|||||||
$Id$
|
$Id$
|
||||||
$Source$
|
$Source$
|
||||||
|
|
||||||
|
2004-03-10 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
|
* libraries/relation.lib.php: bug 877359, no CONSTRAINT in
|
||||||
|
SHOW CREATE TABLE on older MySQL versions
|
||||||
|
|
||||||
2004-03-10 Michal Cihar <michal@cihar.com>
|
2004-03-10 Michal Cihar <michal@cihar.com>
|
||||||
* export.php: Correctly report error when export fails.
|
* export.php: Correctly report error when export fails.
|
||||||
* libraries/database_interface.lib.php, libraries/dbi/mysql.dbi.lib.php,
|
* libraries/database_interface.lib.php, libraries/dbi/mysql.dbi.lib.php,
|
||||||
|
@@ -310,7 +310,16 @@ function PMA_getForeigners($db, $table, $column = '', $source = 'both') {
|
|||||||
// and in 'innodb', we won't get it twice if $source='both'
|
// and in 'innodb', we won't get it twice if $source='both'
|
||||||
// because we use $field as key
|
// because we use $field as key
|
||||||
|
|
||||||
$foreign[$field]['constraint'] = $one_key['constraint'];
|
// The parser looks for a CONSTRAINT clause just before
|
||||||
|
// the FOREIGN KEY clause. It finds it (as output from
|
||||||
|
// SHOW CREATE TABLE) in MySQL 4.0.13, but not in older
|
||||||
|
// versions like 3.23.58.
|
||||||
|
// In those cases, the FOREIGN KEY parsing will put numbers
|
||||||
|
// like -1, 0, 1... instead of the constraint number.
|
||||||
|
|
||||||
|
if (isset($one_key['constraint'])) {
|
||||||
|
$foreign[$field]['constraint'] = $one_key['constraint'];
|
||||||
|
}
|
||||||
|
|
||||||
if (isset($one_key['ref_db_name'])) {
|
if (isset($one_key['ref_db_name'])) {
|
||||||
$foreign[$field]['foreign_db'] = $one_key['ref_db_name'];
|
$foreign[$field]['foreign_db'] = $one_key['ref_db_name'];
|
||||||
|
Reference in New Issue
Block a user