diff options
author | Alexey Botchkov <holyfoot@askmonty.org> | 2021-09-06 22:34:35 +0400 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2021-10-19 17:35:06 +0200 |
commit | 0a0dfd63d9a0ae5adb139159e0aeca93c5c2d5c9 (patch) | |
tree | 66209a932d5575a6c3021ab1d215c16e9a3bead7 /sql-common | |
parent | 401ff6994d842a4072b7b155e5a958e178e6497a (diff) | |
download | mariadb-git-0a0dfd63d9a0ae5adb139159e0aeca93c5c2d5c9.tar.gz |
MDEV-19275 Provide SQL service to plugins.
SQL service added.
It provides the limited set of client library functions
to be used by plugin.
Diffstat (limited to 'sql-common')
-rw-r--r-- | sql-common/client.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/sql-common/client.c b/sql-common/client.c index a551258aa34..3bb000db937 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -1712,14 +1712,14 @@ static MYSQL_METHODS client_methods= cli_use_result, /* use_result */ cli_fetch_lengths, /* fetch_lengths */ cli_flush_use_result, /* flush_use_result */ - cli_read_change_user_result /* read_change_user_result */ + cli_read_change_user_result, /* read_change_user_result */ + NULL /* on_close_free */ #ifndef MYSQL_SERVER ,cli_list_fields, /* list_fields */ cli_read_prepare_result, /* read_prepare_result */ cli_stmt_execute, /* stmt_execute */ cli_read_binary_rows, /* read_binary_rows */ cli_unbuffered_fetch, /* unbuffered_fetch */ - NULL, /* free_embedded_thd */ cli_read_statistics, /* read_statistics */ cli_read_query_result, /* next_result */ cli_read_binary_rows /* read_rows_from_cursor */ @@ -3319,10 +3319,8 @@ static void mysql_close_free(MYSQL *mysql) my_free(mysql->user); my_free(mysql->passwd); my_free(mysql->db); -#if defined(EMBEDDED_LIBRARY) || MYSQL_VERSION_ID >= 50100 - my_free(mysql->info_buffer); - mysql->info_buffer= 0; -#endif + if (mysql->methods && mysql->methods->on_close_free) + (*mysql->methods->on_close_free)(mysql); /* Clear pointers for better safety */ mysql->host_info= mysql->user= mysql->passwd= mysql->db= 0; } @@ -3441,13 +3439,6 @@ void STDCALL mysql_close(MYSQL *mysql) mysql_close_free_options(mysql); mysql_close_free(mysql); mysql_detach_stmt_list(&mysql->stmts, "mysql_close"); -#ifndef MYSQL_SERVER - if (mysql->thd) - { - (*mysql->methods->free_embedded_thd)(mysql); - mysql->thd= 0; - } -#endif if (mysql->free_me) my_free(mysql); } |