summaryrefslogtreecommitdiff
path: root/sql/sql_lex.h
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2010-07-15 16:51:05 -0700
committerIgor Babaev <igor@askmonty.org>2010-07-15 16:51:05 -0700
commit40901007434a30882e1f51171551ff287fbe540c (patch)
tree533145fe7464b9126586448d784c3fd9893807ca /sql/sql_lex.h
parent683154d1fa6249a8bfcde4bb9227570c452ea802 (diff)
downloadmariadb-git-40901007434a30882e1f51171551ff287fbe540c.tar.gz
Fixed bug #603186.
There were two problems that caused wrong results reported with this bug. 1. In some cases stored(persistent) virtual columns were not marked in the write_set and in the vcol_set bitmaps. 2. If the list of fields in an insert command was empty then the values of the stored virtual columns were set to default. To fix the first problem the function st_table::mark_virtual_columns_for_write was modified. Now the function has a parameter that says whether the virtual columns are to be marked for insert or for update. To fix the second problem a special handling of empty insert lists is added in the function fill_record().
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r--sql/sql_lex.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index de3e01e06a9..b571d7d707a 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -532,6 +532,13 @@ public:
bool describe; /* union exec() called for EXPLAIN */
Procedure *last_procedure; /* Pointer to procedure, if such exists */
+ /*
+ Insert table with stored virtual columns.
+ This is used only in those rare cases
+ when the list of inserted values is empty.
+ */
+ TABLE *insert_table_with_stored_vcol;
+
void init_query();
st_select_lex_unit* master_unit();
st_select_lex* outer_select();