r4083 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r4082‎ | r4083 | r4084 >
Date:15:18, 15 June 2004
Author:timstarling
Status:old
Tags:
Comment:
* Moved content from liveCmdLine.inc into commandLine.inc, obsoleting the former.
* Put some option handling code in commandLine.inc which is untested and unused (for the moment).
* Converted all existing command line scripts to use the standard header and argument array.
* Did a quick test of compressOld.php, rebuildall.php and rebuildMessages.php to check for breakage.
* rebuildall.php was broken due to the unmaintained rebuildlinks.php, so I converted it to use refreshLinks instead. Required splitting into refreshLinks.inc and refreshLinks.php
Modified paths:
  • /trunk/phase3/maintenance/DiffLanguage.php (modified) (history)
  • /trunk/phase3/maintenance/attribute.php (modified) (history)
  • /trunk/phase3/maintenance/commandLine.inc (modified) (history)
  • /trunk/phase3/maintenance/compressOld.inc (modified) (history)
  • /trunk/phase3/maintenance/compressOld.php (modified) (history)
  • /trunk/phase3/maintenance/convertLinks.php (modified) (history)
  • /trunk/phase3/maintenance/rebuildMessages.php (modified) (history)
  • /trunk/phase3/maintenance/rebuildall.php (modified) (history)
  • /trunk/phase3/maintenance/rebuildlinks.php (modified) (history)
  • /trunk/phase3/maintenance/rebuildrecentchanges.php (modified) (history)
  • /trunk/phase3/maintenance/rebuildtextindex.php (modified) (history)
  • /trunk/phase3/maintenance/refreshLinks.inc (added) (history)
  • /trunk/phase3/maintenance/refreshLinks.php (modified) (history)
  • /trunk/phase3/maintenance/remove-brokenlinks.php (modified) (history)
  • /trunk/phase3/maintenance/tables.sql (modified) (history)
  • /trunk/phase3/maintenance/trivialCmdLine.php (modified) (history)
  • /trunk/phase3/maintenance/update2.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/refreshLinks.php
@@ -1,8 +1,8 @@
22 <?php
3 -define( "REPORTING_INTERVAL", 50 );
4 -define( "PAUSE_INTERVAL", 50 );
53
64 require_once( "commandLine.inc" );
 5+require_once( "refreshLinks.inc" );
 6+
77 error_reporting( E_ALL & (~E_NOTICE) );
88
99
@@ -12,43 +12,8 @@
1313 $start = 1;
1414 }
1515
16 -$res = wfQuery("SELECT max(cur_id) as m FROM cur", DB_READ);
17 -$row = wfFetchObject( $res );
18 -$end = $row->m;
 16+refreshLinks( $start );
1917
20 -print("Refreshing link table. Starting from cur_id $start of $end.\n");
21 -
22 -# Don't generate TeX PNGs (lack of a sensible current directory causes errors anyway)
23 -$wgUser->setOption("math", 3);
24 -
25 -for ($id = $start; $id <= $end; $id++) {
26 - if ( !($id % REPORTING_INTERVAL) ) {
27 - print "$id\n";
28 - }
29 -
30 - if ( !($id % PAUSE_INTERVAL) ) {
31 - sleep(1);
32 - }
33 -
34 - $wgTitle = Title::newFromID( $id );
35 - if ( is_null( $wgTitle ) ) {
36 - continue;
37 - }
38 -
39 - $wgArticle = new Article( $wgTitle );
40 - $text = $wgArticle->getContent( true );
41 - $wgLinkCache = new LinkCache;
42 - @$wgOut->addWikiText( $text );
43 -
44 - if ( $wgEnablePersistentLC ) {
45 - $wgLinkCache->saveToLinkscc( $id, wfStrencode( $wgTitle->getPrefixedDBkey() ) );
46 - }
47 -
48 - $linksUpdate = new LinksUpdate( $id, $wgTitle->getPrefixedDBkey() );
49 - $linksUpdate->doDumbUpdate();
50 - $linksUpdate->fixBrokenLinks();
51 -}
52 -
5318 exit();
5419
5520 ?>
Index: trunk/phase3/maintenance/attribute.php
@@ -1,32 +1,21 @@
22 <?php
 3+# Script for re-attributing edits
 4+require_once( "commandLine.inc" );
35
46 # Parameters
5 -
6 -if ($argc < 4) {
 7+if ( count( $args ) < 2 ) {
78 print "Not enough parameters\n";
8 - print "Usage: php attribute.php <lang> <source> <destination>\n";
 9+ if ( $wgWikiFarm ) {
 10+ print "Usage: php attribute.php <language> <site> <source> <destination>\n";
 11+ } else {
 12+ print "Usage: php attribute.php <source> <destination>\n";
 13+ }
914 exit;
1015 }
1116
12 -$lang = $argv[1];
13 -$source = $argv[2];
14 -$dest = $argv[3];
 17+$source = $args[0];
 18+$dest = $args[1];
1519
16 -# Initialisation
17 -
18 -$wgCommandLineMode = true;
19 -$DP = "../includes";
20 -
21 -$sep = strchr( $include_path = ini_get( "include_path" ), ";" ) ? ";" : ":";
22 -ini_set( "include_path", "$IP$sep$include_path" );
23 -
24 -require_once( "/apache/htdocs/$lang/w/LocalSettings.php" );
25 -require_once( "Setup.php" );
26 -
27 -$wgTitle = Title::newFromText( "Changing attribution script" );
28 -set_time_limit(0);
29 -$wgCommandLineMode = true;
30 -
3120 $eSource = wfStrencode( $source );
3221 $eDest = wfStrencode( $dest );
3322
Index: trunk/phase3/maintenance/commandLine.inc
@@ -1,47 +1,118 @@
22 <?php
3 -if ( strpos( `hostname -a`, "wikimedia.org" ) !== false ) {
4 - require_once( "liveCmdLine.inc" );
5 -} else {
6 - # Turn off output buffering if it's on
7 - @ob_end_flush();
8 -
9 - if ( isset( $_SERVER ) && array_key_exists( 'REQUEST_METHOD', $_SERVER ) ) {
10 - print "This script must be run from the command line\n";
11 - exit();
 3+
 4+# Abort if called from a web server
 5+if ( isset( $_SERVER ) && array_key_exists( 'REQUEST_METHOD', $_SERVER ) ) {
 6+ print "This script must be run from the command line\n";
 7+ exit();
 8+}
 9+
 10+# Process command line arguments
 11+# $options becomes an array with keys set to the option names
 12+# $optionsWithArgs is an array of GNU-style options that take an argument. The arguments are returned
 13+# in the values of $options.
 14+
 15+if ( !isset( $optionsWithArgs ) ) {
 16+ $optionsWithArgs = array();
 17+}
 18+
 19+$self = array_shift( $argv );
 20+$IP = realpath( dirname( $self ) . "/.." );
 21+chdir( $IP );
 22+
 23+$options = array();
 24+$args = array();
 25+
 26+for( $arg = reset( $argv ); $arg !== false; $arg = next( $argv ) ) {
 27+ if ( substr( $arg, 0, 2 ) == '--' ) {
 28+ # Long options
 29+ $option = substr( $arg, 2 );
 30+ if ( in_array( $option, $optionsWithArgs ) ) {
 31+ $param = next( $argv );
 32+ if ( $param === false ) {
 33+ die( "$arg needs an value after it\n" );
 34+ }
 35+ $options[$option] = $param;
 36+ } else {
 37+ $options[$option] = 1;
 38+ }
 39+ } elseif ( $arg{0} == '-' ) {
 40+ # Short options
 41+ for ( $p=1; $p<strlen( $arg ); $p++ ) {
 42+ $option = $arg{$p};
 43+ if ( in_array( $option, $optionsWithArgs ) ) {
 44+ $param = next( $argv );
 45+ if ( $param === false ) {
 46+ die( "$arg needs an value after it\n" );
 47+ }
 48+ $options[$option] = $param;
 49+ } else {
 50+ $options[$option] = 1;
 51+ }
 52+ }
 53+ } else {
 54+ $args[] = $arg;
1255 }
 56+}
1357
14 - $wgCommandLineMode = true;
 58+# General initialisation
1559
16 - $sep = strchr( $include_path = ini_get( "include_path" ), ";" ) ? ";" : ":";
17 - if ( @$argv[1] && @$argv[1] != "-" ) {
18 - $self = array_shift( $argv );
19 - $lang = array_shift( $argv );
20 - putenv( "wikilang=$lang");
21 - $settingsFile = "/apache/htdocs/{$argv[1]}/w/LocalSettings.php";
22 - $newpath = "/apache/common/php$sep";
 60+$wgCommandLineMode = true;
 61+# Turn off output buffering if it's on
 62+@ob_end_flush();
 63+$sep = strchr( $include_path = ini_get( "include_path" ), ";" ) ? ";" : ":";
 64+
 65+if ( $sep == ":" && strpos( `hostname -a`, "wikimedia.org" ) !== false ) {
 66+ $wgWikiFarm = true;
 67+ if ( isset( $args[0] ) ) {
 68+ $lang = array_shift( $args );
2369 } else {
24 - $settingsFile = "../LocalSettings.php";
25 - $newpath = "";
 70+ $lang = "aa";
2671 }
 72+ if ( isset( $args[0] ) ) {
 73+ $site = array_shift( $args );
 74+ } else {
 75+ $site = "wikipedia";
 76+ }
2777
 78+ # This is for the IRC scripts, which now run as the apache user
 79+ # The apache user doesn't have access to the wikiadmin_pass command
 80+ if ( $_ENV['USER'] != "apache" ) {
 81+ $wgDBadminuser = "wikiadmin";
 82+ $wgDBadminpassword = trim(`wikiadmin_pass`);
 83+ }
 84+
 85+ putenv( "wikilang=$lang");
 86+
 87+ $DP = $IP;
 88+ ini_set( "include_path", ".:$IP:$IP/includes:$IP/languages:$IP/maintenance" );
 89+
 90+ require_once( "/home/wikipedia/common/php-new/CommonSettings.php" );
 91+} else {
 92+ $wgWikiFarm = false;
 93+ $settingsFile = "$IP/LocalSettings.php";
 94+
2895 if ( ! is_readable( $settingsFile ) ) {
2996 print "A copy of your installation's LocalSettings.php\n" .
3097 "must exist in the source directory.\n";
3198 exit();
3299 }
33 -
34 -
35100 $wgCommandLineMode = true;
36 - $DP = "../includes";
 101+ $DP = $IP;
37102 include_once( $settingsFile );
38 - ini_set( "include_path", "../includes$sep../languages$sep$newpath$IP$sep$include_path" );
 103+ ini_set( "include_path", ".$sep$IP$sep$IP/includes$sep$IP/languages$sep$IP/maintenance" );
 104+ include_once( "$IP/AdminSettings.php" );
 105+}
39106
40 - $wgUsePHPTal = false;
41 - define("MEDIAWIKI",true);
42 - include_once( "Setup.php" );
43 - include_once( "../install-utils.inc" );
44 - $wgTitle = Title::newFromText( "Command line script" );
45 - $wgCommandLineMode = true;
46 - set_time_limit(0);
47 -}
 107+# Turn off output buffering again, it might have been turned on in the settings files
 108+@ob_end_flush();
 109+# Same with this one
 110+$wgCommandLineMode = true;
 111+
 112+$wgUsePHPTal = false;
 113+define("MEDIAWIKI",true);
 114+require_once( "Setup.php" );
 115+require_once( "install-utils.inc" );
 116+$wgTitle = Title::newFromText( "Command line script" );
 117+set_time_limit(0);
 118+
48119 ?>
Index: trunk/phase3/maintenance/DiffLanguage.php
@@ -40,8 +40,8 @@
4141 $wgLanguageCode = strtoupper(substr($wgLanguageCode,0,1)).strtolower(substr($wgLanguageCode,1));
4242
4343 # read command line argument
44 -if ( isset($argv[1]) ) {
45 - $lang = $argv[1];
 44+if ( isset($args[0]) ) {
 45+ $lang = $args[0];
4646
4747 # or prompt a simple menu
4848 } else {
Index: trunk/phase3/maintenance/compressOld.inc
@@ -1,7 +1,5 @@
22 <?php
33
4 -include_once( "Article.php" );
5 -
64 function compressOldPages( $start = 0 ) {
75 $chunksize = 50;
86 print "Starting from old_id $start...\n";
Index: trunk/phase3/maintenance/rebuildMessages.php
@@ -1,11 +1,11 @@
22 <?php
33 require_once( "commandLine.inc" );
4 -include_once( "./InitialiseMessages.inc" );
 4+include_once( "InitialiseMessages.inc" );
55
66 $wgTitle = Title::newFromText( "Rebuild messages script" );
77
8 -if ( isset( $argv[0] ) ) {
9 - $response = array_shift( $argv );
 8+if ( isset( $args[0] ) ) {
 9+ $response = array_shift( $args );
1010 if ( $response == "update" ) {
1111 $response = 1;
1212 } elseif ( $response == "rebuild" ) {
@@ -14,8 +14,8 @@
1515 } else {
1616 $response = 0;
1717 }
18 -if ( isset( $argv[0] ) ) {
19 - $messages = loadLanguageFile( array_shift( $argv ) );
 18+if ( isset( $args[0] ) ) {
 19+ $messages = loadLanguageFile( array_shift( $args ) );
2020 } else {
2121 $messages = false;
2222 }
Index: trunk/phase3/maintenance/rebuildtextindex.php
@@ -1,26 +1,10 @@
22 <?php
3 -define("MEDIAWIKI",true);
43 # Rebuild search index table from scratch. This takes several
54 # hours, depending on the database size and server configuration.
65
7 -if ( ! is_readable( "../LocalSettings.php" ) ) {
8 - print "A copy of your installation's LocalSettings.php\n" .
9 - "must exist in the source directory.\n";
10 - exit();
11 -}
12 -
13 -$wgCommandLineMode = true;
14 -$DP = "../includes";
15 -require_once( "../LocalSettings.php" );
16 -require_once( "../AdminSettings.php" );
17 -
18 -$sep = strchr( $include_path = ini_get( "include_path" ), ";" ) ? ";" : ":";
19 -ini_set( "include_path", "$IP$sep$include_path" );
20 -
21 -require_once( "Setup.php" );
 6+require_once( "commandLine.inc" );
227 require_once( "./rebuildtextindex.inc" );
238 $wgTitle = Title::newFromText( "Rebuild text index script" );
24 -set_time_limit(0);
259
2610 $wgDBuser = $wgDBadminuser;
2711 $wgDBpassword = $wgDBadminpassword;
Index: trunk/phase3/maintenance/rebuildlinks.php
@@ -3,26 +3,10 @@
44 # Rebuild link tracking tables from scratch. This takes several
55 # hours, depending on the database size and server configuration.
66
7 -if ( ! is_readable( "../LocalSettings.php" ) ) {
8 - print "A copy of your installation's LocalSettings.php\n" .
9 - "must exist in the source directory.\n";
10 - exit();
11 -}
12 -
13 -$wgCommandLineMode = true;
14 -ini_set("implicit_flush", 1);
15 -
16 -$DP = "../includes";
17 -require_once( "../LocalSettings.php" );
18 -require_once( "../AdminSettings.php" );
19 -
20 -$sep = strchr( $include_path = ini_get( "include_path" ), ";" ) ? ";" : ":";
21 -ini_set( "include_path", "$IP$sep$include_path" );
22 -
23 -require_once( "Setup.php" );
 7+require_once( "commandLine.inc" );
248 require_once( "./rebuildlinks.inc" );
 9+
2510 $wgTitle = Title::newFromText( "Rebuild links script" );
26 -set_time_limit(0);
2711
2812 $wgDBuser = $wgDBadminuser;
2913 $wgDBpassword = $wgDBadminpassword;
Index: trunk/phase3/maintenance/compressOld.php
@@ -1,30 +1,10 @@
22 <?php
33
4 -# Rebuild search index table from scratch. This takes several
5 -# hours, depending on the database size and server configuration.
 4+# Compress the old table, old_flags=gzip
65
7 -if ( ! is_readable( "../LocalSettings.php" ) ) {
8 - print "A copy of your installation's LocalSettings.php\n" .
9 - "must exist in the source directory.\n";
10 - exit();
11 -}
 6+require_once( "commandLine.inc" );
 7+require_once( "compressOld.inc" );
128
13 -$wgCommandLineMode = true;
14 -$DP = "../includes";
15 -require_once( "../LocalSettings.php" );
16 -require_once( "../AdminSettings.php" );
17 -
18 -$sep = strchr( $include_path = ini_get( "include_path" ), ";" ) ? ";" : ":";
19 -ini_set( "include_path", "$IP$sep$include_path" );
20 -
21 -require_once( "Setup.php" );
22 -require_once( "./compressOld.inc" );
23 -$wgTitle = Title::newFromText( "Compress old pages script" );
24 -set_time_limit(0);
25 -
26 -$wgDBuser = $wgDBadminuser;
27 -$wgDBpassword = $wgDBadminpassword;
28 -
299 if( !function_exists( "gzdeflate" ) ) {
3010 print "You must enable zlib support in PHP to compress old revisions!\n";
3111 print "Please see http://www.php.net/manual/en/ref.zlib.php\n\n";
Index: trunk/phase3/maintenance/update2.php
@@ -1,4 +1,7 @@
22 <?php
 3+
 4+# This script was used to convert the live Wikimedia wikis from 1.2 to 1.3
 5+
36 $maintenance = "/home/wikipedia/common/php-new/maintenance";
47 require_once( "$maintenance/liveCmdLine.inc" );
58 require_once( "$maintenance/InitialiseMessages.inc" );
Index: trunk/phase3/maintenance/trivialCmdLine.php
@@ -1,5 +1,5 @@
22 <?php
3 -require_once( "liveCmdLine.inc" );
 3+require_once( "commandLine.inc" );
44 print "DB name: $wgDBname\n";
55 print "DB user: $wgDBuser\n";
66 print "DB password: $wgDBpassword\n";
Index: trunk/phase3/maintenance/remove-brokenlinks.php
@@ -1,25 +1,9 @@
22 <?php
33
44 # Remove spurious brokenlinks
5 -
6 -if ( ! is_readable( "../LocalSettings.php" ) ) {
7 - print "A copy of your installation's LocalSettings.php\n" .
8 - "must exist in the source directory.\n";
9 - exit();
10 -}
11 -
12 -$wgCommandLineMode = true;
13 -$DP = "../includes";
14 -require_once( "../LocalSettings.php" );
15 -require_once( "../AdminSettings.php" );
16 -
17 -$sep = strchr( $include_path = ini_get( "include_path" ), ";" ) ? ";" : ":";
18 -ini_set( "include_path", "$IP$sep$include_path" );
19 -
20 -require_once( "Setup.php" );
 5+require_once( "commandLine.inc" );
216 require_once( "./rebuildrecentchanges.inc" );
227 $wgTitle = Title::newFromText( "Rebuild brokenlinks script" );
23 -set_time_limit(0);
248
259 $wgDBuser = $wgDBadminuser;
2610 $wgDBpassword = $wgDBadminpassword;
Index: trunk/phase3/maintenance/rebuildall.php
@@ -3,32 +3,22 @@
44 # Rebuild link tracking tables from scratch. This takes several
55 # hours, depending on the database size and server configuration.
66
7 -if ( ! is_readable( "../LocalSettings.php" ) ) {
8 - print "A copy of your installation's LocalSettings.php\n" .
9 - "must exist in the source directory.\n";
10 - exit();
11 -}
 7+require_once( "commandLine.inc" );
128
13 -$wgCommandLineMode = true;
14 -$DP = "../includes";
15 -require_once( "../LocalSettings.php" );
16 -require_once( "../AdminSettings.php" );
 9+#require_once( "rebuildlinks.inc" );
 10+require_once( "refreshlinks.inc" );
 11+require_once( "rebuildtextindex.inc" );
 12+require_once( "rebuildrecentchanges.inc" );
1713
18 -$sep = strchr( $include_path = ini_get( "include_path" ), ";" ) ? ";" : ":";
19 -ini_set( "include_path", "$IP$sep$include_path" );
20 -
21 -require_once( "Setup.php" );
22 -require_once( "./rebuildlinks.inc" );
23 -require_once( "./rebuildtextindex.inc" );
24 -require_once( "./rebuildrecentchanges.inc" );
25 -$wgTitle = Title::newFromText( "Rebuild links script" );
26 -set_time_limit(0);
27 -
2814 $wgDBuser = $wgDBadminuser;
2915 $wgDBpassword = $wgDBadminpassword;
3016
31 -rebuildLinkTables();
 17+# Doesn't work anymore
 18+# rebuildLinkTables();
3219
 20+# Use the slow incomplete one instead. It's designed to work in the background
 21+#refreshLinks( 1 );
 22+
3323 dropTextIndex();
3424 rebuildTextIndex();
3525 createTextIndex();
Index: trunk/phase3/maintenance/rebuildrecentchanges.php
@@ -3,24 +3,9 @@
44 # Rebuild link tracking tables from scratch. This takes several
55 # hours, depending on the database size and server configuration.
66
7 -if ( ! is_readable( "../LocalSettings.php" ) ) {
8 - print "A copy of your installation's LocalSettings.php\n" .
9 - "must exist in the source directory.\n";
10 - exit();
11 -}
12 -
13 -$wgCommandLineMode = true;
14 -$DP = "../includes";
15 -require_once( "../LocalSettings.php" );
16 -require_once( "../AdminSettings.php" );
17 -
18 -$sep = strchr( $include_path = ini_get( "include_path" ), ";" ) ? ";" : ":";
19 -ini_set( "include_path", "$IP$sep$include_path" );
20 -
21 -require_once( "Setup.php" );
 7+require_once( "commandLine.inc" );
228 require_once( "./rebuildrecentchanges.inc" );
239 $wgTitle = Title::newFromText( "Rebuild recent changes script" );
24 -set_time_limit(0);
2510
2611 $wgDBuser = $wgDBadminuser;
2712 $wgDBpassword = $wgDBadminpassword;
Index: trunk/phase3/maintenance/convertLinks.php
@@ -3,8 +3,6 @@
44 # The wiki should be put into read-only mode while this script executes
55
66 require_once( "commandLine.inc" );
7 -# the below should probably be moved into commandLine.inc at some point
8 -require_once( "../AdminSettings.php" );
97 require_once( "convertLinks.inc" );
108
119 convertLinks();
Index: trunk/phase3/maintenance/refreshLinks.inc
@@ -0,0 +1,46 @@
 2+<?php
 3+
 4+define( "REPORTING_INTERVAL", 50 );
 5+define( "PAUSE_INTERVAL", 50 );
 6+
 7+function refreshLinks( $start ) {
 8+ global $wgUser, $wgTitle, $wgArticle, $wgEnablePersistentLC, $wgLinkCache, $wgOut;
 9+
 10+ $res = wfQuery("SELECT max(cur_id) as m FROM cur", DB_READ);
 11+ $row = wfFetchObject( $res );
 12+ $end = $row->m;
 13+
 14+ print("Refreshing link table. Starting from cur_id $start of $end.\n");
 15+
 16+ # Don't generate TeX PNGs (lack of a sensible current directory causes errors anyway)
 17+ $wgUser->setOption("math", 3);
 18+
 19+ for ($id = $start; $id <= $end; $id++) {
 20+ if ( !($id % REPORTING_INTERVAL) ) {
 21+ print "$id\n";
 22+ }
 23+
 24+ if ( !($id % PAUSE_INTERVAL) ) {
 25+ sleep(1);
 26+ }
 27+
 28+ $wgTitle = Title::newFromID( $id );
 29+ if ( is_null( $wgTitle ) ) {
 30+ continue;
 31+ }
 32+
 33+ $wgArticle = new Article( $wgTitle );
 34+ $text = $wgArticle->getContent( true );
 35+ $wgLinkCache = new LinkCache;
 36+ $wgOut->addWikiText( $text );
 37+
 38+ if ( $wgEnablePersistentLC ) {
 39+ $wgLinkCache->saveToLinkscc( $id, wfStrencode( $wgTitle->getPrefixedDBkey() ) );
 40+ }
 41+
 42+ $linksUpdate = new LinksUpdate( $id, $wgTitle->getPrefixedDBkey() );
 43+ $linksUpdate->doDumbUpdate();
 44+ $linksUpdate->fixBrokenLinks();
 45+ }
 46+}
 47+?>
Property changes on: trunk/phase3/maintenance/refreshLinks.inc
___________________________________________________________________
Added: svn:eol-style
148 + native
Added: svn:keywords
249 + Author Date Id Revision
Index: trunk/phase3/maintenance/tables.sql
@@ -243,3 +243,10 @@
244244 unique key (keyname),
245245 key (exptime)
246246 );
 247+
 248+-- For storing revision text
 249+CREATE TABLE blobs (
 250+ blob_index char(255) binary NOT NULL default '',
 251+ blob_data longblob NOT NULL default '',
 252+ UNIQUE key blob_index (blob_index),
 253+);

Status & tagging log