From: www dot spam at whoah dot net
Operating system: Windows 2000 Professional
PHP version: 5.0.1
PHP Bug Type: COM related
Bug description: Setting ADO RecordSet CursorLocation to adUseClient causes query
delay
Description:
------------
When attempting to use ADODB.RecordSet COM object to query an MS Access
database via a DSNless connection, setting the CursorLocation to
adUseClient causes a significant delay on the processing of a query
execution.
ASP has no such issue with this, so maybe PHP's support can be improved
(client-side cursor location allows the use of additional RecordSet
features such as ->Sort() and ->Filter(), handy for porting ASP code that
uses it instead of writing a dynamic query).
Any database and query should reproduce this, so please modify the
'reproduce code' appropriately (to point to your own database and use your
own query).
Reproduce code:
---------------
define("adLockReadOnly",1);
define("adOpenStatic",3);
define("adUseClient",3);
function simpleRS($conn,$q) {
$rs = new COM('ADODB.RecordSet');
$rs->ActiveConnection = $conn;
$rs->LockType = adLockReadOnly;
$rs->CursorLocation = adUseClient; //comment this line to remove the
delay
$rs->CursorType = adOpenStatic;
$rs->Source = $q;
echo 'opening... '; $rs->Open(); echo 'done';
return $rs;
}
$dbconn = new COM('ADODB.Connection');
$dbconn->open('Provider=Microsoft.Jet.OLEDB.4.0; Data Source='.
realpath('../../data/phpbb2.mdb'));
$rsUserList = simpleRS($dbconn,'SELECT * FROM phpbb_users');
$dbconn->close();
Expected result:
----------------
opening... *almost instant* done
Actual result:
--------------
opening... *delay* done
--
Edit bug report at http://bugs.php.net/?id=29669&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29669&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29669&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=29669&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=29669&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=29669&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=29669&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=29669&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=29669&r=support
Expected behavior: http://bugs.php.net/fix.php?id=29669&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=29669&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=29669&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=29669&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29669&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=29669&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=29669&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=29669&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29669&r=float