From: moodler Date: Mon, 10 Apr 2006 07:17:26 +0000 (+0000) Subject: Convert the text cache to use a blob, so that there are no character set X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=71470b3bf1adba8899cda5a2944cf7b022361cb1;p=moodle.git Convert the text cache to use a blob, so that there are no character set issues: see bug 5136 --- diff --git a/lib/db/mysql.php b/lib/db/mysql.php index 9f2f385254..dd6c699516 100644 --- a/lib/db/mysql.php +++ b/lib/db/mysql.php @@ -1771,6 +1771,10 @@ function main_upgrade($oldversion=0) { table_column('blog_tag_instance','courseid','courseid','integer','10','unsigned','0','not null'); table_column('blog_tag_instance','userid','userid','integer','10','unsigned','0','not null'); } + + if ($oldversion < 2006041001) { + table_column('cache_text','formattedtext','formattedtext','longblob','','','','not null'); + } return $result; } diff --git a/lib/db/mysql.sql b/lib/db/mysql.sql index 5179ff9552..972aa860a9 100644 --- a/lib/db/mysql.sql +++ b/lib/db/mysql.sql @@ -272,7 +272,7 @@ CREATE TABLE `prefix_cache_filters` ( CREATE TABLE `prefix_cache_text` ( `id` int(10) unsigned NOT NULL auto_increment, `md5key` varchar(32) NOT NULL default '', - `formattedtext` longtext NOT NULL default '', + `formattedtext` longblob NOT NULL default '', `timemodified` int(10) unsigned NOT NULL default '0', PRIMARY KEY (`id`), KEY `md5key` (`md5key`) diff --git a/version.php b/version.php index 441746e345..f2f63a06a1 100644 --- a/version.php +++ b/version.php @@ -6,7 +6,7 @@ // This is compared against the values stored in the database to determine // whether upgrades should be performed (see lib/db/*.php) - $version = 2006041000; // YYYYMMDD = date + $version = 2006041001; // YYYYMMDD = date // XY = increments within a single day $release = '1.6 Beta 2'; // Human-friendly version name