1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-25080 Fix incorrect view names in printed queries

When printing Item_direct_view_ref the printed field name must be
complemented with the view name/derived table alias.
For example, for "SELECT a FROM (SELECT a FROM t1) q" field `a`
in the select list must be printed as `q`.`a`.

But if the view was merged then the initial `q` does not make sense
any more so field `a` must be printed  as `t1`.`a`
This commit is contained in:
Oleg Smirnov
2023-02-09 14:09:31 +07:00
committed by Sergei Golubchik
parent b5507c738f
commit 47e29a2ff4
6 changed files with 26 additions and 5 deletions

View File

@@ -197,7 +197,7 @@ select * from db1.v1 {
}
},
{
"expanded_query": "/* select#1 */ select db1.t1.a AS a from v1"
"expanded_query": "/* select#1 */ select v1.a AS a from v1"
}
]
}