mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
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.
This commit is contained in:
committed by
Vicențiu-Marian Ciorbaru
parent
9ab0d07e10
commit
401ff6994d
@@ -12453,9 +12453,9 @@ static
|
||||
bool generate_derived_keys(DYNAMIC_ARRAY *keyuse_array)
|
||||
{
|
||||
KEYUSE *keyuse= dynamic_element(keyuse_array, 0, KEYUSE*);
|
||||
uint elements= keyuse_array->elements;
|
||||
size_t elements= keyuse_array->elements;
|
||||
TABLE *prev_table= 0;
|
||||
for (uint i= 0; i < elements; i++, keyuse++)
|
||||
for (size_t i= 0; i < elements; i++, keyuse++)
|
||||
{
|
||||
if (!keyuse->table)
|
||||
break;
|
||||
@@ -28529,7 +28529,7 @@ JOIN::reoptimize(Item *added_where, table_map join_tables,
|
||||
{
|
||||
DYNAMIC_ARRAY added_keyuse;
|
||||
SARGABLE_PARAM *sargables= 0; /* Used only as a dummy parameter. */
|
||||
uint org_keyuse_elements;
|
||||
size_t org_keyuse_elements;
|
||||
|
||||
/* Re-run the REF optimizer to take into account the new conditions. */
|
||||
if (update_ref_and_keys(thd, &added_keyuse, join_tab, table_count, added_where,
|
||||
|
Reference in New Issue
Block a user