1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Merge branch '10.4' into bb-10.4-mdev16188

This commit is contained in:
Igor Babaev
2019-02-03 18:41:18 -08:00
2383 changed files with 85155 additions and 37192 deletions

View File

@@ -123,8 +123,7 @@ public:
void init(uint prealloc=16, uint increment=16)
{
my_init_dynamic_array(&array, sizeof(Elem), prealloc, increment,
MYF(0));
init_dynamic_array2(&array, sizeof(Elem), 0, prealloc, increment, MYF(0));
}
/**
@@ -231,6 +230,11 @@ public:
set_dynamic(&array, &el, idx);
}
void freeze()
{
freeze_size(&array);
}
bool resize(size_t new_size, Elem default_val)
{
size_t old_size= elements();
@@ -265,7 +269,7 @@ public:
my_qsort(array.buffer, array.elements, sizeof(Elem), (qsort_cmp)cmp_func);
}
typedef int (*CMP_FUNC2)(const Elem *el1, const Elem *el2, void *);
typedef int (*CMP_FUNC2)(void *, const Elem *el1, const Elem *el2);
void sort(CMP_FUNC2 cmp_func, void *data)
{
my_qsort2(array.buffer, array.elements, sizeof(Elem), (qsort2_cmp)cmp_func, data);