List:Internals« Previous MessageNext Message »
From:sanja Date:July 15 2005 9:52pm
Subject:bk commit into 5.0 tree (bell:1.1951)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of bell. When bell does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.1951 05/07/16 00:52:00 bell@stripped +2 -0
  post merge changes: added safe_charset_converter to other static functions

  sql/item.h
    1.154 05/07/16 00:51:56 bell@stripped +2 -0
    post merge changes: added safe_charset_converter to other static functions

  sql/item.cc
    1.156 05/07/16 00:51:56 bell@stripped +32 -0
    post merge changes: added safe_charset_converter to other static functions

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	bell
# Host:	sanja.is.com.ua
# Root:	/home/bell/mysql/bk/work-bug6-5.0

--- 1.155/sql/item.cc	2005-07-16 00:06:12 +03:00
+++ 1.156/sql/item.cc	2005-07-16 00:51:56 +03:00
@@ -638,6 +638,38 @@
 }
 
 
+Item *Item_static_int_func::safe_charset_converter(CHARSET_INFO *tocs)
+{
+  Item_string *conv;
+  char buf[64];
+  String *s, tmp(buf, sizeof(buf), &my_charset_bin);
+  s= val_str(&tmp);
+  if ((conv= new Item_static_string_func(func_name, s->ptr(), s->length(),
+                                         s->charset())))
+  {
+    conv->str_value.copy();
+    conv->str_value.mark_as_const();
+  }
+  return conv;
+}
+
+
+Item *Item_static_float_func::safe_charset_converter(CHARSET_INFO *tocs)
+{
+  Item_string *conv;
+  char buf[64];
+  String *s, tmp(buf, sizeof(buf), &my_charset_bin);
+  s= val_str(&tmp);
+  if ((conv= new Item_static_string_func(func_name, s->ptr(), s->length(),
+                                         s->charset())))
+  {
+    conv->str_value.copy();
+    conv->str_value.mark_as_const();
+  }
+  return conv;
+}
+
+
 Item *Item_string::safe_charset_converter(CHARSET_INFO *tocs)
 {
   Item_string *conv;

--- 1.153/sql/item.h	2005-07-16 00:06:12 +03:00
+++ 1.154/sql/item.h	2005-07-16 00:51:56 +03:00
@@ -1132,6 +1132,7 @@
   Item_static_int_func(const char *str_arg, longlong i, uint length)
     :Item_int(NullS, i, length), func_name(str_arg)
   {}
+  Item *safe_charset_converter(CHARSET_INFO *tocs);
   void print(String *str) { str->append(func_name); }
 };
 
@@ -1242,6 +1243,7 @@
     :Item_float(NullS, val_arg, decimal_par, length), func_name(str)
   {}
   void print(String *str) { str->append(func_name); }
+  Item *safe_charset_converter(CHARSET_INFO *tocs);
 };
 
 
Thread
bk commit into 5.0 tree (bell:1.1951)sanja15 Jul