diff options
author | unknown <ram@gw.mysql.r18.ru> | 2004-01-22 18:05:47 +0400 |
---|---|---|
committer | unknown <ram@gw.mysql.r18.ru> | 2004-01-22 18:05:47 +0400 |
commit | 79f6e16d5e8b5edeb76d97b5d9886306e000ae87 (patch) | |
tree | e54fe0db01fe767dff386d9f648bc7f6557511f8 /mysql-test/r/select.result | |
parent | 2ff0016df35be813d335178cab2df0c99e6cbeff (diff) | |
download | mariadb-git-79f6e16d5e8b5edeb76d97b5d9886306e000ae87.tar.gz |
a proper fix for the bug #2298 Trailing whitespace inconsistently handled in WHERE clause.
<monty> ramil, in MySQL/MyISAM we should only strip end space, not 'space-like' characters.
<monty> This is according to SQL; When doing a comparision end space and only end space are ignored.
myisam/mi_key.c:
a proper fix for the bug #2298 Trailing whitespace inconsistently handled in WHERE clause.
myisam/mi_search.c:
a proper fix for the bug #2298 Trailing whitespace inconsistently handled in WHERE clause.
mysql-test/r/select.result:
test case for the bug #2298 Trailing whitespace inconsistently handled in WHERE clause.
mysql-test/t/select.test:
test case for the bug #2298 Trailing whitespace inconsistently handled in WHERE clause.
sql/sql_string.cc:
a proper fix for the bug #2298 Trailing whitespace inconsistently handled in WHERE clause.
Diffstat (limited to 'mysql-test/r/select.result')
-rw-r--r-- | mysql-test/r/select.result | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index 9cc5ad76ff0..206fa507615 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -2307,3 +2307,23 @@ left join t4 on id3 = id4 where id2 = 1 or id4 = 1; id1 id2 id3 id4 id44 1 1 NULL NULL NULL drop table t1,t2,t3,t4; +create table t1(s varchar(10) not null); +create table t2(s varchar(10) not null primary key); +create table t3(s varchar(10) not null primary key); +insert into t1 values ('one\t'), ('two\t'); +insert into t2 values ('one\r'), ('two\t'); +insert into t3 values ('one '), ('two\t'); +select * from t1 where s = 'one'; +s +select * from t2 where s = 'one'; +s +select * from t3 where s = 'one'; +s +one +select * from t1,t2 where t1.s = t2.s; +s s +two two +select * from t2,t3 where t2.s = t3.s; +s s +two two +drop table t1, t2, t3; |