cvs: pear /MDB2/MDB2/Driver/Manager mysql.php mysqli.php
| From: | Lukas Smith | Date: | Thu, 13 Oct 2005 14:45:29 +0000 |
| Subject: | cvs: pear /MDB2/MDB2/Driver/Manager mysql.php mysqli.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-35498@lists.php.net to get a copy of this message | ||
lsmith Thu Oct 13 10:45:29 2005 EDT
Modified files:
/pear/MDB2/MDB2/Driver/Manager mysql.php mysqli.php
Log:
- primary key must be called primary
http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/Manager/mysql.php?r1=1.38&r2=1.39&ty=u
Index: pear/MDB2/MDB2/Driver/Manager/mysql.php
diff -u pear/MDB2/MDB2/Driver/Manager/mysql.php:1.38 pear/MDB2/MDB2/Driver/Manager/mysql.php:1.39
--- pear/MDB2/MDB2/Driver/Manager/mysql.php:1.38 Thu Oct 13 10:23:07 2005
+++ pear/MDB2/MDB2/Driver/Manager/mysql.php Thu Oct 13 10:45:29 2005
@@ -42,7 +42,7 @@
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
//
-// $Id: mysql.php,v 1.38 2005/10/13 14:23:07 lsmith Exp $
+// $Id: mysql.php,v 1.39 2005/10/13 14:45:29 lsmith Exp $
//
require_once 'MDB2/Driver/Manager/Common.php';
@@ -568,6 +568,9 @@
}
if (array_key_exists('primary', $definition) &&
$definition['primary']) {
+ if (strtolower($name) != 'primary') {
+ return $db->raiseError('Primary Key may must be named primary');
+ }
$type = 'PRIMARY';
$name = 'KEY';
} elseif (array_key_exists('unique', $definition) &&
$definition['unique']) {
http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/Manager/mysqli.php?r1=1.25&r2=1.26&ty=u
Index: pear/MDB2/MDB2/Driver/Manager/mysqli.php
diff -u pear/MDB2/MDB2/Driver/Manager/mysqli.php:1.25 pear/MDB2/MDB2/Driver/Manager/mysqli.php:1.26
--- pear/MDB2/MDB2/Driver/Manager/mysqli.php:1.25 Thu Oct 13 10:23:07 2005
+++ pear/MDB2/MDB2/Driver/Manager/mysqli.php Thu Oct 13 10:45:29 2005
@@ -42,7 +42,7 @@
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
//
-// $Id: mysqli.php,v 1.25 2005/10/13 14:23:07 lsmith Exp $
+// $Id: mysqli.php,v 1.26 2005/10/13 14:45:29 lsmith Exp $
//
require_once 'MDB2/Driver/Manager/Common.php';
@@ -568,6 +568,9 @@
}
if (array_key_exists('primary', $definition) &&
$definition['primary']) {
+ if (strtolower($name) != 'primary') {
+ return $db->raiseError('Primary Key may must be named primary');
+ }
$type = 'PRIMARY';
$name = 'KEY';
} elseif (array_key_exists('unique', $definition) &&
$definition['unique']) {