summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
authorunknown <sanja@montyprogram.com>2012-04-19 09:16:30 +0300
committerunknown <sanja@montyprogram.com>2012-04-19 09:16:30 +0300
commit9997b78ae48a518e65b7c96c947e868419c679ca (patch)
tree565ba57250224847b3b806391150a48f3a67f654 /sql/sql_base.cc
parentb9bbe4a18ba8569cd1cedd391725e4ee214d9be7 (diff)
downloadmariadb-git-9997b78ae48a518e65b7c96c947e868419c679ca.tar.gz
LP BUG#978847 fixed.
Fixed incorrect type casting which made all fields (except very first) changes to materialized table incorrect. Saved list of view/derived table used items after expanding '*'.
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r--sql/sql_base.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 3a5b6ac635f..38e56a49767 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -8326,6 +8326,11 @@ insert_fields(THD *thd, Name_resolution_context *context, const char *db_name,
}
}
#endif
+ /*
+ field_iterator.create_item() builds used_items which we
+ have to save because changes made once and they are persistent
+ */
+ tables->persistent_used_items= tables->used_items;
if ((field= field_iterator.field()))
{