aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/db/oracle.php
diff options
context:
space:
mode:
authorDavid M <davidmj@users.sourceforge.net>2006-11-22 01:22:13 +0000
committerDavid M <davidmj@users.sourceforge.net>2006-11-22 01:22:13 +0000
commit1551f13bb239ae1f47176e82c804c0eaaa959623 (patch)
tree8fe2f8e879a8aab34e3946a356d1d16565450ed0 /phpBB/includes/db/oracle.php
parent6cb0276788994f9bd348e8ef651851760055fc12 (diff)
downloadforums-1551f13bb239ae1f47176e82c804c0eaaa959623.tar
forums-1551f13bb239ae1f47176e82c804c0eaaa959623.tar.gz
forums-1551f13bb239ae1f47176e82c804c0eaaa959623.tar.bz2
forums-1551f13bb239ae1f47176e82c804c0eaaa959623.tar.xz
forums-1551f13bb239ae1f47176e82c804c0eaaa959623.zip
#5562
major speed boost for Oracle :D This took a while, every call to sql_query_limit() was checked out for having any implicit/explicit column issues... Hopefully, nothing has changed :D git-svn-id: file:///svn/phpbb/trunk@6631 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/db/oracle.php')
-rw-r--r--phpBB/includes/db/oracle.php46
1 files changed, 0 insertions, 46 deletions
diff --git a/phpBB/includes/db/oracle.php b/phpBB/includes/db/oracle.php
index e8a0ce3605..8f65c667a7 100644
--- a/phpBB/includes/db/oracle.php
+++ b/phpBB/includes/db/oracle.php
@@ -219,52 +219,6 @@ class dbal_oracle extends dbal
{
$this->query_result = false;
- // Any implicit columns exist?
- if (strpos($query, '.*') !== false)
- {
- // This sucker does a few things for us. It grabs all the explicitly named columns and what tables are being used
- preg_match('/SELECT (?:DISTINCT )?(.*?)FROM(.*?)(?:WHERE|(ORDER|GROUP) BY|$)/s', $query, $tables);
-
- // The prefixes of the explicit columns don't matter, they simply get in the way
- preg_match_all('/\.(\w+)/', trim($tables[1]), $columns);
-
- // Flip lets us do an easy isset() call
- $columns = array_flip($columns[1]);
-
- $table_data = trim($tables[2]);
-
- // Grab the implicitly named columns, they need expanding...
- preg_match_all('/(\w)\.\*/', $query, $info);
-
- $cols = array();
-
- foreach ($info[1] as $table_alias)
- {
- // We need to get the name of the aliased table
- preg_match('/(\w+) ' . $table_alias . '/', $table_data, $table_name);
- $table_name = $table_name[1];
-
- $sql = "SELECT column_name
- FROM all_tab_cols
- WHERE table_name = '" . strtoupper($table_name) . "'";
-
- $result = $this->sql_query($sql);
- while ($row = $this->sql_fetchrow($result))
- {
- if (!isset($columns[strtolower($row['column_name'])]))
- {
- $cols[] = $table_alias . '.' . strtolower($row['column_name']);
- }
- }
- $this->sql_freeresult($result);
-
- // Remove the implicity .* with it's full expansion
- $query = str_replace($table_alias . '.*', implode(', ', $cols), $query);
-
- unset($cols);
- }
- }
-
$query = 'SELECT * FROM (SELECT /*+ FIRST_ROWS */ rownum AS xrownum, a.* FROM (' . $query . ') a WHERE rownum <= ' . ($offset + $total) . ') WHERE xrownum >= ' . $offset;
return $this->sql_query($query, $cache_ttl);