summaryrefslogtreecommitdiff
path: root/sql/table.h
diff options
context:
space:
mode:
authorAleksey Midenkov <midenok@gmail.com>2020-04-04 00:53:37 +0300
committerAleksey Midenkov <midenok@gmail.com>2020-04-04 00:53:37 +0300
commit105b879d0f541f049a131a5c3b99d678fc7d3213 (patch)
tree6aaffe72cdc15ec1a9786859bba2015ace001fe0 /sql/table.h
parent431a740815dc21d7daf00359b1764c41ff95bbdc (diff)
downloadmariadb-git-105b879d0f541f049a131a5c3b99d678fc7d3213.tar.gz
MDEV-21941 RENAME doesn't work for system time or period fields
- Ignore system-invisible fields (as well as for setting default value); - Handle rename of system time and period fields.
Diffstat (limited to 'sql/table.h')
-rw-r--r--sql/table.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/sql/table.h b/sql/table.h
index 310ffb8c704..67127166ffa 100644
--- a/sql/table.h
+++ b/sql/table.h
@@ -831,14 +831,28 @@ struct TABLE_SHARE
Field *vers_start_field()
{
+ DBUG_ASSERT(versioned);
return field[vers.start_fieldno];
}
Field *vers_end_field()
{
+ DBUG_ASSERT(versioned);
return field[vers.end_fieldno];
}
+ Field *period_start_field() const
+ {
+ DBUG_ASSERT(period.name);
+ return field[period.start_fieldno];
+ }
+
+ Field *period_end_field() const
+ {
+ DBUG_ASSERT(period.name);
+ return field[period.end_fieldno];
+ }
+
/**
Cache the checked structure of this table.
@@ -1625,6 +1639,19 @@ public:
return field[s->vers.end_fieldno];
}
+ Field *period_start_field() const
+ {
+ DBUG_ASSERT(s && s->period.name);
+ return field[s->period.start_fieldno];
+ }
+
+ Field *period_end_field() const
+ {
+ DBUG_ASSERT(s && s->period.name);
+ return field[s->period.end_fieldno];
+ }
+
+
ulonglong vers_start_id() const;
ulonglong vers_end_id() const;