mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Merge with 4.0.13
This commit is contained in:
@@ -253,6 +253,9 @@ int ha_autocommit_or_rollback(THD *thd, int error)
|
||||
replication. This function also calls the commit of the table
|
||||
handler, because the order of transactions in the log of the table
|
||||
handler must be the same as in the binlog.
|
||||
NOTE that to eliminate the bottleneck of the group commit, we do not
|
||||
flush the handler log files here, but only later in a call of
|
||||
ha_commit_complete().
|
||||
|
||||
arguments:
|
||||
thd: the thread handle of the current connection
|
||||
@@ -279,12 +282,37 @@ int ha_report_binlog_offset_and_commit(THD *thd,
|
||||
my_error(ER_ERROR_DURING_COMMIT, MYF(0), error);
|
||||
error=1;
|
||||
}
|
||||
trans->innodb_active_trans=0;
|
||||
}
|
||||
#endif
|
||||
return error;
|
||||
}
|
||||
|
||||
/*
|
||||
Flushes the handler log files (if my.cnf settings do not free us from it)
|
||||
after we have called ha_report_binlog_offset_and_commit(). To eliminate
|
||||
the bottleneck from the group commit, this should be called when
|
||||
LOCK_log has been released in log.cc.
|
||||
|
||||
arguments:
|
||||
thd: the thread handle of the current connection
|
||||
return value: always 0
|
||||
*/
|
||||
|
||||
int ha_commit_complete(THD *thd)
|
||||
{
|
||||
#ifdef HAVE_INNOBASE_DB
|
||||
THD_TRANS *trans;
|
||||
trans = &thd->transaction.all;
|
||||
if (trans->innobase_tid)
|
||||
{
|
||||
innobase_commit_complete(trans->innobase_tid);
|
||||
|
||||
trans->innodb_active_trans=0;
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
This function should be called when MySQL sends rows of a SELECT result set
|
||||
or the EOF mark to the client. It releases a possible adaptive hash index
|
||||
@@ -812,7 +840,8 @@ void handler::print_error(int error, myf errflag)
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
/* Return key if error because of duplicated keys */
|
||||
|
||||
/* Return key if error because of duplicated keys */
|
||||
|
||||
uint handler::get_dup_key(int error)
|
||||
{
|
||||
@@ -823,6 +852,7 @@ uint handler::get_dup_key(int error)
|
||||
DBUG_RETURN(table->file->errkey);
|
||||
}
|
||||
|
||||
|
||||
int handler::delete_table(const char *name)
|
||||
{
|
||||
int error=0;
|
||||
@@ -849,9 +879,10 @@ int handler::rename_table(const char * from, const char * to)
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
/* Tell the handler to turn on or off logging to the handler's
|
||||
recovery log
|
||||
/*
|
||||
Tell the handler to turn on or off logging to the handler's recovery log
|
||||
*/
|
||||
|
||||
int ha_recovery_logging(THD *thd, bool on)
|
||||
{
|
||||
int error=0;
|
||||
@@ -906,7 +937,6 @@ bool handler::caching_allowed(THD* thd, char* table_key,
|
||||
|
||||
int ha_create_table(const char *name, HA_CREATE_INFO *create_info,
|
||||
bool update_create_info)
|
||||
|
||||
{
|
||||
int error;
|
||||
TABLE table;
|
||||
|
||||
Reference in New Issue
Block a user