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

test fix: use my_ulonglong instead of ulong

Use 64-bit long instead of 32-bit value to avoid
overflow
This commit is contained in:
Georg Richter
2025-02-11 19:38:55 +01:00
parent 4877093937
commit 1e4e47347d
2 changed files with 4 additions and 2 deletions

View File

@@ -2339,6 +2339,7 @@ static int test_conc748(MYSQL *my __attribute__((unused)))
MYSQL *mysql;
int i;
const char *ciphers[3]= {"TLS_AES_128_GCM_SHA256", "TLS_AES_256_GCM_SHA384", "TLS_CHACHA20_POLY1305_SHA256"};
my_bool verify= 0;
SKIP_MAXSCALE;
@@ -2348,6 +2349,7 @@ static int test_conc748(MYSQL *my __attribute__((unused)))
mysql= mysql_init(NULL);
mysql_ssl_set(mysql, NULL, NULL, NULL, NULL, NULL);
mysql_optionsv(mysql, MYSQL_OPT_SSL_VERIFY_SERVER_CERT, &verify);
mysql_optionsv(mysql, MYSQL_OPT_SSL_CIPHER, ciphers[i]);
if (!my_test_connect(mysql, hostname, username,

View File

@@ -5001,7 +5001,7 @@ static int test_conc_fraction(MYSQL *mysql)
for (i=0; i < 10; i++, frac=frac*10+i)
{
unsigned long expected= 0;
my_ulonglong expected= 0;
sprintf(query, "SELECT '2018-11-05 22:25:59.%ld'", frac);
diag("%d: %s", i, query);
@@ -5033,7 +5033,7 @@ static int test_conc_fraction(MYSQL *mysql)
if (tm.second_part != expected)
{
diag("Error: tm.second_part=%ld expected=%ld", tm.second_part, expected);
diag("Error: tm.second_part=%ld expected=%lld", tm.second_part, expected);
mysql_stmt_close(stmt);
return FAIL;
}