Removed useless fj_path_sha1 field to save space.
authorAaron Schulz <aschulz@wikimedia.org>
Sat, 11 Aug 2012 06:03:31 +0000 (23:03 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Sat, 11 Aug 2012 06:03:38 +0000 (23:03 -0700)
* Searches by path are not used by any code, and small blobs
  are stored with the rest of the row in innoDB, so there is
  no gain there. The field is mostly a hangover from a use case
  that never materialized (where it would be indexed).

Change-Id: I5515f15bd35823736138a79a4942c7207e519e5c

includes/filebackend/filejournal/DBFileJournal.php
maintenance/archives/patch-filejournal.sql

index 0a09894..8fa4c6f 100644 (file)
@@ -33,7 +33,7 @@ class DBFileJournal extends FileJournal {
         * Construct a new instance from configuration.
         * $config includes:
         *     'wiki' : wiki name to use for LoadBalancer
-        * 
+        *
         * @param $config Array
         */
        protected function __construct( array $config ) {
@@ -65,7 +65,6 @@ class DBFileJournal extends FileJournal {
                                'fj_backend'    => $this->backend,
                                'fj_op'         => $entry['op'],
                                'fj_path'       => $entry['path'],
-                               'fj_path_sha1'  => wfBaseConvert( sha1( $entry['path'] ), 16, 36, 31 ),
                                'fj_new_sha1'   => $entry['newSha1'],
                                'fj_timestamp'  => $dbw->timestamp( $now )
                        );
index 6c07858..4356d70 100644 (file)
@@ -8,8 +8,6 @@ CREATE TABLE /*_*/filejournal (
   fj_backend varchar(255) NOT NULL,
   -- The storage path that was affected (may be internal paths)
   fj_path blob NOT NULL,
-  -- SHA-1 file path hash in base-36
-  fj_path_sha1 varbinary(32) NOT NULL default '',
   -- Primitive operation description (create/update/delete)
   fj_op varchar(16) NOT NULL default '',
   -- SHA-1 file content hash in base-36