summaryrefslogtreecommitdiff
path: root/sql/sql_view.h
diff options
context:
space:
mode:
authorevgen@moonbone.local <>2005-08-10 17:45:00 +0400
committerevgen@moonbone.local <>2005-08-10 17:45:00 +0400
commitbaf0c9ad084a915f785b91608ecdf0e3f0122d30 (patch)
tree9daa110455c864e4bfbf2f5a8c350de43a71686e /sql/sql_view.h
parent5d3b406799e14cd20d1df397e0cdc20b766149f9 (diff)
downloadmariadb-git-baf0c9ad084a915f785b91608ecdf0e3f0122d30.tar.gz
Fix bug #11864 non unique names are allowed in subquery
Column names weren't checked for uniqueness for subqueries. Code for names uniqueness checking used for view creation moved into separate function named check_duplicate_names(). It's called on preparation of subqueries to check uniqueness of names. If duplicate names are found then error is raised.
Diffstat (limited to 'sql/sql_view.h')
-rw-r--r--sql/sql_view.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_view.h b/sql/sql_view.h
index 3246dbae383..9d961feb143 100644
--- a/sql/sql_view.h
+++ b/sql/sql_view.h
@@ -33,5 +33,7 @@ int view_checksum(THD *thd, TABLE_LIST *view);
extern TYPELIB updatable_views_with_limit_typelib;
+bool check_duplicate_names(List<Item>& item_list, bool gen_unique_view_names);
+
#define VIEW_ANY_ACL (SELECT_ACL | UPDATE_ACL | INSERT_ACL | DELETE_ACL)