List:Internals« Previous MessageNext Message »
From:Zardosht Kasheff Date:February 25 2011 11:33pm
Subject:transaction commit/rollback and handler::external_lock(F_UNLCK)
View as plain text  
Hello all,

In ha_ndbcluster::external_lock, in mysql 5.1.52, I see the following
comment under the case where lock_type == F_UNLCK:
          /*
            Unlock is done without a transaction commit / rollback.
            This happens if the thread didn't update any rows
            We must in this case close the transaction to release resources
          */

But I do not see this anywhere else in any other handler.

Is there a scenario where a transaction that has been registered via
trans_register_ha does NOT have handlerton->commit or
handlerton->rollback getting called, and therefore requireing
ha_ndbcluster::external_lock to execute:
          ndb->closeTransaction(thd_ndb->trans);
          thd_ndb->trans= NULL;

My guess is that no, this is not required, otherwise other storage
engines would do this, but I would like to confirm.

Thanks
-Zardosht
Thread
transaction commit/rollback and handler::external_lock(F_UNLCK)Zardosht Kasheff26 Feb
  • Re: transaction commit/rollback and handler::external_lock(F_UNLCK)Konstantin Osipov26 Feb
    • Re: transaction commit/rollback and handler::external_lock(F_UNLCK)Zardosht Kasheff26 Feb
      • Re: transaction commit/rollback and handler::external_lock(F_UNLCK)Zardosht Kasheff26 Feb