#36579 [NEW]: mysqli_fetch_field length handling

From: Date: Wed, 01 Mar 2006 22:33:08 +0000
Subject: #36579 [NEW]: mysqli_fetch_field length handling
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-93817@lists.php.net to get a copy of this message
From: lsmith@php.net Operating system: windows PHP version: 5.1.2 PHP Bug Type: MySQLi related Bug description: mysqli_fetch_field length handling Description: ------------ mysqli seems to return the length of the column inside the undocumented "length" property, whereas max_length seems to be 0 all the time .. Reproduce code: --------------- CREATE TABLE users ( user_name char(12) default NULL, user_password text, subscribed tinyint(4) default NULL, user_id int(11) NOT NULL default '0', quota decimal(18,2) default NULL, weight double default NULL, access_date date default NULL, access_time time default NULL, approved datetime default NULL, UNIQUE KEY users_id_index_idx (user_id) ); Actual result: -------------- name: user_name max_length: 0 length: 12 type: 254 name: user_password max_length: 0 length: 65535 type: 252 name: subscribed max_length: 0 length: 4 type: 1 name: user_id max_length: 0 length: 11 type: 3 name: quota max_length: 0 length: 20 type: 246 name: weight max_length: 0 length: 22 type: 5 name: access_date max_length: 0 length: 10 type: 10 name: access_time max_length: 0 length: 8 type: 11 name: approved max_length: 0 length: 19 type: 12 -- Edit bug report at http://bugs.php.net/?id=36579&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36579&r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36579&r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36579&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=36579&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=36579&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=36579&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=36579&r=needscript Try newer version: http://bugs.php.net/fix.php?id=36579&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=36579&r=support Expected behavior: http://bugs.php.net/fix.php?id=36579&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=36579&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=36579&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=36579&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36579&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=36579&r=dst IIS Stability: http://bugs.php.net/fix.php?id=36579&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=36579&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=36579&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=36579&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=36579&r=mysqlcfg

« previous php.bugs (#93817) next »