mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 18:41:56 +01:00
Post-merge fixes.
This commit is contained in:
parent
55d25c9877
commit
d9434088d3
2 changed files with 11 additions and 11 deletions
20
sql/log.cc
20
sql/log.cc
|
@ -1253,10 +1253,10 @@ binlog_trans_log_savepos(THD *thd, my_off_t *pos)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("binlog_trans_log_savepos");
|
DBUG_ENTER("binlog_trans_log_savepos");
|
||||||
DBUG_ASSERT(pos != NULL);
|
DBUG_ASSERT(pos != NULL);
|
||||||
if (thd->ha_data[binlog_hton.slot] == NULL)
|
if (thd->ha_data[binlog_hton->slot] == NULL)
|
||||||
thd->binlog_setup_trx_data();
|
thd->binlog_setup_trx_data();
|
||||||
binlog_trx_data *const trx_data=
|
binlog_trx_data *const trx_data=
|
||||||
(binlog_trx_data*) thd->ha_data[binlog_hton.slot];
|
(binlog_trx_data*) thd->ha_data[binlog_hton->slot];
|
||||||
DBUG_ASSERT(mysql_bin_log.is_open());
|
DBUG_ASSERT(mysql_bin_log.is_open());
|
||||||
*pos= trx_data->position();
|
*pos= trx_data->position();
|
||||||
DBUG_PRINT("return", ("*pos=%u", *pos));
|
DBUG_PRINT("return", ("*pos=%u", *pos));
|
||||||
|
@ -1285,12 +1285,12 @@ binlog_trans_log_truncate(THD *thd, my_off_t pos)
|
||||||
DBUG_ENTER("binlog_trans_log_truncate");
|
DBUG_ENTER("binlog_trans_log_truncate");
|
||||||
DBUG_PRINT("enter", ("pos=%u", pos));
|
DBUG_PRINT("enter", ("pos=%u", pos));
|
||||||
|
|
||||||
DBUG_ASSERT(thd->ha_data[binlog_hton.slot] != NULL);
|
DBUG_ASSERT(thd->ha_data[binlog_hton->slot] != NULL);
|
||||||
/* Only true if binlog_trans_log_savepos() wasn't called before */
|
/* Only true if binlog_trans_log_savepos() wasn't called before */
|
||||||
DBUG_ASSERT(pos != ~(my_off_t) 0);
|
DBUG_ASSERT(pos != ~(my_off_t) 0);
|
||||||
|
|
||||||
binlog_trx_data *const trx_data=
|
binlog_trx_data *const trx_data=
|
||||||
(binlog_trx_data*) thd->ha_data[binlog_hton.slot];
|
(binlog_trx_data*) thd->ha_data[binlog_hton->slot];
|
||||||
trx_data->truncate(pos);
|
trx_data->truncate(pos);
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
|
@ -1323,7 +1323,7 @@ static int binlog_close_connection(handlerton *hton, THD *thd)
|
||||||
binlog_trx_data *const trx_data=
|
binlog_trx_data *const trx_data=
|
||||||
(binlog_trx_data*) thd->ha_data[binlog_hton->slot];
|
(binlog_trx_data*) thd->ha_data[binlog_hton->slot];
|
||||||
DBUG_ASSERT(mysql_bin_log.is_open() && trx_data->empty());
|
DBUG_ASSERT(mysql_bin_log.is_open() && trx_data->empty());
|
||||||
thd->ha_data[binlog_hton.slot]= 0;
|
thd->ha_data[binlog_hton->slot]= 0;
|
||||||
trx_data->~binlog_trx_data();
|
trx_data->~binlog_trx_data();
|
||||||
my_free((gptr)trx_data, MYF(0));
|
my_free((gptr)trx_data, MYF(0));
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -3294,7 +3294,7 @@ int THD::binlog_setup_trx_data()
|
||||||
DBUG_RETURN(1); // Didn't manage to set it up
|
DBUG_RETURN(1); // Didn't manage to set it up
|
||||||
}
|
}
|
||||||
|
|
||||||
trx_data= new (ha_data[binlog_hton.slot]) binlog_trx_data;
|
trx_data= new (ha_data[binlog_hton->slot]) binlog_trx_data;
|
||||||
|
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
|
@ -3332,7 +3332,7 @@ void
|
||||||
THD::binlog_start_trans_and_stmt()
|
THD::binlog_start_trans_and_stmt()
|
||||||
{
|
{
|
||||||
DBUG_ENTER("binlog_start_trans_and_stmt");
|
DBUG_ENTER("binlog_start_trans_and_stmt");
|
||||||
binlog_trx_data *trx_data= (binlog_trx_data*) ha_data[binlog_hton.slot];
|
binlog_trx_data *trx_data= (binlog_trx_data*) ha_data[binlog_hton->slot];
|
||||||
DBUG_PRINT("enter", ("trx_data=0x%lu", trx_data));
|
DBUG_PRINT("enter", ("trx_data=0x%lu", trx_data));
|
||||||
if (trx_data)
|
if (trx_data)
|
||||||
DBUG_PRINT("enter", ("trx_data->before_stmt_pos=%u",
|
DBUG_PRINT("enter", ("trx_data->before_stmt_pos=%u",
|
||||||
|
@ -3348,13 +3348,13 @@ THD::binlog_start_trans_and_stmt()
|
||||||
*/
|
*/
|
||||||
my_off_t pos= 0;
|
my_off_t pos= 0;
|
||||||
binlog_trans_log_savepos(this, &pos);
|
binlog_trans_log_savepos(this, &pos);
|
||||||
trx_data= (binlog_trx_data*) ha_data[binlog_hton.slot];
|
trx_data= (binlog_trx_data*) ha_data[binlog_hton->slot];
|
||||||
|
|
||||||
trx_data->before_stmt_pos= pos;
|
trx_data->before_stmt_pos= pos;
|
||||||
|
|
||||||
if (options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN))
|
if (options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN))
|
||||||
trans_register_ha(this, TRUE, &binlog_hton);
|
trans_register_ha(this, TRUE, binlog_hton);
|
||||||
trans_register_ha(this, FALSE, &binlog_hton);
|
trans_register_ha(this, FALSE, binlog_hton);
|
||||||
}
|
}
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2637,10 +2637,10 @@ void select_insert::send_error(uint errcode,const char *err)
|
||||||
query_cache_invalidate3(thd, table, 1);
|
query_cache_invalidate3(thd, table, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
table->file->ha_release_auto_increment();
|
||||||
}
|
}
|
||||||
|
|
||||||
ha_rollback_stmt(thd);
|
ha_rollback_stmt(thd);
|
||||||
table->file->ha_release_auto_increment();
|
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue