Commit 4fc259d7 authored by Dries's avatar Dries

- Patch #177 by UnConeD: updated MySQL backend to use 'longtext' instead of
  'text'.  This should depricate 0112.HEAD.killes.fix-unserialize-revision.patch
  and 0182.HEAD.anarcat.revisions-unserialize-failure-fallback.patch.
parent a7e205d2
...@@ -66,7 +66,7 @@ CREATE TABLE book ( ...@@ -66,7 +66,7 @@ CREATE TABLE book (
parent int(10) NOT NULL default '0', parent int(10) NOT NULL default '0',
weight tinyint(3) NOT NULL default '0', weight tinyint(3) NOT NULL default '0',
format tinyint(2) default '0', format tinyint(2) default '0',
log text, log longtext,
PRIMARY KEY (nid), PRIMARY KEY (nid),
KEY nid (nid), KEY nid (nid),
KEY parent (parent) KEY parent (parent)
...@@ -79,7 +79,7 @@ CREATE TABLE book ( ...@@ -79,7 +79,7 @@ CREATE TABLE book (
CREATE TABLE boxes ( CREATE TABLE boxes (
bid tinyint(4) NOT NULL auto_increment, bid tinyint(4) NOT NULL auto_increment,
title varchar(64) NOT NULL default '', title varchar(64) NOT NULL default '',
body text, body longtext,
info varchar(128) NOT NULL default '', info varchar(128) NOT NULL default '',
type tinyint(2) NOT NULL default '0', type tinyint(2) NOT NULL default '0',
PRIMARY KEY (bid), PRIMARY KEY (bid),
...@@ -105,7 +105,7 @@ CREATE TABLE bundle ( ...@@ -105,7 +105,7 @@ CREATE TABLE bundle (
CREATE TABLE cache ( CREATE TABLE cache (
cid varchar(255) NOT NULL default '', cid varchar(255) NOT NULL default '',
data mediumtext, data longtext,
expire int(11) NOT NULL default '0', expire int(11) NOT NULL default '0',
created int(11) NOT NULL default '0', created int(11) NOT NULL default '0',
PRIMARY KEY (cid) PRIMARY KEY (cid)
...@@ -121,14 +121,14 @@ CREATE TABLE comments ( ...@@ -121,14 +121,14 @@ CREATE TABLE comments (
nid int(10) NOT NULL default '0', nid int(10) NOT NULL default '0',
uid int(10) NOT NULL default '0', uid int(10) NOT NULL default '0',
subject varchar(64) NOT NULL default '', subject varchar(64) NOT NULL default '',
comment text NOT NULL, comment longtext NOT NULL,
hostname varchar(128) NOT NULL default '', hostname varchar(128) NOT NULL default '',
timestamp int(11) NOT NULL default '0', timestamp int(11) NOT NULL default '0',
link varchar(16) NOT NULL default '', link varchar(16) NOT NULL default '',
score mediumint(9) NOT NULL default '0', score mediumint(9) NOT NULL default '0',
status tinyint(3) unsigned NOT NULL default '0', status tinyint(3) unsigned NOT NULL default '0',
thread varchar(255) NOT NULL, thread varchar(255) NOT NULL,
users mediumtext, users longtext,
PRIMARY KEY (cid), PRIMARY KEY (cid),
KEY lid (nid) KEY lid (nid)
) TYPE=MyISAM; ) TYPE=MyISAM;
...@@ -141,8 +141,8 @@ CREATE TABLE directory ( ...@@ -141,8 +141,8 @@ CREATE TABLE directory (
link varchar(255) NOT NULL default '', link varchar(255) NOT NULL default '',
name varchar(128) NOT NULL default '', name varchar(128) NOT NULL default '',
mail varchar(128) NOT NULL default '', mail varchar(128) NOT NULL default '',
slogan text NOT NULL, slogan longtext NOT NULL,
mission text NOT NULL, mission longtext NOT NULL,
timestamp int(11) NOT NULL default '0', timestamp int(11) NOT NULL default '0',
PRIMARY KEY (link) PRIMARY KEY (link)
) TYPE=MyISAM; ) TYPE=MyISAM;
...@@ -159,7 +159,7 @@ CREATE TABLE feed ( ...@@ -159,7 +159,7 @@ CREATE TABLE feed (
timestamp int(10) NOT NULL default '0', timestamp int(10) NOT NULL default '0',
attributes varchar(255) NOT NULL default '', attributes varchar(255) NOT NULL default '',
link varchar(255) NOT NULL default '', link varchar(255) NOT NULL default '',
description text NOT NULL, description longtext NOT NULL,
PRIMARY KEY (fid), PRIMARY KEY (fid),
UNIQUE KEY link (url), UNIQUE KEY link (url),
UNIQUE KEY title (title) UNIQUE KEY title (title)
...@@ -198,7 +198,7 @@ CREATE TABLE item ( ...@@ -198,7 +198,7 @@ CREATE TABLE item (
title varchar(255) NOT NULL default '', title varchar(255) NOT NULL default '',
link varchar(255) NOT NULL default '', link varchar(255) NOT NULL default '',
author varchar(255) NOT NULL default '', author varchar(255) NOT NULL default '',
description text NOT NULL, description longtext NOT NULL,
timestamp int(11) default NULL, timestamp int(11) default NULL,
attributes varchar(255) NOT NULL default '', attributes varchar(255) NOT NULL default '',
PRIMARY KEY (iid) PRIMARY KEY (iid)
...@@ -273,12 +273,12 @@ CREATE TABLE node ( ...@@ -273,12 +273,12 @@ CREATE TABLE node (
comment int(2) NOT NULL default '0', comment int(2) NOT NULL default '0',
promote int(2) NOT NULL default '0', promote int(2) NOT NULL default '0',
moderate int(2) NOT NULL default '0', moderate int(2) NOT NULL default '0',
users text NOT NULL, users longtext NOT NULL,
attributes varchar(255) NOT NULL default '', attributes varchar(255) NOT NULL default '',
teaser text NOT NULL, teaser longtext NOT NULL,
body mediumtext NOT NULL, body longtext NOT NULL,
changed int(11) NOT NULL default '0', changed int(11) NOT NULL default '0',
revisions text NOT NULL, revisions longtext NOT NULL,
static int(2) NOT NULL default '0', static int(2) NOT NULL default '0',
PRIMARY KEY (nid), PRIMARY KEY (nid),
KEY node_type (type(4)), KEY node_type (type(4)),
...@@ -321,7 +321,7 @@ CREATE TABLE url_alias ( ...@@ -321,7 +321,7 @@ CREATE TABLE url_alias (
CREATE TABLE permission ( CREATE TABLE permission (
rid int(10) unsigned NOT NULL default '0', rid int(10) unsigned NOT NULL default '0',
perm text, perm longtext,
tid int(10) unsigned NOT NULL default '0', tid int(10) unsigned NOT NULL default '0',
KEY rid (rid) KEY rid (rid)
) TYPE=MyISAM; ) TYPE=MyISAM;
...@@ -333,7 +333,7 @@ CREATE TABLE permission ( ...@@ -333,7 +333,7 @@ CREATE TABLE permission (
CREATE TABLE poll ( CREATE TABLE poll (
nid int(10) unsigned NOT NULL default '0', nid int(10) unsigned NOT NULL default '0',
runtime int(10) NOT NULL default '0', runtime int(10) NOT NULL default '0',
voters text NOT NULL, voters longtext NOT NULL,
active int(2) unsigned NOT NULL default '0', active int(2) unsigned NOT NULL default '0',
PRIMARY KEY (nid) PRIMARY KEY (nid)
) TYPE=MyISAM; ) TYPE=MyISAM;
...@@ -386,7 +386,7 @@ CREATE TABLE sessions ( ...@@ -386,7 +386,7 @@ CREATE TABLE sessions (
sid varchar(32) NOT NULL default '', sid varchar(32) NOT NULL default '',
hostname varchar(128) NOT NULL default '', hostname varchar(128) NOT NULL default '',
timestamp int(11) NOT NULL default '0', timestamp int(11) NOT NULL default '0',
session text, session longtext,
KEY uid (uid), KEY uid (uid),
KEY sid (sid(4)), KEY sid (sid(4)),
KEY timestamp (timestamp) KEY timestamp (timestamp)
...@@ -439,7 +439,7 @@ CREATE TABLE term_data ( ...@@ -439,7 +439,7 @@ CREATE TABLE term_data (
tid int(10) unsigned NOT NULL auto_increment, tid int(10) unsigned NOT NULL auto_increment,
vid int(10) unsigned NOT NULL default '0', vid int(10) unsigned NOT NULL default '0',
name varchar(255) NOT NULL default '', name varchar(255) NOT NULL default '',
description text, description longtext,
weight tinyint(4) NOT NULL default '0', weight tinyint(4) NOT NULL default '0',
PRIMARY KEY (tid), PRIMARY KEY (tid),
KEY vid (vid) KEY vid (vid)
...@@ -508,7 +508,7 @@ CREATE TABLE users ( ...@@ -508,7 +508,7 @@ CREATE TABLE users (
timezone varchar(8) default NULL, timezone varchar(8) default NULL,
language char(2) NOT NULL default '', language char(2) NOT NULL default '',
init varchar(64) default '', init varchar(64) default '',
data text, data longtext,
rid int(10) unsigned NOT NULL default '0', rid int(10) unsigned NOT NULL default '0',
PRIMARY KEY (uid), PRIMARY KEY (uid),
UNIQUE KEY name (name), UNIQUE KEY name (name),
...@@ -521,7 +521,7 @@ CREATE TABLE users ( ...@@ -521,7 +521,7 @@ CREATE TABLE users (
CREATE TABLE variable ( CREATE TABLE variable (
name varchar(48) NOT NULL default '', name varchar(48) NOT NULL default '',
value text NOT NULL, value longtext NOT NULL,
PRIMARY KEY (name) PRIMARY KEY (name)
) TYPE=MyISAM; ) TYPE=MyISAM;
...@@ -532,12 +532,12 @@ CREATE TABLE variable ( ...@@ -532,12 +532,12 @@ CREATE TABLE variable (
CREATE TABLE vocabulary ( CREATE TABLE vocabulary (
vid int(10) unsigned NOT NULL auto_increment, vid int(10) unsigned NOT NULL auto_increment,
name varchar(255) NOT NULL default '', name varchar(255) NOT NULL default '',
description text, description longtext,
relations tinyint(3) unsigned NOT NULL default '0', relations tinyint(3) unsigned NOT NULL default '0',
hierarchy tinyint(3) unsigned NOT NULL default '0', hierarchy tinyint(3) unsigned NOT NULL default '0',
multiple tinyint(3) unsigned NOT NULL default '0', multiple tinyint(3) unsigned NOT NULL default '0',
required tinyint(3) unsigned NOT NULL default '0', required tinyint(3) unsigned NOT NULL default '0',
nodes text, nodes longtext,
weight tinyint(4) NOT NULL default '0', weight tinyint(4) NOT NULL default '0',
PRIMARY KEY (vid) PRIMARY KEY (vid)
) TYPE=MyISAM; ) TYPE=MyISAM;
...@@ -550,7 +550,7 @@ CREATE TABLE watchdog ( ...@@ -550,7 +550,7 @@ CREATE TABLE watchdog (
wid int(5) NOT NULL auto_increment, wid int(5) NOT NULL auto_increment,
uid int(10) NOT NULL default '0', uid int(10) NOT NULL default '0',
type varchar(16) NOT NULL default '', type varchar(16) NOT NULL default '',
message text NOT NULL, message longtext NOT NULL,
link varchar(255) NOT NULL default '', link varchar(255) NOT NULL default '',
location varchar(128) NOT NULL default '', location varchar(128) NOT NULL default '',
hostname varchar(128) NOT NULL default '', hostname varchar(128) NOT NULL default '',
......
...@@ -61,7 +61,8 @@ ...@@ -61,7 +61,8 @@
"2003-10-22" => "update_69", "2003-10-22" => "update_69",
"2003-10-27" => "update_70", "2003-10-27" => "update_70",
"2003-11-17" => "update_71", "2003-11-17" => "update_71",
"2003-11-27" => "update_72" "2003-11-27" => "update_72",
"2003-12-03" => "update_73"
); );
function update_32() { function update_32() {
...@@ -557,6 +558,33 @@ function update_72() { ...@@ -557,6 +558,33 @@ function update_72() {
update_sql("ALTER TABLE {blocks} ADD throttle tinyint(1) NOT NULL DEFAULT '0'"); update_sql("ALTER TABLE {blocks} ADD throttle tinyint(1) NOT NULL DEFAULT '0'");
} }
function update_73() {
if ($GLOBALS["db_type"] == "mysql") {
update_sql("ALTER TABLE {book} CHANGE log log longtext");
update_sql("ALTER TABLE {boxes} CHANGE body body longtext");
update_sql("ALTER TABLE {cache} CHANGE data data longtext");
update_sql("ALTER TABLE {comments} CHANGE comment comment longtext");
update_sql("ALTER TABLE {comments} CHANGE users users longtext");
update_sql("ALTER TABLE {directory} CHANGE slogan slogan longtext");
update_sql("ALTER TABLE {directory} CHANGE mission mission longtext");
update_sql("ALTER TABLE {feed} CHANGE description description longtext");
update_sql("ALTER TABLE {item} CHANGE description description longtext");
update_sql("ALTER TABLE {node} CHANGE users users longtext");
update_sql("ALTER TABLE {node} CHANGE teaser teaser longtext");
update_sql("ALTER TABLE {node} CHANGE body body longtext");
update_sql("ALTER TABLE {node} CHANGE revisions revisions longtext");
update_sql("ALTER TABLE {permission} CHANGE perm perm longtext");
update_sql("ALTER TABLE {poll} CHANGE voters voters longtext");
update_sql("ALTER TABLE {sessions} CHANGE session session longtext");
update_sql("ALTER TABLE {term_data} CHANGE description description longtext");
update_sql("ALTER TABLE {users} CHANGE data data longtext");
update_sql("ALTER TABLE {variable} CHANGE value value longtext");
update_sql("ALTER TABLE {vocabulary} CHANGE description description longtext");
update_sql("ALTER TABLE {vocabulary} CHANGE nodes nodes longtext");
update_sql("ALTER TABLE {watchdog} CHANGE message message longtext");
}
}
/* /*
** System functions ** System functions
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment