Merge lp:~user-none/mariadb-native-client/mariadb-native-client into lp:mariadb-native-client

Proposed by John Schember
Status: Needs review
Proposed branch: lp:~user-none/mariadb-native-client/mariadb-native-client
Merge into: lp:mariadb-native-client
Diff against target: 51 lines (+10/-6)
2 files modified
include/mysql.h (+1/-1)
libmariadb/libmariadb.c (+9/-5)
To merge this branch: bzr merge lp:~user-none/mariadb-native-client/mariadb-native-client
Reviewer Review Type Date Requested Status
Maria-captains Pending
Review via email: mp+152259@code.launchpad.net
To post a comment you must log in.
Revision history for this message
John Schember (user-none) wrote :

Also, syncs prototype with MySQL 5.5.

Unmerged revisions

38. By John Schember <email address hidden>

Allow TCP to be specified via options to force tcp. Otherwise localhost:port does not work properly.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'include/mysql.h'
2--- include/mysql.h 2013-01-30 07:37:24 +0000
3+++ include/mysql.h 2013-03-07 19:09:25 +0000
4@@ -424,7 +424,7 @@
5 MYSQL_RES * STDCALL mysql_store_result(MYSQL *mysql);
6 MYSQL_RES * STDCALL mysql_use_result(MYSQL *mysql);
7 int STDCALL mysql_options(MYSQL *mysql,enum mysql_option option,
8- const char *arg);
9+ const void *arg);
10 void STDCALL mysql_free_result(MYSQL_RES *result);
11 void STDCALL mysql_data_seek(MYSQL_RES *result,
12 my_ulonglong offset);
13
14=== modified file 'libmariadb/libmariadb.c'
15--- libmariadb/libmariadb.c 2013-03-07 12:56:14 +0000
16+++ libmariadb/libmariadb.c 2013-03-07 19:09:25 +0000
17@@ -1500,7 +1500,9 @@
18 */
19
20 #if defined(HAVE_SYS_UN_H)
21- if ((!host || !strcmp(host,LOCAL_HOST)) && (unix_socket || mysql_unix_port))
22+ if ((!host || strcmp(host,LOCAL_HOST) == 0) &&
23+ mysql->options.protocol != MYSQL_PROTOCOL_TCP &&
24+ (unix_socket || mysql_unix_port))
25 {
26 host=LOCAL_HOST;
27 if (!unix_socket)
28@@ -1530,9 +1532,11 @@
29 #elif defined(_WIN32)
30 {
31 if ((unix_socket ||
32- !host && is_NT() ||
33- host && !strcmp(host,LOCAL_HOST_NAMEDPIPE) ||
34- mysql->options.named_pipe || !have_tcpip))
35+ (!host && is_NT()) ||
36+ (host && strcmp(host,LOCAL_HOST_NAMEDPIPE) == 0) ||
37+ mysql->options.named_pipe ||
38+ !have_tcpip) &&
39+ mysql->options.protocol != MYSQL_PROTOCOL_TCP)
40 {
41 sock=0;
42 if ((hPipe=create_named_pipe(net, mysql->options.connect_timeout,
43@@ -2637,7 +2641,7 @@
44
45
46 int STDCALL
47-mysql_options(MYSQL *mysql,enum mysql_option option, const char *arg)
48+mysql_options(MYSQL *mysql,enum mysql_option option, const void *arg)
49 {
50 DBUG_ENTER("mysql_option");
51 DBUG_PRINT("enter",("option: %d",(int) option));

Subscribers

People subscribed via source and target branches