cvs: pear /MDB2 package_oci8.php /MDB2/MDB2/Driver/Datatype oci8.php
| From: | Lorenzo Alberton | Date: | Sun, 04 Feb 2007 00:00:50 +0000 |
| Subject: | cvs: pear /MDB2 package_oci8.php /MDB2/MDB2/Driver/Datatype oci8.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-44535@lists.php.net to get a copy of this message | ||
quipo Sun Feb 4 00:00:50 2007 UTC
Modified files:
/pear/MDB2/MDB2/Driver/Datatype oci8.php
/pear/MDB2 package_oci8.php
Log:
fixed bug #10003: integer length problem in getTypeDeclaration() in the Datatype module (thanks to
priyadi at priyadi dot net)
http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/Datatype/oci8.php?r1=1.67&r2=1.68&diff_format=u
Index: pear/MDB2/MDB2/Driver/Datatype/oci8.php
diff -u pear/MDB2/MDB2/Driver/Datatype/oci8.php:1.67 pear/MDB2/MDB2/Driver/Datatype/oci8.php:1.68
--- pear/MDB2/MDB2/Driver/Datatype/oci8.php:1.67 Sat Oct 14 13:42:02 2006
+++ pear/MDB2/MDB2/Driver/Datatype/oci8.php Sun Feb 4 00:00:50 2007
@@ -42,7 +42,7 @@
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
-// $Id: oci8.php,v 1.67 2006/10/14 13:42:02 lsmith Exp $
+// $Id: oci8.php,v 1.68 2007/02/04 00:00:50 quipo Exp $
require_once 'MDB2/Driver/Datatype/Common.php';
@@ -125,7 +125,18 @@
return 'BLOB';
case 'integer':
if (!empty($field['length'])) {
- return 'NUMBER('.$field['length'].')';
+ switch((int)$field['length']) {
+ case 1: $digit = 3; break;
+ case 2: $digit = 5; break;
+ case 3: $digit = 8; break;
+ case 4: $digit = 10; break;
+ case 5: $digit = 13; break;
+ case 6: $digit = 15; break;
+ case 7: $digit = 17; break;
+ case 8: $digit = 20; break;
+ default: $digit = 10;
+ }
+ return 'NUMBER('.$digit.')';
}
return 'INT';
case 'boolean':
http://cvs.php.net/viewvc.cgi/pear/MDB2/package_oci8.php?r1=1.99&r2=1.100&diff_format=u
Index: pear/MDB2/package_oci8.php
diff -u pear/MDB2/package_oci8.php:1.99 pear/MDB2/package_oci8.php:1.100
--- pear/MDB2/package_oci8.php:1.99 Sat Feb 3 23:54:46 2007
+++ pear/MDB2/package_oci8.php Sun Feb 4 00:00:50 2007
@@ -10,6 +10,9 @@
- implemented getTriggerDefinition() in the Reverse module [experimental]
- implemented guid() in the Function module [globally unique identifier]
- added missing error code (bug #9780)
+- fixed bug #10003: integer length problem in getTypeDeclaration() in the Datatype
+ module (thanks to priyadi at priyadi dot net)
+
note:
- please use the latest ext/oci8 version from pecl.php.net/oci8
(binaries are available from snaps.php.net and pecl4win.php.net)