mirror of
https://github.com/MariaDB/server.git
synced 2025-02-02 03:51:50 +01:00
Merge bk-internal:/home/bk/mysql-5.0
into mysql.com:/home/mysqldev/tulin/mysql-5.0
This commit is contained in:
commit
d35da42a48
3 changed files with 10 additions and 5 deletions
|
@ -476,6 +476,9 @@ void ha_close_connection(THD* thd)
|
||||||
void trans_register_ha(THD *thd, bool all, handlerton *ht_arg)
|
void trans_register_ha(THD *thd, bool all, handlerton *ht_arg)
|
||||||
{
|
{
|
||||||
THD_TRANS *trans;
|
THD_TRANS *trans;
|
||||||
|
DBUG_ENTER("trans_register_ha");
|
||||||
|
DBUG_PRINT("enter",("%s", all ? "all" : "stmt"));
|
||||||
|
|
||||||
if (all)
|
if (all)
|
||||||
{
|
{
|
||||||
trans= &thd->transaction.all;
|
trans= &thd->transaction.all;
|
||||||
|
@ -496,6 +499,7 @@ void trans_register_ha(THD *thd, bool all, handlerton *ht_arg)
|
||||||
trans->no_2pc|=(ht_arg->prepare==0);
|
trans->no_2pc|=(ht_arg->prepare==0);
|
||||||
if (thd->transaction.xid.is_null())
|
if (thd->transaction.xid.is_null())
|
||||||
thd->transaction.xid.set(thd->query_id);
|
thd->transaction.xid.set(thd->query_id);
|
||||||
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -514,7 +518,7 @@ int ha_prepare(THD *thd)
|
||||||
if (trans->nht)
|
if (trans->nht)
|
||||||
{
|
{
|
||||||
if (trans->no_2pc)
|
if (trans->no_2pc)
|
||||||
return -1;
|
DBUG_RETURN(-1);
|
||||||
for (; *ht; ht++)
|
for (; *ht; ht++)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
|
|
|
@ -97,7 +97,7 @@
|
||||||
Note: the following includes binlog and closing 0.
|
Note: the following includes binlog and closing 0.
|
||||||
so: innodb+bdb+ndb+binlog+0
|
so: innodb+bdb+ndb+binlog+0
|
||||||
*/
|
*/
|
||||||
#define MAX_HA 5
|
#define MAX_HA 6
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Bits in index_ddl_flags(KEY *wanted_index)
|
Bits in index_ddl_flags(KEY *wanted_index)
|
||||||
|
|
|
@ -129,11 +129,12 @@ static int binlog_rollback(THD *thd, bool all)
|
||||||
IO_CACHE *trans_log= (IO_CACHE*)thd->ha_data[binlog_hton.slot];
|
IO_CACHE *trans_log= (IO_CACHE*)thd->ha_data[binlog_hton.slot];
|
||||||
DBUG_ENTER("binlog_rollback");
|
DBUG_ENTER("binlog_rollback");
|
||||||
/*
|
/*
|
||||||
first two conditions here are guaranteed - see trans_register_ha()
|
First assert is guaranteed - see trans_register_ha() call below.
|
||||||
call below. The third one must be true. If it is not, we're registering
|
The second must be true. If it is not, we're registering
|
||||||
unnecessary, doing extra work. The cause should be found and eliminated
|
unnecessary, doing extra work. The cause should be found and eliminated
|
||||||
*/
|
*/
|
||||||
DBUG_ASSERT(all && mysql_bin_log.is_open() && my_b_tell(trans_log));
|
DBUG_ASSERT(all || !(thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)));
|
||||||
|
DBUG_ASSERT(mysql_bin_log.is_open() && my_b_tell(trans_log));
|
||||||
/*
|
/*
|
||||||
Update the binary log with a BEGIN/ROLLBACK block if we have
|
Update the binary log with a BEGIN/ROLLBACK block if we have
|
||||||
cached some queries and we updated some non-transactional
|
cached some queries and we updated some non-transactional
|
||||||
|
|
Loading…
Add table
Reference in a new issue