List:Internals« Previous MessageNext Message »
From:antony Date:March 15 2005 4:00am
Subject:bk commit into 4.1 tree (acurtis:1.2111) BUG#9088
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of acurtis. When acurtis 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.2111 05/03/15 02:59:49 acurtis@stripped +3 -0
  Bug#9088
    Compare failure with large unsigned numbers in strings.

  sql/item_cmpfunc.cc
    1.185 05/03/15 02:59:27 acurtis@stripped +2 -0
    Bug#9088
      When converting a constant string into a constant int,
      assume +ve numbers in strings are unsigned.

  mysql-test/t/compare.test
    1.9 05/03/15 02:59:26 acurtis@stripped +9 -0
    Bug#9088
      Test for bug

  mysql-test/r/compare.result
    1.11 05/03/15 02:59:26 acurtis@stripped +9 -0
    Bug#9088
      Test for bug

# 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:	acurtis
# Host:	pcgem.rdg.cyberkinetica.com
# Root:	/var/db/bk/work-acurtis/bug9088

--- 1.184/sql/item_cmpfunc.cc	2005-02-28 09:59:41 +00:00
+++ 1.185/sql/item_cmpfunc.cc	2005-03-15 02:59:27 +00:00
@@ -185,6 +185,8 @@
   {
     if (!(*item)->save_in_field(field, 1) && !((*item)->null_value))
     {
+      if (((*item)->type() == Item::STRING_ITEM) && !((*item)->val() <
0.0))
+        (*item)->unsigned_flag= 1;
       Item *tmp=new Item_int_with_ref(field->val_int(), *item);
       if (tmp)
         thd->change_item_tree(item, tmp);

--- 1.10/mysql-test/r/compare.result	2005-02-01 14:27:00 +00:00
+++ 1.11/mysql-test/r/compare.result	2005-03-15 02:59:26 +00:00
@@ -42,3 +42,12 @@
 SELECT CHAR(30) = '', '' = CHAR(30);
 CHAR(30) = ''	'' = CHAR(30)
 0	0
+create table t1 (a bigint unsigned);
+insert into t1 VALUES (17666000000000000000);
+select * from t1 where a=17666000000000000000;
+a
+17666000000000000000
+select * from t1 where a='17666000000000000000';
+a
+17666000000000000000
+drop table t1;

--- 1.8/mysql-test/t/compare.test	2005-02-01 14:27:00 +00:00
+++ 1.9/mysql-test/t/compare.test	2005-03-15 02:59:26 +00:00
@@ -35,3 +35,12 @@
 SELECT CHAR(31) = '', '' = CHAR(31);
 # Extra test
 SELECT CHAR(30) = '', '' = CHAR(30);
+
+#
+# Bug#9088
+#
+create table t1 (a bigint unsigned);
+insert into t1 VALUES (17666000000000000000);
+select * from t1 where a=17666000000000000000;
+select * from t1 where a='17666000000000000000';
+drop table t1;
Thread
bk commit into 4.1 tree (acurtis:1.2111) BUG#9088antony15 Mar