php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59251 Invalid DDL statements are not generating any errors
Submitted: 2010-06-03 05:03 UTC Modified: 2010-06-03 11:04 UTC
From: grant dot croker at ingres dot com Assigned: grantc@php.net (profile)
Status: Closed Package: ingres (PECL)
PHP Version: 5.2.13 OS: Linux
Private report: No CVE-ID: None
 [2010-06-03 05:03 UTC] grant dot croker at ingres dot com
Description:
------------
When issuing an invalid DDL statement, e.g. "DELETE FROM 
nosuchtable" the driver does not detect an error.

Reproduce code:
---------------
<?php

echo "Connecting...";
$conn = ingres_connect("demodb");
echo "done\n";

echo "Sending query...";
$nosuchtable = ingres_query($conn, "delete from aunt_betty");
echo "done\n";

echo "testing for error\n";
if (ingres_errno())
{
    trigger_error ("Error:" . ingres_errno() . " " . ingres_error(), E_USER_ERROR);
}


Expected result:
----------------
Connecting...done
Sending query...done
testing for error

Fatal error: Error:2117 Table 'aunt_betty' does not exist or 
is not owned by you.

Actual result:
--------------
Connecting...done
Sending query...done
testing for error

Warning: Unknown: ii_success : Server or API error - no 
error message available, status 7 in Unknown on line 0

Warning: Unknown: _close_statement : failed  in Unknown on 
line 0
[Thu Jun  3 10:04:33 2010]  Script:  'notable.php'
/home/grant/src/svn/php/5.2.13/ext/date/php_date.c(566) :  
Freeing 0x0A1822FC (32 bytes), script=notable.php
/home/grant/src/svn/php/5.2.13/Zend/zend_alloc.c(2391) : 
Actual location (location was relayed)
[Thu Jun  3 10:04:33 2010]  Script:  'notable.php'
/home/grant/src/svn/php/5.2.13/ext/date/php_date.c(565) :  
Freeing 0x0A1864B8 (44 bytes), script=notable.php
[Thu Jun  3 10:04:33 2010]  Script:  'notable.php'
/home/grant/src/svn/php/5.2.13/Zend/zend_hash.c(247) :  
Freeing 0x0A187208 (49 bytes), script=notable.php
=== Total 3 memory leaks detected ===


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-06-03 11:04 UTC] grant dot croker at ingres dot com
This bug has been fixed in SVN.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 03 06:01:30 2024 UTC