@@ -1090,7 +1090,7 @@ int Log_event::net_send(Protocol *protocol, const char *log_name,
1090
1090
protocol->store(log_name, &my_charset_bin);
1091
1091
protocol->store((ulonglong)pos);
1092
1092
event_type = get_type_str();
1093
- protocol->store (event_type, strlen(event_type), &my_charset_bin);
1093
+ protocol->store_string (event_type, strlen(event_type), &my_charset_bin);
1094
1094
protocol->store((uint32)server_id);
1095
1095
protocol->store((ulonglong)common_header->log_pos);
1096
1096
if (pack_info(protocol)) return 1;
@@ -3286,7 +3286,7 @@ int Query_log_event::pack_info(Protocol *protocol) {
3286
3286
}
3287
3287
}
3288
3288
// persist the buffer in protocol
3289
- protocol->store (str_buf.ptr(), str_buf.length(), &my_charset_bin);
3289
+ protocol->store_string (str_buf.ptr(), str_buf.length(), &my_charset_bin);
3290
3290
return 0;
3291
3291
}
3292
3292
@@ -5200,7 +5200,7 @@ int Format_description_log_event::pack_info(Protocol *protocol) {
5200
5200
pos = my_stpcpy(pos, server_version);
5201
5201
pos = my_stpcpy(pos, ", Binlog ver: ");
5202
5202
pos = int10_to_str(binlog_version, pos, 10);
5203
- protocol->store (buf, (uint)(pos - buf), &my_charset_bin);
5203
+ protocol->store_string (buf, (uint)(pos - buf), &my_charset_bin);
5204
5204
return 0;
5205
5205
}
5206
5206
@@ -5379,7 +5379,7 @@ int Rotate_log_event::pack_info(Protocol *protocol) {
5379
5379
tmp.append(new_log_ident, ident_len);
5380
5380
tmp.append(STRING_WITH_LEN(";pos="));
5381
5381
tmp.append(llstr(pos, buf));
5382
- protocol->store (tmp.ptr(), tmp.length(), &my_charset_bin);
5382
+ protocol->store_string (tmp.ptr(), tmp.length(), &my_charset_bin);
5383
5383
return 0;
5384
5384
}
5385
5385
#endif // MYSQL_SERVER
@@ -5640,7 +5640,7 @@ int Intvar_log_event::pack_info(Protocol *protocol) {
5640
5640
pos = strmake(buf, (get_var_type_string()).c_str(), sizeof(buf) - 23);
5641
5641
*pos++ = '=';
5642
5642
pos = longlong10_to_str(val, pos, -10);
5643
- protocol->store (buf, (uint)(pos - buf), &my_charset_bin);
5643
+ protocol->store_string (buf, (uint)(pos - buf), &my_charset_bin);
5644
5644
return 0;
5645
5645
}
5646
5646
#endif // MYSQL_SERVER
@@ -5757,7 +5757,7 @@ int Rand_log_event::pack_info(Protocol *protocol) {
5757
5757
pos = int10_to_str((long)seed1, pos, 10);
5758
5758
pos = my_stpcpy(pos, ",rand_seed2=");
5759
5759
pos = int10_to_str((long)seed2, pos, 10);
5760
- protocol->store (buf1, (uint)(pos - buf1), &my_charset_bin);
5760
+ protocol->store_string (buf1, (uint)(pos - buf1), &my_charset_bin);
5761
5761
return 0;
5762
5762
}
5763
5763
#endif // MYSQL_SERVER
@@ -5859,7 +5859,7 @@ int Xid_log_event::pack_info(Protocol *protocol) {
5859
5859
pos = my_stpcpy(buf, "COMMIT /* xid=");
5860
5860
pos = longlong10_to_str(xid, pos, 10);
5861
5861
pos = my_stpcpy(pos, " */");
5862
- protocol->store (buf, (uint)(pos - buf), &my_charset_bin);
5862
+ protocol->store_string (buf, (uint)(pos - buf), &my_charset_bin);
5863
5863
return 0;
5864
5864
}
5865
5865
#endif // MYSQL_SERVER
@@ -6200,7 +6200,7 @@ int XA_prepare_log_event::pack_info(Protocol *protocol) {
6200
6200
my_xid.data);
6201
6201
sprintf(query, (one_phase ? "XA COMMIT %s ONE PHASE" : "XA PREPARE %s"), buf);
6202
6202
6203
- protocol->store (query, strlen(query), &my_charset_bin);
6203
+ protocol->store_string (query, strlen(query), &my_charset_bin);
6204
6204
return 0;
6205
6205
}
6206
6206
@@ -6384,7 +6384,7 @@ int User_var_log_event::pack_info(Protocol *protocol) {
6384
6384
buf[0] = '@';
6385
6385
memcpy(buf + 1, quoted_id, id_len);
6386
6386
buf[1 + id_len] = '=';
6387
- protocol->store (buf, event_len, &my_charset_bin);
6387
+ protocol->store_string (buf, event_len, &my_charset_bin);
6388
6388
my_free(buf);
6389
6389
return 0;
6390
6390
}
@@ -6841,7 +6841,7 @@ int Append_block_log_event::pack_info(Protocol *protocol) {
6841
6841
size_t length;
6842
6842
length = snprintf(buf, sizeof(buf), ";file_id=%u;block_len=%u", file_id,
6843
6843
block_len);
6844
- protocol->store (buf, length, &my_charset_bin);
6844
+ protocol->store_string (buf, length, &my_charset_bin);
6845
6845
return 0;
6846
6846
}
6847
6847
@@ -6977,7 +6977,7 @@ int Delete_file_log_event::pack_info(Protocol *protocol) {
6977
6977
char buf[64];
6978
6978
size_t length;
6979
6979
length = snprintf(buf, sizeof(buf), ";file_id=%u", (uint)file_id);
6980
- protocol->store (buf, length, &my_charset_bin);
6980
+ protocol->store_string (buf, length, &my_charset_bin);
6981
6981
return 0;
6982
6982
}
6983
6983
@@ -7170,7 +7170,7 @@ int Execute_load_query_log_event::pack_info(Protocol *protocol) {
7170
7170
}
7171
7171
pos = my_stpcpy(pos, " ;file_id=");
7172
7172
pos = int10_to_str((long)file_id, pos, 10);
7173
- protocol->store (buf, pos - buf, &my_charset_bin);
7173
+ protocol->store_string (buf, pos - buf, &my_charset_bin);
7174
7174
my_free(buf);
7175
7175
return 0;
7176
7176
}
@@ -10013,7 +10013,7 @@ int Rows_log_event::pack_info(Protocol *protocol) {
10013
10013
char const *const flagstr = get_flags(STMT_END_F) ? " flags: STMT_END_F" : "";
10014
10014
size_t bytes =
10015
10015
snprintf(buf, sizeof(buf), "table_id: %llu%s", m_table_id.id(), flagstr);
10016
- protocol->store (buf, bytes, &my_charset_bin);
10016
+ protocol->store_string (buf, bytes, &my_charset_bin);
10017
10017
return 0;
10018
10018
}
10019
10019
#endif // MYSQL_SERVER
@@ -10937,7 +10937,7 @@ int Table_map_log_event::pack_info(Protocol *protocol) {
10937
10937
size_t bytes = snprintf(buf, sizeof(buf), "table_id: %llu (%s.%s)",
10938
10938
m_table_id.id(), m_dbnam.c_str(), m_tblnam.c_str());
10939
10939
DBUG_ASSERT(bytes < 256);
10940
- protocol->store (buf, bytes, &my_charset_bin);
10940
+ protocol->store_string (buf, bytes, &my_charset_bin);
10941
10941
return 0;
10942
10942
}
10943
10943
#endif // MYSQL_SERVER
@@ -12092,7 +12092,7 @@ int Incident_log_event::pack_info(Protocol *protocol) {
12092
12092
else
12093
12093
bytes = snprintf(buf, sizeof(buf), "#%d (%s): %s", incident, description(),
12094
12094
message);
12095
- protocol->store (buf, bytes, &my_charset_bin);
12095
+ protocol->store_string (buf, bytes, &my_charset_bin);
12096
12096
return 0;
12097
12097
}
12098
12098
#endif
@@ -12204,7 +12204,7 @@ int Ignorable_log_event::pack_info(Protocol *protocol) {
12204
12204
char buf[256];
12205
12205
size_t bytes;
12206
12206
bytes = snprintf(buf, sizeof(buf), "# Unrecognized ignorable event");
12207
- protocol->store (buf, bytes, &my_charset_bin);
12207
+ protocol->store_string (buf, bytes, &my_charset_bin);
12208
12208
return 0;
12209
12209
}
12210
12210
#endif
@@ -12238,7 +12238,7 @@ int Rows_query_log_event::pack_info(Protocol *protocol) {
12238
12238
if (!(buf = (char *)my_malloc(key_memory_log_event, len, MYF(MY_WME))))
12239
12239
return 1;
12240
12240
bytes = snprintf(buf, len, "# %s", m_rows_query);
12241
- protocol->store (buf, bytes, &my_charset_bin);
12241
+ protocol->store_string (buf, bytes, &my_charset_bin);
12242
12242
my_free(buf);
12243
12243
return 0;
12244
12244
}
@@ -12419,7 +12419,7 @@ Gtid_log_event::Gtid_log_event(
12419
12419
int Gtid_log_event::pack_info(Protocol *protocol) {
12420
12420
char buffer[MAX_SET_STRING_LENGTH + 1];
12421
12421
size_t len = to_string(buffer);
12422
- protocol->store (buffer, len, &my_charset_bin);
12422
+ protocol->store_string (buffer, len, &my_charset_bin);
12423
12423
return 0;
12424
12424
}
12425
12425
#endif // MYSQL_SERVER
@@ -12853,7 +12853,7 @@ int Previous_gtids_log_event::pack_info(Protocol *protocol) {
12853
12853
size_t length = 0;
12854
12854
char *str = get_str(&length, &Gtid_set::default_string_format);
12855
12855
if (str == nullptr) return 1;
12856
- protocol->store (str, length, &my_charset_bin);
12856
+ protocol->store_string (str, length, &my_charset_bin);
12857
12857
my_free(str);
12858
12858
return 0;
12859
12859
}
@@ -13011,7 +13011,7 @@ int Transaction_context_log_event::pack_info(Protocol *protocol) {
13011
13011
DBUG_TRACE;
13012
13012
char buf[256];
13013
13013
size_t bytes = to_string(buf, 256);
13014
- protocol->store (buf, bytes, &my_charset_bin);
13014
+ protocol->store_string (buf, bytes, &my_charset_bin);
13015
13015
return 0;
13016
13016
}
13017
13017
#endif
@@ -13225,7 +13225,7 @@ int View_change_log_event::pack_info(Protocol *protocol) {
13225
13225
DBUG_TRACE;
13226
13226
char buf[256];
13227
13227
size_t bytes = to_string(buf, 256);
13228
- protocol->store (buf, bytes, &my_charset_bin);
13228
+ protocol->store_string (buf, bytes, &my_charset_bin);
13229
13229
return 0;
13230
13230
}
13231
13231
#endif
0 commit comments