Commit 1efc1990 authored by Andrei Elkin's avatar Andrei Elkin

merge fixes: sql_binlog.cc is done

parent 65c5ef9b
...@@ -125,7 +125,7 @@ static int check_event_type(int type, Relay_log_info *rli) ...@@ -125,7 +125,7 @@ static int check_event_type(int type, Relay_log_info *rli)
int binlog_defragment(THD *thd) int binlog_defragment(THD *thd)
{ {
user_var_entry *entry[2]; user_var_entry *entry[2];
LEX_STRING name[2]= { thd->lex->comment, thd->lex->ident }; LEX_CSTRING name[2]= { thd->lex->comment, thd->lex->ident };
/* compute the total size */ /* compute the total size */
thd->lex->comment.str= NULL; thd->lex->comment.str= NULL;
...@@ -155,7 +155,7 @@ int binlog_defragment(THD *thd) ...@@ -155,7 +155,7 @@ int binlog_defragment(THD *thd)
size_t gathered_length= 0; size_t gathered_length= 0;
for (uint k=0; k < 2; k++) for (uint k=0; k < 2; k++)
{ {
memcpy(thd->lex->comment.str + gathered_length, entry[k]->value, memcpy(const_cast<char*>(thd->lex->comment.str) + gathered_length, entry[k]->value,
entry[k]->length); entry[k]->length);
gathered_length += entry[k]->length; gathered_length += entry[k]->length;
update_hash(entry[k], true, NULL, 0, STRING_RESULT, &my_charset_bin, 0); update_hash(entry[k], true, NULL, 0, STRING_RESULT, &my_charset_bin, 0);
...@@ -387,7 +387,7 @@ void mysql_client_binlog_statement(THD* thd) ...@@ -387,7 +387,7 @@ void mysql_client_binlog_statement(THD* thd)
end: end:
if (unlikely(is_fragmented)) if (unlikely(is_fragmented))
my_free(thd->lex->comment.str); my_free(const_cast<char*>(thd->lex->comment.str));
thd->variables.option_bits= thd_options; thd->variables.option_bits= thd_options;
rgi->slave_close_thread_tables(thd); rgi->slave_close_thread_tables(thd);
my_free(buf); my_free(buf);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment