Below is the list of changes that have just been committed into a local
4.1 repository of evgen. When evgen 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.2510 06/06/20 23:05:55 evgen@stripped +3 -0
select.result:
Added test case for bug#18759 Incorrect string to numeric conversion.
select.test:
Added test case for bug#18759 Incorrect string to numeric conversion.
item_cmpfunc.cc:
Cleanup after fix for bug#18360 removal
mysql-test/r/select.result
1.75 06/06/20 23:05:00 evgen@stripped +6 -0
Added test case for bug#18759 Incorrect string to numeric conversion.
mysql-test/t/select.test
1.58 06/06/20 23:03:49 evgen@stripped +19 -0
Added test case for bug#18759 Incorrect string to numeric conversion.
sql/item_cmpfunc.cc
1.212 06/06/20 23:03:16 evgen@stripped +2 -1
Cleanup after fix for bug#18360 removal
# 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: evgen
# Host: moonbone.local
# Root: /work/tmp_merge-4.1-opt-mysql
--- 1.211/sql/item_cmpfunc.cc 2006-06-20 00:36:48 +04:00
+++ 1.212/sql/item_cmpfunc.cc 2006-06-20 23:03:16 +04:00
@@ -136,7 +136,8 @@
}
continue;
}
- if ((res= items[i]->real_item()->type()) == Item::FIELD_ITEM)
+ if ((res= items[i]->real_item()->type()) == Item::FIELD_ITEM &&
+ items[i]->result_type() != INT_RESULT)
{
field= ((Item_field *)items[i]->real_item())->field;
break;
--- 1.74/mysql-test/r/select.result 2006-06-17 02:11:10 +04:00
+++ 1.75/mysql-test/r/select.result 2006-06-20 23:05:00 +04:00
@@ -2738,3 +2738,9 @@
EXPLAIN SELECT * FROM t1 FORCE INDEX (a);
ERROR HY000: Key 'a' doesn't exist in table 't1'
DROP TABLE t1;
+CREATE TABLE t1 (i BIGINT UNSIGNED NOT NULL);
+INSERT INTO t1 VALUES (10);
+SELECT i='1e+01',i=1e+01, i in (1e+01), i in ('1e+01') FROM t1;
+i='1e+01' i=1e+01 i in (1e+01) i in ('1e+01')
+0 1 1 1
+DROP TABLE t1;
--- 1.57/mysql-test/t/select.test 2006-06-17 02:11:10 +04:00
+++ 1.58/mysql-test/t/select.test 2006-06-20 23:03:49 +04:00
@@ -2278,4 +2278,23 @@
DROP TABLE t1;
+#
+# Bug #18759 "Incorrect string to numeric conversion"
+#
+# This test is here so that the behavior will not be changed to 4.1
+# and not to 5.0 either. In 4.1 and 5.0 sending an integer as a string
+# will be converted internally to real (double) value and it is not
+# as accurate as bigint (longlong) for integers. Thus the results may
+# vary. In 5.1 internally it is decimal, which is a string type and
+# will be more accurate. Due to rather big changes needed to fix this
+# in 4.1 or 5.0 it is not desired to do it in the stable versions.
+#
+# This test is here only to make sure that behavior is not changed in
+# 4.1 and 5.0
+#
+CREATE TABLE t1 (i BIGINT UNSIGNED NOT NULL);
+INSERT INTO t1 VALUES (10);
+SELECT i='1e+01',i=1e+01, i in (1e+01), i in ('1e+01') FROM t1;
+DROP TABLE t1;
+
# End of 4.1 tests
| Thread |
|---|
| • bk commit into 4.1 tree (evgen:1.2510) BUG#18360 | eugene | 20 Jun |