Index: actions.install
===================================================================
--- actions.install	(revision 27)
+++ actions.install	(working copy)
@@ -86,4 +86,18 @@
 
 function actions_update_1() {
    return _system_update_utf8(array('actions', 'actions_registry'));
-}
\ No newline at end of file
+}
+
+// Update sequence names to be cross-database compatible.
+function actions_update_2() {
+  $ret = array();
+  switch ($GLOBALS['db_type']) {
+    case 'mysqli':
+    case 'mysql':
+      db_query('LOCK TABLES {sequences} WRITE');
+      $ret[] = update_sql("UPDATE {sequences} SET name = '%s' WHERE name = '%s'", db_prefix_tables('{actions}_aid'), 'actions');
+      db_query('UNLOCK TABLES'); 
+      break;
+  }
+  return $ret;
+}
Index: actions.module
===================================================================
--- actions.module	(revision 27)
+++ actions.module	(working copy)
@@ -519,7 +519,7 @@
     watchdog('user', t("Action '%action' saved.", array('%action' => check_plain($desc))));
   }
   else {
-    $aid = db_next_id('actions');
+    $aid = db_next_id('{actions}_aid');
     db_query("INSERT INTO {actions} (aid, func, type, params, description) VALUES (%d, '%s', '%s', '%s', '%s')", $aid, $function, $type, $serialized, $desc);
     watchdog('user', t("Action '%action' created.", array('%action' => check_plain($desc))));
   }
