int ha_commit_trans(THD *thd, bool all, bool ignore_global_read_lock)
{
int error= 0;
bool need_clear_owned_gtid= false;
error= commit_owned_gtids(thd, all, &need_clear_owned_gtid);
Transaction_ctx *trn_ctx= thd->get_transaction();
Transaction_ctx::enum_trx_scope trx_scope=
all ? Transaction_ctx::SESSION : Transaction_ctx::STMT;
.....
}
? : 为三元运算符,如果all 为真,则trx_scope=Transaction_ctx::SESSION;如果all 为假,则trx_scope=Transaction_ctx::STMT;



