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

Merge mysql.com:/home/bkroot/mysql-5.1-new-rpl

into  mysql.com:/home/bk/MERGE/mysql-5.1-merge
This commit is contained in:
lars@black.(none)
2006-12-08 23:41:29 +01:00
69 changed files with 2631 additions and 1283 deletions

View File

@ -204,9 +204,7 @@ THD::THD()
Open_tables_state(refresh_version), rli_fake(0),
lock_id(&main_lock_id),
user_time(0), in_sub_stmt(0),
#ifdef HAVE_ROW_BASED_REPLICATION
binlog_table_maps(0),
#endif /*HAVE_ROW_BASED_REPLICATION*/
global_read_lock(0), is_fatal_error(0),
rand_used(0), time_zone_used(0),
arg_of_last_insert_id_function(FALSE),
@ -267,9 +265,7 @@ THD::THD()
system_thread= NON_SYSTEM_THREAD;
cleanup_done= abort_on_warning= no_warnings_for_error= 0;
peer_port= 0; // For SHOW PROCESSLIST
#ifdef HAVE_ROW_BASED_REPLICATION
transaction.m_pending_rows_event= 0;
#endif
#ifdef __WIN__
real_id = 0;
#endif
@ -349,9 +345,7 @@ void THD::init(void)
bzero((char*) warn_count, sizeof(warn_count));
total_warn_count= 0;
update_charset();
#ifdef HAVE_ROW_BASED_REPLICATION
reset_current_stmt_binlog_row_based();
#endif /*HAVE_ROW_BASED_REPLICATION*/
bzero((char *) &status_var, sizeof(status_var));
variables.lc_time_names = &my_locale_en_US;
}
@ -2294,7 +2288,6 @@ void xid_cache_delete(XID_STATE *xid_state)
*/
#ifndef MYSQL_CLIENT
#ifdef HAVE_ROW_BASED_REPLICATION
/*
Template member function for ensuring that there is an rows log
@ -2787,8 +2780,6 @@ void THD::binlog_delete_pending_rows_event()
}
}
#endif /* HAVE_ROW_BASED_REPLICATION */
/*
Member function that will log query, either row-based or
statement-based depending on the value of the 'current_stmt_binlog_row_based'
@ -2829,18 +2820,14 @@ int THD::binlog_query(THD::enum_binlog_query_type qtype,
If we are in prelocked mode, the flushing will be done inside the
top-most close_thread_tables().
*/
#ifdef HAVE_ROW_BASED_REPLICATION
if (this->prelocked_mode == NON_PRELOCKED)
if (int error= binlog_flush_pending_rows_event(TRUE))
DBUG_RETURN(error);
#endif /*HAVE_ROW_BASED_REPLICATION*/
switch (qtype) {
case THD::ROW_QUERY_TYPE:
#ifdef HAVE_ROW_BASED_REPLICATION
if (current_stmt_binlog_row_based)
DBUG_RETURN(0);
#endif
/* Otherwise, we fall through */
case THD::MYSQL_QUERY_TYPE:
/*
@ -2858,9 +2845,7 @@ int THD::binlog_query(THD::enum_binlog_query_type qtype,
*/
{
Query_log_event qinfo(this, query, query_len, is_trans, suppress_use);
#ifdef HAVE_ROW_BASED_REPLICATION
qinfo.flags|= LOG_EVENT_UPDATE_TABLE_MAP_VERSION_F;
#endif
/*
Binlog table maps will be irrelevant after a Query_log_event
(they are just removed on the slave side) so after the query
@ -2868,9 +2853,7 @@ int THD::binlog_query(THD::enum_binlog_query_type qtype,
table maps were written.
*/
int error= mysql_bin_log.write(&qinfo);
#ifdef HAVE_ROW_BASED_REPLICATION
binlog_table_maps= 0;
#endif /*HAVE_ROW_BASED_REPLICATION*/
DBUG_RETURN(error);
}
break;