summaryrefslogtreecommitdiff
path: root/sql/item.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item.cc')
-rw-r--r--sql/item.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/sql/item.cc b/sql/item.cc
index 2584c1cafb3..bb8cf9a33cf 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -635,16 +635,21 @@ void Item_param::set_double(double value)
}
-void Item_param::set_value(const char *str, uint length)
+void Item_param::set_value(const char *str, uint length, CHARSET_INFO *ci)
{
DBUG_ENTER("Item_param::set_value");
- str_value.copy(str,length,default_charset());
+ str_value.copy(str,length,ci);
item_type= STRING_ITEM;
value_is_set= 1;
DBUG_PRINT("info", ("string: %s", str_value.ptr()));
DBUG_VOID_RETURN;
}
+void Item_param::set_value(const char *str, uint length)
+{
+ set_value(str, length, default_charset());
+}
+
void Item_param::set_time(TIME *tm, timestamp_type type)
{
@@ -1493,7 +1498,7 @@ bool Item::send(Protocol *protocol, String *buffer)
}
case MYSQL_TYPE_TINY:
{
- longlong nr;
+ longlong nr;
nr= val_int();
if (!null_value)
result= protocol->store_tiny(nr);