Merge lp:~stewart/drizzle/remove-unused-row-type-in-table-message into lp:~drizzle-trunk/drizzle/development
- remove-unused-row-type-in-table-message
- Merge into development
Status: | Superseded |
---|---|
Proposed branch: | lp:~stewart/drizzle/remove-unused-row-type-in-table-message |
Merge into: | lp:~drizzle-trunk/drizzle/development |
Prerequisite: | lp:~stewart/drizzle/default-collation-in-table-message |
Diff against target: |
597 lines (+125/-171) 21 files modified
drizzled/cursor.h (+0/-6) drizzled/enum.h (+0/-12) drizzled/handler_structs.h (+0/-1) drizzled/message/statement_transform.cc (+0/-8) drizzled/message/table.proto (+0/-12) drizzled/show.cc (+1/-8) drizzled/sql_table.cc (+1/-4) drizzled/sql_yacc.yy (+0/-2) drizzled/statement/alter_table.cc (+0/-11) drizzled/statement/create_index.cc (+0/-2) drizzled/statement/drop_index.cc (+0/-1) drizzled/table_share.cc (+0/-7) drizzled/table_share.h (+0/-1) plugin/archive/ha_archive.h (+1/-4) plugin/heap/ha_heap.cc (+1/-10) plugin/heap/ha_heap.h (+1/-1) plugin/innobase/handler/ha_innodb.cc (+0/-37) plugin/innobase/handler/ha_innodb.h (+0/-6) plugin/pbms/src/pbmslib.h (+119/-0) plugin/schema_dictionary/tables.cc (+1/-37) plugin/schema_dictionary/tables.h (+0/-1) |
To merge this branch: | bzr merge lp:~stewart/drizzle/remove-unused-row-type-in-table-message |
Related bugs: | |
Related blueprints: |
Remove row_type from TableOptions in table proto
(Undefined)
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Brian Aker | Needs Fixing | ||
Review via email: mp+28694@code.launchpad.net |
Commit message
Description of the change
http://
The explicit row_type entry was not being used. Everything has moved to ROW_FORMAT as an engine option.
Also see https:/
while creating this patch.
Brian Aker (brianaker) wrote : | # |
Brian Aker (brianaker) : | # |
Stewart Smith (stewart) wrote : | # |
perhaps a SQL dialect that has everything explicit?
I'd prefer to do this a bit later as I'm mostly focused on minimal changes to get SHOW CREATE working (and the foreign key information in) and don't want to change too much at once.
(this comment is probably on the wrong branch too)
- 1641. By Stewart Smith
-
Merged default-
collation- in-table- message into remove- unused- row-type- in-table- message. - 1642. By Stewart Smith
-
merge trunk
- 1643. By Stewart Smith
-
Merged default-
collation- in-table- message into remove- unused- row-type- in-table- message. - 1644. By Stewart Smith
-
merge trunk
- 1645. By Stewart Smith
-
merge trunk
Unmerged revisions
Preview Diff
1 | === modified file 'drizzled/cursor.h' |
2 | --- drizzled/cursor.h 2010-07-16 04:20:32 +0000 |
3 | +++ drizzled/cursor.h 2010-07-27 23:22:44 +0000 |
4 | @@ -320,12 +320,6 @@ |
5 | virtual ha_rows estimate_rows_upper_bound() |
6 | { return stats.records+EXTRA_RECORDS; } |
7 | |
8 | - /** |
9 | - Get the row type from the storage engine. If this method returns |
10 | - ROW_TYPE_NOT_USED, the information in HA_CREATE_INFO should be used. |
11 | - */ |
12 | - virtual enum row_type get_row_type() const { return ROW_TYPE_NOT_USED; } |
13 | - |
14 | virtual const char *index_type(uint32_t) |
15 | { assert(0); return "";} |
16 | |
17 | |
18 | === modified file 'drizzled/enum.h' |
19 | --- drizzled/enum.h 2010-06-24 05:34:43 +0000 |
20 | +++ drizzled/enum.h 2010-07-27 23:22:44 +0000 |
21 | @@ -107,18 +107,6 @@ |
22 | OPT_GLOBAL |
23 | }; |
24 | |
25 | -enum row_type |
26 | -{ |
27 | - ROW_TYPE_NOT_USED=-1, |
28 | - ROW_TYPE_DEFAULT, |
29 | - ROW_TYPE_FIXED, |
30 | - ROW_TYPE_DYNAMIC, |
31 | - ROW_TYPE_COMPRESSED, |
32 | - ROW_TYPE_REDUNDANT, |
33 | - ROW_TYPE_COMPACT, |
34 | - ROW_TYPE_PAGE |
35 | -}; |
36 | - |
37 | enum column_format_type |
38 | { |
39 | COLUMN_FORMAT_TYPE_NOT_USED= -1, |
40 | |
41 | === modified file 'drizzled/handler_structs.h' |
42 | --- drizzled/handler_structs.h 2010-05-15 01:19:45 +0000 |
43 | +++ drizzled/handler_structs.h 2010-07-27 23:22:44 +0000 |
44 | @@ -55,7 +55,6 @@ |
45 | uint64_t auto_increment_value; |
46 | uint32_t table_options; |
47 | uint32_t used_fields; |
48 | - enum row_type row_type; |
49 | plugin::StorageEngine *db_type; |
50 | bool table_existed; /* 1 in create if table existed */ |
51 | } HA_CREATE_INFO; |
52 | |
53 | === modified file 'drizzled/message/statement_transform.cc' |
54 | --- drizzled/message/statement_transform.cc 2010-05-13 00:24:20 +0000 |
55 | +++ drizzled/message/statement_transform.cc 2010-07-27 23:22:44 +0000 |
56 | @@ -932,14 +932,6 @@ |
57 | destination.append(ss.str()); |
58 | ss.clear(); |
59 | } |
60 | - |
61 | - if (options.has_row_type()) |
62 | - { |
63 | - ss << options.row_type(); |
64 | - destination.append("\nROW_TYPE = ", 12); |
65 | - destination.append(ss.str()); |
66 | - ss.clear(); |
67 | - } |
68 | |
69 | if (options.has_data_file_name()) |
70 | { |
71 | |
72 | === modified file 'drizzled/message/table.proto' |
73 | --- drizzled/message/table.proto 2010-07-19 23:43:11 +0000 |
74 | +++ drizzled/message/table.proto 2010-07-27 23:22:44 +0000 |
75 | @@ -31,18 +31,6 @@ |
76 | optional bool checksum = 17; |
77 | optional bool page_checksum = 18; |
78 | optional bool delay_key_write = 19; |
79 | - |
80 | - enum RowType { |
81 | - ROW_TYPE_DEFAULT = 0; |
82 | - ROW_TYPE_FIXED = 1; |
83 | - ROW_TYPE_DYNAMIC = 2; |
84 | - ROW_TYPE_COMPRESSED = 3; |
85 | - ROW_TYPE_REDUNDANT = 4; |
86 | - ROW_TYPE_COMPACT = 5; |
87 | - ROW_TYPE_PAGE = 6; |
88 | - } |
89 | - |
90 | - optional RowType row_type = 20; |
91 | } |
92 | |
93 | message ForeignKeyConstraint { |
94 | |
95 | === modified file 'drizzled/show.cc' |
96 | --- drizzled/show.cc 2010-07-19 20:29:33 +0000 |
97 | +++ drizzled/show.cc 2010-07-27 23:22:44 +0000 |
98 | @@ -471,7 +471,7 @@ |
99 | |
100 | key_info= table->key_info; |
101 | memset(&create_info, 0, sizeof(create_info)); |
102 | - create_info.row_type= table->getShare()->row_type; |
103 | + |
104 | primary_key= table->getShare()->getPrimaryKey(); |
105 | |
106 | for (uint32_t i=0 ; i < table->getShare()->sizeKeys() ; i++,key_info++) |
107 | @@ -558,13 +558,6 @@ |
108 | append_unescaped(packet, option.state().c_str(), option.state().length()); |
109 | } |
110 | |
111 | -#if 0 |
112 | - if (create_info.row_type != ROW_TYPE_DEFAULT) |
113 | - { |
114 | - packet->append(STRING_WITH_LEN(" ROW_FORMAT=")); |
115 | - packet->append(ha_row_type[(uint32_t) create_info.row_type]); |
116 | - } |
117 | -#endif |
118 | if (table->getShare()->block_size) |
119 | { |
120 | packet->append(STRING_WITH_LEN(" BLOCK_SIZE=")); |
121 | |
122 | === modified file 'drizzled/sql_table.cc' |
123 | --- drizzled/sql_table.cc 2010-07-15 23:18:11 +0000 |
124 | +++ drizzled/sql_table.cc 2010-07-27 23:22:44 +0000 |
125 | @@ -810,7 +810,7 @@ |
126 | /** @todo Get rid of this MyISAM-specific crap. */ |
127 | if (not create_proto.engine().name().compare("MyISAM") && |
128 | ((sql_field->flags & BLOB_FLAG) || |
129 | - (sql_field->sql_type == DRIZZLE_TYPE_VARCHAR && create_info->row_type != ROW_TYPE_FIXED))) |
130 | + (sql_field->sql_type == DRIZZLE_TYPE_VARCHAR))) |
131 | (*db_options)|= HA_OPTION_PACK_RECORD; |
132 | it2.rewind(); |
133 | } |
134 | @@ -1466,9 +1466,6 @@ |
135 | assert(identifier.getTableName() == table_proto.name()); |
136 | db_options= create_info->table_options; |
137 | |
138 | - if (create_info->row_type == ROW_TYPE_DYNAMIC) |
139 | - db_options|=HA_OPTION_PACK_RECORD; |
140 | - |
141 | set_table_default_charset(create_info, identifier.getSchemaName().c_str()); |
142 | |
143 | /* Build a Table object to pass down to the engine, and the do the actual create. */ |
144 | |
145 | === modified file 'drizzled/sql_yacc.yy' |
146 | --- drizzled/sql_yacc.yy 2010-07-08 18:02:05 +0000 |
147 | +++ drizzled/sql_yacc.yy 2010-07-27 23:22:44 +0000 |
148 | @@ -358,7 +358,6 @@ |
149 | enum drizzled::sql_var_t var_type; |
150 | drizzled::Key::Keytype key_type; |
151 | enum drizzled::ha_key_alg key_alg; |
152 | - enum drizzled::row_type row_type; |
153 | enum drizzled::column_format_type column_format_type; |
154 | enum drizzled::ha_rkey_function ha_rkey_mode; |
155 | enum drizzled::enum_tx_isolation tx_isolation; |
156 | @@ -2124,7 +2123,6 @@ |
157 | lex->select_lex.init_order(); |
158 | lex->select_lex.db= |
159 | ((TableList*) lex->select_lex.table_list.first)->db; |
160 | - statement->create_info.row_type= ROW_TYPE_NOT_USED; |
161 | statement->alter_info.build_method= $2; |
162 | } |
163 | alter_commands |
164 | |
165 | === modified file 'drizzled/statement/alter_table.cc' |
166 | --- drizzled/statement/alter_table.cc 2010-06-22 20:45:28 +0000 |
167 | +++ drizzled/statement/alter_table.cc 2010-07-27 23:22:44 +0000 |
168 | @@ -823,8 +823,6 @@ |
169 | ha_rows copied= 0; |
170 | ha_rows deleted= 0; |
171 | |
172 | - message::Table *original_table_definition= table->getMutableShare()->getTableProto(); |
173 | - |
174 | session->set_proc_info("init"); |
175 | |
176 | table->use_all_columns(); |
177 | @@ -865,15 +863,6 @@ |
178 | return true; |
179 | } |
180 | |
181 | - if (create_info->row_type == ROW_TYPE_NOT_USED) |
182 | - { |
183 | - message::Table::TableOptions *table_options; |
184 | - table_options= create_proto.mutable_options(); |
185 | - |
186 | - create_info->row_type= table->getShare()->row_type; |
187 | - table_options->set_row_type(original_table_definition->options().row_type()); |
188 | - } |
189 | - |
190 | session->set_proc_info("setup"); |
191 | |
192 | /* |
193 | |
194 | === modified file 'drizzled/statement/create_index.cc' |
195 | --- drizzled/statement/create_index.cc 2010-05-28 01:36:09 +0000 |
196 | +++ drizzled/statement/create_index.cc 2010-07-27 23:22:44 +0000 |
197 | @@ -59,8 +59,6 @@ |
198 | return true; |
199 | } |
200 | |
201 | - create_info.row_type= ROW_TYPE_NOT_USED; |
202 | - |
203 | bool res; |
204 | if (original_table_message.type() == message::Table::STANDARD ) |
205 | { |
206 | |
207 | === modified file 'drizzled/statement/drop_index.cc' |
208 | --- drizzled/statement/drop_index.cc 2010-05-12 21:58:06 +0000 |
209 | +++ drizzled/statement/drop_index.cc 2010-07-27 23:22:44 +0000 |
210 | @@ -63,7 +63,6 @@ |
211 | |
212 | memset(&create_info, 0, sizeof(create_info)); |
213 | create_info.db_type= 0; |
214 | - create_info.row_type= ROW_TYPE_NOT_USED; |
215 | |
216 | bool res; |
217 | if (original_table_message.type() == message::Table::STANDARD ) |
218 | |
219 | === modified file 'drizzled/table_share.cc' |
220 | --- drizzled/table_share.cc 2010-07-20 00:27:58 +0000 |
221 | +++ drizzled/table_share.cc 2010-07-27 23:22:44 +0000 |
222 | @@ -471,7 +471,6 @@ |
223 | timestamp_offset(0), |
224 | reclength(0), |
225 | stored_rec_length(0), |
226 | - row_type(ROW_TYPE_DEFAULT), |
227 | max_rows(0), |
228 | table_proto(NULL), |
229 | storage_engine(NULL), |
230 | @@ -544,7 +543,6 @@ |
231 | timestamp_offset(0), |
232 | reclength(0), |
233 | stored_rec_length(0), |
234 | - row_type(ROW_TYPE_DEFAULT), |
235 | max_rows(0), |
236 | table_proto(NULL), |
237 | storage_engine(NULL), |
238 | @@ -625,7 +623,6 @@ |
239 | timestamp_offset(0), |
240 | reclength(0), |
241 | stored_rec_length(0), |
242 | - row_type(ROW_TYPE_DEFAULT), |
243 | max_rows(0), |
244 | table_proto(NULL), |
245 | storage_engine(NULL), |
246 | @@ -713,7 +710,6 @@ |
247 | timestamp_offset(0), |
248 | reclength(0), |
249 | stored_rec_length(0), |
250 | - row_type(ROW_TYPE_DEFAULT), |
251 | max_rows(0), |
252 | table_proto(NULL), |
253 | storage_engine(NULL), |
254 | @@ -903,9 +899,6 @@ |
255 | db_create_options= (local_db_create_options & 0x0000FFFF); |
256 | db_options_in_use= db_create_options; |
257 | |
258 | - row_type= table_options.has_row_type() ? |
259 | - (enum row_type) table_options.row_type() : ROW_TYPE_DEFAULT; |
260 | - |
261 | block_size= table_options.has_block_size() ? |
262 | table_options.block_size() : 0; |
263 | |
264 | |
265 | === modified file 'drizzled/table_share.h' |
266 | --- drizzled/table_share.h 2010-06-29 13:47:17 +0000 |
267 | +++ drizzled/table_share.h 2010-07-27 23:22:44 +0000 |
268 | @@ -340,7 +340,6 @@ |
269 | uint32_t reclength; /* Recordlength */ |
270 | public: |
271 | uint32_t stored_rec_length; /* Stored record length*/ |
272 | - enum row_type row_type; /* How rows are stored */ |
273 | |
274 | uint32_t getRecordLength() const |
275 | { |
276 | |
277 | === modified file 'plugin/archive/ha_archive.h' |
278 | --- plugin/archive/ha_archive.h 2010-06-21 15:29:49 +0000 |
279 | +++ plugin/archive/ha_archive.h 2010-07-27 23:22:44 +0000 |
280 | @@ -122,10 +122,7 @@ |
281 | public: |
282 | void start_bulk_insert(drizzled::ha_rows rows); |
283 | int end_bulk_insert(); |
284 | - enum drizzled::row_type get_row_type() const |
285 | - { |
286 | - return drizzled::ROW_TYPE_COMPRESSED; |
287 | - } |
288 | + |
289 | drizzled::THR_LOCK_DATA **store_lock(drizzled::Session *session, |
290 | drizzled::THR_LOCK_DATA **to, |
291 | drizzled::thr_lock_type lock_type); |
292 | |
293 | === modified file 'plugin/heap/ha_heap.cc' |
294 | --- plugin/heap/ha_heap.cc 2010-07-16 05:40:08 +0000 |
295 | +++ plugin/heap/ha_heap.cc 2010-07-27 23:22:44 +0000 |
296 | @@ -501,15 +501,6 @@ |
297 | return 0; |
298 | } |
299 | |
300 | - |
301 | -enum row_type ha_heap::get_row_type() const |
302 | -{ |
303 | - if (file->s->recordspace.is_variable_size) |
304 | - return ROW_TYPE_DYNAMIC; |
305 | - |
306 | - return ROW_TYPE_FIXED; |
307 | -} |
308 | - |
309 | int ha_heap::extra(enum ha_extra_function operation) |
310 | { |
311 | return heap_extra(file,operation); |
312 | @@ -880,7 +871,7 @@ |
313 | hp_create_info.with_auto_increment= found_real_auto_increment; |
314 | hp_create_info.internal_table= internal_table; |
315 | hp_create_info.max_chunk_size= table_arg->getShare()->block_size; |
316 | - hp_create_info.is_dynamic= (table_arg->getShare()->row_type == ROW_TYPE_DYNAMIC); |
317 | + hp_create_info.is_dynamic= false; |
318 | |
319 | error= heap_create(internal::fn_format(buff,table_name,"","", |
320 | MY_REPLACE_EXT|MY_UNPACK_FILENAME), |
321 | |
322 | === modified file 'plugin/heap/ha_heap.h' |
323 | --- plugin/heap/ha_heap.h 2010-04-23 17:43:11 +0000 |
324 | +++ plugin/heap/ha_heap.h 2010-07-27 23:22:44 +0000 |
325 | @@ -41,7 +41,7 @@ |
326 | Cursor *clone(drizzled::memory::Root *mem_root); |
327 | |
328 | const char *index_type(uint32_t inx); |
329 | - drizzled::row_type get_row_type() const; |
330 | + |
331 | const drizzled::key_map *keys_to_use_for_scanning() { return &btree_keys; } |
332 | double scan_time() |
333 | { return (double) (stats.records+stats.deleted) / 20.0+10; } |
334 | |
335 | === modified file 'plugin/innobase/handler/ha_innodb.cc' |
336 | --- plugin/innobase/handler/ha_innodb.cc 2010-07-20 17:46:20 +0000 |
337 | +++ plugin/innobase/handler/ha_innodb.cc 2010-07-27 23:22:44 +0000 |
338 | @@ -2517,43 +2517,6 @@ |
339 | *****************************************************************************/ |
340 | |
341 | /****************************************************************//** |
342 | -Get the record format from the data dictionary. |
343 | -@return one of ROW_TYPE_REDUNDANT, ROW_TYPE_COMPACT, |
344 | -ROW_TYPE_COMPRESSED, ROW_TYPE_DYNAMIC */ |
345 | -UNIV_INTERN |
346 | -enum row_type |
347 | -ha_innobase::get_row_type() const |
348 | -/*=============================*/ |
349 | -{ |
350 | - if (prebuilt && prebuilt->table) { |
351 | - const ulint flags = prebuilt->table->flags; |
352 | - |
353 | - if (UNIV_UNLIKELY(!flags)) { |
354 | - return(ROW_TYPE_REDUNDANT); |
355 | - } |
356 | - |
357 | - ut_ad(flags & DICT_TF_COMPACT); |
358 | - |
359 | - switch (flags & DICT_TF_FORMAT_MASK) { |
360 | - case DICT_TF_FORMAT_51 << DICT_TF_FORMAT_SHIFT: |
361 | - return(ROW_TYPE_COMPACT); |
362 | - case DICT_TF_FORMAT_ZIP << DICT_TF_FORMAT_SHIFT: |
363 | - if (flags & DICT_TF_ZSSIZE_MASK) { |
364 | - return(ROW_TYPE_COMPRESSED); |
365 | - } else { |
366 | - return(ROW_TYPE_DYNAMIC); |
367 | - } |
368 | -#if DICT_TF_FORMAT_ZIP != DICT_TF_FORMAT_MAX |
369 | -# error "DICT_TF_FORMAT_ZIP != DICT_TF_FORMAT_MAX" |
370 | -#endif |
371 | - } |
372 | - } |
373 | - ut_ad(0); |
374 | - return(ROW_TYPE_NOT_USED); |
375 | -} |
376 | - |
377 | - |
378 | -/****************************************************************//** |
379 | Returns the index type. */ |
380 | UNIV_INTERN |
381 | const char* |
382 | |
383 | === modified file 'plugin/innobase/handler/ha_innodb.h' |
384 | --- plugin/innobase/handler/ha_innodb.h 2010-06-21 16:57:08 +0000 |
385 | +++ plugin/innobase/handler/ha_innodb.h 2010-07-27 23:22:44 +0000 |
386 | @@ -115,12 +115,6 @@ |
387 | return static_cast<plugin::TransactionalStorageEngine *>(engine); |
388 | } |
389 | |
390 | - /* |
391 | - Get the row type from the storage engine. If this method returns |
392 | - ROW_TYPE_NOT_USED, the information in HA_CREATE_INFO should be used. |
393 | - */ |
394 | - UNIV_INTERN enum row_type get_row_type() const; |
395 | - |
396 | UNIV_INTERN const char* index_type(uint key_number); |
397 | UNIV_INTERN const key_map* keys_to_use_for_scanning(); |
398 | |
399 | |
400 | === added file 'plugin/pbms/src/pbmslib.h' |
401 | --- plugin/pbms/src/pbmslib.h 1970-01-01 00:00:00 +0000 |
402 | +++ plugin/pbms/src/pbmslib.h 2010-07-15 17:00:55 +0000 |
403 | @@ -0,0 +1,119 @@ |
404 | +/* Copyright (c) 2008 PrimeBase Technologies GmbH, Germany |
405 | + * |
406 | + * PrimeBase Media Stream (PBMS) |
407 | + * |
408 | + * This program is free software; you can redistribute it and/or modify |
409 | + * it under the terms of the GNU Lesser General Public License as published by |
410 | + * the Free Software Foundation; either version 2 of the License, or |
411 | + * (at your option) any later version. |
412 | + * |
413 | + * This program is distributed in the hope that it will be useful, |
414 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
415 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
416 | + * GNU Lesser General Public License for more details. |
417 | + * |
418 | + * You should have received a copy of the GNU Lesser General Public License |
419 | + * along with this program; if not, write to the Free Software |
420 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
421 | + * |
422 | + * 2008-09-10 Barry Leslie |
423 | + * |
424 | + * H&G2JCtL |
425 | + */ |
426 | +#ifndef __PBMSLIB_H__ |
427 | +#define __PBMSLIB_H__ |
428 | + |
429 | +#ifdef __cplusplus |
430 | +extern "C" { |
431 | +#endif |
432 | + |
433 | +#define MS_STANDARD_STORAGE 0 // BLOB data is stored in the repository. |
434 | +#define MS_CLOUD_STORAGE 1 // BLOB data is in S3 cloud storage. |
435 | + |
436 | +/*<DRIZZLE>*/ |
437 | +#define MS_CHECKSUM_TAG "PBMS_CHECKSUM" |
438 | +#define MS_ALIAS_TAG "PBMS_BLOB_ALIAS" |
439 | +#define MS_BLOB_INFO_REQUEST "PBMS_RETURN_HEADER_ONLY" |
440 | +#define MS_PING_REQUEST "PBMS_PING_CONNECTION" |
441 | +#define MS_BLOB_SIZE "PBMS_BLOB_SIZE" |
442 | +#define MS_LAST_ACCESS "PBMS_LAST_ACCESS" |
443 | +#define MS_ACCESS_COUNT "PBMS_ACCESS_COUNT" |
444 | +#define MS_CREATION_TIME "PBMS_CREATION_TIME" |
445 | +#define MS_BLOB_TYPE "PBMS_BLOB_TYPE" |
446 | + |
447 | +#define MS_REQUEST_SIZE "PBMS_REQUEST_SIZE" // The number of bytes of BLOB data the client requests. |
448 | +#define MS_REQUEST_OFFSET "PBMS_REQUEST_OFFSET" // The offset into the BLOB that the client requests the data from. |
449 | + |
450 | +#define MS_CLOUD_SERVER "PBMS_CLOUD_SERVER" |
451 | +#define MS_CLOUD_BUCKET "PBMS_CLOUD_BUCKET" |
452 | +#define MS_CLOUD_OBJECT_KEY "PBMS_CLOUD_OBJECT_KEY" |
453 | +#define MS_CLOUD_KEY "PBMS_CLOUD_KEY" |
454 | +#define MS_BLOB_SIGNATURE "PBMS_BLOB_SIGNATURE" |
455 | +#define MS_BLOB_DATE "PBMS_BLOB_DATE" // The date used when creating the signature. |
456 | + |
457 | +#define MS_META_NAME_SIZE 32 |
458 | +#define MS_META_VALUE_SIZE 1024 |
459 | +#define MS_BLOB_ALIAS_SIZE MS_META_VALUE_SIZE |
460 | +#define MS_BLOB_URL_SIZE 200 |
461 | + |
462 | +#ifndef PBMS_PORT |
463 | +#define DEFAULT_PBMS_PORT 8080 |
464 | +#else |
465 | +#define DEFAULT_PBMS_PORT PBMS_PORT |
466 | +#endif |
467 | + |
468 | +/* PBMS handle types. */ |
469 | +typedef void *PBMS; // A connection handle. |
470 | + |
471 | +typedef unsigned char pbms_bool; |
472 | + |
473 | +/* options for pbms_set_option() and pbms_get_option() */ |
474 | +enum pbms_option /*: Parameter type | Information */ |
475 | +{ |
476 | + PBMS_OPTION_KEEP_ALIVE, /*: unsigned int* | A boolean value indicating if the keep_alive flag should be set on HTTP requests.(Defalt = false) */ |
477 | + PBMS_OPTION_TRANSMITION_TIMEOUT, /*: unsigned int* | If greater than zero this sets a limit to how long a blob transfer can take. (Defalt = 0) */ |
478 | + PBMS_OPTION_HOST, /*: (const char *)* | The connection's Media Stream server host IP address. (Read Only) */ |
479 | + PBMS_OPTION_PORT, /*: unsigned int* | The connection's Media Stream server host port number. (Read Only) */ |
480 | + PBMS_OPTION_DATABASE /*: (const char *)* | The connection's associated database. */ |
481 | +}; |
482 | + |
483 | +typedef size_t (* PBMS_READ_CALLBACK_FUNC) (void *caller_data, char *buffer, size_t size, pbms_bool reset); |
484 | +typedef size_t (* PBMS_WRITE_CALLBACK_FUNC) (void *caller_data, const char *buffer, size_t size, pbms_bool reset); |
485 | + |
486 | +pbms_bool pbms_library_init(); |
487 | +void pbms_library_end(); |
488 | +PBMS pbms_connect(const char* host, unsigned int port, const char *database); |
489 | + |
490 | + |
491 | +void pbms_close(PBMS pbms); |
492 | +pbms_bool pbms_set_option(PBMS pbms, enum pbms_option option, const void *in_value); |
493 | +pbms_bool pbms_get_option(PBMS pbms, enum pbms_option option, void *out_value); |
494 | +int pbms_errno(PBMS pbms); |
495 | +const char *pbms_error(PBMS pbms); |
496 | +pbms_bool pbms_is_blob_reference(PBMS pbms, const char *ref); |
497 | +pbms_bool pbms_get_blob_size(PBMS pbms, const char *ref, size_t *size); |
498 | + |
499 | +/* Metadata related functions. */ |
500 | +pbms_bool pbms_add_metadata(PBMS pbms, const char *name, const char *value); |
501 | +void pbms_clear_metadata(PBMS pbms, const char *name); //If name is NULL all metadata associaed with the connection is removed. |
502 | +unsigned int pbms_reset_metadata(PBMS pbms); //Resets the metadata cursor for downloaded metadata. |
503 | +pbms_bool pbms_next_metadata(PBMS pbms, char *name, char *value, size_t *v_size); |
504 | +pbms_bool pbms_get_metadata_value(PBMS pbms, const char *name, char *buffer, size_t *size); |
505 | + |
506 | +pbms_bool pbms_get_md5_digest(PBMS pbms, char *md5_digest); |
507 | + |
508 | +pbms_bool pbms_put_data(PBMS pbms, const char *table, const char *checksum, char *ref, size_t size, const unsigned char *buffer); |
509 | +pbms_bool pbms_put_data_cb(PBMS pbms, const char *table, const char *checksum, char *ref, size_t size, PBMS_READ_CALLBACK_FUNC cb, void *caller_data); |
510 | + |
511 | +pbms_bool pbms_get_data(PBMS pbms, const char *ref, unsigned char *buffer, size_t buffer_size); |
512 | +pbms_bool pbms_get_data_cb(PBMS pbms, const char *ref, PBMS_WRITE_CALLBACK_FUNC cb, void *caller_data); |
513 | + |
514 | +pbms_bool pbms_get_data_range(PBMS pbms, const char *ref, size_t start_offset, size_t end_offset, unsigned char *buffer, size_t buffer_size, size_t *data_size); |
515 | +pbms_bool pbms_get_data_range_cb(PBMS pbms, const char *ref, size_t start_offset, size_t end_offset, PBMS_WRITE_CALLBACK_FUNC cb, void *caller_data); |
516 | + |
517 | +pbms_bool pbms_get_info(PBMS pbms, const char *ref); |
518 | + |
519 | +#ifdef __cplusplus |
520 | +} |
521 | +#endif |
522 | +#endif // __PBMSLIB_H__ |
523 | |
524 | === modified file 'plugin/schema_dictionary/tables.cc' |
525 | --- plugin/schema_dictionary/tables.cc 2010-07-15 23:18:11 +0000 |
526 | +++ plugin/schema_dictionary/tables.cc 2010-07-27 23:22:44 +0000 |
527 | @@ -30,13 +30,6 @@ |
528 | static const string INTERNAL("INTERNAL"); |
529 | static const string FUNCTION("FUNCTION"); |
530 | |
531 | -static const string DEFAULT("DEFAULT"); |
532 | -static const string FIXED("FIXED"); |
533 | -static const string DYNAMIC("DYNAMIC"); |
534 | -static const string COMPRESSED("COMPRESSED"); |
535 | -static const string REDUNDANT("REDUNDANT"); |
536 | -static const string COMPACT("COMPACT"); |
537 | -static const string PAGE("PAGE"); |
538 | |
539 | static const string VARCHAR("VARCHAR"); |
540 | static const string DOUBLE("DOUBLE"); |
541 | @@ -92,35 +85,6 @@ |
542 | return false; |
543 | } |
544 | |
545 | -void TablesTool::Generator::pushRow(message::Table::TableOptions::RowType type) |
546 | -{ |
547 | - switch (type) |
548 | - { |
549 | - default: |
550 | - case message::Table::TableOptions::ROW_TYPE_DEFAULT: |
551 | - push(DEFAULT); |
552 | - break; |
553 | - case message::Table::TableOptions::ROW_TYPE_FIXED: |
554 | - push(FIXED); |
555 | - break; |
556 | - case message::Table::TableOptions::ROW_TYPE_DYNAMIC: |
557 | - push(DYNAMIC); |
558 | - break; |
559 | - case message::Table::TableOptions::ROW_TYPE_COMPRESSED: |
560 | - push(COMPRESSED); |
561 | - break; |
562 | - case message::Table::TableOptions::ROW_TYPE_REDUNDANT: |
563 | - push(REDUNDANT); |
564 | - break; |
565 | - case message::Table::TableOptions::ROW_TYPE_COMPACT: |
566 | - push(COMPACT); |
567 | - break; |
568 | - case message::Table::TableOptions::ROW_TYPE_PAGE: |
569 | - push(PAGE); |
570 | - break; |
571 | - } |
572 | -} |
573 | - |
574 | void TablesTool::Generator::pushType(message::Table::Field::FieldType type) |
575 | { |
576 | switch (type) |
577 | @@ -196,7 +160,7 @@ |
578 | push(getTableMessage().engine().name()); |
579 | |
580 | /* ROW_FORMAT */ |
581 | - pushRow(getTableMessage().options().row_type()); |
582 | + push("DEFAULT"); |
583 | |
584 | /* TABLE_COLLATION */ |
585 | push(getTableMessage().options().collation()); |
586 | |
587 | === modified file 'plugin/schema_dictionary/tables.h' |
588 | --- plugin/schema_dictionary/tables.h 2010-07-06 23:50:55 +0000 |
589 | +++ plugin/schema_dictionary/tables.h 2010-07-27 23:22:44 +0000 |
590 | @@ -47,7 +47,6 @@ |
591 | |
592 | bool nextTable(); |
593 | |
594 | - void pushRow(drizzled::message::Table::TableOptions::RowType type); |
595 | void pushType(drizzled::message::Table::Field::FieldType type); |
596 | |
597 | const std::string &table_name() |
Hi!
The collation should be explicitly expressed in the replication stream (we go for explicit over implicit).
Cheers,
-Brian