diff options
author | evgen@moonbone.local <> | 2007-03-02 00:09:22 +0300 |
---|---|---|
committer | evgen@moonbone.local <> | 2007-03-02 00:09:22 +0300 |
commit | 11588e5e4a64f01485fce6d5b566d47ef7d6b824 (patch) | |
tree | bb27187d840f1f915575ee30f0eb1dc6458b204e /sql/mysql_priv.h | |
parent | 8f52c5b2070f4ebd8ac3edd395451baa95661f8a (diff) | |
download | mariadb-git-11588e5e4a64f01485fce6d5b566d47ef7d6b824.tar.gz |
Bug#25122: Views based on a self-joined table aren't insertable.
When INSERT is done over a view the table being inserted into is
checked to be unique among all views tables. But if the view contains
self-joined table an error will be thrown even if all tables are used under
different aliases.
The unique_table() function now also checks tables' aliases when needed.
Diffstat (limited to 'sql/mysql_priv.h')
-rw-r--r-- | sql/mysql_priv.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 0948487869a..d2f4938c07c 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -1064,7 +1064,8 @@ TABLE_LIST *find_table_in_list(TABLE_LIST *table, st_table_list *TABLE_LIST::*link, const char *db_name, const char *table_name); -TABLE_LIST *unique_table(THD *thd, TABLE_LIST *table, TABLE_LIST *table_list); +TABLE_LIST *unique_table(THD *thd, TABLE_LIST *table, TABLE_LIST *table_list, + bool check_alias); TABLE **find_temporary_table(THD *thd, const char *db, const char *table_name); bool close_temporary_table(THD *thd, const char *db, const char *table_name); void close_temporary(TABLE *table, bool delete_table); |