summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorEric Herman <eric@freesa.org>2021-11-05 19:03:38 +0100
committerRobert Bindar <robert@mariadb.org>2021-11-24 16:39:38 +0200
commit6a282df0bee033266942fb891ded629c05db44b5 (patch)
tree9f09cda2737f88f21c26ebe07271e248a5c41061 /mysys
parentf9ad8072cdb6376a3cf5384c76a85beb905f5dd8 (diff)
downloadmariadb-git-6a282df0bee033266942fb891ded629c05db44b5.tar.gz
Remove DYNAMIC_ARRAY get_index_dynamic()bb-10.8-robert
The DYNAMIC_ARRAY copies values in and copies values out. Without a comparitor function, get_index_dynamic() does not make sense. This function is not used. If we have a need for a function like it in the future, I propose we write a new one with unit tests showing how it is used and demostrating that it behaves as expected.
Diffstat (limited to 'mysys')
-rw-r--r--mysys/array.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/mysys/array.c b/mysys/array.c
index c9bf609b6d4..aa2f444653f 100644
--- a/mysys/array.c
+++ b/mysys/array.c
@@ -375,29 +375,3 @@ void freeze_size(DYNAMIC_ARRAY *array)
array->max_element= elements;
}
}
-
-#ifdef NOT_USED
-/*
- Get the index of a dynamic element
-
- SYNOPSIS
- get_index_dynamic()
- array Array
- element Whose element index
-
-*/
-
-int get_index_dynamic(DYNAMIC_ARRAY *array, void* element)
-{
- size_t ret;
- if (array->buffer > (uchar*) element)
- return -1;
-
- ret= ((uchar*) element - array->buffer) / array->size_of_element;
- if (ret > array->elements)
- return -1;
-
- return ret;
-
-}
-#endif