summaryrefslogtreecommitdiff
path: root/sql/field.h
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2022-11-26 13:39:25 +0100
committerSergei Golubchik <serg@mariadb.org>2022-12-02 16:19:13 +0100
commita6b327e90a8d7c7fe7f64cd2e3ed8535282ff7ff (patch)
tree870c792e6399e533742c698935ad4c3b0c9e2146 /sql/field.h
parent53e57a8681a5ec9d1ae1b59a861a6241824ca699 (diff)
downloadmariadb-git-a6b327e90a8d7c7fe7f64cd2e3ed8535282ff7ff.tar.gz
cleanup: VCOL_NOT_VIRTUAL->VCOL_NEXTVAL
rename to stress that is a specific hack for Item_func_nextval and should not be used for other items. If a vcol uses Item_func_nextval, a corresponding table for the sequence should be added to the prelocking list (in that sense NEXTVAL is not simply a function, but more like a subquery), see add_internal_tables() in DML_prelocking_strategy::handle_table(). At the moment it is only implemented for DEFAULT, not for GENERATED ALWAYS AS, thus the VCOL_NEXTVAL hack.
Diffstat (limited to 'sql/field.h')
-rw-r--r--sql/field.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/sql/field.h b/sql/field.h
index 4ef4483a15a..757a6cc23d0 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -528,10 +528,10 @@ static inline const char *vcol_type_name(enum_vcol_info_type type)
#define VCOL_FIELD_REF 1
#define VCOL_NON_DETERMINISTIC 2
#define VCOL_SESSION_FUNC 4 /* uses session data, e.g. USER or DAYNAME */
-#define VCOL_TIME_FUNC 8
+#define VCOL_TIME_FUNC 8 /* safe for SBR */
#define VCOL_AUTO_INC 16
#define VCOL_IMPOSSIBLE 32
-#define VCOL_NOT_VIRTUAL 64 /* Function can't be virtual */
+#define VCOL_NEXTVAL 64 /* NEXVAL is not implemented for vcols */
#define VCOL_NOT_STRICTLY_DETERMINISTIC \
(VCOL_NON_DETERMINISTIC | VCOL_TIME_FUNC | VCOL_SESSION_FUNC)
@@ -4965,5 +4965,4 @@ ulonglong TABLE::vers_start_id() const
return static_cast<ulonglong>(vers_start_field()->val_int());
}
-
#endif /* FIELD_INCLUDED */