? sites/default/files
? sites/default/modules
? sites/default/settings.php
Index: includes/database/mysql/schema.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/database/mysql/schema.inc,v
retrieving revision 1.3
diff -u -p -r1.3 schema.inc
--- includes/database/mysql/schema.inc	19 Sep 2008 20:30:32 -0000	1.3
+++ includes/database/mysql/schema.inc	24 Sep 2008 17:11:18 -0000
@@ -73,6 +73,12 @@ class DatabaseSchema_mysql extends Datab
   protected function createFieldSql($name, $spec) {
     $sql = "`" . $name . "` " . $spec['mysql_type'];
 
+    // BLOB and TEXT columns cannot have DEFAULT values.
+    // Refer to http://dev.mysql.com/doc/refman/5.1/en/blob.html
+    if (($spec['type'] == 'text') || ($spec['type'] == 'blob')) {
+      unset($spec['default']);
+    }
+
     if (isset($spec['length'])) {
       $sql .= '(' . $spec['length'] . ')';
     }
Index: modules/aggregator/aggregator.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.install,v
retrieving revision 1.17
diff -u -p -r1.17 aggregator.install
--- modules/aggregator/aggregator.install	12 Aug 2008 07:00:48 -0000	1.17
+++ modules/aggregator/aggregator.install	24 Sep 2008 17:11:18 -0000
@@ -229,8 +229,9 @@ function aggregator_schema() {
         'description' => t('Author of the feed item.'),
       ),
       'description' => array(
-        'type' => 'text',
+        'type' => 'blob',
         'not null' => TRUE,
+        'default' => '',
         'size' => 'big',
         'description' => t('Body of the feed item.'),
       ),
@@ -263,3 +264,13 @@ function aggregator_update_7000() {
   db_add_field($ret, 'aggregator_feed', 'hash', array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''));
   return $ret;
 }
+
+/**
+ * Remap {aggregator_item}.description as BLOB type.
+ */
+function aggregator_update_7001() {
+  $ret = array();
+  db_change_field($ret, 'aggregator_item', 'description', 'description', array('type' => 'blob', 'not null' => TRUE, 'default' => '', 'size' => 'big'));
+
+  return $ret;
+}
Index: modules/aggregator/aggregator.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.module,v
retrieving revision 1.392
diff -u -p -r1.392 aggregator.module
--- modules/aggregator/aggregator.module	17 Sep 2008 07:11:56 -0000	1.392
+++ modules/aggregator/aggregator.module	24 Sep 2008 17:11:19 -0000
@@ -835,15 +835,14 @@ function aggregator_parse_feed(&$data, $
  */
 function aggregator_save_item($edit) {
   if ($edit['iid'] && $edit['title']) {
-    db_query("UPDATE {aggregator_item} SET title = '%s', link = '%s', author = '%s', description = '%s', guid = '%s', timestamp = %d WHERE iid = %d", $edit['title'], $edit['link'], $edit['author'], $edit['description'], $edit['guid'], $edit['timestamp'], $edit['iid']);
+    drupal_write_record('aggregator_item', $edit, 'iid');
   }
   elseif ($edit['iid']) {
     db_query('DELETE FROM {aggregator_item} WHERE iid = %d', $edit['iid']);
     db_query('DELETE FROM {aggregator_category_item} WHERE iid = %d', $edit['iid']);
   }
   elseif ($edit['title'] && $edit['link']) {
-    db_query("INSERT INTO {aggregator_item} (fid, title, link, author, description, timestamp, guid) VALUES (%d, '%s', '%s', '%s', '%s', %d, '%s')", $edit['fid'], $edit['title'], $edit['link'], $edit['author'], $edit['description'], $edit['timestamp'], $edit['guid']);
-    $edit['iid'] = db_last_insert_id('aggregator_item', 'iid');
+    drupal_write_record('aggregator_item', $edit);
     // file the items in the categories indicated by the feed
     $categories = db_query('SELECT cid FROM {aggregator_category_feed} WHERE fid = %d', $edit['fid']);
     while ($category = db_fetch_object($categories)) {
