1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge bk-internal.mysql.com:/home/bk/mysql-5.0

into neptunus.(none):/home/msvensson/mysql/mysql-5.0
This commit is contained in:
msvensson@neptunus.(none)
2005-04-07 20:19:25 +02:00
57 changed files with 618 additions and 180 deletions

View File

@ -506,10 +506,16 @@ void ha_close_connection(THD* thd)
"beginning of transaction" and "beginning of statement").
Only storage engines registered for the transaction/statement
will know when to commit/rollback it.
NOTE
trans_register_ha is idempotent - storage engine may register many
times per transaction.
*/
void trans_register_ha(THD *thd, bool all, handlerton *ht_arg)
{
THD_TRANS *trans;
handlerton **ht;
DBUG_ENTER("trans_register_ha");
DBUG_PRINT("enter",("%s", all ? "all" : "stmt"));
@ -521,15 +527,12 @@ void trans_register_ha(THD *thd, bool all, handlerton *ht_arg)
else
trans= &thd->transaction.stmt;
handlerton **ht=trans->ht;
while (*ht)
{
for (ht=trans->ht; *ht; ht++)
if (*ht == ht_arg)
DBUG_VOID_RETURN; /* already registered, return */
ht++;
}
trans->ht[trans->nht++]=ht_arg;
DBUG_ASSERT(*ht == ht_arg);
trans->no_2pc|=(ht_arg->prepare==0);
if (thd->transaction.xid.is_null())
thd->transaction.xid.set(thd->query_id);