diff options
Diffstat (limited to 'sql/item.h')
-rw-r--r-- | sql/item.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/item.h b/sql/item.h index 2617e96989e..d73e858d68e 100644 --- a/sql/item.h +++ b/sql/item.h @@ -2104,7 +2104,11 @@ public: tab->merge_keys.merge(field->part_of_key); if (tab->read_set) bitmap_fast_test_and_set(tab->read_set, field->field_index); - if (field->vcol_info) + /* + Do not mark a self-referecing virtual column. + Such virtual columns are reported as invalid. + */ + if (field->vcol_info && tab->vcol_set) tab->mark_virtual_col(field); } } @@ -3440,6 +3444,7 @@ public: void cleanup() { null_ref_table= NULL; + item_equal= NULL; Item_direct_ref::cleanup(); } }; |