<dtml-comment>
title:
connection_id:cmf_activity_sql_connection
max_rows:0
max_cache:0
cache_time:0
class_name:
class_file:
</dtml-comment>
<params>processing_node
to_date
limit
</params>
UPDATE
  message_queue
SET
  processing_node=<dtml-sqlvar processing_node type="int">
WHERE
  processing_node=0
  AND date <= <dtml-sqlvar to_date type="datetime">
ORDER BY
  priority, date, uid
<dtml-if limit>
  LIMIT <dtml-sqlvar limit type="int">
</dtml-if>
<dtml-var sql_delimiter>
COMMIT
