summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNuno Carvalho <nuno.carvalho@oracle.com>2013-01-28 19:05:09 +0000
committerNuno Carvalho <nuno.carvalho@oracle.com>2013-01-28 19:05:09 +0000
commitd1378565bba59726ae3f4d47d0709e68d77110ed (patch)
treebd762f4262ae0c2049aeb1a1d74c366aa9eac96c
parent7e0901b97fa087e4458f32ffd165103f31a1fef8 (diff)
downloadmariadb-git-d1378565bba59726ae3f4d47d0709e68d77110ed.tar.gz
BUG#16200555: EMPTY NAME FOR USER VARIABLE IS ALLOWED AND BREAKS STATEMENT BINARY LOGGING
On a previous fix, user variables with zero length name were incorrectly considered as event corruption, despite that them are allowed by server. Fix this wrong assumption by allowing again user variables with zero length on binary log.
-rw-r--r--sql/log_event.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc
index 542b5e2dc60..8abd95bba0a 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -5729,10 +5729,9 @@ User_var_log_event(const char* buf, uint event_len,
/*
We don't know yet is_null value, so we must assume that name_len
may have the bigger value possible, is_null= True and there is no
- payload for val.
+ payload for val, or even that name_len is 0.
*/
- if (0 == name_len ||
- !valid_buffer_range<uint>(name_len, buf_start, name,
+ if (!valid_buffer_range<uint>(name_len, buf_start, name,
event_len - UV_VAL_IS_NULL))
{
error= true;