diff options
author | evgen@moonbone.local <> | 2007-07-28 16:02:29 +0400 |
---|---|---|
committer | evgen@moonbone.local <> | 2007-07-28 16:02:29 +0400 |
commit | f18b23861a1c2e382f088c128d6a29b7f9147ad0 (patch) | |
tree | 0b52ec48c43e77793f3d5110c8e41e687da32bb8 /sql/sql_show.cc | |
parent | 3301955b6eb841802dc17b7492fe7321891bb672 (diff) | |
download | mariadb-git-f18b23861a1c2e382f088c128d6a29b7f9147ad0.tar.gz |
Bug#30020: Insufficient check led to a wrong info provided by the
information schema table.
The get_schema_views_record() function fills records in the view table of
the informations schema with data about given views. Among other info
the is_updatable flag is set. But the check whether the view is updatable or
not wasn't covering all cases thus sometimes providing wrong info.
This might led to a user confusion.
Now the get_schema_views_record function additionally calls to the
view->can_be_merge() function to find out whether the view can be updated or
not.
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r-- | sql/sql_show.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc index b91412390bc..05a847b3830 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -3211,7 +3211,7 @@ static int get_schema_views_record(THD *thd, TABLE_LIST *tables, Item *item; Item_field *field; /* - chech that at least one coulmn in view is updatable + check that at least one column in view is updatable */ while ((item= it++)) { @@ -3222,6 +3222,8 @@ static int get_schema_views_record(THD *thd, TABLE_LIST *tables, break; } } + if (updatable_view && !tables->view->can_be_merged()) + updatable_view= 0; } if (updatable_view) table->field[5]->store(STRING_WITH_LEN("YES"), cs); |