Below is the list of changes that have just been committed into a local
4.1 repository of mysqldev. When mysqldev 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.2458 05/10/22 02:04:56 jimw@stripped +3 -0
Fix handling of comparisons done by IN() to be consistent with how they
are done for the = operator, such as when doing a comparison with a large
unsigned number that was quoted. (Bug #12612)
mysql-test/t/func_equal.test
1.7 05/10/22 02:03:25 jimw@stripped +9 -0
Add new regression test
mysql-test/r/func_equal.result
1.8 05/10/22 02:03:21 jimw@stripped +9 -0
Add new results
sql/item_cmpfunc.cc
1.204 05/10/22 02:02:50 jimw@stripped +15 -0
Force comparison to as an INT when evaluating IN() when possible
# 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: production.mysql.com
# Root: /data0/mysqldev/jimw/mysql-4.1-12612
--- 1.203/sql/item_cmpfunc.cc 2005-10-13 08:25:02 +02:00
+++ 1.204/sql/item_cmpfunc.cc 2005-10-22 02:02:50 +02:00
@@ -1912,6 +1912,21 @@
agg_cmp_type(&cmp_type, args, arg_count);
+ if (args[0]->type() == FIELD_ITEM)
+ {
+ Field *field=((Item_field*) args[0])->field;
+ if (field->can_be_compared_as_longlong())
+ {
+ bool failed= FALSE;
+ for (arg= args+1, arg_end= args+arg_count; arg != arg_end ; arg++)
+ if (!convert_constant_item(thd, field,&args[1]))
+ failed= TRUE;
+
+ if (!failed)
+ cmp_type= INT_RESULT;
+ }
+ }
+
if (cmp_type == STRING_RESULT &&
agg_arg_charsets(cmp_collation, args, arg_count, MY_COLL_CMP_CONV))
return;
--- 1.7/mysql-test/r/func_equal.result 2003-01-06 00:48:50 +01:00
+++ 1.8/mysql-test/r/func_equal.result 2005-10-22 02:03:21 +02:00
@@ -27,3 +27,12 @@
select * from t1 where id <=> value or value<=>id;
id value
drop table t1,t2;
+create table t1 (a bigint unsigned);
+insert into t1 values (4828532208463511553);
+select * from t1 where a = '4828532208463511553';
+a
+4828532208463511553
+select * from t1 where a in ('4828532208463511553');
+a
+4828532208463511553
+drop table t1;
--- 1.6/mysql-test/t/func_equal.test 2005-07-28 02:21:42 +02:00
+++ 1.7/mysql-test/t/func_equal.test 2005-10-22 02:03:25 +02:00
@@ -32,4 +32,13 @@
select * from t1 where id <=> value or value<=>id;
drop table t1,t2;
+#
+# Bug #12612: quoted bigint unsigned value and the use of "in" in where clause
+#
+create table t1 (a bigint unsigned);
+insert into t1 values (4828532208463511553);
+select * from t1 where a = '4828532208463511553';
+select * from t1 where a in ('4828532208463511553');
+drop table t1;
+
# End of 4.1 tests
| Thread |
|---|
| • bk commit into 4.1 tree (jimw:1.2458) BUG#12612 | Jim Winstead | 22 Oct |