summaryrefslogtreecommitdiff
path: root/sql/field.h
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-07-23 16:55:52 +0200
committerSergei Golubchik <serg@mariadb.org>2016-08-27 16:59:12 +0200
commit12d2c4fcd0bc3fbe74759e8285f2c93ad348e749 (patch)
treee8f0ec7fab2a8ec1365e10a5ddde62e7af2e885d /sql/field.h
parent4070d55735f1642e563b8d60fc2e9771f4963a3f (diff)
downloadmariadb-git-12d2c4fcd0bc3fbe74759e8285f2c93ad348e749.tar.gz
optimize constant default expressions
to be calculated at the CREATE TABLE time and stored in the default row image.
Diffstat (limited to 'sql/field.h')
-rw-r--r--sql/field.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/field.h b/sql/field.h
index f3328d560b8..45d2c3a7f00 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -574,7 +574,11 @@ inline bool is_temporal_type_with_time(enum_field_types type)
}
}
-/* Bits for type of vcol expression */
+/*
+ Flags for Virtual_column_info. If none is set, the expression must be
+ a constant with no side-effects, so it's calculated at CREATE TABLE time,
+ stored in table->record[2], and not recalculated for every statement.
+*/
#define VCOL_FIELD_REF 1
#define VCOL_NON_DETERMINISTIC 2
#define VCOL_SESSION_FUNC 4 /* uses session data, e.g. USER or DAYNAME */