Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: PHP-8.4.1
-
Fix Version/s: PHP-Aprium
-
Component/s: PHPDriver
-
Labels:None
Description
Test Build: CUBRID 2008 R4.1 (8.4.1.1018) (64bit release build for linux_gnu)
OS: Linux 64
Description:
Table just has one record.
Fetch record information using cubrid_unbuffered_query method and cubrid_fetch_assoc() method.
Record information will return, but a warning information will return too.
Repro steps:
1. execute: php unbuffered_test1.phpt
statement in unbuffered_test1.phpt
$conn = cubrid_connect("localhost", 33113, "demodb","dba","");
cubrid_execute($conn, 'DROP TABLE IF EXISTS unbuffered_tb');
cubrid_execute($conn,"CREATE TABLE unbuffered_tb(id int, name varchar(10))");
cubrid_execute($conn,"insert into unbuffered_tb values(1,'name1')");
$res=cubrid_unbuffered_query("SELECT * FROM unbuffered_tb ; ", $conn);
if (!$res) {
printf("[006] [%d] %s\n", cubrid_errno($conn), cubrid_error($conn));
}else{
var_dump(cubrid_fetch_assoc($res));
}
cubrid_free_result($res);
cubrid_close($conn);
Actual result:
PHP Warning: Error: CAS, -1006, Server handle not found in /home/php/phpTestcases/_11/unbuffered_test1.phpt on line 11
array(2) {
["id"]=>
string(1) "1"
["name"]=>
string(5) "name1"
Expect result:
Maybe the warning information don't need to appear.
This is CCI's bug. CCI's test case is in the attachment.
This error is due to cci_cursor(). If we use cci_cursor at when the cursor is at the bottom of result set in asynchronous mode, it will give the error -1006, but it will be no problem in synchronous mode.