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/sql_load.cc | |
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/sql_load.cc')
-rw-r--r-- | sql/sql_load.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_load.cc b/sql/sql_load.cc index 0e4057d9ae4..cb156cc51f0 100644 --- a/sql/sql_load.cc +++ b/sql/sql_load.cc @@ -175,7 +175,7 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, table is marked to be 'used for insert' in which case we should never mark this table as as 'const table' (ie, one that has only one row). */ - if (unique_table(thd, table_list, table_list->next_global)) + if (unique_table(thd, table_list, table_list->next_global, 0)) { my_error(ER_UPDATE_TABLE_USED, MYF(0), table_list->table_name); DBUG_RETURN(TRUE); |