diff options
author | Steven Wittens <steven@10.no-reply.drupal.org> | 2004-09-15 20:34:35 +0000 |
---|---|---|
committer | Steven Wittens <steven@10.no-reply.drupal.org> | 2004-09-15 20:34:35 +0000 |
commit | f8b429e963b4e9fe73f0a85a0ccb2679eca65d62 (patch) | |
tree | 9497c600f1eb3aca808f9579db34b7b742652064 /database/updates.inc | |
parent | d00f4a4ebfc91321ed965335b16e13e6eaa519cd (diff) | |
download | brdo-f8b429e963b4e9fe73f0a85a0ccb2679eca65d62.tar.gz brdo-f8b429e963b4e9fe73f0a85a0ccb2679eca65d62.tar.bz2 |
#10862: Smarter filter cache wiping.
Diffstat (limited to 'database/updates.inc')
-rw-r--r-- | database/updates.inc | 16 |
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); |