summaryrefslogtreecommitdiff
path: root/sql/sql_array.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_array.h')
-rw-r--r--sql/sql_array.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/sql/sql_array.h b/sql/sql_array.h
index 56dba784d7d..bcfbb98ef19 100644
--- a/sql/sql_array.h
+++ b/sql/sql_array.h
@@ -165,6 +165,19 @@ public:
return ((const Elem*)array.buffer) + array.elements - 1;
}
+ /// @returns pointer to n-th element
+ Elem *get_pos(size_t idx)
+ {
+ return ((Elem*)array.buffer) + idx;
+ }
+
+ /// @returns pointer to n-th element
+ const Elem *get_pos(size_t idx) const
+ {
+ return ((const Elem*)array.buffer) + idx;
+ }
+
+
/**
@retval false ok
@retval true OOM, @c my_error() has been called.