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
=== modified file 'include/mysql.h'
--- include/mysql.h 2013-01-30 07:37:24 +0000
+++ include/mysql.h 2013-03-07 19:09:25 +0000
@@ -424,7 +424,7 @@
424MYSQL_RES * STDCALL mysql_store_result(MYSQL *mysql);424MYSQL_RES * STDCALL mysql_store_result(MYSQL *mysql);
425MYSQL_RES * STDCALL mysql_use_result(MYSQL *mysql);425MYSQL_RES * STDCALL mysql_use_result(MYSQL *mysql);
426int STDCALL mysql_options(MYSQL *mysql,enum mysql_option option,426int STDCALL mysql_options(MYSQL *mysql,enum mysql_option option,
427 const char *arg);427 const void *arg);
428void STDCALL mysql_free_result(MYSQL_RES *result);428void STDCALL mysql_free_result(MYSQL_RES *result);
429void STDCALL mysql_data_seek(MYSQL_RES *result,429void STDCALL mysql_data_seek(MYSQL_RES *result,
430 my_ulonglong offset);430 my_ulonglong offset);
431431
=== modified file 'libmariadb/libmariadb.c'
--- libmariadb/libmariadb.c 2013-03-07 12:56:14 +0000
+++ libmariadb/libmariadb.c 2013-03-07 19:09:25 +0000
@@ -1500,7 +1500,9 @@
1500 */1500 */
15011501
1502#if defined(HAVE_SYS_UN_H)1502#if defined(HAVE_SYS_UN_H)
1503 if ((!host || !strcmp(host,LOCAL_HOST)) && (unix_socket || mysql_unix_port))1503 if ((!host || strcmp(host,LOCAL_HOST) == 0) &&
1504 mysql->options.protocol != MYSQL_PROTOCOL_TCP &&
1505 (unix_socket || mysql_unix_port))
1504 {1506 {
1505 host=LOCAL_HOST;1507 host=LOCAL_HOST;
1506 if (!unix_socket)1508 if (!unix_socket)
@@ -1530,9 +1532,11 @@
1530#elif defined(_WIN32)1532#elif defined(_WIN32)
1531 {1533 {
1532 if ((unix_socket ||1534 if ((unix_socket ||
1533 !host && is_NT() ||1535 (!host && is_NT()) ||
1534 host && !strcmp(host,LOCAL_HOST_NAMEDPIPE) ||1536 (host && strcmp(host,LOCAL_HOST_NAMEDPIPE) == 0) ||
1535 mysql->options.named_pipe || !have_tcpip))1537 mysql->options.named_pipe ||
1538 !have_tcpip) &&
1539 mysql->options.protocol != MYSQL_PROTOCOL_TCP)
1536 {1540 {
1537 sock=0;1541 sock=0;
1538 if ((hPipe=create_named_pipe(net, mysql->options.connect_timeout,1542 if ((hPipe=create_named_pipe(net, mysql->options.connect_timeout,
@@ -2637,7 +2641,7 @@
26372641
26382642
2639int STDCALL2643int STDCALL
2640mysql_options(MYSQL *mysql,enum mysql_option option, const char *arg)2644mysql_options(MYSQL *mysql,enum mysql_option option, const void *arg)
2641{2645{
2642 DBUG_ENTER("mysql_option");2646 DBUG_ENTER("mysql_option");
2643 DBUG_PRINT("enter",("option: %d",(int) option));2647 DBUG_PRINT("enter",("option: %d",(int) option));

Subscribers

People subscribed via source and target branches