diff options
author | unknown <konstantin@mysql.com> | 2005-05-05 13:47:09 +0400 |
---|---|---|
committer | unknown <konstantin@mysql.com> | 2005-05-05 13:47:09 +0400 |
commit | 7f33809731e31b20735c2aeed16cfdc19c3e9374 (patch) | |
tree | d4d95ecf06af07753385c725dd79f59678cb5ffe /sql/item.cc | |
parent | a001bb2b9d6cb458b53b1ceb3d10be4d8dab2cbf (diff) | |
parent | c758512a9176b40532f8431e7771f8dbeed77111 (diff) | |
download | mariadb-git-7f33809731e31b20735c2aeed16cfdc19c3e9374.tar.gz |
Manual merge
BitKeeper/etc/logging_ok:
auto-union
configure.in:
Auto merged
include/my_sys.h:
Auto merged
mysql-test/r/ps.result:
Auto merged
mysql-test/t/ndb_restore.test:
Auto merged
ndb/test/src/NDBT_ResultRow.cpp:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
Diffstat (limited to 'sql/item.cc')
-rw-r--r-- | sql/item.cc | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/sql/item.cc b/sql/item.cc index 5a49124fc43..7d0a5fbdccc 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -1341,6 +1341,13 @@ Item_uint::Item_uint(const char *str_arg, uint length): } +Item_uint::Item_uint(const char *str_arg, longlong i, uint length): + Item_int(str_arg, i, length) +{ + unsigned_flag= 1; +} + + String *Item_uint::val_str(String *str) { // following assert is redundant, because fixed=1 assigned in constructor @@ -2234,7 +2241,9 @@ Item_param::new_item() case NULL_VALUE: return new Item_null(name); case INT_VALUE: - return new Item_int(name, value.integer, max_length); + return (unsigned_flag ? + new Item_uint(name, value.integer, max_length) : + new Item_int(name, value.integer, max_length)); case REAL_VALUE: return new Item_float(name, value.real, decimals, max_length); case STRING_VALUE: @@ -3517,6 +3526,19 @@ bool Item_int::eq(const Item *arg, bool binary_cmp) const } +Item *Item_int_with_ref::new_item() +{ + DBUG_ASSERT(ref->basic_const_item()); + /* + We need to evaluate the constant to make sure it works with + parameter markers. + */ + return (ref->unsigned_flag ? + new Item_uint(ref->name, ref->val_int(), ref->max_length) : + new Item_int(ref->name, ref->val_int(), ref->max_length)); +} + + Item_num *Item_uint::neg() { Item_decimal *item= new Item_decimal(value, 0); |