Change all uses of TYPE= in MySQL to ENGINE=

According to the MySQL manual, TYPE= has been depreciated since MySQL 4.0, starting in 5.1 database warnings are issued when TYPE= is used instead of ENGINE=, and in MySQL 5.2 TYPE= will be removed.

Using ENGINE= inside of sql should serve the best compatibility since we require at least MySQL 4.0
This commit is contained in:
Daniel Friesen 2008-07-10 22:00:04 +00:00
parent 201a3fc978
commit 19b85e4191
9 changed files with 11 additions and 11 deletions

View file

@ -554,7 +554,7 @@ $wgSearchType = null;
/** Table name prefix */
$wgDBprefix = '';
/** MySQL table options to use during installation or update */
$wgDBTableOptions = 'TYPE=InnoDB';
$wgDBTableOptions = 'ENGINE=InnoDB';
/** To override default SQLite data directory ($docroot/../data) */
$wgSQLiteDataDir = '';

View file

@ -6,4 +6,4 @@
CREATE TABLE /*$wgDBprefix*/hitcounter (
hc_id INTEGER UNSIGNED NOT NULL
) TYPE=HEAP MAX_ROWS=25000;
) ENGINE=HEAP MAX_ROWS=25000;

View file

@ -8,4 +8,4 @@ CREATE TABLE /*$wgDBprefix*/profiling (
pf_name varchar(255) NOT NULL default '',
pf_server varchar(30) NOT NULL default '',
UNIQUE KEY pf_name_server (pf_name, pf_server)
) TYPE=HEAP;
) ENGINE=HEAP;

View file

@ -19,7 +19,7 @@ CREATE TABLE /*$wgDBprefix*/searchindex (
UNIQUE KEY (si_page)
) TYPE=MyISAM;
) ENGINE=MyISAM;
-- Copying data into new table...
INSERT INTO /*$wgDBprefix*/searchindex

View file

@ -32,7 +32,7 @@ function rebuildRecentChangesTable()
INDEX rc_timestamp (rc_timestamp),
INDEX rc_namespace (rc_namespace),
INDEX rc_title (rc_title)
) TYPE=MyISAM PACK_KEYS=1;";
) ENGINE=MyISAM PACK_KEYS=1;";
wfQuery( $sql );
print( "Loading from CUR table...\n" );

View file

@ -30,7 +30,7 @@ $sql = "CREATE TABLE watchlist (
wl_user int(5) unsigned NOT NULL,
wl_page int(8) unsigned NOT NULL,
UNIQUE KEY (wl_user, wl_page)
) TYPE=MyISAM PACK_KEYS=1";
) ENGINE=MyISAM PACK_KEYS=1";
wfQuery( $sql, DB_MASTER );
$lc = new LinkCache;

View file

@ -4,5 +4,5 @@ CREATE TABLE /*$wgDBprefix*/blobs (
blob_id integer UNSIGNED NOT NULL AUTO_INCREMENT,
blob_text longblob,
PRIMARY KEY (blob_id)
) TYPE=MyISAM MAX_ROWS=1000000 AVG_ROW_LENGTH=1000000;
) ENGINE=MyISAM MAX_ROWS=1000000 AVG_ROW_LENGTH=1000000;

View file

@ -616,7 +616,7 @@ CREATE TABLE /*$wgDBprefix*/site_stats (
--
CREATE TABLE /*$wgDBprefix*/hitcounter (
hc_id int unsigned NOT NULL
) TYPE=HEAP MAX_ROWS=25000;
) ENGINE=HEAP MAX_ROWS=25000;
--
@ -994,7 +994,7 @@ CREATE TABLE /*$wgDBprefix*/searchindex (
FULLTEXT si_title (si_title),
FULLTEXT si_text (si_text)
) TYPE=MyISAM;
) ENGINE=MyISAM;
--
-- Recognized interwiki link prefixes

View file

@ -555,7 +555,7 @@ function do_schema_restructuring() {
UNIQUE INDEX name_title (page_namespace,page_title),
INDEX (page_random),
INDEX (page_len)
) TYPE=InnoDB", $fname );
) ENGINE=InnoDB", $fname );
$wgDatabase->query("CREATE TABLE $revision (
rev_id int(8) unsigned NOT NULL auto_increment,
rev_page int(8) unsigned NOT NULL,
@ -573,7 +573,7 @@ function do_schema_restructuring() {
INDEX page_timestamp (rev_page,rev_timestamp),
INDEX user_timestamp (rev_user,rev_timestamp),
INDEX usertext_timestamp (rev_user_text,rev_timestamp)
) TYPE=InnoDB", $fname );
) ENGINE=InnoDB", $fname );
echo wfTimestamp( TS_DB );
echo "......Locking tables.\n";