diff options
author | unknown <evgen@moonbone.local> | 2005-08-16 22:13:43 +0400 |
---|---|---|
committer | unknown <evgen@moonbone.local> | 2005-08-16 22:13:43 +0400 |
commit | 06ebdbb7859ebdfa1d3ba97a45bf74224619b384 (patch) | |
tree | c660002eb3724b212902c96101d676ea79f70656 /mysql-test/r/select.result | |
parent | 219c84faba28171cc04608f826703f5c031d70bc (diff) | |
download | mariadb-git-06ebdbb7859ebdfa1d3ba97a45bf74224619b384.tar.gz |
Fix bug #11398 Bug in field_conv() results in wrong result of join with index
When copying varchar fields with field_conv() it's not taken into account
that length_bytes of source and destination fields may be different.
This results in saving wrong data in field and making wrong key later.
Added check so if fields are varchar and have different length_bytes they
are not copied by memcpy().
sql/field_conv.cc:
Fix bug #11398 Bug in field_conv() results in wrong result of join with index
mysql-test/t/select.test:
Test case for bug #11398 Bug in field_conv() results in wrong result of join with index
mysql-test/r/select.result:
Test case for bug #11398 Bug in field_conv() results in wrong result of join with index
Diffstat (limited to 'mysql-test/r/select.result')
-rw-r--r-- | mysql-test/r/select.result | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index d3409bf8d39..4cbe652552f 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -2739,3 +2739,12 @@ DROP TABLE t1,t2; select x'10' + 0, X'10' + 0, b'10' + 0, B'10' + 0; x'10' + 0 X'10' + 0 b'10' + 0 B'10' + 0 16 16 2 2 +create table t1 (f1 varchar(6) default NULL, f2 int(6) primary key not null); +create table t2 (f3 varchar(5) not null, f4 varchar(5) not null, UNIQUE KEY UKEY (f3,f4)); +insert into t1 values (" 2", 2); +insert into t2 values (" 2", " one "),(" 2", " two "); +select * from t1 left join t2 on f1 = f3; +f1 f2 f3 f4 + 2 2 2 one + 2 2 2 two +drop table t1,t2; |