Merge lp:~brianaker/libdrizzle/private-headers-connection-test into lp:libdrizzle

Proposed by Brian Aker
Status: Merged
Merged at revision: 74
Proposed branch: lp:~brianaker/libdrizzle/private-headers-connection-test
Merge into: lp:libdrizzle
Diff against target: 643 lines (+226/-109)
21 files modified
libdrizzle-5.1/binlog.h (+0/-3)
libdrizzle-5.1/column.h (+0/-12)
libdrizzle-5.1/conn.h (+1/-44)
libdrizzle-5.1/drizzle.h (+0/-24)
libdrizzle-5.1/result.h (+0/-6)
libdrizzle/binlog.h (+41/-0)
libdrizzle/column.h (+49/-0)
libdrizzle/common.h (+2/-0)
libdrizzle/conn.cc (+2/-2)
libdrizzle/conn_local.h (+38/-2)
libdrizzle/drizzle_local.h (+30/-6)
libdrizzle/include.am (+3/-1)
rpm/spec.in (+0/-1)
tests/unit/binlog.c (+6/-1)
tests/unit/column.c (+5/-1)
tests/unit/connect.c (+24/-1)
tests/unit/insert_id.c (+5/-1)
tests/unit/query.c (+5/-1)
tests/unit/row.c (+5/-1)
tests/unit/statement.c (+5/-1)
tests/unit/unbuffered_query.c (+5/-1)
To merge this branch: bzr merge lp:~brianaker/libdrizzle/private-headers-connection-test
Reviewer Review Type Date Requested Status
Andrew Hutchings Needs Fixing
Review via email: mp+141484@code.launchpad.net

Description of the change

Make all local private in headers, and add a connection loop test.

To post a comment you must log in.
Revision history for this message
Andrew Hutchings (linuxjedi) wrote :

https://jenkins.drizzle.org/job/libdrizzle-build-matrix/label=fedora-17/22/console

root with nopass has access denied which is causing test failures

review: Needs Fixing
75. By Brian Aker

Update to check env for settings.

76. By Brian Aker

Fix rpm, move local binlog call to private headers.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'libdrizzle-5.1/binlog.h'
--- libdrizzle-5.1/binlog.h 2012-12-22 08:54:15 +0000
+++ libdrizzle-5.1/binlog.h 2012-12-31 00:24:23 +0000
@@ -81,9 +81,6 @@
81DRIZZLE_API81DRIZZLE_API
82uint32_t drizzle_binlog_event_raw_length(drizzle_result_st *result);82uint32_t drizzle_binlog_event_raw_length(drizzle_result_st *result);
8383
84DRIZZLE_LOCAL
85drizzle_return_t drizzle_state_binlog_read(drizzle_st *con);
86
87#ifdef __cplusplus84#ifdef __cplusplus
88}85}
89#endif86#endif
9087
=== modified file 'libdrizzle-5.1/column.h'
--- libdrizzle-5.1/column.h 2012-12-18 11:36:28 +0000
+++ libdrizzle-5.1/column.h 2012-12-31 00:24:23 +0000
@@ -58,12 +58,6 @@
58 */58 */
5959
60/**60/**
61 * Initialize a column structure.
62 */
63DRIZZLE_LOCAL
64drizzle_column_st *drizzle_column_create(drizzle_result_st *result);
65
66/**
67 * Free a column structure.61 * Free a column structure.
68 */62 */
69DRIZZLE_API63DRIZZLE_API
@@ -154,12 +148,6 @@
154const uint8_t *drizzle_column_default_value(drizzle_column_st *column,148const uint8_t *drizzle_column_default_value(drizzle_column_st *column,
155 size_t *size);149 size_t *size);
156150
157DRIZZLE_LOCAL
158void drizzle_column_set_default_value(drizzle_column_st *column,
159 const uint8_t *default_value,
160 size_t size);
161
162
163/** @} */151/** @} */
164152
165#ifdef __cplusplus153#ifdef __cplusplus
166154
=== modified file 'libdrizzle-5.1/conn.h'
--- libdrizzle-5.1/conn.h 2012-12-22 08:54:15 +0000
+++ libdrizzle-5.1/conn.h 2012-12-31 00:24:23 +0000
@@ -68,7 +68,7 @@
68 * @param[in] con Connection structure previously initialized with68 * @param[in] con Connection structure previously initialized with
69 * drizzle_create(), drizzle_clone(), or related functions.69 * drizzle_create(), drizzle_clone(), or related functions.
70 */70 */
71DRIZZLE_LOCAL71DRIZZLE_API
72void drizzle_close(drizzle_st *con);72void drizzle_close(drizzle_st *con);
7373
74/**74/**
@@ -198,27 +198,6 @@
198in_port_t drizzle_port(const drizzle_st *con);198in_port_t drizzle_port(const drizzle_st *con);
199199
200/**200/**
201 * Set TCP host and port for a connection.
202 *
203 * @param[in] con Connection structure previously initialized with
204 * drizzle_create(), drizzle_clone(), or related functions.
205 * @param[in] host Host to use for this connection, NULL for default value.
206 * @param[in] port Port to use for this connection, 0 for default value.
207 */
208DRIZZLE_LOCAL
209void drizzle_set_tcp(drizzle_st *con, const char *host, in_port_t port);
210
211/**
212 * Get unix domain socket for a connection.
213 *
214 * @param[in] con Connection structure previously initialized with
215 * drizzle_create(), drizzle_clone(), or related functions.
216 * @return Unix domain socket set for this connection, NULL if not set.
217 */
218DRIZZLE_LOCAL
219const char *drizzle_uds(const drizzle_st *con);
220
221/**
222 * Set unix domain socket for a connection.201 * Set unix domain socket for a connection.
223 *202 *
224 * @param[in] con Connection structure previously initialized with203 * @param[in] con Connection structure previously initialized with
@@ -240,18 +219,6 @@
240const char *drizzle_user(const drizzle_st *con);219const char *drizzle_user(const drizzle_st *con);
241220
242/**221/**
243 * Set username and password for a connection.
244 *
245 * @param[in] con Connection structure previously initialized with
246 * drizzle_create(), drizzle_clone(), or related functions.
247 * @param[in] user Username to use for this connection.
248 * @param[in] password Password to use for this connection.
249 */
250DRIZZLE_LOCAL
251void drizzle_set_auth(drizzle_st *con, const char *user,
252 const char *password);
253
254/**
255 * Get database for a connection.222 * Get database for a connection.
256 *223 *
257 * @param[in] con Connection structure previously initialized with224 * @param[in] con Connection structure previously initialized with
@@ -262,16 +229,6 @@
262const char *drizzle_db(const drizzle_st *con);229const char *drizzle_db(const drizzle_st *con);
263230
264/**231/**
265 * Set database for a connection.
266 *
267 * @param[in] con Connection structure previously initialized with
268 * drizzle_create(), drizzle_clone(), or related functions.
269 * @param[in] db Database to use with this connection.
270 */
271DRIZZLE_LOCAL
272void drizzle_set_db(drizzle_st *con, const char *db);
273
274/**
275 * Get application context pointer for a connection.232 * Get application context pointer for a connection.
276 *233 *
277 * @param[in] con Connection structure previously initialized with234 * @param[in] con Connection structure previously initialized with
278235
=== modified file 'libdrizzle-5.1/drizzle.h'
--- libdrizzle-5.1/drizzle.h 2012-12-30 02:23:50 +0000
+++ libdrizzle-5.1/drizzle.h 2012-12-31 00:24:23 +0000
@@ -210,30 +210,6 @@
210DRIZZLE_API210DRIZZLE_API
211void drizzle_set_log_fn(drizzle_st *con, drizzle_log_fn *function,211void drizzle_set_log_fn(drizzle_st *con, drizzle_log_fn *function,
212 void *context);212 void *context);
213
214/**
215 * Initialize a connection structure. Always check the return value even if
216 * passing in a pre-allocated structure. Some other initialization may have
217 * failed.
218 *
219 * @param[in] drizzle Drizzle structure previously initialized with
220 * drizzle_create() or drizzle_clone().
221 * @param[in] con Caller allocated structure, or NULL to allocate one.
222 * @return On success, a pointer to the (possibly allocated) structure. On
223 * failure this will be NULL.
224 */
225DRIZZLE_LOCAL
226drizzle_st *drizzle_create(void);
227
228/**
229 * Free a connection structure.
230 *
231 * @param[in] con Connection structure previously initialized with
232 * drizzle_create(), drizzle_clone(), or related functions.
233 */
234DRIZZLE_LOCAL
235void drizzle_free(drizzle_st *con);
236
237/**213/**
238 * Wait for I/O on connections.214 * Wait for I/O on connections.
239 *215 *
240216
=== modified file 'libdrizzle-5.1/result.h'
--- libdrizzle-5.1/result.h 2012-12-22 08:54:15 +0000
+++ libdrizzle-5.1/result.h 2012-12-31 00:24:23 +0000
@@ -55,12 +55,6 @@
55 */55 */
5656
57/**57/**
58 * Initialize a result structure.
59 */
60DRIZZLE_LOCAL
61drizzle_result_st *drizzle_result_create(drizzle_st *con);
62
63/**
64 * Free a result structure.58 * Free a result structure.
65 */59 */
66DRIZZLE_API60DRIZZLE_API
6761
=== added file 'libdrizzle/binlog.h'
--- libdrizzle/binlog.h 1970-01-01 00:00:00 +0000
+++ libdrizzle/binlog.h 2012-12-31 00:24:23 +0000
@@ -0,0 +1,41 @@
1/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
2 *
3 * Drizzle Client & Protocol Library
4 *
5 * Copyright (C) 2012 Andrew Hutchings (andrew@linuxjedi.co.uk)
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions are
10 * met:
11 *
12 * * Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 *
15 * * Redistributions in binary form must reproduce the above
16 * copyright notice, this list of conditions and the following disclaimer
17 * in the documentation and/or other materials provided with the
18 * distribution.
19 *
20 * * The names of its contributors may not be used to endorse or
21 * promote products derived from this software without specific prior
22 * written permission.
23 *
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
27 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
28 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
29 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
30 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
32 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 *
36 */
37
38#pragma once
39
40drizzle_return_t drizzle_state_binlog_read(drizzle_st *con);
41
042
=== added file 'libdrizzle/column.h'
--- libdrizzle/column.h 1970-01-01 00:00:00 +0000
+++ libdrizzle/column.h 2012-12-31 00:24:23 +0000
@@ -0,0 +1,49 @@
1/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
2 *
3 * Drizzle Client & Protocol Library
4 *
5 * Copyright (C) 2012 Drizzle Developer Group
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions are
10 * met:
11 *
12 * * Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 *
15 * * Redistributions in binary form must reproduce the above
16 * copyright notice, this list of conditions and the following disclaimer
17 * in the documentation and/or other materials provided with the
18 * distribution.
19 *
20 * * The names of its contributors may not be used to endorse or
21 * promote products derived from this software without specific prior
22 * written permission.
23 *
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
27 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
28 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
29 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
30 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
32 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 *
36 */
37
38#pragma once
39
40/**
41 * Initialize a column structure.
42 */
43drizzle_column_st *drizzle_column_create(drizzle_result_st *result);
44
45void drizzle_column_set_default_value(drizzle_column_st *column,
46 const uint8_t *default_value,
47 size_t size);
48
49
050
=== modified file 'libdrizzle/common.h'
--- libdrizzle/common.h 2012-12-30 02:23:50 +0000
+++ libdrizzle/common.h 2012-12-31 00:24:23 +0000
@@ -68,5 +68,7 @@
68#include "libdrizzle/pack.h"68#include "libdrizzle/pack.h"
69#include "libdrizzle/state.h"69#include "libdrizzle/state.h"
70#include "libdrizzle/sha1.h"70#include "libdrizzle/sha1.h"
71#include "libdrizzle/column.h"
72#include "libdrizzle/binlog.h"
7173
72#include <memory.h>74#include <memory.h>
7375
=== modified file 'libdrizzle/conn.cc'
--- libdrizzle/conn.cc 2012-12-30 02:23:50 +0000
+++ libdrizzle/conn.cc 2012-12-31 00:24:23 +0000
@@ -799,8 +799,6 @@
799drizzle_return_t drizzle_state_addrinfo(drizzle_st *con)799drizzle_return_t drizzle_state_addrinfo(drizzle_st *con)
800{800{
801 drizzle_tcp_st *tcp;801 drizzle_tcp_st *tcp;
802 const char *host;
803 char port[NI_MAXSERV];
804 struct addrinfo ai;802 struct addrinfo ai;
805803
806 if (con == NULL)804 if (con == NULL)
@@ -822,6 +820,7 @@
822 tcp->addrinfo= NULL;820 tcp->addrinfo= NULL;
823 }821 }
824822
823 char port[NI_MAXSERV];
825 if (tcp->port != 0)824 if (tcp->port != 0)
826 {825 {
827 snprintf(port, NI_MAXSERV, "%u", tcp->port);826 snprintf(port, NI_MAXSERV, "%u", tcp->port);
@@ -837,6 +836,7 @@
837 ai.ai_protocol= IPPROTO_TCP;836 ai.ai_protocol= IPPROTO_TCP;
838 ai.ai_family= AF_UNSPEC;837 ai.ai_family= AF_UNSPEC;
839838
839 const char *host;
840 if (tcp->host == NULL)840 if (tcp->host == NULL)
841 {841 {
842 host= DRIZZLE_DEFAULT_TCP_HOST;842 host= DRIZZLE_DEFAULT_TCP_HOST;
843843
=== modified file 'libdrizzle/conn_local.h'
--- libdrizzle/conn_local.h 2012-12-29 21:44:53 +0000
+++ libdrizzle/conn_local.h 2012-12-31 00:24:23 +0000
@@ -2,6 +2,7 @@
2 *2 *
3 * Drizzle Client & Protocol Library3 * Drizzle Client & Protocol Library
4 *4 *
5 * Copyright (C) 2012 Drizzle Developer Group
5 * Copyright (C) 2008 Eric Day (eday@oddments.org)6 * Copyright (C) 2008 Eric Day (eday@oddments.org)
6 * All rights reserved.7 * All rights reserved.
7 *8 *
@@ -58,7 +59,6 @@
58 * @param[in] con Connection structure previously initialized with59 * @param[in] con Connection structure previously initialized with
59 * drizzle_create(), drizzle_clone(), or related functions.60 * drizzle_create(), drizzle_clone(), or related functions.
60 */61 */
61DRIZZLE_LOCAL
62void drizzle_reset_addrinfo(drizzle_st *con);62void drizzle_reset_addrinfo(drizzle_st *con);
6363
64/**64/**
@@ -75,13 +75,49 @@
75 * @return On success, a pointer to the (possibly allocated) structure. On75 * @return On success, a pointer to the (possibly allocated) structure. On
76 * failure this will be NULL.76 * failure this will be NULL.
77 */77 */
78DRIZZLE_LOCAL
79drizzle_result_st *drizzle_command_write(drizzle_st *con,78drizzle_result_st *drizzle_command_write(drizzle_st *con,
80 drizzle_result_st *result,79 drizzle_result_st *result,
81 drizzle_command_t command,80 drizzle_command_t command,
82 const void *data, size_t size,81 const void *data, size_t size,
83 size_t total,82 size_t total,
84 drizzle_return_t *ret_ptr);83 drizzle_return_t *ret_ptr);
84/**
85 * Set TCP host and port for a connection.
86 *
87 * @param[in] con Connection structure previously initialized with
88 * drizzle_create(), drizzle_clone(), or related functions.
89 * @param[in] host Host to use for this connection, NULL for default value.
90 * @param[in] port Port to use for this connection, 0 for default value.
91 */
92void drizzle_set_tcp(drizzle_st *con, const char *host, in_port_t port);
93
94/**
95 * Get unix domain socket for a connection.
96 *
97 * @param[in] con Connection structure previously initialized with
98 * drizzle_create(), drizzle_clone(), or related functions.
99 * @return Unix domain socket set for this connection, NULL if not set.
100 */
101const char *drizzle_uds(const drizzle_st *con);
102
103/**
104 * Set username and password for a connection.
105 *
106 * @param[in] con Connection structure previously initialized with
107 * drizzle_create(), drizzle_clone(), or related functions.
108 * @param[in] user Username to use for this connection.
109 * @param[in] password Password to use for this connection.
110 */
111void drizzle_set_auth(drizzle_st *con, const char *user, const char *password);
112
113/**
114 * Set database for a connection.
115 *
116 * @param[in] con Connection structure previously initialized with
117 * drizzle_create(), drizzle_clone(), or related functions.
118 * @param[in] db Database to use with this connection.
119 */
120void drizzle_set_db(drizzle_st *con, const char *db);
85 121
86/**122/**
87 * Check if state stack is empty.123 * Check if state stack is empty.
88124
=== modified file 'libdrizzle/drizzle_local.h'
--- libdrizzle/drizzle_local.h 2012-12-22 08:54:15 +0000
+++ libdrizzle/drizzle_local.h 2012-12-31 00:24:23 +0000
@@ -58,11 +58,32 @@
58 * @param[in] function Name of function the error happened in. 58 * @param[in] function Name of function the error happened in.
59 * @param[in] format Format and variable argument list of message.59 * @param[in] format Format and variable argument list of message.
60 */60 */
61DRIZZLE_LOCAL
62void drizzle_set_error(drizzle_st *con, const char *function,61void drizzle_set_error(drizzle_st *con, const char *function,
63 const char *format, ...);62 const char *format, ...);
6463
65/**64/**
65 * Initialize a connection structure. Always check the return value even if
66 * passing in a pre-allocated structure. Some other initialization may have
67 * failed.
68 *
69 * @param[in] drizzle Drizzle structure previously initialized with
70 * drizzle_create() or drizzle_clone().
71 * @param[in] con Caller allocated structure, or NULL to allocate one.
72 * @return On success, a pointer to the (possibly allocated) structure. On
73 * failure this will be NULL.
74 */
75drizzle_st *drizzle_create(void);
76
77/**
78 * Free a connection structure.
79 *
80 * @param[in] con Connection structure previously initialized with
81 * drizzle_create(), drizzle_clone(), or related functions.
82 */
83void drizzle_free(drizzle_st *con);
84
85
86/**
66 * Log a message.87 * Log a message.
67 *88 *
68 * @param[in] drizzle Drizzle con structure89 * @param[in] drizzle Drizzle con structure
@@ -70,15 +91,18 @@
70 * @param[in] format Format and variable argument list of message.91 * @param[in] format Format and variable argument list of message.
71 * @param[in] args Variable argument list that has been initialized.92 * @param[in] args Variable argument list that has been initialized.
72 */93 */
73DRIZZLE_LOCAL94void drizzle_log(drizzle_st *con, drizzle_verbose_t verbose, const char *format, va_list args);
74void drizzle_log(drizzle_st *con, drizzle_verbose_t verbose,95
75 const char *format, va_list args);96/**
97 * Initialize a result structure.
98 */
99drizzle_result_st *drizzle_result_create(drizzle_st *con);
100
76101
77/**102/**
78 * Log a fatal message, see drizzle_log() for argument details.103 * Log a fatal message, see drizzle_log() for argument details.
79 */104 */
80static inline void drizzle_log_fatal(drizzle_st *con, const char *format,105static inline void drizzle_log_fatal(drizzle_st *con, const char *format, ...)
81 ...)
82{106{
83 va_list args;107 va_list args;
84108
85109
=== modified file 'libdrizzle/include.am'
--- libdrizzle/include.am 2012-12-30 02:23:50 +0000
+++ libdrizzle/include.am 2012-12-31 00:24:23 +0000
@@ -2,14 +2,16 @@
2# included from Top Level Makefile.am2# included from Top Level Makefile.am
3# All paths should be given relative to the root3# All paths should be given relative to the root
44
5noinst_HEADERS+= libdrizzle/binlog.h
6noinst_HEADERS+= libdrizzle/column.h
5noinst_HEADERS+= libdrizzle/common.h7noinst_HEADERS+= libdrizzle/common.h
6noinst_HEADERS+= libdrizzle/conn_local.h8noinst_HEADERS+= libdrizzle/conn_local.h
9noinst_HEADERS+= libdrizzle/datetime.h
7noinst_HEADERS+= libdrizzle/drizzle_local.h10noinst_HEADERS+= libdrizzle/drizzle_local.h
8noinst_HEADERS+= libdrizzle/pack.h11noinst_HEADERS+= libdrizzle/pack.h
9noinst_HEADERS+= libdrizzle/sha1.h12noinst_HEADERS+= libdrizzle/sha1.h
10noinst_HEADERS+= libdrizzle/state.h13noinst_HEADERS+= libdrizzle/state.h
11noinst_HEADERS+= libdrizzle/structs.h14noinst_HEADERS+= libdrizzle/structs.h
12noinst_HEADERS+= libdrizzle/datetime.h
1315
14lib_LTLIBRARIES+= libdrizzle/libdrizzle.la16lib_LTLIBRARIES+= libdrizzle/libdrizzle.la
15libdrizzle_libdrizzle_la_SOURCES=17libdrizzle_libdrizzle_la_SOURCES=
1618
=== modified file 'rpm/spec.in'
--- rpm/spec.in 2012-12-24 10:20:04 +0000
+++ rpm/spec.in 2012-12-31 00:24:23 +0000
@@ -74,7 +74,6 @@
74%{_includedir}/libdrizzle-5.1/field_client.h74%{_includedir}/libdrizzle-5.1/field_client.h
75%{_includedir}/libdrizzle-5.1/handshake_client.h75%{_includedir}/libdrizzle-5.1/handshake_client.h
76%{_includedir}/libdrizzle-5.1/libdrizzle.h76%{_includedir}/libdrizzle-5.1/libdrizzle.h
77%{_includedir}/libdrizzle-5.1/pack.h
78%{_includedir}/libdrizzle-5.1/query.h77%{_includedir}/libdrizzle-5.1/query.h
79%{_includedir}/libdrizzle-5.1/result.h78%{_includedir}/libdrizzle-5.1/result.h
80%{_includedir}/libdrizzle-5.1/result_client.h79%{_includedir}/libdrizzle-5.1/result_client.h
8180
=== modified file 'tests/unit/binlog.c'
--- tests/unit/binlog.c 2012-12-30 02:23:50 +0000
+++ tests/unit/binlog.c 2012-12-31 00:24:23 +0000
@@ -49,7 +49,12 @@
49 (void) argc;49 (void) argc;
50 (void) argv;50 (void) argv;
5151
52 drizzle_st *con= drizzle_create_tcp("localhost", DRIZZLE_DEFAULT_TCP_PORT, "root", NULL, NULL, 0);52 drizzle_st *con= drizzle_create_tcp(getenv("MYSQL_SERVER"),
53 getenv("MYSQL_PORT") ? atoi("MYSQL_PORT") : DRIZZLE_DEFAULT_TCP_PORT,
54 getenv("MYSQL_USER"),
55 getenv("MYSQL_PASSWORD"),
56 getenv("MYSQL_SCHEMA"), 0);
57
53 ASSERT_NOT_NULL_(con, "Drizzle connection object creation error");58 ASSERT_NOT_NULL_(con, "Drizzle connection object creation error");
5459
55 drizzle_return_t ret= drizzle_connect(con);60 drizzle_return_t ret= drizzle_connect(con);
5661
=== modified file 'tests/unit/column.c'
--- tests/unit/column.c 2012-12-30 02:23:50 +0000
+++ tests/unit/column.c 2012-12-31 00:24:23 +0000
@@ -49,7 +49,11 @@
49 drizzle_row_t row;49 drizzle_row_t row;
50 int num_fields;50 int num_fields;
5151
52 drizzle_st *con= drizzle_create_tcp("localhost", DRIZZLE_DEFAULT_TCP_PORT, "root", NULL, NULL, 0);52 drizzle_st *con= drizzle_create_tcp(getenv("MYSQL_SERVER"),
53 getenv("MYSQL_PORT") ? atoi("MYSQL_PORT") : DRIZZLE_DEFAULT_TCP_PORT,
54 getenv("MYSQL_USER"),
55 getenv("MYSQL_PASSWORD"),
56 getenv("MYSQL_SCHEMA"), 0);
53 ASSERT_NOT_NULL_(con, "Drizzle connection object creation error");57 ASSERT_NOT_NULL_(con, "Drizzle connection object creation error");
5458
55 drizzle_return_t ret= drizzle_connect(con);59 drizzle_return_t ret= drizzle_connect(con);
5660
=== modified file 'tests/unit/connect.c'
--- tests/unit/connect.c 2012-12-30 02:23:50 +0000
+++ tests/unit/connect.c 2012-12-31 00:24:23 +0000
@@ -47,7 +47,11 @@
47 (void) argc;47 (void) argc;
48 (void) argv;48 (void) argv;
4949
50 drizzle_st *con= drizzle_create_tcp("localhost", DRIZZLE_DEFAULT_TCP_PORT, "root", NULL, NULL, 0);50 drizzle_st *con= drizzle_create_tcp(getenv("MYSQL_SERVER"),
51 getenv("MYSQL_PORT") ? atoi("MYSQL_PORT") : DRIZZLE_DEFAULT_TCP_PORT,
52 getenv("MYSQL_USER"),
53 getenv("MYSQL_PASSWORD"),
54 getenv("MYSQL_SCHEMA"), 0);
51 ASSERT_NOT_NULL_(con, "Drizzle connection object creation error");55 ASSERT_NOT_NULL_(con, "Drizzle connection object creation error");
5256
53 drizzle_return_t ret= drizzle_connect(con);57 drizzle_return_t ret= drizzle_connect(con);
@@ -59,6 +63,25 @@
59 }63 }
60 ASSERT_EQ(DRIZZLE_RETURN_OK, ret);64 ASSERT_EQ(DRIZZLE_RETURN_OK, ret);
6165
66 drizzle_query_str(con, "SELECT 1", &ret);
67 ASSERT_EQ_(DRIZZLE_RETURN_OK, ret, "SELECT 1 (%s)", drizzle_error(con));
68
69 // Now that we know everything is good... lets push it.
70 drizzle_close(con);
71
72 int limit= 20;
73 while (--limit)
74 {
75 ret= drizzle_connect(con);
76 ASSERT_EQ_(DRIZZLE_RETURN_OK, ret, "%s(%s)", drizzle_error(con), drizzle_strerror(ret));
77
78 drizzle_query_str(con, "SELECT 1", &ret);
79 ASSERT_EQ_(DRIZZLE_RETURN_OK, ret, "SELECT 1 (%s)", drizzle_error(con));
80
81 // Now that we know everything is good... lets push it.
82 drizzle_close(con);
83 }
84
62 ret= drizzle_quit(con);85 ret= drizzle_quit(con);
63 ASSERT_EQ_(DRIZZLE_RETURN_OK, ret, "%s", drizzle_strerror(ret));86 ASSERT_EQ_(DRIZZLE_RETURN_OK, ret, "%s", drizzle_strerror(ret));
6487
6588
=== modified file 'tests/unit/insert_id.c'
--- tests/unit/insert_id.c 2012-12-30 02:23:50 +0000
+++ tests/unit/insert_id.c 2012-12-31 00:24:23 +0000
@@ -48,7 +48,11 @@
48 (void) argc;48 (void) argc;
49 (void) argv;49 (void) argv;
5050
51 drizzle_st *con= drizzle_create_tcp("localhost", DRIZZLE_DEFAULT_TCP_PORT, "root", NULL, NULL, 0);51 drizzle_st *con= drizzle_create_tcp(getenv("MYSQL_SERVER"),
52 getenv("MYSQL_PORT") ? atoi("MYSQL_PORT") : DRIZZLE_DEFAULT_TCP_PORT,
53 getenv("MYSQL_USER"),
54 getenv("MYSQL_PASSWORD"),
55 getenv("MYSQL_SCHEMA"), 0);
52 ASSERT_NOT_NULL_(con, "Drizzle connection object creation error");56 ASSERT_NOT_NULL_(con, "Drizzle connection object creation error");
5357
54 drizzle_return_t ret= drizzle_connect(con);58 drizzle_return_t ret= drizzle_connect(con);
5559
=== modified file 'tests/unit/query.c'
--- tests/unit/query.c 2012-12-30 02:23:50 +0000
+++ tests/unit/query.c 2012-12-31 00:24:23 +0000
@@ -49,7 +49,11 @@
49 drizzle_row_t row;49 drizzle_row_t row;
50 int num_fields;50 int num_fields;
5151
52 drizzle_st *con= drizzle_create_tcp("localhost", DRIZZLE_DEFAULT_TCP_PORT, "root", NULL, NULL, 0);52 drizzle_st *con= drizzle_create_tcp(getenv("MYSQL_SERVER"),
53 getenv("MYSQL_PORT") ? atoi("MYSQL_PORT") : DRIZZLE_DEFAULT_TCP_PORT,
54 getenv("MYSQL_USER"),
55 getenv("MYSQL_PASSWORD"),
56 getenv("MYSQL_SCHEMA"), 0);
53 ASSERT_NOT_NULL_(con, "Drizzle connection object creation error");57 ASSERT_NOT_NULL_(con, "Drizzle connection object creation error");
5458
55 drizzle_return_t ret= drizzle_connect(con);59 drizzle_return_t ret= drizzle_connect(con);
5660
=== modified file 'tests/unit/row.c'
--- tests/unit/row.c 2012-12-30 02:23:50 +0000
+++ tests/unit/row.c 2012-12-31 00:24:23 +0000
@@ -49,7 +49,11 @@
49 drizzle_row_t row;49 drizzle_row_t row;
50 int num_fields;50 int num_fields;
5151
52 drizzle_st *con= drizzle_create_tcp("localhost", DRIZZLE_DEFAULT_TCP_PORT, "root", NULL, NULL, 0);52 drizzle_st *con= drizzle_create_tcp(getenv("MYSQL_SERVER"),
53 getenv("MYSQL_PORT") ? atoi("MYSQL_PORT") : DRIZZLE_DEFAULT_TCP_PORT,
54 getenv("MYSQL_USER"),
55 getenv("MYSQL_PASSWORD"),
56 getenv("MYSQL_SCHEMA"), 0);
53 ASSERT_NOT_NULL_(con, "Drizzle connection object creation error");57 ASSERT_NOT_NULL_(con, "Drizzle connection object creation error");
5458
55 drizzle_return_t ret= drizzle_connect(con);59 drizzle_return_t ret= drizzle_connect(con);
5660
=== modified file 'tests/unit/statement.c'
--- tests/unit/statement.c 2012-12-30 02:23:50 +0000
+++ tests/unit/statement.c 2012-12-31 00:24:23 +0000
@@ -51,7 +51,11 @@
51 (void) argv;51 (void) argv;
52 drizzle_stmt_st *stmt;52 drizzle_stmt_st *stmt;
5353
54 drizzle_st *con= drizzle_create_tcp("localhost", DRIZZLE_DEFAULT_TCP_PORT, "root", NULL, NULL, 0);54 drizzle_st *con= drizzle_create_tcp(getenv("MYSQL_SERVER"),
55 getenv("MYSQL_PORT") ? atoi("MYSQL_PORT") : DRIZZLE_DEFAULT_TCP_PORT,
56 getenv("MYSQL_USER"),
57 getenv("MYSQL_PASSWORD"),
58 getenv("MYSQL_SCHEMA"), 0);
55 ASSERT_NOT_NULL_(con, "Drizzle connection object creation error");59 ASSERT_NOT_NULL_(con, "Drizzle connection object creation error");
5660
57 drizzle_return_t ret= drizzle_connect(con);61 drizzle_return_t ret= drizzle_connect(con);
5862
=== modified file 'tests/unit/unbuffered_query.c'
--- tests/unit/unbuffered_query.c 2012-12-30 02:23:50 +0000
+++ tests/unit/unbuffered_query.c 2012-12-31 00:24:23 +0000
@@ -49,7 +49,11 @@
49 drizzle_row_t row;49 drizzle_row_t row;
50 int num_fields;50 int num_fields;
5151
52 drizzle_st *con= drizzle_create_tcp("localhost", DRIZZLE_DEFAULT_TCP_PORT, "root", NULL, NULL, 0);52 drizzle_st *con= drizzle_create_tcp(getenv("MYSQL_SERVER"),
53 getenv("MYSQL_PORT") ? atoi("MYSQL_PORT") : DRIZZLE_DEFAULT_TCP_PORT,
54 getenv("MYSQL_USER"),
55 getenv("MYSQL_PASSWORD"),
56 getenv("MYSQL_SCHEMA"), 0);
53 ASSERT_NOT_NULL_(con, "Drizzle connection object creation error");57 ASSERT_NOT_NULL_(con, "Drizzle connection object creation error");
5458
55 drizzle_return_t ret= drizzle_connect(con);59 drizzle_return_t ret= drizzle_connect(con);

Subscribers

People subscribed via source and target branches

to all changes:
to status/vote changes: