1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Initial push of codership-wsrep API implementation for MariaDB.

Merge of:
lp:maria/5.5, #3334: http://bazaar.launchpad.net/~maria-captains/maria/5.5/revision/3334
lp:codership-mysql/5.5, #3725: http://bazaar.launchpad.net/~codership/codership-mysql/wsrep-5.5/revision/3725
This commit is contained in:
Seppo Jaakola
2012-04-13 01:33:24 +03:00
parent 51c77ec5d4
commit 2fc1ec4356
80 changed files with 7196 additions and 64 deletions

View File

@ -1019,7 +1019,11 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
thd->transaction.stmt.modified_non_trans_table ||
was_insert_delayed)
{
#ifdef WITH_WSREP
if (WSREP_EMULATE_BINLOG(thd) || mysql_bin_log.is_open())
#else
if (mysql_bin_log.is_open())
#endif
{
int errcode= 0;
if (error <= 0)
@ -3113,6 +3117,11 @@ bool Delayed_insert::handle_inserts(void)
mysql_cond_broadcast(&cond_client); // If waiting clients
}
}
#ifdef WITH_WSREP
if (WSREP((&thd)))
thd_proc_info(&thd, "insert done");
else
#endif /* WITH_WSREP */
thd_proc_info(&thd, 0);
mysql_mutex_unlock(&mutex);
@ -3597,8 +3606,13 @@ bool select_insert::send_eof()
events are in the transaction cache and will be written when
ha_autocommit_or_rollback() is issued below.
*/
#ifdef WITH_WSREP
if ((WSREP_EMULATE_BINLOG(thd) || mysql_bin_log.is_open()) &&
(!error || thd->transaction.stmt.modified_non_trans_table))
#else
if (mysql_bin_log.is_open() &&
(!error || thd->transaction.stmt.modified_non_trans_table))
#endif
{
int errcode= 0;
if (!error)
@ -3681,7 +3695,11 @@ void select_insert::abort_result_set() {
if (!can_rollback_data())
thd->transaction.all.modified_non_trans_table= TRUE;
#ifdef WITH_WSREP
if (WSREP_EMULATE_BINLOG(thd) || mysql_bin_log.is_open())
#else
if (mysql_bin_log.is_open())
#endif
{
int errcode= query_error_code(thd, thd->killed == NOT_KILLED);
/* error of writing binary log is ignored */
@ -4072,7 +4090,11 @@ select_create::binlog_show_create_table(TABLE **tables, uint count)
/* show_database */ TRUE);
DBUG_ASSERT(result == 0); /* store_create_info() always return 0 */
#ifdef WITH_WSREP
if (WSREP_EMULATE_BINLOG(thd) || mysql_bin_log.is_open())
#else
if (mysql_bin_log.is_open())
#endif
{
int errcode= query_error_code(thd, thd->killed == NOT_KILLED);
result= thd->binlog_query(THD::STMT_QUERY_TYPE,