From 71470b3bf1adba8899cda5a2944cf7b022361cb1 Mon Sep 17 00:00:00 2001 From: moodler Date: Mon, 10 Apr 2006 07:17:26 +0000 Subject: [PATCH] Convert the text cache to use a blob, so that there are no character set issues: see bug 5136 --- lib/db/mysql.php | 4 ++++ lib/db/mysql.sql | 2 +- version.php | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/db/mysql.php b/lib/db/mysql.php index 9f2f3852549..dd6c6995160 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 5179ff9552d..972aa860a9c 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 441746e345b..f2f63a06a13 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