|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38156 user aggregate function on empty select result
Submitted: 2006-07-20 06:38 UTC Modified: 2006-07-28 01:00 UTC
Avg. Score:3.3 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: delta_v at mail dot ru Assigned:
Status: No Feedback Package: SQLite related
PHP Version: 5.1.4 OS: Windows 2000 Prof
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: delta_v at mail dot ru
New email:
PHP Version: OS:


 [2006-07-20 06:38 UTC] delta_v at mail dot ru
user aggregate function on empty select result
Apache crach

Reproduce code:
function actstep(&$context,$tau,$val) {
   if ($conext[0]<$tau) { $conext[0]=$tau; $context[1]=$val; }
function actfin(&$context) {
   return $context[1];
$f = 'tmp.sqlt';
$h = sqlite_open($f);
sqlite_exec($h,"CREATE TABLE lnk(obj,atr,tau,val)");
sqlite_exec($h,"INSERT INTO lnk VALUES(1,1,2,5)");
sqlite_exec($h,"INSERT INTO lnk VALUES(1,1,5,10)");

// This work:
$r1 = sqlite_array_query($h,"SELECT actual(tau,val) FROM lnk WHERE obj=1 AND atr=1 AND tau<=10",SQLITE_NUM);
// When empty result set Apache crach: 
$r2 = sqlite_array_query($h,"SELECT actual(tau,val) FROM lnk WHERE obj=2 AND atr=1 AND tau<=10",SQLITE_NUM);

Expected result:
array(1) { [0]=> array(1) { [0]=> string(2) "10" } }

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-07-20 07:28 UTC]
Please try using this CVS snapshot:
For Windows:

 [2006-07-28 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Sep 17 13:03:37 2021 UTC