You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-08 14:02:17 +03:00
Follow up of dec061fa95
Use EVP_PKEY_set1_RSA() instead of EVP_PKEY_assign_RSA, since the public key will be freed when releasing pkey-
This commit is contained in:
19
man/WARNING
19
man/WARNING
@@ -1,19 +0,0 @@
|
|||||||
Please don't edit man pages directly in this folder. Man pages are created from
|
|
||||||
MariaDB Connector/C wiki.
|
|
||||||
|
|
||||||
To update manpages, please follow the following steps:
|
|
||||||
|
|
||||||
1) Add, change or remove content directly in MariaDB Connector/C Wiki
|
|
||||||
2) Clone the repository to your local drive
|
|
||||||
3) Run the python script scripts/create_man from the root directory of
|
|
||||||
your connector/c tree with the following parameters:
|
|
||||||
|
|
||||||
--docs = specifies the destination of your local Connector/C wiki repository
|
|
||||||
--funcs = specifies a file which contains all exported functions. This file will
|
|
||||||
be build automatically when running Connector/C build. The filename is
|
|
||||||
"manpages.list" and it will be stored in root of your build directory
|
|
||||||
--version = actual version of Connector/C.
|
|
||||||
|
|
||||||
|
|
||||||
Example: python3 scripts/create_man.py --docs=/home/georg/cc_docs --version=3.2.1 \
|
|
||||||
--funcs=./bld/manpages.lst
|
|
@@ -340,7 +340,7 @@ static int auth_caching_sha2_client(MYSQL_PLUGIN_VIO *vio, MYSQL *mysql)
|
|||||||
if ((pubkey= PEM_read_bio_RSA_PUBKEY(bio, NULL, NULL, NULL)))
|
if ((pubkey= PEM_read_bio_RSA_PUBKEY(bio, NULL, NULL, NULL)))
|
||||||
{
|
{
|
||||||
EVP_PKEY *pkey= EVP_PKEY_new();
|
EVP_PKEY *pkey= EVP_PKEY_new();
|
||||||
EVP_PKEY_assign_RSA(pkey, pubkey);
|
EVP_PKEY_set1_RSA(pkey, pubkey);
|
||||||
rsa_size= EVP_PKEY_size(pkey);
|
rsa_size= EVP_PKEY_size(pkey);
|
||||||
EVP_PKEY_free(pkey);
|
EVP_PKEY_free(pkey);
|
||||||
}
|
}
|
||||||
|
@@ -39,6 +39,7 @@ funcs= func_list.split(";")
|
|||||||
for function in funcs:
|
for function in funcs:
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
print("%s/%s.md" % (args.docs, function))
|
||||||
content= read_content("%s/%s.md" % (args.docs, function))
|
content= read_content("%s/%s.md" % (args.docs, function))
|
||||||
|
|
||||||
except:
|
except:
|
||||||
|
@@ -1520,7 +1520,44 @@ static int test_conc533(MYSQL *mysql)
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int display_extended_field_attribute(MYSQL *mysql)
|
||||||
|
{
|
||||||
|
MYSQL_RES *result;
|
||||||
|
MYSQL_FIELD *fields;
|
||||||
|
|
||||||
|
if (mysql_query(mysql, "CREATE TEMPORARY TABLE t1 (a POINT)"))
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
if (mysql_query(mysql, "SELECT a FROM t1"))
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
if (!(result= mysql_store_result(mysql)))
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
if ((fields= mysql_fetch_fields(result)))
|
||||||
|
{
|
||||||
|
MARIADB_CONST_STRING field_attr;
|
||||||
|
|
||||||
|
if (!mariadb_field_attr(&field_attr, &fields[0],
|
||||||
|
MARIADB_FIELD_ATTR_DATA_TYPE_NAME))
|
||||||
|
{
|
||||||
|
printf("Extended field attribute: %s\n", field_attr.str);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
mysql_free_result(result);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static int test_ext_field_attr(MYSQL *mysql)
|
||||||
|
{
|
||||||
|
display_extended_field_attribute(mysql);
|
||||||
|
|
||||||
|
return OK;
|
||||||
|
}
|
||||||
|
|
||||||
struct my_tests_st my_tests[] = {
|
struct my_tests_st my_tests[] = {
|
||||||
|
{"test_ext_field_attr", test_ext_field_attr, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
|
||||||
{"test_conc533", test_conc533, TEST_CONNECTION_NEW, 0, NULL, NULL},
|
{"test_conc533", test_conc533, TEST_CONNECTION_NEW, 0, NULL, NULL},
|
||||||
{"test_conc458", test_conc458, TEST_CONNECTION_NONE, 0, NULL, NULL},
|
{"test_conc458", test_conc458, TEST_CONNECTION_NONE, 0, NULL, NULL},
|
||||||
{"test_conc457", test_conc457, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
|
{"test_conc457", test_conc457, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
|
||||||
|
Reference in New Issue
Block a user