summaryrefslogtreecommitdiff
path: root/sql/set_var.cc
diff options
context:
space:
mode:
authorEric Herman <eric@freesa.org>2021-09-03 06:38:54 +0200
committerVicențiu-Marian Ciorbaru <vicentiu@mariadb.org>2021-10-19 16:00:26 +0300
commit401ff6994d842a4072b7b155e5a958e178e6497a (patch)
tree2becd556b5bde6e7a890249462d0499927cf488d /sql/set_var.cc
parent9ab0d07e10fdec9b9db59b3ac493045c5be253b0 (diff)
downloadmariadb-git-401ff6994d842a4072b7b155e5a958e178e6497a.tar.gz
MDEV-26221: DYNAMIC_ARRAY use size_t for sizes
https://jira.mariadb.org/browse/MDEV-26221 my_sys DYNAMIC_ARRAY and DYNAMIC_STRING inconsistancy The DYNAMIC_STRING uses size_t for sizes, but DYNAMIC_ARRAY used uint. This patch adjusts DYNAMIC_ARRAY to use size_t like DYNAMIC_STRING. As the MY_DIR member number_of_files is copied from a DYNAMIC_ARRAY, this is changed to be size_t. As MY_TMPDIR members 'cur' and 'max' are copied from a DYNAMIC_ARRAY, these are also changed to be size_t. The lists of plugins and stored procedures use DYNAMIC_ARRAY, but their APIs assume a size of 'uint'; these are unchanged.
Diffstat (limited to 'sql/set_var.cc')
-rw-r--r--sql/set_var.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/set_var.cc b/sql/set_var.cc
index 067abcb049e..4b3e23b06c0 100644
--- a/sql/set_var.cc
+++ b/sql/set_var.cc
@@ -85,7 +85,7 @@ uint sys_var_elements()
int sys_var_add_options(DYNAMIC_ARRAY *long_options, int parse_flags)
{
- uint saved_elements= long_options->elements;
+ size_t saved_elements= long_options->elements;
DBUG_ENTER("sys_var_add_options");