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/16 19:40:04 acurtis@stripped +6 -0
Bug#9088 - WHERE clause fails with BIGINT if value is between quotes
Promote Field_num::unsigned_flag to Field::unsigned_flag
Tests for compare failure
sql/item_cmpfunc.cc
1.185 05/03/16 19:39:48 acurtis@stripped +1 -1
Bug#9088
Use new constructor for Item_int_with_ref()
sql/item.h
1.173 05/03/16 19:39:48 acurtis@stripped +5 -0
Bug#9088
New constructor for Item_int_with_ref()
sql/field.h
1.125 05/03/16 19:39:47 acurtis@stripped +6 -5
Bug#9088
new argument for Field constructor,
unsigned_flag promoted from Field_num
sql/field.cc
1.212 05/03/16 19:39:47 acurtis@stripped +3 -2
Bug#9088
new argument for Field constructor,
unsigned_flag promoted from Field_num
mysql-test/t/compare.test
1.9 05/03/16 19:39:47 acurtis@stripped +9 -0
Bug#9088
Test for compare failure
mysql-test/r/compare.result
1.11 05/03/16 19:39:46 acurtis@stripped +9 -0
Bug#9088
Test for compare failure
# 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
--- 1.211/sql/field.cc 2005-02-22 10:51:53 +00:00
+++ 1.212/sql/field.cc 2005-03-16 19:39:47 +00:00
@@ -322,14 +322,15 @@
Field::Field(char *ptr_arg,uint32 length_arg,uchar *null_ptr_arg,
uchar null_bit_arg,
utype unireg_check_arg, const char *field_name_arg,
- struct st_table *table_arg)
+ struct st_table *table_arg, bool unsigned_arg)
:ptr(ptr_arg),null_ptr(null_ptr_arg),
table(table_arg),orig_table(table_arg),
table_name(table_arg ? table_arg->table_name : 0),
field_name(field_name_arg),
query_id(0), key_start(0), part_of_key(0), part_of_sortkey(0),
unireg_check(unireg_check_arg),
- field_length(length_arg),null_bit(null_bit_arg)
+ field_length(length_arg),null_bit(null_bit_arg),
+ unsigned_flag(unsigned_arg)
{
flags=null_ptr ? 0: NOT_NULL_FLAG;
comment.str= (char*) "";
--- 1.124/sql/field.h 2005-02-28 09:59:41 +00:00
+++ 1.125/sql/field.h 2005-03-16 19:39:47 +00:00
@@ -91,10 +91,11 @@
uint32 field_length; // Length of field
uint16 flags;
uchar null_bit; // Bit used to test null bit
+ bool unsigned_flag;
Field(char *ptr_arg,uint32 length_arg,uchar *null_ptr_arg,uchar null_bit_arg,
utype unireg_check_arg, const char *field_name_arg,
- struct st_table *table_arg);
+ struct st_table *table_arg, bool unsigned_arg);
virtual ~Field() {}
/* Store functions returns 1 on overflow and -1 on fatal error */
virtual int store(const char *to,uint length,CHARSET_INFO *cs)=0;
@@ -315,15 +316,15 @@
class Field_num :public Field {
public:
const uint8 dec;
- bool zerofill,unsigned_flag; // Purify cannot handle bit fields
+ bool zerofill; // Purify cannot handle bit fields
Field_num(char *ptr_arg,uint32 len_arg, uchar *null_ptr_arg,
uchar null_bit_arg, utype unireg_check_arg,
const char *field_name_arg,
struct st_table *table_arg,
uint8 dec_arg,bool zero_arg,bool unsigned_arg)
:Field(ptr_arg, len_arg, null_ptr_arg, null_bit_arg,
- unireg_check_arg, field_name_arg, table_arg),
- dec(dec_arg),zerofill(zero_arg),unsigned_flag(unsigned_arg)
+ unireg_check_arg, field_name_arg, table_arg, unsigned_arg),
+ dec(dec_arg),zerofill(zero_arg)
{
if (zerofill)
flags|=ZEROFILL_FLAG;
@@ -350,7 +351,7 @@
const char *field_name_arg,
struct st_table *table_arg,CHARSET_INFO *charset)
:Field(ptr_arg, len_arg, null_ptr_arg, null_bit_arg,
- unireg_check_arg, field_name_arg, table_arg)
+ unireg_check_arg, field_name_arg, table_arg, 0)
{
field_charset=charset;
if (charset->state & MY_CS_BINSORT)
--- 1.172/sql/item.h 2005-03-04 10:16:24 +00:00
+++ 1.173/sql/item.h 2005-03-16 19:39:48 +00:00
@@ -1001,6 +1001,11 @@
{
Item *ref;
public:
+ Item_int_with_ref(Field *field, Item *ref_arg)
+ :Item_int(field->val_int()), ref(ref_arg)
+ {
+ unsigned_flag= field->unsigned_flag;
+ }
Item_int_with_ref(longlong i, Item *ref_arg) :Item_int(i), ref(ref_arg)
{
unsigned_flag= ref_arg->unsigned_flag;
--- 1.184/sql/item_cmpfunc.cc 2005-02-28 09:59:41 +00:00
+++ 1.185/sql/item_cmpfunc.cc 2005-03-16 19:39:48 +00:00
@@ -185,7 +185,7 @@
{
if (!(*item)->save_in_field(field, 1) && !((*item)->null_value))
{
- Item *tmp=new Item_int_with_ref(field->val_int(), *item);
+ Item *tmp=new Item_int_with_ref(field, *item);
if (tmp)
thd->change_item_tree(item, tmp);
return 1; // Item was replaced
--- 1.10/mysql-test/r/compare.result 2005-02-01 14:27:00 +00:00
+++ 1.11/mysql-test/r/compare.result 2005-03-16 19:39:46 +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-16 19:39:47 +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#9088 | antony | 16 Mar |