Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3fdc622
)
MDL-27685 fix pg LIKE escape trouble
author
Petr Skoda
<commits@skodak.org>
Sun, 7 Aug 2011 11:19:02 +0000
(13:19 +0200)
committer
Petr Skoda
<commits@skodak.org>
Sun, 7 Aug 2011 11:19:02 +0000
(13:19 +0200)
lib/dml/pgsql_native_moodle_database.php
patch
|
blob
|
blame
|
history
diff --git
a/lib/dml/pgsql_native_moodle_database.php
b/lib/dml/pgsql_native_moodle_database.php
index
4f82eda
..
9fa697f
100644
(file)
--- a/
lib/dml/pgsql_native_moodle_database.php
+++ b/
lib/dml/pgsql_native_moodle_database.php
@@
-277,12
+277,12
@@
class pgsql_native_moodle_database extends moodle_database {
return $this->tables;
}
$this->tables = array();
return $this->tables;
}
$this->tables = array();
- $prefix = str_replace('_', '
\\\\
_', $this->prefix);
+ $prefix = str_replace('_', '
|
_', $this->prefix);
// Get them from information_schema instead of catalog as far as
// we want to get only own session temp objects (catalog returns all)
$sql = "SELECT table_name
FROM information_schema.tables
// Get them from information_schema instead of catalog as far as
// we want to get only own session temp objects (catalog returns all)
$sql = "SELECT table_name
FROM information_schema.tables
- WHERE table_name LIKE '$prefix%'
+ WHERE table_name LIKE '$prefix%'
ESCAPE '|'
AND table_type IN ('BASE TABLE', 'LOCAL TEMPORARY')";
$this->query_start($sql, null, SQL_QUERY_AUX);
$result = pg_query($this->pgsql, $sql);
AND table_type IN ('BASE TABLE', 'LOCAL TEMPORARY')";
$this->query_start($sql, null, SQL_QUERY_AUX);
$result = pg_query($this->pgsql, $sql);