3490 Alfranio Correia 2011-11-18
Some code cleanup.
modified:
mysql-test/r/user_var-binlog.result
mysql-test/t/user_var-binlog.test
sql/binlog.cc
sql/binlog.h
sql/zgroup.cc
sql/zgroups.h
sql/zgtid_set.cc
sql/zsid_map.cc
3489 Sven Sandberg 2011-11-18
Renames as decided by team:
UGID -> GTID
LGID -> LTID
super-group -> commit-sequence
dummy group -> empty group
Group_set -> GTID_set
Report error properly in group.cc
Unlock sid_lock after enter_cond in zgroup_execution/zmutex_cond
renamed:
sql/zgroup_set.cc => sql/zgtid_set.cc
sql/zugid_specification.cc => sql/zgtid_specification.cc
modified:
client/client_priv.h
client/mysqlbinlog.cc
libmysqld/CMakeLists.txt
mysql-test/extra/binlog_tests/binlog.test
mysql-test/extra/binlog_tests/ctype_ucs_binlog.test
mysql-test/extra/rpl_tests/create_recursive_construct.inc
mysql-test/extra/rpl_tests/rpl_implicit_commit_binlog.test
mysql-test/include/have_archive_plugin.inc
mysql-test/include/have_ugid.inc
mysql-test/include/mtr_check.sql
mysql-test/include/restart_slave_sql.inc
mysql-test/include/rpl_connection_master.inc
mysql-test/include/rpl_connection_slave.inc
mysql-test/include/rpl_connection_slave1.inc
mysql-test/include/show_binlog_events2.inc
mysql-test/include/show_events.inc
mysql-test/include/show_rpl_debug_info.inc
mysql-test/mtr.out-of-source
mysql-test/r/ctype_cp932_binlog_stm.result
mysql-test/r/flush_block_commit_notembedded.result
mysql-test/r/multi_update.result
mysql-test/r/mysqlbinlog2.result
mysql-test/r/partition_binlog.result
mysql-test/r/user_var-binlog.result
mysql-test/std_data/parts/part_supported_sql_funcs_int_ch1.inc
mysql-test/std_data/parts/part_supported_sql_funcs_int_date.inc
mysql-test/std_data/parts/part_supported_sql_funcs_int_int.inc
mysql-test/suite/binlog/r/binlog_database.result
mysql-test/suite/binlog/r/binlog_delete_and_flush_index.result
mysql-test/suite/binlog/r/binlog_drop_if_exists.result
mysql-test/suite/binlog/r/binlog_group_execution.result
mysql-test/suite/binlog/r/binlog_group_sets.result
mysql-test/suite/binlog/r/binlog_implicit_commit.result
mysql-test/suite/binlog/r/binlog_innodb.result
mysql-test/suite/binlog/r/binlog_innodb_row.result
mysql-test/suite/binlog/r/binlog_killed.result
mysql-test/suite/binlog/r/binlog_killed_simulate.result
mysql-test/suite/binlog/r/binlog_mixed_load_data.result
mysql-test/suite/binlog/r/binlog_rewrite.result
mysql-test/suite/binlog/r/binlog_row_binlog.result
mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result
mysql-test/suite/binlog/r/binlog_row_drop_tbl.result
mysql-test/suite/binlog/r/binlog_row_drop_tmp_tbl.result
mysql-test/suite/binlog/r/binlog_row_insert_select.result
mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result
mysql-test/suite/binlog/r/binlog_server_id.result
mysql-test/suite/binlog/r/binlog_statement_insert_delayed.result
mysql-test/suite/binlog/r/binlog_stm_binlog.result
mysql-test/suite/binlog/r/binlog_stm_blackhole.result
mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result
mysql-test/suite/binlog/r/binlog_stm_do_db.result
mysql-test/suite/binlog/r/binlog_stm_drop_tbl.result
mysql-test/suite/binlog/r/binlog_stm_drop_tmp_tbl.result
mysql-test/suite/binlog/r/binlog_stm_insert_select.result
mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result
mysql-test/suite/binlog/r/binlog_stm_ps.result
mysql-test/suite/binlog/r/binlog_stm_row.result
mysql-test/suite/binlog/r/binlog_stm_user_variables.result
mysql-test/suite/binlog/r/binlog_truncate_myisam.result
mysql-test/suite/binlog/r/binlog_unsafe.result
mysql-test/suite/binlog/r/rpl_crash_safe_master_checksum.result
mysql-test/suite/binlog/t/binlog_group_execution.test
mysql-test/suite/binlog/t/binlog_group_sets.test
mysql-test/suite/binlog/t/binlog_incident-master.opt
mysql-test/suite/binlog/t/binlog_incident_ignore-master.opt
mysql-test/suite/binlog/t/binlog_truncate_innodb-master.opt
mysql-test/suite/binlog/t/binlog_variables_log_bin-master.opt
mysql-test/suite/binlog/t/binlog_variables_relay_log-master.opt
mysql-test/suite/binlog/t/binlog_variables_relay_log_index-master.opt
mysql-test/suite/funcs_2/charset/charset_master.test
mysql-test/suite/perfschema/r/binlog_mix.result
mysql-test/suite/perfschema/r/binlog_row.result
mysql-test/suite/perfschema/r/binlog_stmt.result
mysql-test/suite/perfschema/r/relaylog.result
mysql-test/suite/rpl/README
mysql-test/suite/rpl/r/rpl_auto_increment_update_failure.result
mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result
mysql-test/suite/rpl/r/rpl_concurrency_error.result
mysql-test/suite/rpl/r/rpl_conditional_comments.result
mysql-test/suite/rpl/r/rpl_crash_safe_master.result
mysql-test/suite/rpl/r/rpl_create_tmp_table_if_not_exists.result
mysql-test/suite/rpl/r/rpl_do_db_filter.result
mysql-test/suite/rpl/r/rpl_do_grant.result
mysql-test/suite/rpl/r/rpl_do_table_filter_insensitive.result
mysql-test/suite/rpl/r/rpl_do_table_filter_sensitive.result
mysql-test/suite/rpl/r/rpl_drop_temp.result
mysql-test/suite/rpl/r/rpl_ignore_db_filter.result
mysql-test/suite/rpl/r/rpl_ignore_table_filter_insensitive.result
mysql-test/suite/rpl/r/rpl_ignore_table_filter_sensitive.result
mysql-test/suite/rpl/r/rpl_innodb_mixed_ddl.result
mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result
mysql-test/suite/rpl/r/rpl_loaddata_map.result
mysql-test/suite/rpl/r/rpl_loaddata_s.result
mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result
mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result
mysql-test/suite/rpl/r/rpl_mixed_mixing_engines.result
mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result
mysql-test/suite/rpl/r/rpl_non_direct_row_mixing_engines.result
mysql-test/suite/rpl/r/rpl_non_direct_stm_mixing_engines.result
mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result
mysql-test/suite/rpl/r/rpl_rewrite_db_filter.result
mysql-test/suite/rpl/r/rpl_rewrt_db.result
mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result
mysql-test/suite/rpl/r/rpl_row_crash_safe.result
mysql-test/suite/rpl/r/rpl_row_drop.result
mysql-test/suite/rpl/r/rpl_row_drop_create_temp_table.result
mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result
mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result
mysql-test/suite/rpl/r/rpl_row_log.result
mysql-test/suite/rpl/r/rpl_row_log_innodb.result
mysql-test/suite/rpl/r/rpl_row_mixing_engines.result
mysql-test/suite/rpl/r/rpl_row_show_relaylog_events.result
mysql-test/suite/rpl/r/rpl_slave_skip.result
mysql-test/suite/rpl/r/rpl_sp.result
mysql-test/suite/rpl/r/rpl_stm_auto_increment_bug33029.result
mysql-test/suite/rpl/r/rpl_stm_drop_create_temp_table.result
mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result
mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result
mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result
mysql-test/suite/rpl/r/rpl_stm_loaddata_concurrent.result
mysql-test/suite/rpl/r/rpl_stm_log.result
mysql-test/suite/rpl/r/rpl_stm_mix_show_relaylog_events.result
mysql-test/suite/rpl/r/rpl_stm_mixed_crash_safe.result
mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result
mysql-test/suite/rpl/r/rpl_stm_multi_query.result
mysql-test/suite/rpl/r/rpl_stm_user_variables.result
mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result
mysql-test/suite/rpl/r/rpl_user.result
mysql-test/suite/rpl/t/rpl_begin_commit_rollback.test
mysql-test/suite/rpl/t/rpl_group_mysqlbinlog.test
mysql-test/suite/rpl/t/rpl_sp.test
mysql-test/suite/rpl/t/rpl_typeconv-slave.opt
mysql-test/suite/sys_vars/t/tx_isolation_func-master.opt
mysql-test/t/mysqlbinlog2.test
mysql-test/t/user_var-binlog.test
sql/CMakeLists.txt
sql/binlog.cc
sql/binlog.h
sql/item_create.cc
sql/item_func.cc
sql/item_func.h
sql/item_strfunc.cc
sql/log_event.cc
sql/log_event.h
sql/mysqld.cc
sql/rpl_rli.cc
sql/rpl_rli.h
sql/rpl_rli_pdb.cc
sql/rpl_slave.cc
sql/set_var.h
sql/share/errmsg-utf8.txt
sql/sql_class.cc
sql/sql_class.h
sql/sql_parse.cc
sql/sql_yacc.yy
sql/sys_vars.cc
sql/sys_vars.h
sql/zgroup.cc
sql/zgroup_cache.cc
sql/zgroup_execution.cc
sql/zgroup_log_state.cc
sql/zgroups.h
sql/zmutex_cond_array.cc
sql/zowned_groups.cc
sql/zowner_id.cc
sql/zreturn.cc
sql/zsid_map.cc
sql/zstring_appender.cc
sql/zsubgroup_coder.cc
sql/zuuid.cc
unittest/gunit/rpl_group_set-t.cc
sql/zgtid_set.cc
sql/zgtid_specification.cc
=== modified file 'mysql-test/r/user_var-binlog.result'
--- a/mysql-test/r/user_var-binlog.result 2011-11-18 16:39:51 +0000
+++ b/mysql-test/r/user_var-binlog.result 2011-11-18 18:57:18 +0000
@@ -27,7 +27,7 @@ DELIMITER /*!*/;
ROLLBACK/*!*/;
# GROUPS: GTID:(X,X)
SET @@SESSION.GTID_NEXT= 'GTID';
-SET TIMESTAMP=t/*!*/;
+SET TIMESTAMP=10000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -40,22 +40,22 @@ BEGIN
/*!*/;
SET @`a b`:=_latin1 0x68656C6C6F COLLATE `latin1_swedish_ci`/*!*/;
use test/*!*/;
-SET TIMESTAMP=t/*!*/;
+SET TIMESTAMP=10000/*!*/;
INSERT INTO t1 VALUES(@`a b`)
/*!*/;
-SET TIMESTAMP=t/*!*/;
+SET TIMESTAMP=10000/*!*/;
COMMIT
/*!*/;
SET @@SESSION.GTID_NEXT= 'GTID';
-SET TIMESTAMP=t/*!*/;
+SET TIMESTAMP=10000/*!*/;
BEGIN
/*!*/;
SET @`var1`:=_latin1 0x273B616161 COLLATE `latin1_swedish_ci`/*!*/;
SET @`var2`:=_binary 0x61 COLLATE `binary`/*!*/;
-SET TIMESTAMP=t/*!*/;
+SET TIMESTAMP=10000/*!*/;
insert into t1 values (@var1),(@var2)
/*!*/;
-SET TIMESTAMP=t/*!*/;
+SET TIMESTAMP=10000/*!*/;
COMMIT
/*!*/;
DELIMITER ;
=== modified file 'mysql-test/t/user_var-binlog.test'
--- a/mysql-test/t/user_var-binlog.test 2011-11-18 16:39:51 +0000
+++ b/mysql-test/t/user_var-binlog.test 2011-11-18 18:57:18 +0000
@@ -18,7 +18,7 @@ source include/show_binlog_events.inc;
# escaped).
let $MYSQLD_DATADIR= `select @@datadir`;
flush logs;
---replace_regex s/$MYSQL_TEST_DIR/MYSQL_TEST_DIR/ s/TIMESTAMP=[0-9]*/TIMESTAMP=t/ s/SET @@SESSION.GTID_NEXT= .*;/SET @@SESSION.GTID_NEXT= 'GTID';/ /GROUPS: .*:(.*,.*) /GROUPS: GTID:(X,X)/
+--replace_regex s/$MYSQL_TEST_DIR/MYSQL_TEST_DIR/ s/SET @@SESSION.GTID_NEXT= .*;/SET @@SESSION.GTID_NEXT= 'GTID';/ /GROUPS: .*:(.*,.*) /GROUPS: GTID:(X,X)/
--exec $MYSQL_BINLOG --short-form $MYSQLD_DATADIR/master-bin.000001
drop table t1;
=== modified file 'sql/binlog.cc'
--- a/sql/binlog.cc 2011-11-18 16:39:51 +0000
+++ b/sql/binlog.cc 2011-11-18 18:57:18 +0000
@@ -391,8 +391,10 @@ private:
static binlog_cache_mngr *thd_get_cache_mngr(const THD *thd)
{
- // If opt_bin_log is not set, binlog_hton->slot == -1 and hence
- // thd_get_ha_data(thd, hton) segfaults.
+ /*
+ If opt_bin_log is not set, binlog_hton->slot == -1 and hence
+ thd_get_ha_data(thd, hton) segfaults.
+ */
DBUG_ASSERT(opt_bin_log);
return (binlog_cache_mngr *)thd_get_ha_data(thd, binlog_hton);
}
@@ -638,12 +640,8 @@ binlog_flush_cache(THD *thd, binlog_cach
if (thd->binlog_flush_pending_rows_event(TRUE, cache_data->is_trx_cache()))
DBUG_RETURN(1);
- my_off_t before_commit_event= cache_data->get_byte_position();
if (write_event_to_cache(thd, end_evt, cache_data))
DBUG_RETURN(1);
-
- my_off_t offset_after_last_statement=
- cache_data->get_byte_position() - before_commit_event;
#ifdef HAVE_GTID
if (gtid_flush_group_cache(thd, cache_data))
@@ -661,8 +659,7 @@ binlog_flush_cache(THD *thd, binlog_cach
inside a stored function.
*/
bool prepared= (end_evt->get_type_code() == XID_EVENT);
- error= mysql_bin_log.write_cache(thd, cache_mngr, cache_data,
- prepared, offset_after_last_statement);
+ error= mysql_bin_log.write_cache(thd, cache_mngr, cache_data, prepared);
}
cache_data->reset();
@@ -4044,8 +4041,7 @@ err:
#ifdef HAVE_GTID
error |= gtid_flush_group_cache(thd, cache_data);
#endif
- error |= mysql_bin_log.write_cache(thd, cache_mngr, cache_data, FALSE,
- 0/*offset_after_last_statement*/);
+ error |= mysql_bin_log.write_cache(thd, cache_mngr, cache_data, FALSE);
cache_data->reset();
}
@@ -4525,9 +4521,7 @@ bool MYSQL_BIN_LOG::write_incident(THD *
*/
bool MYSQL_BIN_LOG::write_cache(THD *thd, binlog_cache_mngr *cache_mngr,
- binlog_cache_data *cache_data,
- bool prepared,
- my_off_t offset_after_last_statement)
+ binlog_cache_data *cache_data, bool prepared)
{
DBUG_ENTER("MYSQL_BIN_LOG::write(THD *, IO_CACHE *, Log_event *)");
=== modified file 'sql/binlog.h'
--- a/sql/binlog.h 2011-11-18 16:39:51 +0000
+++ b/sql/binlog.h 2011-11-18 18:57:18 +0000
@@ -247,7 +247,7 @@ public:
bool write_event(Log_event* event_info);
bool write_cache(THD *thd, class binlog_cache_mngr *cache_mngr,
class binlog_cache_data *binlog_cache_data,
- bool prepared, my_off_t offset_after_last_statement);
+ bool prepared);
int do_write_cache(IO_CACHE *cache, bool lock_log, bool flush_and_sync);
void set_write_error(THD *thd, bool is_transactional);
=== modified file 'sql/zgroup.cc'
--- a/sql/zgroup.cc 2011-11-18 16:39:51 +0000
+++ b/sql/zgroup.cc 2011-11-18 18:57:18 +0000
@@ -31,7 +31,7 @@ enum_return_status Group::parse(Sid_map
rpl_sid sid;
// parse sid
- if (sid.parse(text) != RETURN_STATUS_OK)
+ if (sid.parse(text) == RETURN_STATUS_OK)
{
sidno= sid_map->add_permanent(&sid);
if (sidno <= 0)
=== modified file 'sql/zgroups.h'
--- a/sql/zgroups.h 2011-11-18 16:39:51 +0000
+++ b/sql/zgroups.h 2011-11-18 18:57:18 +0000
@@ -642,7 +642,7 @@ struct Uuid
{
/**
Stores the UUID represented by a string on the form
- XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXXXXXX in this object.
+ XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX in this object.
@return RETURN_STATUS_OK or RETURN_STATUS_UNREPORTED_ERROR.
*/
enum_return_status parse(const char *string);
@@ -875,18 +875,11 @@ public:
the write lock, and take the read lock again.
@param sid The SID.
- @param _sync If true, the sid_map will be synced.
@retval SIDNO The SIDNO for the SID (a new SIDNO if the SID did
not exist, an existing if it did exist).
@retval negative Error. This function calls my_error.
-
- @note The SID is stored on disk forever. This is needed if the
- SID is written to the binary log. If the SID will not be written
- to the binary log, it is a waste of disk space. If this becomes a
- problem, we may add add_temporary(), which would only store the
- sid in memory, and return a negative sidno.
*/
- rpl_sidno add_permanent(const rpl_sid *sid, bool _sync= true);
+ rpl_sidno add_permanent(const rpl_sid *sid);
/**
Get the SIDNO for a given SID
@@ -1252,7 +1245,7 @@ public:
The string must have the format of a comma-separated list of zero
or more of the following:
- XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXXXXXX(:NUMBER+(-NUMBER)?)*
+ XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX(:NUMBER+(-NUMBER)?)*
| ANONYMOUS
Each X is a hexadecimal digit (upper- or lowercase).
=== modified file 'sql/zgtid_set.cc'
--- a/sql/zgtid_set.cc 2011-11-18 16:39:51 +0000
+++ b/sql/zgtid_set.cc 2011-11-18 18:57:18 +0000
@@ -438,7 +438,7 @@ enum_return_status GTID_set::add(const c
if (sid.parse(s) != 0)
goto parse_error;
s += rpl_sid::TEXT_LENGTH;
- rpl_sidno sidno= sid_map->add_permanent(&sid, 0);
+ rpl_sidno sidno= sid_map->add_permanent(&sid);
if (sidno <= 0)
RETURN_REPORTED_ERROR;
PROPAGATE_REPORTED_ERROR(ensure_sidno(sidno));
=== modified file 'sql/zsid_map.cc'
--- a/sql/zsid_map.cc 2011-11-18 16:39:51 +0000
+++ b/sql/zsid_map.cc 2011-11-18 18:57:18 +0000
@@ -59,7 +59,7 @@ enum_return_status Sid_map::clear()
RETURN_OK;
}
-rpl_sidno Sid_map::add_permanent(const rpl_sid *sid, bool _sync)
+rpl_sidno Sid_map::add_permanent(const rpl_sid *sid)
{
DBUG_ENTER("Sid_map::add_permanent");
#ifndef DBUG_OFF
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-trunk-wl3584 branch (alfranio.correia:3489 to 3490) | Alfranio Correia | 21 Nov |