diff options
author | unknown <bar@bar.mysql.r18.ru> | 2003-03-18 11:34:19 +0400 |
---|---|---|
committer | unknown <bar@bar.mysql.r18.ru> | 2003-03-18 11:34:19 +0400 |
commit | 2dae38c71357665601f9eb8bc4186fa9be6d4dee (patch) | |
tree | f8469e8b44aa1d821827236254dc5c79f587ca92 /sql/log_event.cc | |
parent | 1159272c28c83e4915beb67c296103a06875d198 (diff) | |
download | mariadb-git-2dae38c71357665601f9eb8bc4186fa9be6d4dee.tar.gz |
Replication were broken because of automatic charset conversion.
As a fix, my_charset_bin is now used in master-slave packets instead
of system_charset_info.
Diffstat (limited to 'sql/log_event.cc')
-rw-r--r-- | sql/log_event.cc | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc index a8e215d2b77..3a1dbb6485e 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -348,10 +348,10 @@ int Log_event::net_send(Protocol *protocol, const char* log_name, my_off_t pos) log_name = p + 1; protocol->prepare_for_resend(); - protocol->store(log_name, system_charset_info); + protocol->store(log_name, &my_charset_bin); protocol->store((ulonglong) pos); event_type = get_type_str(); - protocol->store(event_type, strlen(event_type), system_charset_info); + protocol->store(event_type, strlen(event_type), &my_charset_bin); protocol->store((uint32) server_id); protocol->store((ulonglong) log_pos); pack_info(protocol); @@ -722,7 +722,7 @@ void Query_log_event::pack_info(Protocol *protocol) memcpy(pos, query, q_len); pos+= q_len; } - protocol->store(buf, pos-buf, system_charset_info); + protocol->store(buf, pos-buf, &my_charset_bin); my_free(buf, MYF(MY_ALLOW_ZERO_PTR)); } #endif @@ -992,7 +992,7 @@ void Start_log_event::pack_info(Protocol *protocol) pos= strmov(pos, server_version); pos= strmov(pos, ", Binlog ver: "); pos=int10_to_str(binlog_version, pos, 10); - protocol->store(buf, pos-buf, system_charset_info); + protocol->store(buf, pos-buf, &my_charset_bin); } #endif @@ -1191,7 +1191,7 @@ void Load_log_event::pack_info(Protocol *protocol) *pos++= ')'; } - protocol->store(buf, pos-buf, system_charset_info); + protocol->store(buf, pos-buf, &my_charset_bin); my_free(buf, MYF(MY_ALLOW_ZERO_PTR)); } #endif @@ -1665,7 +1665,7 @@ void Rotate_log_event::pack_info(Protocol *protocol) b_pos=longlong10_to_str(pos, b_pos, 10); if (flags & LOG_EVENT_FORCED_ROTATE_F) b_pos= strmov(b_pos ,"; forced by master"); - protocol->store(buf, b_pos-buf, system_charset_info); + protocol->store(buf, b_pos-buf, &my_charset_bin); my_free(buf, MYF(MY_ALLOW_ZERO_PTR)); } #endif @@ -1800,7 +1800,7 @@ void Intvar_log_event::pack_info(Protocol *protocol) pos= strmov(buf, get_var_type_name()); *(pos++)='='; pos= longlong10_to_str(val, pos, -10); - protocol->store(buf, pos-buf, system_charset_info); + protocol->store(buf, pos-buf, &my_charset_bin); } #endif @@ -1911,7 +1911,7 @@ void Rand_log_event::pack_info(Protocol *protocol) pos= int10_to_str((long) seed1, pos, 10); pos= strmov(pos, ",rand_seed2="); pos= int10_to_str((long) seed2, pos, 10); - protocol->store(buf1, (uint) (pos-buf1), system_charset_info); + protocol->store(buf1, (uint) (pos-buf1), &my_charset_bin); } #endif @@ -2013,7 +2013,7 @@ void User_var_log_event::pack_info(Protocol* protocol) buf[0]= '@'; buf[1+name_len]= '='; memcpy(buf+1, name, name_len); - protocol->store(buf, event_len, system_charset_info); + protocol->store(buf, event_len, &my_charset_bin); my_free(buf, MYF(MY_ALLOW_ZERO_PTR)); } #endif // !MYSQL_CLIENT @@ -2213,7 +2213,7 @@ void Slave_log_event::pack_info(Protocol *protocol) pos= strmov(pos, master_log); pos= strmov(pos, ",pos="); pos= longlong10_to_str(master_pos, pos, 10); - protocol->store(buf, pos-buf, system_charset_info); + protocol->store(buf, pos-buf, &my_charset_bin); } #endif // !MYSQL_CLIENT @@ -2547,7 +2547,7 @@ void Create_file_log_event::pack_info(Protocol *protocol) pos= int10_to_str((long) file_id, pos, 10); pos= strmov(pos, ";block_len="); pos= int10_to_str((long) block_len, pos, 10); - protocol->store(buf, pos-buf, system_charset_info); + protocol->store(buf, pos-buf, &my_charset_bin); } #endif @@ -2698,7 +2698,7 @@ void Append_block_log_event::pack_info(Protocol *protocol) length= (uint) my_sprintf(buf, (buf, ";file_id=%u;block_len=%u", file_id, block_len)); - protocol->store(buf, (int32) length, system_charset_info); + protocol->store(buf, (int32) length, &my_charset_bin); } #endif @@ -2811,7 +2811,7 @@ void Delete_file_log_event::pack_info(Protocol *protocol) char buf[64]; uint length; length= (uint) my_sprintf(buf, (buf, ";file_id=%u", (uint) file_id)); - protocol->store(buf, (int32) length, system_charset_info); + protocol->store(buf, (int32) length, &my_charset_bin); } #endif @@ -2910,7 +2910,7 @@ void Execute_load_log_event::pack_info(Protocol *protocol) char buf[64]; uint length; length= (uint) my_sprintf(buf, (buf, ";file_id=%u", (uint) file_id)); - protocol->store(buf, (int32) length, system_charset_info); + protocol->store(buf, (int32) length, &my_charset_bin); } /***************************************************************************** |