Details
-
Bug
-
Status: Stalled (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL)
-
None
Description
Expected that "select from table" and "select from view" give the same result:
Test:
SET @@SQL_MODE='NO_BACKSLASH_ESCAPES'; |
show local variables like 'SQL_MODE'; |
|
CREATE TABLE t1 (p int not null auto_increment, a varchar(20), primary key(p)); |
INSERT t1 (a) VALUES |
('\\'), |
('\n'), |
('\b'), |
('\r'); |
|
select |
masks.p,
|
masks.a as mask, |
examples.a as example |
from
|
t1 as masks |
left join t1 as examples on examples.a LIKE masks.a |
order by masks.p, example; |
|
create view v1 as select |
masks.p,
|
masks.a as mask, |
examples.a as example |
from
|
t1 as masks |
left join t1 as examples on examples.a LIKE masks.a |
order by masks.p, example; |
select * from v1; |
|
drop view v1; |
drop table t1; |
Actual result:
select |
masks.p,
|
masks.a as mask, |
examples.a as example |
from
|
t1 as masks |
left join t1 as examples on examples.a LIKE masks.a |
order by masks.p, example; |
p mask example
|
1 \\ \\
|
2 \n \n
|
3 \b \b
|
4 \r \r
|
create view v1 as select |
masks.p,
|
masks.a as mask, |
examples.a as example |
from
|
t1 as masks |
left join t1 as examples on examples.a LIKE masks.a |
order by masks.p, example; |
select * from v1; |
p mask example
|
1 \\ NULL |
2 \n NULL |
3 \b NULL |
4 \r NULL |
Expected result:
select |
masks.p,
|
masks.a as mask, |
examples.a as example |
from
|
t1 as masks |
left join t1 as examples on examples.a LIKE masks.a |
order by masks.p, example; |
p mask example
|
1 \\ \\
|
2 \n \n
|
3 \b \b
|
4 \r \r
|
create view v1 as select |
masks.p,
|
masks.a as mask, |
examples.a as example |
from
|
t1 as masks |
left join t1 as examples on examples.a LIKE masks.a |
order by masks.p, example; |
select * from v1; |
p mask example
|
1 \\ \\
|
2 \n \n
|
3 \b \b
|
4 \r \r
|
Attachments
Issue Links
- is part of
-
MDEV-27691 make working view-protocol
- Open