added a more sophisticated afmysql_dd_commit_txn
modified afmysql_dd_connect