Re: Bug in DB::isManip with 'lock/unlock'

From: Date: Thu, 12 Jul 2001 00:09:55 +0000
Subject: Re: Bug in DB::isManip with 'lock/unlock'
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-642@lists.php.net to get a copy of this message
Paul DuBois wrote: > > At 10:41 AM +0200 7/10/01, Erik Hjortsberg wrote: > >Shouldn't 'lock' and 'unlock' be included in DB::isManip as > >manipulative queries? > >Line 300 in DB.php: > > if > > >>(preg_match('/^\s*"?(INSERT|UPDATE|DELETE|REPLACE|CREATE|DROP|ALTER|GRANT|REVOKE)\s+/i', > >$query)) { > >should be: > > if > > >>(preg_match('/^\s*"?(INSERT|UPDATE|DELETE|REPLACE|CREATE|DROP|ALTER|GRANT|REVOKE|LOCK|UNLOCK)\s+/i', > >$query)) { > > > >Am I right? > > > >/erik hjortsberg > > Maybe it should be defined as !preg_match('/^\s*"?SELECT\s+/i', $query) > and overridden as necessary (e.g., for MySQL, SELECT, SHOW, EXPLAIN, and > DESCRIBE all return rows and are not manipulative). This would seem to > allow a shorter test. http://marc.theaimsgroup.com/?l=pear-dev&m=99008110006004&w=2 Tomas V.V.Cox

« previous php.pear.dev (#642) next »