summaryrefslogtreecommitdiff
path: root/sql/sql_binlog.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_binlog.cc')
-rw-r--r--sql/sql_binlog.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/sql_binlog.cc b/sql/sql_binlog.cc
index 59d7e9cb028..1b8ba311a80 100644
--- a/sql/sql_binlog.cc
+++ b/sql/sql_binlog.cc
@@ -14,7 +14,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
-#include <my_global.h>
+#include "mariadb.h"
#include "sql_priv.h"
#include "sql_binlog.h"
#include "sql_parse.h"
@@ -125,7 +125,7 @@ static int check_event_type(int type, Relay_log_info *rli)
int binlog_defragment(THD *thd)
{
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 */
thd->lex->comment.str= NULL;
@@ -155,7 +155,7 @@ int binlog_defragment(THD *thd)
size_t gathered_length= 0;
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);
gathered_length += entry[k]->length;
}
@@ -242,7 +242,7 @@ void mysql_client_binlog_statement(THD* thd)
goto end;
}
- decoded_len= my_base64_needed_decoded_length(coded_len);
+ decoded_len= my_base64_needed_decoded_length((int)coded_len);
if (!(buf= (char *) my_malloc(decoded_len, MYF(MY_WME))))
{
my_error(ER_OUTOFMEMORY, MYF(ME_FATALERROR), 1);
@@ -388,7 +388,7 @@ void mysql_client_binlog_statement(THD* thd)
end:
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;
rgi->slave_close_thread_tables(thd);
my_free(buf);