1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Manual merge from mysql-5.1-bugteam to mysql-trunk-merge.

Text conflict in sql/log.cc
Text conflict in sql/log.h
Text conflict in sql/sql_class.cc
Text conflict in sql/sql_load.cc
This commit is contained in:
Alexey Kopytov
2010-05-11 12:23:57 +04:00
7 changed files with 4 additions and 66 deletions

View File

@ -1528,11 +1528,6 @@ binlog_flush_trx_cache(THD *thd, binlog_cache_mngr *cache_mngr,
cache_mngr->trx_cache.has_incident());
cache_mngr->reset_cache(&cache_mngr->trx_cache);
/*
We need to step the table map version after writing the
transaction cache to disk.
*/
mysql_bin_log.update_table_map_version();
statistic_increment(binlog_cache_use, &LOCK_status);
if (cache_log->disk_writes != 0)
{
@ -1592,13 +1587,6 @@ binlog_truncate_trx_cache(THD *thd, binlog_cache_mngr *cache_mngr, bool all)
else
cache_mngr->trx_cache.restore_prev_position();
/*
We need to step the table map version on a rollback to ensure that a new
table map event is generated instead of the one that was written to the
thrown-away transaction cache.
*/
mysql_bin_log.update_table_map_version();
DBUG_ASSERT(thd->binlog_get_pending_rows_event(is_transactional) == NULL);
DBUG_RETURN(error);
}
@ -1650,11 +1638,6 @@ binlog_flush_stmt_cache(THD *thd, binlog_cache_mngr *cache_mngr)
DBUG_RETURN(error);
cache_mngr->reset_cache(&cache_mngr->stmt_cache);
/*
We need to step the table map version after writing the
transaction cache to disk.
*/
mysql_bin_log.update_table_map_version();
statistic_increment(binlog_cache_use, &LOCK_status);
if (cache_log->disk_writes != 0)
{
@ -2662,7 +2645,7 @@ const char *MYSQL_LOG::generate_name(const char *log_name,
MYSQL_BIN_LOG::MYSQL_BIN_LOG(uint *sync_period)
:bytes_written(0), prepared_xids(0), file_id(1), open_count(1),
need_start_event(TRUE), m_table_map_version(0),
need_start_event(TRUE),
sync_period_ptr(sync_period),
is_relay_log(0), signal_cnt(0),
description_event_for_exec(0), description_event_for_queue(0)
@ -4447,7 +4430,6 @@ int THD::binlog_write_table_map(TABLE *table, bool is_transactional)
DBUG_RETURN(error);
binlog_table_maps++;
table->s->table_map_version= mysql_bin_log.table_map_version();
DBUG_RETURN(0);
}
@ -4589,21 +4571,6 @@ MYSQL_BIN_LOG::flush_and_set_pending_rows_event(THD *thd,
DBUG_RETURN(1);
}
/*
We step the table map version if we are writing an event
representing the end of a statement.
In an ideal world, we could avoid stepping the table map version,
since we could then reuse the table map that was written earlier
in the cache. This does not work since STMT_END_F implies closing
all table mappings on the slave side.
TODO: Find a solution so that table maps does not have to be
written several times within a transaction.
*/
if (pending->get_flags(Rows_log_event::STMT_END_F))
++m_table_map_version;
delete pending;
}
@ -4792,9 +4759,6 @@ unlock:
}
}
if (event_info->flags & LOG_EVENT_UPDATE_TABLE_MAP_VERSION_F)
++m_table_map_version;
DBUG_RETURN(error);
}