Commit aa357917 authored by Nuno Carvalho's avatar Nuno Carvalho

BUG#16200555: EMPTY NAME FOR USER VARIABLE IS ALLOWED AND BREAKS STATEMENT BINARY LOGGING

Merge from mysql-5.1 into mysql-5.5.
parents ed1c446c e174bf73
/* /*
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 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 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, ...@@ -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 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 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 || if (!valid_buffer_range<uint>(name_len, buf_start, name,
!valid_buffer_range<uint>(name_len, buf_start, name,
event_len - UV_VAL_IS_NULL)) event_len - UV_VAL_IS_NULL))
{ {
error= true; error= true;
......
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