diff options
author | unknown <ramil/ram@mysql.com/myoffice.izhnet.ru> | 2007-01-18 17:10:00 +0400 |
---|---|---|
committer | unknown <ramil/ram@mysql.com/myoffice.izhnet.ru> | 2007-01-18 17:10:00 +0400 |
commit | 50f32533f976b20f01c6c47b5b455cb2a9f67c7e (patch) | |
tree | cbe729d91bbe26620386d19aebf2958fa4e2ffae /mysql-test | |
parent | 9bca6ffa4135e3a58c062a46eae096bccdd8113c (diff) | |
parent | 368d6b2794040a02911dbc9a358575e930691596 (diff) | |
download | mariadb-git-50f32533f976b20f01c6c47b5b455cb2a9f67c7e.tar.gz |
Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into mysql.com:/usr/home/ram/work/bug22533/my50-bug22533
mysql-test/r/type_bit.result:
Auto merged
mysql-test/t/select.test:
Auto merged
sql/field.cc:
Auto merged
sql/item.cc:
Auto merged
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/range.result | 4 | ||||
-rw-r--r-- | mysql-test/r/select.result | 17 | ||||
-rw-r--r-- | mysql-test/r/type_bit.result | 2 | ||||
-rw-r--r-- | mysql-test/r/type_bit_innodb.result | 2 | ||||
-rw-r--r-- | mysql-test/t/range.test | 4 | ||||
-rw-r--r-- | mysql-test/t/select.test | 13 |
6 files changed, 35 insertions, 7 deletions
diff --git a/mysql-test/r/range.result b/mysql-test/r/range.result index c96173e74cc..9d2da82813f 100644 --- a/mysql-test/r/range.result +++ b/mysql-test/r/range.result @@ -521,8 +521,8 @@ select count(*) from t1 where x = 18446744073709551601; count(*) 1 create table t2 (x bigint not null); -insert into t2(x) values (cast(0xfffffffffffffff0+0 as signed)); -insert into t2(x) values (cast(0xfffffffffffffff1+0 as signed)); +insert into t2(x) values (-16); +insert into t2(x) values (-15); select * from t2; x -16 diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index 44063c1e890..dbc406b9a6c 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -2811,6 +2811,23 @@ select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5; min(key1) 0.37619999051094 DROP TABLE t1,t2; +create table t1(a bigint unsigned, b bigint); +insert into t1 values (0xfffffffffffffffff, 0xfffffffffffffffff), +(0x10000000000000000, 0x10000000000000000), +(0x8fffffffffffffff, 0x8fffffffffffffff); +Warnings: +Warning 1264 Out of range value adjusted for column 'a' at row 1 +Warning 1264 Out of range value adjusted for column 'b' at row 1 +Warning 1264 Out of range value adjusted for column 'a' at row 2 +Warning 1264 Out of range value adjusted for column 'b' at row 2 +Warning 1264 Out of range value adjusted for column 'b' at row 3 +select hex(a), hex(b) from t1; +hex(a) hex(b) +FFFFFFFFFFFFFFFF 7FFFFFFFFFFFFFFF +FFFFFFFFFFFFFFFF 7FFFFFFFFFFFFFFF +8FFFFFFFFFFFFFFF 7FFFFFFFFFFFFFFF +drop table t1; +End of 4.1 tests CREATE TABLE t1 ( K2C4 varchar(4) character set latin1 collate latin1_bin NOT NULL default '', K4N4 varchar(4) character set latin1 collate latin1_bin NOT NULL default '0000', diff --git a/mysql-test/r/type_bit.result b/mysql-test/r/type_bit.result index f3883077919..fad0e1f7974 100644 --- a/mysql-test/r/type_bit.result +++ b/mysql-test/r/type_bit.result @@ -568,7 +568,7 @@ create table t1 (a bit(7)); insert into t1 values (0x60); select * from t1; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def test t1 t1 a a 16 7 1 Y 0 0 63 +def test t1 t1 a a 16 7 1 Y 32 0 63 a ` drop table t1; diff --git a/mysql-test/r/type_bit_innodb.result b/mysql-test/r/type_bit_innodb.result index 1f6857277bd..c4506231f27 100644 --- a/mysql-test/r/type_bit_innodb.result +++ b/mysql-test/r/type_bit_innodb.result @@ -406,7 +406,7 @@ create table t1 (a bit(7)) engine=innodb; insert into t1 values (0x60); select * from t1; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def test t1 t1 a a 16 7 1 Y 0 0 63 +def test t1 t1 a a 16 7 1 Y 32 0 63 a ` drop table t1; diff --git a/mysql-test/t/range.test b/mysql-test/t/range.test index 5a146bbcf86..c7f27d7ca08 100644 --- a/mysql-test/t/range.test +++ b/mysql-test/t/range.test @@ -406,8 +406,8 @@ select count(*) from t1 where x = 18446744073709551601; create table t2 (x bigint not null); -insert into t2(x) values (cast(0xfffffffffffffff0+0 as signed)); -insert into t2(x) values (cast(0xfffffffffffffff1+0 as signed)); +insert into t2(x) values (-16); +insert into t2(x) values (-15); select * from t2; select count(*) from t2 where x>0; select count(*) from t2 where x=0; diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test index 0c82cef867f..718ab2eb3a1 100644 --- a/mysql-test/t/select.test +++ b/mysql-test/t/select.test @@ -2349,7 +2349,18 @@ select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5; DROP TABLE t1,t2; --enable_ps_protocol -# End of 4.1 tests +# +# Bug #22533: storing large hex strings +# + +create table t1(a bigint unsigned, b bigint); +insert into t1 values (0xfffffffffffffffff, 0xfffffffffffffffff), + (0x10000000000000000, 0x10000000000000000), + (0x8fffffffffffffff, 0x8fffffffffffffff); +select hex(a), hex(b) from t1; +drop table t1; + +--echo End of 4.1 tests # # Test for bug #6474 |