Merge lp:~brianaker/drizzle/982799 into lp:drizzle/7.1

Proposed by Brian Aker
Status: Merged
Approved by: Brian Aker
Approved revision: 2537
Merged at revision: 2539
Proposed branch: lp:~brianaker/drizzle/982799
Merge into: lp:drizzle/7.1
Diff against target: 280 lines (+113/-33)
11 files modified
Makefile.am (+1/-0)
configure.ac (+2/-20)
drizzled/drizzled.cc (+31/-7)
libdrizzle-1.0/drizzle_client.h (+1/-0)
libdrizzle-1.0/include.am (+1/-0)
libdrizzle-1.0/version.h.in (+41/-0)
libdrizzle/drizzle.cc (+1/-1)
m4/libdrizzle_version.m4 (+30/-0)
support-files/drizzle.pc.in (+1/-1)
support-files/libdrizzle-1.0.pc.in (+2/-2)
support-files/libdrizzle.pc.in (+2/-2)
To merge this branch: bzr merge lp:~brianaker/drizzle/982799
Reviewer Review Type Date Requested Status
Drizzle Trunk Pending
Review via email: mp+102060@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Makefile.am'
2--- Makefile.am 2012-02-08 21:33:04 +0000
3+++ Makefile.am 2012-04-16 07:33:21 +0000
4@@ -162,6 +162,7 @@
5 fi
6
7 clean-local:
8+ rm libdrizzle-1.0/version.h
9 find . -name '*.gcno' | xargs rm -f
10 -rm -rf docs/api docs/dev docs/_build docs/doctrees
11 rm -Rf $(SPHINX_BUILDDIR)/html $(SPHINX_BUILDDIR)/dirhtml $(SPHINX_BUILDDIR)/singlehtml \
12
13=== modified file 'configure.ac'
14--- configure.ac 2012-02-17 20:27:53 +0000
15+++ configure.ac 2012-04-16 07:33:21 +0000
16@@ -26,26 +26,7 @@
17
18 PANDORA_CANONICAL_TARGET(less-warnings, require-cxx, force-gcc42, version-from-vc)
19
20-LIBDRIZZLE_LIBRARY_VERSION=4:0:0
21-# | | |
22-# +------+ | +---+
23-# | | |
24-# current:revision:age
25-# | | |
26-# | | +- increment if interfaces have been added
27-# | | set to zero if interfaces have been
28-# | | removed or changed
29-# | +- increment if source code has changed
30-# | set to zero if current is incremented
31-# +- increment if interfaces have been added, removed or
32-# changed
33-AC_SUBST(LIBDRIZZLE_LIBRARY_VERSION)
34-
35-# libdrizzle versioning when linked with GNU ld.
36-AS_IF([test "$lt_cv_prog_gnu_ld" = "yes"],[
37- LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_srcdir)/config/drizzle.ver"
38- ])
39-AC_SUBST(LD_VERSION_SCRIPT)
40+m4_include([m4/libdrizzle_version.m4])
41
42 dnl Set the default datadir location to /usr/local/var/drizzle. If a
43 dnl localstatedir is explicitly given, just use that.
44@@ -154,6 +135,7 @@
45 AC_CONFIG_FILES(Makefile dnl
46 tests/Makefile dnl
47 drizzled/plugin/version.h dnl
48+ libdrizzle-1.0/version.h dnl
49 support-files/drizzle.spec dnl
50 support-files/drizzle.pc dnl
51 support-files/libdrizzle.pc dnl
52
53=== modified file 'drizzled/drizzled.cc'
54--- drizzled/drizzled.cc 2012-03-20 15:48:48 +0000
55+++ drizzled/drizzled.cc 2012-04-16 07:33:21 +0000
56@@ -389,6 +389,25 @@
57 PANDORA_RELEASE_VERSION, HOST_VENDOR, HOST_OS, HOST_CPU, COMPILATION_COMMENT);
58 }
59
60+extern "C" {
61+
62+ char at_exit_pid_file[1024 * 4]= { 0 };
63+
64+ static void remove_pidfile(void)
65+ {
66+ if (at_exit_pid_file[0])
67+ {
68+ if (unlink(at_exit_pid_file) == -1)
69+ {
70+ std::cerr << "Could not remove pidfile: " << at_exit_pid_file << "(" << strerror(errno) << ")" << std::endl;
71+ }
72+
73+ at_exit_pid_file[0]= 0;
74+ }
75+ }
76+
77+}
78+
79 /**
80 Create file to store pid number.
81 */
82@@ -405,6 +424,8 @@
83 {
84 if (close(file) != -1)
85 {
86+ snprintf(at_exit_pid_file, sizeof(at_exit_pid_file), "%s", pid_file.file_string().c_str());
87+ atexit(remove_pidfile);
88 return;
89 }
90 }
91@@ -535,8 +556,6 @@
92 google::protobuf::ShutdownProtobufLibrary();
93 #endif
94
95- (void) unlink(pid_file.file_string().c_str()); // This may not always exist
96-
97 if (print_message && server_start_time)
98 {
99 errmsg_printf(drizzled::error::INFO, _(ER(ER_SHUTDOWN_COMPLETE)),internal::my_progname);
100@@ -2179,13 +2198,18 @@
101 }
102
103 {
104- fs::path pid_file_path(pid_file);
105- if (pid_file_path.root_path().string() == "")
106+ if (pid_file.string().size() and pid_file.string()[0] == '/')
107+ { } // Do nothing if the file starts with a slash
108+ else
109 {
110- pid_file_path= getDataHome();
111- pid_file_path /= pid_file;
112+ fs::path pid_file_path(pid_file);
113+ if (pid_file_path.root_path().string() == "")
114+ {
115+ pid_file_path= getDataHome();
116+ pid_file_path /= pid_file;
117+ }
118+ pid_file= fs::system_complete(pid_file_path);
119 }
120- pid_file= fs::system_complete(pid_file_path);
121 }
122
123 const char *tmp_string= getenv("TMPDIR");
124
125=== modified file 'libdrizzle-1.0/drizzle_client.h'
126--- libdrizzle-1.0/drizzle_client.h 2012-01-05 06:31:25 +0000
127+++ libdrizzle-1.0/drizzle_client.h 2012-04-16 07:33:21 +0000
128@@ -42,6 +42,7 @@
129
130 #pragma once
131
132+#include <libdrizzle-1.0/version.h>
133 #include <libdrizzle-1.0/drizzle.h>
134 #include <libdrizzle-1.0/conn_client.h>
135 #include <libdrizzle-1.0/handshake_client.h>
136
137=== modified file 'libdrizzle-1.0/include.am'
138--- libdrizzle-1.0/include.am 2012-02-17 20:27:53 +0000
139+++ libdrizzle-1.0/include.am 2012-04-16 07:33:21 +0000
140@@ -64,6 +64,7 @@
141 libdrizzle/sha1.cc \
142 libdrizzle/state.cc
143
144+nobase_include_HEADERS+= libdrizzle-1.0/version.h
145 nobase_include_HEADERS+= \
146 libdrizzle-1.0/column.h \
147 libdrizzle-1.0/column_client.h \
148
149=== added file 'libdrizzle-1.0/version.h.in'
150--- libdrizzle-1.0/version.h.in 1970-01-01 00:00:00 +0000
151+++ libdrizzle-1.0/version.h.in 2012-04-16 07:33:21 +0000
152@@ -0,0 +1,41 @@
153+/*
154+ * Drizzle Client & Protocol Library
155+ *
156+ * Copyright (C) 2012 Drizzle Project
157+ * All rights reserved.
158+ *
159+ * Redistribution and use in source and binary forms, with or without
160+ * modification, are permitted provided that the following conditions are
161+ * met:
162+ *
163+ * * Redistributions of source code must retain the above copyright
164+ * notice, this list of conditions and the following disclaimer.
165+ *
166+ * * Redistributions in binary form must reproduce the above
167+ * copyright notice, this list of conditions and the following disclaimer
168+ * in the documentation and/or other materials provided with the
169+ * distribution.
170+ *
171+ * * The names of its contributors may not be used to endorse or
172+ * promote products derived from this software without specific prior
173+ * written permission.
174+ *
175+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
176+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
177+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
178+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
179+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
180+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
181+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
182+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
183+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
184+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
185+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
186+ *
187+ */
188+
189+
190+#pragma once
191+
192+#define LIBDRIZZLE_VERSION_STRING "@LIBDRIZZLE_VERSION@"
193+#define LIBDRIZZLE_VERSION_HEX @LIBDRIZZLE_HEX_VERSION@
194
195=== modified file 'libdrizzle/drizzle.cc'
196--- libdrizzle/drizzle.cc 2012-01-30 05:36:54 +0000
197+++ libdrizzle/drizzle.cc 2012-04-16 07:33:21 +0000
198@@ -69,7 +69,7 @@
199
200 const char *drizzle_version(void)
201 {
202- return PACKAGE_VERSION;
203+ return LIBDRIZZLE_VERSION_STRING;
204 }
205
206 const char *drizzle_bugreport(void)
207
208=== added file 'm4/libdrizzle_version.m4'
209--- m4/libdrizzle_version.m4 1970-01-01 00:00:00 +0000
210+++ m4/libdrizzle_version.m4 2012-04-16 07:33:21 +0000
211@@ -0,0 +1,30 @@
212+#
213+# Version information for libdrizzle
214+#
215+#
216+LIBDRIZZLE_VERSION=1.0.1
217+LIBDRIZZLE_LIBRARY_VERSION=4:0:0
218+# | | |
219+# +------+ | +---+
220+# | | |
221+# current:revision:age
222+# | | |
223+# | | +- increment if interfaces have been added
224+# | | set to zero if interfaces have been
225+# | | removed or changed
226+# | +- increment if source code has changed
227+# | set to zero if current is incremented
228+# +- increment if interfaces have been added, removed or
229+# changed
230+AC_SUBST(LIBDRIZZLE_LIBRARY_VERSION)
231+AC_SUBST(LIBDRIZZLE_VERSION)
232+AC_DEFINE_UNQUOTED([LIBDRIZZLE_VERSION],[$LIBDRIZZLE_VERSION], [libdrizzle version])
233+
234+# libdrizzle versioning when linked with GNU ld.
235+AS_IF([test "$lt_cv_prog_gnu_ld" = "yes"],[
236+ LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_srcdir)/config/drizzle.ver"
237+ ])
238+AC_SUBST(LD_VERSION_SCRIPT)
239+
240+LIBDRIZZLE_HEX_VERSION=`echo $LIBDRIZZLE_VERSION | sed 's|[\-a-z0-9]*$||' | awk -F. '{printf "0x%0.2d%0.3d%0.3d", $[]1, $[]2, $[]3}'`
241+AC_SUBST([LIBDRIZZLE_HEX_VERSION])
242
243=== modified file 'support-files/drizzle.pc.in'
244--- support-files/drizzle.pc.in 2012-02-08 22:20:27 +0000
245+++ support-files/drizzle.pc.in 2012-04-16 07:33:21 +0000
246@@ -7,5 +7,5 @@
247 Description: Drizzle CLI
248 Version: @VERSION@
249 URL: http://drizzle.org/
250-Cflags: -I${pkgincludedir}
251+Cflags:
252
253
254=== modified file 'support-files/libdrizzle-1.0.pc.in'
255--- support-files/libdrizzle-1.0.pc.in 2011-11-07 15:04:16 +0000
256+++ support-files/libdrizzle-1.0.pc.in 2012-04-16 07:33:21 +0000
257@@ -5,7 +5,7 @@
258
259 Name: libdrizzle-1.0
260 Description: Drizzle Protocol Library
261-Version: @PANDORA_RELEASE_VERSION@
262+Version: @LIBDRIZZLE_VERSION@
263 Libs: -L${libdir} -ldrizzle
264 URL: http://drizzle.org/
265-Cflags: -I$@includedir@/libdrizzle-1.0
266+Cflags: -I${includedir}
267
268=== modified file 'support-files/libdrizzle.pc.in'
269--- support-files/libdrizzle.pc.in 2011-11-07 15:04:16 +0000
270+++ support-files/libdrizzle.pc.in 2012-04-16 07:33:21 +0000
271@@ -5,7 +5,7 @@
272
273 Name: libdrizzle
274 Description: Drizzle Protocol Library
275-Version: @PANDORA_RELEASE_VERSION@
276+Version: @LIBDRIZZLE_VERSION@
277 Libs: -L${libdir} -ldrizzle
278 URL: http://drizzle.org/
279-Cflags: -I$@includedir@
280+Cflags: -I${includedir}

Subscribers

People subscribed via source and target branches

to all changes: