summaryrefslogtreecommitdiff
path: root/client/mysqlbinlog.cc
diff options
context:
space:
mode:
authorEric Herman <eric@freesa.org>2021-09-03 06:38:54 +0200
committerVicențiu Ciorbaru <cvicentiu@gmail.com>2021-10-15 12:14:47 +0300
commit0649bcff4e984cb29d9fc12bde7eccb87ea7e38e (patch)
tree7459ff3efdcfdfa2ab4094f7ff5b7e5d4332e9a0 /client/mysqlbinlog.cc
parenta6cf8b34a834e5d16155f8bb3f33d57a4f87eb9e (diff)
downloadmariadb-git-bb-10.7-vicentiu.tar.gz
MDEV-26221: DYNAMIC_ARRAY use size_t for sizesbb-10.7-vicentiu
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 'client/mysqlbinlog.cc')
-rw-r--r--client/mysqlbinlog.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc
index d65828ea71c..3d9b9712ec8 100644
--- a/client/mysqlbinlog.cc
+++ b/client/mysqlbinlog.cc
@@ -954,7 +954,7 @@ static bool print_row_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
Log_event *e= NULL;
// Print the row_event from the last one to the first one
- for (uint i= events_in_stmt.elements; i > 0; --i)
+ for (size_t i= events_in_stmt.elements; i > 0; --i)
{
e= *(dynamic_element(&events_in_stmt, i - 1, Log_event**));
result= result || print_base64(print_event_info, e);
@@ -962,7 +962,7 @@ static bool print_row_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
// Copy all output into the Log_event
ev->output_buf.copy(e->output_buf);
// Delete Log_event
- for (uint i= 0; i < events_in_stmt.elements-1; ++i)
+ for (size_t i= 0; i < events_in_stmt.elements-1; ++i)
{
e= *(dynamic_element(&events_in_stmt, i, Log_event**));
delete e;
@@ -3170,7 +3170,7 @@ int main(int argc, char** argv)
*/
if (opt_flashback && retval != ERROR_STOP)
{
- for (uint i= binlog_events.elements; i > 0; --i)
+ for (size_t i= binlog_events.elements; i > 0; --i)
{
LEX_STRING *event_str= dynamic_element(&binlog_events, i - 1,
LEX_STRING*);