diff options
author | Sergey Vojtovich <svoj@mariadb.org> | 2014-02-19 14:05:15 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2014-02-19 14:05:15 +0400 |
commit | d12c7adf715677b118104d4e5adf6f978c27b4ee (patch) | |
tree | 04cdbaf4509cbe485cb992e271ab8d711a867011 /sql/transaction.cc | |
parent | fd1437dfe532ed78ce2a1c8e05a989fcbf79832e (diff) | |
download | mariadb-git-d12c7adf715677b118104d4e5adf6f978c27b4ee.tar.gz |
MDEV-5314 - Compiling fails on OSX using clang
This is port of fix for MySQL BUG#17647863.
revno: 5572
revision-id: jon.hauglid@oracle.com-20131030232243-b0pw98oy72uka2sj
committer: Jon Olav Hauglid <jon.hauglid@oracle.com>
timestamp: Thu 2013-10-31 00:22:43 +0100
message:
Bug#17647863: MYSQL DOES NOT COMPILE ON OSX 10.9 GM
Rename test() macro to MY_TEST() to avoid conflict with libc++.
Diffstat (limited to 'sql/transaction.cc')
-rw-r--r-- | sql/transaction.cc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/sql/transaction.cc b/sql/transaction.cc index 213b6c1a4d8..3575ff52e66 100644 --- a/sql/transaction.cc +++ b/sql/transaction.cc @@ -138,7 +138,7 @@ bool trans_begin(THD *thd, uint flags) thd->server_status&= ~(SERVER_STATUS_IN_TRANS | SERVER_STATUS_IN_TRANS_READONLY); DBUG_PRINT("info", ("clearing SERVER_STATUS_IN_TRANS")); - res= test(ha_commit_trans(thd, TRUE)); + res= MY_TEST(ha_commit_trans(thd, TRUE)); } thd->variables.option_bits&= ~(OPTION_BEGIN | OPTION_KEEP_LOG); @@ -172,7 +172,7 @@ bool trans_begin(THD *thd, uint flags) compatibility. */ const bool user_is_super= - test(thd->security_ctx->master_access & SUPER_ACL); + MY_TEST(thd->security_ctx->master_access & SUPER_ACL); if (opt_readonly && !user_is_super) { my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--read-only"); @@ -191,7 +191,7 @@ bool trans_begin(THD *thd, uint flags) if (flags & MYSQL_START_TRANS_OPT_WITH_CONS_SNAPSHOT) res= ha_start_consistent_snapshot(thd); - DBUG_RETURN(test(res)); + DBUG_RETURN(MY_TEST(res)); } @@ -228,7 +228,7 @@ bool trans_commit(THD *thd) thd->transaction.all.modified_non_trans_table= FALSE; thd->lex->start_transaction_opt= 0; - DBUG_RETURN(test(res)); + DBUG_RETURN(MY_TEST(res)); } @@ -264,7 +264,7 @@ bool trans_commit_implicit(THD *thd) thd->server_status&= ~(SERVER_STATUS_IN_TRANS | SERVER_STATUS_IN_TRANS_READONLY); DBUG_PRINT("info", ("clearing SERVER_STATUS_IN_TRANS")); - res= test(ha_commit_trans(thd, TRUE)); + res= MY_TEST(ha_commit_trans(thd, TRUE)); } thd->variables.option_bits&= ~(OPTION_BEGIN | OPTION_KEEP_LOG); @@ -311,7 +311,7 @@ bool trans_rollback(THD *thd) thd->transaction.all.modified_non_trans_table= FALSE; thd->lex->start_transaction_opt= 0; - DBUG_RETURN(test(res)); + DBUG_RETURN(MY_TEST(res)); } @@ -357,7 +357,7 @@ bool trans_rollback_implicit(THD *thd) /* Rollback should clear transaction_rollback_request flag. */ DBUG_ASSERT(! thd->transaction_rollback_request); - DBUG_RETURN(test(res)); + DBUG_RETURN(MY_TEST(res)); } @@ -409,7 +409,7 @@ bool trans_commit_stmt(THD *thd) thd->transaction.stmt.reset(); - DBUG_RETURN(test(res)); + DBUG_RETURN(MY_TEST(res)); } @@ -595,7 +595,7 @@ bool trans_rollback_to_savepoint(THD *thd, LEX_STRING name) if (!res && !binlog_on) thd->mdl_context.rollback_to_savepoint(sv->mdl_savepoint); - DBUG_RETURN(test(res)); + DBUG_RETURN(MY_TEST(res)); } @@ -630,7 +630,7 @@ bool trans_release_savepoint(THD *thd, LEX_STRING name) thd->transaction.savepoints= sv->prev; - DBUG_RETURN(test(res)); + DBUG_RETURN(MY_TEST(res)); } @@ -794,7 +794,7 @@ bool trans_xa_commit(THD *thd) else if (xa_state == XA_IDLE && thd->lex->xa_opt == XA_ONE_PHASE) { int r= ha_commit_trans(thd, TRUE); - if ((res= test(r))) + if ((res= MY_TEST(r))) my_error(r == 1 ? ER_XA_RBROLLBACK : ER_XAER_RMERR, MYF(0)); } else if (xa_state == XA_PREPARED && thd->lex->xa_opt == XA_NONE) @@ -821,7 +821,7 @@ bool trans_xa_commit(THD *thd) { DEBUG_SYNC(thd, "trans_xa_commit_after_acquire_commit_lock"); - res= test(ha_commit_one_phase(thd, 1)); + res= MY_TEST(ha_commit_one_phase(thd, 1)); if (res) my_error(ER_XAER_RMERR, MYF(0)); } |