Merge lp:~brianaker/drizzle/1st-catalog-patch into lp:drizzle
- 1st-catalog-patch
- Merge into 7.2
Proposed by
Brian Aker
Status: | Merged |
---|---|
Approved by: | Brian Aker |
Approved revision: | 2547 |
Merged at revision: | 2547 |
Proposed branch: | lp:~brianaker/drizzle/1st-catalog-patch |
Merge into: | lp:drizzle |
Diff against target: |
718 lines (+192/-134) 25 files modified
client/conclusions.h (+1/-1) client/drizzledump.cc (+1/-1) client/drizzledump_data.h (+2/-2) client/drizzledump_drizzle.cc (+1/-1) client/drizzledump_mysql.cc (+3/-3) client/drizzleimport.cc (+1/-1) client/include.am (+101/-73) client/option_string.h (+1/-1) client/server_detect.cc (+1/-1) client/statement.h (+1/-1) client/stats.h (+1/-1) client/thread_context.h (+2/-2) drizzled/identifier/catalog.cc (+1/-1) drizzled/identifier/constants/schema.cc (+4/-11) drizzled/identifier/schema.cc (+2/-0) drizzled/identifier/table.cc (+3/-1) drizzled/include.am (+4/-4) drizzled/main.cc (+0/-5) plugin/innobase/dict/dict0dict.cc (+13/-2) plugin/innobase/handler/ha_innodb.cc (+25/-0) plugin/innobase/plugin.am (+1/-0) plugin/innobase/tests/r/innodb-system-table-view.result (+9/-9) plugin/tableprototester/tableprototester.cc (+8/-8) tests/r/broken_table_proto_file.result (+1/-1) unittests/include.am (+5/-4) |
To merge this branch: | bzr merge lp:~brianaker/drizzle/1st-catalog-patch |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Drizzle Trunk | Pending | ||
Review via email: mp+102998@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
- 2548. By Brian Aker
-
Unittests (never worked, you can't load the server as a library).
- 2549. By Brian Aker
-
Fix for Ubuntu.
- 2550. By Brian Aker
-
Update dependencies.
- 2551. By Brian Aker
-
Make -j compile issues.
- 2552. By Brian Aker
-
Update to add in dependency for unittest
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'client/conclusions.h' |
2 | --- client/conclusions.h 2011-07-25 04:35:53 +0000 |
3 | +++ client/conclusions.h 2012-04-23 09:03:20 +0000 |
4 | @@ -21,7 +21,7 @@ |
5 | |
6 | #pragma once |
7 | |
8 | -#include "client_priv.h" |
9 | +#include "client/client_priv.h" |
10 | #include <string> |
11 | #include <iosfwd> |
12 | |
13 | |
14 | === modified file 'client/drizzledump.cc' |
15 | --- client/drizzledump.cc 2012-03-08 00:54:48 +0000 |
16 | +++ client/drizzledump.cc 2012-04-23 09:03:20 +0000 |
17 | @@ -31,7 +31,7 @@ |
18 | * and all the MySQL developers over the years. |
19 | */ |
20 | |
21 | -#include "client_priv.h" |
22 | +#include "client/client_priv.h" |
23 | #include <string> |
24 | #include <iostream> |
25 | #include <stdarg.h> |
26 | |
27 | === modified file 'client/drizzledump_data.h' |
28 | --- client/drizzledump_data.h 2011-11-26 23:14:59 +0000 |
29 | +++ client/drizzledump_data.h 2012-04-23 09:03:20 +0000 |
30 | @@ -20,8 +20,8 @@ |
31 | #pragma once |
32 | |
33 | #define DRIZZLE_MAX_LINE_LENGTH 1024*1024L-1025 |
34 | -#include "client_priv.h" |
35 | -#include "server_detect.h" |
36 | +#include "client/client_priv.h" |
37 | +#include "client/server_detect.h" |
38 | #include <cstdio> |
39 | #include <string> |
40 | #include <iosfwd> |
41 | |
42 | === modified file 'client/drizzledump_drizzle.cc' |
43 | --- client/drizzledump_drizzle.cc 2011-08-08 09:51:16 +0000 |
44 | +++ client/drizzledump_drizzle.cc 2012-04-23 09:03:20 +0000 |
45 | @@ -19,7 +19,7 @@ |
46 | |
47 | #include "drizzledump_data.h" |
48 | #include "drizzledump_drizzle.h" |
49 | -#include "client_priv.h" |
50 | +#include "client/client_priv.h" |
51 | #include <string> |
52 | #include <iostream> |
53 | #include <drizzled/gettext.h> |
54 | |
55 | === modified file 'client/drizzledump_mysql.cc' |
56 | --- client/drizzledump_mysql.cc 2011-08-08 09:51:16 +0000 |
57 | +++ client/drizzledump_mysql.cc 2012-04-23 09:03:20 +0000 |
58 | @@ -17,9 +17,9 @@ |
59 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
60 | */ |
61 | |
62 | -#include "drizzledump_data.h" |
63 | -#include "drizzledump_mysql.h" |
64 | -#include "client_priv.h" |
65 | +#include "client/drizzledump_data.h" |
66 | +#include "client/drizzledump_mysql.h" |
67 | +#include "client/client_priv.h" |
68 | #include <string> |
69 | #include <iostream> |
70 | #include <boost/regex.hpp> |
71 | |
72 | === modified file 'client/drizzleimport.cc' |
73 | --- client/drizzleimport.cc 2011-11-26 23:14:59 +0000 |
74 | +++ client/drizzleimport.cc 2012-04-23 09:03:20 +0000 |
75 | @@ -19,7 +19,7 @@ |
76 | |
77 | #define IMPORT_VERSION "4.0" |
78 | |
79 | -#include "client_priv.h" |
80 | +#include "client/client_priv.h" |
81 | #include <string> |
82 | #include <sstream> |
83 | #include <iostream> |
84 | |
85 | === modified file 'client/include.am' |
86 | --- client/include.am 2012-01-13 07:43:22 +0000 |
87 | +++ client/include.am 2012-04-23 09:03:20 +0000 |
88 | @@ -17,79 +17,107 @@ |
89 | # along with this program; if not, write to the Free Software |
90 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
91 | |
92 | -CLIENT2_LDADD= \ |
93 | - drizzled/internal/libinternal.la \ |
94 | - libdrizzle-2.0/libdrizzle-2.0.la \ |
95 | - $(LIBINTL) \ |
96 | - $(LIBZ) \ |
97 | - client/libgetpassword.la |
98 | - |
99 | -noinst_LTLIBRARIES+= \ |
100 | - client/libgetpassword.la |
101 | - |
102 | -noinst_PROGRAMS+= \ |
103 | - client/drizzletest |
104 | - |
105 | -bin_PROGRAMS+= \ |
106 | - client/drizzle \ |
107 | - client/drizzledump \ |
108 | - client/drizzleimport \ |
109 | - client/drizzleslap \ |
110 | - client/drizzle_password_hash |
111 | - |
112 | -man_MANS+= \ |
113 | - client/drizzle.1 \ |
114 | - client/drizzled.8 \ |
115 | - client/drizzleimport.1 \ |
116 | - client/drizzleslap.1 |
117 | +CLIENT2_LDADD= |
118 | +CLIENT2_LDADD+= drizzled/internal/libinternal.la |
119 | +CLIENT2_LDADD+= libdrizzle-2.0/libdrizzle-2.0.la |
120 | +CLIENT2_LDADD+= $(LIBINTL) |
121 | +CLIENT2_LDADD+= $(LIBZ) |
122 | +CLIENT2_LDADD+= client/libgetpassword.la |
123 | + |
124 | +noinst_LTLIBRARIES+= client/libgetpassword.la |
125 | + |
126 | +noinst_PROGRAMS+= client/drizzletest |
127 | + |
128 | +bin_PROGRAMS+= client/drizzle |
129 | +bin_PROGRAMS+= client/drizzledump |
130 | +bin_PROGRAMS+= client/drizzleimport |
131 | +bin_PROGRAMS+= client/drizzleslap |
132 | +bin_PROGRAMS+= client/drizzle_password_hash |
133 | + |
134 | +man_MANS+= client/drizzle.1 |
135 | +man_MANS+= client/drizzled.8 |
136 | +man_MANS+= client/drizzleimport.1 |
137 | +man_MANS+= client/drizzleslap.1 |
138 | |
139 | client_libgetpassword_la_SOURCES= client/get_password.cc |
140 | |
141 | -noinst_HEADERS+= \ |
142 | - client/client_priv.h \ |
143 | - client/get_password.h \ |
144 | - client/linebuffer.h \ |
145 | - client/conclusions.h \ |
146 | - client/drizzledump_data.h \ |
147 | - client/drizzledump_drizzle.h \ |
148 | - client/drizzledump_mysql.h \ |
149 | - client/option_string.h \ |
150 | - client/server_detect.h \ |
151 | - client/statement.h \ |
152 | - client/stats.h \ |
153 | - client/thread_context.h \ |
154 | - client/user_detect.h \ |
155 | - client/wakeup.h |
156 | - |
157 | -client_drizzle_SOURCES= \ |
158 | - client/drizzle.cc \ |
159 | - client/linebuffer.cc \ |
160 | - client/server_detect.cc |
161 | -client_drizzle_LDADD= ${READLINE_LIBS} ${BOOST_LIBS} \ |
162 | - libdrizzle-2.0/libdrizzle-2.0.la \ |
163 | - $(LIBINTL) \ |
164 | - $(LIBZ) \ |
165 | - client/libgetpassword.la |
166 | - |
167 | -client_drizzledump_SOURCES= \ |
168 | - client/drizzledump.cc \ |
169 | - client/drizzledump_data.cc \ |
170 | - client/drizzledump_drizzle.cc \ |
171 | - client/drizzledump_mysql.cc \ |
172 | - client/server_detect.cc |
173 | - |
174 | -client_drizzledump_LDADD= ${CLIENT2_LDADD} ${BOOST_LIBS} |
175 | - |
176 | -client_drizzleimport_SOURCES= client/drizzleimport.cc |
177 | -client_drizzleimport_LDADD= ${CLIENT2_LDADD} ${BOOST_LIBS} |
178 | - |
179 | -client_drizzleslap_SOURCES= client/drizzleslap.cc |
180 | -client_drizzleslap_LDADD= ${CLIENT2_LDADD} ${BOOST_LIBS} |
181 | -client_drizzleslap_CXXFLAGS= ${AM_CXXFLAGS} ${BOOSTSKIP_WARNINGS} |
182 | - |
183 | -client_drizzletest_SOURCES= client/drizzletest.cc |
184 | -client_drizzletest_LDADD= ${CLIENT2_LDADD} ${BOOST_LIBS} ${LIBPCRE} |
185 | - |
186 | - |
187 | -client_drizzle_password_hash_SOURCES= client/drizzle_password_hash.cc |
188 | -client_drizzle_password_hash_LDADD= libdrizzle-2.0/libdrizzle-2.0.la |
189 | +noinst_HEADERS+= client/client_priv.h |
190 | +noinst_HEADERS+= client/get_password.h |
191 | +noinst_HEADERS+= client/linebuffer.h |
192 | +noinst_HEADERS+= client/conclusions.h |
193 | +noinst_HEADERS+= client/drizzledump_data.h |
194 | +noinst_HEADERS+= client/drizzledump_drizzle.h |
195 | +noinst_HEADERS+= client/drizzledump_mysql.h |
196 | +noinst_HEADERS+= client/option_string.h |
197 | +noinst_HEADERS+= client/server_detect.h |
198 | +noinst_HEADERS+= client/statement.h |
199 | +noinst_HEADERS+= client/stats.h |
200 | +noinst_HEADERS+= client/thread_context.h |
201 | +noinst_HEADERS+= client/user_detect.h |
202 | +noinst_HEADERS+= client/wakeup.h |
203 | + |
204 | +client_drizzle_SOURCES= |
205 | +client_drizzle_SOURCES+= client/drizzle.cc |
206 | +client_drizzle_SOURCES+= client/linebuffer.cc |
207 | +client_drizzle_SOURCES+= client/server_detect.cc |
208 | + |
209 | +client_drizzle_LDADD= |
210 | +client_drizzle_LDADD+= ${READLINE_LIBS} |
211 | +client_drizzle_LDADD+= ${BOOST_LIBS} |
212 | +client_drizzle_LDADD+= libdrizzle-2.0/libdrizzle-2.0.la |
213 | +client_drizzle_LDADD+= $(LIBINTL) |
214 | +client_drizzle_LDADD+= $(LIBZ) |
215 | +client_drizzle_LDADD+= client/libgetpassword.la |
216 | + |
217 | +client_drizzledump_DEPENDENCIES= |
218 | +client_drizzledump_SOURCES= |
219 | +client_drizzledump_LDADD= |
220 | + |
221 | +client_drizzledump_DEPENDENCIES+= plugin/libmyisam_plugin.la |
222 | +client_drizzledump_SOURCES+= client/drizzledump.cc |
223 | +client_drizzledump_SOURCES+= client/drizzledump_data.cc |
224 | +client_drizzledump_SOURCES+= client/drizzledump_drizzle.cc |
225 | +client_drizzledump_SOURCES+= client/drizzledump_mysql.cc |
226 | +client_drizzledump_SOURCES+= client/server_detect.cc |
227 | +client_drizzledump_LDADD+= ${CLIENT2_LDADD} |
228 | +client_drizzledump_LDADD+= ${BOOST_LIBS} |
229 | + |
230 | +client_drizzleimport_DEPENDENCIES= |
231 | +client_drizzleimport_SOURCES= |
232 | +client_drizzleimport_LDADD= |
233 | + |
234 | +client_drizzleimport_DEPENDENCIES+= plugin/libmyisam_plugin.la |
235 | +client_drizzleimport_SOURCES+= client/drizzleimport.cc |
236 | +client_drizzleimport_LDADD+= ${CLIENT2_LDADD} |
237 | +client_drizzleimport_LDADD+= ${BOOST_LIBS} |
238 | + |
239 | +client_drizzleslap_DEPENDENCIES= |
240 | +client_drizzleslap_LDADD= |
241 | +client_drizzleslap_SOURCES= |
242 | +client_drizzleslap_CXXFLAGS= |
243 | + |
244 | +client_drizzleslap_DEPENDENCIES+= plugin/libmyisam_plugin.la |
245 | +client_drizzleslap_SOURCES+= client/drizzleslap.cc |
246 | +client_drizzleslap_LDADD+= ${CLIENT2_LDADD} |
247 | +client_drizzleslap_LDADD+= ${BOOST_LIBS} |
248 | +client_drizzleslap_CXXFLAGS+= ${AM_CXXFLAGS} |
249 | +client_drizzleslap_CXXFLAGS+= ${BOOSTSKIP_WARNINGS} |
250 | + |
251 | +client_drizzletest_DEPENDENCIES= |
252 | +client_drizzletest_SOURCES= |
253 | +client_drizzletest_LDADD= |
254 | + |
255 | +client_drizzletest_DEPENDENCIES+= plugin/libmyisam_plugin.la |
256 | +client_drizzletest_SOURCES+= client/drizzletest.cc |
257 | +client_drizzletest_LDADD+=${CLIENT2_LDADD} |
258 | +client_drizzletest_LDADD+=${BOOST_LIBS} ${LIBPCRE} |
259 | + |
260 | + |
261 | +client_drizzle_password_hash_DEPENDENCIES= |
262 | +client_drizzle_password_hash_LDADD= |
263 | +client_drizzle_password_hash_SOURCES= |
264 | + |
265 | +client_drizzle_password_hash_DEPENDENCIES+= plugin/libmyisam_plugin.la |
266 | +client_drizzle_password_hash_LDADD+= libdrizzle-2.0/libdrizzle-2.0.la |
267 | +client_drizzle_password_hash_LDADD+= libdrizzle-2.0/libdrizzle-2.0.la |
268 | +client_drizzle_password_hash_SOURCES+= client/drizzle_password_hash.cc |
269 | |
270 | === modified file 'client/option_string.h' |
271 | --- client/option_string.h 2011-07-25 04:35:53 +0000 |
272 | +++ client/option_string.h 2012-04-23 09:03:20 +0000 |
273 | @@ -21,7 +21,7 @@ |
274 | |
275 | #pragma once |
276 | |
277 | -#include "client_priv.h" |
278 | +#include "client/client_priv.h" |
279 | #include <iosfwd> |
280 | #include <string> |
281 | #include <cstdlib> |
282 | |
283 | === modified file 'client/server_detect.cc' |
284 | --- client/server_detect.cc 2012-02-06 22:25:01 +0000 |
285 | +++ client/server_detect.cc 2012-04-23 09:03:20 +0000 |
286 | @@ -18,7 +18,7 @@ |
287 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
288 | */ |
289 | |
290 | -#include "client_priv.h" |
291 | +#include "client/client_priv.h" |
292 | |
293 | #include <boost/regex.hpp> |
294 | #include <iostream> |
295 | |
296 | === modified file 'client/statement.h' |
297 | --- client/statement.h 2011-07-25 04:35:53 +0000 |
298 | +++ client/statement.h 2012-04-23 09:03:20 +0000 |
299 | @@ -21,7 +21,7 @@ |
300 | |
301 | #pragma once |
302 | |
303 | -#include "client_priv.h" |
304 | +#include "client/client_priv.h" |
305 | #include <string> |
306 | #include <iosfwd> |
307 | #include <cstdlib> |
308 | |
309 | === modified file 'client/stats.h' |
310 | --- client/stats.h 2011-07-25 04:35:53 +0000 |
311 | +++ client/stats.h 2012-04-23 09:03:20 +0000 |
312 | @@ -21,7 +21,7 @@ |
313 | |
314 | #pragma once |
315 | |
316 | -#include "client_priv.h" |
317 | +#include "client/client_priv.h" |
318 | #include <string> |
319 | #include <iosfwd> |
320 | |
321 | |
322 | === modified file 'client/thread_context.h' |
323 | --- client/thread_context.h 2011-07-25 04:35:53 +0000 |
324 | +++ client/thread_context.h 2012-04-23 09:03:20 +0000 |
325 | @@ -21,8 +21,8 @@ |
326 | |
327 | #pragma once |
328 | |
329 | -#include "client_priv.h" |
330 | -#include "statement.h" |
331 | +#include "client/client_priv.h" |
332 | +#include "client/statement.h" |
333 | #include <string> |
334 | #include <iosfwd> |
335 | |
336 | |
337 | === modified file 'drizzled/identifier/catalog.cc' |
338 | --- drizzled/identifier/catalog.cc 2011-10-19 09:25:53 +0000 |
339 | +++ drizzled/identifier/catalog.cc 2012-04-23 09:03:20 +0000 |
340 | @@ -50,7 +50,7 @@ |
341 | void Catalog::init() |
342 | { |
343 | assert(not _name.empty()); |
344 | - path += "../"; |
345 | + path.clear(); |
346 | path += util::tablename_to_filename(_name); |
347 | assert(path.length()); // TODO throw exception, this is a possibility |
348 | hash_value= util::insensitive_hash()(path); |
349 | |
350 | === modified file 'drizzled/identifier/constants/schema.cc' |
351 | --- drizzled/identifier/constants/schema.cc 2011-10-18 13:52:19 +0000 |
352 | +++ drizzled/identifier/constants/schema.cc 2012-04-23 09:03:20 +0000 |
353 | @@ -30,14 +30,8 @@ |
354 | { |
355 | public: |
356 | Schema(const char* name) : |
357 | - identifier::Schema(str_ref(name)), |
358 | - path_(boost::to_lower_copy(getSchemaName())) |
359 | - { |
360 | - } |
361 | - |
362 | - const std::string& getPath() const |
363 | - { |
364 | - return path_; |
365 | + identifier::Schema(str_ref(name)) |
366 | + { |
367 | } |
368 | |
369 | bool isSystem() const |
370 | @@ -46,21 +40,20 @@ |
371 | } |
372 | |
373 | private: |
374 | - std::string path_; |
375 | }; |
376 | |
377 | } /* namespace constants */ |
378 | |
379 | -static constants::Schema g_dd= "DATA_DICTIONARY"; |
380 | -static constants::Schema g_is= "INFORMATION_SCHEMA"; |
381 | |
382 | const Schema& data_dictionary() |
383 | { |
384 | + static constants::Schema g_dd= "DATA_DICTIONARY"; |
385 | return g_dd; |
386 | } |
387 | |
388 | const Schema& information_schema() |
389 | { |
390 | + static constants::Schema g_is= "INFORMATION_SCHEMA"; |
391 | return g_is; |
392 | } |
393 | |
394 | |
395 | === modified file 'drizzled/identifier/schema.cc' |
396 | --- drizzled/identifier/schema.cc 2012-04-21 02:13:56 +0000 |
397 | +++ drizzled/identifier/schema.cc 2012-04-23 09:03:20 +0000 |
398 | @@ -56,6 +56,8 @@ |
399 | |
400 | if (db_arg.empty() == false) |
401 | { |
402 | + db_path += drizzled::catalog::local_identifier().getPath(); |
403 | + db_path += FN_LIBCHAR; |
404 | db_path += util::tablename_to_filename(db); |
405 | assert(db_path.length()); // TODO throw exception, this is a possibility |
406 | } |
407 | |
408 | === modified file 'drizzled/identifier/table.cc' |
409 | --- drizzled/identifier/table.cc 2012-04-21 02:13:56 +0000 |
410 | +++ drizzled/identifier/table.cc 2012-04-23 09:03:20 +0000 |
411 | @@ -33,6 +33,7 @@ |
412 | |
413 | #include <drizzled/util/string.h> |
414 | #include <drizzled/util/tablename_to_filename.h> |
415 | +#include <drizzled/catalog/local.h> |
416 | |
417 | #include <algorithm> |
418 | #include <sstream> |
419 | @@ -183,7 +184,8 @@ |
420 | |
421 | std::string Table::build_table_filename(const std::string &in_db, const std::string &in_table_name, bool is_tmp) |
422 | { |
423 | - string in_path= util::tablename_to_filename(in_db) + FN_LIBCHAR; |
424 | + string in_path= drizzled::catalog::local_identifier().getPath(); |
425 | + in_path+= FN_LIBCHAR + util::tablename_to_filename(in_db) + FN_LIBCHAR; |
426 | return in_path + (is_tmp ? in_table_name : util::tablename_to_filename(in_table_name)); |
427 | } |
428 | |
429 | |
430 | === modified file 'drizzled/include.am' |
431 | --- drizzled/include.am 2012-01-29 11:21:19 +0000 |
432 | +++ drizzled/include.am 2012-04-23 09:03:20 +0000 |
433 | @@ -176,7 +176,7 @@ |
434 | drizzled/function/str/strfunc.h \ |
435 | drizzled/function/str/trim.h \ |
436 | drizzled/function/time/curdate.h \ |
437 | - drizzled/function/time/curtime.h \ |
438 | + drizzled/function/time/curtime.h \ |
439 | drizzled/function/time/date.h \ |
440 | drizzled/function/time/date_add_interval.h \ |
441 | drizzled/function/time/date_format.h \ |
442 | @@ -198,7 +198,7 @@ |
443 | drizzled/function/time/quarter.h \ |
444 | drizzled/function/time/second.h \ |
445 | drizzled/function/time/sysdate_local.h \ |
446 | - drizzled/function/time/time.h \ |
447 | + drizzled/function/time/time.h \ |
448 | drizzled/function/time/timestamp_diff.h \ |
449 | drizzled/function/time/to_days.h \ |
450 | drizzled/function/time/typecast.h \ |
451 | @@ -651,7 +651,7 @@ |
452 | drizzled/function/str/strfunc.cc \ |
453 | drizzled/function/str/trim.cc \ |
454 | drizzled/function/time/curdate.cc \ |
455 | - drizzled/function/time/curtime.cc \ |
456 | + drizzled/function/time/curtime.cc \ |
457 | drizzled/function/time/date.cc \ |
458 | drizzled/function/time/date_add_interval.cc \ |
459 | drizzled/function/time/date_format.cc \ |
460 | @@ -673,7 +673,7 @@ |
461 | drizzled/function/time/quarter.cc \ |
462 | drizzled/function/time/second.cc \ |
463 | drizzled/function/time/sysdate_local.cc \ |
464 | - drizzled/function/time/time.cc \ |
465 | + drizzled/function/time/time.cc \ |
466 | drizzled/function/time/timestamp_diff.cc \ |
467 | drizzled/function/time/to_days.cc \ |
468 | drizzled/function/time/typecast.cc \ |
469 | |
470 | === modified file 'drizzled/main.cc' |
471 | --- drizzled/main.cc 2012-03-15 03:50:03 +0000 |
472 | +++ drizzled/main.cc 2012-04-23 09:03:20 +0000 |
473 | @@ -336,11 +336,6 @@ |
474 | } |
475 | } |
476 | |
477 | - if (chdir("local") == -1) |
478 | - { |
479 | - unireg_abort << "Local catalog does not exist, was unable to chdir() to " << getDataHome().file_string(); |
480 | - } |
481 | - |
482 | setFullDataHome(boost::filesystem::system_complete(getDataHome())); |
483 | errmsg_printf(error::INFO, "Data Home directory is : %s", getFullDataHome().native_file_string().c_str()); |
484 | } |
485 | |
486 | === modified file 'plugin/innobase/dict/dict0dict.cc' |
487 | --- plugin/innobase/dict/dict0dict.cc 2011-02-04 22:30:00 +0000 |
488 | +++ plugin/innobase/dict/dict0dict.cc 2012-04-23 09:03:20 +0000 |
489 | @@ -225,6 +225,11 @@ |
490 | const char* s = strchr(name, '/'); |
491 | ut_a(s); |
492 | |
493 | + s= strchr(s+1, '/'); |
494 | + |
495 | + if (s == NULL) |
496 | + s= strchr(name, '/'); |
497 | + |
498 | return(s + 1); |
499 | } |
500 | |
501 | @@ -239,8 +244,14 @@ |
502 | dbname '/' tablename */ |
503 | { |
504 | const char* s; |
505 | - s = strchr(name, '/'); |
506 | - ut_a(s); |
507 | + const char* catalog; |
508 | + catalog = strchr(name, '/'); |
509 | + ut_a(catalog); |
510 | + s= strchr(catalog+1, '/'); |
511 | + |
512 | + if (s == NULL) |
513 | + s = catalog; |
514 | + |
515 | return(s - name); |
516 | } |
517 | |
518 | |
519 | === modified file 'plugin/innobase/handler/ha_innodb.cc' |
520 | --- plugin/innobase/handler/ha_innodb.cc 2012-03-03 20:57:17 +0000 |
521 | +++ plugin/innobase/handler/ha_innodb.cc 2012-04-23 09:03:20 +0000 |
522 | @@ -1799,6 +1799,12 @@ |
523 | const char* bufend = buf + buflen; |
524 | |
525 | if (table_id) { |
526 | + const char* catalog_skip= (const char*) memchr(id, '/', idlen); |
527 | + if (catalog_skip) |
528 | + { |
529 | + idlen = idlen - (catalog_skip - id); |
530 | + id = catalog_skip + 1; |
531 | + } |
532 | const char* slash = (const char*) memchr(id, '/', idlen); |
533 | if (!slash) { |
534 | |
535 | @@ -3521,6 +3527,15 @@ |
536 | else |
537 | { |
538 | ib_table = dict_table_get(identifier.getKeyPath().c_str(), TRUE); |
539 | + if (ib_table == NULL |
540 | + && drizzled::identifier::Catalog(identifier.getCatalogName())==drizzled::catalog::local_identifier()) |
541 | + { |
542 | + std::string table_path_no_catalog(identifier.getKeyPath()); |
543 | + table_path_no_catalog.erase(0, drizzled::catalog::local_identifier().getPath().length()+1); |
544 | + /* We try without local/ as old InnoDB data dictionary (pre CATALOG) |
545 | + did not have local/ in data dict, just in filesystem path */ |
546 | + ib_table = dict_table_get(table_path_no_catalog.c_str(), TRUE); |
547 | + } |
548 | } |
549 | |
550 | if (NULL == ib_table) { |
551 | @@ -6668,6 +6683,16 @@ |
552 | session.getSqlCommand() |
553 | == SQLCOM_DROP_DB); |
554 | |
555 | + if (error == ENOENT |
556 | + && drizzled::identifier::Catalog(identifier.getCatalogName())==drizzled::catalog::local_identifier()) |
557 | + { |
558 | + std::string table_path_no_catalog(identifier.getKeyPath()); |
559 | + table_path_no_catalog.erase(0, drizzled::catalog::local_identifier().getPath().length()+1); |
560 | + error = row_drop_table_for_mysql(table_path_no_catalog.c_str(), trx, |
561 | + session.getSqlCommand() |
562 | + == SQLCOM_DROP_DB); |
563 | + } |
564 | + |
565 | session.setXaId(trx->id); |
566 | |
567 | /* Flush the log to reduce probability that the .frm files and |
568 | |
569 | === modified file 'plugin/innobase/plugin.am' |
570 | --- plugin/innobase/plugin.am 2011-04-06 16:21:39 +0000 |
571 | +++ plugin/innobase/plugin.am 2012-04-23 09:03:20 +0000 |
572 | @@ -226,6 +226,7 @@ |
573 | bin_PROGRAMS+= plugin/innobase/xtrabackup/drizzlebackup.innobase |
574 | endif |
575 | |
576 | +plugin_innobase_xtrabackup_drizzlebackup_innobase_DEPENDENCIES= plugin/libmyisam_plugin.la |
577 | plugin_innobase_xtrabackup_drizzlebackup_innobase_SOURCES = plugin/innobase/xtrabackup/xtrabackup.cc |
578 | plugin_innobase_xtrabackup_drizzlebackup_innobase_LDADD = \ |
579 | plugin/innobase/libinnobase.la \ |
580 | |
581 | === modified file 'plugin/innobase/tests/r/innodb-system-table-view.result' |
582 | --- plugin/innobase/tests/r/innodb-system-table-view.result 2011-04-29 18:45:16 +0000 |
583 | +++ plugin/innobase/tests/r/innodb-system-table-view.result 2012-04-23 09:03:20 +0000 |
584 | @@ -58,23 +58,23 @@ |
585 | ON DELETE CASCADE) ENGINE=INNODB; |
586 | SELECT * FROM DATA_DICTIONARY.INNODB_SYS_FOREIGN; |
587 | ID FOR_NAME REF_NAME N_COLS TYPE |
588 | -test/constraint_test test/child test/parent 1 1 |
589 | +local/test/constraint_test local/test/child local/test/parent 1 1 |
590 | SELECT * FROM DATA_DICTIONARY.INNODB_SYS_FOREIGN_COLS; |
591 | ID FOR_COL_NAME REF_COL_NAME POS |
592 | -test/constraint_test parent_id id 0 |
593 | +local/test/constraint_test parent_id id 0 |
594 | INSERT INTO parent VALUES(1); |
595 | SELECT name, num_rows, handles_opened |
596 | FROM DATA_DICTIONARY.INNODB_SYS_TABLESTATS |
597 | WHERE name LIKE "%parent"; |
598 | name num_rows handles_opened |
599 | -test/parent 1 1 |
600 | +local/test/parent 1 1 |
601 | SELECT NAME, FLAG, N_COLS, SPACE FROM DATA_DICTIONARY.INNODB_SYS_TABLES; |
602 | NAME FLAG N_COLS SPACE |
603 | SYS_FOREIGN 0 7 0 |
604 | SYS_FOREIGN_COLS 0 7 0 |
605 | SYS_REPLICATION_LOG 0 11 0 |
606 | -test/child 1 5 0 |
607 | -test/parent 1 4 0 |
608 | +local/test/child 1 5 0 |
609 | +local/test/parent 1 4 0 |
610 | SELECT name, n_fields |
611 | from DATA_DICTIONARY.INNODB_SYS_INDEXES |
612 | WHERE table_id In (SELECT table_id from |
613 | @@ -109,11 +109,11 @@ |
614 | ON DELETE CASCADE) ENGINE=INNODB; |
615 | SELECT * FROM DATA_DICTIONARY.INNODB_SYS_FOREIGN; |
616 | ID FOR_NAME REF_NAME N_COLS TYPE |
617 | -test/constraint_test test/child test/parent 2 1 |
618 | +local/test/constraint_test local/test/child local/test/parent 2 1 |
619 | SELECT * FROM DATA_DICTIONARY.INNODB_SYS_FOREIGN_COLS; |
620 | ID FOR_COL_NAME REF_COL_NAME POS |
621 | -test/constraint_test id id 0 |
622 | -test/constraint_test parent_id newid 1 |
623 | +local/test/constraint_test id id 0 |
624 | +local/test/constraint_test parent_id newid 1 |
625 | INSERT INTO parent VALUES(1, 9); |
626 | SELECT * FROM parent WHERE id IN (SELECT id FROM parent); |
627 | id newid |
628 | @@ -122,6 +122,6 @@ |
629 | FROM DATA_DICTIONARY.INNODB_SYS_TABLESTATS |
630 | WHERE name LIKE "%parent"; |
631 | name num_rows handles_opened |
632 | -test/parent 1 2 |
633 | +local/test/parent 1 2 |
634 | DROP TABLE child; |
635 | DROP TABLE parent; |
636 | |
637 | === modified file 'plugin/tableprototester/tableprototester.cc' |
638 | --- plugin/tableprototester/tableprototester.cc 2012-01-15 20:54:59 +0000 |
639 | +++ plugin/tableprototester/tableprototester.cc 2012-04-23 09:03:20 +0000 |
640 | @@ -118,11 +118,11 @@ |
641 | |
642 | bool TableProtoTesterEngine::doDoesTableExist(Session&, const drizzled::identifier::Table &identifier) |
643 | { |
644 | - if (not identifier.getPath().compare("test/t1")) |
645 | - return true; |
646 | - if (not identifier.getPath().compare("test/too_many_enum_values")) |
647 | - return true; |
648 | - if (not identifier.getPath().compare("test/invalid_table_collation")) |
649 | + if (not identifier.getPath().compare("local/test/t1")) |
650 | + return true; |
651 | + if (not identifier.getPath().compare("local/test/too_many_enum_values")) |
652 | + return true; |
653 | + if (not identifier.getPath().compare("local/test/invalid_table_collation")) |
654 | return true; |
655 | |
656 | return false; |
657 | @@ -239,17 +239,17 @@ |
658 | const drizzled::identifier::Table &identifier, |
659 | drizzled::message::Table &table_proto) |
660 | { |
661 | - if (not identifier.getPath().compare("test/t1")) |
662 | + if (not identifier.getPath().compare("local/test/t1")) |
663 | { |
664 | fill_table1(table_proto); |
665 | return EEXIST; |
666 | } |
667 | - else if (not identifier.getPath().compare("test/too_many_enum_values")) |
668 | + else if (not identifier.getPath().compare("local/test/too_many_enum_values")) |
669 | { |
670 | fill_table_too_many_enum_values(table_proto); |
671 | return EEXIST; |
672 | } |
673 | - else if (not identifier.getPath().compare("test/invalid_table_collation")) |
674 | + else if (not identifier.getPath().compare("local/test/invalid_table_collation")) |
675 | { |
676 | fill_table_invalid_table_collation(table_proto); |
677 | return EEXIST; |
678 | |
679 | === modified file 'tests/r/broken_table_proto_file.result' |
680 | --- tests/r/broken_table_proto_file.result 2011-01-12 22:54:12 +0000 |
681 | +++ tests/r/broken_table_proto_file.result 2012-04-23 09:03:20 +0000 |
682 | @@ -2,6 +2,6 @@ |
683 | SHOW TABLE STATUS like 't1'; |
684 | Session Schema Name Type Engine Version Rows Avg_row_length Table_size Auto_increment |
685 | show create table t1; |
686 | -ERROR HY000: Corrupt or invalid table definition for 'test/t1.dfe': name, schema, type, engine, creation_timestamp, update_timestamp |
687 | +ERROR HY000: Corrupt or invalid table definition for 'local/test/t1.dfe': name, schema, type, engine, creation_timestamp, update_timestamp |
688 | drop table if exists t1; |
689 | Got one of the listed errors |
690 | |
691 | === modified file 'unittests/include.am' |
692 | --- unittests/include.am 2011-12-27 20:30:10 +0000 |
693 | +++ unittests/include.am 2012-04-23 09:03:20 +0000 |
694 | @@ -18,12 +18,11 @@ |
695 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
696 | |
697 | if HAVE_BOOST_TEST |
698 | -check_PROGRAMS += unittests/unittests |
699 | +noinst_PROGRAMS+= unittests/unittests |
700 | endif |
701 | |
702 | -noinst_HEADERS += \ |
703 | - unittests/plugin/plugin_stubs.h \ |
704 | - unittests/temporal_generator.h |
705 | +noinst_HEADERS+= unittests/plugin/plugin_stubs.h |
706 | +noinst_HEADERS+= unittests/temporal_generator.h |
707 | |
708 | unit: unittests/unittests |
709 | unittests/unittests |
710 | @@ -33,6 +32,8 @@ |
711 | # unittests/temporal_interval_test.cc |
712 | # |
713 | |
714 | +unittests_unittests_DEPENDENCIES= |
715 | +unittests_unittests_DEPENDENCIES+= plugin/libmyisam_plugin.la |
716 | unittests_unittests_SOURCES = \ |
717 | unittests/main.cc \ |
718 | unittests/atomics_test.cc \ |