1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-08 14:02:17 +03:00

Merge remote-tracking branch 'origin/3.4' into HEAD

This commit is contained in:
Sergei Golubchik
2024-08-03 16:38:02 +02:00
3 changed files with 35 additions and 16 deletions

View File

@@ -1125,8 +1125,8 @@ static int bulk_with_unit_result_insert(MYSQL *my)
check_stmt_rc(rc, stmt);
/* allocate memory */
buffer= calloc(TEST_ARRAY_SIZE, sizeof(char *));
lengths= (unsigned long *)calloc(sizeof(long), TEST_ARRAY_SIZE);
buffer= calloc(TEST_ARRAY_SIZE, sizeof *buffer);
lengths= calloc(TEST_ARRAY_SIZE, sizeof *lengths);
for (i=0; i < TEST_ARRAY_SIZE; i++)
{
@@ -1251,7 +1251,7 @@ static int bulk_with_unit_result_delete(MYSQL *my)
rc= mysql_stmt_attr_set(stmt, STMT_ATTR_ARRAY_SIZE, &array_size);
check_stmt_rc(rc, stmt);
vals= (unsigned int *)calloc(sizeof(int), 5);
vals= calloc(5, sizeof *vals);
memset(bind, 0, sizeof(MYSQL_BIND) * 1);
bind[0].buffer_type= MYSQL_TYPE_LONG;
bind[0].buffer= vals;
@@ -1359,7 +1359,7 @@ static int bulk_with_unit_result_update(MYSQL *my)
rc= mysql_stmt_attr_set(stmt, STMT_ATTR_ARRAY_SIZE, &array_size);
check_stmt_rc(rc, stmt);
vals= (unsigned int *)calloc(sizeof(int), 5);
vals= calloc(5, sizeof *vals);
memset(bind, 0, sizeof(MYSQL_BIND) * 1);
bind[0].buffer_type= MYSQL_TYPE_LONG;
bind[0].buffer= vals;