mirror of
https://github.com/MariaDB/server.git
synced 2025-08-31 22:22:30 +03:00
Fix for bug#14861 aliased column names are not preserved.
Create tmp table filed using original item name when it's necessary
This commit is contained in:
@@ -2456,3 +2456,19 @@ f1()
|
||||
42
|
||||
drop view v2,v1;
|
||||
drop function f1;
|
||||
create table t1 (id numeric, warehouse_id numeric);
|
||||
create view v1 as select id from t1;
|
||||
create view v2 as
|
||||
select t1.warehouse_id, v1.id as receipt_id
|
||||
from t1, v1 where t1.id = v1.id;
|
||||
insert into t1 (id, warehouse_id) values(3, 2);
|
||||
insert into t1 (id, warehouse_id) values(4, 2);
|
||||
insert into t1 (id, warehouse_id) values(5, 1);
|
||||
select v2.receipt_id as alias1, v2.receipt_id as alias2 from v2
|
||||
order by v2.receipt_id;
|
||||
alias1 alias2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
drop view v2, v1;
|
||||
drop table t1;
|
||||
|
Reference in New Issue
Block a user