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.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/sql/sql_array.h b/sql/sql_array.h
index f07126bc0ef..9ac27cca63b 100644
--- a/sql/sql_array.h
+++ b/sql/sql_array.h
@@ -124,6 +124,17 @@ public:
return (insert_dynamic(&array, (uchar*)&el));
}
+ /// Pops the last element. Does nothing if array is empty.
+ Elem& pop()
+ {
+ return *((Elem*)pop_dynamic(&array));
+ }
+
+ void del(uint idx)
+ {
+ delete_dynamic_element(&array, idx);
+ }
+
int elements()
{
return array.elements;