|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
Patchescomputed_column_name.diff (last revision 2016-02-25 23:21 UTC by adam dot baratz at gmail dot com)Pull Requests
Pull requests:
HistoryAllCommentsChangesGit/SVN commits
[2016-02-29 15:43 UTC] ab@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: ab
[2016-02-29 15:43 UTC] ab@php.net
[2016-04-06 12:46 UTC] ab@php.net
[2016-07-20 11:32 UTC] davey@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 00:00:02 2025 UTC |
Description: ------------ The output is inconsistent with the output from executing the same query using the mssql extension (see expected result section for details). Test script: --------------- <?php if (!extension_loaded('pdo_dblib')) { die('skip not loaded'); } require dirname(__FILE__) . '/config.inc'; $stmt = $db->prepare('SELECT 1, 2 AS named, 3'); $stmt->execute(); var_dump($stmt->fetch()); Expected result: ---------------- The mssql extension starts "computed" names at "computed" and uses a sequence to name subsequent columns, not the column number: https://github.com/php/php-src/blob/PHP-5.6.19/ext/mssql/php_mssql.c#L1225 In this case, the first column should be "computed" and the third should be "computed1." Additionally, debug mode should not be reporting memory leaks. Actual result: -------------- --------------------------------------- /vagrant/pdo_dblib-clean/dblib_stmt.c(106) : Block 0x00000000 status: NULL --------------------------------------- array(6) { ["computed0"]=> string(1) "1" [0]=> string(1) "1" ["named"]=> string(1) "2" [1]=> string(1) "2" ["computed2"]=> string(1) "3" [2]=> string(1) "3" } [Thu Feb 25 23:04:41 2016] Script: '/vagrant/pdo_dblib-clean/tests/timeout.php' /home/vagrant/php-src/main/spprintf.c(245) : Freeing 0x7F1E9FB6B518 (79 bytes), script=/vagrant/pdo_dblib-clean/tests/timeout.php Last leak repeated 1 time [Thu Feb 25 23:04:41 2016] Script: '/vagrant/pdo_dblib-clean/tests/timeout.php' /vagrant/pdo_dblib-clean/dblib_stmt.c(211) : Freeing 0x7F1E9FB6D270 (6 bytes), script=/vagrant/pdo_dblib-clean/tests/timeout.php === Total 3 memory leaks detected ===