summaryrefslogtreecommitdiff
path: root/sql/log_event.cc
diff options
context:
space:
mode:
authorNuno Carvalho <nuno.carvalho@oracle.com>2013-01-28 19:08:50 +0000
committerNuno Carvalho <nuno.carvalho@oracle.com>2013-01-28 19:08:50 +0000
commitaa35791781df004c2a38d726bca31c9022f58ed9 (patch)
tree6ae7bd257c12eab7961be8872501bfb446fc582a /sql/log_event.cc
parented1c446c5ea1203f8e9dc8869f9aabae793f887f (diff)
parente174bf73b0028e0a6fb5d9f0b7a16ee4e236eeda (diff)
downloadmariadb-git-aa35791781df004c2a38d726bca31c9022f58ed9.tar.gz
BUG#16200555: EMPTY NAME FOR USER VARIABLE IS ALLOWED AND BREAKS STATEMENT BINARY LOGGING
Merge from mysql-5.1 into mysql-5.5.
Diffstat (limited to 'sql/log_event.cc')
-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 9b22ddb38a0..3bca6cc3dcf 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2000, 2012, 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
@@ -5857,10 +5857,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;