diff --git a/include/mariadb_com.h b/include/mariadb_com.h index 8e89c24c..d14e75ea 100644 --- a/include/mariadb_com.h +++ b/include/mariadb_com.h @@ -429,6 +429,28 @@ struct rand_struct { double max_value_dbl; }; + /* The following is for user defined functions */ + +typedef struct st_udf_args +{ + unsigned int arg_count; /* Number of arguments */ + enum Item_result *arg_type; /* Pointer to item_results */ + char **args; /* Pointer to argument */ + unsigned long *lengths; /* Length of string arguments */ + char *maybe_null; /* Set to 1 for all maybe_null args */ +} UDF_ARGS; + + /* This holds information about the result */ + +typedef struct st_udf_init +{ + my_bool maybe_null; /* 1 if function can return NULL */ + unsigned int decimals; /* for real functions */ + unsigned int max_length; /* For string functions */ + char *ptr; /* free pointer for function data */ + my_bool const_item; /* 0 if result is independent of arguments */ +} UDF_INIT; + /* Connection types */ #define MARIADB_CONNECTION_UNIXSOCKET 0 #define MARIADB_CONNECTION_TCP 1 diff --git a/unittest/libmariadb/connection.c b/unittest/libmariadb/connection.c index 636075f4..c092815f 100644 --- a/unittest/libmariadb/connection.c +++ b/unittest/libmariadb/connection.c @@ -2423,6 +2423,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; @@ -2432,6 +2433,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, diff --git a/unittest/libmariadb/errors.c b/unittest/libmariadb/errors.c index 2f895c9d..bd4f05fb 100644 --- a/unittest/libmariadb/errors.c +++ b/unittest/libmariadb/errors.c @@ -287,6 +287,7 @@ static int test_mdev35935(MYSQL *mysql) MYSQL_BIND bind[2]; const char *data= "test"; + SKIP_MAXSCALE; SKIP_MYSQL(mysql); rc= mysql_select_db(mysql, schema); diff --git a/unittest/libmariadb/ps_bugs.c b/unittest/libmariadb/ps_bugs.c index 09d53e57..41c6312d 100644 --- a/unittest/libmariadb/ps_bugs.c +++ b/unittest/libmariadb/ps_bugs.c @@ -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; + unsigned int expected= frac; sprintf(query, "SELECT '2018-11-05 22:25:59.%ld'", frac); diag("%d: %s", i, query); @@ -5027,13 +5027,14 @@ static int test_conc_fraction(MYSQL *mysql) diag("second_part: %ld", tm.second_part); - expected= frac * 100000; + while (expected && expected < 100000) + expected *= 10; while (expected >= 1000000) expected /= 10; if (tm.second_part != expected) { - diag("Error: tm.second_part=%ld expected=%ld", tm.second_part, expected); + diag("Error: tm.second_part=%ld expected=%d", tm.second_part, expected); mysql_stmt_close(stmt); return FAIL; }