r22980 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r22979‎ | r22980 | r22981 >
Date:12:51, 14 June 2007
Author:mulligen
Status:old
Tags:
Comment:
Modified paths:
  • /trunk/extensions/Wikidata/Database+scripts/Convenience/Create+uw_alt_meaningtexts+indices.sql (modified) (history)
  • /trunk/extensions/Wikidata/Database+scripts/Convenience/Create+uw_class_attributes+indices.sql (modified) (history)
  • /trunk/extensions/Wikidata/Database+scripts/Convenience/Create+uw_class_membership+indices.sql (modified) (history)
  • /trunk/extensions/Wikidata/Database+scripts/Convenience/Create+uw_collection_contents+indices.sql (modified) (history)
  • /trunk/extensions/Wikidata/Database+scripts/Convenience/Create+uw_collection_ns+indices.sql (modified) (history)
  • /trunk/extensions/Wikidata/Database+scripts/Convenience/Create+uw_defined_meaning+indices.sql (modified) (history)
  • /trunk/extensions/Wikidata/Database+scripts/Convenience/Create+uw_expression_ns+indices.sql (modified) (history)
  • /trunk/extensions/Wikidata/Database+scripts/Convenience/Create+uw_meaning_relations+indices.sql (modified) (history)
  • /trunk/extensions/Wikidata/Database+scripts/Convenience/Create+uw_option_attribute_options+indices.sql (modified) (history)
  • /trunk/extensions/Wikidata/Database+scripts/Convenience/Create+uw_option_attribute_values+indices.sql (modified) (history)
  • /trunk/extensions/Wikidata/Database+scripts/Convenience/Create+uw_syntrans+indices.sql (modified) (history)
  • /trunk/extensions/Wikidata/Database+scripts/Convenience/Create+uw_text_attribute_values+indices.sql (modified) (history)
  • /trunk/extensions/Wikidata/Database+scripts/Convenience/Create+uw_translated_content_attribute_values+indices.sql (modified) (history)
  • /trunk/extensions/Wikidata/Database+scripts/Convenience/Create+uw_url_attribute_values+indices.sql (modified) (history)
  • /trunk/extensions/Wikidata/Database+scripts/Convenience/Create+wikidata.php (modified) (history)
  • /trunk/extensions/Wikidata/Database+scripts/Convenience/Recreate+indexes+for+all+tables.php (modified) (history)
  • /trunk/extensions/Wikidata/Database+scripts/Convenience/create+mediawiki.sql (modified) (history)
  • /trunk/extensions/Wikidata/Database+scripts/Convenience/create+wikidata.sql (modified) (history)
  • /trunk/extensions/Wikidata/Database+scripts/Convenience/wikidataCoreTables.sql (modified) (history)
  • /trunk/extensions/Wikidata/Database+scripts/Convenience/wikidataSourceTables.sql (modified) (history)

Diff [purge]

Index: trunk/extensions/Wikidata/Database scripts/Convenience/Create uw_collection_contents indices.sql
@@ -1,4 +1,4 @@
2 -ALTER TABLE `uw_collection_contents`
 2+ALTER TABLE `%dc%_collection_contents`
33 ADD INDEX `versioned_end_collection` (`remove_transaction_id`, `collection_id`, `member_mid`),
44 ADD INDEX `versioned_end_collection_member` (`remove_transaction_id`, `member_mid`, `collection_id`),
55 ADD INDEX `versioned_end_internal_id` (`remove_transaction_id`, `internal_member_id` (255), `collection_id`, `member_mid`),
Index: trunk/extensions/Wikidata/Database scripts/Convenience/Create uw_option_attribute_values indices.sql
@@ -1,4 +1,4 @@
2 -ALTER TABLE `uw_option_attribute_values`
 2+ALTER TABLE `%dc%_option_attribute_values`
33 ADD INDEX `versioned_end_object` (`remove_transaction_id`, `object_id`, `option_id`, `value_id`),
44 ADD INDEX `versioned_end_option` (`remove_transaction_id`, `option_id`, `object_id`, `value_id`),
55 ADD INDEX `versioned_end_value` (`remove_transaction_id`, `value_id`),
Index: trunk/extensions/Wikidata/Database scripts/Convenience/wikidataSourceTables.sql
@@ -12,7 +12,7 @@
1313 KEY `versioned_start_meaning` (`add_transaction_id`,`meaning_mid`,`meaning_text_tcid`,`source_id`),
1414 KEY `versioned_start_text` (`add_transaction_id`,`meaning_text_tcid`,`meaning_mid`,`source_id`),
1515 KEY `versioned_start_source` (`add_transaction_id`,`source_id`,`meaning_mid`,`meaning_text_tcid`)
16 -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
 16+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
1717
1818 DROP TABLE IF EXISTS /*$wgWDprefix*/bootstrapped_defined_meanings;
1919
@@ -21,7 +21,7 @@
2222 `defined_meaning_id` int(11) NOT NULL,
2323 KEY `unversioned_meaning` (`defined_meaning_id`),
2424 KEY `unversioned_name` (`name`,`defined_meaning_id`)
25 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 25+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
2626
2727 INSERT INTO /*$wgWDprefix*/bootstrapped_defined_meanings (name,defined_meaning_id) VALUES
2828 ('DefinedMeaning',49),
@@ -46,7 +46,7 @@
4747 KEY `versioned_start_class` (`add_transaction_id`,`class_mid`,`attribute_mid`,`object_id`),
4848 KEY `versioned_start_attribute` (`add_transaction_id`,`attribute_mid`,`class_mid`,`object_id`),
4949 KEY `versioned_start_object` (`add_transaction_id`,`object_id`)
50 -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
 50+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
5151
5252 DROP TABLE IF EXISTS /*$wgWDprefix*/class_membership;
5353
@@ -62,7 +62,7 @@
6363 KEY `versioned_start_class` (`add_transaction_id`,`class_mid`,`class_member_mid`),
6464 KEY `versioned_start_class_member` (`add_transaction_id`,`class_member_mid`,`class_mid`),
6565 KEY `versioned_start_class_membership` (`add_transaction_id`,`class_membership_id`)
66 -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
 66+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
6767
6868 DROP TABLE IF EXISTS /*$wgWDprefix*/collection_contents;
6969
@@ -79,14 +79,14 @@
8080 KEY `versioned_start_collection` (`add_transaction_id`,`collection_id`,`member_mid`),
8181 KEY `versioned_start_collection_member` (`add_transaction_id`,`member_mid`,`collection_id`),
8282 KEY `versioned_start_internal_id` (`add_transaction_id`,`internal_member_id`,`collection_id`,`member_mid`)
83 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 83+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
8484
8585 DROP TABLE IF EXISTS /*$wgWDprefix*/collection_language;
8686
8787 CREATE TABLE /*$wgWDprefix*/collection_language (
8888 `collection_id` int(10) NOT NULL default '0',
8989 `language_id` int(10) NOT NULL default '0'
90 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 90+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
9191
9292 DROP TABLE IF EXISTS /*$wgWDprefix*/collection_ns;
9393
@@ -102,7 +102,7 @@
103103 KEY `versioned_start_collection` (`add_transaction_id`,`collection_id`,`collection_mid`),
104104 KEY `versioned_start_collection_meaning` (`add_transaction_id`,`collection_mid`,`collection_id`),
105105 KEY `versioned_start_collection_type` (`add_transaction_id`,`collection_type`,`collection_id`,`collection_mid`)
106 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 106+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
107107
108108 DROP TABLE IF EXISTS /*$wgWDprefix*/defined_meaning;
109109
@@ -118,7 +118,7 @@
119119 KEY `versioned_start_meaning` (`add_transaction_id`,`defined_meaning_id`,`expression_id`),
120120 KEY `versioned_start_expression` (`add_transaction_id`,`expression_id`,`defined_meaning_id`),
121121 KEY `versioned_start_meaning_text` (`add_transaction_id`,`meaning_text_tcid`,`defined_meaning_id`)
122 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 122+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
123123
124124 DROP TABLE IF EXISTS /*$wgWDprefix*/expression_ns;
125125
@@ -135,7 +135,7 @@
136136 KEY `versioned_start_expression` (`add_transaction_id`,`expression_id`,`language_id`),
137137 KEY `versioned_start_language` (`add_transaction_id`,`language_id`,`expression_id`),
138138 KEY `versioned_start_spelling` (`add_transaction_id`,`spelling`,`expression_id`,`language_id`)
139 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 139+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
140140
141141 DROP TABLE IF EXISTS /*$wgWDprefix*/meaning_relations;
142142
@@ -152,7 +152,7 @@
153153 KEY `versioned_start_outgoing` (`add_transaction_id`,`meaning1_mid`,`relationtype_mid`,`meaning2_mid`),
154154 KEY `versioned_start_incoming` (`add_transaction_id`,`meaning2_mid`,`relationtype_mid`,`meaning1_mid`),
155155 KEY `versioned_start_relation` (`add_transaction_id`,`relation_id`)
156 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 156+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
157157
158158 DROP TABLE IF EXISTS /*$wgWDprefix*/objects;
159159
@@ -164,7 +164,7 @@
165165 PRIMARY KEY (`object_id`),
166166 KEY `table` (`table`),
167167 KEY `original_id` (`original_id`)
168 -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
 168+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
169169
170170 DROP TABLE IF EXISTS /*$wgWDprefix*/option_attribute_options;
171171
@@ -181,7 +181,7 @@
182182 KEY `versioned_start_option` (`add_transaction_id`,`option_mid`,`attribute_id`,`option_id`),
183183 KEY `versioned_start_attribute` (`add_transaction_id`,`attribute_id`,`option_id`,`option_mid`),
184184 KEY `versioned_start_id` (`add_transaction_id`,`option_id`)
185 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 185+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
186186
187187 DROP TABLE IF EXISTS /*$wgWDprefix*/option_attribute_values;
188188
@@ -197,7 +197,7 @@
198198 KEY `versioned_start_object` (`add_transaction_id`,`object_id`,`option_id`,`value_id`),
199199 KEY `versioned_start_option` (`add_transaction_id`,`option_id`,`object_id`,`value_id`),
200200 KEY `versioned_start_value` (`add_transaction_id`,`value_id`)
201 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 201+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
202202
203203 DROP TABLE IF EXISTS /*$wgWDprefix*/script_log;
204204
@@ -206,7 +206,7 @@
207207 `time` datetime NOT NULL default '0000-00-00 00:00:00',
208208 `script_name` varchar(128) collate utf8_bin NOT NULL default '',
209209 `comment` varchar(128) collate utf8_bin NOT NULL default ''
210 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 210+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
211211
212212 DROP TABLE IF EXISTS /*$wgWDprefix*/syntrans;
213213
@@ -224,7 +224,7 @@
225225 KEY `versioned_start_syntrans` (`add_transaction_id`,`syntrans_sid`),
226226 KEY `versioned_start_expression` (`add_transaction_id`,`expression_id`,`identical_meaning`,`defined_meaning_id`),
227227 KEY `versioned_start_defined_meaning` (`add_transaction_id`,`defined_meaning_id`,`identical_meaning`,`expression_id`)
228 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 228+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
229229
230230 DROP TABLE IF EXISTS /*$wgWDprefix*/syntrans_relations;
231231
@@ -232,7 +232,7 @@
233233 `syntrans1_id` int(10) NOT NULL,
234234 `syntrans2_id` int(10) NOT NULL,
235235 `relationtype_mid` int(10) default NULL
236 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 236+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
237237
238238 DROP TABLE IF EXISTS /*$wgWDprefix*/text;
239239
@@ -241,7 +241,7 @@
242242 `text_text` mediumblob NOT NULL,
243243 `text_flags` tinyblob,
244244 PRIMARY KEY (`text_id`)
245 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 245+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
246246
247247 DROP TABLE IF EXISTS /*$wgWDprefix*/text_attribute_values;
248248
@@ -258,7 +258,7 @@
259259 KEY `versioned_start_object` (`add_transaction_id`,`object_id`,`attribute_mid`,`value_id`),
260260 KEY `versioned_start_attribute` (`add_transaction_id`,`attribute_mid`,`object_id`,`value_id`),
261261 KEY `versioned_start_value` (`add_transaction_id`,`value_id`)
262 -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
 262+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
263263
264264 DROP TABLE IF EXISTS /*$wgWDprefix*/transactions;
265265
@@ -270,7 +270,7 @@
271271 `comment` tinyblob NOT NULL,
272272 PRIMARY KEY (`transaction_id`),
273273 KEY `user` (`user_id`,`transaction_id`)
274 -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
 274+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
275275
276276 DROP TABLE IF EXISTS /*$wgWDprefix*/translated_content;
277277
@@ -286,7 +286,7 @@
287287 KEY `versioned_end_text` (`remove_transaction_id`,`text_id`,`translated_content_id`,`language_id`),
288288 KEY `versioned_start_translated_content` (`add_transaction_id`,`translated_content_id`,`language_id`,`text_id`),
289289 KEY `versioned_start_text` (`add_transaction_id`,`text_id`,`translated_content_id`,`language_id`)
290 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 290+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
291291
292292 DROP TABLE IF EXISTS /*$wgWDprefix*/translated_content_attribute_values;
293293
@@ -305,7 +305,7 @@
306306 KEY `versioned_start_attribute` (`add_transaction_id`,`attribute_mid`,`object_id`,`value_tcid`),
307307 KEY `versioned_start_translated_content` (`add_transaction_id`,`value_tcid`,`value_id`),
308308 KEY `versioned_start_value` (`add_transaction_id`,`value_id`)
309 -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
 309+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
310310
311311 DROP TABLE IF EXISTS /*$wgWDprefix*/url_attribute_values;
312312
@@ -323,4 +323,4 @@
324324 KEY `versioned_start_object` (`add_transaction_id`,`object_id`,`attribute_mid`,`value_id`),
325325 KEY `versioned_start_attribute` (`add_transaction_id`,`attribute_mid`,`object_id`,`value_id`),
326326 KEY `versioned_start_value` (`add_transaction_id`,`value_id`)
327 -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
 327+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
Index: trunk/extensions/Wikidata/Database scripts/Convenience/Create wikidata.php
@@ -3,12 +3,9 @@
44 # this module create a wikidata extension for mediawiki
55 # it generates the tables in a database (passed as parameter) with a defined prefix (passed as parameter)
66
7 -define('MEDIAWIKI', true );
8 -
97 $wgUseMasterForMaintenance = true;
10 -require_once( "../../../../LocalSettings.php");
118 require_once( "../../../../maintenance/commandLine.inc");
12 -require_once( "../../OmegaWiki/WikiDataAPI.php");
 9+#require_once( "../../../../LocalSettings.php");
1310 #require_once( "install-utils.inc" );
1411 #require_once( "AdminSettings.php");
1512 #require_once( "GlobalFunctions.php" );
@@ -127,9 +124,15 @@
128125
129126 ReadSQLFile( $wdDatabase, "/*\$wgWDprefix*/", $wgWDprefix, $wgWDtemplate );
130127 $wdDatabase->query( "DELETE FROM wikidata_sets WHERE set_prefix = '$prefix'" );
131 -$wdDatabase->query( "INSERT INTO wikidata_sets (set_prefix,set_fallback_name,set_dmid) VALUES ('$prefix','$comment',0)" );
132 -bootstrapCollection("datasets",85,"MAPP",$wgWDprefix);
 128+$wdDatabase->query( "INSERT INTO wikidata_sets (set_prefix,set_fallback_name,set_dmid) VALUES ('$prefix','$comment',0)" );
133129
 130+$queryResult = $wdDatabase->query( "SELECT user_name FROM user WHERE user_real_name = '$prefix'" );
 131+if ( $row = $wdDatabase->fetchObject( $queryResult ) ){
 132+ echo "user already existed";
 133+}
 134+else{
 135+ $wdDatabase->query( "INSERT INTO user (user_name,user_real_name,user_password,user_newpassword,user_email,user_options) VALUES ('$comment','$prefix','','','','')" );
 136+}
134137 $wdDatabase->close();
135138
136 -?>
 139+?>
\ No newline at end of file
Index: trunk/extensions/Wikidata/Database scripts/Convenience/Create uw_class_attributes indices.sql
@@ -1,4 +1,4 @@
2 -ALTER TABLE `uw_class_attributes`
 2+ALTER TABLE `%dc%_class_attributes`
33 ADD INDEX `versioned_end_class` (`remove_transaction_id`, `class_mid`, `attribute_mid`, `object_id`),
44 ADD INDEX `versioned_end_attribute` (`remove_transaction_id`, `attribute_mid`, `class_mid`, `object_id`),
55 ADD INDEX `versioned_end_object` (`remove_transaction_id`, `object_id`),
Index: trunk/extensions/Wikidata/Database scripts/Convenience/Create uw_class_membership indices.sql
@@ -1,4 +1,4 @@
2 -ALTER TABLE `uw_class_membership`
 2+ALTER TABLE `%dc%_class_membership`
33 ADD INDEX `versioned_end_class` (`remove_transaction_id`, `class_mid`, `class_member_mid`),
44 ADD INDEX `versioned_end_class_member` (`remove_transaction_id`, `class_member_mid`, `class_mid`),
55 ADD INDEX `versioned_end_class_membership` (`remove_transaction_id`, `class_membership_id`),
Index: trunk/extensions/Wikidata/Database scripts/Convenience/Create uw_syntrans indices.sql
@@ -1,4 +1,4 @@
2 -ALTER TABLE `uw_syntrans`
 2+ALTER TABLE `%dc%_syntrans`
33 ADD INDEX `versioned_end_syntrans` (`remove_transaction_id`, `syntrans_sid`),
44 ADD INDEX `versioned_end_expression` (`remove_transaction_id`, `expression_id`, `identical_meaning`, `defined_meaning_id`),
55 ADD INDEX `versioned_end_defined_meaning` (`remove_transaction_id`, `defined_meaning_id`, `identical_meaning`, `expression_id`),
Index: trunk/extensions/Wikidata/Database scripts/Convenience/create wikidata.sql
@@ -2,11 +2,11 @@
33 -- Add the wikidata specific namespaces
44 --
55
6 -INSERT INTO `namespace` (`ns_id`,`ns_system`,`ns_subpages`,`ns_search_default`,`ns_target`,`ns_parent`,`ns_hidden`,`ns_count`,`ns_class`) VALUES
7 - (16,NULL,0,0,'',NULL,0,'OmegaWiki',1);
8 - (17,NULL,1,0,'',16,0,NULL,NULL),
9 - (24,NULL,0,0,'',NULL,0,'DefinedMeaning',1);
10 - (25,NULL,1,0,'',24,0,NULL,NULL);
 6+INSERT INTO `namespace` (`ns_id`,`ns_parent`,`ns_system`) VALUES
 7+ (16,NULL,'OmegaWiki'),
 8+ (17,16, NULL),
 9+ (24,NULL,'DefinedMeaning'),
 10+ (25,24, NULL);
1111
1212 INSERT INTO `namespace_names` (`ns_id`,`ns_name`,`ns_default`,`ns_canonical`) VALUES
1313 (16,'Expression',1,0),
@@ -26,7 +26,7 @@
2727 `iso639_3` varchar(10) collate latin1_general_ci NOT NULL default '',
2828 `wikimedia_key` varchar(10) collate latin1_general_ci NOT NULL default '',
2929 PRIMARY KEY (`language_id`)
30 -) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
 30+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
3131
3232 INSERT INTO `language` (`language_id`,`dialect_of_lid`,`iso639_2`,`iso639_3`,`wikimedia_key`) VALUES
3333 (84,0,'','','bg'),
@@ -65,7 +65,7 @@
6666 `language_name` varchar(255) NOT NULL default '',
6767 PRIMARY KEY (`language_id`,`name_language_id`),
6868 KEY `language_id` (`language_id`)
69 -) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 69+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
7070
7171 --
7272 -- Dumping data for table `language_names`
@@ -130,7 +130,7 @@
131131 `source_id` int(11) NOT NULL default '0',
132132 `add_transaction_id` int(11) NOT NULL,
133133 `remove_transaction_id` int(11) default NULL
134 -) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
 134+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
135135
136136 --
137137 -- Definition of table `uw_bootstrapped_defined_meanings`
@@ -140,7 +140,7 @@
141141 CREATE TABLE `uw_bootstrapped_defined_meanings` (
142142 `name` varchar(255) NOT NULL,
143143 `defined_meaning_id` int(11) NOT NULL
144 -) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 144+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
145145
146146 INSERT INTO `uw_bootstrapped_defined_meanings` (`name`,`defined_meaning_id`) VALUES
147147 ('DefinedMeaning',49),
@@ -163,7 +163,7 @@
164164 `attribute_type` char(4) collate latin1_general_ci NOT NULL default 'TEXT',
165165 `add_transaction_id` int(11) NOT NULL,
166166 `remove_transaction_id` int(11) default NULL
167 -) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
 167+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
168168
169169 --
170170 -- Definition of table `uw_class_membership`
@@ -176,7 +176,7 @@
177177 `class_member_mid` int(11) NOT NULL default '0',
178178 `add_transaction_id` int(11) NOT NULL,
179179 `remove_transaction_id` int(11) default NULL
180 -) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
 180+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
181181
182182 --
183183 -- Definition of table `uw_collection_contents`
@@ -190,7 +190,7 @@
191191 `applicable_language_id` int(10) default NULL,
192192 `add_transaction_id` int(11) NOT NULL,
193193 `remove_transaction_id` int(11) default NULL
194 -) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 194+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
195195
196196 --
197197 -- Definition of table `uw_collection_language`
@@ -200,7 +200,7 @@
201201 CREATE TABLE `uw_collection_language` (
202202 `collection_id` int(10) NOT NULL default '0',
203203 `language_id` int(10) NOT NULL default '0'
204 -) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 204+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
205205
206206 --
207207 -- Definition of table `uw_collection_ns`
@@ -213,7 +213,7 @@
214214 `collection_type` char(4) default NULL,
215215 `add_transaction_id` int(11) NOT NULL,
216216 `remove_transaction_id` int(11) default NULL
217 -) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 217+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
218218
219219 --
220220 -- Definition of table `uw_defined_meaning`
@@ -226,7 +226,7 @@
227227 `meaning_text_tcid` int(10) NOT NULL default '0',
228228 `add_transaction_id` int(11) NOT NULL,
229229 `remove_transaction_id` int(11) default NULL
230 -) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 230+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
231231
232232 --
233233 -- Definition of table `uw_expression_ns`
@@ -240,7 +240,7 @@
241241 `language_id` int(10) NOT NULL default '0',
242242 `add_transaction_id` int(11) NOT NULL,
243243 `remove_transaction_id` int(11) default NULL
244 -) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 244+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
245245
246246 --
247247 -- Definition of table `uw_meaning_relations`
@@ -254,7 +254,7 @@
255255 `relationtype_mid` int(10) default NULL,
256256 `add_transaction_id` int(11) NOT NULL,
257257 `remove_transaction_id` int(11) default NULL
258 -) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 258+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
259259
260260 --
261261 -- Definition of table `uw_objects`
@@ -269,7 +269,7 @@
270270 PRIMARY KEY (`object_id`),
271271 KEY `table` (`table`),
272272 KEY `original_id` (`original_id`)
273 -) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
 273+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
274274
275275 --
276276 -- Definition of table `uw_option_attribute_options`
@@ -283,7 +283,7 @@
284284 `language_id` int(11) NOT NULL default '0',
285285 `add_transaction_id` int(11) NOT NULL default '0',
286286 `remove_transaction_id` int(11) default NULL
287 -) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 287+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
288288
289289 --
290290 -- Definition of table `uw_option_attribute_values`
@@ -296,7 +296,7 @@
297297 `option_id` int(11) NOT NULL default '0',
298298 `add_transaction_id` int(11) NOT NULL default '0',
299299 `remove_transaction_id` int(11) default NULL
300 -) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 300+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
301301
302302 --
303303 -- Definition of table `uw_script_log`
@@ -308,7 +308,7 @@
309309 `time` datetime NOT NULL default '0000-00-00 00:00:00',
310310 `script_name` varchar(128) character set latin1 collate latin1_general_ci NOT NULL default '',
311311 `comment` varchar(128) character set latin1 collate latin1_general_ci NOT NULL default ''
312 -) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 312+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
313313
314314 --
315315 -- Definition of table `uw_syntrans`
@@ -323,7 +323,7 @@
324324 `identical_meaning` tinyint(1) NOT NULL default '0',
325325 `add_transaction_id` int(11) NOT NULL,
326326 `remove_transaction_id` int(11) default NULL
327 -) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 327+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
328328
329329 --
330330 -- Definition of table `uw_syntrans_relations`
@@ -334,7 +334,7 @@
335335 `syntrans1_id` int(10) NOT NULL,
336336 `syntrans2_id` int(10) NOT NULL,
337337 `relationtype_mid` int(10) default NULL
338 -) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 338+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
339339
340340 --
341341 -- Definition of table `uw_text`
@@ -346,7 +346,7 @@
347347 `text_text` mediumblob NOT NULL,
348348 `text_flags` tinyblob NOT NULL,
349349 PRIMARY KEY (`text_id`)
350 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 350+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
351351
352352 --
353353 -- Definition of table `uw_text_attribute_values`
@@ -360,7 +360,7 @@
361361 `text` varchar(255) collate latin1_general_ci NOT NULL,
362362 `add_transaction_id` int(11) NOT NULL,
363363 `remove_transaction_id` int(11) default NULL
364 -) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
 364+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
365365
366366 --
367367 -- Definition of table `uw_transactions`
@@ -374,7 +374,7 @@
375375 `timestamp` varchar(14) collate latin1_general_ci NOT NULL,
376376 `comment` tinyblob NOT NULL,
377377 PRIMARY KEY (`transaction_id`)
378 -) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
 378+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
379379
380380 --
381381 -- Definition of table `uw_translated_content`
@@ -389,7 +389,7 @@
390390 `original_language_id` int(10) NOT NULL default '0',
391391 `add_transaction_id` int(11) NOT NULL,
392392 `remove_transaction_id` int(11) default NULL
393 -) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 393+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
394394
395395 --
396396 -- Definition of table `uw_translated_content_attribute_values`
@@ -403,7 +403,7 @@
404404 `value_tcid` int(11) NOT NULL,
405405 `add_transaction_id` int(11) NOT NULL,
406406 `remove_transaction_id` int(11) default NULL
407 -) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
 407+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
408408
409409 --
410410 -- Definition of table `uw_url_attribute_values`
@@ -418,7 +418,7 @@
419419 `label` varchar(255) collate latin1_general_ci NOT NULL,
420420 `add_transaction_id` int(11) NOT NULL,
421421 `remove_transaction_id` int(11) default NULL
422 -) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
 422+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
423423
424424 --
425425 -- Definition of table `wikidata_sets`
@@ -429,7 +429,7 @@
430430 `set_prefix` varchar(20) default NULL,
431431 `set_string` varchar(100) default NULL,
432432 `set_dmid` int(10) default NULL
433 -) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 433+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
434434
435435 INSERT INTO `wikidata_sets` (`set_prefix`,`set_string`,`set_dmid`) VALUES
436436 ('uw','OmegaWiki community',0),
Index: trunk/extensions/Wikidata/Database scripts/Convenience/Create uw_text_attribute_values indices.sql
@@ -1,4 +1,4 @@
2 -ALTER TABLE `uw_text_attribute_values`
 2+ALTER TABLE `%dc%_text_attribute_values`
33 ADD INDEX `versioned_end_object` (`remove_transaction_id`, `object_id`, `attribute_mid`, `value_id`),
44 ADD INDEX `versioned_end_attribute` (`remove_transaction_id`, `attribute_mid`, `object_id`, `value_id`),
55 ADD INDEX `versioned_end_value` (`remove_transaction_id`, `value_id`),
Index: trunk/extensions/Wikidata/Database scripts/Convenience/create mediawiki.sql
@@ -16,7 +16,7 @@
1717 `ar_rev_id` int(8) unsigned default NULL,
1818 `ar_text_id` int(8) unsigned default NULL,
1919 KEY `name_title_timestamp` (`ar_namespace`,`ar_title`,`ar_timestamp`)
20 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 20+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
2121
2222 --
2323 -- Definition of table `categorylinks`
@@ -31,7 +31,7 @@
3232 UNIQUE KEY `cl_from` (`cl_from`,`cl_to`),
3333 KEY `cl_sortkey` (`cl_to`,`cl_sortkey`),
3434 KEY `cl_timestamp` (`cl_to`,`cl_timestamp`)
35 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 35+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
3636
3737 --
3838 -- Definition of table `externallinks`
@@ -45,7 +45,7 @@
4646 KEY `el_from` (`el_from`,`el_to`(40)),
4747 KEY `el_to` (`el_to`(60),`el_from`),
4848 KEY `el_index` (`el_index`(60))
49 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 49+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
5050
5151 --
5252 -- Definition of table `filearchive`
@@ -78,7 +78,7 @@
7979 KEY `fa_storage_group` (`fa_storage_group`,`fa_storage_key`),
8080 KEY `fa_deleted_timestamp` (`fa_deleted_timestamp`),
8181 KEY `fa_deleted_user` (`fa_deleted_user`)
82 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 82+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
8383
8484 --
8585 -- Definition of table `hitcounter`
@@ -111,7 +111,7 @@
112112 PRIMARY KEY (`img_name`),
113113 KEY `img_size` (`img_size`),
114114 KEY `img_timestamp` (`img_timestamp`)
115 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 115+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
116116
117117 --
118118 -- Definition of table `imagelinks`
@@ -123,7 +123,7 @@
124124 `il_to` varchar(255) character set latin1 collate latin1_bin NOT NULL default '',
125125 UNIQUE KEY `il_from` (`il_from`,`il_to`),
126126 KEY `il_to` (`il_to`,`il_from`)
127 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 127+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
128128
129129 --
130130 -- Definition of table `interwiki`
@@ -136,7 +136,7 @@
137137 `iw_local` tinyint(1) NOT NULL default '0',
138138 `iw_trans` tinyint(1) NOT NULL default '0',
139139 UNIQUE KEY `iw_prefix` (`iw_prefix`)
140 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 140+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
141141
142142 --
143143 -- Dumping data for table `interwiki`
@@ -358,7 +358,7 @@
359359 KEY `ipb_range` (`ipb_range_start`(8),`ipb_range_end`(8)),
360360 KEY `ipb_timestamp` (`ipb_timestamp`),
361361 KEY `ipb_expiry` (`ipb_expiry`)
362 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 362+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
363363
364364 --
365365 -- Definition of table `job`
@@ -373,7 +373,7 @@
374374 `job_params` blob NOT NULL,
375375 PRIMARY KEY (`job_id`),
376376 KEY `job_cmd` (`job_cmd`,`job_namespace`,`job_title`)
377 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 377+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
378378
379379 --
380380 -- Definition of table `langlinks`
@@ -386,7 +386,7 @@
387387 `ll_title` varchar(255) character set latin1 collate latin1_bin NOT NULL default '',
388388 UNIQUE KEY `ll_from` (`ll_from`,`ll_lang`),
389389 KEY `ll_lang` (`ll_lang`,`ll_title`)
390 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 390+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
391391
392392 --
393393 -- Definition of table `logging`
@@ -408,7 +408,7 @@
409409 KEY `user_time` (`log_user`,`log_timestamp`),
410410 KEY `page_time` (`log_namespace`,`log_title`,`log_timestamp`),
411411 KEY `times` (`log_timestamp`)
412 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 412+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
413413
414414 --
415415 -- Definition of table `math`
@@ -422,7 +422,7 @@
423423 `math_html` text,
424424 `math_mathml` text,
425425 UNIQUE KEY `math_inputhash` (`math_inputhash`)
426 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 426+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
427427
428428 --
429429 -- Definition of table `namespace`
@@ -440,7 +440,7 @@
441441 `ns_class` varchar(100) default NULL,
442442 `ns_count` tinyint(1) default NULL,
443443 PRIMARY KEY (`ns_id`)
444 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 444+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
445445
446446 --
447447 -- Dumping data for table `namespace`
@@ -481,7 +481,7 @@
482482 `ns_canonical` tinyint(1) default NULL,
483483 UNIQUE KEY `ns_name` (`ns_name`),
484484 KEY `ns_id` (`ns_id`)
485 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 485+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
486486
487487 --
488488 -- Dumping data for table `namespace_names`
@@ -528,7 +528,7 @@
529529 `exptime` datetime default NULL,
530530 UNIQUE KEY `keyname` (`keyname`),
531531 KEY `exptime` (`exptime`)
532 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 532+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
533533
534534 --
535535 -- Table structure for table `objects`
@@ -543,7 +543,7 @@
544544 PRIMARY KEY (`object_id`),
545545 KEY `table` (`table`),
546546 KEY `original_id` (`original_id`)
547 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 547+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
548548
549549 --
550550 -- Definition of table `oldimage`
@@ -562,7 +562,7 @@
563563 `oi_user_text` varchar(255) character set latin1 collate latin1_bin NOT NULL default '',
564564 `oi_timestamp` varchar(14) character set latin1 collate latin1_bin NOT NULL default '',
565565 KEY `oi_name` (`oi_name`(10))
566 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 566+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
567567
568568 --
569569 -- Definition of table `page`
@@ -585,7 +585,7 @@
586586 KEY `page_random` (`page_random`),
587587 KEY `page_len` (`page_len`),
588588 KEY `name_title` (`page_namespace`,`page_title`)
589 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 589+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
590590
591591 --
592592 -- Dumping data for table `page`
@@ -614,7 +614,7 @@
615615 KEY `pr_typelevel` (`pr_type`,`pr_level`),
616616 KEY `pr_level` (`pr_level`),
617617 KEY `pr_cascade` (`pr_cascade`)
618 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 618+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
619619
620620 --
621621 -- Definition of table `pagelinks`
@@ -627,7 +627,7 @@
628628 `pl_title` varchar(255) character set latin1 collate latin1_bin NOT NULL default '',
629629 UNIQUE KEY `pl_from` (`pl_from`,`pl_namespace`,`pl_title`),
630630 KEY `pl_namespace` (`pl_namespace`,`pl_title`,`pl_from`)
631 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 631+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
632632
633633 --
634634 -- Definition of table `querycache`
@@ -640,7 +640,7 @@
641641 `qc_namespace` int(11) NOT NULL default '0',
642642 `qc_title` char(255) character set latin1 collate latin1_bin NOT NULL default '',
643643 KEY `qc_type` (`qc_type`,`qc_value`)
644 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 644+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
645645
646646 --
647647 -- Definition of table `querycache_info`
@@ -651,7 +651,7 @@
652652 `qci_type` varchar(32) NOT NULL default '',
653653 `qci_timestamp` char(14) NOT NULL default '19700101000000',
654654 UNIQUE KEY `qci_type` (`qci_type`)
655 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 655+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
656656
657657 --
658658 -- Definition of table `querycachetwo`
@@ -668,7 +668,7 @@
669669 KEY `qcc_type` (`qcc_type`,`qcc_value`),
670670 KEY `qcc_title` (`qcc_type`,`qcc_namespace`,`qcc_title`),
671671 KEY `qcc_titletwo` (`qcc_type`,`qcc_namespacetwo`,`qcc_titletwo`)
672 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 672+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
673673
674674 --
675675 -- Definition of table `recentchanges`
@@ -705,7 +705,7 @@
706706 KEY `rc_ip` (`rc_ip`),
707707 KEY `rc_ns_usertext` (`rc_namespace`,`rc_user_text`),
708708 KEY `rc_user_text` (`rc_user_text`,`rc_timestamp`)
709 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 709+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
710710
711711 --
712712 -- Definition of table `redirect`
@@ -718,7 +718,7 @@
719719 `rd_title` varchar(255) character set latin1 collate latin1_bin NOT NULL default '',
720720 PRIMARY KEY (`rd_from`),
721721 KEY `rd_ns_title` (`rd_namespace`,`rd_title`,`rd_from`)
722 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 722+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
723723
724724
725725 --
@@ -742,7 +742,7 @@
743743 KEY `page_timestamp` (`rev_page`,`rev_timestamp`),
744744 KEY `user_timestamp` (`rev_user`,`rev_timestamp`),
745745 KEY `usertext_timestamp` (`rev_user_text`,`rev_timestamp`)
746 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 746+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
747747
748748 --
749749 -- Dumping data for table `revision`
@@ -783,7 +783,7 @@
784784 `ss_admins` int(10) default '-1',
785785 `ss_images` int(10) default '0',
786786 UNIQUE KEY `ss_row_id` (`ss_row_id`)
787 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 787+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
788788
789789 --
790790 -- Dumping data for table `site_stats`
@@ -806,7 +806,7 @@
807807 `tl_title` varchar(255) character set latin1 collate latin1_bin NOT NULL default '',
808808 UNIQUE KEY `tl_from` (`tl_from`,`tl_namespace`,`tl_title`),
809809 KEY `tl_namespace` (`tl_namespace`,`tl_title`,`tl_from`)
810 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 810+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
811811
812812 --
813813 -- Definition of table `text`
@@ -818,7 +818,7 @@
819819 `old_text` mediumblob NOT NULL,
820820 `old_flags` tinyblob,
821821 PRIMARY KEY (`old_id`)
822 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 822+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
823823
824824 --
825825 -- Dumping data for table `text`
@@ -844,7 +844,7 @@
845845 `tb_name` varchar(255) default NULL,
846846 PRIMARY KEY (`tb_id`),
847847 KEY `tb_page` (`tb_page`)
848 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 848+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
849849
850850 --
851851 -- Definition of table `transcache`
@@ -856,7 +856,7 @@
857857 `tc_contents` text,
858858 `tc_time` int(11) NOT NULL default '0',
859859 UNIQUE KEY `tc_url_idx` (`tc_url`)
860 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 860+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
861861
862862 --
863863 -- Definition of table `user`
@@ -882,7 +882,7 @@
883883 PRIMARY KEY (`user_id`),
884884 UNIQUE KEY `user_name` (`user_name`),
885885 KEY `user_email_token` (`user_email_token`)
886 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 886+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
887887
888888 --
889889 -- Dumping data for table `user`
@@ -904,7 +904,7 @@
905905 `ug_group` char(16) NOT NULL default '',
906906 PRIMARY KEY (`ug_user`,`ug_group`),
907907 KEY `ug_group` (`ug_group`)
908 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 908+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
909909
910910 --
911911 -- Dumping data for table `user_groups`
@@ -927,7 +927,7 @@
928928 `user_ip` varchar(40) NOT NULL default '',
929929 KEY `user_id` (`user_id`),
930930 KEY `user_ip` (`user_ip`)
931 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 931+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
932932
933933 --
934934 -- Definition of table `watchlist`
@@ -941,4 +941,4 @@
942942 `wl_notificationtimestamp` varchar(14) character set latin1 collate latin1_bin default NULL,
943943 UNIQUE KEY `wl_user` (`wl_user`,`wl_namespace`,`wl_title`),
944944 KEY `namespace_title` (`wl_namespace`,`wl_title`)
945 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 945+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
Index: trunk/extensions/Wikidata/Database scripts/Convenience/Create uw_collection_ns indices.sql
@@ -1,4 +1,4 @@
2 -ALTER TABLE `uw_collection_ns`
 2+ALTER TABLE `%dc%_collection_ns`
33 ADD INDEX `versioned_end_collection` (`remove_transaction_id`, `collection_id`, `collection_mid`),
44 ADD INDEX `versioned_end_collection_meaning` (`remove_transaction_id`, `collection_mid`, `collection_id`),
55 ADD INDEX `versioned_end_collection_type` (`remove_transaction_id`, `collection_type` (4), `collection_id`, `collection_mid`),
Index: trunk/extensions/Wikidata/Database scripts/Convenience/Create uw_defined_meaning indices.sql
@@ -1,4 +1,4 @@
2 -ALTER TABLE `uw_defined_meaning`
 2+ALTER TABLE `%dc%_defined_meaning`
33 ADD INDEX `versioned_end_meaning` (`remove_transaction_id`, `defined_meaning_id`, `expression_id`),
44 ADD INDEX `versioned_end_expression` (`remove_transaction_id`, `expression_id`, `defined_meaning_id`),
55 ADD INDEX `versioned_end_meaning_text` (`remove_transaction_id`, `meaning_text_tcid`, `defined_meaning_id`),
Index: trunk/extensions/Wikidata/Database scripts/Convenience/Create uw_translated_content_attribute_values indices.sql
@@ -1,4 +1,4 @@
2 -ALTER TABLE `uw_translated_content_attribute_values`
 2+ALTER TABLE `%dc%_translated_content_attribute_values`
33 ADD INDEX `versioned_end_object` (`remove_transaction_id`, `object_id`, `attribute_mid`, `value_tcid`),
44 ADD INDEX `versioned_end_attribute` (`remove_transaction_id`, `attribute_mid`, `object_id`, `value_tcid`),
55 ADD INDEX `versioned_end_translated_content` (`remove_transaction_id`, `value_tcid`, `value_id`),
Index: trunk/extensions/Wikidata/Database scripts/Convenience/Create uw_meaning_relations indices.sql
@@ -1,4 +1,4 @@
2 -ALTER TABLE `uw_meaning_relations`
 2+ALTER TABLE `%dc%_meaning_relations`
33 ADD INDEX `versioned_end_outgoing` (`remove_transaction_id`, `meaning1_mid`, `relationtype_mid`, `meaning2_mid`),
44 ADD INDEX `versioned_end_incoming` (`remove_transaction_id`, `meaning2_mid`, `relationtype_mid`, `meaning1_mid`),
55 ADD INDEX `versioned_end_relation` (`remove_transaction_id`, `relation_id`),
Index: trunk/extensions/Wikidata/Database scripts/Convenience/Create uw_expression_ns indices.sql
@@ -1,4 +1,4 @@
2 -ALTER TABLE `uw_expression_ns`
 2+ALTER TABLE `%dc%_expression_ns`
33 ADD INDEX `versioned_end_expression` (`remove_transaction_id`, `expression_id`, `language_id`),
44 ADD INDEX `versioned_end_language` (`remove_transaction_id`, `language_id`, `expression_id`),
55 ADD INDEX `versioned_end_spelling` (`remove_transaction_id`, `spelling` (255), `expression_id`, `language_id`),
Index: trunk/extensions/Wikidata/Database scripts/Convenience/Recreate indexes for all tables.php
@@ -10,8 +10,8 @@
1111
1212 ob_end_flush();
1313
14 -function createIndexesForTable($tableName) {
15 - $handle = fopen("Create " . $tableName . " indices.sql", "r");
 14+function createIndexesForTable($dc,$tableName) {
 15+ $handle = fopen("Create uw_" . $tableName . " indices.sql", "r");
1616 $sql = "";
1717
1818 while (!feof($handle)) {
@@ -21,22 +21,25 @@
2222 $sql .= $line;
2323 }
2424
 25+ $sql = str_replace("%dc%", $dc, $sql);
 26+
2527 $dbr =& wfGetDB(DB_MASTER);
2628 $queryResult = $dbr->query($sql);
2729
2830 fclose($handle);
2931 }
3032
31 -function recreateIndexesForTable($tableName) {
32 - echo "Dropping indices from table $tableName.\n";
33 - dropAllIndicesFromTable($tableName);
34 - echo "Creating new indices for table $tableName.\n";
35 - createIndexesForTable($tableName);
 33+function recreateIndexesForTable($dc, $tableName) {
 34+ echo "Dropping indices from table " . $dc . "_" . $tableName . ".\n";
 35+ dropAllIndicesFromTable($dc . "_" . $tableName);
 36+ echo "Creating new indices for table " . $dc . "_" . $tableName . ".\n";
 37+ createIndexesForTable($dc,$tableName);
3638 }
3739
38 -function recreateIndexesForTables($tableNames) {
39 - foreach ($tableNames as $tableName)
40 - recreateIndexesForTable($tableName);
 40+function recreateIndexesForTables($dc, $tableNames) {
 41+ foreach ($tableNames as $tableName){
 42+ recreateIndexesForTable($dc,$tableName);
 43+ }
4144 }
4245
4346 global
@@ -44,26 +47,27 @@
4548
4649 $beginTime = time();
4750 $wgCommandLineMode = true;
 51+$dc = "sp";
4852
49 -recreateIndexesForTables(
 53+recreateIndexesForTables( "sp",
5054 array(
5155 "bootstrapped_defined_meanings",
5256 "transactions",
5357 "translated_content",
54 - "uw_alt_meaningtexts",
55 - "uw_class_attributes",
56 - "uw_class_membership",
57 - "uw_collection_contents",
58 - "uw_collection_ns",
59 - "uw_defined_meaning",
60 - "uw_expression_ns",
61 - "uw_meaning_relations",
62 - "uw_option_attribute_options",
63 - "uw_option_attribute_values",
64 - "uw_syntrans",
65 - "uw_text_attribute_values",
66 - "uw_translated_content_attribute_values",
67 - "uw_url_attribute_values"
 58+ "alt_meaningtexts",
 59+ "class_attributes",
 60+ "class_membership",
 61+ "collection_contents",
 62+ "collection_ns",
 63+ "defined_meaning",
 64+ "expression_ns",
 65+ "meaning_relations",
 66+ "option_attribute_options",
 67+ "option_attribute_values",
 68+ "syntrans",
 69+ "text_attribute_values",
 70+ "translated_content_attribute_values",
 71+ "url_attribute_values"
6872 )
6973 );
7074
Index: trunk/extensions/Wikidata/Database scripts/Convenience/wikidataCoreTables.sql
@@ -7,12 +7,12 @@
88 DELETE FROM namespace where ns_id = 24;
99 DELETE FROM namespace where ns_id = 25;
1010
11 -INSERT INTO namespace (ns_id,ns_system,ns_subpages,ns_search_default,ns_target,ns_parent,ns_hidden,ns_class,ns_count) VALUES
12 - (16,NULL,0,0,'',NULL,0,'OmegaWiki',1),
13 - (17,NULL,1,0,'',16,0,NULL,NULL),
14 - (24,NULL,0,0,'',NULL,0,'DefinedMeaning',1),
15 - (25,NULL,1,0,'',24,0,NULL,NULL);
16 -
 11+INSERT INTO `namespace` (`ns_id`,`ns_system`,`ns_parent`, `ns_count`, `ns_class` ) VALUES
 12+ (16,'NS_EXPRESSION', NULL,0,NULL),
 13+ (17,'NS_EXPRESSION_TALK', 16, 0,NULL),
 14+ (24,'NS_DEFINEDMEANING', NULL,0,NULL),
 15+ (25,'NS_DEFINEDMEANING_TALK',24, 0,NULL);
 16+
1717 DELETE FROM namespace_names where ns_id = 16;
1818 DELETE FROM namespace_names where ns_id = 17;
1919 DELETE FROM namespace_names where ns_id = 24;
@@ -33,7 +33,7 @@
3434 iso639_3 varchar(10) collate utf8_bin NOT NULL default '',
3535 wikimedia_key varchar(10) collate utf8_bin NOT NULL default '',
3636 PRIMARY KEY (language_id)
37 -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
 37+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
3838
3939 INSERT INTO language (language_id,dialect_of_lid,iso639_2,iso639_3,wikimedia_key) VALUES
4040 (84,0,'','','bg'),
@@ -68,7 +68,7 @@
6969 language_name varchar(255) NOT NULL default '',
7070 PRIMARY KEY (language_id,name_language_id),
7171 KEY language_id (language_id)
72 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 72+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
7373
7474 INSERT INTO language_names (language_id,name_language_id,language_name) VALUES
7575 (84,85,'Bulgarian'),
@@ -124,7 +124,7 @@
125125 set_prefix varchar(20) default NULL,
126126 set_fallback_name varchar(255) default NULL,
127127 set_dmid int(10) default NULL
128 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 128+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
129129
130130 INSERT INTO wikidata_sets (set_prefix,set_fallback_name,set_dmid) VALUES
131131 ('uw','OmegaWiki community',0),
Index: trunk/extensions/Wikidata/Database scripts/Convenience/Create uw_url_attribute_values indices.sql
@@ -1,4 +1,4 @@
2 -ALTER TABLE `uw_url_attribute_values`
 2+ALTER TABLE `%dc%_url_attribute_values`
33 ADD INDEX `versioned_end_object` (`remove_transaction_id`, `object_id`, `attribute_mid`, `value_id`),
44 ADD INDEX `versioned_end_attribute` (`remove_transaction_id`, `attribute_mid`, `object_id`, `value_id`),
55 ADD INDEX `versioned_end_value` (`remove_transaction_id`, `value_id`),
Index: trunk/extensions/Wikidata/Database scripts/Convenience/Create uw_alt_meaningtexts indices.sql
@@ -1,4 +1,4 @@
2 -ALTER TABLE `uw_alt_meaningtexts`
 2+ALTER TABLE `%dc%_alt_meaningtexts`
33 ADD INDEX `versioned_end_meaning` (`remove_transaction_id`, `meaning_mid`, `meaning_text_tcid`, `source_id`),
44 ADD INDEX `versioned_end_text` (`remove_transaction_id`, `meaning_text_tcid`, `meaning_mid`, `source_id`),
55 ADD INDEX `versioned_end_source` (`remove_transaction_id`, `source_id`, `meaning_mid`, `meaning_text_tcid`),
Index: trunk/extensions/Wikidata/Database scripts/Convenience/Create uw_option_attribute_options indices.sql
@@ -1,4 +1,4 @@
2 -ALTER TABLE `uw_option_attribute_options`
 2+ALTER TABLE `%dc%_option_attribute_options`
33 ADD INDEX `versioned_end_option` (`remove_transaction_id`, `option_mid`, `attribute_id`, `option_id`),
44 ADD INDEX `versioned_end_attribute` (`remove_transaction_id`, `attribute_id`, `option_id`, `option_mid`),
55 ADD INDEX `versioned_end_id` (`remove_transaction_id`, `option_id`),

Status & tagging log