Below is the list of changes that have just been committed into a local
5.1 repository of guilhem. When guilhem does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.1968 05/11/21 11:07:09 guilhem@stripped +11 -0
WL#1012 row-based replication: fixes after merge of mysql-5.0-wl1012 into this local 5.1 tree;
more fixes may come as the testsuite restarts, this commit is mostly to check how bk handles recommitting gone files.
mysql-test/std_data/words2.dat
1.1 05/11/21 11:07:04 guilhem@stripped +50 -0
need to resurrect this "gone" file (sure bk will refuse it and destroy my tree, oh yes)
sql/sql_table.cc
1.280 05/11/21 11:07:04 guilhem@stripped +13 -46
fix after merge
mysql-test/std_data/words2.dat
1.0 05/11/21 11:07:04 guilhem@stripped +0 -0
BitKeeper file /home/mysql_src/mysql-5.1/mysql-test/std_data/words2.dat
sql/sql_plugin.cc
1.2 05/11/21 11:07:03 guilhem@stripped +2 -2
write_row->ha_write_row
sql/slave.cc
1.258 05/11/21 11:07:03 guilhem@stripped +0 -14
unneeded function (already in rpl_filter.cc)
sql/share/errmsg.txt
1.56 05/11/21 11:07:03 guilhem@stripped +7 -0
fix after merge
sql/set_var.cc
1.148 05/11/21 11:07:03 guilhem@stripped +2 -2
fix after merge
sql/log_event.h
1.138 05/11/21 11:07:03 guilhem@stripped +1 -9
byte_count() is not necessary in 5.1
sql/log_event.cc
1.191 05/11/21 11:07:03 guilhem@stripped +2 -2
byte_count() is not necessary in 5.1
sql/handler.h
1.168 05/11/21 11:07:03 guilhem@stripped +3 -3
need to move it to be public
sql/Makefile.am
1.122 05/11/21 11:07:03 guilhem@stripped +2 -4
remove duplicates
mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test
1.22 05/11/21 11:07:03 guilhem@stripped +1 -1
position adjust (fix after merge)
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: guilhem
# Host: gbichot3.local
# Root: /home/mysql_src/mysql-5.1
--- 1.121/sql/Makefile.am 2005-11-19 16:33:22 +01:00
+++ 1.122/sql/Makefile.am 2005-11-21 11:07:03 +01:00
@@ -51,9 +51,8 @@
procedure.h sql_class.h sql_lex.h sql_list.h \
sql_manager.h sql_map.h sql_string.h unireg.h \
sql_error.h field.h handler.h mysqld_suffix.h \
- rpl_tblmap.h rpl_filter.h \
ha_heap.h ha_myisam.h ha_myisammrg.h ha_partition.h \
- opt_range.h protocol.h \
+ opt_range.h protocol.h rpl_tblmap.h \
sql_select.h structs.h table.h sql_udf.h hash_filo.h\
lex.h lex_symbol.h sql_acl.h sql_crypt.h \
log_event.h sql_repl.h slave.h rpl_filter.h \
@@ -83,12 +82,11 @@
unireg.cc des_key_file.cc \
discover.cc time.cc opt_range.cc opt_sum.cc \
records.cc filesort.cc handler.cc \
- rpl_tblmap.cc rpl_filter.cc \
ha_heap.cc ha_myisam.cc ha_myisammrg.cc \
sql_db.cc sql_table.cc sql_rename.cc sql_crypt.cc \
sql_load.cc mf_iocache.cc field_conv.cc sql_show.cc \
sql_udf.cc sql_analyse.cc sql_analyse.h sql_cache.cc \
- slave.cc sql_repl.cc rpl_filter.cc \
+ slave.cc sql_repl.cc rpl_filter.cc rpl_tblmap.cc \
sql_union.cc sql_derived.cc \
client.c sql_client.cc mini_client_errors.c pack.c\
stacktrace.c repl_failsafe.h repl_failsafe.cc \
--- 1.167/sql/handler.h 2005-11-19 16:33:22 +01:00
+++ 1.168/sql/handler.h 2005-11-21 11:07:03 +01:00
@@ -1391,6 +1391,9 @@
Pops the top if condition stack, if stack is not empty
*/
virtual void cond_pop() { return; };
+ virtual bool check_if_incompatible_data(HA_CREATE_INFO *create_info,
+ uint table_changes)
+ { return COMPATIBLE_DATA_NO; }
private:
@@ -1415,9 +1418,6 @@
{
return HA_ERR_WRONG_COMMAND;
}
- virtual bool check_if_incompatible_data(HA_CREATE_INFO *create_info,
- uint table_changes)
- { return COMPATIBLE_DATA_NO; }
};
/* Some extern variables used with handlers */
--- 1.190/sql/log_event.cc 2005-11-19 16:14:05 +01:00
+++ 1.191/sql/log_event.cc 2005-11-21 11:07:03 +01:00
@@ -5006,7 +5006,7 @@
m_width <= sizeof(m_bitbuf)*8 ? m_bitbuf : NULL,
(m_width + 7) & ~7UL,
false)))
- memcpy(m_cols.bitmap, cols->bitmap, byte_count(cols));
+ memcpy(m_cols.bitmap, cols->bitmap, no_bytes_in_map(cols));
}
#endif
@@ -5469,7 +5469,7 @@
return (my_b_safe_write(file, sbuf, sbuf_end - sbuf) ||
my_b_safe_write(file, reinterpret_cast<byte*>(m_cols.bitmap),
- byte_count(&m_cols)) ||
+ no_bytes_in_map(&m_cols)) ||
my_b_safe_write(file, m_rows_buf, data_size));
}
--- 1.137/sql/log_event.h 2005-11-15 23:08:58 +01:00
+++ 1.138/sql/log_event.h 2005-11-21 11:07:03 +01:00
@@ -1808,7 +1808,7 @@
/* Member functions to implement superclass interface */
virtual int get_data_size()
{
- return ROWS_HEADER_LEN + 1 + byte_count(&m_cols) +
+ return ROWS_HEADER_LEN + 1 + no_bytes_in_map(&m_cols) +
(m_rows_cur - m_rows_buf);
}
@@ -1864,14 +1864,6 @@
Rows_log_event(const char *row_data, uint event_len,
Log_event_type event_type,
const Format_description_log_event *description_event);
-
- /*
- Helper function to count the number of bytes in a bitmap.
- */
- static my_size_t byte_count(MY_BITMAP const *const bits)
- {
- return bits->bitmap_size;
- }
#ifndef MYSQL_CLIENT
virtual int do_add_row_data(byte *data, my_size_t length);
--- 1.257/sql/slave.cc 2005-11-19 16:33:23 +01:00
+++ 1.258/sql/slave.cc 2005-11-21 11:07:03 +01:00
@@ -808,20 +808,6 @@
}
-Check if this is still needed
-static void free_string_array(DYNAMIC_ARRAY *a)
-{
- uint i;
- for (i = 0; i < a->elements; i++)
- {
- char* p;
- get_dynamic(a, (gptr) &p, i);
- my_free(p, MYF(MY_WME));
- }
- delete_dynamic(a);
-}
-
-
#ifdef NOT_USED_YET
static int end_slave_on_walk(MASTER_INFO* mi, gptr /*unused*/)
{
--- 1.279/sql/sql_table.cc 2005-11-19 16:33:23 +01:00
+++ 1.280/sql/sql_table.cc 2005-11-21 11:07:04 +01:00
@@ -60,8 +60,8 @@
{
if (clear_error)
thd->clear_error();
- Query_log_event qinfo(thd, thd->query, thd->query_length, FALSE, FALSE);
- mysql_bin_log.write(&qinfo);
+ thd->binlog_query(THD::STMT_QUERY_TYPE,
+ thd->query, thd->query_length, FALSE, FALSE);
}
}
@@ -383,13 +383,8 @@
if (some_tables_deleted || tmp_table_deleted || !error)
{
query_cache_invalidate3(thd, tables, 0);
- if (!dont_log_query && mysql_bin_log.is_open())
- {
- if (!error)
- thd->clear_error();
- Query_log_event qinfo(thd, thd->query, thd->query_length, FALSE, FALSE);
- mysql_bin_log.write(&qinfo);
- }
+ if (!dont_log_query)
+ write_bin_log(thd, !error);
}
unlock_table_names(thd, tables, (TABLE_LIST*) 0);
@@ -1800,13 +1795,8 @@
*/
if (!internal_tmp_table &&
!(binlog_row_based &&
- (create_info->options & HA_LEX_CREATE_TMP_TABLE)) &&
- mysql_bin_log.is_open())
- {
- thd->clear_error();
- thd->binlog_query(THD::STMT_QUERY_TYPE,
- thd->query, thd->query_length, FALSE, FALSE);
- }
+ (create_info->options & HA_LEX_CREATE_TMP_TABLE)))
+ write_bin_log(thd, TRUE);
error= FALSE;
unlock_and_end:
VOID(pthread_mutex_unlock(&LOCK_open));
@@ -2917,18 +2907,14 @@
}
// Must be written before unlock
- if (!binlog_row_based && mysql_bin_log.is_open())
+ if (!binlog_row_based)
{
- thd->clear_error();
/*
CREATE TABLE ... LIKE ... cannot be logged statement-based nor
row-based. This is filed as WL#2867.
*/
- Query_log_event qinfo(thd, thd->query, thd->query_length, FALSE, FALSE);
- mysql_bin_log.write(&qinfo);
+ write_bin_log(thd, TRUE);
}
-Fix the below to do what the above does and then remove the above
- write_bin_log(thd, TRUE);
res= FALSE;
goto err;
@@ -3998,13 +3984,6 @@
}
if (!error)
{
- if (mysql_bin_log.is_open())
- {
- thd->clear_error();
- thd->binlog_query(THD::STMT_QUERY_TYPE,
- thd->query, thd->query_length, FALSE, FALSE);
- }
-fix the below and remove the above
write_bin_log(thd, TRUE);
if (do_send_ok)
send_ok(thd);
@@ -4544,14 +4523,8 @@
goto err;
}
/* We don't replicate alter table statement on temporary tables */
- if (!binlog_row_based && mysql_bin_log.is_open())
- {
- thd->clear_error();
- Query_log_event qinfo(thd, thd->query, thd->query_length, FALSE, FALSE);
- mysql_bin_log.write(&qinfo);
- }
-fix the below remove the above
- write_bin_log(thd, TRUE);
+ if (!binlog_row_based)
+ write_bin_log(thd, TRUE);
goto end_temporary;
}
@@ -4682,15 +4655,9 @@
goto err;
}
thd->proc_info="end";
- if (mysql_bin_log.is_open())
- {
- DBUG_ASSERT(!(binlog_row_based &&
- (create_info->options & HA_LEX_CREATE_TMP_TABLE)));
- thd->clear_error();
- thd->binlog_query(THD::STMT_QUERY_TYPE,
- thd->query, thd->query_length, FALSE, FALSE);
- }
-fix the below remove the above
+
+ DBUG_ASSERT(!(mysql_bin_log.is_open() && binlog_row_based &&
+ (create_info->options & HA_LEX_CREATE_TMP_TABLE)));
write_bin_log(thd, TRUE);
VOID(pthread_cond_broadcast(&COND_refresh));
VOID(pthread_mutex_unlock(&LOCK_open));
--- 1.55/sql/share/errmsg.txt 2005-11-19 16:33:23 +01:00
+++ 1.56/sql/share/errmsg.txt 2005-11-21 11:07:03 +01:00
@@ -5544,3 +5544,10 @@
ER_PLUGIN_IS_NOT_LOADED
eng "Plugin '%-.64s' is not loaded"
+ER_BINLOG_ROW_LOGGING_FAILED
+ eng "Writing one row to the row-based binary log failed"
+ER_BINLOG_ROW_WRONG_TABLE_DEF
+ eng "Table definition on master and slave does not match"
+ER_BINLOG_ROW_RBR_TO_SBR
+ eng "Slave running with --log-slave-updates must use row-based binary logging to be able to replicate row-based binary log events"
+
--- New file ---
+++ mysql-test/std_data/words2.dat 05/11/21 11:07:04
abase
abased
abasement
abasements
abases
abash
abashed
abashes
abashing
abasing
abate
abated
abatement
abatements
abater
abates
abating
Abba
abbe
abbey
abbeys
abbot
abbots
Abbott
abbreviate
abbreviated
abbreviates
abbreviating
abbreviation
abbreviations
Abby
abdomen
abdomens
abdominal
abduct
abducted
abduction
abductions
abductor
abductors
abducts
Abe
abed
Abel
Abelian
Abelson
Aberdeen
Abernathy
aberrant
aberration
--- 1.21/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test 2005-11-19 16:14:04 +01:00
+++ 1.22/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test 2005-11-21 11:07:03 +01:00
@@ -257,7 +257,7 @@
select get_lock("lock1",60);
--replace_column 5 #
--replace_result "xid=208" "xid=105" "xid=227" "xid=114" "xid=230" "xid=115" "xid=234" "xid=117" "xid=261" "xid=132"
-show binlog events from 98;
+show binlog events from 102;
do release_lock("lock1");
drop table t0,t2;
--- 1.147/sql/set_var.cc 2005-11-19 16:33:23 +01:00
+++ 1.148/sql/set_var.cc 2005-11-21 11:07:03 +01:00
@@ -611,6 +611,7 @@
sys_var_have_variable sys_have_raid("have_raid", &have_raid);
sys_var_have_variable sys_have_rtree_keys("have_rtree_keys", &have_rtree_keys);
sys_var_have_variable sys_have_symlink("have_symlink", &have_symlink);
+sys_var_have_variable sys_have_row_based_replication("have_row_based_replication",&have_row_based_replication);
/* Global read-only variable describing server license */
sys_var_const_str sys_license("license", STRINGIFY_ARG(LICENSE));
@@ -688,8 +689,7 @@
{sys_have_raid.name, (char*) &have_raid, SHOW_HAVE},
{sys_have_rtree_keys.name, (char*) &have_rtree_keys, SHOW_HAVE},
{sys_have_symlink.name, (char*) &have_symlink, SHOW_HAVE},
-This "have_row_based_replication" must be fixed to become like above sys_have_symlink probably
- {"have_row_based_replication",(char*) &have_row_based_replication,SHOW_HAVE},
+ {sys_have_row_based_replication.name, (char*) &have_row_based_replication, SHOW_HAVE},
{"init_connect", (char*) &sys_init_connect, SHOW_SYS},
{"init_file", (char*) &opt_init_file, SHOW_CHAR_PTR},
{"init_slave", (char*) &sys_init_slave, SHOW_SYS},
--- 1.1/sql/sql_plugin.cc 2005-11-05 12:20:32 +01:00
+++ 1.2/sql/sql_plugin.cc 2005-11-21 11:07:03 +01:00
@@ -553,7 +553,7 @@
restore_record(table, s->default_values);
table->field[0]->store(name->str, name->length, system_charset_info);
table->field[1]->store(dl->str, dl->length, files_charset_info);
- error= table->file->write_row(table->record[0]);
+ error= table->file->ha_write_row(table->record[0]);
if (error)
{
table->file->print_error(error, MYF(0));
@@ -608,7 +608,7 @@
HA_READ_KEY_EXACT))
{
int error;
- if ((error= table->file->delete_row(table->record[0])))
+ if ((error= table->file->ha_delete_row(table->record[0])))
{
table->file->print_error(error, MYF(0));
goto err;
| Thread |
|---|
| • bk commit into 5.1 tree (guilhem:1.1968) | guilhem | 21 Nov |