diff options
Diffstat (limited to 'sql/sql_array.h')
-rw-r--r-- | sql/sql_array.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sql/sql_array.h b/sql/sql_array.h index f07126bc0ef..43ca4ef4219 100644 --- a/sql/sql_array.h +++ b/sql/sql_array.h @@ -104,7 +104,7 @@ public: MYF(MY_THREAD_SPECIFIC)); } - Elem& at(int idx) + Elem& at(size_t idx) { return *(((Elem*)array.buffer) + idx); } @@ -124,11 +124,21 @@ public: return (insert_dynamic(&array, (uchar*)&el)); } - int elements() + bool append_val(Elem el) + { + return (insert_dynamic(&array, (uchar*)&el)); + } + + size_t elements() { return array.elements; } + void set_elements(size_t n) + { + array.elements= n; + } + ~Dynamic_array() { delete_dynamic(&array); |