Added querycachetwo table creation & patch. The table will be used to cache items...
authorYuri Astrakhan <yurik@users.mediawiki.org>
Wed, 25 Oct 2006 14:17:58 +0000 (14:17 +0000)
committerYuri Astrakhan <yurik@users.mediawiki.org>
Wed, 25 Oct 2006 14:17:58 +0000 (14:17 +0000)
maintenance/archives/patch-querycachetwo.sql [new file with mode: 0644]
maintenance/mysql5/tables.sql
maintenance/tables.sql
maintenance/updaters.inc

diff --git a/maintenance/archives/patch-querycachetwo.sql b/maintenance/archives/patch-querycachetwo.sql
new file mode 100644 (file)
index 0000000..cda5b90
--- /dev/null
@@ -0,0 +1,22 @@
+-- Used for caching expensive grouped queries that need two links (for example double-redirects)
+
+CREATE TABLE /*$wgDBprefix*/querycachetwo (
+  -- A key name, generally the base name of of the special page.
+  qcc_type char(32) NOT NULL,
+  
+  -- Some sort of stored value. Sizes, counts...
+  qcc_value int(5) unsigned NOT NULL default '0',
+  
+  -- Target namespace+title
+  qcc_namespace int NOT NULL default '0',
+  qcc_title char(255) binary NOT NULL default '',
+  
+  -- Target namespace+title2
+  qcc_namespacetwo int NOT NULL default '0',
+  qcc_titletwo char(255) binary NOT NULL default '',
+
+  KEY qcc_type (qcc_type,qcc_value),
+  KEY qcc_title (qcc_type,qcc_namespace,qcc_title),
+  KEY qcc_titletwo (qcc_type,qcc_namespacetwo,qcc_titletwo)
+
+) TYPE=InnoDB;
index f25988e..c28c80b 100644 (file)
@@ -1040,3 +1040,26 @@ CREATE TABLE /*$wgDBprefix*/redirect (
   PRIMARY KEY rd_from (rd_from),
   KEY rd_ns_title (rd_namespace,rd_title,rd_from)
 ) TYPE=InnoDB, DEFAULT CHARSET=utf8;
+
+-- Used for caching expensive grouped queries that need two links (for example double-redirects)
+
+CREATE TABLE /*$wgDBprefix*/querycachetwo (
+  -- A key name, generally the base name of of the special page.
+  qcc_type char(32) NOT NULL,
+  
+  -- Some sort of stored value. Sizes, counts...
+  qcc_value int(5) unsigned NOT NULL default '0',
+  
+  -- Target namespace+title
+  qcc_namespace int NOT NULL default '0',
+  qcc_title char(255) binary NOT NULL default '',
+  
+  -- Target namespace+title2
+  qcc_namespacetwo int NOT NULL default '0',
+  qcc_titletwo char(255) binary NOT NULL default '',
+
+  KEY qcc_type (qcc_type,qcc_value),
+  KEY qcc_title (qcc_type,qcc_namespace,qcc_title),
+  KEY qcc_titletwo (qcc_type,qcc_namespacetwo,qcc_titletwo)
+
+) TYPE=InnoDB, DEFAULT CHARSET=utf8;
index 1c7905b..20e45d9 100644 (file)
@@ -1016,10 +1016,7 @@ CREATE TABLE /*$wgDBprefix*/querycache_info (
 
 ) TYPE=InnoDB;
 
---
--- Create the new redirect table.
 -- For each redirect, this table contains exactly one row defining its target
--- 
 CREATE TABLE /*$wgDBprefix*/redirect (
   -- Key to the page_id of the redirect page
   rd_from int(8) unsigned NOT NULL default '0',
@@ -1035,4 +1032,26 @@ CREATE TABLE /*$wgDBprefix*/redirect (
   KEY rd_ns_title (rd_namespace,rd_title,rd_from)
 ) TYPE=InnoDB;
 
+-- Used for caching expensive grouped queries that need two links (for example double-redirects)
+CREATE TABLE /*$wgDBprefix*/querycachetwo (
+  -- A key name, generally the base name of of the special page.
+  qcc_type char(32) NOT NULL,
+  
+  -- Some sort of stored value. Sizes, counts...
+  qcc_value int(5) unsigned NOT NULL default '0',
+  
+  -- Target namespace+title
+  qcc_namespace int NOT NULL default '0',
+  qcc_title char(255) binary NOT NULL default '',
+  
+  -- Target namespace+title2
+  qcc_namespacetwo int NOT NULL default '0',
+  qcc_titletwo char(255) binary NOT NULL default '',
+
+  KEY qcc_type (qcc_type,qcc_value),
+  KEY qcc_title (qcc_type,qcc_namespace,qcc_title),
+  KEY qcc_titletwo (qcc_type,qcc_namespacetwo,qcc_titletwo)
+
+) TYPE=InnoDB;
+
 -- vim: sw=2 sts=2 et
index 6985a44..e3b4f65 100644 (file)
@@ -31,6 +31,7 @@ $wgNewTables = array(
        array( 'querycache_info', 'patch-querycacheinfo.sql' ),
        array( 'filearchive',   'patch-filearchive.sql' ),
        array( 'redirect',      'patch-redirect.sql' ),
+       array( 'querycachetwo', 'patch-querycachetwo.sql' ),
 );
 
 $wgNewFields = array(