cvs: pear /MDB2/MDB2/Driver/Reverse mysqli.php
| From: | Lukas Smith | Date: | Wed, 01 Mar 2006 22:57:04 +0000 |
| Subject: | cvs: pear /MDB2/MDB2/Driver/Reverse mysqli.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-38812@lists.php.net to get a copy of this message | ||
lsmith Wed Mar 1 22:57:04 2006 UTC
Modified files:
/pear/MDB2/MDB2/Driver/Reverse mysqli.php
Log:
- fixed length handling in tableInfo() .. there is a bug in mysqli or the mysqli docs (bug #6887)
http://cvs.php.net/viewcvs.cgi/pear/MDB2/MDB2/Driver/Reverse/mysqli.php?r1=1.31&r2=1.32&diff_format=u
Index: pear/MDB2/MDB2/Driver/Reverse/mysqli.php
diff -u pear/MDB2/MDB2/Driver/Reverse/mysqli.php:1.31 pear/MDB2/MDB2/Driver/Reverse/mysqli.php:1.32
--- pear/MDB2/MDB2/Driver/Reverse/mysqli.php:1.31 Wed Mar 1 12:15:33 2006
+++ pear/MDB2/MDB2/Driver/Reverse/mysqli.php Wed Mar 1 22:57:04 2006
@@ -42,7 +42,7 @@
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
//
-// $Id: mysqli.php,v 1.31 2006/03/01 12:15:33 lsmith Exp $
+// $Id: mysqli.php,v 1.32 2006/03/01 22:57:04 lsmith Exp $
//
require_once 'MDB2/Driver/Reverse/Common.php';
@@ -409,13 +409,15 @@
$flags = trim($flags);
$res[$i] = array(
- 'table' => $case_func($tmp->table),
- 'name' => $case_func($tmp->name),
- 'type' => isset($this->types[$tmp->type])
+ 'table' => $case_func($tmp->table),
+ 'name' => $case_func($tmp->name),
+ 'type' => isset($this->types[$tmp->type])
? $this->types[$tmp->type]
: 'unknown',
- 'length' => $tmp->max_length,
- 'flags' => $flags,
+ // work around for http://bugs.php.net/?id=36579
+ 'length' => ($tmp->max_length && isset($tmp->length))
+ ? $tmp->max_length : $tmp->length,
+ 'flags' => $flags,
);
$mdb2type_info = $db->datatype->mapNativeDatatype($res[$i]);
if (PEAR::isError($mdb2type_info)) {