diff options
author | monty@mysql.com <> | 2005-09-21 17:28:51 +0300 |
---|---|---|
committer | monty@mysql.com <> | 2005-09-21 17:28:51 +0300 |
commit | aaecf69525e102fb92ecb026e4e56ea70f75bcce (patch) | |
tree | 596833a757c96b0f30350faebcba8c39605b490f | |
parent | d1ee898d348ff671b654c83d046c3be4547329e3 (diff) | |
parent | 1bd2beff5a1b870d3757fdace1dd82d8435ca484 (diff) | |
download | mariadb-git-aaecf69525e102fb92ecb026e4e56ea70f75bcce.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1
-rw-r--r-- | mysql-test/t/cast.test | 4 | ||||
-rw-r--r-- | sql/item.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/mysql-test/t/cast.test b/mysql-test/t/cast.test index 394971f9648..bb01e8cea83 100644 --- a/mysql-test/t/cast.test +++ b/mysql-test/t/cast.test @@ -20,6 +20,10 @@ select CONVERT(DATE "2004-01-22 21:45:33",CHAR); select CONVERT(DATE "2004-01-22 21:45:33",CHAR(4)); select CONVERT(DATE "2004-01-22 21:45:33",BINARY(4)); select CAST(DATE "2004-01-22 21:45:33" AS BINARY(4)); +select CAST(0xb3 as signed); +select CAST(0x8fffffffffffffff as signed); +select CAST(0xffffffffffffffff as unsigned); +select CAST(0xfffffffffffffffe as signed); # out-of-range cases select cast('18446744073709551616' as unsigned); diff --git a/sql/item.h b/sql/item.h index e683cda5786..b1aed733101 100644 --- a/sql/item.h +++ b/sql/item.h @@ -842,6 +842,7 @@ public: String *val_str(String*) { DBUG_ASSERT(fixed == 1); return &str_value; } int save_in_field(Field *field, bool no_conversions); enum Item_result result_type () const { return STRING_RESULT; } + enum Item_result cast_to_int_type() const { return INT_RESULT; } enum_field_types field_type() const { return MYSQL_TYPE_STRING; } // to prevent drop fixed flag (no need parent cleanup call) void cleanup() {} |