List:Commits« Previous MessageNext Message »
From:Jim Winstead Date:April 19 2006 11:17pm
Subject:bk commit into 5.1 tree (jimw:1.2362)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of jimw. When jimw 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.2362 06/04/19 14:17:44 jimw@stripped +3 -0
  Merge mysql.com:/home/jimw/my/mysql-5.0-17043
  into  mysql.com:/home/jimw/my/mysql-5.1-always-time-tests

  sql/item_strfunc.h
    1.107 06/04/19 14:17:40 jimw@stripped +0 -0
    Auto merged

  sql/item_strfunc.cc
    1.268 06/04/19 14:17:40 jimw@stripped +0 -0
    Auto merged

  mysql-test/r/func_str.result
    1.113 06/04/19 14:17:40 jimw@stripped +0 -0
    Auto merged

# 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:	jimw
# Host:	rama.(none)
# Root:	/home/jimw/my/mysql-5.1-always-time-tests/RESYNC

--- 1.267/sql/item_strfunc.cc	2006-03-29 06:03:56 -08:00
+++ 1.268/sql/item_strfunc.cc	2006-04-19 14:17:40 -07:00
@@ -80,6 +80,20 @@
 }
 
 
+my_decimal *Item_str_func::val_decimal(my_decimal *decimal_value)
+{
+  DBUG_ASSERT(fixed == 1);
+  char buff[64];
+  String *res, tmp(buff,sizeof(buff), &my_charset_bin);
+  res= val_str(&tmp);
+  if (!res)
+    return 0;
+  (void)str2my_decimal(E_DEC_FATAL_ERROR, (char*) res->ptr(),
+                       res->length(), res->charset(), decimal_value);
+  return decimal_value;
+}
+
+
 double Item_str_func::val_real()
 {
   DBUG_ASSERT(fixed == 1);

--- 1.106/sql/item_strfunc.h	2006-03-07 11:00:42 -08:00
+++ 1.107/sql/item_strfunc.h	2006-04-19 14:17:40 -07:00
@@ -33,6 +33,7 @@
   Item_str_func(List<Item> &list) :Item_func(list) {decimals=NOT_FIXED_DEC; }
   longlong val_int();
   double val_real();
+  my_decimal *val_decimal(my_decimal *);
   enum Item_result result_type () const { return STRING_RESULT; }
   void left_right_max_length();
   String *check_well_formed_result(String *str);

--- 1.112/mysql-test/r/func_str.result	2006-02-22 01:09:49 -08:00
+++ 1.113/mysql-test/r/func_str.result	2006-04-19 14:17:40 -07:00
@@ -1030,3 +1030,13 @@
 y,abc	abc
 y,abc	abc
 drop table t1;
+select cast(rtrim('  20.06 ') as decimal(19,2));
+cast(rtrim('  20.06 ') as decimal(19,2))
+20.06
+select cast(ltrim('  20.06 ') as decimal(19,2));
+cast(ltrim('  20.06 ') as decimal(19,2))
+20.06
+select cast(rtrim(ltrim('  20.06 ')) as decimal(19,2));
+cast(rtrim(ltrim('  20.06 ')) as decimal(19,2))
+20.06
+End of 5.0 tests
Thread
bk commit into 5.1 tree (jimw:1.2362)Jim Winstead19 Apr