summaryrefslogtreecommitdiff
path: root/sql-common/client.c
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2016-08-19 15:27:37 +0000
committerVladislav Vaintroub <wlad@mariadb.com>2016-08-19 15:27:37 +0000
commit7b89b9f5108c80f4f270da922d7e6c182a663719 (patch)
tree858a3873942f07610fb26685781e8bdbd3ab2c7f /sql-common/client.c
parentdaff133ddf9a9d120050703c0b5753979c6190e0 (diff)
downloadmariadb-git-7b89b9f5108c80f4f270da922d7e6c182a663719.tar.gz
MDEV-9293 Connector/C integration
Diffstat (limited to 'sql-common/client.c')
-rw-r--r--sql-common/client.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/sql-common/client.c b/sql-common/client.c
index fdb17a63ba5..77db558d271 100644
--- a/sql-common/client.c
+++ b/sql-common/client.c
@@ -1005,11 +1005,6 @@ enum option_id {
static TYPELIB option_types={array_elements(default_options)-1,
"options",default_options, NULL};
-const char *sql_protocol_names_lib[] =
-{ "TCP", "SOCKET", "PIPE", "MEMORY", NullS };
-TYPELIB sql_protocol_typelib = {array_elements(sql_protocol_names_lib)-1,"",
- sql_protocol_names_lib, NULL};
-
static int add_init_command(struct st_mysql_options *options, const char *cmd)
{
char *tmp;
@@ -4774,3 +4769,11 @@ mysql_get_socket(const MYSQL *mysql)
return vio_fd(mysql->net.vio);
return INVALID_SOCKET;
}
+
+
+int STDCALL mysql_cancel(MYSQL *mysql)
+{
+ if (mysql->net.vio)
+ return vio_shutdown(mysql->net.vio, SHUT_RDWR);
+ return -1;
+}