Below is the list of changes that have just been committed into a local
5.0 repository of kgeorge. When kgeorge 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@stripped, 2006-12-04 14:26:05+02:00, gkodinov@stripped +2 -0
item_func.cc:
fixed a valgrind warning
type_varchar.test:
fixed a valgrind warning
mysql-test/t/type_varchar.test@stripped, 2006-12-04 14:25:29+02:00, gkodinov@stripped +1 -0
fixed a valgrind warning
sql/item_func.cc@stripped, 2006-12-04 14:25:41+02:00, gkodinov@stripped +14 -5
fixed a valgrind warning
# 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: gkodinov
# Host: macbook.gmz
# Root: /Users/kgeorge/mysql/work/vg-5.0-opt
--- 1.314/sql/item_func.cc 2006-11-29 01:41:12 +02:00
+++ 1.315/sql/item_func.cc 2006-12-04 14:25:41 +02:00
@@ -900,7 +900,8 @@ void Item_func_signed::print(String *str
longlong Item_func_signed::val_int_from_str(int *error)
{
- char buff[MAX_FIELD_WIDTH], *end;
+ char buff[MAX_FIELD_WIDTH], *end, *start;
+ uint32 length;
String tmp(buff,sizeof(buff), &my_charset_bin), *res;
longlong value;
@@ -916,13 +917,21 @@ longlong Item_func_signed::val_int_from_
return 0;
}
null_value= 0;
- end= (char*) res->ptr()+ res->length();
- value= my_strtoll10(res->ptr(), &end, error);
- if (*error > 0 || end != res->ptr()+ res->length())
+ start= (char *)res->ptr();
+ length= res->length();
+
+ end= start + length;
+ value= my_strtoll10(start, &end, error);
+ if (*error > 0 || end != start+ length)
+ {
+ char err_buff[128];
+ String err_tmp(err_buff,(uint32) sizeof(err_buff), system_charset_info);
+ err_tmp.copy(start, length, system_charset_info);
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_TRUNCATED_WRONG_VALUE,
ER(ER_TRUNCATED_WRONG_VALUE), "INTEGER",
- res->c_ptr());
+ err_tmp.c_ptr());
+ }
return value;
}
--- 1.10/mysql-test/t/type_varchar.test 2006-11-28 15:43:59 +02:00
+++ 1.11/mysql-test/t/type_varchar.test 2006-12-04 14:25:29 +02:00
@@ -196,3 +196,4 @@ INSERT INTO t1 VALUES (10), (50), (30),
SELECT a,(a + 0) FROM t1 ORDER BY a;
SELECT a,(a DIV 2) FROM t1 ORDER BY a;
SELECT a,CAST(a AS SIGNED) FROM t1 ORDER BY a;
+DROP TABLE t1;
| Thread |
|---|
| • bk commit into 5.0 tree (gkodinov:1.2318) | kgeorge | 4 Dec |