From: geniuz at geniuz dot cz Operating system: XP PHP version: 5.2.2 PHP Bug Type: ODBC related Bug description: ODBC makes memory leaks
Description: ------------ When I select over ODBC from table with any column data type defined as TEXT (detected over odbc_columns function), and I fetch rows, I receive one of following messages or php freeze. I selected more than 100000 rows. When I replaced selected TEXT data type column for any other column ie. STRING data type column (and with more saved datas), all is ok without errors. Well, problem must be with TEXT datatype (LONG columns). Warning: odbc_exec() [function.odbc-exec]: SQL error: Failed to fetch error message, SQL state HY000 in SQLExecDirect in M:\4D\.WebRoot\ctp\eshop\index.php on line 65 Warning: odbc_exec() [function.odbc-exec]: SQL error: [Simba][Simba ODBC Driver]Memory allocation error., SQL state S1001 in SQLExecDirect in M:\4D\.WebRoot\ctp\eshop\index.php on line 65 Reproduce code: --------------- $sql = "SELECT Col1, Col2, Col3 FROM MYTABLE"; $rs=odbc_exec($conn,$sql); while( odbc_fetch_row($rs) ) { $data1 = odbc_result($rs,'Col1'); $data2 = odbc_result($rs,'Col2'); $data3 = odbc_result($rs,'Col3'); } Expected result: ---------------- no sql error Actual result: -------------- sql error -- Edit bug report at http://bugs.php.net/?id=41404&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41404&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41404&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41404&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=41404&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=41404&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=41404&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=41404&r=needscript Try newer version: http://bugs.php.net/fix.php?id=41404&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=41404&r=support Expected behavior: http://bugs.php.net/fix.php?id=41404&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=41404&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=41404&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=41404&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41404&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=41404&r=dst IIS Stability: http://bugs.php.net/fix.php?id=41404&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=41404&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=41404&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=41404&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=41404&r=mysqlcfg