'Test whether DDL performs implicit commit.'

def _test_ddl(sql):

    sql.drop_table_if_exists(('%stest_1' % sql.prefix))
    try:
        sql.ddl(('CREATE    TABLE    %stest_1    (    %stest_1_id    NUMERIC(12)    NOT    NULL    PRIMARY    KEY,    foo    VARCHAR(10))' % (sql.prefix, sql.prefix)))
        sql.rollback()
        sql.selectall(('SELECT    MAX(%stest_1_id)    FROM    %stest_1' % (sql.prefix, sql.prefix)))
        return True
    except sql.module.DatabaseError as e:
        sql.rollback()
        return False
    except Exception:
        sql.rollback()
        return False
    finally:
        sql.drop_table_if_exists(('%stest_1' % sql.prefix))
