Part of the EllisLab Network

Bug Report

Performance improvements in db drivers class

Date: 02/10/2008 Severity: Trivial
Status: Bogus Reporter: Seppo
Version: 1.6.1 beta
Keywords: Libraries, Database Class

Description

Well, this is not a bug, but in many cases some functions are used where some other is faster. I found this in most of the _escape_table db driver methods, where stristr can be replaced with strpos (it is just checking if a string has a dott or not) and preg_replace for str_replace (just replacing a dott without delimiters for a delimiter-dott-delimiter chain).

This happens in mysqli, oci8, odbc, postgre and sqlite.

Expected Result

Actual Result

Comment on Bug Report

Page 1 of 1 pages
Posted by: Derek Allard on 10 February 2008 6:38pm
Derek Allard's avatar

Please reserve the bug tracker for bugs.  The feature request forum is the best place to make a request like this.

Posted by: Seppo on 10 February 2008 6:42pm
Seppo's avatar

Sorry. Won’t happen again.

Posted by: Seppo on 10 February 2008 7:20pm
Seppo's avatar

Hey Derek, thanks for changing this, but I think you’ve broken postgre driver on the way (the double quotes were replaced by backticks)

$table = '"'.preg_replace("/\./", '"."', $table).'"';
// was changed for
$table = str_replace('.', '`.`', $table);

Name:

Email:

Location:

URL:

Remember my personal information

Notify me of follow-up comments?