Skip to content

Commit

Permalink
MDEV-23238 - remove async client from server code.
Browse files Browse the repository at this point in the history
It is already in libmariadb, and server (also that client in server)
does not need it.

It does not work in embedded either since it relies on non-blocking sockets
  • Loading branch information
vaintroub committed Sep 1, 2020
1 parent 72f0f0d commit 32a29af
Show file tree
Hide file tree
Showing 14 changed files with 46 additions and 3,349 deletions.
5 changes: 1 addition & 4 deletions client/mysqltest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,8 @@
#define SIGNAL_FMT "signal %d"
#endif

#include <my_context.h>
static my_bool non_blocking_api_enabled= 0;
#if !defined(EMBEDDED_LIBRARY) && !defined(MY_CONTEXT_DISABLE)
#if !defined(EMBEDDED_LIBRARY)
#define WRAP_NONBLOCK_ENABLED non_blocking_api_enabled
#include "../tests/nonblock-wrappers.h"
#endif
Expand Down Expand Up @@ -6002,10 +6001,8 @@ void do_connect(struct st_command *command)
if (opt_connect_timeout)
mysql_options(con_slot->mysql, MYSQL_OPT_CONNECT_TIMEOUT,
(void *) &opt_connect_timeout);
#ifndef MY_CONTEXT_DISABLE
if (mysql_options(con_slot->mysql, MYSQL_OPT_NONBLOCK, 0))
die("Failed to initialise non-blocking API");
#endif
if (opt_compress || con_compress)
mysql_options(con_slot->mysql, MYSQL_OPT_COMPRESS, NullS);
mysql_options(con_slot->mysql, MYSQL_SET_CHARSET_NAME,
Expand Down
232 changes: 0 additions & 232 deletions include/my_context.h

This file was deleted.

38 changes: 0 additions & 38 deletions include/mysql_async.h

This file was deleted.

7 changes: 0 additions & 7 deletions include/sql_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ extern const char *cant_connect_sqlstate;
extern const char *not_error_sqlstate;


struct mysql_async_context;

struct st_mysql_options_extention {
char *plugin_dir;
char *default_auth;
Expand All @@ -41,7 +39,6 @@ struct st_mysql_options_extention {
double progress,
const char *proc_info,
uint proc_info_length);
struct mysql_async_context *async_context;
HASH connection_attributes;
size_t connection_attributes_length;
};
Expand Down Expand Up @@ -125,10 +122,6 @@ struct st_mysql_client_plugin;
extern struct st_mysql_client_plugin *mysql_client_builtins[];
uchar * send_client_connect_attrs(MYSQL *mysql, uchar *buf);

/* Non-blocking client API. */
void my_context_install_suspend_resume_hook(struct mysql_async_context *b,
void (*)(my_bool, void *), void *);

#ifdef __cplusplus
}
#endif
Expand Down
1 change: 0 additions & 1 deletion include/violite.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,6 @@ struct st_vio
char *read_pos; /* start of unfetched data in the
read buffer */
char *read_end; /* end of unfetched data */
struct mysql_async_context *async_context; /* For non-blocking API */
int read_timeout; /* Timeout value (ms) for read ops. */
int write_timeout; /* Timeout value (ms) for write ops. */
/* function pointers. They are similar for socket/SSL/whatever */
Expand Down
Loading

0 comments on commit 32a29af

Please sign in to comment.