r81468 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81467‎ | r81468 | r81469 >
Date:17:08, 3 February 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Replace TYPE by ENGINE
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLHelpers.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2_Queries.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2_Queries.php
@@ -1161,7 +1161,7 @@
11621162 . "LANGUAGE 'plpgsql'; "
11631163 . "SELECT create_" . $tablename . "(); ";
11641164 } else { // MySQL_ just a temporary table, use INSERT IGNORE later
1165 - return "CREATE TEMPORARY TABLE " . $tablename . "( id INT UNSIGNED KEY ) TYPE=MEMORY";
 1165+ return "CREATE TEMPORARY TABLE " . $tablename . "( id INT UNSIGNED KEY ) ENGINE=MEMORY";
11661166 }
11671167 }
11681168
Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php
@@ -1086,7 +1086,7 @@
10871087 . "LANGUAGE 'plpgsql'; "
10881088 . "SELECT create_" . $smw_tmp_unusedprops . "(); ";
10891089 } else { // MySQL: use temporary in-memory table
1090 - $sql = "CREATE TEMPORARY TABLE " . $smw_tmp_unusedprops . "( title VARCHAR(255) ) TYPE=MEMORY";
 1090+ $sql = "CREATE TEMPORARY TABLE " . $smw_tmp_unusedprops . "( title VARCHAR(255) ) ENGINE=MEMORY";
10911091 }
10921092
10931093 $db->query( $sql, $fname );
Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLHelpers.php
@@ -261,7 +261,7 @@
262262 $typeold = ( $notnullposold > 0 ) ? substr( $currentFields[$name], 0, $notnullposold ) : $currentFields[$name];
263263
264264 if ( $typeold != $type ) {
265 - $db->query( "ALTER TABLE \"" . $tableName . "\" ALTER COLUMN \"" . $name . "\" TYPE " . $type, __METHOD__ );
 265+ $db->query( "ALTER TABLE \"" . $tableName . "\" ALTER COLUMN \"" . $name . "\" ENGINE " . $type, __METHOD__ );
266266 }
267267
268268 if ( $notnullposold != $notnullposnew ) {

Status & tagging log