Merge lp:~brianaker/libdrizzle/private-headers-connection-test into lp:libdrizzle
- private-headers-connection-test
- Merge into libdrizzle-redux
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 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Andrew Hutchings | Needs Fixing | ||
Review via email: mp+141484@code.launchpad.net |
Commit message
Description of the change
Make all local private in headers, and add a connection loop test.
To post a comment you must log in.
- 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
1 | === modified file 'libdrizzle-5.1/binlog.h' |
2 | --- libdrizzle-5.1/binlog.h 2012-12-22 08:54:15 +0000 |
3 | +++ libdrizzle-5.1/binlog.h 2012-12-31 00:24:23 +0000 |
4 | @@ -81,9 +81,6 @@ |
5 | DRIZZLE_API |
6 | uint32_t drizzle_binlog_event_raw_length(drizzle_result_st *result); |
7 | |
8 | -DRIZZLE_LOCAL |
9 | -drizzle_return_t drizzle_state_binlog_read(drizzle_st *con); |
10 | - |
11 | #ifdef __cplusplus |
12 | } |
13 | #endif |
14 | |
15 | === modified file 'libdrizzle-5.1/column.h' |
16 | --- libdrizzle-5.1/column.h 2012-12-18 11:36:28 +0000 |
17 | +++ libdrizzle-5.1/column.h 2012-12-31 00:24:23 +0000 |
18 | @@ -58,12 +58,6 @@ |
19 | */ |
20 | |
21 | /** |
22 | - * Initialize a column structure. |
23 | - */ |
24 | -DRIZZLE_LOCAL |
25 | -drizzle_column_st *drizzle_column_create(drizzle_result_st *result); |
26 | - |
27 | -/** |
28 | * Free a column structure. |
29 | */ |
30 | DRIZZLE_API |
31 | @@ -154,12 +148,6 @@ |
32 | const uint8_t *drizzle_column_default_value(drizzle_column_st *column, |
33 | size_t *size); |
34 | |
35 | -DRIZZLE_LOCAL |
36 | -void drizzle_column_set_default_value(drizzle_column_st *column, |
37 | - const uint8_t *default_value, |
38 | - size_t size); |
39 | - |
40 | - |
41 | /** @} */ |
42 | |
43 | #ifdef __cplusplus |
44 | |
45 | === modified file 'libdrizzle-5.1/conn.h' |
46 | --- libdrizzle-5.1/conn.h 2012-12-22 08:54:15 +0000 |
47 | +++ libdrizzle-5.1/conn.h 2012-12-31 00:24:23 +0000 |
48 | @@ -68,7 +68,7 @@ |
49 | * @param[in] con Connection structure previously initialized with |
50 | * drizzle_create(), drizzle_clone(), or related functions. |
51 | */ |
52 | -DRIZZLE_LOCAL |
53 | +DRIZZLE_API |
54 | void drizzle_close(drizzle_st *con); |
55 | |
56 | /** |
57 | @@ -198,27 +198,6 @@ |
58 | in_port_t drizzle_port(const drizzle_st *con); |
59 | |
60 | /** |
61 | - * Set TCP host and port for a connection. |
62 | - * |
63 | - * @param[in] con Connection structure previously initialized with |
64 | - * drizzle_create(), drizzle_clone(), or related functions. |
65 | - * @param[in] host Host to use for this connection, NULL for default value. |
66 | - * @param[in] port Port to use for this connection, 0 for default value. |
67 | - */ |
68 | -DRIZZLE_LOCAL |
69 | -void drizzle_set_tcp(drizzle_st *con, const char *host, in_port_t port); |
70 | - |
71 | -/** |
72 | - * Get unix domain socket for a connection. |
73 | - * |
74 | - * @param[in] con Connection structure previously initialized with |
75 | - * drizzle_create(), drizzle_clone(), or related functions. |
76 | - * @return Unix domain socket set for this connection, NULL if not set. |
77 | - */ |
78 | -DRIZZLE_LOCAL |
79 | -const char *drizzle_uds(const drizzle_st *con); |
80 | - |
81 | -/** |
82 | * Set unix domain socket for a connection. |
83 | * |
84 | * @param[in] con Connection structure previously initialized with |
85 | @@ -240,18 +219,6 @@ |
86 | const char *drizzle_user(const drizzle_st *con); |
87 | |
88 | /** |
89 | - * Set username and password for a connection. |
90 | - * |
91 | - * @param[in] con Connection structure previously initialized with |
92 | - * drizzle_create(), drizzle_clone(), or related functions. |
93 | - * @param[in] user Username to use for this connection. |
94 | - * @param[in] password Password to use for this connection. |
95 | - */ |
96 | -DRIZZLE_LOCAL |
97 | -void drizzle_set_auth(drizzle_st *con, const char *user, |
98 | - const char *password); |
99 | - |
100 | -/** |
101 | * Get database for a connection. |
102 | * |
103 | * @param[in] con Connection structure previously initialized with |
104 | @@ -262,16 +229,6 @@ |
105 | const char *drizzle_db(const drizzle_st *con); |
106 | |
107 | /** |
108 | - * Set database for a connection. |
109 | - * |
110 | - * @param[in] con Connection structure previously initialized with |
111 | - * drizzle_create(), drizzle_clone(), or related functions. |
112 | - * @param[in] db Database to use with this connection. |
113 | - */ |
114 | -DRIZZLE_LOCAL |
115 | -void drizzle_set_db(drizzle_st *con, const char *db); |
116 | - |
117 | -/** |
118 | * Get application context pointer for a connection. |
119 | * |
120 | * @param[in] con Connection structure previously initialized with |
121 | |
122 | === modified file 'libdrizzle-5.1/drizzle.h' |
123 | --- libdrizzle-5.1/drizzle.h 2012-12-30 02:23:50 +0000 |
124 | +++ libdrizzle-5.1/drizzle.h 2012-12-31 00:24:23 +0000 |
125 | @@ -210,30 +210,6 @@ |
126 | DRIZZLE_API |
127 | void drizzle_set_log_fn(drizzle_st *con, drizzle_log_fn *function, |
128 | void *context); |
129 | - |
130 | -/** |
131 | - * Initialize a connection structure. Always check the return value even if |
132 | - * passing in a pre-allocated structure. Some other initialization may have |
133 | - * failed. |
134 | - * |
135 | - * @param[in] drizzle Drizzle structure previously initialized with |
136 | - * drizzle_create() or drizzle_clone(). |
137 | - * @param[in] con Caller allocated structure, or NULL to allocate one. |
138 | - * @return On success, a pointer to the (possibly allocated) structure. On |
139 | - * failure this will be NULL. |
140 | - */ |
141 | -DRIZZLE_LOCAL |
142 | -drizzle_st *drizzle_create(void); |
143 | - |
144 | -/** |
145 | - * Free a connection structure. |
146 | - * |
147 | - * @param[in] con Connection structure previously initialized with |
148 | - * drizzle_create(), drizzle_clone(), or related functions. |
149 | - */ |
150 | -DRIZZLE_LOCAL |
151 | -void drizzle_free(drizzle_st *con); |
152 | - |
153 | /** |
154 | * Wait for I/O on connections. |
155 | * |
156 | |
157 | === modified file 'libdrizzle-5.1/result.h' |
158 | --- libdrizzle-5.1/result.h 2012-12-22 08:54:15 +0000 |
159 | +++ libdrizzle-5.1/result.h 2012-12-31 00:24:23 +0000 |
160 | @@ -55,12 +55,6 @@ |
161 | */ |
162 | |
163 | /** |
164 | - * Initialize a result structure. |
165 | - */ |
166 | -DRIZZLE_LOCAL |
167 | -drizzle_result_st *drizzle_result_create(drizzle_st *con); |
168 | - |
169 | -/** |
170 | * Free a result structure. |
171 | */ |
172 | DRIZZLE_API |
173 | |
174 | === added file 'libdrizzle/binlog.h' |
175 | --- libdrizzle/binlog.h 1970-01-01 00:00:00 +0000 |
176 | +++ libdrizzle/binlog.h 2012-12-31 00:24:23 +0000 |
177 | @@ -0,0 +1,41 @@ |
178 | +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: |
179 | + * |
180 | + * Drizzle Client & Protocol Library |
181 | + * |
182 | + * Copyright (C) 2012 Andrew Hutchings (andrew@linuxjedi.co.uk) |
183 | + * All rights reserved. |
184 | + * |
185 | + * Redistribution and use in source and binary forms, with or without |
186 | + * modification, are permitted provided that the following conditions are |
187 | + * met: |
188 | + * |
189 | + * * Redistributions of source code must retain the above copyright |
190 | + * notice, this list of conditions and the following disclaimer. |
191 | + * |
192 | + * * Redistributions in binary form must reproduce the above |
193 | + * copyright notice, this list of conditions and the following disclaimer |
194 | + * in the documentation and/or other materials provided with the |
195 | + * distribution. |
196 | + * |
197 | + * * The names of its contributors may not be used to endorse or |
198 | + * promote products derived from this software without specific prior |
199 | + * written permission. |
200 | + * |
201 | + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
202 | + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
203 | + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
204 | + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
205 | + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
206 | + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
207 | + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
208 | + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
209 | + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
210 | + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
211 | + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
212 | + * |
213 | + */ |
214 | + |
215 | +#pragma once |
216 | + |
217 | +drizzle_return_t drizzle_state_binlog_read(drizzle_st *con); |
218 | + |
219 | |
220 | === added file 'libdrizzle/column.h' |
221 | --- libdrizzle/column.h 1970-01-01 00:00:00 +0000 |
222 | +++ libdrizzle/column.h 2012-12-31 00:24:23 +0000 |
223 | @@ -0,0 +1,49 @@ |
224 | +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: |
225 | + * |
226 | + * Drizzle Client & Protocol Library |
227 | + * |
228 | + * Copyright (C) 2012 Drizzle Developer Group |
229 | + * All rights reserved. |
230 | + * |
231 | + * Redistribution and use in source and binary forms, with or without |
232 | + * modification, are permitted provided that the following conditions are |
233 | + * met: |
234 | + * |
235 | + * * Redistributions of source code must retain the above copyright |
236 | + * notice, this list of conditions and the following disclaimer. |
237 | + * |
238 | + * * Redistributions in binary form must reproduce the above |
239 | + * copyright notice, this list of conditions and the following disclaimer |
240 | + * in the documentation and/or other materials provided with the |
241 | + * distribution. |
242 | + * |
243 | + * * The names of its contributors may not be used to endorse or |
244 | + * promote products derived from this software without specific prior |
245 | + * written permission. |
246 | + * |
247 | + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
248 | + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
249 | + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
250 | + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
251 | + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
252 | + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
253 | + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
254 | + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
255 | + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
256 | + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
257 | + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
258 | + * |
259 | + */ |
260 | + |
261 | +#pragma once |
262 | + |
263 | +/** |
264 | + * Initialize a column structure. |
265 | + */ |
266 | +drizzle_column_st *drizzle_column_create(drizzle_result_st *result); |
267 | + |
268 | +void drizzle_column_set_default_value(drizzle_column_st *column, |
269 | + const uint8_t *default_value, |
270 | + size_t size); |
271 | + |
272 | + |
273 | |
274 | === modified file 'libdrizzle/common.h' |
275 | --- libdrizzle/common.h 2012-12-30 02:23:50 +0000 |
276 | +++ libdrizzle/common.h 2012-12-31 00:24:23 +0000 |
277 | @@ -68,5 +68,7 @@ |
278 | #include "libdrizzle/pack.h" |
279 | #include "libdrizzle/state.h" |
280 | #include "libdrizzle/sha1.h" |
281 | +#include "libdrizzle/column.h" |
282 | +#include "libdrizzle/binlog.h" |
283 | |
284 | #include <memory.h> |
285 | |
286 | === modified file 'libdrizzle/conn.cc' |
287 | --- libdrizzle/conn.cc 2012-12-30 02:23:50 +0000 |
288 | +++ libdrizzle/conn.cc 2012-12-31 00:24:23 +0000 |
289 | @@ -799,8 +799,6 @@ |
290 | drizzle_return_t drizzle_state_addrinfo(drizzle_st *con) |
291 | { |
292 | drizzle_tcp_st *tcp; |
293 | - const char *host; |
294 | - char port[NI_MAXSERV]; |
295 | struct addrinfo ai; |
296 | |
297 | if (con == NULL) |
298 | @@ -822,6 +820,7 @@ |
299 | tcp->addrinfo= NULL; |
300 | } |
301 | |
302 | + char port[NI_MAXSERV]; |
303 | if (tcp->port != 0) |
304 | { |
305 | snprintf(port, NI_MAXSERV, "%u", tcp->port); |
306 | @@ -837,6 +836,7 @@ |
307 | ai.ai_protocol= IPPROTO_TCP; |
308 | ai.ai_family= AF_UNSPEC; |
309 | |
310 | + const char *host; |
311 | if (tcp->host == NULL) |
312 | { |
313 | host= DRIZZLE_DEFAULT_TCP_HOST; |
314 | |
315 | === modified file 'libdrizzle/conn_local.h' |
316 | --- libdrizzle/conn_local.h 2012-12-29 21:44:53 +0000 |
317 | +++ libdrizzle/conn_local.h 2012-12-31 00:24:23 +0000 |
318 | @@ -2,6 +2,7 @@ |
319 | * |
320 | * Drizzle Client & Protocol Library |
321 | * |
322 | + * Copyright (C) 2012 Drizzle Developer Group |
323 | * Copyright (C) 2008 Eric Day (eday@oddments.org) |
324 | * All rights reserved. |
325 | * |
326 | @@ -58,7 +59,6 @@ |
327 | * @param[in] con Connection structure previously initialized with |
328 | * drizzle_create(), drizzle_clone(), or related functions. |
329 | */ |
330 | -DRIZZLE_LOCAL |
331 | void drizzle_reset_addrinfo(drizzle_st *con); |
332 | |
333 | /** |
334 | @@ -75,13 +75,49 @@ |
335 | * @return On success, a pointer to the (possibly allocated) structure. On |
336 | * failure this will be NULL. |
337 | */ |
338 | -DRIZZLE_LOCAL |
339 | drizzle_result_st *drizzle_command_write(drizzle_st *con, |
340 | drizzle_result_st *result, |
341 | drizzle_command_t command, |
342 | const void *data, size_t size, |
343 | size_t total, |
344 | drizzle_return_t *ret_ptr); |
345 | +/** |
346 | + * Set TCP host and port for a connection. |
347 | + * |
348 | + * @param[in] con Connection structure previously initialized with |
349 | + * drizzle_create(), drizzle_clone(), or related functions. |
350 | + * @param[in] host Host to use for this connection, NULL for default value. |
351 | + * @param[in] port Port to use for this connection, 0 for default value. |
352 | + */ |
353 | +void drizzle_set_tcp(drizzle_st *con, const char *host, in_port_t port); |
354 | + |
355 | +/** |
356 | + * Get unix domain socket for a connection. |
357 | + * |
358 | + * @param[in] con Connection structure previously initialized with |
359 | + * drizzle_create(), drizzle_clone(), or related functions. |
360 | + * @return Unix domain socket set for this connection, NULL if not set. |
361 | + */ |
362 | +const char *drizzle_uds(const drizzle_st *con); |
363 | + |
364 | +/** |
365 | + * Set username and password for a connection. |
366 | + * |
367 | + * @param[in] con Connection structure previously initialized with |
368 | + * drizzle_create(), drizzle_clone(), or related functions. |
369 | + * @param[in] user Username to use for this connection. |
370 | + * @param[in] password Password to use for this connection. |
371 | + */ |
372 | +void drizzle_set_auth(drizzle_st *con, const char *user, const char *password); |
373 | + |
374 | +/** |
375 | + * Set database for a connection. |
376 | + * |
377 | + * @param[in] con Connection structure previously initialized with |
378 | + * drizzle_create(), drizzle_clone(), or related functions. |
379 | + * @param[in] db Database to use with this connection. |
380 | + */ |
381 | +void drizzle_set_db(drizzle_st *con, const char *db); |
382 | |
383 | /** |
384 | * Check if state stack is empty. |
385 | |
386 | === modified file 'libdrizzle/drizzle_local.h' |
387 | --- libdrizzle/drizzle_local.h 2012-12-22 08:54:15 +0000 |
388 | +++ libdrizzle/drizzle_local.h 2012-12-31 00:24:23 +0000 |
389 | @@ -58,11 +58,32 @@ |
390 | * @param[in] function Name of function the error happened in. |
391 | * @param[in] format Format and variable argument list of message. |
392 | */ |
393 | -DRIZZLE_LOCAL |
394 | void drizzle_set_error(drizzle_st *con, const char *function, |
395 | const char *format, ...); |
396 | |
397 | /** |
398 | + * Initialize a connection structure. Always check the return value even if |
399 | + * passing in a pre-allocated structure. Some other initialization may have |
400 | + * failed. |
401 | + * |
402 | + * @param[in] drizzle Drizzle structure previously initialized with |
403 | + * drizzle_create() or drizzle_clone(). |
404 | + * @param[in] con Caller allocated structure, or NULL to allocate one. |
405 | + * @return On success, a pointer to the (possibly allocated) structure. On |
406 | + * failure this will be NULL. |
407 | + */ |
408 | +drizzle_st *drizzle_create(void); |
409 | + |
410 | +/** |
411 | + * Free a connection structure. |
412 | + * |
413 | + * @param[in] con Connection structure previously initialized with |
414 | + * drizzle_create(), drizzle_clone(), or related functions. |
415 | + */ |
416 | +void drizzle_free(drizzle_st *con); |
417 | + |
418 | + |
419 | +/** |
420 | * Log a message. |
421 | * |
422 | * @param[in] drizzle Drizzle con structure |
423 | @@ -70,15 +91,18 @@ |
424 | * @param[in] format Format and variable argument list of message. |
425 | * @param[in] args Variable argument list that has been initialized. |
426 | */ |
427 | -DRIZZLE_LOCAL |
428 | -void drizzle_log(drizzle_st *con, drizzle_verbose_t verbose, |
429 | - const char *format, va_list args); |
430 | +void drizzle_log(drizzle_st *con, drizzle_verbose_t verbose, const char *format, va_list args); |
431 | + |
432 | +/** |
433 | + * Initialize a result structure. |
434 | + */ |
435 | +drizzle_result_st *drizzle_result_create(drizzle_st *con); |
436 | + |
437 | |
438 | /** |
439 | * Log a fatal message, see drizzle_log() for argument details. |
440 | */ |
441 | -static inline void drizzle_log_fatal(drizzle_st *con, const char *format, |
442 | - ...) |
443 | +static inline void drizzle_log_fatal(drizzle_st *con, const char *format, ...) |
444 | { |
445 | va_list args; |
446 | |
447 | |
448 | === modified file 'libdrizzle/include.am' |
449 | --- libdrizzle/include.am 2012-12-30 02:23:50 +0000 |
450 | +++ libdrizzle/include.am 2012-12-31 00:24:23 +0000 |
451 | @@ -2,14 +2,16 @@ |
452 | # included from Top Level Makefile.am |
453 | # All paths should be given relative to the root |
454 | |
455 | +noinst_HEADERS+= libdrizzle/binlog.h |
456 | +noinst_HEADERS+= libdrizzle/column.h |
457 | noinst_HEADERS+= libdrizzle/common.h |
458 | noinst_HEADERS+= libdrizzle/conn_local.h |
459 | +noinst_HEADERS+= libdrizzle/datetime.h |
460 | noinst_HEADERS+= libdrizzle/drizzle_local.h |
461 | noinst_HEADERS+= libdrizzle/pack.h |
462 | noinst_HEADERS+= libdrizzle/sha1.h |
463 | noinst_HEADERS+= libdrizzle/state.h |
464 | noinst_HEADERS+= libdrizzle/structs.h |
465 | -noinst_HEADERS+= libdrizzle/datetime.h |
466 | |
467 | lib_LTLIBRARIES+= libdrizzle/libdrizzle.la |
468 | libdrizzle_libdrizzle_la_SOURCES= |
469 | |
470 | === modified file 'rpm/spec.in' |
471 | --- rpm/spec.in 2012-12-24 10:20:04 +0000 |
472 | +++ rpm/spec.in 2012-12-31 00:24:23 +0000 |
473 | @@ -74,7 +74,6 @@ |
474 | %{_includedir}/libdrizzle-5.1/field_client.h |
475 | %{_includedir}/libdrizzle-5.1/handshake_client.h |
476 | %{_includedir}/libdrizzle-5.1/libdrizzle.h |
477 | -%{_includedir}/libdrizzle-5.1/pack.h |
478 | %{_includedir}/libdrizzle-5.1/query.h |
479 | %{_includedir}/libdrizzle-5.1/result.h |
480 | %{_includedir}/libdrizzle-5.1/result_client.h |
481 | |
482 | === modified file 'tests/unit/binlog.c' |
483 | --- tests/unit/binlog.c 2012-12-30 02:23:50 +0000 |
484 | +++ tests/unit/binlog.c 2012-12-31 00:24:23 +0000 |
485 | @@ -49,7 +49,12 @@ |
486 | (void) argc; |
487 | (void) argv; |
488 | |
489 | - drizzle_st *con= drizzle_create_tcp("localhost", DRIZZLE_DEFAULT_TCP_PORT, "root", NULL, NULL, 0); |
490 | + drizzle_st *con= drizzle_create_tcp(getenv("MYSQL_SERVER"), |
491 | + getenv("MYSQL_PORT") ? atoi("MYSQL_PORT") : DRIZZLE_DEFAULT_TCP_PORT, |
492 | + getenv("MYSQL_USER"), |
493 | + getenv("MYSQL_PASSWORD"), |
494 | + getenv("MYSQL_SCHEMA"), 0); |
495 | + |
496 | ASSERT_NOT_NULL_(con, "Drizzle connection object creation error"); |
497 | |
498 | drizzle_return_t ret= drizzle_connect(con); |
499 | |
500 | === modified file 'tests/unit/column.c' |
501 | --- tests/unit/column.c 2012-12-30 02:23:50 +0000 |
502 | +++ tests/unit/column.c 2012-12-31 00:24:23 +0000 |
503 | @@ -49,7 +49,11 @@ |
504 | drizzle_row_t row; |
505 | int num_fields; |
506 | |
507 | - drizzle_st *con= drizzle_create_tcp("localhost", DRIZZLE_DEFAULT_TCP_PORT, "root", NULL, NULL, 0); |
508 | + drizzle_st *con= drizzle_create_tcp(getenv("MYSQL_SERVER"), |
509 | + getenv("MYSQL_PORT") ? atoi("MYSQL_PORT") : DRIZZLE_DEFAULT_TCP_PORT, |
510 | + getenv("MYSQL_USER"), |
511 | + getenv("MYSQL_PASSWORD"), |
512 | + getenv("MYSQL_SCHEMA"), 0); |
513 | ASSERT_NOT_NULL_(con, "Drizzle connection object creation error"); |
514 | |
515 | drizzle_return_t ret= drizzle_connect(con); |
516 | |
517 | === modified file 'tests/unit/connect.c' |
518 | --- tests/unit/connect.c 2012-12-30 02:23:50 +0000 |
519 | +++ tests/unit/connect.c 2012-12-31 00:24:23 +0000 |
520 | @@ -47,7 +47,11 @@ |
521 | (void) argc; |
522 | (void) argv; |
523 | |
524 | - drizzle_st *con= drizzle_create_tcp("localhost", DRIZZLE_DEFAULT_TCP_PORT, "root", NULL, NULL, 0); |
525 | + drizzle_st *con= drizzle_create_tcp(getenv("MYSQL_SERVER"), |
526 | + getenv("MYSQL_PORT") ? atoi("MYSQL_PORT") : DRIZZLE_DEFAULT_TCP_PORT, |
527 | + getenv("MYSQL_USER"), |
528 | + getenv("MYSQL_PASSWORD"), |
529 | + getenv("MYSQL_SCHEMA"), 0); |
530 | ASSERT_NOT_NULL_(con, "Drizzle connection object creation error"); |
531 | |
532 | drizzle_return_t ret= drizzle_connect(con); |
533 | @@ -59,6 +63,25 @@ |
534 | } |
535 | ASSERT_EQ(DRIZZLE_RETURN_OK, ret); |
536 | |
537 | + drizzle_query_str(con, "SELECT 1", &ret); |
538 | + ASSERT_EQ_(DRIZZLE_RETURN_OK, ret, "SELECT 1 (%s)", drizzle_error(con)); |
539 | + |
540 | + // Now that we know everything is good... lets push it. |
541 | + drizzle_close(con); |
542 | + |
543 | + int limit= 20; |
544 | + while (--limit) |
545 | + { |
546 | + ret= drizzle_connect(con); |
547 | + ASSERT_EQ_(DRIZZLE_RETURN_OK, ret, "%s(%s)", drizzle_error(con), drizzle_strerror(ret)); |
548 | + |
549 | + drizzle_query_str(con, "SELECT 1", &ret); |
550 | + ASSERT_EQ_(DRIZZLE_RETURN_OK, ret, "SELECT 1 (%s)", drizzle_error(con)); |
551 | + |
552 | + // Now that we know everything is good... lets push it. |
553 | + drizzle_close(con); |
554 | + } |
555 | + |
556 | ret= drizzle_quit(con); |
557 | ASSERT_EQ_(DRIZZLE_RETURN_OK, ret, "%s", drizzle_strerror(ret)); |
558 | |
559 | |
560 | === modified file 'tests/unit/insert_id.c' |
561 | --- tests/unit/insert_id.c 2012-12-30 02:23:50 +0000 |
562 | +++ tests/unit/insert_id.c 2012-12-31 00:24:23 +0000 |
563 | @@ -48,7 +48,11 @@ |
564 | (void) argc; |
565 | (void) argv; |
566 | |
567 | - drizzle_st *con= drizzle_create_tcp("localhost", DRIZZLE_DEFAULT_TCP_PORT, "root", NULL, NULL, 0); |
568 | + drizzle_st *con= drizzle_create_tcp(getenv("MYSQL_SERVER"), |
569 | + getenv("MYSQL_PORT") ? atoi("MYSQL_PORT") : DRIZZLE_DEFAULT_TCP_PORT, |
570 | + getenv("MYSQL_USER"), |
571 | + getenv("MYSQL_PASSWORD"), |
572 | + getenv("MYSQL_SCHEMA"), 0); |
573 | ASSERT_NOT_NULL_(con, "Drizzle connection object creation error"); |
574 | |
575 | drizzle_return_t ret= drizzle_connect(con); |
576 | |
577 | === modified file 'tests/unit/query.c' |
578 | --- tests/unit/query.c 2012-12-30 02:23:50 +0000 |
579 | +++ tests/unit/query.c 2012-12-31 00:24:23 +0000 |
580 | @@ -49,7 +49,11 @@ |
581 | drizzle_row_t row; |
582 | int num_fields; |
583 | |
584 | - drizzle_st *con= drizzle_create_tcp("localhost", DRIZZLE_DEFAULT_TCP_PORT, "root", NULL, NULL, 0); |
585 | + drizzle_st *con= drizzle_create_tcp(getenv("MYSQL_SERVER"), |
586 | + getenv("MYSQL_PORT") ? atoi("MYSQL_PORT") : DRIZZLE_DEFAULT_TCP_PORT, |
587 | + getenv("MYSQL_USER"), |
588 | + getenv("MYSQL_PASSWORD"), |
589 | + getenv("MYSQL_SCHEMA"), 0); |
590 | ASSERT_NOT_NULL_(con, "Drizzle connection object creation error"); |
591 | |
592 | drizzle_return_t ret= drizzle_connect(con); |
593 | |
594 | === modified file 'tests/unit/row.c' |
595 | --- tests/unit/row.c 2012-12-30 02:23:50 +0000 |
596 | +++ tests/unit/row.c 2012-12-31 00:24:23 +0000 |
597 | @@ -49,7 +49,11 @@ |
598 | drizzle_row_t row; |
599 | int num_fields; |
600 | |
601 | - drizzle_st *con= drizzle_create_tcp("localhost", DRIZZLE_DEFAULT_TCP_PORT, "root", NULL, NULL, 0); |
602 | + drizzle_st *con= drizzle_create_tcp(getenv("MYSQL_SERVER"), |
603 | + getenv("MYSQL_PORT") ? atoi("MYSQL_PORT") : DRIZZLE_DEFAULT_TCP_PORT, |
604 | + getenv("MYSQL_USER"), |
605 | + getenv("MYSQL_PASSWORD"), |
606 | + getenv("MYSQL_SCHEMA"), 0); |
607 | ASSERT_NOT_NULL_(con, "Drizzle connection object creation error"); |
608 | |
609 | drizzle_return_t ret= drizzle_connect(con); |
610 | |
611 | === modified file 'tests/unit/statement.c' |
612 | --- tests/unit/statement.c 2012-12-30 02:23:50 +0000 |
613 | +++ tests/unit/statement.c 2012-12-31 00:24:23 +0000 |
614 | @@ -51,7 +51,11 @@ |
615 | (void) argv; |
616 | drizzle_stmt_st *stmt; |
617 | |
618 | - drizzle_st *con= drizzle_create_tcp("localhost", DRIZZLE_DEFAULT_TCP_PORT, "root", NULL, NULL, 0); |
619 | + drizzle_st *con= drizzle_create_tcp(getenv("MYSQL_SERVER"), |
620 | + getenv("MYSQL_PORT") ? atoi("MYSQL_PORT") : DRIZZLE_DEFAULT_TCP_PORT, |
621 | + getenv("MYSQL_USER"), |
622 | + getenv("MYSQL_PASSWORD"), |
623 | + getenv("MYSQL_SCHEMA"), 0); |
624 | ASSERT_NOT_NULL_(con, "Drizzle connection object creation error"); |
625 | |
626 | drizzle_return_t ret= drizzle_connect(con); |
627 | |
628 | === modified file 'tests/unit/unbuffered_query.c' |
629 | --- tests/unit/unbuffered_query.c 2012-12-30 02:23:50 +0000 |
630 | +++ tests/unit/unbuffered_query.c 2012-12-31 00:24:23 +0000 |
631 | @@ -49,7 +49,11 @@ |
632 | drizzle_row_t row; |
633 | int num_fields; |
634 | |
635 | - drizzle_st *con= drizzle_create_tcp("localhost", DRIZZLE_DEFAULT_TCP_PORT, "root", NULL, NULL, 0); |
636 | + drizzle_st *con= drizzle_create_tcp(getenv("MYSQL_SERVER"), |
637 | + getenv("MYSQL_PORT") ? atoi("MYSQL_PORT") : DRIZZLE_DEFAULT_TCP_PORT, |
638 | + getenv("MYSQL_USER"), |
639 | + getenv("MYSQL_PASSWORD"), |
640 | + getenv("MYSQL_SCHEMA"), 0); |
641 | ASSERT_NOT_NULL_(con, "Drizzle connection object creation error"); |
642 | |
643 | drizzle_return_t ret= drizzle_connect(con); |
https:/ /jenkins. drizzle. org/job/ libdrizzle- build-matrix/ label=fedora- 17/22/console
root with nopass has access denied which is causing test failures