mirror of
https://github.com/MariaDB/server.git
synced 2026-04-22 16:25:30 +02:00
Fixed mdev-15120 CTE table should not belong to database, that is in use
When identifying a table name the following should be taken into account: a CTE name cannot be qualified with a database name, otherwise the table name is considered as the name of a non-CTE table.
This commit is contained in:
parent
bc7a1dc1fb
commit
1951e7f05a
3 changed files with 27 additions and 1 deletions
|
|
@ -240,7 +240,8 @@ With_element *With_clause::find_table_def(TABLE_LIST *table,
|
|||
with_elem= with_elem->next)
|
||||
{
|
||||
if (my_strcasecmp(system_charset_info, with_elem->query_name->str,
|
||||
table->table_name.str) == 0)
|
||||
table->table_name.str) == 0 &&
|
||||
!table->is_fqtn)
|
||||
{
|
||||
table->set_derived();
|
||||
return with_elem;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue