Index: engines/importexportapi_db_put.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/importexportapi/engines/importexportapi_db_put.inc,v
retrieving revision 1.29.4.1
diff -u -p -r1.29.4.1 importexportapi_db_put.inc
--- engines/importexportapi_db_put.inc	5 May 2009 17:48:44 -0000	1.29.4.1
+++ engines/importexportapi_db_put.inc	7 Jul 2009 14:07:51 -0000
@@ -237,51 +237,6 @@ function _importexportapi_db_put_sequenc
 }
 
 /**
- * Helper function for importexportapi_db_put(). Updates the sequences table to
- * reflect the value of an ID field being inserted into the database.
- *
- * @param $field
- *   The field for which to update the sequences table.
- * @param $table
- *   The table that the field belongs in (with curly brackets already added).
- * @param $value
- *   The value that this field has. This value will get added to the sequences
- *   table, if there is no existing value in the sequences table, or if the
- *   existing value in the sequences table is lower than this value.
- * @param $placeholder_map
- *   A map of field type placeholders.
- */
-function _importexportapi_db_put_sequences_update($field, $table, $value, $placeholder_map) {
-  $field_put = $field['#put'];
-
-  if ($field_put['#db_uses_sequences'] && $GLOBALS['db_type'] != 'pgsql') {
-    $sequence_name = $table .'_'. $field_put['#db_field_unaliased'];
-    $result = db_fetch_object(db_query("SELECT id FROM {sequences} WHERE name = '%s'", $sequence_name));
-    if (!empty($result)) {
-      $curr_value = (int) $result->id;
-
-      if ($curr_value < $value) {
-        db_query('UPDATE {sequences} SET id = '. $placeholder_map[$field['#type']] ." WHERE name = '$sequence_name'", $value);
-      }
-    }
-    else {
-      db_query("INSERT INTO {sequences} (name, id) VALUES ('%s', %d)", $sequence_name, $value);
-    }
-  }
-  elseif ($GLOBALS['db_type'] == 'pgsql') {
-    $sequence_name = $table .'_'. $field_put['#db_field_unaliased'] .'_seq';
-    $result = db_fetch_object(db_query('SELECT last_value AS id from '. $sequence_name));
-    if (!empty($result)) {
-      $curr_value = (int) $result->id;
-
-      if ($curr_value < $value) {
-        db_query('SELECT SETVAL(\''. $sequence_name .'\', '. $placeholder_map[$field['#type']] .', FALSE)', $value);
-      }
-    }
-  }
-}
-
-/**
  * Helper function for importexportapi_db_put(). Converts a data set into an
  * array representation of a set of queries.
  *
@@ -616,11 +571,7 @@ function _importexportapi_db_put_generat
             }
           }
           else {
-            if (!$force_generate_id) {
-              // Case 4
-              _importexportapi_db_put_sequences_update($key_field, $into, $value, $placeholder_map);
-            }
-            else {
+            if ($force_generate_id) {
               // Case 4a: force ID generation for new field
               $new_id = _importexportapi_db_put_sequences($key_field, $into, $is_insert, $value, $placeholder_map);
 
