mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 11:27:39 +02:00
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.
This commit is contained in:
parent
2ff0016df3
commit
79f6e16d5e
5 changed files with 46 additions and 10 deletions
|
|
@ -1858,3 +1858,19 @@ left join t4 on id3 = id4 where id2 = 1 or id4 = 1;
|
|||
|
||||
drop table t1,t2,t3,t4;
|
||||
|
||||
#
|
||||
# Bug #2298
|
||||
#
|
||||
|
||||
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';
|
||||
select * from t2 where s = 'one';
|
||||
select * from t3 where s = 'one';
|
||||
select * from t1,t2 where t1.s = t2.s;
|
||||
select * from t2,t3 where t2.s = t3.s;
|
||||
drop table t1, t2, t3;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue