You've already forked mariadb-connector-c
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:
@@ -2339,6 +2339,7 @@ static int test_conc748(MYSQL *my __attribute__((unused)))
|
|||||||
MYSQL *mysql;
|
MYSQL *mysql;
|
||||||
int i;
|
int i;
|
||||||
const char *ciphers[3]= {"TLS_AES_128_GCM_SHA256", "TLS_AES_256_GCM_SHA384", "TLS_CHACHA20_POLY1305_SHA256"};
|
const char *ciphers[3]= {"TLS_AES_128_GCM_SHA256", "TLS_AES_256_GCM_SHA384", "TLS_CHACHA20_POLY1305_SHA256"};
|
||||||
|
my_bool verify= 0;
|
||||||
|
|
||||||
SKIP_MAXSCALE;
|
SKIP_MAXSCALE;
|
||||||
|
|
||||||
@@ -2348,6 +2349,7 @@ static int test_conc748(MYSQL *my __attribute__((unused)))
|
|||||||
mysql= mysql_init(NULL);
|
mysql= mysql_init(NULL);
|
||||||
|
|
||||||
mysql_ssl_set(mysql, NULL, NULL, NULL, NULL, 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]);
|
mysql_optionsv(mysql, MYSQL_OPT_SSL_CIPHER, ciphers[i]);
|
||||||
|
|
||||||
if (!my_test_connect(mysql, hostname, username,
|
if (!my_test_connect(mysql, hostname, username,
|
||||||
|
@@ -5001,7 +5001,7 @@ static int test_conc_fraction(MYSQL *mysql)
|
|||||||
|
|
||||||
for (i=0; i < 10; i++, frac=frac*10+i)
|
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);
|
sprintf(query, "SELECT '2018-11-05 22:25:59.%ld'", frac);
|
||||||
|
|
||||||
diag("%d: %s", i, query);
|
diag("%d: %s", i, query);
|
||||||
@@ -5033,7 +5033,7 @@ static int test_conc_fraction(MYSQL *mysql)
|
|||||||
|
|
||||||
if (tm.second_part != expected)
|
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);
|
mysql_stmt_close(stmt);
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user