diff options
author | Venkatesh Duggirala <venkatesh.duggirala@oracle.com> | 2013-03-12 22:44:32 +0530 |
---|---|---|
committer | Venkatesh Duggirala <venkatesh.duggirala@oracle.com> | 2013-03-12 22:44:32 +0530 |
commit | 3883559d5532bbed706289e12d2dfcd6bfb032f3 (patch) | |
tree | 53f2be53b2f629c5082515daf99125461683bb22 /sql/sql_string.h | |
parent | d910c5acaf342c9a140da620f85270c130298837 (diff) | |
parent | 8a49d7a83efdf9be5a07b8c11637e8987ce0ef66 (diff) | |
download | mariadb-git-3883559d5532bbed706289e12d2dfcd6bfb032f3.tar.gz |
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.
Diffstat (limited to 'sql/sql_string.h')
-rw-r--r-- | sql/sql_string.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_string.h b/sql/sql_string.h index 9328849bb55..234e8272b88 100644 --- a/sql/sql_string.h +++ b/sql/sql_string.h @@ -1,7 +1,7 @@ #ifndef 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 it under the terms of the GNU General Public License as published by @@ -268,6 +268,7 @@ public: DBUG_ASSERT(!s.uses_buffer_owned_by(this)); free(); Ptr=s.Ptr ; str_length=s.str_length ; Alloced_length=s.Alloced_length; + str_charset=s.str_charset; alloced=0; } return *this; |