summaryrefslogtreecommitdiff
path: root/database/updates.inc
diff options
context:
space:
mode:
authorSteven Wittens <steven@10.no-reply.drupal.org>2004-09-15 20:34:35 +0000
committerSteven Wittens <steven@10.no-reply.drupal.org>2004-09-15 20:34:35 +0000
commitf8b429e963b4e9fe73f0a85a0ccb2679eca65d62 (patch)
tree9497c600f1eb3aca808f9579db34b7b742652064 /database/updates.inc
parentd00f4a4ebfc91321ed965335b16e13e6eaa519cd (diff)
downloadbrdo-f8b429e963b4e9fe73f0a85a0ccb2679eca65d62.tar.gz
brdo-f8b429e963b4e9fe73f0a85a0ccb2679eca65d62.tar.bz2
#10862: Smarter filter cache wiping.
Diffstat (limited to 'database/updates.inc')
-rw-r--r--database/updates.inc16
1 files changed, 15 insertions, 1 deletions
diff --git a/database/updates.inc b/database/updates.inc
index 9489780dc..2435492c9 100644
--- a/database/updates.inc
+++ b/database/updates.inc
@@ -81,7 +81,8 @@ $sql_updates = array(
"2004-08-12" => "update_102",
"2004-08-17" => "update_103",
"2004-08-19" => "update_104",
- "2004-09-14" => "update_105"
+ "2004-09-14" => "update_105",
+ "2004-09-15" => "update_106"
);
function update_32() {
@@ -1798,6 +1799,19 @@ function update_105() {
return $ret;
}
+function update_106() {
+ $ret = array();
+ if ($GLOBALS['db_type'] == 'mysql') {
+ $ret[] = update_sql('ALTER TABLE {cache} ADD INDEX expire (expire)');
+ }
+ else if ($GLOBALS['db_type'] == 'pgsql') {
+ // TODO: needs PGSQL equivalent.
+ }
+
+ $ret[] = update_sql('DELETE FROM {cache}');
+ return $ret;
+}
+
function update_sql($sql) {
$edit = $_POST["edit"];
$result = db_query($sql);