|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-06-06 17:15 UTC] chandra dot madathil at theice dot com
[2011-06-11 04:04 UTC] felipe@php.net
-Status: Open
+Status: Feedback
[2011-06-11 04:04 UTC] felipe@php.net
[2011-06-11 04:04 UTC] felipe@php.net
[2013-02-18 00:34 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 20 19:00:01 2025 UTC |
Description: ------------ When the select statement includes only one column, the script crashes with "zend_mm_heap corrupted" or segmentation fault errors. When we add a dummy column to the select statement, the script runs successfully. Looks like some data structure initialization bug. For example, select name0 from COMPANY where name0 like 'A%'; -- errors out select name0,1 from COMPANY where name0 like 'A%'; -- runs successfully Test script: --------------- <?php $db_conn = odbc_connect('NZSQL','<username>','<password>') or alert("Could not connect: " . odbc_error()); echo "Connected successfully!\n"; $query="select name0 from COMPANY where name0 like 'A%' "; echo "executing ...\n"; $result = odbc_exec($db_conn,$query); echo "executed query ...\n"; if (!$result) alert("Could not run query: " . odbc_error()); echo "fetching resultset ...\n"; while(odbc_fetch_array($result)) { $row0 = odbc_result($result, 1); echo "field1:$row0\n"; } odbc_close($db_conn); echo "Completed successfully\n"; function alert($errMsg) { fwrite(STDERR, "$errMsg\n"); exit(2); } ?> Expected result: ---------------- Connected successfully! executing ... executed query ... fetching resultset ... field1:<company names> .... Completed successfully Actual result: -------------- Connected successfully! executing ... zend_mm_heap corrupted