Bug 731663 - php mysql_fetch_assoc returns mediumtext field data limited to 16384 characters
Summary: php mysql_fetch_assoc returns mediumtext field data limited to 16384 characters
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: php
Version: 5.7
Hardware: x86_64
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: Joe Orton
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-18 09:26 UTC by Steve Dowe
Modified: 2012-03-07 17:26 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-07 17:26:20 UTC


Attachments (Terms of Use)

Description Steve Dowe 2011-08-18 09:26:25 UTC
Description of problem:

I have a small MySQL database with HTML articles in a 'text' field.  The 'text' field is datatype MEDIUMTEXT.

When using PHP's mysql_fetch_assoc() function, the length of data returned appears to be stuck at the 14-bit maximum, of 16,384 characters.

Version-Release number of selected component (if applicable):
# php -v
PHP 5.1.6 (cli) (built: Nov 13 2010 16:05:12) 
Copyright (c) 1997-2006 The PHP Group

# rpm -q php
php-5.1.6-27.el5_5.3

# rpm -q mysql-server
mysql-server-5.0.77-4.el5_6.6

How reproducible:

Always.

Steps to Reproduce:

Use the following code...

<?php

// selectdb stuff assumed...

$query_article = "SELECT * FROM articles WHERE id = \"$id\"";
$result_article = mysql_query($query_article) or die(mysql_error());
$row_article = mysql_fetch_assoc($result_article);

$fieldlen = strlen($row_article['text']);

echo $fieldlen; // always 16384 for 'text' field where data exceeds 16384 characters

?>
  
Actual results:

16384

Expected results:

>16384

Additional info:

Comment 2 Steve Dowe 2012-03-05 18:44:19 UTC
My mistake, apologies.  This appears to be an error of the mdb-export tool (part of mdbtools) which still appears to be evident on fedora 16.

Request to close this as NOTABUG.


Note You need to log in before you can comment on or make changes to this bug.