Commit 3883559d authored by Venkatesh Duggirala's avatar Venkatesh Duggirala

BUG#14593883-REPLICATION BREAKS WHEN SET DATA TYPE

COLUMNS ARE USED INSIDE A STORED PROCEDURE                                      
                                                                                
Problem: When 'SET' type columns are used in a DML                              
inside a stored procedure and a NULL value is passed                            
to that column, replication is breaking.                                        
                                                                                
Analysis: All stored procedure variables used inside                            
a DML will be substituted with NAME_CONST functions.                            
While NAME_CONST are used in this particular scenario,                          
i.e., when NULL value is passed then charset is copied                          
from 'empty_set_string' member of Field_set class.                              
The operator '=' overload method inside 'String' class                          
is not coping str_charset from R.H.S object to L.H.S object.                    
Hence charset is wrongly copied in the string assignment                        
                                                                                
Fix: Handle coping str_charset member in operator '=' overload                  
method.

sql/sql_string.h:
  Handled coping str_charset member in operator '=' overload                  
  method.
parents d910c5ac 8a49d7a8
#ifndef SQL_STRING_INCLUDED #ifndef SQL_STRING_INCLUDED
#define SQL_STRING_INCLUDED #define SQL_STRING_INCLUDED
/* 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
...@@ -268,6 +268,7 @@ public: ...@@ -268,6 +268,7 @@ public:
DBUG_ASSERT(!s.uses_buffer_owned_by(this)); DBUG_ASSERT(!s.uses_buffer_owned_by(this));
free(); free();
Ptr=s.Ptr ; str_length=s.str_length ; Alloced_length=s.Alloced_length; Ptr=s.Ptr ; str_length=s.str_length ; Alloced_length=s.Alloced_length;
str_charset=s.str_charset;
alloced=0; alloced=0;
} }
return *this; return *this;
......
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