summaryrefslogtreecommitdiff
path: root/sql/field.h
diff options
context:
space:
mode:
authorSachin Setiya <sachin.setiya@mariadb.com>2018-02-01 18:58:55 +0530
committerSachin Setiya <sachin.setiya@mariadb.com>2018-02-02 14:45:44 +0530
commitc8299e6278e42bdd2540e75305ba4effb7259f6e (patch)
treec06ce089bbfc5f3d0b56ea1495bb728ec4a81533 /sql/field.h
parent16be7469ac7b98b5706623d81829b349fb901b1f (diff)
downloadmariadb-git-c8299e6278e42bdd2540e75305ba4effb7259f6e.tar.gz
This commit solves a couple of issues
1st. Create_field does not have function vers_sys_field() kind of handy function, second I think Create_field and Field should not divert much , and Field does have this function. 2nd. Versioning column does not have NOT_NULL_FLAG, since they can never be null. So I have added NOT_NULL_FLAG. 3rd. Since I added NOT_NULL_FLAG this created one issue , versioning column of datatype bigint unsigned were getting NO_DEFAULT_VALUE_FLAG. This makes test like versioning.insert to fail, Reason being If a column gets this flag if we insert 'default' value it will generate error(that is why ) test was failing. So now versioning column wont get NO_DEFAULT_VALUE_FLAG flag.
Diffstat (limited to 'sql/field.h')
-rw-r--r--sql/field.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/field.h b/sql/field.h
index e1017f04c27..43b3aab1ff4 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -4214,6 +4214,10 @@ public:
length*= charset->mbmaxlen;
key_length= pack_length;
}
+ bool vers_sys_field() const
+ {
+ return flags & (VERS_SYS_START_FLAG | VERS_SYS_END_FLAG);
+ }
void create_length_to_internal_length_bit();
void create_length_to_internal_length_newdecimal();