Index: modules/aggregator/aggregator.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.admin.inc,v
retrieving revision 1.34
diff -u -p -r1.34 aggregator.admin.inc
--- modules/aggregator/aggregator.admin.inc	3 Jul 2009 05:12:25 -0000	1.34
+++ modules/aggregator/aggregator.admin.inc	7 Jul 2009 20:13:52 -0000
@@ -72,7 +72,7 @@ function aggregator_form_feed(&$form_sta
   $form['url'] = array('#type' => 'textfield',
     '#title' => t('URL'),
     '#default_value' => isset($feed->url) ? $feed->url : '',
-    '#maxlength' => 255,
+    '#maxlength' => NULL,
     '#description' => t('The fully-qualified URL of the feed.'),
     '#required' => TRUE,
   );
Index: modules/aggregator/aggregator.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.install,v
retrieving revision 1.24
diff -u -p -r1.24 aggregator.install
--- modules/aggregator/aggregator.install	5 Jun 2009 05:28:28 -0000	1.24
+++ modules/aggregator/aggregator.install	7 Jul 2009 20:13:52 -0000
@@ -136,10 +136,8 @@ function aggregator_schema() {
         'description' => 'Title of the feed.',
       ),
       'url' => array(
-        'type' => 'varchar',
-        'length' => 255,
+        'type' => 'text',
         'not null' => TRUE,
-        'default' => '',
         'description' => 'URL to the feed.',
       ),
       'refresh' => array(
@@ -155,10 +153,8 @@ function aggregator_schema() {
         'description' => 'Last time feed was checked for new items, as Unix timestamp.',
       ),
       'link' => array(
-        'type' => 'varchar',
-        'length' => 255,
+        'type' => 'text',
         'not null' => TRUE,
-        'default' => '',
         'description' => 'The parent website of the feed; comes from the &lt;link&gt; element in the feed.',
       ),
       'description' => array(
@@ -203,7 +199,7 @@ function aggregator_schema() {
     ),
     'primary key' => array('fid'),
     'unique keys' => array(
-      'url'  => array('url'),
+      'url'  => array(array('url', 255)),
       'title' => array('title'),
     ),
   );
@@ -230,10 +226,8 @@ function aggregator_schema() {
         'description' => 'Title of the feed item.',
       ),
       'link' => array(
-        'type' => 'varchar',
-        'length' => 255,
+        'type' => 'text',
         'not null' => TRUE,
-        'default' => '',
         'description' => 'Link to the feed item.',
       ),
       'author' => array(
@@ -255,9 +249,8 @@ function aggregator_schema() {
         'description' => 'Posted date of the feed item, as a Unix timestamp.',
       ),
       'guid' => array(
-        'type' => 'varchar',
-        'length' => 255,
-        'not null' => FALSE,
+        'type' => 'text',
+        'not null' => TRUE,
         'description' => 'Unique identifier for the feed item.',
       )
     ),
@@ -274,6 +267,11 @@ function aggregator_schema() {
 }
 
 /**
+ * @defgroup updates-6.x-to-7.x System updates from 6.x to 7.x
+ * @{
+ */
+
+/**
  * Add hash column to aggregator_feed table.
  */
 function aggregator_update_7000() {
@@ -281,9 +279,31 @@ function aggregator_update_7000() {
   db_add_field($ret, 'aggregator_feed', 'hash', array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''));
   return $ret;
 }
+
 /**
  * Add aggregator teaser length to settings from old global default teaser length
  */
 function aggregator_update_7001() {
+  $ret = array();
   variable_set('aggregator_teaser_length', variable_get('teaser_length'));
+  return $ret;
+}
+
+/**
+ * Allow longer URLs and add indexes on aggregator_item columns guid and link.
+ */
+function aggregator_update_7002() {
+  $ret = array();
+  db_drop_unique_key($ret, 'aggregator_feed', 'url');
+  db_change_field($ret, 'aggregator_feed', 'url', 'url', array('type' => 'text', 'not null' => TRUE));
+  db_change_field($ret, 'aggregator_feed', 'link', 'link', array('type' => 'text', 'not null' => TRUE));
+  db_change_field($ret, 'aggregator_item', 'link', 'link', array('type' => 'text', 'not null' => TRUE));
+  db_change_field($ret, 'aggregator_item', 'guid', 'guid', array('type' => 'text', 'not null' => TRUE));
+  db_add_unique_key($ret, 'aggregator_feed', 'url', array(array('url', 255)));
+  return $ret;
 }
+
+/**
+ * @} End of "defgroup updates-6.x-to-7.x"
+ * The next series of updates should start at 8000.
+ */
Index: modules/aggregator/aggregator.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.module,v
retrieving revision 1.414
diff -u -p -r1.414 aggregator.module
--- modules/aggregator/aggregator.module	5 Jul 2009 18:00:07 -0000	1.414
+++ modules/aggregator/aggregator.module	7 Jul 2009 20:14:00 -0000
@@ -291,7 +291,7 @@ function aggregator_permission() {
  * Checks news feeds for updates once their refresh interval has elapsed.
  */
 function aggregator_cron() {
-  $result = db_query('SELECT * FROM {aggregator_feed} WHERE checked + refresh < :time AND refresh != :never', array(
+  $result = db_query('SELECT * FROM {aggregator_feed} WHERE checked + refresh < :time AND refresh <> :never', array(
     ':time' => REQUEST_TIME,
     ':never' => AGGREGATOR_CLEAR_NEVER
   ));
@@ -455,6 +455,7 @@ function aggregator_save_feed($edit) {
         'url' => $edit['url'],
         'refresh' => $edit['refresh'],
         'block' => $edit['block'],
+        'link' => '',
       ))
       ->execute();
   }
@@ -486,6 +487,7 @@ function aggregator_save_feed($edit) {
         'block' => $edit['block'],
         'description' => '',
         'image' => '',
+        'link' => '',
       ))
       ->execute();
 
@@ -517,15 +519,13 @@ function aggregator_remove($feed) {
   // Call hook_aggregator_remove() on all modules.
   module_invoke_all('aggregator_remove', $feed);
   // Reset feed.
-  db_merge('aggregator_feed')
-    ->key(array('fid' => $feed->fid))
+  db_update('aggregator_feed')
+    ->condition('fid', $feed->fid)
     ->fields(array(
       'checked' => 0,
       'hash' => '',
       'etag' => '',
       'modified' => 0,
-      'description' => $feed->description,
-      'image' => $feed->image,
     ))
     ->execute();
 }
Index: modules/aggregator/aggregator.parser.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.parser.inc,v
retrieving revision 1.3
diff -u -p -r1.3 aggregator.parser.inc
--- modules/aggregator/aggregator.parser.inc	27 May 2009 18:33:54 -0000	1.3
+++ modules/aggregator/aggregator.parser.inc	7 Jul 2009 20:14:01 -0000
@@ -129,14 +129,18 @@ function aggregator_parse_feed(&$data, $
       $item['title'] = '';
     }
 
-    // Resolve the items link.
+    // Resolve the item's link.
     if (!empty($item['link'])) {
       $item['link'] = $item['link'];
     }
     else {
       $item['link'] = $feed->link;
     }
-    $item['guid'] = isset($item['guid']) ? $item['guid'] : '';
+
+    // Resolve the item's GUID.
+    if (!isset($item['guid'])) {
+      $item['guid'] = '';
+    }
 
     // Atom feeds have a content and/or summary tag instead of a description tag.
     if (!empty($item['content:encoded'])) {
