Hi! Is there a 1 to 1 correlation between slot and plugin? If so we should have them named the same (or... should slot... be a part of plugin). Cheers, -Brian On Sep 27, 2009, at 4:10 PM, Monty Taylor wrote: > Monty Taylor has proposed merging lp:~mordred/drizzle/plugin-slot- > reorg into lp:drizzle. > > Requested reviews: > Brian Aker (brianaker): > Jay Pipes (jaypipes) > > -- > https://code.launchpad.net/~mordred/drizzle/plugin-slot-reorg/+merge/12502 > You are requested to review the proposed merge of lp:~mordred/ > drizzle/plugin-slot-reorg into lp:drizzle. > === modified file '.bzrignore' > --- .bzrignore 2009-08-03 14:23:22 +0000 > +++ .bzrignore 2009-09-27 23:10:30 +0000 > @@ -275,3 +275,4 @@ > drizzled/message/command_reader > TAGS > *replication.pb.* > +drizzled/message/table_raw_reader > > === modified file 'drizzled/Makefile.am' > --- drizzled/Makefile.am 2009-09-23 17:01:21 +0000 > +++ drizzled/Makefile.am 2009-09-27 23:10:30 +0000 > @@ -38,53 +38,10 @@ > atomic/pthread_traits.h \ > atomic/sun_studio.h \ > atomics.h \ > - authentication.h \ > base.h \ > cached_item.h \ > calendar.h \ > check_stack_overrun.h \ > - statement.h \ > - statement/alter_schema.h \ > - statement/alter_table.h \ > - statement/analyze.h \ > - statement/change_schema.h \ > - statement/check.h \ > - statement/checksum.h \ > - statement/commit.h \ > - statement/create_index.h \ > - statement/create_schema.h \ > - statement/create_table.h \ > - statement/delete.h \ > - statement/drop_index.h \ > - statement/drop_schema.h \ > - statement/drop_table.h \ > - statement/empty_query.h \ > - statement/flush.h \ > - statement/insert.h \ > - statement/insert_select.h \ > - statement/kill.h \ > - statement/load.h \ > - statement/optimize.h \ > - statement/release_savepoint.h \ > - statement/rename_table.h \ > - statement/replace.h \ > - statement/replace_select.h \ > - statement/rollback.h \ > - statement/rollback_to_savepoint.h \ > - statement/savepoint.h \ > - statement/select.h \ > - statement/set_option.h \ > - statement/show_create.h \ > - statement/show_create_schema.h \ > - statement/show_engine_status.h \ > - statement/show_errors.h \ > - statement/show_processlist.h \ > - statement/show_status.h \ > - statement/show_warnings.h \ > - statement/start_transaction.h \ > - statement/truncate.h \ > - statement/unlock_tables.h \ > - statement/update.h \ > common.h \ > comp_creator.h \ > cost_vect.h \ > @@ -98,7 +55,6 @@ > dtcollation.h \ > enum.h \ > enum_nested_loop_state.h \ > - errmsg.h \ > errmsg_print.h \ > error.h \ > field.h \ > @@ -240,7 +196,6 @@ > hybrid_type_traits_decimal.h \ > hybrid_type_traits_integer.h \ > index_hint.h \ > - info_schema.h \ > internal_error_handler.h \ > item.h \ > item/basic_constant.h \ > @@ -293,7 +248,6 @@ > lex_string.h \ > lex_symbol.h \ > lock.h \ > - logging.h \ > lookup_symbol.h \ > my_decimal.h\ > my_var.h \ > @@ -302,36 +256,35 @@ > natural_join_column.h \ > nested_join.h \ > open_tables_state.h \ > + opt_range.h \ > optimizer/key_field.h \ > optimizer/position.h \ > optimizer/sargable_param.h \ > - opt_range.h \ > order.h \ > plugin.h \ > - plugin/registry.h \ > + plugin/authentication.h \ > + plugin/client.h \ > plugin/command_applier.h \ > plugin/command_reader.h \ > plugin/command_replicator.h \ > - plugin/authentication.h \ > - plugin/client.h \ > - plugin/error_message_handler.h \ > + plugin/error_message.h \ > plugin/function.h \ > plugin/handle.h \ > + plugin/info_schema_table.h \ > plugin/library.h \ > plugin/listen.h \ > plugin/listen_tcp.h \ > - plugin/logging_handler.h \ > + plugin/logging.h \ > plugin/manifest.h \ > plugin/null_client.h \ > - plugin/qcache.h \ > + plugin/query_cache.h \ > + plugin/registry.h \ > plugin/scheduler.h \ > plugin/storage_engine.h \ > probes.h \ > - qcache.h \ > query_id.h \ > registry.h \ > replication_services.h \ > - scheduling.h \ > security_context.h \ > select_create.h \ > select_dump.h \ > @@ -347,11 +300,20 @@ > select_subselect.h \ > select_to_file.h \ > select_union.h \ > + service/authentication.h \ > + service/command_replicator.h \ > + service/command_applier.h \ > + service/error_message.h \ > + service/function.h \ > + service/info_schema.h \ > + service/listen.h \ > + service/logging.h \ > + service/query_cache.h \ > + service/scheduler.h \ > + service/storage_engine.h \ > session.h \ > set_var.h \ > show.h \ > - slot/function.h \ > - slot/listen.h \ > sql_alloc.h \ > sql_array.h \ > sql_base.h \ > @@ -362,7 +324,6 @@ > sql_load.h \ > sql_locale.h \ > sql_parse.h \ > - sql_plugin.h \ > sql_select.h \ > sql_sort.h \ > sql_state.h \ > @@ -370,6 +331,48 @@ > sql_table.h \ > sql_union.h \ > stacktrace.h \ > + statement.h \ > + statement/alter_schema.h \ > + statement/alter_table.h \ > + statement/analyze.h \ > + statement/change_schema.h \ > + statement/check.h \ > + statement/checksum.h \ > + statement/commit.h \ > + statement/create_index.h \ > + statement/create_schema.h \ > + statement/create_table.h \ > + statement/delete.h \ > + statement/drop_index.h \ > + statement/drop_schema.h \ > + statement/drop_table.h \ > + statement/empty_query.h \ > + statement/flush.h \ > + statement/insert.h \ > + statement/insert_select.h \ > + statement/kill.h \ > + statement/load.h \ > + statement/optimize.h \ > + statement/release_savepoint.h \ > + statement/rename_table.h \ > + statement/replace.h \ > + statement/replace_select.h \ > + statement/rollback.h \ > + statement/rollback_to_savepoint.h \ > + statement/savepoint.h \ > + statement/select.h \ > + statement/set_option.h \ > + statement/show_create.h \ > + statement/show_create_schema.h \ > + statement/show_engine_status.h \ > + statement/show_errors.h \ > + statement/show_processlist.h \ > + statement/show_status.h \ > + statement/show_warnings.h \ > + statement/start_transaction.h \ > + statement/truncate.h \ > + statement/unlock_tables.h \ > + statement/update.h \ > stored_key.h \ > structs.h \ > symbol_hash.h \ > @@ -377,8 +380,8 @@ > table_ident.h \ > table_list.h \ > table_map_iterator.h \ > + table_proto.h \ > table_reference.h \ > - table_proto.h \ > table_share.h \ > temporal.h \ > temporal_format.h \ > @@ -388,11 +391,11 @@ > tztime.h \ > unique.h \ > unireg.h \ > + user_var_entry.h \ > utf8.h \ > utf8/checked.h \ > utf8/core.h \ > utf8/unchecked.h \ > - user_var_entry.h \ > xid.h > > noinst_LTLIBRARIES = \ > @@ -423,66 +426,24 @@ > > drizzled_SOURCES = \ > alter_info.cc \ > - authentication.cc \ > cached_item.cc \ > calendar.cc \ > check_stack_overrun.cc \ > - statement/alter_schema.cc \ > - statement/alter_table.cc \ > - statement/analyze.cc \ > - statement/change_schema.cc \ > - statement/check.cc \ > - statement/checksum.cc \ > - statement/commit.cc \ > - statement/create_index.cc \ > - statement/create_schema.cc \ > - statement/create_table.cc \ > - statement/delete.cc \ > - statement/drop_index.cc \ > - statement/drop_schema.cc \ > - statement/drop_table.cc \ > - statement/empty_query.cc \ > - statement/flush.cc \ > - statement/insert.cc \ > - statement/insert_select.cc \ > - statement/kill.cc \ > - statement/load.cc \ > - statement/optimize.cc \ > - statement/release_savepoint.cc \ > - statement/rename_table.cc \ > - statement/replace.cc \ > - statement/replace_select.cc \ > - statement/rollback.cc \ > - statement/rollback_to_savepoint.cc \ > - statement/savepoint.cc \ > - statement/select.cc \ > - statement/set_option.cc \ > - statement/show_create.cc \ > - statement/show_create_schema.cc \ > - statement/show_engine_status.cc \ > - statement/show_errors.cc \ > - statement/show_processlist.cc \ > - statement/show_status.cc \ > - statement/show_warnings.cc \ > - statement/start_transaction.cc \ > - statement/truncate.cc \ > - statement/unlock_tables.cc \ > - statement/update.cc \ > comp_creator.cc \ > create_field.cc \ > current_session.cc \ > diagnostics_area.cc \ > drizzled.cc \ > dtcollation.cc \ > - errmsg.cc \ > + errmsg_print.cc \ > error.cc \ > - errmsg_print.cc \ > + field.cc \ > field/blob.cc \ > field/date.cc \ > field/datetime.cc \ > - field/enum.cc \ > field/decimal.cc \ > field/double.cc \ > + field/enum.cc \ > field/int64_t.cc \ > field/long.cc \ > field/null.cc \ > @@ -491,7 +452,6 @@ > field/str.cc \ > field/timestamp.cc \ > field/varstring.cc \ > - field.cc \ > field_conv.cc \ > field_iterator.cc \ > filesort.cc \ > @@ -507,17 +467,6 @@ > function/get_user_var.cc \ > function/last_insert.cc \ > function/locate.cc \ > - function/min_max.cc \ > - function/num1.cc \ > - function/numhybrid.cc \ > - function/num_op.cc \ > - function/row_count.cc \ > - function/set_user_var.cc \ > - function/sign.cc \ > - function/signed.cc \ > - function/units.cc \ > - function/unsigned.cc \ > - function/user_var_as_out_param.cc \ > function/math/abs.cc \ > function/math/acos.cc \ > function/math/asin.cc \ > @@ -528,10 +477,10 @@ > function/math/divide.cc \ > function/math/exp.cc \ > function/math/floor.cc \ > + function/math/int.cc \ > function/math/int_divide.cc \ > + function/math/int_val.cc \ > function/math/integer.cc \ > - function/math/int.cc \ > - function/math/int_val.cc \ > function/math/ln.cc \ > function/math/log.cc \ > function/math/minus.cc \ > @@ -547,6 +496,14 @@ > function/math/sin.cc \ > function/math/sqrt.cc \ > function/math/tan.cc \ > + function/min_max.cc \ > + function/num1.cc \ > + function/num_op.cc \ > + function/numhybrid.cc \ > + function/row_count.cc \ > + function/set_user_var.cc \ > + function/sign.cc \ > + function/signed.cc \ > function/str/alloc_buffer.cc \ > function/str/binary.cc \ > function/str/char.cc \ > @@ -583,8 +540,8 @@ > function/time/date_format.cc \ > function/time/dayname.cc \ > function/time/dayofmonth.cc \ > + function/time/dayofyear.cc \ > function/time/extract.cc \ > - function/time/dayofyear.cc \ > function/time/from_days.cc \ > function/time/from_unixtime.cc \ > function/time/hour.cc \ > @@ -594,9 +551,9 @@ > function/time/minute.cc \ > function/time/month.cc \ > function/time/now.cc \ > - function/time/quarter.cc \ > function/time/period_add.cc \ > function/time/period_diff.cc \ > + function/time/quarter.cc \ > function/time/second.cc \ > function/time/sysdate_local.cc \ > function/time/timestamp_diff.cc \ > @@ -605,11 +562,15 @@ > function/time/unix_timestamp.cc \ > function/time/weekday.cc \ > function/time/year.cc \ > + function/units.cc \ > + function/unsigned.cc \ > + function/user_var_as_out_param.cc \ > ha_trx_info.cc \ > hybrid_type_traits.cc \ > hybrid_type_traits_decimal.cc \ > hybrid_type_traits_integer.cc \ > index_hint.cc \ > + item.cc \ > item/bin_string.cc \ > item/cache.cc \ > item/cache_decimal.cc \ > @@ -627,10 +588,10 @@ > item/field.cc \ > item/float.cc \ > item/hex_string.cc \ > + item/ident.cc \ > item/insert_value.cc \ > + item/int.cc \ > item/int_with_ref.cc \ > - item/ident.cc \ > - item/int.cc \ > item/null.cc \ > item/num.cc \ > item/outer_ref.cc \ > @@ -643,32 +604,40 @@ > item/sum.cc \ > item/type_holder.cc \ > item/uint.cc \ > - item.cc \ > join.cc \ > join_cache.cc \ > join_table.cc \ > key.cc \ > key_map.cc \ > lock.cc \ > - logging.cc \ > lookup_symbol.cc \ > my_decimal.cc \ > name_resolution_context_state.cc \ > natural_join_column.cc \ > - optimizer/key_field.cc \ > opt_range.cc \ > opt_sum.cc \ > + optimizer/key_field.cc \ > plugin/listen_tcp.cc \ > + plugin/loader.cc \ > plugin/registry.cc \ > - qcache.cc \ > query_id.cc \ > records.cc \ > - scheduling.cc \ > + replication_services.cc \ > + service/authentication.cc \ > + service/command_replicator.cc \ > + service/command_applier.cc \ > + service/error_message.cc \ > + service/function.cc \ > + service/info_schema.cc \ > + service/listen.cc \ > + service/logging.cc \ > + service/query_cache.cc \ > + service/scheduler.cc \ > + service/storage_engine.cc \ > session.cc \ > set_var.cc \ > show.cc \ > - slot/function.cc \ > - slot/listen.cc \ > + sql_alloc.cc \ > sql_base.cc \ > sql_delete.cc \ > sql_derived.cc \ > @@ -679,7 +648,6 @@ > sql_load.cc \ > sql_locale.cc \ > sql_parse.cc \ > - sql_plugin.cc \ > sql_select.cc \ > sql_state.cc \ > sql_string.cc \ > @@ -688,17 +656,56 @@ > sql_update.cc \ > sql_yacc.yy \ > stacktrace.cc \ > + statement/alter_schema.cc \ > + statement/alter_table.cc \ > + statement/analyze.cc \ > + statement/change_schema.cc \ > + statement/check.cc \ > + statement/checksum.cc \ > + statement/commit.cc \ > + statement/create_index.cc \ > + statement/create_schema.cc \ > + statement/create_table.cc \ > + statement/delete.cc \ > + statement/drop_index.cc \ > + statement/drop_schema.cc \ > + statement/drop_table.cc \ > + statement/empty_query.cc \ > + statement/flush.cc \ > + statement/insert.cc \ > + statement/insert_select.cc \ > + statement/kill.cc \ > + statement/load.cc \ > + statement/optimize.cc \ > + statement/release_savepoint.cc \ > + statement/rename_table.cc \ > + statement/replace.cc \ > + statement/replace_select.cc \ > + statement/rollback.cc \ > + statement/rollback_to_savepoint.cc \ > + statement/savepoint.cc \ > + statement/select.cc \ > + statement/set_option.cc \ > + statement/show_create.cc \ > + statement/show_create_schema.cc \ > + statement/show_engine_status.cc \ > + statement/show_errors.cc \ > + statement/show_processlist.cc \ > + statement/show_status.cc \ > + statement/show_warnings.cc \ > + statement/start_transaction.cc \ > + statement/truncate.cc \ > + statement/unlock_tables.cc \ > + statement/update.cc \ > strfunc.cc \ > table.cc \ > table_list.cc \ > - table_map_iterator.cc \ > + table_map_iterator.cc \ > table_share.cc \ > temporal.cc \ > temporal_format.cc \ > temporal_interval.cc \ > - thr_malloc.cc \ > time.cc \ > - replication_services.cc \ > tztime.cc \ > uniques.cc \ > user_var_entry.cc \ > @@ -719,7 +726,6 @@ > plugin/storage_engine.h.gch \ > sql_base.h.gch \ > sql_parse.h.gch \ > - sql_plugin.h.gch \ > util/convert.h.gch \ > util/test.h.gch > else > @@ -735,7 +741,6 @@ > $(PCHHEADERS) > > EXTRA_DIST = \ > - plugin/config.h.in \ > $(BUILT_MAINT_SRC) \ > symbol_hash.gperf \ > function_hash.gperf \ > > === modified file 'drizzled/db.cc' > --- drizzled/db.cc 2009-08-19 23:35:29 +0000 > +++ drizzled/db.cc 2009-09-27 23:10:30 +0000 > @@ -38,8 +38,6 @@ > > using namespace drizzled; > > -extern drizzled::ReplicationServices replication_services; > - > #define MY_DB_OPT_FILE "db.opt" > #define MAX_DROP_TABLE_Q_LEN 1024 > > @@ -190,6 +188,7 @@ > > bool mysql_create_db(Session *session, const char *db, > HA_CREATE_INFO *create_info) > { > + ReplicationServices &replication_services= > ReplicationServices::singleton(); > char path[FN_REFLEN+16]; > long result= 1; > int error_erno; > @@ -277,6 +276,7 @@ > > bool mysql_alter_db(Session *session, const char *db, HA_CREATE_INFO > *create_info) > { > + ReplicationServices &replication_services= > ReplicationServices::singleton(); > long result=1; > int error= 0; > char path[FN_REFLEN+16]; > @@ -420,6 +420,7 @@ > query= session->query; > query_length= session->query_length; > } > + ReplicationServices &replication_services= > ReplicationServices::singleton(); > replication_services.rawStatement(session, session- > >getQueryString(), session->getQueryLength()); > session->clear_error(); > session->server_status|= SERVER_STATUS_DB_DROPPED; > @@ -438,6 +439,7 @@ > query_end= query + MAX_DROP_TABLE_Q_LEN; > db_len= strlen(db); > > + ReplicationServices &replication_services= > ReplicationServices::singleton(); > for (tbl= dropped_tables; tbl; tbl= tbl->next_local) > { > uint32_t tbl_name_len; > > === modified file 'drizzled/definitions.h' > --- drizzled/definitions.h 2009-08-22 02:06:02 +0000 > +++ drizzled/definitions.h 2009-09-27 23:10:30 +0000 > @@ -329,6 +329,7 @@ > typedef uint64_t query_id_t; > typedef void *range_seq_t; > > +enum ha_stat_type { HA_ENGINE_STATUS, HA_ENGINE_LOGS, > HA_ENGINE_MUTEX }; > // the following is for checking tables > > #define HA_ADMIN_ALREADY_DONE 1 > > === modified file 'drizzled/drizzled.cc' > --- drizzled/drizzled.cc 2009-09-24 06:23:51 +0000 > +++ drizzled/drizzled.cc 2009-09-27 23:10:30 +0000 > @@ -39,12 +39,12 @@ > #include > #include > #include > -#include > #include > -#include > #include "drizzled/temporal_format.h" /* For init_temporal_formats() > */ > -#include "drizzled/slot/listen.h" > +#include "drizzled/service/listen.h" > +#include "drizzled/service/error_message.h" > #include "drizzled/plugin/client.h" > +#include "drizzled/plugin/scheduler.h" > #include "drizzled/probes.h" > > #include > @@ -243,10 +243,10 @@ > size_t my_thread_stack_size= 65536; > > /* > - Legacy global StorageEngine. These will be removed (please do not > add more). > + Legacy global plugin::StorageEngine. These will be removed > (please do not add more). > */ > -StorageEngine *heap_engine; > -StorageEngine *myisam_engine; > +plugin::StorageEngine *heap_engine; > +plugin::StorageEngine *myisam_engine; > > char* opt_secure_file_priv= 0; > > @@ -395,7 +395,7 @@ > drizzled::atomic refresh_version; /* Increments on each > reload */ > > /* Function declarations */ > -bool drizzle_rm_tmp_tables(drizzled::slot::Listen &listen); > +bool drizzle_rm_tmp_tables(drizzled::service::Listen &listen); > > extern "C" pthread_handler_t signal_hand(void *arg); > static void drizzle_init_variables(void); > @@ -1391,7 +1391,7 @@ > scheduler_name= opt_scheduler_default; > } > > - if (set_scheduler_factory(scheduler_name)) > + if (plugins.scheduler.setFactory(scheduler_name)) > { > errmsg_printf(ERRMSG_LVL_ERROR, > _("No scheduler found, cannot continue!\n")); > @@ -1420,7 +1420,7 @@ > if (default_storage_engine_str) > { > const std::string name(default_storage_engine_str); > - StorageEngine *engine; > + plugin::StorageEngine *engine; > > engine= ha_resolve_by_name(0, name); > if (engine == NULL) > @@ -2403,13 +2403,15 @@ > > void option_error_reporter(enum loglevel level, const char > *format, ...) > { > + plugin::Registry &plugins= plugin::Registry::singleton(); > + > va_list args; > va_start(args, format); > > /* Don't print warnings for --loose options during bootstrap */ > if (level == ERROR_LEVEL || global_system_variables.log_warnings) > { > - errmsg_vprintf (current_session, ERROR_LEVEL, format, args); > + plugins.error_message.vprintf(current_session, ERROR_LEVEL, > format, args); > } > va_end(args); > } > > === modified file 'drizzled/errmsg_print.cc' > --- drizzled/errmsg_print.cc 2009-07-07 09:06:29 +0000 > +++ drizzled/errmsg_print.cc 2009-09-27 23:10:30 +0000 > @@ -23,13 +23,15 @@ > */ > > #include > -#include > +#include > #include > #include > > // need this for stderr > #include > > +using namespace drizzled; > + > void sql_perror(const char *message) > { > // is stderr threadsafe? > @@ -38,10 +40,11 @@ > > bool errmsg_printf (int priority, char const *format, ...) > { > + plugin::Registry &plugins= plugin::Registry::singleton(); > bool rv; > va_list args; > va_start(args, format); > - rv= errmsg_vprintf(current_session, priority, format, args); > + rv= plugins.error_message.vprintf(current_session, priority, > format, args); > va_end(args); > return rv; > } > > === modified file 'drizzled/ha_trx_info.cc' > --- drizzled/ha_trx_info.cc 2009-03-25 08:39:58 +0000 > +++ drizzled/ha_trx_info.cc 2009-09-27 23:10:30 +0000 > @@ -22,8 +22,10 @@ > #include > #include > > +using namespace drizzled; > > -void Ha_trx_info::register_ha(Session_TRANS *trans, StorageEngine > *engine_arg) > +void Ha_trx_info::register_ha(Session_TRANS *trans, > + plugin::StorageEngine *engine_arg) > { > assert(m_flags == 0); > assert(m_engine == NULL); > @@ -86,7 +88,7 @@ > } > > > -StorageEngine *Ha_trx_info::engine() const > +plugin::StorageEngine *Ha_trx_info::engine() const > { > assert(is_started()); > return m_engine; > > === modified file 'drizzled/ha_trx_info.h' > --- drizzled/ha_trx_info.h 2009-03-25 08:39:58 +0000 > +++ drizzled/ha_trx_info.h 2009-09-27 23:10:30 +0000 > @@ -22,7 +22,13 @@ > > > class Session_TRANS; > +namespace drizzled > +{ > +namespace plugin > +{ > class StorageEngine; > +} > +} > > /** > Either statement transaction or normal transaction - related > @@ -45,7 +51,8 @@ > { > public: > /** Register this storage engine in the given transaction context. > */ > - void register_ha(Session_TRANS *trans, StorageEngine *engine_arg); > + void register_ha(Session_TRANS *trans, > + drizzled::plugin::StorageEngine *engine_arg); > > /** Clear, prepare for reuse. */ > void reset(); > @@ -58,7 +65,7 @@ > /** Mark this transaction read-write if the argument is read- > write. */ > void coalesce_trx_with(const Ha_trx_info *stmt_trx); > Ha_trx_info *next() const; > - StorageEngine *engine() const; > + drizzled::plugin::StorageEngine *engine() const; > > private: > enum { TRX_READ_ONLY= 0, TRX_READ_WRITE= 1 }; > @@ -69,7 +76,7 @@ > for the same storage engine, 'engine' is not-NULL only when the > corresponding storage is a part of a transaction. > */ > - StorageEngine *m_engine; > + drizzled::plugin::StorageEngine *m_engine; > /** > Transaction flags related to this engine. > Not-null only if this instance is a part of transaction. > > === modified file 'drizzled/handler.cc' > --- drizzled/handler.cc 2009-09-23 21:40:36 +0000 > +++ drizzled/handler.cc 2009-09-27 23:10:30 +0000 > @@ -44,8 +44,6 @@ > using namespace std; > using namespace drizzled; > > -extern drizzled::ReplicationServices replication_services; > - > KEY_CREATE_INFO default_key_create_info= { HA_KEY_ALG_UNDEF, 0, > {NULL,0} }; > > /* number of entries in storage_engines[] */ > @@ -365,7 +363,7 @@ > in each engine independently. The two-phase commit protocol > is used only if: > - all participating engines support two-phase commit (provide > - StorageEngine::prepare PSEA API call) and > + plugin::StorageEngine::prepare PSEA API call) and > - transactions in at least two engines modify data (i.e. are > not read-only). > > @@ -429,10 +427,10 @@ > > At the end of a statement, server call > ha_autocommit_or_rollback() is invoked. This call in turn > - invokes StorageEngine::prepare() for every involved engine. > - Prepare is followed by a call to StorageEngine::commit_one_phase() > - If a one-phase commit will suffice, StorageEngine::prepare() is not > - invoked and the server only calls StorageEngine::commit_one_phase > (). > + invokes plugin::StorageEngine::prepare() for every involved engine. > + Prepare is followed by a call to > plugin::StorageEngine::commit_one_phase() > + If a one-phase commit will suffice, plugin::StorageEngine::prepare > () is not > + invoked and the server only calls > plugin::StorageEngine::commit_one_phase(). > At statement commit, the statement-related read-write engine > flag is propagated to the corresponding flag in the normal > transaction. When the commit is complete, the list of registered > @@ -491,7 +489,7 @@ > times per transaction. > > */ > -void trans_register_ha(Session *session, bool all, StorageEngine > *engine) > +void trans_register_ha(Session *session, bool all, > plugin::StorageEngine *engine) > { > Session_TRANS *trans; > Ha_trx_info *ha_info; > @@ -623,7 +621,7 @@ > for (; ha_info && !error; ha_info= ha_info->next()) > { > int err; > - StorageEngine *engine= ha_info->engine(); > + plugin::StorageEngine *engine= ha_info->engine(); > /* > Do not call two-phase commit if this particular > transaction is read-only. This allows for simpler > @@ -672,7 +670,7 @@ > for (; ha_info; ha_info= ha_info_next) > { > int err; > - StorageEngine *engine= ha_info->engine(); > + plugin::StorageEngine *engine= ha_info->engine(); > if ((err= engine->commit(session, all))) > { > my_error(ER_ERROR_DURING_COMMIT, MYF(0), err); > @@ -715,7 +713,7 @@ > for (; ha_info; ha_info= ha_info_next) > { > int err; > - StorageEngine *engine= ha_info->engine(); > + plugin::StorageEngine *engine= ha_info->engine(); > if ((err= engine->rollback(session, all))) > { // cannot happen > my_error(ER_ERROR_DURING_ROLLBACK, MYF(0), err); > @@ -847,7 +845,7 @@ > for (ha_info= sv->ha_list; ha_info; ha_info= ha_info->next()) > { > int err; > - StorageEngine *engine= ha_info->engine(); > + plugin::StorageEngine *engine= ha_info->engine(); > assert(engine); > if ((err= engine->savepoint_rollback(session, > (void *)(sv+1)))) > @@ -866,7 +864,7 @@ > ha_info= ha_info_next) > { > int err; > - StorageEngine *engine= ha_info->engine(); > + plugin::StorageEngine *engine= ha_info->engine(); > if ((err= engine->rollback(session, !(0)))) > { // cannot happen > my_error(ER_ERROR_DURING_ROLLBACK, MYF(0), err); > @@ -894,7 +892,7 @@ > for (; ha_info; ha_info= ha_info->next()) > { > int err; > - StorageEngine *engine= ha_info->engine(); > + plugin::StorageEngine *engine= ha_info->engine(); > assert(engine); > #ifdef NOT_IMPLEMENTED /*- TODO (examine this againt the original > code base) */ > if (! engine->savepoint_set) > @@ -927,7 +925,7 @@ > for (; ha_info; ha_info= ha_info->next()) > { > int err; > - StorageEngine *engine= ha_info->engine(); > + plugin::StorageEngine *engine= ha_info->engine(); > /* Savepoint life time is enclosed into transaction life time. */ > assert(engine); > if ((err= engine->savepoint_release(session, > @@ -2614,7 +2612,7 @@ > return false; > } > > -bool ha_show_status(Session *session, StorageEngine *engine, enum > ha_stat_type stat) > +bool ha_show_status(Session *session, plugin::StorageEngine > *engine, enum ha_stat_type stat) > { > List field_list; > bool result; > @@ -2650,6 +2648,7 @@ > const unsigned char *before_record, > const unsigned char *after_record) > { > + ReplicationServices &replication_services= > ReplicationServices::singleton(); > Session *const session= table->in_use; > > switch (session->lex->sql_command) > > === modified file 'drizzled/handler.h' > --- drizzled/handler.h 2009-09-15 21:01:42 +0000 > +++ drizzled/handler.h 2009-09-27 23:10:30 +0000 > @@ -45,6 +45,8 @@ > #include > > #define HA_MAX_ALTER_FLAGS 40 > + > + > typedef std::bitset HA_ALTER_FLAGS; > > extern drizzled::atomic refresh_version; /* Increments on > each reload */ > @@ -171,7 +173,7 @@ > > ha_rows estimation_rows_to_insert; > public: > - StorageEngine *engine; /* storage engine of this handler */ > + drizzled::plugin::StorageEngine *engine; /* storage engine > of this handler */ > unsigned char *ref; /* Pointer to current row */ > unsigned char *dup_ref; /* Pointer to duplicate row */ > > @@ -234,7 +236,7 @@ > */ > Discrete_interval auto_inc_interval_for_cur_row; > > - handler(StorageEngine *engine_arg, TableShare *share_arg) > + handler(drizzled::plugin::StorageEngine *engine_arg, TableShare > *share_arg) > :table_share(share_arg), table(0), > estimation_rows_to_insert(0), engine(engine_arg), > ref(0), in_range_check_pushed_down(false), > @@ -803,37 +805,26 @@ > int ha_init(void); > int ha_end(void); > > -void add_storage_engine(StorageEngine *engine); > -void remove_storage_engine(StorageEngine *engine); > +void add_storage_engine(drizzled::plugin::StorageEngine *engine); > +void remove_storage_engine(drizzled::plugin::StorageEngine *engine); > > -void ha_close_connection(Session* session); > -bool ha_flush_logs(StorageEngine *db_type); > -void ha_drop_database(char* path); > int ha_create_table(Session *session, const char *path, > const char *db, const char *table_name, > HA_CREATE_INFO *create_info, > bool update_create_info, > drizzled::message::Table *table_proto); > -int ha_delete_table(Session *session, const char *path, > - const char *db, const char *alias, bool > generate_warning); > > /* statistics and info */ > -bool ha_show_status(Session *session, StorageEngine *db_type, enum > ha_stat_type stat); > +bool ha_show_status(Session *session, > drizzled::plugin::StorageEngine *db_type, enum ha_stat_type stat); > > int ha_find_files(Session *session,const char *db,const char *path, > const char *wild, bool dir, List* > files); > > -/* report to InnoDB that control passes to the client */ > -int ha_release_temporary_latches(Session *session); > - > -/* transactions: interface to StorageEngine functions */ > -int ha_start_consistent_snapshot(Session *session); > -int ha_commit_or_rollback_by_xid(XID *xid, bool commit); > +/* transactions: interface to plugin::StorageEngine functions */ > int ha_commit_one_phase(Session *session, bool all); > int ha_rollback_trans(Session *session, bool all); > -int ha_recover(HASH *commit_list); > > -/* transactions: these functions never call StorageEngine functions > directly */ > +/* transactions: these functions never call plugin::StorageEngine > functions directly */ > int ha_commit_trans(Session *session, bool all); > int ha_autocommit_or_rollback(Session *session, int error); > int ha_enable_transaction(Session *session, bool on); > @@ -844,7 +835,7 @@ > int ha_release_savepoint(Session *session, SAVEPOINT *sv); > > /* these are called by storage engines */ > -void trans_register_ha(Session *session, bool all, StorageEngine > *engine); > +void trans_register_ha(Session *session, bool all, > drizzled::plugin::StorageEngine *engine); > > uint32_t filename_to_tablename(const char *from, char *to, uint32_t > to_length); > bool tablename_to_filename(const char *from, char *to, size_t > to_length); > @@ -911,7 +902,7 @@ > bool mysql_create_like_table(Session *session, TableList *table, > TableList *src_table, > HA_CREATE_INFO *create_info); > -bool mysql_rename_table(StorageEngine *base, const char *old_db, > +bool mysql_rename_table(drizzled::plugin::StorageEngine *base, > const char *old_db, > const char * old_name, const char *new_db, > const char * new_name, uint32_t flags); > bool mysql_prepare_update(Session *session, TableList *table_list, > > === modified file 'drizzled/handler_structs.h' > --- drizzled/handler_structs.h 2009-09-16 20:58:28 +0000 > +++ drizzled/handler_structs.h 2009-09-27 23:10:30 +0000 > @@ -29,12 +29,19 @@ > #include > > class Ha_trx_info; > -struct StorageEngine; > struct st_key; > typedef struct st_key KEY; > struct st_key_cache; > typedef struct st_key_cache KEY_CACHE; > > +namespace drizzled > +{ > +namespace plugin > +{ > +class StorageEngine; > +} > +} > + > struct Session_TRANS > { > Session_TRANS() {}; > @@ -85,7 +92,7 @@ > uint32_t used_fields; > uint32_t key_block_size; > enum row_type row_type; > - StorageEngine *db_type; > + drizzled::plugin::StorageEngine *db_type; > uint32_t options; /* OR of HA_CREATE_ > options */ > bool table_existed; /* 1 in create if table existed */ > } HA_CREATE_INFO; > > === modified file 'drizzled/item/create.cc' > --- drizzled/item/create.cc 2009-08-17 20:54:05 +0000 > +++ drizzled/item/create.cc 2009-09-27 23:10:30 +0000 > @@ -58,7 +58,7 @@ > #include > > #include > -#include > +#include > #include > > /* Function declarations */ > > === modified file 'drizzled/plugin.h' > --- drizzled/plugin.h 2009-08-17 20:54:05 +0000 > +++ drizzled/plugin.h 2009-09-27 23:10:30 +0000 > @@ -22,6 +22,9 @@ > > #include > #include > +#include > +#include > +#include > > class Session; > class Item; > @@ -32,6 +35,14 @@ > */ > > > +class sys_var; > +typedef struct st_mysql_lex_string LEX_STRING; > +struct my_option; > + > +extern char *opt_plugin_load; > +extern char *opt_plugin_dir_ptr; > +extern char opt_plugin_dir[FN_REFLEN]; > + > /* > Macros for beginning and ending plugin declarations. Between > drizzle_declare_plugin and drizzle_declare_plugin_end there should > @@ -347,7 +358,13 @@ > (*(DRIZZLE_SYSVAR_NAME(name).resolve(session, DRIZZLE_SYSVAR_NAME > (name).offset))) > > > -struct StorageEngine; > +namespace drizzled > +{ > +namespace plugin > +{ > +class StorageEngine; > +} > +} > > > class Plugin > @@ -402,13 +419,25 @@ > extern "C" { > #endif > > +extern int plugin_init(drizzled::plugin::Registry &plugins, > + int *argc, char **argv, int init_flags); > +extern void plugin_shutdown(drizzled::plugin::Registry &plugins); > +extern void my_print_help_inc_plugins(my_option *options); > +extern bool plugin_is_ready(const LEX_STRING *name, int type); > +extern bool mysql_install_plugin(Session *session, const LEX_STRING > *name, > + const LEX_STRING *dl); > +extern bool mysql_uninstall_plugin(Session *session, const > LEX_STRING *name); > +extern void plugin_sessionvar_init(Session *session); > +extern void plugin_sessionvar_cleanup(Session *session); > +extern sys_var *intern_find_sys_var(const char *str, uint32_t, bool > no_error); > + > int session_in_lock_tables(const Session *session); > int session_tablespace_op(const Session *session); > void set_session_proc_info(Session *session, const char *info); > const char *get_session_proc_info(Session *session); > int64_t session_test_options(const Session *session, int64_t > test_options); > int session_sql_command(const Session *session); > -void **session_ha_data(const Session *session, const struct > StorageEngine *engine); > +void **session_ha_data(const Session *session, const > drizzled::plugin::StorageEngine *engine); > int session_tx_isolation(const Session *session); > /* Increments the row counter, see Session::row_count */ > void session_inc_row_count(Session *session); > @@ -524,7 +553,7 @@ > */ > inline > void * > -session_get_ha_data(const Session *session, const struct > StorageEngine *engine) > +session_get_ha_data(const Session *session, const > drizzled::plugin::StorageEngine *engine) > { > return *session_ha_data(session, engine); > } > @@ -534,7 +563,7 @@ > */ > inline > void > -session_set_ha_data(const Session *session, const struct > StorageEngine *engine, > +session_set_ha_data(const Session *session, const > drizzled::plugin::StorageEngine *engine, > const void *ha_data) > { > *session_ha_data(session, engine)= (void*) ha_data; > > === modified file 'drizzled/plugin/authentication.h' > --- drizzled/plugin/authentication.h 2009-05-11 17:50:22 +0000 > +++ drizzled/plugin/authentication.h 2009-09-27 23:10:30 +0000 > @@ -27,6 +27,11 @@ > #ifndef DRIZZLED_PLUGIN_AUTHENTICATION_H > #define DRIZZLED_PLUGIN_AUTHENTICATION_H > > +namespace drizzled > +{ > +namespace plugin > +{ > + > class Authentication > { > public: > @@ -37,4 +42,7 @@ > > }; > > +} /* namespace plugin */ > +} /* namespace drizzled */ > + > #endif /* DRIZZLED_PLUGIN_AUTHENTICATION_H */ > > === renamed file 'drizzled/plugin/error_message_handler.h' => > 'drizzled/plugin/error_message.h' > --- drizzled/plugin/error_message_handler.h 2009-05-11 17:50:22 +0000 > +++ drizzled/plugin/error_message.h 2009-09-27 23:10:30 +0000 > @@ -20,19 +20,23 @@ > * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA > 02110-1301 USA > */ > > -#ifndef DRIZZLED_PLUGIN_ERRMSG_H > -#define DRIZZLED_PLUGIN_ERRMSG_H > +#ifndef DRIZZLED_PLUGIN_ERROR_MESSAGE_H > +#define DRIZZLED_PLUGIN_ERROR_MESSAGE_H > > #include > #include > > -class Error_message_handler > +namespace drizzled > +{ > +namespace plugin > +{ > + > +class ErrorMessage > { > std::string name; > public: > - Error_message_handler(std::string name_arg): name(name_arg) {} > - Error_message_handler(const char *name_arg): name(name_arg) {} > - virtual ~Error_message_handler() {} > + ErrorMessage(std::string name_arg): name(name_arg) {} > + virtual ~ErrorMessage() {} > > std::string getName() { return name; } > > @@ -40,4 +44,7 @@ > const char *format, va_list ap)=0; > }; > > -#endif /* DRIZZLED_PLUGIN_ERRMSG_H */ > +} /* namespace plugin */ > +} /* namespace drizzled */ > + > +#endif /* DRIZZLED_PLUGIN_ERROR_MESSAGE_H */ > > === renamed file 'drizzled/info_schema.h' => 'drizzled/plugin/ > info_schema_table.h' > --- drizzled/info_schema.h 2009-07-07 04:47:22 +0000 > +++ drizzled/plugin/info_schema_table.h 2009-09-27 23:10:31 +0000 > @@ -18,11 +18,16 @@ > * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA > 02110-1301 USA > */ > > -#ifndef DRIZZLED_INFO_SCHEMA_H > -#define DRIZZLED_INFO_SCHEMA_H > +#ifndef DRIZZLE_PLUGIN_INFO_SCHEMA_TABLE_H > +#define DRIZZLE_PLUGIN_INFO_SCHEMA_TABLE_H > > #include > > +namespace drizzled > +{ > +namespace plugin > +{ > + > /** > * @file > * info_schema.h > @@ -473,4 +478,6 @@ > > }; > > -#endif /* DRIZZLED_INFO_SCHEMA_H */ > +} /* namespace plugin */ > +} /* namespace drizzled */ > +#endif /* DRIZZLE_PLUGIN_INFO_SCHEMA_TABLE_H */ > > === modified file 'drizzled/plugin/listen_tcp.cc' > --- drizzled/plugin/listen_tcp.cc 2009-08-27 18:06:03 +0000 > +++ drizzled/plugin/listen_tcp.cc 2009-09-27 23:10:31 +0000 > @@ -26,7 +26,9 @@ > #include > > using namespace std; > -using namespace drizzled; > + > +namespace drizzled > +{ > > int plugin::ListenTcp::acceptTcp(int fd) > { > @@ -211,3 +213,5 @@ > > return false; > } > + > +} /* namespace drizzled */ > > === renamed file 'drizzled/sql_plugin.cc' => 'drizzled/plugin/ > loader.cc' > --- drizzled/sql_plugin.cc 2009-09-14 18:25:40 +0000 > +++ drizzled/plugin/loader.cc 2009-09-27 23:10:31 +0000 > @@ -17,12 +17,7 @@ > #include > #include > > -#include > -#include > -#include > -#include > #include > -#include > #include > #include > #include > > === renamed file 'drizzled/plugin/logging_handler.h' => 'drizzled/ > plugin/logging.h' > --- drizzled/plugin/logging_handler.h 2009-05-11 17:50:22 +0000 > +++ drizzled/plugin/logging.h 2009-09-27 23:10:31 +0000 > @@ -1,9 +1,8 @@ > -/* > - -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*- > +/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*- > * vim:expandtab:shiftwidth=2:tabstop=2:smarttab: > - > + * > * Definitions required for Query Logging plugin > - > + * > * Copyright (C) 2008 Sun Microsystems > * > * This program is free software; you can redistribute it and/or > modify > @@ -25,21 +24,28 @@ > > #include > > -class Logging_handler > +namespace drizzled > +{ > +namespace plugin > +{ > + > +class Logging > { > std::string name; > public: > - Logging_handler(std::string name_arg): name(name_arg) {} > - Logging_handler(const char *name_arg): name(name_arg) {} > - virtual ~Logging_handler() {} > + Logging(std::string name_arg): name(name_arg) {} > + virtual ~Logging() {} > > std::string getName() { return name; } > /** > * Make these no-op rather than pure-virtual so that it's easy for > a plugin > - * to only > + * to only implement one. > */ > virtual bool pre(Session *) {return false;} > virtual bool post(Session *) {return false;} > }; > > +} /* namespace plugin */ > +} /* namespace drizzled */ > + > #endif /* DRIZZLED_PLUGIN_LOGGING_H */ > > === renamed file 'drizzled/plugin/qcache.h' => 'drizzled/plugin/ > query_cache.h' > --- drizzled/plugin/qcache.h 2009-05-11 17:50:22 +0000 > +++ drizzled/plugin/query_cache.h 2009-09-27 23:10:31 +0000 > @@ -23,6 +23,11 @@ > #ifndef DRIZZLED_PLUGIN_QUERY_CACHE_H > #define DRIZZLED_PLUGIN_QUERY_CACHE_H > > +namespace drizzled > +{ > +namespace plugin > +{ > + > /* > This is the API that a qcache plugin must implement. > it should implement each of these function pointers. > @@ -53,4 +58,7 @@ > virtual bool flush(Session *session)= 0; > }; > > +} /* namespace plugin */ > +} /* namespace drizzled */ > + > #endif /* DRIZZLED_PLUGIN_QUERY_CACHE_H */ > > === modified file 'drizzled/plugin/registry.cc' > --- drizzled/plugin/registry.cc 2009-09-16 17:10:18 +0000 > +++ drizzled/plugin/registry.cc 2009-09-27 23:10:31 +0000 > @@ -23,20 +23,15 @@ > #include "drizzled/plugin.h" > #include "drizzled/show.h" > #include "drizzled/handler.h" > -#include "drizzled/errmsg.h" > -#include "drizzled/authentication.h" > -#include "drizzled/qcache.h" > -#include "drizzled/scheduling.h" > -#include "drizzled/logging.h" > -#include "drizzled/replication_services.h" > > #include > #include > #include > > using namespace std; > -using namespace drizzled; > > +namespace drizzled > +{ > > plugin::Handle *plugin::Registry::find(const LEX_STRING *name) > { > @@ -82,94 +77,4 @@ > return plugins; > } > > -void plugin::Registry::add(StorageEngine *engine) > -{ > - add_storage_engine(engine); > -} > - > -void plugin::Registry::add(InfoSchemaTable *schema_table) > -{ > - add_infoschema_table(schema_table); > -} > - > -void plugin::Registry::add(Logging_handler *handler) > -{ > - add_logger(handler); > -} > - > -void plugin::Registry::add(Error_message_handler *handler) > -{ > - add_errmsg_handler(handler); > -} > - > -void plugin::Registry::add(Authentication *auth) > -{ > - add_authentication(auth); > -} > - > -void plugin::Registry::add(QueryCache *qcache) > -{ > - add_query_cache(qcache); > -} > - > -void plugin::Registry::add(plugin::SchedulerFactory *factory) > -{ > - add_scheduler_factory(factory); > -} > - > - > -void plugin::Registry::add(drizzled::plugin::CommandReplicator > *replicator) > -{ > - add_replicator(replicator); > -} > - > -void plugin::Registry::add(drizzled::plugin::CommandApplier *applier) > -{ > - add_applier(applier); > -} > - > -void plugin::Registry::remove(StorageEngine *engine) > -{ > - remove_storage_engine(engine); > -} > - > -void plugin::Registry::remove(InfoSchemaTable *schema_table) > -{ > - remove_infoschema_table(schema_table); > -} > - > -void plugin::Registry::remove(Logging_handler *handler) > -{ > - remove_logger(handler); > -} > - > -void plugin::Registry::remove(Error_message_handler *handler) > -{ > - remove_errmsg_handler(handler); > -} > - > -void plugin::Registry::remove(Authentication *auth) > -{ > - remove_authentication(auth); > -} > - > -void plugin::Registry::remove(QueryCache *qcache) > -{ > - remove_query_cache(qcache); > -} > - > -void plugin::Registry::remove(plugin::SchedulerFactory *factory) > -{ > - remove_scheduler_factory(factory); > -} > - > - > -void plugin::Registry::remove(drizzled::plugin::CommandReplicator > *replicator) > -{ > - remove_replicator(replicator); > -} > - > -void plugin::Registry::remove(drizzled::plugin::CommandApplier > *applier) > -{ > - remove_applier(applier); > -} > +} /* namespace drizzled */ > > === modified file 'drizzled/plugin/registry.h' > --- drizzled/plugin/registry.h 2009-09-16 20:04:11 +0000 > +++ drizzled/plugin/registry.h 2009-09-27 23:10:31 +0000 > @@ -20,28 +20,28 @@ > #ifndef DRIZZLED_PLUGIN_REGISTRY_H > #define DRIZZLED_PLUGIN_REGISTRY_H > > -#include "drizzled/slot/function.h" > -#include "drizzled/slot/listen.h" > - > #include > #include > #include > > -class StorageEngine; > -class InfoSchemaTable; > -class Logging_handler; > -class Error_message_handler; > -class Authentication; > -class QueryCache; > +#include "drizzled/service/authentication.h" > +#include "drizzled/service/scheduler.h" > +#include "drizzled/service/function.h" > +#include "drizzled/service/listen.h" > +#include "drizzled/service/query_cache.h" > +#include "drizzled/service/logging.h" > +#include "drizzled/service/error_message.h" > +#include "drizzled/service/info_schema.h" > +#include "drizzled/service/command_replicator.h" > +#include "drizzled/service/command_applier.h" > +#include "drizzled/service/storage_engine.h" > + > > namespace drizzled > { > namespace plugin > { > -class CommandReplicator; > -class CommandApplier; > class Handle; > -class SchedulerFactory; > > class Registry > { > @@ -65,28 +65,110 @@ > > std::vector get_list(bool active); > > - void add(StorageEngine *engine); > - void add(InfoSchemaTable *schema_table); > - void add(Logging_handler *handler); > - void add(Error_message_handler *handler); > - void add(Authentication *auth); > - void add(QueryCache *qcache); > - void add(SchedulerFactory *scheduler); > - void add(drizzled::plugin::CommandReplicator *replicator); > - void add(drizzled::plugin::CommandApplier *applier); > - > - void remove(StorageEngine *engine); > - void remove(InfoSchemaTable *schema_table); > - void remove(Logging_handler *handler); > - void remove(Error_message_handler *handler); > - void remove(Authentication *auth); > - void remove(QueryCache *qcache); > - void remove(SchedulerFactory *scheduler); > - void remove(drizzled::plugin::CommandReplicator *replicator); > - void remove(drizzled::plugin::CommandApplier *applier); > - > - ::drizzled::slot::Function function; > - ::drizzled::slot::Listen listen; > + service::CommandReplicator command_replicator; > + service::CommandApplier command_applier; > + service::ErrorMessage error_message; > + service::Authentication authentication; > + service::QueryCache query_cache; > + service::Scheduler scheduler; > + service::Function function; > + service::Listen listen; > + service::Logging logging; > + service::InfoSchema info_schema; > + service::StorageEngine storage_engine; > + > + void add(CommandReplicator *plugin) > + { > + command_replicator.add(plugin); > + } > + void add(CommandApplier *plugin) > + { > + command_applier.add(plugin); > + } > + void add(ErrorMessage *plugin) > + { > + error_message.add(plugin); > + } > + void add(Authentication *plugin) > + { > + authentication.add(plugin); > + } > + void add(QueryCache *plugin) > + { > + query_cache.add(plugin); > + } > + void add(SchedulerFactory *plugin) > + { > + scheduler.add(plugin); > + } > + void add(Function *plugin) > + { > + function.add(plugin); > + } > + void add(Listen &plugin) > + { > + listen.add(plugin); > + } > + void add(Logging *plugin) > + { > + logging.add(plugin); > + } > + void add(InfoSchemaTable *plugin) > + { > + info_schema.add(plugin); > + } > + void add(StorageEngine *plugin) > + { > + storage_engine.add(plugin); > + } > + > + void remove(CommandReplicator *plugin) > + { > + command_replicator.remove(plugin); > + } > + void remove(CommandApplier *plugin) > + { > + command_applier.remove(plugin); > + } > + void remove(ErrorMessage *plugin) > + { > + error_message.remove(plugin); > + } > + void remove(Authentication *plugin) > + { > + authentication.remove(plugin); > + } > + void remove(QueryCache *plugin) > + { > + query_cache.remove(plugin); > + } > + void remove(SchedulerFactory *plugin) > + { > + scheduler.remove(plugin); > + } > + void remove(Function *plugin) > + { > + function.remove(plugin); > + } > + void remove(Listen &plugin) > + { > + listen.remove(plugin); > + } > + void remove(Logging *plugin) > + { > + logging.remove(plugin); > + } > + void remove(InfoSchemaTable *plugin) > + { > + info_schema.remove(plugin); > + } > + void remove(StorageEngine *plugin) > + { > + storage_engine.remove(plugin); > + } > + > + > + > }; > > } /* end namespace plugin */ > > === modified file 'drizzled/plugin/storage_engine.cc' > --- drizzled/plugin/storage_engine.cc 2009-08-19 23:35:29 +0000 > +++ drizzled/plugin/storage_engine.cc 2009-09-27 23:10:31 +0000 > @@ -33,9 +33,6 @@ > > #include > > -#include > -#include > - > #include > > #include CSTDINT_H > @@ -43,19 +40,7 @@ > using namespace std; > using namespace drizzled; > > -drizzled::Registry all_engines; > - > -void add_storage_engine(StorageEngine *engine) > -{ > - all_engines.add(engine); > -} > - > -void remove_storage_engine(StorageEngine *engine) > -{ > - all_engines.remove(engine); > -} > - > -StorageEngine::StorageEngine(const std::string name_arg, > +plugin::StorageEngine::StorageEngine(const std::string name_arg, > const std::bitset > &flags_arg, > size_t savepoint_offset_arg, > bool support_2pc) > @@ -75,12 +60,12 @@ > } > > > -StorageEngine::~StorageEngine() > +plugin::StorageEngine::~StorageEngine() > { > savepoint_alloc_size-= orig_savepoint_offset; > } > > -void StorageEngine::setTransactionReadWrite(Session* session) > +void plugin::StorageEngine::setTransactionReadWrite(Session* session) > { > Ha_trx_info *ha_info= &session->ha_data[getSlot()].ha_info[0]; > /* > @@ -103,15 +88,15 @@ > > > /** > - Return the default storage engine StorageEngine for thread > + Return the default storage engine plugin::StorageEngine for thread > > @param ha_default_storage_engine(session) > @param session current thread > > @return > - pointer to StorageEngine > + pointer to plugin::StorageEngine > */ > -StorageEngine *ha_default_storage_engine(Session *session) > +plugin::StorageEngine *ha_default_storage_engine(Session *session) > { > if (session->variables.storage_engine) > return session->variables.storage_engine; > @@ -119,34 +104,8 @@ > } > > > -/** > - Return the storage engine StorageEngine for the supplied name > - > - @param session current thread > - @param name name of storage engine > - > - @return > - pointer to storage engine plugin handle > -*/ > -StorageEngine *ha_resolve_by_name(Session *session, std::string > find_str) > -{ > - transform(find_str.begin(), find_str.end(), > - find_str.begin(), ::tolower); > - string default_str("default"); > - if (find_str == default_str) > - return ha_default_storage_engine(session); > - > - StorageEngine *engine= all_engines.find(find_str); > - > - if (engine && engine->is_user_selectable()) > - return engine; > - > - return NULL; > -} > - > - > handler *get_new_handler(TableShare *share, MEM_ROOT *alloc, > - StorageEngine *engine) > + plugin::StorageEngine *engine) > { > handler *file; > > @@ -164,348 +123,10 @@ > return(get_new_handler(share, alloc, ha_default_storage_engine > (current_session))); > } > > -class StorageEngineCloseConnection > - : public unary_function > -{ > - Session *session; > -public: > - StorageEngineCloseConnection(Session *session_arg) : session > (session_arg) {} > - /* > - there's no need to rollback here as all transactions must > - be rolled back already > - */ > - inline result_type operator() (argument_type engine) > - { > - if (engine->is_enabled() && > - session_get_ha_data(session, engine)) > - engine->close_connection(session); > - } > -}; > - > -/** > - @note > - don't bother to rollback here, it's done already > -*/ > -void ha_close_connection(Session* session) > -{ > - for_each(all_engines.begin(), all_engines.end(), > - StorageEngineCloseConnection(session)); > -} > - > -void ha_drop_database(char* path) > -{ > - for_each(all_engines.begin(), all_engines.end(), > - bind2nd(mem_fun(&StorageEngine::drop_database),path)); > -} > - > -int ha_commit_or_rollback_by_xid(XID *xid, bool commit) > -{ > - vector results; > - > - if (commit) > - transform(all_engines.begin(), all_engines.end(), results.begin > (), > - bind2nd(mem_fun(&StorageEngine::commit_by_xid),xid)); > - else > - transform(all_engines.begin(), all_engines.end(), results.begin > (), > - bind2nd(mem_fun(&StorageEngine::rollback_by_xid),xid)); > - > - if (find_if(results.begin(), results.end(), bind2nd(equal_to > (),0)) > - == results.end()) > - return 1; > - return 0; > -} > - > - > -/** > - @details > - This function should be called when MySQL sends rows of a SELECT > result set > - or the EOF mark to the client. It releases a possible adaptive > hash index > - S-latch held by session in InnoDB and also releases a possible > InnoDB query > - FIFO ticket to enter InnoDB. To save CPU time, InnoDB allows a > session to > - keep them over several calls of the InnoDB handler interface when > a join > - is executed. But when we let the control to pass to the client > they have > - to be released because if the application program uses > mysql_use_result(), > - it may deadlock on the S-latch if the application on another > connection > - performs another SQL query. In MySQL-4.1 this is even more > important because > - there a connection can have several SELECT queries open at the > same time. > - > - @param session the thread handle of the current > connection > - > - @return > - always 0 > -*/ > -int ha_release_temporary_latches(Session *session) > -{ > - for_each(all_engines.begin(), all_engines.end(), > - bind2nd(mem_fun > (&StorageEngine::release_temporary_latches),session)); > - return 0; > -} > - > - > -bool ha_flush_logs(StorageEngine *engine) > -{ > - if (engine == NULL) > - { > - if (find_if(all_engines.begin(), all_engines.end(), > - mem_fun(&StorageEngine::flush_logs)) > - != all_engines.begin()) > - return true; > - } > - else > - { > - if ((!engine->is_enabled()) || > - (engine->flush_logs())) > - return true; > - } > - return false; > -} > - > -/** > - recover() step of xa. > - > - @note > - there are three modes of operation: > - - automatic recover after a crash > - in this case commit_list != 0, tc_heuristic_recover==0 > - all xids from commit_list are committed, others are rolled back > - - manual (heuristic) recover > - in this case commit_list==0, tc_heuristic_recover != 0 > - DBA has explicitly specified that all prepared transactions > should > - be committed (or rolled back). > - - no recovery (MySQL did not detect a crash) > - in this case commit_list==0, tc_heuristic_recover == 0 > - there should be no prepared transactions in this case. > -*/ > -class XARecover : unary_function > -{ > - int trans_len, found_foreign_xids, found_my_xids; > - bool result; > - XID *trans_list; > - HASH *commit_list; > - bool dry_run; > -public: > - XARecover(XID *trans_list_arg, int trans_len_arg, > - HASH *commit_list_arg, bool dry_run_arg) > - : trans_len(trans_len_arg), found_foreign_xids(0), found_my_xids > (0), > - result(false), > - trans_list(trans_list_arg), commit_list(commit_list_arg), > - dry_run(dry_run_arg) > - {} > - > - int getForeignXIDs() > - { > - return found_foreign_xids; > - } > - > - int getMyXIDs() > - { > - return found_my_xids; > - } > - > - result_type operator() (argument_type engine) > - { > - > - int got; > - > - if (engine->is_enabled()) > - { > - while ((got= engine->recover(trans_list, trans_len)) > 0 ) > - { > - errmsg_printf(ERRMSG_LVL_INFO, > - _("Found %d prepared transaction(s) in %s"), > - got, engine->getName().c_str()); > - for (int i=0; i < got; i ++) > - { > - my_xid x=trans_list[i].get_my_xid(); > - if (!x) // not "mine" - that is generated by external TM > - { > - xid_cache_insert(trans_list+i, XA_PREPARED); > - found_foreign_xids++; > - continue; > - } > - if (dry_run) > - { > - found_my_xids++; > - continue; > - } > - // recovery mode > - if (commit_list ? > - hash_search(commit_list, (unsigned char *)&x, sizeof > (x)) != 0 : > - tc_heuristic_recover == TC_HEURISTIC_RECOVER_COMMIT) > - { > - engine->commit_by_xid(trans_list+i); > - } > - else > - { > - engine->rollback_by_xid(trans_list+i); > - } > - } > - if (got < trans_len) > - break; > - } > - } > - } > - > -}; > - > -int ha_recover(HASH *commit_list) > -{ > - XID *trans_list= NULL; > - int trans_len= 0; > - > - bool dry_run= (commit_list==0 && tc_heuristic_recover==0); > - > - /* commit_list and tc_heuristic_recover cannot be set both */ > - assert(commit_list==0 || tc_heuristic_recover==0); > - > - /* if either is set, total_ha_2pc must be set too */ > - if (total_ha_2pc <= 1) > - return 0; > - > - > -#ifndef WILL_BE_DELETED_LATER > - > - /* > - for now, only InnoDB supports 2pc. It means we can always safely > - rollback all pending transactions, without risking inconsistent > data > - */ > - > - assert(total_ha_2pc == 2); // only InnoDB and binlog > - tc_heuristic_recover= TC_HEURISTIC_RECOVER_ROLLBACK; // forcing > ROLLBACK > - dry_run=false; > -#endif > - for (trans_len= MAX_XID_LIST_SIZE ; > - trans_list==0 && trans_len > MIN_XID_LIST_SIZE; trans_len/=2) > - { > - trans_list=(XID *)malloc(trans_len*sizeof(XID)); > - } > - if (!trans_list) > - { > - errmsg_printf(ERRMSG_LVL_ERROR, ER(ER_OUTOFMEMORY), > trans_len*sizeof(XID)); > - return(1); > - } > - > - if (commit_list) > - errmsg_printf(ERRMSG_LVL_INFO, _("Starting crash recovery...")); > - > - > - XARecover recover_func(trans_list, trans_len, commit_list, > dry_run); > - for_each(all_engines.begin(), all_engines.end(), recover_func); > - free(trans_list); > - > - if (recover_func.getForeignXIDs()) > - errmsg_printf(ERRMSG_LVL_WARN, > - _("Found %d prepared XA transactions"), > - recover_func.getForeignXIDs()); > - if (dry_run && recover_func.getMyXIDs()) > - { > - errmsg_printf(ERRMSG_LVL_ERROR, > - _("Found %d prepared transactions! It means that > drizzled " > - "was not shut down properly last time and > critical " > - "recovery information (last binlog or %s file) > was " > - "manually deleted after a crash. You have to > start " > - "drizzled with the --tc-heuristic-recover > switch to " > - "commit or rollback pending transactions."), > - recover_func.getMyXIDs(), opt_tc_log_file); > - return(1); > - } > - if (commit_list) > - errmsg_printf(ERRMSG_LVL_INFO, _("Crash recovery finished.")); > - return(0); > -} > - > -int ha_start_consistent_snapshot(Session *session) > -{ > - for_each(all_engines.begin(), all_engines.end(), > - bind2nd(mem_fun > (&StorageEngine::start_consistent_snapshot),session)); > - return 0; > -} > - > -static int drizzle_read_table_proto(const char* path, > message::Table* table) > -{ > - int fd= open(path, O_RDONLY); > - > - if (fd == -1) > - return errno; > - > - google::protobuf::io::ZeroCopyInputStream* input= > - new google::protobuf::io::FileInputStream(fd); > - > - if (table->ParseFromZeroCopyStream(input) == false) > - { > - delete input; > - close(fd); > - return -1; > - } > - > - delete input; > - close(fd); > - return 0; > -} > - > -class StorageEngineGetTableProto: public > unary_function > -{ > - const char* path; > - message::Table *table_proto; > - int *err; > -public: > - StorageEngineGetTableProto(const char* path_arg, > - message::Table *table_proto_arg, > - int *err_arg) > - :path(path_arg), table_proto(table_proto_arg), err(err_arg) {} > - > - result_type operator() (argument_type engine) > - { > - int ret= engine->getTableProtoImplementation(path, table_proto); > - > - if (ret != ENOENT) > - *err= ret; > - > - return *err == EEXIST; > - } > -}; > - > -/** > - Call this function in order to give the handler the possiblity > - to ask engine if there are any new tables that should be written > to disk > - or any dropped tables that need to be removed from disk > -*/ > -int StorageEngine::getTableProto(const char* path, > - message::Table *table_proto) > -{ > - int err= ENOENT; > - > - drizzled::Registry::iterator iter= > - find_if(all_engines.begin(), all_engines.end(), > - StorageEngineGetTableProto(path, table_proto, &err)); > - if (iter == all_engines.end()) > - { > - string proto_path(path); > - string file_ext(".dfe"); > - proto_path.append(file_ext); > - > - int error= access(proto_path.c_str(), F_OK); > - > - if (error == 0) > - err= EEXIST; > - else > - err= errno; > - > - if (table_proto) > - { > - int read_proto_err= drizzle_read_table_proto(proto_path.c_str > (), > - table_proto); > - > - if (read_proto_err) > - err= read_proto_err; > - } > - } > - > - return err; > -} > - > - > -int StorageEngine::renameTableImplementation(Session *, const char > *from, const char *to) > + > + > + > +int plugin::StorageEngine::renameTableImplementation(Session *, > const char *from, const char *to) > { > int error= 0; > for (const char **ext= bas_ext(); *ext ; ext++) > @@ -536,7 +157,7 @@ > @retval > !0 Error > */ > -int StorageEngine::deleteTableImplementation(Session *, const > std::string table_path) > +int plugin::StorageEngine::deleteTableImplementation(Session *, > const std::string table_path) > { > int error= 0; > int enoent_or_zero= ENOENT; // Error if no file > was deleted > @@ -559,164 +180,6 @@ > } > > /** > - An interceptor to hijack the text of the error message without > - setting an error in the thread. We need the text to present it > - in the form of a warning to the user. > -*/ > - > -class Ha_delete_table_error_handler: public Internal_error_handler > -{ > -public: > - Ha_delete_table_error_handler() : Internal_error_handler() {} > - virtual bool handle_error(uint32_t sql_errno, > - const char *message, > - DRIZZLE_ERROR::enum_warning_level level, > - Session *session); > - char buff[DRIZZLE_ERRMSG_SIZE]; > -}; > - > - > -bool > -Ha_delete_table_error_handler:: > -handle_error(uint32_t , > - const char *message, > - DRIZZLE_ERROR::enum_warning_level , > - Session *) > -{ > - /* Grab the error message */ > - strncpy(buff, message, sizeof(buff)-1); > - return true; > -} > - > - > -class DeleteTableStorageEngine > - : public unary_function > -{ > - Session *session; > - const char *path; > - handler **file; > - int *dt_error; > -public: > - DeleteTableStorageEngine(Session *session_arg, const char > *path_arg, > - handler **file_arg, int *error_arg) > - : session(session_arg), path(path_arg), file(file_arg), dt_error > (error_arg) {} > - > - result_type operator() (argument_type engine) > - { > - char tmp_path[FN_REFLEN]; > - handler *tmp_file; > - > - if(*dt_error!=ENOENT) /* already deleted table */ > - return; > - > - if (!engine) > - return; > - > - if (!engine->is_enabled()) > - return; > - > - if ((tmp_file= engine->create(NULL, session->mem_root))) > - tmp_file->init(); > - else > - return; > - > - path= engine->checkLowercaseNames(path, tmp_path); > - const std::string table_path(path); > - int tmp_error= engine->deleteTable(session, table_path); > - > - if (tmp_error != ENOENT) > - { > - if (tmp_error == 0) > - { > - if (engine->check_flag(HTON_BIT_HAS_DATA_DICTIONARY)) > - delete_table_proto_file(path); > - else > - tmp_error= delete_table_proto_file(path); > - } > - > - *dt_error= tmp_error; > - if(*file) > - delete *file; > - *file= tmp_file; > - return; > - } > - else > - delete tmp_file; > - > - return; > - } > -}; > - > -/** > - This should return ENOENT if the file doesn't exists. > - The .frm file will be deleted only if we return 0 or ENOENT > -*/ > -int ha_delete_table(Session *session, const char *path, > - const char *db, const char *alias, bool > generate_warning) > -{ > - TableShare dummy_share; > - Table dummy_table; > - memset(&dummy_table, 0, sizeof(dummy_table)); > - memset(&dummy_share, 0, sizeof(dummy_share)); > - > - dummy_table.s= &dummy_share; > - > - int error= ENOENT; > - handler *file= NULL; > - > - for_each(all_engines.begin(), all_engines.end(), > - DeleteTableStorageEngine(session, path, &file, &error)); > - > - if (error == ENOENT) /* proto may be left behind */ > - error= delete_table_proto_file(path); > - > - if (error && generate_warning) > - { > - /* > - Because file->print_error() use my_error() to generate the > error message > - we use an internal error handler to intercept it and store > the text > - in a temporary buffer. Later the message will be presented to > user > - as a warning. > - */ > - Ha_delete_table_error_handler ha_delete_table_error_handler; > - > - /* Fill up strucutures that print_error may need */ > - dummy_share.path.str= (char*) path; > - dummy_share.path.length= strlen(path); > - dummy_share.db.str= (char*) db; > - dummy_share.db.length= strlen(db); > - dummy_share.table_name.str= (char*) alias; > - dummy_share.table_name.length= strlen(alias); > - dummy_table.alias= alias; > - > - > - if(file != NULL) > - { > - file->change_table_ptr(&dummy_table, &dummy_share); > - > - session->push_internal_handler(&ha_delete_table_error_handler); > - file->print_error(error, 0); > - > - session->pop_internal_handler(); > - } > - else > - error= -1; /* General form of fail. maybe bad FRM */ > - > - /* > - XXX: should we convert *all* errors to warnings here? > - What if the error is fatal? > - */ > - push_warning(session, DRIZZLE_ERROR::WARN_LEVEL_ERROR, error, > - ha_delete_table_error_handler.buff); > - } > - > - if(file) > - delete file; > - > - return error; > -} > - > -/** > Initiates table-file and calls appropriate database-creator. > > @retval > @@ -769,12 +232,12 @@ > } > > > -const string ha_resolve_storage_engine_name(const StorageEngine > *engine) > +const string ha_resolve_storage_engine_name(const > plugin::StorageEngine *engine) > { > return engine == NULL ? string("UNKNOWN") : engine->getName(); > } > > -const char *StorageEngine::checkLowercaseNames(const char *path, > char *tmp_path) > +const char *plugin::StorageEngine::checkLowercaseNames(const char > *path, char *tmp_path) > { > if (flags.test(HTON_BIT_FILE_BASED)) > return path; > @@ -795,135 +258,3 @@ > return tmp_path; > } > > -class DFETableNameIterator: public TableNameIteratorImplementation > -{ > -private: > - MY_DIR *dirp; > - uint32_t current_entry; > - > -public: > - DFETableNameIterator(const std::string &database) > - : TableNameIteratorImplementation(database), > - dirp(NULL), > - current_entry(-1) > - {}; > - > - ~DFETableNameIterator(); > - > - int next(std::string *name); > - > -}; > - > -DFETableNameIterator::~DFETableNameIterator() > -{ > - if (dirp) > - my_dirend(dirp); > -} > - > -int DFETableNameIterator::next(string *name) > -{ > - char uname[NAME_LEN + 1]; > - FILEINFO *file; > - char *ext; > - uint32_t file_name_len; > - const char *wild= NULL; > - > - if (dirp == NULL) > - { > - bool dir= false; > - char path[FN_REFLEN]; > - > - build_table_filename(path, sizeof(path), db.c_str(), "", false); > - > - dirp = my_dir(path,MYF(dir ? MY_WANT_STAT : 0)); > - > - if (dirp == NULL) > - { > - if (my_errno == ENOENT) > - my_error(ER_BAD_DB_ERROR, MYF(ME_BELL+ME_WAITTANG), db.c_str > ()); > - else > - my_error(ER_CANT_READ_DIR, MYF(ME_BELL+ME_WAITTANG), path, > my_errno); > - return(ENOENT); > - } > - current_entry= -1; > - } > - > - while(true) > - { > - current_entry++; > - > - if (current_entry == dirp->number_off_files) > - { > - my_dirend(dirp); > - dirp= NULL; > - return -1; > - } > - > - file= dirp->dir_entry + current_entry; > - > - if (my_strcasecmp(system_charset_info, ext=fn_rext(file- > >name),".dfe") || > - is_prefix(file->name, TMP_FILE_PREFIX)) > - continue; > - *ext=0; > - > - file_name_len= filename_to_tablename(file->name, uname, sizeof > (uname)); > - > - uname[file_name_len]= '\0'; > - > - if (wild && wild_compare(uname, wild, 0)) > - continue; > - > - if (name) > - name->assign(uname); > - > - return 0; > - } > -} > - > -TableNameIterator::TableNameIterator(const std::string &db) > - : current_implementation(NULL), database(db) > -{ > - engine_iter= all_engines.begin(); > - default_implementation= new DFETableNameIterator(database); > -} > - > -TableNameIterator::~TableNameIterator() > -{ > - delete current_implementation; > -} > - > -int TableNameIterator::next(std::string *name) > -{ > - int err= 0; > - > -next: > - if (current_implementation == NULL) > - { > - while(current_implementation == NULL && engine_iter != > all_engines.end()) > - { > - StorageEngine *engine= *engine_iter; > - current_implementation= engine->tableNameIterator(database); > - engine_iter++; > - } > - > - if (current_implementation == NULL && engine_iter == > all_engines.end()) > - { > - current_implementation= default_implementation; > - } > - } > - > - err= current_implementation->next(name); > - > - if (err == -1) > - { > - if (current_implementation != default_implementation) > - { > - delete current_implementation; > - current_implementation= NULL; > - goto next; > - } > - } > - > - return err; > -} > - > > === modified file 'drizzled/plugin/storage_engine.h' > --- drizzled/plugin/storage_engine.h 2009-08-22 02:06:02 +0000 > +++ drizzled/plugin/storage_engine.h 2009-09-27 23:10:31 +0000 > @@ -22,7 +22,7 @@ > > > #include > -#include > +#include > #include > #include > #include > @@ -41,7 +41,6 @@ > typedef bool (stat_print_fn)(Session *session, const char *type, > uint32_t type_len, > const char *file, uint32_t file_len, > const char *status, uint32_t status_len); > -enum ha_stat_type { HA_ENGINE_STATUS, HA_ENGINE_LOGS, > HA_ENGINE_MUTEX }; > > /* Possible flags of a StorageEngine (there can be 32 of them) */ > enum engine_flag_bits { > @@ -69,8 +68,13 @@ > static const std::bitset HTON_HAS_DATA_DICTIONARY(1 > << HTON_BIT_HAS_DATA_DICTIONARY); > > class Table; > + > +namespace drizzled > +{ > +namespace plugin > +{ > + > class TableNameIteratorImplementation; > - > /* > StorageEngine is a singleton structure - one instance per storage > engine - > to provide access to storage engine functionality that works on the > @@ -128,9 +132,6 @@ > > virtual ~StorageEngine(); > > - static int getTableProto(const char* path, > - drizzled::message::Table *table_proto); > - > virtual int getTableProtoImplementation(const char* path, > drizzled::message::Table > *table_proto) > { > @@ -340,26 +341,25 @@ > > }; > > -class TableNameIterator > -{ > -private: > - drizzled::Registry::iterator engine_iter; > - TableNameIteratorImplementation *current_implementation; > - TableNameIteratorImplementation *default_implementation; > - std::string database; > -public: > - TableNameIterator(const std::string &db); > - ~TableNameIterator(); > > - int next(std::string *name); > -}; > +} /* namespace plugin */ > +} /* namespace drizzled */ > > /* lookups */ > -StorageEngine *ha_default_storage_engine(Session *session); > -StorageEngine *ha_resolve_by_name(Session *session, std::string > find_str); > +/** > + Return the default storage engine plugin::StorageEngine for thread > + > + @param ha_default_storage_engine(session) > + @param session current thread > + > + @return > + pointer to plugin::StorageEngine > +*/ > +drizzled::plugin::StorageEngine *ha_default_storage_engine(Session > *session); > > handler *get_new_handler(TableShare *share, MEM_ROOT *alloc, > - StorageEngine *db_type); > -const std::string ha_resolve_storage_engine_name(const > StorageEngine *db_type); > + drizzled::plugin::StorageEngine *db_type); > +const std::string ha_resolve_storage_engine_name(const > drizzled::plugin::StorageEngine *db_type); > + > > #endif /* DRIZZLED_PLUGIN_STORAGE_ENGINE_H */ > > === modified file 'drizzled/registry.h' > --- drizzled/registry.h 2009-08-17 20:54:05 +0000 > +++ drizzled/registry.h 2009-09-27 23:10:30 +0000 > @@ -23,6 +23,7 @@ > #include > #include > #include > +#include > #include > #include > > > === modified file 'drizzled/replication_services.cc' > --- drizzled/replication_services.cc 2009-09-16 17:10:18 +0000 > +++ drizzled/replication_services.cc 2009-09-27 23:10:30 +0000 > @@ -56,28 +56,6 @@ > using namespace std; > using namespace drizzled; > > -ReplicationServices replication_services; > - > -void add_replicator(plugin::CommandReplicator *replicator) > -{ > - replication_services.attachReplicator(replicator); > -} > - > -void remove_replicator(plugin::CommandReplicator *replicator) > -{ > - replication_services.detachReplicator(replicator); > -} > - > -void add_applier(plugin::CommandApplier *applier) > -{ > - replication_services.attachApplier(applier); > -} > - > -void remove_applier(plugin::CommandApplier *applier) > -{ > - replication_services.detachApplier(applier); > -} > - > ReplicationServices::ReplicationServices() > { > is_active= false; > > === modified file 'drizzled/replication_services.h' > --- drizzled/replication_services.h 2009-07-29 09:19:15 +0000 > +++ drizzled/replication_services.h 2009-09-27 23:10:30 +0000 > @@ -42,21 +42,13 @@ > { > class Command; > } > -} > - > -void add_replicator(drizzled::plugin::CommandReplicator *replicator); > -void remove_replicator(drizzled::plugin::CommandReplicator > *replicator); > - > -void add_applier(drizzled::plugin::CommandApplier *applier); > -void remove_applier(drizzled::plugin::CommandApplier *applier); > + > > /** > * This is a class which manages transforming internal > * transactional events into GPB messages and sending those > * events out through registered replicators and appliers. > */ > -namespace drizzled > -{ > class ReplicationServices > { > public: > @@ -103,6 +95,17 @@ > * Constructor > */ > ReplicationServices(); > + > + /** > + * Singleton method > + * Returns the singleton instance of ReplicationServices > + */ > + static inline ReplicationServices &singleton() > + { > + static ReplicationServices replication_services; > + return replication_services; > + } > + > /** > * Returns whether the ReplicationServices object > * is active. In other words, does it have both > > === modified file 'drizzled/server_includes.h' > --- drizzled/server_includes.h 2009-09-22 07:35:28 +0000 > +++ drizzled/server_includes.h 2009-09-27 23:10:30 +0000 > @@ -37,8 +37,8 @@ > /* Custom C string functions */ > #include > > -/* The INTERNAL plugin API - not the external, or > public, server plugin API */ > -#include > +/* The plugin API */ > +#include > /* Range optimization API/library */ > #include > /* Routines for dropping, repairing, checking schema tables */ > @@ -150,8 +150,8 @@ > extern struct my_option my_long_options[]; > extern std::bitset<5> sql_command_flags[]; > > -extern StorageEngine *myisam_engine; > -extern StorageEngine *heap_engine; > +extern drizzled::plugin::StorageEngine *myisam_engine; > +extern drizzled::plugin::StorageEngine *heap_engine; > > extern SHOW_COMP_OPTION have_symlink; > > > === renamed directory 'drizzled/slot' => 'drizzled/service' > === renamed file 'drizzled/authentication.cc' => 'drizzled/service/ > authentication.cc' > --- drizzled/authentication.cc 2009-08-05 09:29:04 +0000 > +++ drizzled/service/authentication.cc 2009-09-27 23:10:31 +0000 > @@ -19,38 +19,46 @@ > */ > > #include "drizzled/server_includes.h" > -#include "drizzled/authentication.h" > -#include "drizzled/gettext.h" > +#include "drizzled/service/authentication.h" > #include "drizzled/errmsg_print.h" > #include "drizzled/plugin/registry.h" > +#include "drizzled/plugin/authentication.h" > +#include "drizzled/gettext.h" > > #include > > +using namespace drizzled; > using namespace std; > > -static vector all_authentication; > - > -static bool are_plugins_loaded= false; > - > -void add_authentication(Authentication *auth) > -{ > - all_authentication.push_back(auth); > -} > - > -void remove_authentication(Authentication *auth) > -{ > - all_authentication.erase(find(all_authentication.begin(), > - all_authentication.end(), > - auth)); > -} > - > -class AuthenticateBy : public unary_function > + > +void service::Authentication::add(plugin::Authentication *auth) > +{ > + if (auth != NULL) > + all_authentication.push_back(auth); > +} > + > +void service::Authentication::remove(plugin::Authentication *auth) > +{ > + if (auth != NULL) > + all_authentication.erase(find(all_authentication.begin(), > + all_authentication.end(), > + auth)); > +} > + > +namespace drizzled > +{ > +namespace service > +{ > +namespace auth_priv > +{ > + > +class AuthenticateBy : public unary_function *, bool> > { > Session *session; > const char *password; > public: > AuthenticateBy(Session *session_arg, const char *password_arg) : > - unary_function(), > + unary_function(), > session(session_arg), password(password_arg) {} > > inline result_type operator()(argument_type auth) > @@ -58,17 +66,20 @@ > return auth->authenticate(session, password); > } > }; > +} /* namespace auth_priv */ > +} /* namespace service */ > +} /* namespace drizzled */ > > -bool authenticate_user(Session *session, const char *password) > +bool service::Authentication::authenticate(Session *session, const > char *password) > { > /* If we never loaded any auth plugins, just return true */ > if (are_plugins_loaded != true) > return true; > > /* Use find_if instead of foreach so that we can collect return > codes */ > - vector::iterator iter= > + vector::iterator iter= > find_if(all_authentication.begin(), all_authentication.end(), > - AuthenticateBy(session, password)); > + service::auth_priv::AuthenticateBy(session, password)); > /* If iter is == end() here, that means that all of the plugins > returned > * false, which in this case means they all succeeded. Since we > want to > * return false on success, we return the value of the two being != > > === renamed file 'drizzled/authentication.h' => 'drizzled/service/ > authentication.h' > --- drizzled/authentication.h 2009-05-11 17:50:22 +0000 > +++ drizzled/service/authentication.h 2009-09-27 23:10:31 +0000 > @@ -19,13 +19,39 @@ > */ > > > -#ifndef DRIZZLED_AUTHENTICATION_H > -#define DRIZZLED_AUTHENTICATION_H > - > -#include > - > -bool authenticate_user(Session *session, const char *password); > -void add_authentication(Authentication *auth); > -void remove_authentication(Authentication *auth); > - > -#endif /* DRIZZLED_AUTHENTICATION_H */ > +#ifndef DRIZZLED_SERVICE_AUTHENTICATION_H > +#define DRIZZLED_SERVICE_AUTHENTICATION_H > + > +#include > + > +class Session; > + > +namespace drizzled > +{ > +namespace plugin > +{ > + class Authentication; > +} > + > +namespace service > +{ > + > +class Authentication > +{ > +private: > + std::vector all_authentication; > + bool are_plugins_loaded; > + > +public: > + Authentication() : all_authentication(), are_plugins_loaded > (false) {} > + ~Authentication() {} > + > + void add(plugin::Authentication *auth); > + void remove(plugin::Authentication *auth); > + bool authenticate(Session *session, const char *password); > +}; > + > +} /* namespace service */ > +} /* namespace drizzled */ > + > +#endif /* DRIZZLED_SERVICE_AUTHENTICATION_H */ > > === added file 'drizzled/service/command_applier.cc' > --- drizzled/service/command_applier.cc 1970-01-01 00:00:00 +0000 > +++ drizzled/service/command_applier.cc 2009-09-27 23:10:31 +0000 > @@ -0,0 +1,39 @@ > +/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*- > + * vim:expandtab:shiftwidth=2:tabstop=2:smarttab: > + * > + * Copyright (C) 2009 Sun Microsystems > + * > + * This program is free software; you can redistribute it and/or > modify > + * it under the terms of the GNU General Public License as > published by > + * the Free Software Foundation; version 2 of the License. > + * > + * This program is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + * > + * You should have received a copy of the GNU General Public License > + * along with this program; if not, write to the Free Software > + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA > 02110-1301 USA > + */ > + > +#include "drizzled/global.h" > + > +#include "drizzled/replication_services.h" > +#include "drizzled/service/command_applier.h" > + > +using namespace std; > +using namespace drizzled; > + > +void service::CommandApplier::add(plugin::CommandApplier *applier) > +{ > + ReplicationServices &replication_services= > ReplicationServices::singleton(); > + replication_services.attachApplier(applier); > +} > + > +void service::CommandApplier::remove(plugin::CommandApplier *applier) > +{ > + ReplicationServices &replication_services= > ReplicationServices::singleton(); > + replication_services.detachApplier(applier); > +} > + > > === added file 'drizzled/service/command_applier.h' > --- drizzled/service/command_applier.h 1970-01-01 00:00:00 +0000 > +++ drizzled/service/command_applier.h 2009-09-27 23:10:31 +0000 > @@ -0,0 +1,46 @@ > +/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*- > + * vim:expandtab:shiftwidth=2:tabstop=2:smarttab: > + * > + * Copyright (C) 2009 Sun Microsystems > + * > + * This program is free software; you can redistribute it and/or > modify > + * it under the terms of the GNU General Public License as > published by > + * the Free Software Foundation; version 2 of the License. > + * > + * This program is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + * > + * You should have received a copy of the GNU General Public License > + * along with this program; if not, write to the Free Software > + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA > 02110-1301 USA > + */ > + > +#ifndef DRIZZLED_SERVICE_COMMAND_APPLIER_H > +#define DRIZZLED_SERVICE_COMMAND_APPLIER_H > + > +namespace drizzled > +{ > +namespace plugin > +{ > + class CommandApplier; > +} > + > +namespace service > +{ > + > +class CommandApplier > +{ > +public: > + void add(plugin::CommandApplier *applier); > + > + void remove(plugin::CommandApplier *applier); > + > +}; > + > + > +} /* end namespace service */ > +} /* end namespace drizzled */ > + > +#endif /* DRIZZLED_SERVICE_COMMAND_APPLIER_H */ > > === added file 'drizzled/service/command_replicator.cc' > --- drizzled/service/command_replicator.cc 1970-01-01 00:00:00 +0000 > +++ drizzled/service/command_replicator.cc 2009-09-27 23:10:31 +0000 > @@ -0,0 +1,40 @@ > +/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*- > + * vim:expandtab:shiftwidth=2:tabstop=2:smarttab: > + * > + * Copyright (C) 2009 Sun Microsystems > + * > + * This program is free software; you can redistribute it and/or > modify > + * it under the terms of the GNU General Public License as > published by > + * the Free Software Foundation; version 2 of the License. > + * > + * This program is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + * > + * You should have received a copy of the GNU General Public License > + * along with this program; if not, write to the Free Software > + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA > 02110-1301 USA > + */ > + > +#include "drizzled/global.h" > + > +#include "drizzled/replication_services.h" > +#include "drizzled/service/command_replicator.h" > + > +using namespace std; > +using namespace drizzled; > + > +void service::CommandReplicator::add(plugin::CommandReplicator > *replicator) > +{ > + ReplicationServices &replication_services= > ReplicationServices::singleton(); > + replication_services.attachReplicator(replicator); > +} > + > +void service::CommandReplicator::remove(plugin::CommandReplicator > *replicator) > +{ > + ReplicationServices &replication_services= > ReplicationServices::singleton(); > + replication_services.detachReplicator(replicator); > +} > + > + > > === added file 'drizzled/service/command_replicator.h' > --- drizzled/service/command_replicator.h 1970-01-01 00:00:00 +0000 > +++ drizzled/service/command_replicator.h 2009-09-27 23:10:31 +0000 > @@ -0,0 +1,47 @@ > +/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*- > + * vim:expandtab:shiftwidth=2:tabstop=2:smarttab: > + * > + * Copyright (C) 2009 Sun Microsystems > + * > + * This program is free software; you can redistribute it and/or > modify > + * it under the terms of the GNU General Public License as > published by > + * the Free Software Foundation; version 2 of the License. > + * > + * This program is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + * > + * You should have received a copy of the GNU General Public License > + * along with this program; if not, write to the Free Software > + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA > 02110-1301 USA > + */ > + > +#ifndef DRIZZLED_SERVICE_COMMAND_REPLICATOR_H > +#define DRIZZLED_SERVICE_COMMAND_REPLICATOR_H > + > + > +namespace drizzled > +{ > +namespace plugin > +{ > + class CommandReplicator; > +} > + > +namespace service > +{ > + > +class CommandReplicator > +{ > +public: > + void add(plugin::CommandReplicator *replicator); > + > + void remove(plugin::CommandReplicator *replicator); > + > +}; > + > + > +} /* end namespace service */ > +} /* end namespace drizzled */ > + > +#endif /* DRIZZLED_SERVICE_COMMAND_REPLICATOR_H */ > > === renamed file 'drizzled/errmsg.cc' => 'drizzled/service/ > error_message.cc' > --- drizzled/errmsg.cc 2009-08-05 09:29:04 +0000 > +++ drizzled/service/error_message.cc 2009-09-27 23:10:31 +0000 > @@ -17,48 +17,54 @@ > * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA > 02110-1301 USA > */ > > -#include > -#include > -#include > +#include "drizzled/server_includes.h" > +#include "drizzled/service/error_message.h" > +#include "drizzled/plugin/error_message.h" > #include "drizzled/plugin/registry.h" > > +#include "drizzled/gettext.h" > + > #include > > +using namespace drizzled; > using namespace std; > > -static vector all_errmsg_handler; > - > -static bool errmsg_has= false; > - > -void add_errmsg_handler(Error_message_handler *handler) > +void service::ErrorMessage::add(plugin::ErrorMessage *handler) > { > all_errmsg_handler.push_back(handler); > errmsg_has= true; > } > > -void remove_errmsg_handler(Error_message_handler *handler) > +void service::ErrorMessage::remove(plugin::ErrorMessage *handler) > { > all_errmsg_handler.erase(find(all_errmsg_handler.begin(), > all_errmsg_handler.end(), handler)); > } > > > -class ErrorMessagePrint : public > unary_function > +namespace drizzled > +{ > +namespace service > +{ > +namespace errmsg_priv > +{ > + > +class Print : public unary_function > { > Session *session; > int priority; > const char *format; > va_list ap; > public: > - ErrorMessagePrint(Session *session_arg, int priority_arg, > - const char *format_arg, va_list ap_arg) : > - unary_function(), session > (session_arg), > - priority(priority_arg), format(format_arg) > + Print(Session *session_arg, int priority_arg, > + const char *format_arg, va_list ap_arg) > + : unary_function(), session > (session_arg), > + priority(priority_arg), format(format_arg) > { > va_copy(ap, ap_arg); > } > > - ~ErrorMessagePrint() { va_end(ap); } > + ~Print() { va_end(ap); } > > inline result_type operator()(argument_type handler) > { > @@ -76,10 +82,14 @@ > } > return false; > } > -}; > - > -bool errmsg_vprintf (Session *session, int priority, > - char const *format, va_list ap) > +}; > + > +} /* namespace errmsg_priv */ > +} /* namespace service */ > +} /* namespace drizzled */ > + > +bool service::ErrorMessage::vprintf(Session *session, int priority, > + char const *format, va_list ap) > { > > /* check to see if any errmsg plugin has been loaded > @@ -95,9 +105,9 @@ > } > > /* Use find_if instead of foreach so that we can collect return > codes */ > - vector::iterator iter= > + vector::iterator iter= > find_if(all_errmsg_handler.begin(), all_errmsg_handler.end(), > - ErrorMessagePrint(session, priority, format, ap)); > + service::errmsg_priv::Print(session, priority, format, > ap)); > /* If iter is == end() here, that means that all of the plugins > returned > * false, which in this case means they all succeeded. Since we > want to > * return false on success, we return the value of the two being != > > === renamed file 'drizzled/errmsg.h' => 'drizzled/service/ > error_message.h' > --- drizzled/errmsg.h 2009-05-11 17:50:22 +0000 > +++ drizzled/service/error_message.h 2009-09-27 23:10:31 +0000 > @@ -17,17 +17,40 @@ > * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA > 02110-1301 USA > */ > > -#ifndef DRIZZLED_ERRMSG_H > -#define DRIZZLED_ERRMSG_H > - > -#include > +#ifndef DRIZZLED_SERVICE_ERROR_MESSAGE_H > +#define DRIZZLED_SERVICE_ERROR_MESSAGE_H > > // need stdarg for va_list > #include > - > -void add_errmsg_handler(Error_message_handler *handler); > -void remove_errmsg_handler(Error_message_handler *handler); > - > -bool errmsg_vprintf (Session *session, int priority, char const > *format, va_list ap); > - > -#endif /* DRIZZLED_ERRMSG_H */ > +#include > + > +namespace drizzled > +{ > +namespace plugin > +{ > + class ErrorMessage; > +} > +namespace service > +{ > + > +class ErrorMessage > +{ > +private: > + std::vector all_errmsg_handler; > + > + bool errmsg_has; > + > +public: > + ErrorMessage() : all_errmsg_handler(), errmsg_has(false) {} > + ~ErrorMessage() {} > + > + void add(plugin::ErrorMessage *handler); > + void remove(plugin::ErrorMessage *handler); > + > + bool vprintf(Session *session, int priority, char const *format, > va_list ap); > +}; > + > +} /* namespace service */ > +} /* namespace drizzled */ > + > +#endif /* DRIZZLED_SERVICE_ERROR_MESSAGE_H */ > > === modified file 'drizzled/service/function.cc' > --- drizzled/slot/function.cc 2009-08-17 20:54:05 +0000 > +++ drizzled/service/function.cc 2009-09-27 23:10:31 +0000 > @@ -17,23 +17,23 @@ > #include > #include > #include > -#include "drizzled/slot/function.h" > +#include "drizzled/service/function.h" > > using namespace std; > using namespace drizzled; > > > -const plugin::Function *slot::Function::get(const char *name, > size_t length) const > +const plugin::Function *service::Function::get(const char *name, > size_t length) const > { > return udf_registry.find(name, length); > } > > -void slot::Function::add(const plugin::Function *udf) > +void service::Function::add(const plugin::Function *udf) > { > udf_registry.add(udf); > } > > -void slot::Function::remove(const plugin::Function *udf) > +void service::Function::remove(const plugin::Function *udf) > { > udf_registry.remove(udf); > } > > === modified file 'drizzled/service/function.h' > --- drizzled/slot/function.h 2009-08-17 21:30:20 +0000 > +++ drizzled/service/function.h 2009-09-27 23:10:31 +0000 > @@ -17,8 +17,8 @@ > * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA > 02110-1301 USA > */ > > -#ifndef DRIZZLED_SLOT_FUNCTION_H > -#define DRIZZLED_SLOT_FUNCTION_H > +#ifndef DRIZZLED_SERVICE_FUNCTION_H > +#define DRIZZLED_SERVICE_FUNCTION_H > > /* This file defines structures needed by udf functions */ > > @@ -28,7 +28,7 @@ > > namespace drizzled > { > -namespace slot > +namespace service > { > > /** > @@ -60,7 +60,7 @@ > > }; > > -} /* end namespace slot */ > +} /* end namespace service */ > } /* end namespace drizzled */ > > -#endif /* DRIZZLED_SLOT_FUNCTION_H */ > +#endif /* DRIZZLED_SERVICE_FUNCTION_H */ > > === added file 'drizzled/service/info_schema.cc' > --- drizzled/service/info_schema.cc 1970-01-01 00:00:00 +0000 > +++ drizzled/service/info_schema.cc 2009-09-27 23:10:31 +0000 > @@ -0,0 +1,150 @@ > +/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*- > + * vim:expandtab:shiftwidth=2:tabstop=2:smarttab: > + * > + * Copyright (C) 2008 Sun Microsystems > + * > + * This program is free software; you can redistribute it and/or > modify > + * it under the terms of the GNU General Public License as > published by > + * the Free Software Foundation; either version 2 of the License, or > + * (at your option) any later version. > + * > + * This program is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + * > + * You should have received a copy of the GNU General Public License > + * along with this program; if not, write to the Free Software > + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA > 02110-1301 USA > + */ > + > +#include "drizzled/server_includes.h" > +#include "drizzled/service/info_schema.h" > +#include "drizzled/plugin/info_schema_table.h" > +#include "drizzled/gettext.h" > +#include "drizzled/session.h" > +#include "drizzled/lex_string.h" > + > +#include > + > +using namespace std; > + > +namespace drizzled > +{ > + > +void service::InfoSchema::add(plugin::InfoSchemaTable *schema_table) > +{ > + if (schema_table->getFirstColumnIndex() == 0) > + schema_table->setFirstColumnIndex(-1); > + if (schema_table->getSecondColumnIndex() == 0) > + schema_table->setSecondColumnIndex(-1); > + > + all_schema_tables.push_back(schema_table); > +} > + > +void service::InfoSchema::remove(plugin::InfoSchemaTable *table) > +{ > + all_schema_tables.erase(remove_if(all_schema_tables.begin(), > + all_schema_tables.end(), > + bind2nd > (equal_to(), > + table)), > + all_schema_tables.end()); > +} > + > + > +namespace service > +{ > +namespace i_s_priv > +{ > + > +class AddSchemaTable : public > unary_function > +{ > + Session *session; > + const char *wild; > + vector &files; > + > +public: > + AddSchemaTable(Session *session_arg, vector > &files_arg, const char *wild_arg) > + : session(session_arg), wild(wild_arg), files(files_arg) > + {} > + > + result_type operator() (argument_type schema_table) > + { > + if (schema_table->isHidden()) > + { > + return false; > + } > + > + const string &schema_table_name= schema_table->getTableName(); > + > + if (wild && wild_case_compare(files_charset_info, > schema_table_name.c_str(), wild)) > + { > + return false; > + } > + > + LEX_STRING *file_name= 0; > + file_name= session->make_lex_string(file_name, > schema_table_name.c_str(), > + schema_table_name.length(), > true); > + if (file_name == NULL) > + { > + return true; > + } > + > + files.push_back(file_name); > + return false; > + } > +}; > + > +class FindSchemaTableByName : public > unary_function > +{ > + const char *table_name; > +public: > + FindSchemaTableByName(const char *table_name_arg) > + : table_name(table_name_arg) {} > + result_type operator() (argument_type schema_table) > + { > + return ! my_strcasecmp(system_charset_info, > + schema_table->getTableName().c_str(), > + table_name); > + } > +}; > + > +} > +} > + > +plugin::InfoSchemaTable *service::InfoSchema::getTable(const char > *table_name) > +{ > + vector::iterator iter= > + find_if(all_schema_tables.begin(), > + all_schema_tables.end(), > + service::i_s_priv::FindSchemaTableByName(table_name)); > + > + if (iter != all_schema_tables.end()) > + { > + return *iter; > + } > + > + return NULL; > + > +} > + > + > +int service::InfoSchema::addTableToList(Session *session, > + vector &files, > + const char *wild) > +{ > + > + vector::iterator iter= > + find_if(all_schema_tables.begin(), > + all_schema_tables.end(), > + service::i_s_priv::AddSchemaTable(session, files, wild)); > + > + if (iter != all_schema_tables.end()) > + { > + return 1; > + } > + > + return 0; > +} > + > +} /* namespace drizzled */ > > === added file 'drizzled/service/info_schema.h' > --- drizzled/service/info_schema.h 1970-01-01 00:00:00 +0000 > +++ drizzled/service/info_schema.h 2009-09-27 23:10:31 +0000 > @@ -0,0 +1,59 @@ > +/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*- > + * vim:expandtab:shiftwidth=2:tabstop=2:smarttab: > + * > + * Copyright (C) 2008 Sun Microsystems > + * > + * This program is free software; you can redistribute it and/or > modify > + * it under the terms of the GNU General Public License as > published by > + * the Free Software Foundation; either version 2 of the License, or > + * (at your option) any later version. > + * > + * This program is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + * > + * You should have received a copy of the GNU General Public License > + * along with this program; if not, write to the Free Software > + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA > 02110-1301 USA > + */ > + > + > +#ifndef DRIZZLED_SERVICE_INFO_SCHEMA_H > +#define DRIZZLED_SERVICE_INFO_SCHEMA_H > + > +#include > +#include > + > +namespace drizzled > +{ > +namespace plugin > +{ > + class InfoSchemaTable; > +} > + > +namespace service > +{ > + > +class InfoSchema > +{ > +private: > + > + std::vector all_schema_tables; > + > +public: > + InfoSchema() : all_schema_tables() {} > + ~InfoSchema() {} > + > + void add(plugin::InfoSchemaTable *schema_table); > + void remove(plugin::InfoSchemaTable *table); > + plugin::InfoSchemaTable *getTable(const char *table_name); > + int addTableToList(Session *session, std::vector > &files, > + const char *wild); > + > +}; > + > +} /* namespace service */ > +} /* namespace drizzled */ > + > +#endif /* DRIZZLED_SERVICE_INFO_SCHEMA_H */ > > === modified file 'drizzled/service/listen.cc' > --- drizzled/slot/listen.cc 2009-08-28 00:07:54 +0000 > +++ drizzled/service/listen.cc 2009-09-27 23:10:31 +0000 > @@ -20,7 +20,7 @@ > #include > #include > #include > -#include > +#include > #include > #include > > @@ -29,24 +29,24 @@ > using namespace std; > using namespace drizzled; > > -slot::Listen::Listen(): > +service::Listen::Listen(): > fd_list(NULL), > fd_count(0) > { > } > > -slot::Listen::~Listen() > +service::Listen::~Listen() > { > if (fd_list != NULL) > free(fd_list); > } > > -void slot::Listen::add(plugin::Listen &listen_obj) > +void service::Listen::add(plugin::Listen &listen_obj) > { > listen_list.push_back(&listen_obj); > } > > -void slot::Listen::remove(plugin::Listen &listen_obj) > +void service::Listen::remove(plugin::Listen &listen_obj) > { > listen_list.erase(::std::remove(listen_list.begin(), > listen_list.end(), > @@ -54,7 +54,7 @@ > listen_list.end()); > } > > -bool slot::Listen::setup(void) > +bool service::Listen::setup(void) > { > vector::iterator it; > struct pollfd *tmp_fd_list; > @@ -121,7 +121,7 @@ > return false; > } > > -plugin::Client *slot::Listen::getClient(void) const > +plugin::Client *service::Listen::getClient(void) const > { > int ready; > uint32_t x; > @@ -173,12 +173,12 @@ > } > } > > -plugin::Client *slot::Listen::getNullClient(void) const > +plugin::Client *service::Listen::getNullClient(void) const > { > return new plugin::NullClient(); > } > > -void slot::Listen::shutdown(void) > +void service::Listen::shutdown(void) > { > ssize_t ret= write(wakeup_pipe[1], "\0", 1); > assert(ret == 1); > > === modified file 'drizzled/service/listen.h' > --- drizzled/slot/listen.h 2009-08-28 00:07:54 +0000 > +++ drizzled/service/listen.h 2009-09-27 23:10:31 +0000 > @@ -17,8 +17,8 @@ > * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA > 02110-1301 USA > */ > > -#ifndef DRIZZLED_SLOT_LISTEN_H > -#define DRIZZLED_SLOT_LISTEN_H > +#ifndef DRIZZLED_SERVICE_LISTEN_H > +#define DRIZZLED_SERVICE_LISTEN_H > > #include > > @@ -33,7 +33,7 @@ > class Listen; > } > > -namespace slot > +namespace service > { > > /** > @@ -85,7 +85,7 @@ > void shutdown(void); > }; > > -} /* end namespace slot */ > +} /* end namespace service */ > } /* end namespace drizzled */ > > -#endif /* DRIZZLED_SLOT_LISTEN_H */ > +#endif /* DRIZZLED_SERVICE_LISTEN_H */ > > === renamed file 'drizzled/logging.cc' => 'drizzled/service/ > logging.cc' > --- drizzled/logging.cc 2009-08-05 09:29:04 +0000 > +++ drizzled/service/logging.cc 2009-09-27 23:10:31 +0000 > @@ -18,35 +18,41 @@ > */ > > #include > -#include > +#include > #include > #include "drizzled/plugin/registry.h" > > #include > > +using namespace drizzled; > using namespace std; > > -static vector all_loggers; > - > -void add_logger(Logging_handler *handler) > +void service::Logging::add(plugin::Logging *handler) > { > if (handler != NULL) > all_loggers.push_back(handler); > } > > -void remove_logger(Logging_handler *handler) > +void service::Logging::remove(plugin::Logging *handler) > { > if (handler != NULL) > all_loggers.erase(find(all_loggers.begin(), all_loggers.end(), > handler)); > } > > > -class LoggingPreIterate : public unary_function bool> > +namespace drizzled > +{ > +namespace service > +{ > +namespace logging_priv > +{ > + > +class PreIterate : public unary_function > { > Session *session; > public: > - LoggingPreIterate(Session *session_arg) : > - unary_function(), > + PreIterate(Session *session_arg) : > + unary_function(), > session(session_arg) {} > > inline result_type operator()(argument_type handler) > @@ -65,12 +71,12 @@ > }; > > > -class LoggingPostIterate : public unary_function bool> > +class PostIterate : public unary_function > { > Session *session; > public: > - LoggingPostIterate(Session *session_arg) : > - unary_function(), > + PostIterate(Session *session_arg) : > + unary_function(), > session(session_arg) {} > > /* This gets called once for each loaded logging plugin */ > @@ -89,15 +95,19 @@ > } > }; > > +} /* namespace logging_priv */ > +} /* namespace service */ > +} /* namespace drizzled */ > + > > /* This is the logging_pre_do entry point. > This gets called by the rest of the Drizzle server code */ > -bool logging_pre_do (Session *session) > +bool service::Logging::pre_do(Session *session) > { > /* Use find_if instead of foreach so that we can collect return > codes */ > - vector::iterator iter= > + vector::iterator iter= > find_if(all_loggers.begin(), all_loggers.end(), > - LoggingPreIterate(session)); > + service::logging_priv::PreIterate(session)); > /* If iter is == end() here, that means that all of the plugins > returned > * false, which in this case means they all succeeded. Since we > want to > * return false on success, we return the value of the two being != > @@ -107,12 +117,12 @@ > > /* This is the logging_post_do entry point. > This gets called by the rest of the Drizzle server code */ > -bool logging_post_do (Session *session) > +bool service::Logging::post_do(Session *session) > { > /* Use find_if instead of foreach so that we can collect return > codes */ > - vector::iterator iter= > + vector::iterator iter= > find_if(all_loggers.begin(), all_loggers.end(), > - LoggingPostIterate(session)); > + service::logging_priv::PostIterate(session)); > /* If iter is == end() here, that means that all of the plugins > returned > * false, which in this case means they all succeeded. Since we > want to > * return false on success, we return the value of the two being != > > === renamed file 'drizzled/logging.h' => 'drizzled/service/logging.h' > --- drizzled/logging.h 2009-05-11 17:50:22 +0000 > +++ drizzled/service/logging.h 2009-09-27 23:10:31 +0000 > @@ -17,18 +17,38 @@ > * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA > 02110-1301 USA > */ > > -#ifndef DRIZZLED_LOGGING_H > -#define DRIZZLED_LOGGING_H > - > -#include > +#ifndef DRIZZLED_SERVICE_LOGGING_H > +#define DRIZZLED_SERVICE_LOGGING_H > + > +#include > + > +#include > + > +namespace drizzled > +{ > +namespace service > +{ > > /* there are no parameters other than the session because logging can > * pull everything it needs out of the session. If need to add > * parameters, look at how errmsg.h and errmsg.cc do it. */ > > -bool logging_pre_do (Session *session); > -bool logging_post_do (Session *session); > -void add_logger(Logging_handler *handler); > -void remove_logger(Logging_handler *handler); > - > -#endif /* DRIZZLED_LOGGING_H */ > +class Logging > +{ > +private: > + std::vector all_loggers; > + > +public: > + Logging() : all_loggers() {} > + ~Logging() {} > + > + void add(plugin::Logging *handler); > + void remove(plugin::Logging *handler); > + bool pre_do(Session *session); > + bool post_do(Session *session); > +}; > + > +} /* namespace service */ > +} /* namespace drizzled */ > + > +#endif /* DRIZZLED_SERVICE_LOGGING_H */ > > === renamed file 'drizzled/qcache.cc' => 'drizzled/service/ > query_cache.cc' > --- drizzled/qcache.cc 2009-08-05 09:29:04 +0000 > +++ drizzled/service/query_cache.cc 2009-09-27 23:10:31 +0000 > @@ -17,42 +17,40 @@ > * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA > 02110-1301 USA > */ > > -#include > -#include > -#include > +#include "drizzled/server_includes.h" > +#include "drizzled/service/query_cache.h" > +#include "drizzled/plugin/query_cache.h" > #include "drizzled/plugin/registry.h" > + > +#include "drizzled/gettext.h" > + > #include > > +using namespace drizzled; > using namespace std; > > -static vector all_query_cache; > - > -void add_query_cache(QueryCache *handler) > -{ > - all_query_cache.push_back(handler); > -} > - > -void remove_query_cache(QueryCache *handler) > -{ > - all_query_cache.erase(find(all_query_cache.begin(), > all_query_cache.end(), > - handler)); > -} > - > - > +namespace plugin > +{ > + class QueryCache; > +} > + > +namespace drizzled > +{ > +namespace service > +{ > +namespace query_cache_priv > +{ > > /* Namespaces are here to prevent global symbol clashes with these > classes */ > > -namespace drizzled { > -namespace query_cache { > - > class TryFetchAndSendIterate > - : public unary_function > + : public unary_function > { > Session *session; > bool is_transactional; > public: > TryFetchAndSendIterate(Session *session_arg, bool > is_transactional_arg) : > - unary_function(), > + unary_function(), > session(session_arg), is_transactional(is_transactional_arg) { } > > inline result_type operator()(argument_type handler) > @@ -69,13 +67,13 @@ > }; > > class SetIterate > - : public unary_function > + : public unary_function > { > Session *session; > bool is_transactional; > public: > SetIterate(Session *session_arg, bool is_transactional_arg) : > - unary_function(), > + unary_function(), > session(session_arg), is_transactional(is_transactional_arg) { } > > inline result_type operator()(argument_type handler) > @@ -92,13 +90,13 @@ > }; > > class InvalidateTableIterate > - : public unary_function > + : public unary_function > { > Session *session; > bool is_transactional; > public: > InvalidateTableIterate(Session *session_arg, bool > is_transactional_arg) : > - unary_function(), > + unary_function(), > session(session_arg), is_transactional(is_transactional_arg) { } > > inline result_type operator()(argument_type handler) > @@ -117,7 +115,7 @@ > > > class InvalidateDbIterate > - : public unary_function > + : public unary_function > { > Session *session; > const char *dbname; > @@ -125,7 +123,7 @@ > public: > InvalidateDbIterate(Session *session_arg, const char *dbname_arg, > bool is_transactional_arg) : > - unary_function(), > + unary_function(), > session(session_arg), dbname(dbname_arg), > is_transactional(is_transactional_arg) { } > > @@ -143,12 +141,12 @@ > }; > > class FlushIterate > - : public unary_function > + : public unary_function > { > Session *session; > public: > FlushIterate(Session *session_arg) : > - unary_function(), session(session_arg) { } > + unary_function(), session > (session_arg) { } > > inline result_type operator()(argument_type handler) > { > @@ -162,6 +160,22 @@ > } > }; > > +} /* namespace query_cache_priv */ > +} /* namespace service */ > +} /* namespace drizzled */ > + > +void service::QueryCache::add(plugin::QueryCache *handler) > +{ > + all_query_cache.push_back(handler); > +} > + > +void service::QueryCache::remove(plugin::QueryCache *handler) > +{ > + all_query_cache.erase(find(all_query_cache.begin(), > all_query_cache.end(), > + handler)); > +} > + > + > /* > Following functions: > > @@ -175,72 +189,73 @@ > rest of the Drizzle server code. > */ > > -bool try_fetch_and_send(Session *session, bool transactional) > -{ > - /* Use find_if instead of foreach so that we can collect return > codes */ > - vector::iterator iter= > - find_if(all_query_cache.begin(), all_query_cache.end(), > - TryFetchAndSendIterate(session, transactional)); > - /* If iter is == end() here, that means that all of the plugins > returned > - * false, which in this case means they all succeeded. Since we > want to > - * return false on success, we return the value of the two being != > - */ > - return iter != all_query_cache.end(); > -} > - > -bool set(Session *session, bool transactional) > -{ > - /* Use find_if instead of foreach so that we can collect return > codes */ > - vector::iterator iter= > - find_if(all_query_cache.begin(), all_query_cache.end(), > - SetIterate(session, transactional)); > - /* If iter is == end() here, that means that all of the plugins > returned > - * false, which in this case means they all succeeded. Since we > want to > - * return false on success, we return the value of the two being != > - */ > - return iter != all_query_cache.end(); > -} > - > -bool invalidate_table(Session *session, bool transactional) > -{ > - /* Use find_if instead of foreach so that we can collect return > codes */ > - vector::iterator iter= > - find_if(all_query_cache.begin(), all_query_cache.end(), > - InvalidateTableIterate(session, transactional)); > - /* If iter is == end() here, that means that all of the plugins > returned > - * false, which in this case means they all succeeded. Since we > want to > - * return false on success, we return the value of the two being != > - */ > - return iter != all_query_cache.end(); > -} > - > -bool invalidate_db(Session *session, const char *dbname, > - bool transactional) > -{ > - /* Use find_if instead of foreach so that we can collect return > codes */ > - vector::iterator iter= > - find_if(all_query_cache.begin(), all_query_cache.end(), > - InvalidateDbIterate(session, dbname, transactional)); > - /* If iter is == end() here, that means that all of the plugins > returned > - * false, which in this case means they all succeeded. Since we > want to > - * return false on success, we return the value of the two being != > - */ > - return iter != all_query_cache.end(); > -} > - > -bool flush(Session *session) > -{ > - /* Use find_if instead of foreach so that we can collect return > codes */ > - vector::iterator iter= > - find_if(all_query_cache.begin(), all_query_cache.end(), > - FlushIterate(session)); > - /* If iter is == end() here, that means that all of the plugins > returned > - * false, which in this case means they all succeeded. Since we > want to > - * return false on success, we return the value of the two being != > - */ > - return iter != all_query_cache.end(); > -} > - > -} /* namespace query_cache */ > -} /* namespace drizzled */ > +bool service::QueryCache::try_fetch_and_send(Session *session, bool > transactional) > +{ > + /* Use find_if instead of foreach so that we can collect return > codes */ > + vector::iterator iter= > + find_if(all_query_cache.begin(), all_query_cache.end(), > + service::query_cache_priv::TryFetchAndSendIterate > (session, > + > transactional)); > + /* If iter is == end() here, that means that all of the plugins > returned > + * false, which in this case means they all succeeded. Since we > want to > + * return false on success, we return the value of the two being != > + */ > + return iter != all_query_cache.end(); > +} > + > +bool service::QueryCache::set(Session *session, bool transactional) > +{ > + /* Use find_if instead of foreach so that we can collect return > codes */ > + vector::iterator iter= > + find_if(all_query_cache.begin(), all_query_cache.end(), > + service::query_cache_priv::SetIterate(session, > transactional)); > + /* If iter is == end() here, that means that all of the plugins > returned > + * false, which in this case means they all succeeded. Since we > want to > + * return false on success, we return the value of the two being != > + */ > + return iter != all_query_cache.end(); > +} > + > +bool service::QueryCache::invalidate_table(Session *session, bool > transactional) > +{ > + /* Use find_if instead of foreach so that we can collect return > codes */ > + vector::iterator iter= > + find_if(all_query_cache.begin(), all_query_cache.end(), > + service::query_cache_priv::InvalidateTableIterate > (session, > + > transactional)); > + /* If iter is == end() here, that means that all of the plugins > returned > + * false, which in this case means they all succeeded. Since we > want to > + * return false on success, we return the value of the two being != > + */ > + return iter != all_query_cache.end(); > +} > + > +bool service::QueryCache::invalidate_db(Session *session, const > char *dbname, > + bool transactional) > +{ > + /* Use find_if instead of foreach so that we can collect return > codes */ > + vector::iterator iter= > + find_if(all_query_cache.begin(), all_query_cache.end(), > + service::query_cache_priv::InvalidateDbIterate(session, > + dbname, > + > transactional)); > + /* If iter is == end() here, that means that all of the plugins > returned > + * false, which in this case means they all succeeded. Since we > want to > + * return false on success, we return the value of the two being != > + */ > + return iter != all_query_cache.end(); > +} > + > +bool service::QueryCache::flush(Session *session) > +{ > + /* Use find_if instead of foreach so that we can collect return > codes */ > + vector::iterator iter= > + find_if(all_query_cache.begin(), all_query_cache.end(), > + service::query_cache_priv::FlushIterate(session)); > + /* If iter is == end() here, that means that all of the plugins > returned > + * false, which in this case means they all succeeded. Since we > want to > + * return false on success, we return the value of the two being != > + */ > + return iter != all_query_cache.end(); > +} > > > === renamed file 'drizzled/qcache.h' => 'drizzled/service/ > query_cache.h' > --- drizzled/qcache.h 2009-07-07 09:06:29 +0000 > +++ drizzled/service/query_cache.h 2009-09-27 23:10:31 +0000 > @@ -17,24 +17,44 @@ > * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA > 02110-1301 USA > */ > > -#ifndef DRIZZLED_QCACHE_H > -#define DRIZZLED_QCACHE_H > - > -#include > - > -void add_query_cache(QueryCache *handler); > -void remove_query_cache(QueryCache *handler); > - > -namespace drizzled { > -namespace query_cache { > -/* These are the functions called by the rest of the Drizzle server > */ > -bool try_fetch_and_send(Session *session, bool transactional); > -bool set(Session *session, bool transactional); > -bool invalidate_table(Session *session, bool transactional); > -bool invalidate_db(Session *session, const char *db_name, > - bool transactional); > -bool flush(Session *session); > -} > -} > - > -#endif /* DRIZZLED_QCACHE_H */ > +#ifndef DRIZZLED_SERVICE_QUERY_CACHE_H > +#define DRIZZLED_SERVICE_QUERY_CACHE_H > + > +#include > + > +namespace drizzled > +{ > + > +namespace plugin > +{ > + class QueryCache; > +} > + > +namespace service > +{ > + > +class QueryCache > +{ > +private: > + std::vector all_query_cache; > + > +public: > + QueryCache() : all_query_cache() {} > + ~QueryCache() {} > + > + void add(plugin::QueryCache *handler); > + void remove(plugin::QueryCache *handler); > + > + /* These are the functions called by the rest of the Drizzle > server */ > + bool try_fetch_and_send(Session *session, bool transactional); > + bool set(Session *session, bool transactional); > + bool invalidate_table(Session *session, bool transactional); > + bool invalidate_db(Session *session, const char *db_name, > + bool transactional); > + bool flush(Session *session); > +}; /* class QueryCache */ > + > +} /* namespace service */ > +} /* namespace drizzled */ > + > +#endif /* DRIZZLED_SERVICE_QUERY_CACHE_H */ > > === renamed file 'drizzled/scheduling.cc' => 'drizzled/service/ > scheduler.cc' > --- drizzled/scheduling.cc 2009-08-05 09:29:04 +0000 > +++ drizzled/service/scheduler.cc 2009-09-27 23:10:31 +0000 > @@ -17,19 +17,20 @@ > * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA > 02110-1301 USA > */ > > -#include > -#include > -#include > +#include "drizzled/server_includes.h" > +#include "drizzled/service/scheduler.h" > +#include "drizzled/plugin/scheduler.h" > #include "drizzled/plugin/registry.h" > -#include "drizzled/registry.h" > - > + > +#include "drizzled/gettext.h" > + > +using namespace drizzled; > using namespace std; > -using namespace drizzled; > - > -plugin::SchedulerFactory *scheduler_factory= NULL; > -Registry all_schedulers; > - > -bool add_scheduler_factory(plugin::SchedulerFactory *factory) > + > +service::Scheduler::Scheduler() : scheduler_factory(NULL), > all_schedulers() {} > +service::Scheduler::~Scheduler() {} > + > +void service::Scheduler::add(plugin::SchedulerFactory *factory) > { > if (all_schedulers.count(factory->getName()) != 0) > { > @@ -37,22 +38,20 @@ > _("Attempted to register a scheduler %s, but a > scheduler " > "has already been registered with that name.\n"), > factory->getName().c_str()); > - return true; > + return; > } > all_schedulers.add(factory); > - return false; > } > > > -bool remove_scheduler_factory(plugin::SchedulerFactory *factory) > +void service::Scheduler::remove(plugin::SchedulerFactory *factory) > { > scheduler_factory= NULL; > all_schedulers.remove(factory); > - return false; > } > > > -bool set_scheduler_factory(const string& name) > +bool service::Scheduler::setFactory(const string& name) > { > > plugin::SchedulerFactory *factory= all_schedulers.find(name); > @@ -68,7 +67,7 @@ > return false; > } > > -plugin::Scheduler *get_thread_scheduler() > +plugin::Scheduler *service::Scheduler::getScheduler() > { > assert(scheduler_factory != NULL); > plugin::Scheduler *sched= (*scheduler_factory)(); > @@ -79,4 +78,3 @@ > } > return sched; > } > - > > === renamed file 'drizzled/scheduling.h' => 'drizzled/service/ > scheduler.h' > --- drizzled/scheduling.h 2009-08-04 22:16:30 +0000 > +++ drizzled/service/scheduler.h 2009-09-27 23:10:31 +0000 > @@ -17,16 +17,46 @@ > * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA > 02110-1301 USA > */ > > -#ifndef DRIZZLED_SCHEDULING_H > -#define DRIZZLED_SCHEDULING_H > - > -#include > - > -#include > - > -drizzled::plugin::Scheduler *get_thread_scheduler(); > -bool add_scheduler_factory(drizzled::plugin::SchedulerFactory > *scheduler); > -bool remove_scheduler_factory(drizzled::plugin::SchedulerFactory > *scheduler); > -bool set_scheduler_factory(const std::string& name); > - > -#endif /* DRIZZLED_SCHEDULING_H */ > +#ifndef DRIZZLED_SERVICE_SCHEDULER_H > +#define DRIZZLED_SERVICE_SCHEDULER_H > + > +#include > + > +namespace drizzled > +{ > + > +namespace plugin > +{ > + class SchedulerFactory; > + class Scheduler; > +} > + > +namespace service > +{ > + > +/** > + * Class to handle all Scheduler objects > + */ > +class Scheduler > +{ > +private: > + > + plugin::SchedulerFactory *scheduler_factory; > + Registry all_schedulers; > + > +public: > + > + Scheduler(); > + ~Scheduler(); > + > + void add(plugin::SchedulerFactory *factory); > + void remove(plugin::SchedulerFactory *factory); > + bool setFactory(const std::string& name); > + plugin::Scheduler *getScheduler(); > + > +}; > + > +} /* namespace service */ > +} /* namespace drizzled */ > + > +#endif /* DRIZZLED_SERVICE_SCHEDULER_H */ > > === added file 'drizzled/service/storage_engine.cc' > --- drizzled/service/storage_engine.cc 1970-01-01 00:00:00 +0000 > +++ drizzled/service/storage_engine.cc 2009-09-27 23:10:31 +0000 > @@ -0,0 +1,772 @@ > +/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*- > + * vim:expandtab:shiftwidth=2:tabstop=2:smarttab: > + * > + * Copyright (C) 2009 Sun Microsystems > + * > + * This program is free software; you can redistribute it and/or > modify > + * it under the terms of the GNU General Public License as > published by > + * the Free Software Foundation; version 2 of the License. > + * > + * This program is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + * > + * You should have received a copy of the GNU General Public License > + * along with this program; if not, write to the Free Software > + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA > 02110-1301 USA > + */ > + > +#include "drizzled/global.h" > + > +#include > +#include > +#include > + > +#include > +#include > + > +#include "mysys/my_dir.h" > +#include "mysys/hash.h" > + > +#include "drizzled/service/storage_engine.h" > +#include "drizzled/plugin/storage_engine.h" > +#include "drizzled/gettext.h" > +#include "drizzled/xid.h" > +#include "drizzled/errmsg_print.h" > +#include "drizzled/plugin/registry.h" > +#include "drizzled/session.h" > + > +namespace drizzled > +{ > +namespace service > +{ > + > +StorageEngine::StorageEngine() : all_engines() {} > +StorageEngine::~StorageEngine() {} > + > +void StorageEngine::add(plugin::StorageEngine *engine) > +{ > + all_engines.add(engine); > +} > + > +void StorageEngine::remove(plugin::StorageEngine *engine) > +{ > + all_engines.remove(engine); > +} > + > +plugin::StorageEngine *StorageEngine::findByName(Session *session, > + std::string > find_str) > +{ > + > + transform(find_str.begin(), find_str.end(), > + find_str.begin(), ::tolower); > + string default_str("default"); > + if (find_str == default_str) > + return ha_default_storage_engine(session); > + > + plugin::StorageEngine *engine= all_engines.find(find_str); > + > + if (engine && engine->is_user_selectable()) > + return engine; > + > + return NULL; > +} > + > +class StorageEngineCloseConnection > + : public unary_function > +{ > + Session *session; > +public: > + StorageEngineCloseConnection(Session *session_arg) : session > (session_arg) {} > + /* > + there's no need to rollback here as all transactions must > + be rolled back already > + */ > + inline result_type operator() (argument_type engine) > + { > + if (engine->is_enabled() && > + session_get_ha_data(session, engine)) > + engine->close_connection(session); > + } > +}; > + > +/** > + @note > + don't bother to rollback here, it's done already > +*/ > +void StorageEngine::closeConnection(Session* session) > +{ > + for_each(all_engines.begin(), all_engines.end(), > + StorageEngineCloseConnection(session)); > +} > + > +void StorageEngine::dropDatabase(char* path) > +{ > + for_each(all_engines.begin(), all_engines.end(), > + bind2nd(mem_fun > (&plugin::StorageEngine::drop_database),path)); > +} > + > +int StorageEngine::commitOrRollbackByXID(XID *xid, bool commit) > +{ > + vector results; > + > + if (commit) > + transform(all_engines.begin(), all_engines.end(), results.begin > (), > + bind2nd(mem_fun > (&plugin::StorageEngine::commit_by_xid),xid)); > + else > + transform(all_engines.begin(), all_engines.end(), results.begin > (), > + bind2nd(mem_fun > (&plugin::StorageEngine::rollback_by_xid),xid)); > + > + if (find_if(results.begin(), results.end(), bind2nd(equal_to > (),0)) > + == results.end()) > + return 1; > + return 0; > +} > + > +/** > + @details > + This function should be called when MySQL sends rows of a SELECT > result set > + or the EOF mark to the client. It releases a possible adaptive > hash index > + S-latch held by session in InnoDB and also releases a possible > InnoDB query > + FIFO ticket to enter InnoDB. To save CPU time, InnoDB allows a > session to > + keep them over several calls of the InnoDB handler interface when > a join > + is executed. But when we let the control to pass to the client > they have > + to be released because if the application program uses > mysql_use_result(), > + it may deadlock on the S-latch if the application on another > connection > + performs another SQL query. In MySQL-4.1 this is even more > important because > + there a connection can have several SELECT queries open at the > same time. > + > + @param session the thread handle of the current > connection > + > + @return > + always 0 > +*/ > +int StorageEngine::releaseTemporaryLatches(Session *session) > +{ > + for_each(all_engines.begin(), all_engines.end(), > + bind2nd(mem_fun > (&plugin::StorageEngine::release_temporary_latches),session)); > + return 0; > +} > + > +bool StorageEngine::flushLogs(plugin::StorageEngine *engine) > +{ > + if (engine == NULL) > + { > + if (find_if(all_engines.begin(), all_engines.end(), > + mem_fun(&plugin::StorageEngine::flush_logs)) > + != all_engines.begin()) > + return true; > + } > + else > + { > + if ((!engine->is_enabled()) || > + (engine->flush_logs())) > + return true; > + } > + return false; > +} > + > +/** > + recover() step of xa. > + > + @note > + there are three modes of operation: > + - automatic recover after a crash > + in this case commit_list != 0, tc_heuristic_recover==0 > + all xids from commit_list are committed, others are rolled back > + - manual (heuristic) recover > + in this case commit_list==0, tc_heuristic_recover != 0 > + DBA has explicitly specified that all prepared transactions > should > + be committed (or rolled back). > + - no recovery (MySQL did not detect a crash) > + in this case commit_list==0, tc_heuristic_recover == 0 > + there should be no prepared transactions in this case. > +*/ > +class XARecover : unary_function > +{ > + int trans_len, found_foreign_xids, found_my_xids; > + bool result; > + XID *trans_list; > + HASH *commit_list; > + bool dry_run; > +public: > + XARecover(XID *trans_list_arg, int trans_len_arg, > + HASH *commit_list_arg, bool dry_run_arg) > + : trans_len(trans_len_arg), found_foreign_xids(0), found_my_xids > (0), > + result(false), > + trans_list(trans_list_arg), commit_list(commit_list_arg), > + dry_run(dry_run_arg) > + {} > + > + int getForeignXIDs() > + { > + return found_foreign_xids; > + } > + > + int getMyXIDs() > + { > + return found_my_xids; > + } > + > + result_type operator() (argument_type engine) > + { > + > + int got; > + > + if (engine->is_enabled()) > + { > + while ((got= engine->recover(trans_list, trans_len)) > 0 ) > + { > + errmsg_printf(ERRMSG_LVL_INFO, > + _("Found %d prepared transaction(s) in %s"), > + got, engine->getName().c_str()); > + for (int i=0; i < got; i ++) > + { > + my_xid x=trans_list[i].get_my_xid(); > + if (!x) // not "mine" - that is generated by external TM > + { > + xid_cache_insert(trans_list+i, XA_PREPARED); > + found_foreign_xids++; > + continue; > + } > + if (dry_run) > + { > + found_my_xids++; > + continue; > + } > + // recovery mode > + if (commit_list ? > + hash_search(commit_list, (unsigned char *)&x, sizeof > (x)) != 0 : > + tc_heuristic_recover == TC_HEURISTIC_RECOVER_COMMIT) > + { > + engine->commit_by_xid(trans_list+i); > + } > + else > + { > + engine->rollback_by_xid(trans_list+i); > + } > + } > + if (got < trans_len) > + break; > + } > + } > + } > +}; > + > +int StorageEngine::recover(HASH *commit_list) > +{ > + XID *trans_list= NULL; > + int trans_len= 0; > + > + bool dry_run= (commit_list==0 && tc_heuristic_recover==0); > + > + /* commit_list and tc_heuristic_recover cannot be set both */ > + assert(commit_list==0 || tc_heuristic_recover==0); > + > + /* if either is set, total_ha_2pc must be set too */ > + if (total_ha_2pc <= 1) > + return 0; > + > + > +#ifndef WILL_BE_DELETED_LATER > + > + /* > + for now, only InnoDB supports 2pc. It means we can always safely > + rollback all pending transactions, without risking inconsistent > data > + */ > + > + assert(total_ha_2pc == 2); // only InnoDB and binlog > + tc_heuristic_recover= TC_HEURISTIC_RECOVER_ROLLBACK; // forcing > ROLLBACK > + dry_run=false; > +#endif > + for (trans_len= MAX_XID_LIST_SIZE ; > + trans_list==0 && trans_len > MIN_XID_LIST_SIZE; trans_len/=2) > + { > + trans_list=(XID *)malloc(trans_len*sizeof(XID)); > + } > + if (!trans_list) > + { > + errmsg_printf(ERRMSG_LVL_ERROR, ER(ER_OUTOFMEMORY), > trans_len*sizeof(XID)); > + return(1); > + } > + > + if (commit_list) > + errmsg_printf(ERRMSG_LVL_INFO, _("Starting crash recovery...")); > + > + > + XARecover recover_func(trans_list, trans_len, commit_list, > dry_run); > + for_each(all_engines.begin(), all_engines.end(), recover_func); > + free(trans_list); > + > + if (recover_func.getForeignXIDs()) > + errmsg_printf(ERRMSG_LVL_WARN, > + _("Found %d prepared XA transactions"), > + recover_func.getForeignXIDs()); > + if (dry_run && recover_func.getMyXIDs()) > + { > + errmsg_printf(ERRMSG_LVL_ERROR, > + _("Found %d prepared transactions! It means that > drizzled " > + "was not shut down properly last time and > critical " > + "recovery information (last binlog or %s file) > was " > + "manually deleted after a crash. You have to > start " > + "drizzled with the --tc-heuristic-recover > switch to " > + "commit or rollback pending transactions."), > + recover_func.getMyXIDs(), opt_tc_log_file); > + return(1); > + } > + if (commit_list) > + errmsg_printf(ERRMSG_LVL_INFO, _("Crash recovery finished.")); > + return(0); > +} > + > +int StorageEngine::startConsistentSnapshot(Session *session) > +{ > + for_each(all_engines.begin(), all_engines.end(), > + bind2nd(mem_fun > (&plugin::StorageEngine::start_consistent_snapshot), > + session)); > + return 0; > +} > + > +class StorageEngineGetTableProto: public > unary_function > +{ > + const char* path; > + message::Table *table_proto; > + int *err; > +public: > + StorageEngineGetTableProto(const char* path_arg, > + message::Table *table_proto_arg, > + int *err_arg) > + :path(path_arg), table_proto(table_proto_arg), err(err_arg) {} > + > + result_type operator() (argument_type engine) > + { > + int ret= engine->getTableProtoImplementation(path, table_proto); > + > + if (ret != ENOENT) > + *err= ret; > + > + return *err == EEXIST; > + } > +}; > + > +static int drizzle_read_table_proto(const char* path, > message::Table* table) > +{ > + int fd= open(path, O_RDONLY); > + > + if (fd == -1) > + return errno; > + > + google::protobuf::io::ZeroCopyInputStream* input= > + new google::protobuf::io::FileInputStream(fd); > + > + if (table->ParseFromZeroCopyStream(input) == false) > + { > + delete input; > + close(fd); > + return -1; > + } > + > + delete input; > + close(fd); > + return 0; > +} > + > +/** > + Call this function in order to give the handler the possiblity > + to ask engine if there are any new tables that should be written > to disk > + or any dropped tables that need to be removed from disk > +*/ > +int StorageEngine::getTableProto(const char* path, > + message::Table *table_proto) > +{ > + int err= ENOENT; > + > + Registry::iterator iter= > + find_if(all_engines.begin(), all_engines.end(), > + StorageEngineGetTableProto(path, table_proto, &err)); > + if (iter == all_engines.end()) > + { > + string proto_path(path); > + string file_ext(".dfe"); > + proto_path.append(file_ext); > + > + int error= access(proto_path.c_str(), F_OK); > + > + if (error == 0) > + err= EEXIST; > + else > + err= errno; > + > + if (table_proto) > + { > + int read_proto_err= drizzle_read_table_proto(proto_path.c_str > (), > + table_proto); > + > + if (read_proto_err) > + err= read_proto_err; > + } > + } > + > + return err; > +} > + > +/** > + An interceptor to hijack the text of the error message without > + setting an error in the thread. We need the text to present it > + in the form of a warning to the user. > +*/ > + > +class Ha_delete_table_error_handler: public Internal_error_handler > +{ > +public: > + Ha_delete_table_error_handler() : Internal_error_handler() {} > + virtual bool handle_error(uint32_t sql_errno, > + const char *message, > + DRIZZLE_ERROR::enum_warning_level level, > + Session *session); > + char buff[DRIZZLE_ERRMSG_SIZE]; > +}; > + > + > +bool > +Ha_delete_table_error_handler:: > +handle_error(uint32_t , > + const char *message, > + DRIZZLE_ERROR::enum_warning_level , > + Session *) > +{ > + /* Grab the error message */ > + strncpy(buff, message, sizeof(buff)-1); > + return true; > +} > + > + > +class DeleteTableStorageEngine > + : public unary_function > +{ > + Session *session; > + const char *path; > + handler **file; > + int *dt_error; > +public: > + DeleteTableStorageEngine(Session *session_arg, const char > *path_arg, > + handler **file_arg, int *error_arg) > + : session(session_arg), path(path_arg), file(file_arg), dt_error > (error_arg) {} > + > + result_type operator() (argument_type engine) > + { > + char tmp_path[FN_REFLEN]; > + handler *tmp_file; > + > + if(*dt_error!=ENOENT) /* already deleted table */ > + return; > + > + if (!engine) > + return; > + > + if (!engine->is_enabled()) > + return; > + > + if ((tmp_file= engine->create(NULL, session->mem_root))) > + tmp_file->init(); > + else > + return; > + > + path= engine->checkLowercaseNames(path, tmp_path); > + const std::string table_path(path); > + int tmp_error= engine->deleteTable(session, table_path); > + > + if (tmp_error != ENOENT) > + { > + if (tmp_error == 0) > + { > + if (engine->check_flag(HTON_BIT_HAS_DATA_DICTIONARY)) > + delete_table_proto_file(path); > + else > + tmp_error= delete_table_proto_file(path); > + } > + > + *dt_error= tmp_error; > + if(*file) > + delete *file; > + *file= tmp_file; > + return; > + } > + else > + delete tmp_file; > + > + return; > + } > +}; > + > + > +/** > + This should return ENOENT if the file doesn't exists. > + The .frm file will be deleted only if we return 0 or ENOENT > +*/ > +int StorageEngine::deleteTable(Session *session, const char *path, > + const char *db, const char *alias, > + bool generate_warning) > +{ > + TableShare dummy_share; > + Table dummy_table; > + memset(&dummy_table, 0, sizeof(dummy_table)); > + memset(&dummy_share, 0, sizeof(dummy_share)); > + > + dummy_table.s= &dummy_share; > + > + int error= ENOENT; > + handler *file= NULL; > + > + for_each(all_engines.begin(), all_engines.end(), > + DeleteTableStorageEngine(session, path, &file, &error)); > + > + if (error == ENOENT) /* proto may be left behind */ > + error= delete_table_proto_file(path); > + > + if (error && generate_warning) > + { > + /* > + Because file->print_error() use my_error() to generate the > error message > + we use an internal error handler to intercept it and store > the text > + in a temporary buffer. Later the message will be presented to > user > + as a warning. > + */ > + Ha_delete_table_error_handler ha_delete_table_error_handler; > + > + /* Fill up strucutures that print_error may need */ > + dummy_share.path.str= (char*) path; > + dummy_share.path.length= strlen(path); > + dummy_share.db.str= (char*) db; > + dummy_share.db.length= strlen(db); > + dummy_share.table_name.str= (char*) alias; > + dummy_share.table_name.length= strlen(alias); > + dummy_table.alias= alias; > + > + if(file != NULL) > + { > + file->change_table_ptr(&dummy_table, &dummy_share); > + > + session->push_internal_handler(&ha_delete_table_error_handler); > + file->print_error(error, 0); > + > + session->pop_internal_handler(); > + } > + else > + error= -1; /* General form of fail. maybe bad FRM */ > + > + /* > + XXX: should we convert *all* errors to warnings here? > + What if the error is fatal? > + */ > + push_warning(session, DRIZZLE_ERROR::WARN_LEVEL_ERROR, error, > + ha_delete_table_error_handler.buff); > + } > + > + if(file) > + delete file; > + > + return error; > +} > + > +class DFETableNameIterator: public > plugin::TableNameIteratorImplementation > +{ > +private: > + MY_DIR *dirp; > + uint32_t current_entry; > + > +public: > + DFETableNameIterator(const std::string &database) > + : plugin::TableNameIteratorImplementation(database), > + dirp(NULL), > + current_entry(-1) > + {}; > + > + ~DFETableNameIterator(); > + > + int next(std::string *name); > + > +}; > + > +DFETableNameIterator::~DFETableNameIterator() > +{ > + if (dirp) > + my_dirend(dirp); > +} > + > +int DFETableNameIterator::next(string *name) > +{ > + char uname[NAME_LEN + 1]; > + FILEINFO *file; > + char *ext; > + uint32_t file_name_len; > + const char *wild= NULL; > + > + if (dirp == NULL) > + { > + bool dir= false; > + char path[FN_REFLEN]; > + > + build_table_filename(path, sizeof(path), db.c_str(), "", false); > + > + dirp = my_dir(path,MYF(dir ? MY_WANT_STAT : 0)); > + > + if (dirp == NULL) > + { > + if (my_errno == ENOENT) > + my_error(ER_BAD_DB_ERROR, MYF(ME_BELL+ME_WAITTANG), db.c_str > ()); > + else > + my_error(ER_CANT_READ_DIR, MYF(ME_BELL+ME_WAITTANG), path, > my_errno); > + return(ENOENT); > + } > + current_entry= -1; > + } > + > + while(true) > + { > + current_entry++; > + > + if (current_entry == dirp->number_off_files) > + { > + my_dirend(dirp); > + dirp= NULL; > + return -1; > + } > + > + file= dirp->dir_entry + current_entry; > + > + if (my_strcasecmp(system_charset_info, ext=fn_rext(file- > >name),".dfe") || > + is_prefix(file->name, TMP_FILE_PREFIX)) > + continue; > + *ext=0; > + > + file_name_len= filename_to_tablename(file->name, uname, sizeof > (uname)); > + > + uname[file_name_len]= '\0'; > + > + if (wild && wild_compare(uname, wild, 0)) > + continue; > + > + if (name) > + name->assign(uname); > + > + return 0; > + } > +} > + > + > +TableNameIterator::TableNameIterator(const std::string &db) > + : current_implementation(NULL), database(db) > +{ > + plugin::Registry &plugins= plugin::Registry::singleton(); > + engine_iter= plugins.storage_engine.begin(); > + default_implementation= new DFETableNameIterator(database); > +} > + > +TableNameIterator::~TableNameIterator() > +{ > + delete current_implementation; > +} > + > +int TableNameIterator::next(std::string *name) > +{ > + plugin::Registry &plugins= plugin::Registry::singleton(); > + int err= 0; > + > +next: > + if (current_implementation == NULL) > + { > + while(current_implementation == NULL && > + (engine_iter != plugins.storage_engine.end())) > + { > + plugin::StorageEngine *engine= *engine_iter; > + current_implementation= engine->tableNameIterator(database); > + engine_iter++; > + } > + > + if (current_implementation == NULL && > + (engine_iter == plugins.storage_engine.end())) > + { > + current_implementation= default_implementation; > + } > + } > + > + err= current_implementation->next(name); > + > + if (err == -1) > + { > + if (current_implementation != default_implementation) > + { > + delete current_implementation; > + current_implementation= NULL; > + goto next; > + } > + } > + > + return err; > +} > + > + > +} /* namespace service */ > +} /* namespace drizzled */ > + > + > + > +drizzled::plugin::StorageEngine *ha_resolve_by_name(Session *session, > + const > std::string &find_str) > +{ > + drizzled::plugin::Registry &plugins= > drizzled::plugin::Registry::singleton(); > + return plugins.storage_engine.findByName(session, find_str); > +} > + > +void ha_close_connection(Session *session) > +{ > + drizzled::plugin::Registry &plugins= > drizzled::plugin::Registry::singleton(); > + plugins.storage_engine.closeConnection(session); > +} > + > +void ha_drop_database(char* path) > +{ > + drizzled::plugin::Registry &plugins= > drizzled::plugin::Registry::singleton(); > + plugins.storage_engine.dropDatabase(path); > +} > + > +int ha_commit_or_rollback_by_xid(XID *xid, bool commit) > +{ > + drizzled::plugin::Registry &plugins= > drizzled::plugin::Registry::singleton(); > + return plugins.storage_engine.commitOrRollbackByXID(xid, commit); > +} > + > +int ha_release_temporary_latches(Session *session) > +{ > + drizzled::plugin::Registry &plugins= > drizzled::plugin::Registry::singleton(); > + return plugins.storage_engine.releaseTemporaryLatches(session); > +} > + > +bool ha_flush_logs(drizzled::plugin::StorageEngine *engine) > +{ > + drizzled::plugin::Registry &plugins= > drizzled::plugin::Registry::singleton(); > + return plugins.storage_engine.flushLogs(engine); > +} > + > +int ha_recover(HASH *commit_list) > +{ > + drizzled::plugin::Registry &plugins= > drizzled::plugin::Registry::singleton(); > + return plugins.storage_engine.recover(commit_list); > +} > + > +int ha_start_consistent_snapshot(Session *session) > +{ > + drizzled::plugin::Registry &plugins= > drizzled::plugin::Registry::singleton(); > + return plugins.storage_engine.startConsistentSnapshot(session); > +} > + > +int ha_delete_table(Session *session, const char *path, > + const char *db, const char *alias, bool > generate_warning) > +{ > + drizzled::plugin::Registry &plugins= > drizzled::plugin::Registry::singleton(); > + return plugins.storage_engine.deleteTable(session, path, db, > + alias, generate_warning); > +} > + > > === added file 'drizzled/service/storage_engine.h' > --- drizzled/service/storage_engine.h 1970-01-01 00:00:00 +0000 > +++ drizzled/service/storage_engine.h 2009-09-27 23:10:31 +0000 > @@ -0,0 +1,132 @@ > +/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*- > + * vim:expandtab:shiftwidth=2:tabstop=2:smarttab: > + * > + * Copyright (C) 2009 Sun Microsystems > + * > + * This program is free software; you can redistribute it and/or > modify > + * it under the terms of the GNU General Public License as > published by > + * the Free Software Foundation; version 2 of the License. > + * > + * This program is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + * > + * You should have received a copy of the GNU General Public License > + * along with this program; if not, write to the Free Software > + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA > 02110-1301 USA > + */ > + > +#ifndef DRIZZLED_SERVICE_STORAGE_ENGINE_H > +#define DRIZZLED_SERVICE_STORAGE_ENGINE_H > + > +#include "drizzled/registry.h" > + > +#include > + > +class Session; > +class XID; > +typedef struct st_hash HASH; > + > +namespace drizzled > +{ > + > +namespace plugin > +{ > + class StorageEngine; > + class TableNameIteratorImplementation; > +} > + > +namespace message > +{ > + class Table; > +} > + > +namespace service > +{ > + > +/** > + * Class to handle all Storage Engine plugins > + */ > +class StorageEngine > +{ > +private: > + > + Registry all_engines; > + > +public: > + > + StorageEngine(); > + ~StorageEngine(); > + > + void add(plugin::StorageEngine *engine); > + void remove(plugin::StorageEngine *engine); > + > + Registry::iterator begin() > + { > + return all_engines.begin(); > + } > + > + Registry::iterator end() > + { > + return all_engines.end(); > + } > + > + int getTableProto(const char* path, message::Table *table_proto); > + > + plugin::StorageEngine *findByName(Session *session, > + std::string find_str); > + void closeConnection(Session* session); > + void dropDatabase(char* path); > + int commitOrRollbackByXID(XID *xid, bool commit); > + int releaseTemporaryLatches(Session *session); > + bool flushLogs(plugin::StorageEngine *db_type); > + int recover(HASH *commit_list); > + int startConsistentSnapshot(Session *session); > + int deleteTable(Session *session, const char *path, const char *db, > + const char *alias, bool generate_warning); > + > +}; > + > +class TableNameIterator > +{ > +private: > + Registry::iterator engine_iter; > + plugin::TableNameIteratorImplementation *current_implementation; > + plugin::TableNameIteratorImplementation *default_implementation; > + std::string database; > +public: > + TableNameIterator(const std::string &db); > + ~TableNameIterator(); > + > + int next(std::string *name); > +}; > + > +} /* namespace service */ > +} /* namespace drizzled */ > + > +/** > + Return the storage engine plugin::StorageEngine for the supplied > name > + > + @param session current thread > + @param name name of storage engine > + > + @return > + pointer to storage engine plugin handle > +*/ > +drizzled::plugin::StorageEngine *ha_resolve_by_name(Session *session, > + const > std::string &find_str); > + > +void ha_close_connection(Session* session); > +void ha_drop_database(char* path); > +int ha_commit_or_rollback_by_xid(XID *xid, bool commit); > + > +/* report to InnoDB that control passes to the client */ > +int ha_release_temporary_latches(Session *session); > +bool ha_flush_logs(drizzled::plugin::StorageEngine *db_type); > +int ha_recover(HASH *commit_list); > +int ha_start_consistent_snapshot(Session *session); > +int ha_delete_table(Session *session, const char *path, > + const char *db, const char *alias, bool > generate_warning); > + > +#endif /* DRIZZLED_SERVICE_STORAGE_ENGINE_H */ > > === modified file 'drizzled/session.cc' > --- drizzled/session.cc 2009-09-26 02:16:50 +0000 > +++ drizzled/session.cc 2009-09-27 23:10:30 +0000 > @@ -36,8 +36,8 @@ > #include > #include > #include > -#include > #include > +#include "drizzled/plugin/scheduler.h" > #include "drizzled/probes.h" > > #include > @@ -144,7 +144,7 @@ > } > > extern "C" > -void **session_ha_data(const Session *session, const struct > StorageEngine *engine) > +void **session_ha_data(const Session *session, const > plugin::StorageEngine *engine) > { > return (void **) &session->ha_data[engine->slot].ha_ptr; > } > @@ -608,7 +608,9 @@ > > bool Session::schedule() > { > - scheduler= get_thread_scheduler(); > + plugin::Registry &plugins= plugin::Registry::singleton(); > + > + scheduler= plugins.scheduler.getScheduler(); > > ++connection_count; > > @@ -653,6 +655,7 @@ > > bool Session::checkUser(const char *passwd, uint32_t passwd_len, > const char *in_db) > { > + plugin::Registry &plugins= plugin::Registry::singleton(); > LEX_STRING db_str= { (char *) in_db, in_db ? strlen(in_db) : 0 }; > bool is_authenticated; > > @@ -670,7 +673,7 @@ > return false; > } > > - is_authenticated= authenticate_user(this, passwd); > + is_authenticated= plugins.authentication.authenticate(this, > passwd); > > if (is_authenticated != true) > { > @@ -1925,7 +1928,7 @@ > > void Session::close_temporary(Table *table, bool free_share, bool > delete_table) > { > - StorageEngine *table_type= table->s->db_type(); > + plugin::StorageEngine *table_type= table->s->db_type(); > > table->free_io_cache(); > table->closefrm(false); > @@ -2151,7 +2154,7 @@ > return false; > } > > -bool Session::rm_temporary_table(StorageEngine *base, char *path) > +bool Session::rm_temporary_table(plugin::StorageEngine *base, char > *path) > { > bool error=0; > > > === modified file 'drizzled/session.h' > --- drizzled/session.h 2009-09-26 02:16:50 +0000 > +++ drizzled/session.h 2009-09-27 23:10:30 +0000 > @@ -23,7 +23,7 @@ > > /* Classes in mysql */ > > -#include > +#include "drizzled/plugin.h" > #include > #include > #include > @@ -33,7 +33,6 @@ > #include > #include > #include > -#include > #include > #include > > @@ -170,7 +169,7 @@ > /* TODO: change this to my_thread_id - but have to fix set_var > first */ > uint64_t pseudo_thread_id; > > - StorageEngine *storage_engine; > + drizzled::plugin::StorageEngine *storage_engine; > > /* Only charset part of these variables is sensible */ > const CHARSET_INFO *character_set_filesystem; > @@ -1410,7 +1409,7 @@ > void close_temporary_table(Table *table, bool free_share, bool > delete_table); > void close_temporary(Table *table, bool free_share, bool > delete_table); > int drop_temporary_table(TableList *table_list); > - bool rm_temporary_table(StorageEngine *base, char *path); > + bool rm_temporary_table(drizzled::plugin::StorageEngine *base, > char *path); > Table *open_temporary_table(const char *path, const char *db, > const char *table_name, bool > link_in_list, > open_table_mode open_mode); > > === modified file 'drizzled/set_var.cc' > --- drizzled/set_var.cc 2009-09-15 02:21:15 +0000 > +++ drizzled/set_var.cc 2009-09-27 23:10:30 +0000 > @@ -57,13 +57,14 @@ > #include > #include > #include > -#include > +#include > > #include "drizzled/registry.h" > #include > #include > > using namespace std; > +using namespace drizzled; > > extern const CHARSET_INFO *character_set_filesystem; > extern size_t my_thread_stack_size; > @@ -2056,7 +2057,7 @@ > else > { > const std::string engine_name(res->ptr()); > - StorageEngine *engine; > + plugin::StorageEngine *engine; > var->save_result.storage_engine= ha_resolve_by_name(session, > engine_name); > if (var->save_result.storage_engine == NULL) > { > @@ -2081,7 +2082,7 @@ > { > unsigned char* result; > string engine_name; > - StorageEngine *engine= session->variables.*offset; > + plugin::StorageEngine *engine= session->variables.*offset; > if (type == OPT_GLOBAL) > engine= global_system_variables.*offset; > engine_name= engine->getName(); > @@ -2093,7 +2094,7 @@ > > void sys_var_session_storage_engine::set_default(Session *session, > enum_var_type type) > { > - StorageEngine *old_value, *new_value, **value; > + plugin::StorageEngine *old_value, *new_value, **value; > if (type == OPT_GLOBAL) > { > value= &(global_system_variables.*offset); > @@ -2112,7 +2113,7 @@ > > bool sys_var_session_storage_engine::update(Session *session, > set_var *var) > { > - StorageEngine **value= &(global_system_variables.*offset), > *old_value; > + plugin::StorageEngine **value= & > (global_system_variables.*offset), *old_value; > if (var->type != OPT_GLOBAL) > value= &(session->variables.*offset); > old_value= *value; > > === modified file 'drizzled/set_var.h' > --- drizzled/set_var.h 2009-08-13 21:22:40 +0000 > +++ drizzled/set_var.h 2009-09-27 23:10:30 +0000 > @@ -656,10 +656,10 @@ > class sys_var_session_storage_engine :public sys_var_session > { > protected: > - StorageEngine *SV::*offset; > + drizzled::plugin::StorageEngine *SV::*offset; > public: > sys_var_session_storage_engine(sys_var_chain *chain, const char > *name_arg, > - StorageEngine *SV::*offset_arg) > + drizzled::plugin::StorageEngine > *SV::*offset_arg) > :sys_var_session(name_arg), offset(offset_arg) > { chain_sys_var(chain); } > bool check(Session *session, set_var *var); > @@ -983,7 +983,7 @@ > uint32_t uint32_t_value; > uint64_t uint64_t_value; > size_t size_t_value; > - StorageEngine *storage_engine; > + drizzled::plugin::StorageEngine *storage_engine; > Time_zone *time_zone; > MY_LOCALE *locale_value; > } save_result; > > === modified file 'drizzled/show.cc' > --- drizzled/show.cc 2009-08-31 23:50:37 +0000 > +++ drizzled/show.cc 2009-09-27 23:10:30 +0000 > @@ -40,7 +40,7 @@ > #include > #include > #include "drizzled/plugin/registry.h" > -#include > +#include > #include > #include > #include > @@ -66,26 +66,6 @@ > > static void store_key_options(String *packet, Table *table, KEY > *key_info); > > -static vector all_schema_tables; > - > -void add_infoschema_table(InfoSchemaTable *schema_table) > -{ > - if (schema_table->getFirstColumnIndex() == 0) > - schema_table->setFirstColumnIndex(-1); > - if (schema_table->getSecondColumnIndex() == 0) > - schema_table->setSecondColumnIndex(-1); > - > - all_schema_tables.push_back(schema_table); > -} > - > -void remove_infoschema_table(InfoSchemaTable *table) > -{ > - all_schema_tables.erase(remove_if(all_schema_tables.begin(), > - all_schema_tables.end(), > - bind2nd > (equal_to(), > - table)), > - all_schema_tables.end()); > -} > > > int wild_case_compare(const CHARSET_INFO * const cs, const char > *str,const char *wildstr) > @@ -1102,7 +1082,7 @@ > TableList *table, > LOOKUP_FIELD_VALUES *lookup_field_vals) > { > - InfoSchemaTable *schema_table= table->schema_table; > + plugin::InfoSchemaTable *schema_table= table->schema_table; > const char *field_name1= schema_table->getFirstColumnIndex() >= 0 ? > schema_table->getColumnName(schema_table->getFirstColumnIndex > ()).c_str() : ""; > const char *field_name2= schema_table->getSecondColumnIndex() >= 0 ? > @@ -1230,7 +1210,7 @@ > { > Item_field *item_field= (Item_field*)item; > const CHARSET_INFO * const cs= system_charset_info; > - InfoSchemaTable *schema_table= table->schema_table; > + plugin::InfoSchemaTable *schema_table= table->schema_table; > const char *field_name1= schema_table->getFirstColumnIndex() >= > 0 ? > schema_table->getColumnName(schema_table->getFirstColumnIndex > ()).c_str() : ""; > const char *field_name2= schema_table->getSecondColumnIndex() >= > 0 ? > @@ -1463,57 +1443,14 @@ > } > > > -class AddSchemaTable : public unary_function > -{ > - Session *session; > - const char *wild; > - vector &files; > - > -public: > - AddSchemaTable(Session *session_arg, vector > &files_arg, const char *wild_arg) > - : session(session_arg), wild(wild_arg), files(files_arg) > - {} > - > - result_type operator() (argument_type schema_table) > - { > - if (schema_table->isHidden()) > - { > - return false; > - } > - > - const string &schema_table_name= schema_table->getTableName(); > - > - if (wild && wild_case_compare(files_charset_info, > schema_table_name.c_str(), wild)) > - { > - return false; > - } > - > - LEX_STRING *file_name= 0; > - file_name= session->make_lex_string(file_name, > schema_table_name.c_str(), > - schema_table_name.length(), > true); > - if (file_name == NULL) > - { > - return true; > - } > - > - files.push_back(file_name); > - return false; > - } > -}; > - > - > -static int schema_tables_add(Session *session, vector > &files, const char *wild) > -{ > - vector::iterator iter= find_if > (all_schema_tables.begin(), > - > all_schema_tables.end(), > - AddSchemaTable > (session, files, wild)); > - > - if (iter != all_schema_tables.end()) > - { > - return 1; > - } > - > - return 0; > + > + > +static int schema_tables_add(Session *session, > + vector &files, > + const char *wild) > +{ > + plugin::Registry &plugins= plugin::Registry::singleton(); > + return plugins.info_schema.addTableToList(session, files, wild); > } > > > @@ -1570,7 +1507,7 @@ > > string db(db_name->str); > > - TableNameIterator tniter(db); > + service::TableNameIterator tniter(db); > int err= 0; > string table_name; > > @@ -1622,7 +1559,7 @@ > > static int > fill_schema_show_cols_or_idxs(Session *session, TableList *tables, > - InfoSchemaTable *schema_table, > + plugin::InfoSchemaTable *schema_table, > Open_tables_state > *open_tables_state_backup) > { > LEX *lex= session->lex; > @@ -1739,7 +1676,7 @@ > */ > > static uint32_t get_table_open_method(TableList *tables, > - InfoSchemaTable *schema_table) > + plugin::InfoSchemaTable > *schema_table) > { > /* > determine which method will be used for table opening > @@ -1778,7 +1715,7 @@ > */ > > static int fill_schema_table_from_frm(Session *session,TableList > *tables, > - InfoSchemaTable *schema_table, > + plugin::InfoSchemaTable > *schema_table, > LEX_STRING *db_name, > LEX_STRING *table_name) > { > @@ -1832,7 +1769,7 @@ > temporary tables that are filled at query > execution time. > Those I_S tables whose data are retrieved > from frm files and storage engine are filled by > the function > - InfoSchemaMethods::fillTable(). > + plugin::InfoSchemaMethods::fillTable(). > > @param[in] session thread handler > @param[in] tables I_S table > @@ -1842,14 +1779,14 @@ > @retval 0 success > @retval 1 error > */ > -int InfoSchemaMethods::fillTable(Session *session, TableList > *tables, COND *cond) > +int plugin::InfoSchemaMethods::fillTable(Session *session, > TableList *tables, COND *cond) > { > LEX *lex= session->lex; > Table *table= tables->table; > Select_Lex *old_all_select_lex= lex->all_selects_list; > enum_sql_command save_sql_command= lex->sql_command; > Select_Lex *lsel= tables->schema_select_lex; > - InfoSchemaTable *schema_table= tables->schema_table; > + plugin::InfoSchemaTable *schema_table= tables->schema_table; > Select_Lex sel; > LOOKUP_FIELD_VALUES lookup_field_vals; > bool with_i_schema; > @@ -2168,7 +2105,7 @@ > } > > > -int InfoSchemaMethods::processTable(Session *session, TableList > *tables, > +int plugin::InfoSchemaMethods::processTable(Session *session, > TableList *tables, > Table *table, bool res, > LEX_STRING *db_name, > LEX_STRING *table_name) const > @@ -2289,21 +2226,6 @@ > } > > > -class FindSchemaTableByName : public unary_function *, bool> > -{ > - const char *table_name; > -public: > - FindSchemaTableByName(const char *table_name_arg) > - : table_name(table_name_arg) {} > - result_type operator() (argument_type schema_table) > - { > - return ! my_strcasecmp(system_charset_info, > - schema_table->getTableName().c_str(), > - table_name); > - } > -}; > - > - > /* > Find schema_tables elment by name > > @@ -2316,21 +2238,15 @@ > # pointer to 'schema_tables' element > */ > > -InfoSchemaTable *find_schema_table(const char* table_name) > +plugin::InfoSchemaTable *find_schema_table(const char* table_name) > { > - vector::iterator iter= > - find_if(all_schema_tables.begin(), all_schema_tables.end(), > - FindSchemaTableByName(table_name)); > - if (iter != all_schema_tables.end()) > - { > - return *iter; > - } > - > - return NULL; > + > + plugin::Registry &plugins= plugin::Registry::singleton(); > + return plugins.info_schema.getTable(table_name); > } > > > -Table *InfoSchemaMethods::createSchemaTable(Session *session, > TableList *table_list) > +Table *plugin::InfoSchemaMethods::createSchemaTable(Session > *session, TableList *table_list) > const > { > int field_count= 0; > @@ -2338,12 +2254,12 @@ > Table *table; > List field_list; > const CHARSET_INFO * const cs= system_charset_info; > - const InfoSchemaTable::Columns &columns= table_list->schema_table- > >getColumns(); > - InfoSchemaTable::Columns::const_iterator iter= columns.begin(); > + const plugin::InfoSchemaTable::Columns &columns= table_list- > >schema_table->getColumns(); > + plugin::InfoSchemaTable::Columns::const_iterator iter= > columns.begin(); > > while (iter != columns.end()) > { > - const ColumnInfo *column= *iter; > + const plugin::ColumnInfo *column= *iter; > switch (column->getType()) { > case DRIZZLE_TYPE_LONG: > case DRIZZLE_TYPE_LONGLONG: > @@ -2435,7 +2351,7 @@ > Make list of fields for SHOW > > SYNOPSIS > - InfoSchemaMethods::oldFormat() > + plugin::InfoSchemaMethods::oldFormat() > session thread handler > schema_table pointer to 'schema_tables' element > > @@ -2444,16 +2360,16 @@ > 0 success > */ > > -int InfoSchemaMethods::oldFormat(Session *session, InfoSchemaTable > *schema_table) > +int plugin::InfoSchemaMethods::oldFormat(Session *session, > plugin::InfoSchemaTable *schema_table) > const > { > Name_resolution_context *context= &session->lex->select_lex.context; > - const InfoSchemaTable::Columns columns= schema_table->getColumns(); > - InfoSchemaTable::Columns::const_iterator iter= columns.begin(); > + const plugin::InfoSchemaTable::Columns columns= schema_table- > >getColumns(); > + plugin::InfoSchemaTable::Columns::const_iterator iter= > columns.begin(); > > while (iter != columns.end()) > { > - const ColumnInfo *column= *iter; > + const plugin::ColumnInfo *column= *iter; > if (column->getOldName().length() != 0) > { > Item_field *field= new Item_field(context, > @@ -2531,7 +2447,7 @@ > bool make_schema_select(Session *session, Select_Lex *sel, > const string& schema_table_name) > { > - InfoSchemaTable *schema_table= find_schema_table > (schema_table_name.c_str()); > + plugin::InfoSchemaTable *schema_table= find_schema_table > (schema_table_name.c_str()); > LEX_STRING db, table; > /* > We have to make non const db_name & table_name > > === modified file 'drizzled/show.h' > --- drizzled/show.h 2009-08-04 14:13:13 +0000 > +++ drizzled/show.h 2009-09-27 23:10:30 +0000 > @@ -40,7 +40,14 @@ > struct st_ha_create_information; > typedef st_ha_create_information HA_CREATE_INFO; > struct TableList; > -class InfoSchemaTable; > +namespace drizzled > +{ > +namespace plugin > +{ > + class InfoSchemaTable; > +} > +} > + > > typedef struct system_status_var STATUS_VAR; > > @@ -66,7 +73,7 @@ > int wild_case_compare(const CHARSET_INFO * const cs, > const char *str,const char *wildstr); > > -InfoSchemaTable *find_schema_table(const char* table_name); > +drizzled::plugin::InfoSchemaTable *find_schema_table(const char* > table_name); > bool make_schema_select(Session *session, Select_Lex *sel, > const std::string& schema_table_name); > bool mysql_schema_table(Session *session, LEX *lex, TableList > *table_list); > @@ -91,7 +98,5 @@ > void init_status_vars(); > void free_status_vars(); > void reset_status_vars(); > -void add_infoschema_table(InfoSchemaTable *schema_table); > -void remove_infoschema_table(InfoSchemaTable *table); > > #endif /* DRIZZLE_SERVER_SHOW_H */ > > === renamed file 'drizzled/thr_malloc.cc' => 'drizzled/sql_alloc.cc' > === modified file 'drizzled/sql_base.cc' > --- drizzled/sql_base.cc 2009-08-31 23:50:37 +0000 > +++ drizzled/sql_base.cc 2009-09-27 23:10:30 +0000 > @@ -44,15 +44,13 @@ > #include > #include > #include > -#include > +#include > #include > > using namespace std; > using namespace drizzled; > > -extern drizzled::ReplicationServices replication_services; > - > -bool drizzle_rm_tmp_tables(slot::Listen &listen_handler); > +bool drizzle_rm_tmp_tables(service::Listen &listen_handler); > > /** > @defgroup Data_Dictionary Data Dictionary > @@ -816,7 +814,7 @@ > close_temporary_table(table, true, true); > else > { > - StorageEngine *table_type= table->s->db_type(); > + plugin::StorageEngine *table_type= table->s->db_type(); > pthread_mutex_lock(&LOCK_open); /* Close and drop a table (AUX > routine) */ > /* > unlink_open_table() also tells threads waiting for refresh or > close > @@ -1325,7 +1323,8 @@ > table_list->db, table_list- > >table_name, > false); > > - if (StorageEngine::getTableProto(path, NULL) != EEXIST) > + plugin::Registry &plugins= plugin::Registry::singleton(); > + if (plugins.storage_engine.getTableProto(path, NULL) != EEXIST) > { > /* > Table to be created, so we need to create placeholder in > table-cache. > @@ -2045,6 +2044,7 @@ > */ > if (unlikely(entry->file->implicit_emptied)) > { > + ReplicationServices &replication_services= > ReplicationServices::singleton(); > entry->file->implicit_emptied= 0; > { > char *query, *end; > @@ -4533,7 +4533,7 @@ > } > > > -bool drizzle_rm_tmp_tables(slot::Listen &listen_handler) > +bool drizzle_rm_tmp_tables(service::Listen &listen_handler) > { > char filePath[FN_REFLEN], filePathCopy[FN_REFLEN]; > Session *session; > > === modified file 'drizzled/sql_delete.cc' > --- drizzled/sql_delete.cc 2009-09-17 00:08:20 +0000 > +++ drizzled/sql_delete.cc 2009-09-27 23:10:30 +0000 > @@ -27,6 +27,8 @@ > #include > #include "drizzled/probes.h" > > +using namespace drizzled; > + > /** > Implement DELETE SQL word. > > @@ -411,7 +413,7 @@ > /* If it is a temporary table, close and regenerate it */ > if (!dont_send_ok && (table= session->find_temporary_table > (table_list))) > { > - StorageEngine *table_type= table->s->db_type(); > + plugin::StorageEngine *table_type= table->s->db_type(); > TableShare *share= table->s; > > if (!table_type->check_flag(HTON_BIT_CAN_RECREATE)) > > === modified file 'drizzled/sql_lex.h' > --- drizzled/sql_lex.h 2009-09-24 06:11:54 +0000 > +++ drizzled/sql_lex.h 2009-09-27 23:10:30 +0000 > @@ -25,7 +25,7 @@ > */ > #include > > -#include "drizzled/slot/function.h" > +#include "drizzled/service/function.h" > #include "drizzled/name_resolution_context.h" > #include "drizzled/item/subselect.h" > #include "drizzled/item/param.h" > > === modified file 'drizzled/sql_parse.cc' > --- drizzled/sql_parse.cc 2009-09-24 06:23:51 +0000 > +++ drizzled/sql_parse.cc 2009-09-27 23:10:30 +0000 > @@ -16,7 +16,6 @@ > #define DRIZZLE_LEX 1 > #include > #include > -#include > #include > #include > #include > @@ -25,7 +24,7 @@ > #include > #include > #include > -#include > +#include > #include > #include > #include > @@ -39,9 +38,12 @@ > #include > #include "drizzled/probes.h" > > +#include "drizzled/plugin/registry.h" > + > #include > #include > > +using namespace drizzled; > using namespace std; > > /* Prototypes */ > @@ -168,6 +170,7 @@ > { > bool error= 0; > Query_id &query_id= Query_id::get_query_id(); > + plugin::Registry &plugins= plugin::Registry::singleton(); > > DRIZZLE_COMMAND_START(session->thread_id, > command); > @@ -189,7 +192,7 @@ > > /* TODO: set session->lex->sql_command to SQLCOM_END here */ > > - logging_pre_do(session); > + plugins.logging.pre_do(session); > > session->server_status&= > ~(SERVER_QUERY_NO_INDEX_USED | > SERVER_QUERY_NO_GOOD_INDEX_USED); > @@ -299,7 +302,7 @@ > /* Free tables */ > session->close_thread_tables(); > > - logging_post_do(session); > + plugins.logging.post_do(session); > > /* Store temp state for processlist */ > session->set_proc_info("cleaning up"); > @@ -991,7 +994,7 @@ > if (!ptr->derived && !my_strcasecmp(system_charset_info, ptr->db, > INFORMATION_SCHEMA_NAME.c_str > ())) > { > - InfoSchemaTable *schema_table= find_schema_table(ptr- > >table_name); > + plugin::InfoSchemaTable *schema_table= find_schema_table(ptr- > >table_name); > if (!schema_table || > (schema_table->isHidden() && > ((sql_command_flags[lex->sql_command].test > (CF_BIT_STATUS_COMMAND)) == 0 || > > === removed file 'drizzled/sql_plugin.h' > --- drizzled/sql_plugin.h 2009-08-05 09:29:04 +0000 > +++ drizzled/sql_plugin.h 1970-01-01 00:00:00 +0000 > @@ -1,65 +0,0 @@ > -/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*- > - * vim:expandtab:shiftwidth=2:tabstop=2:smarttab: > - * > - * Copyright (C) 2008 Sun Microsystems > - * > - * This program is free software; you can redistribute it and/or > modify > - * it under the terms of the GNU General Public License as > published by > - * the Free Software Foundation; version 2 of the License. > - * > - * This program is distributed in the hope that it will be useful, > - * but WITHOUT ANY WARRANTY; without even the implied warranty of > - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > - * GNU General Public License for more details. > - * > - * You should have received a copy of the GNU General Public License > - * along with this program; if not, write to the Free Software > - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA > 02110-1301 USA > - */ > - > -/** > - * @TODO There is plugin.h and also sql_plugin.h. Ostensibly, > - * it seems that the two files exist so that plugin.h can provide an > - * external API for plugin developers and sql_plugin.h will provide > - * and internal server API for dealing with those plugins. > - * > - * However, there are parts of plugin.h marked "INTERNAL USE ONLY" > which > - * seems to contradict the above... > - * > - * Let's figure out a better way of dividing the public and > internal API > - * and name the files more appropriately. > - * > - * Also, less #defines, more enums and bitmaps... > - * > - */ > - > -#ifndef DRIZZLE_SERVER_PLUGIN_H > -#define DRIZZLE_SERVER_PLUGIN_H > - > -#include > -#include > -#include > -#include > - > -class Session; > -class sys_var; > -typedef struct st_mysql_lex_string LEX_STRING; > -struct my_option; > - > -extern char *opt_plugin_load; > -extern char *opt_plugin_dir_ptr; > -extern char opt_plugin_dir[FN_REFLEN]; > - > -extern int plugin_init(drizzled::plugin::Registry &plugins, > - int *argc, char **argv, int init_flags); > -extern void plugin_shutdown(drizzled::plugin::Registry &plugins); > -extern void my_print_help_inc_plugins(my_option *options); > -extern bool plugin_is_ready(const LEX_STRING *name, int type); > -extern bool mysql_install_plugin(Session *session, const LEX_STRING > *name, > - const LEX_STRING *dl); > -extern bool mysql_uninstall_plugin(Session *session, const > LEX_STRING *name); > -extern void plugin_sessionvar_init(Session *session); > -extern void plugin_sessionvar_cleanup(Session *session); > -extern sys_var *intern_find_sys_var(const char *str, uint32_t, bool > no_error); > - > -#endif /* DRIZZLE_SERVER_PLUGIN_H */ > > === modified file 'drizzled/sql_select.cc' > --- drizzled/sql_select.cc 2009-09-23 21:40:36 +0000 > +++ drizzled/sql_select.cc 2009-09-27 23:10:30 +0000 > @@ -33,7 +33,7 @@ > #include "drizzled/nested_join.h" > #include "drizzled/probes.h" > #include "drizzled/show.h" > -#include "drizzled/info_schema.h" > +#include "drizzled/plugin/info_schema_table.h" > #include "drizzled/item/cache.h" > #include "drizzled/item/cmpfunc.h" > #include "drizzled/item/copy_string.h" > > === modified file 'drizzled/sql_table.cc' > --- drizzled/sql_table.cc 2009-09-23 19:16:36 +0000 > +++ drizzled/sql_table.cc 2009-09-27 23:10:30 +0000 > @@ -41,7 +41,6 @@ > > using namespace std; > using namespace drizzled; > -extern drizzled::ReplicationServices replication_services; > > static const char hexchars[]= "0123456789abcdef"; > bool is_primary_key(KEY *key_info) > @@ -330,6 +329,7 @@ > void write_bin_log(Session *session, bool, > char const *query, size_t query_length) > { > + ReplicationServices &replication_services= > ReplicationServices::singleton(); > replication_services.rawStatement(session, query, query_length); > } > > @@ -471,7 +471,7 @@ > for (table= tables; table; table= table->next_local) > { > char *db=table->db; > - StorageEngine *table_type; > + plugin::StorageEngine *table_type; > > error= session->drop_temporary_table(table); > > @@ -535,9 +535,10 @@ > /* remove .frm file and engine files */ > path_length= build_table_filename(path, sizeof(path), db, > table->table_name, table->internal_tmp_table); > } > + plugin::Registry &plugins= plugin::Registry::singleton(); > if (drop_temporary || > ((table_type == NULL > - && (StorageEngine::getTableProto(path, NULL) != EEXIST)))) > + && (plugins.storage_engine.getTableProto(path, NULL) != > EEXIST)))) > { > // Table was not found on disk and table can't be created from > engine > if (if_exists) > @@ -651,7 +652,7 @@ > > SYNOPSIS > quick_rm_table() > - base The StorageEngine handle. > + base The plugin::StorageEngine handle. > db The database name. > table_name The table name. > is_tmp If the table is temp. > @@ -661,7 +662,7 @@ > != 0 Error > */ > > -bool quick_rm_table(StorageEngine *, const char *db, > +bool quick_rm_table(plugin::StorageEngine *, const char *db, > const char *table_name, bool is_tmp) > { > char path[FN_REFLEN]; > @@ -1744,7 +1745,8 @@ > pthread_mutex_lock(&LOCK_open); /* CREATE TABLE (some confussion > on naming, double check) */ > if (!internal_tmp_table && !(create_info->options & > HA_LEX_CREATE_TMP_TABLE)) > { > - if (StorageEngine::getTableProto(path, NULL)==EEXIST) > + plugin::Registry &plugins= plugin::Registry::singleton(); > + if (plugins.storage_engine.getTableProto(path, NULL)==EEXIST) > { > if (create_info->options & HA_LEX_CREATE_IF_NOT_EXISTS) > { > @@ -1794,7 +1796,8 @@ > table_path_length= build_table_filename(table_path, sizeof > (table_path), > db, table_name, false); > > - int retcode= StorageEngine::getTableProto(table_path, NULL); > + plugin::Registry &plugins= plugin::Registry::singleton(); > + int retcode= plugins.storage_engine.getTableProto(table_path, > NULL); > switch (retcode) > { > case ENOENT: > @@ -1968,7 +1971,7 @@ > > SYNOPSIS > mysql_rename_table() > - base The StorageEngine handle. > + base The plugin::StorageEngine handle. > old_db The old database name. > old_name The old table name. > new_db The new database name. > @@ -1985,7 +1988,7 @@ > */ > > bool > -mysql_rename_table(StorageEngine *base, const char *old_db, > +mysql_rename_table(plugin::StorageEngine *base, const char *old_db, > const char *old_name, const char *new_db, > const char *new_name, uint32_t flags) > { > @@ -2460,6 +2463,8 @@ > uint32_t not_used; > message::Table src_proto; > > + plugin::Registry &plugins= plugin::Registry::singleton(); > + > /* > By opening source table we guarantee that it exists and no > concurrent > DDL operation will mess with it. Later we also take an exclusive > @@ -2492,7 +2497,7 @@ > goto table_exists; > dst_path_length= build_table_filename(dst_path, sizeof(dst_path), > db, table_name, false); > - if (StorageEngine::getTableProto(dst_path, NULL)==EEXIST) > + if (plugins.storage_engine.getTableProto(dst_path, NULL) == > EEXIST) > goto table_exists; > } > > @@ -2525,7 +2530,7 @@ > } > else > { > - protoerr= StorageEngine::getTableProto(src_path, &src_proto); > + protoerr= plugins.storage_engine.getTableProto(src_path, > &src_proto); > } > > string dst_proto_path(dst_path); > @@ -2535,7 +2540,7 @@ > > if (protoerr == EEXIST) > { > - StorageEngine* engine= ha_resolve_by_name(session, > + plugin::StorageEngine* engine= ha_resolve_by_name(session, > src_proto.engine > ().name()); > > if (engine->check_flag(HTON_BIT_HAS_DATA_DICTIONARY) == false) > @@ -2832,8 +2837,8 @@ > bool check_engine(Session *session, const char *table_name, > HA_CREATE_INFO *create_info) > { > - StorageEngine **new_engine= &create_info->db_type; > - StorageEngine *req_engine= *new_engine; > + plugin::StorageEngine **new_engine= &create_info->db_type; > + plugin::StorageEngine *req_engine= *new_engine; > if (!req_engine->is_enabled()) > { > string engine_name= req_engine->getName(); > > === modified file 'drizzled/sql_table.h' > --- drizzled/sql_table.h 2009-09-15 21:01:42 +0000 > +++ drizzled/sql_table.h 2009-09-27 23:10:30 +0000 > @@ -37,7 +37,7 @@ > bool drop_temporary); > int mysql_rm_table_part2(Session *session, TableList *tables, bool > if_exists, > bool drop_temporary, bool log_query); > -bool quick_rm_table(StorageEngine *, const char *db, > +bool quick_rm_table(drizzled::plugin::StorageEngine *, const char > *db, > const char *table_name, bool is_tmp); > void close_cached_table(Session *session, Table *table); > > > === modified file 'drizzled/sql_yacc.yy' > --- drizzled/sql_yacc.yy 2009-09-24 06:11:54 +0000 > +++ drizzled/sql_yacc.yy 2009-09-27 23:10:30 +0000 > @@ -403,7 +403,7 @@ > enum enum_var_type var_type; > Key::Keytype key_type; > enum ha_key_alg key_alg; > - StorageEngine *db_type; > + ::drizzled::plugin::StorageEngine *db_type; > enum row_type row_type; > enum column_format_type column_format_type; > enum ha_rkey_function ha_rkey_mode; > @@ -1162,7 +1162,7 @@ > { > message::Table::StorageEngine *protoengine; > protoengine= proto->mutable_engine(); > - StorageEngine *engine= ha_default_storage_engine(session); > + drizzled::plugin::StorageEngine *engine= > ha_default_storage_engine(session); > > protoengine->set_name(engine->getName()); > } > @@ -1439,7 +1439,7 @@ > ident_or_text > { > const std::string engine_name($1.str); > - StorageEngine *engine= ha_resolve_by_name(YYSession, > engine_name); > + drizzled::plugin::StorageEngine *engine= > ha_resolve_by_name(YYSession, engine_name); > > if (engine) > $$= engine; > @@ -1455,7 +1455,7 @@ > ident_or_text > { > const std::string engine_name($1.str); > - StorageEngine *engine; > + drizzled::plugin::StorageEngine *engine; > if ((engine= ha_resolve_by_name(YYSession, engine_name))) > $$= engine; > else > @@ -3253,7 +3253,7 @@ > } > else > { > - /* Retrieving the result of slot::Function::get */ > + /* Retrieving the result of service::Function::get */ > const plugin::Function *udf= $3; > if (udf) > { > > === modified file 'drizzled/statement/alter_table.cc' > --- drizzled/statement/alter_table.cc 2009-09-24 06:23:51 +0000 > +++ drizzled/statement/alter_table.cc 2009-09-27 23:10:31 +0000 > @@ -655,9 +655,9 @@ > char path[FN_REFLEN]; > ha_rows copied= 0; > ha_rows deleted= 0; > - StorageEngine *old_db_type; > - StorageEngine *new_db_type; > - StorageEngine *save_old_db_type; > + plugin::StorageEngine *old_db_type; > + plugin::StorageEngine *new_db_type; > + plugin::StorageEngine *save_old_db_type; > bitset<32> tmp; > > new_name_buff[0]= '\0'; > @@ -755,7 +755,8 @@ > > build_table_filename(new_name_buff, sizeof(new_name_buff), > new_db, new_name_buff, false); > > - if (StorageEngine::getTableProto(new_name_buff, NULL) == > EEXIST) > + plugin::Registry &plugins= plugin::Registry::singleton(); > + if (plugins.storage_engine.getTableProto(new_name_buff, > NULL) == EEXIST) > { > /* Table will be closed by Session::executeCommand() */ > my_error(ER_TABLE_EXISTS_ERROR, MYF(0), new_alias); > @@ -882,7 +883,8 @@ > we don't take this name-lock and where this order really > matters. > TODO: Investigate if we need this access() check at all. > */ > - if (StorageEngine::getTableProto(new_name, NULL) == EEXIST) > + plugin::Registry &plugins= plugin::Registry::singleton(); > + if (plugins.storage_engine.getTableProto(new_name, NULL) == > EEXIST) > { > my_error(ER_TABLE_EXISTS_ERROR, MYF(0), new_name); > error= -1; > @@ -1439,7 +1441,7 @@ > AlterInfo *alter_info) > { > int error; > - StorageEngine *old_db_type, *new_db_type; > + plugin::StorageEngine *old_db_type, *new_db_type; > old_db_type= table->s->db_type(); > new_db_type= create_info->db_type; > /* > @@ -1504,7 +1506,7 @@ > message::Table::StorageEngine *protoengine; > protoengine= table_proto->mutable_engine(); > > - StorageEngine *engine= local_create_info.db_type; > + plugin::StorageEngine *engine= local_create_info.db_type; > > protoengine->set_name(engine->getName()); > } > > === modified file 'drizzled/statement/rename_table.cc' > --- drizzled/statement/rename_table.cc 2009-08-25 18:02:27 +0000 > +++ drizzled/statement/rename_table.cc 2009-09-27 23:10:31 +0000 > @@ -148,15 +148,16 @@ > new_alias= new_table_name; > } > > - StorageEngine *engine= NULL; > + plugin::StorageEngine *engine= NULL; > message::Table table_proto; > char path[FN_REFLEN]; > size_t length; > > + plugin::Registry &plugins= plugin::Registry::singleton(); > length= build_table_filename(path, sizeof(path), > ren_table->db, old_alias, false); > > - if (StorageEngine::getTableProto(path, &table_proto)!= EEXIST) > + if (plugins.storage_engine.getTableProto(path, &table_proto) != > EEXIST) > { > my_error(ER_NO_SUCH_TABLE, MYF(0), ren_table->db, old_alias); > return true; > @@ -167,7 +168,7 @@ > length= build_table_filename(path, sizeof(path), > new_db, new_alias, false); > > - if (StorageEngine::getTableProto(path, NULL)!=ENOENT) > + if (plugins.storage_engine.getTableProto(path, NULL) != ENOENT) > { > my_error(ER_TABLE_EXISTS_ERROR, MYF(0), new_alias); > return 1; // This can't be skipped > > === modified file 'drizzled/statement/show_engine_status.h' > --- drizzled/statement/show_engine_status.h 2009-09-24 06:11:54 +0000 > +++ drizzled/statement/show_engine_status.h 2009-09-27 23:10:31 +0000 > @@ -33,14 +33,14 @@ > class ShowEngineStatus : public Statement > { > public: > - ShowEngineStatus(Session *in_session, StorageEngine > *show_engine_arg) > + ShowEngineStatus(Session *in_session, plugin::StorageEngine > *show_engine_arg) > : > Statement(in_session), > show_engine(show_engine_arg) > {} > > bool execute(); > - StorageEngine *show_engine; > + plugin::StorageEngine *show_engine; > }; > > } /* end namespace statement */ > > === modified file 'drizzled/table.cc' > --- drizzled/table.cc 2009-09-23 18:52:35 +0000 > +++ drizzled/table.cc 2009-09-27 23:10:30 +0000 > @@ -1196,7 +1196,9 @@ > > message::Table table; > > - error= StorageEngine::getTableProto(share->normalized_path.str, > &table); > + plugin::Registry &plugins= plugin::Registry::singleton(); > + error= plugins.storage_engine.getTableProto(share- > >normalized_path.str, > + &table); > > if (error != EEXIST) > { > > === modified file 'drizzled/table_list.h' > --- drizzled/table_list.h 2009-08-04 03:45:44 +0000 > +++ drizzled/table_list.h 2009-09-27 23:10:30 +0000 > @@ -60,12 +60,19 @@ > class Natural_join_column; > class select_union; > class Select_Lex_Unit; > -class InfoSchemaTable; > class Select_Lex; > class Tmp_Table_Param; > class Item_subselect; > class Table; > > +namespace drizzled > +{ > +namespace plugin > +{ > + class InfoSchemaTable; > +} > +} > + > struct nested_join_st; > > class TableList > @@ -208,7 +215,7 @@ > */ > select_union *derived_result; > Select_Lex_Unit *derived; /* Select_Lex_Unit of derived table */ > - InfoSchemaTable *schema_table; /* Information_schema table > */ > + drizzled::plugin::InfoSchemaTable *schema_table; /* > Information_schema table */ > Select_Lex *schema_select_lex; > Tmp_Table_Param *schema_table_param; > /* link to select_lex where this table was used */ > @@ -230,7 +237,7 @@ > nested_join_st *nested_join; /* if the element is a nested join > */ > TableList *embedding; /* nested join containing the > table */ > List *join_list;/* join list the table belongs to */ > - StorageEngine *db_type; /* table_type for handler */ > + drizzled::plugin::StorageEngine *db_type; /* table_type for > handler */ > char timestamp_buffer[20]; /* buffer for timestamp (19+1) */ > bool internal_tmp_table; > /** true if an alias for this table was specified in the SQL. */ > > === modified file 'drizzled/table_proto_write.cc' > --- drizzled/table_proto_write.cc 2009-09-16 20:58:28 +0000 > +++ drizzled/table_proto_write.cc 2009-09-27 23:10:30 +0000 > @@ -530,7 +530,7 @@ > > int err= 0; > > - StorageEngine* engine= ha_resolve_by_name(session, > + plugin::StorageEngine* engine= ha_resolve_by_name(session, > table_proto->engine > ().name()); > if (engine->check_flag(HTON_BIT_HAS_DATA_DICTIONARY) == false) > err= drizzle_write_proto_file(new_path, table_proto); > > === modified file 'drizzled/table_share.h' > --- drizzled/table_share.h 2009-08-21 18:46:31 +0000 > +++ drizzled/table_share.h 2009-09-27 23:10:30 +0000 > @@ -130,8 +130,8 @@ > max_rows= arg; > } > > - StorageEngine *storage_engine; /* storage engine plugin */ > - inline StorageEngine *db_type() const /* table_type for handler */ > + drizzled::plugin::StorageEngine *storage_engine; /* storage > engine plugin */ > + inline drizzled::plugin::StorageEngine *db_type() const /* > table_type for handler */ > { > return storage_engine; > } > > === modified file 'drizzled/xid.h' > --- drizzled/xid.h 2009-03-24 17:44:41 +0000 > +++ drizzled/xid.h 2009-09-27 23:10:30 +0000 > @@ -83,7 +83,7 @@ > enum xa_states {XA_NOTR=0, XA_ACTIVE, XA_IDLE, XA_PREPARED}; > extern const char *xa_state_names[]; > > -/* for recover() StorageEngine call */ > +/* for recover() plugin::StorageEngine call */ > #define MIN_XID_LIST_SIZE 128 > #define MAX_XID_LIST_SIZE (1024*128) > > > === modified file 'plugin/archive/ha_archive.cc' > --- plugin/archive/ha_archive.cc 2009-08-31 23:50:37 +0000 > +++ plugin/archive/ha_archive.cc 2009-09-27 23:10:31 +0000 > @@ -134,7 +134,7 @@ > NULL > }; > > -class ArchiveTableNameIterator: public > TableNameIteratorImplementation > +class ArchiveTableNameIterator: public > drizzled::plugin::TableNameIteratorImplementation > { > private: > MY_DIR *dirp; > @@ -142,7 +142,7 @@ > > public: > ArchiveTableNameIterator(const std::string &database) > - : TableNameIteratorImplementation(database), dirp(NULL), > current_entry(-1) > + : drizzled::plugin::TableNameIteratorImplementation(database), > dirp(NULL), current_entry(-1) > {}; > > ~ArchiveTableNameIterator(); > @@ -214,12 +214,13 @@ > } > } > > -class ArchiveEngine : public StorageEngine > +class ArchiveEngine : public drizzled::plugin::StorageEngine > { > public: > - ArchiveEngine(const string &name_arg) : StorageEngine(name_arg, > - HTON_FILE_BASED > - | HTON_HAS_DATA_DICTIONARY) {} > + ArchiveEngine(const string &name_arg) > + : drizzled::plugin::StorageEngine(name_arg, > + HTON_FILE_BASED > + | HTON_HAS_DATA_DICTIONARY) {} > > virtual handler *create(TableShare *table, > MEM_ROOT *mem_root) > @@ -238,7 +239,7 @@ > int getTableProtoImplementation(const char* path, > drizzled::message::Table > *table_proto); > > - TableNameIteratorImplementation* tableNameIterator(const > std::string &database) > + drizzled::plugin::TableNameIteratorImplementation* > tableNameIterator(const std::string &database) > { > return new ArchiveTableNameIterator(database); > } > @@ -334,7 +335,8 @@ > } > > > -ha_archive::ha_archive(StorageEngine *engine_arg, TableShare > *table_arg) > +ha_archive::ha_archive(drizzled::plugin::StorageEngine *engine_arg, > + TableShare *table_arg) > :handler(engine_arg, table_arg), delayed_insert(0), bulk_insert(0) > { > /* Set our original buffer from pre-allocated memory */ > > === modified file 'plugin/archive/ha_archive.h' > --- plugin/archive/ha_archive.h 2009-08-18 07:00:39 +0000 > +++ plugin/archive/ha_archive.h 2009-09-27 23:10:31 +0000 > @@ -88,7 +88,7 @@ > void destroy_record_buffer(archive_record_buffer *r); > > public: > - ha_archive(StorageEngine *engine, TableShare *table_arg); > + ha_archive(drizzled::plugin::StorageEngine *engine, TableShare > *table_arg); > ~ha_archive() > { > } > > === modified file 'plugin/ascii/ascii.cc' > --- plugin/ascii/ascii.cc 2009-08-17 20:54:05 +0000 > +++ plugin/ascii/ascii.cc 2009-09-27 23:10:31 +0000 > @@ -71,13 +71,13 @@ > static int initialize(plugin::Registry ®istry) > { > asciiudf= new plugin::Create_function("ascii"); > - registry.function.add(asciiudf); > + registry.add(asciiudf); > return 0; > } > > static int finalize(plugin::Registry ®istry) > { > - registry.function.remove(asciiudf); > + registry.remove(asciiudf); > delete asciiudf; > return 0; > } > > === modified file 'plugin/auth_http/auth_http.cc' > --- plugin/auth_http/auth_http.cc 2009-08-05 09:29:04 +0000 > +++ plugin/auth_http/auth_http.cc 2009-09-27 23:10:31 +0000 > @@ -25,12 +25,12 @@ > } > > > -class Auth_http : public Authentication > +class Auth_http : public drizzled::plugin::Authentication > { > CURLcode rv; > CURL *curl_handle; > public: > - Auth_http() : Authentication() > + Auth_http() : drizzled::plugin::Authentication() > { > // we are trusting that plugin initializers are called > singlethreaded at startup > // if something else also calls curl_global_init() in a > threadrace while we are here, > > === modified file 'plugin/auth_pam/auth_pam.cc' > --- plugin/auth_pam/auth_pam.cc 2009-08-05 09:29:04 +0000 > +++ plugin/auth_pam/auth_pam.cc 2009-09-27 23:10:31 +0000 > @@ -79,7 +79,7 @@ > return PAM_SUCCESS; > } > > -class Auth_pam : public Authentication > +class Auth_pam : public drizzled::plugin::Authentication > { > public: > virtual bool authenticate(Session *session, const char *password) > @@ -107,7 +107,7 @@ > }; > > > -static Authentication *auth= NULL; > +static Auth_pam *auth= NULL; > > static int initialize(drizzled::plugin::Registry ®istry) > { > > === modified file 'plugin/benchmark/benchmarkudf.cc' > --- plugin/benchmark/benchmarkudf.cc 2009-08-17 20:54:05 +0000 > +++ plugin/benchmark/benchmarkudf.cc 2009-09-27 23:10:31 +0000 > @@ -120,13 +120,13 @@ > static int initialize(plugin::Registry ®istry) > { > benchmarkudf= new plugin::Create_function > ("benchmark"); > - registry.function.add(benchmarkudf); > + registry.add(benchmarkudf); > return 0; > } > > static int finalize(plugin::Registry ®istry) > { > - registry.function.remove(benchmarkudf); > + registry.remove(benchmarkudf); > delete benchmarkudf; > return 0; > } > > === modified file 'plugin/blackhole/ha_blackhole.cc' > --- plugin/blackhole/ha_blackhole.cc 2009-08-17 21:30:20 +0000 > +++ plugin/blackhole/ha_blackhole.cc 2009-09-27 23:10:31 +0000 > @@ -28,11 +28,11 @@ > NULL > }; > > -class BlackholeEngine : public StorageEngine > +class BlackholeEngine : public drizzled::plugin::StorageEngine > { > public: > BlackholeEngine(const string &name_arg) > - : StorageEngine(name_arg, HTON_FILE_BASED | HTON_CAN_RECREATE) {} > + : drizzled::plugin::StorageEngine(name_arg, HTON_FILE_BASED | > HTON_CAN_RECREATE) {} > virtual handler *create(TableShare *table, > MEM_ROOT *mem_root) > { > @@ -61,7 +61,7 @@ > ** BLACKHOLE tables > *****************************************************************************/ > > -ha_blackhole::ha_blackhole(StorageEngine *engine_arg, > +ha_blackhole::ha_blackhole(drizzled::plugin::StorageEngine > *engine_arg, > TableShare *table_arg) > :handler(engine_arg, table_arg) > {} > @@ -299,7 +299,7 @@ > return (unsigned char*) share->table_name; > } > > -static StorageEngine *blackhole_engine= NULL; > +static drizzled::plugin::StorageEngine *blackhole_engine= NULL; > > static int blackhole_init(drizzled::plugin::Registry ®istry) > { > > === modified file 'plugin/blackhole/ha_blackhole.h' > --- plugin/blackhole/ha_blackhole.h 2009-08-03 05:56:35 +0000 > +++ plugin/blackhole/ha_blackhole.h 2009-09-27 23:10:31 +0000 > @@ -45,7 +45,7 @@ > st_blackhole_share *share; > > public: > - ha_blackhole(StorageEngine *engine, TableShare *table_arg); > + ha_blackhole(drizzled::plugin::StorageEngine *engine, TableShare > *table_arg); > ~ha_blackhole() > {} > > > === modified file 'plugin/charlength/charlength.cc' > --- plugin/charlength/charlength.cc 2009-08-17 20:54:05 +0000 > +++ plugin/charlength/charlength.cc 2009-09-27 23:10:31 +0000 > @@ -69,13 +69,13 @@ > { > charlengthudf= new plugin::Create_function > ("char_length"); > charlengthudf->addAlias("character_length"); > - registry.function.add(charlengthudf); > + registry.add(charlengthudf); > return 0; > } > > static int finalize(drizzled::plugin::Registry ®istry) > { > - registry.function.remove(charlengthudf); > + registry.remove(charlengthudf); > delete charlengthudf; > return 0; > } > > === modified file 'plugin/command_log/command_log.cc' > --- plugin/command_log/command_log.cc 2009-09-16 17:10:18 +0000 > +++ plugin/command_log/command_log.cc 2009-09-27 23:10:31 +0000 > @@ -66,16 +66,17 @@ > > #include "command_log.h" > > +#include > +#include > + > +#include > +#include > + > #include > #include > #include > #include > > -#include > -#include > -#include > -#include > - > using namespace std; > using namespace drizzled; > > > === modified file 'plugin/compression/compressionudf.cc' > --- plugin/compression/compressionudf.cc 2009-08-17 20:54:05 +0000 > +++ plugin/compression/compressionudf.cc 2009-09-27 23:10:31 +0000 > @@ -35,17 +35,17 @@ > new plugin::Create_function("uncompress"); > uncompressed_lengthudf= > new plugin::Create_function > ("uncompressed_length"); > - registry.function.add(compressudf); > - registry.function.add(uncompressudf); > - registry.function.add(uncompressed_lengthudf); > + registry.add(compressudf); > + registry.add(uncompressudf); > + registry.add(uncompressed_lengthudf); > return 0; > } > > static int compressionudf_plugin_deinit(plugin::Registry ®istry) > { > - registry.function.remove(compressudf); > - registry.function.remove(uncompressudf); > - registry.function.remove(uncompressed_lengthudf); > + registry.remove(compressudf); > + registry.remove(uncompressudf); > + registry.remove(uncompressed_lengthudf); > delete compressudf; > delete uncompressudf; > delete uncompressed_lengthudf; > > === modified file 'plugin/connection_id/connection_id.cc' > --- plugin/connection_id/connection_id.cc 2009-08-17 20:54:05 +0000 > +++ plugin/connection_id/connection_id.cc 2009-09-27 23:10:31 +0000 > @@ -72,13 +72,13 @@ > { > connection_idudf= > new plugin::Create_function > ("connection_id"); > - registry.function.add(connection_idudf); > + registry.add(connection_idudf); > return 0; > } > > static int finalize(plugin::Registry ®istry) > { > - registry.function.remove(connection_idudf); > + registry.remove(connection_idudf); > delete connection_idudf; > return 0; > } > > === modified file 'plugin/console/console.cc' > --- plugin/console/console.cc 2009-08-27 19:21:43 +0000 > +++ plugin/console/console.cc 2009-09-27 23:10:31 +0000 > @@ -332,13 +332,13 @@ > > static int init(drizzled::plugin::Registry ®istry) > { > - registry.listen.add(listen_obj); > + registry.add(listen_obj); > return 0; > } > > static int deinit(drizzled::plugin::Registry ®istry) > { > - registry.listen.remove(listen_obj); > + registry.remove(listen_obj); > return 0; > } > > > === modified file 'plugin/crc32/crc32udf.cc' > --- plugin/crc32/crc32udf.cc 2009-08-17 20:54:05 +0000 > +++ plugin/crc32/crc32udf.cc 2009-09-27 23:10:31 +0000 > @@ -74,13 +74,13 @@ > static int initialize(plugin::Registry ®istry) > { > crc32udf= new plugin::Create_function("crc32"); > - registry.function.add(crc32udf); > + registry.add(crc32udf); > return 0; > } > > static int finalize(plugin::Registry ®istry) > { > - registry.function.remove(crc32udf); > + registry.remove(crc32udf); > delete crc32udf; > return 0; > } > > === modified file 'plugin/csv/ha_tina.cc' > --- plugin/csv/ha_tina.cc 2009-08-05 09:29:04 +0000 > +++ plugin/csv/ha_tina.cc 2009-09-27 23:10:31 +0000 > @@ -116,11 +116,11 @@ > NULL > }; > > -class Tina : public StorageEngine > +class Tina : public drizzled::plugin::StorageEngine > { > public: > Tina(const string& name_arg) > - : StorageEngine(name_arg, HTON_CAN_RECREATE | > HTON_TEMPORARY_ONLY | HTON_FILE_BASED) {} > + : drizzled::plugin::StorageEngine(name_arg, HTON_CAN_RECREATE | > HTON_TEMPORARY_ONLY | HTON_FILE_BASED) {} > virtual handler *create(TableShare *table, > MEM_ROOT *mem_root) > { > @@ -454,7 +454,7 @@ > > > > -ha_tina::ha_tina(StorageEngine *engine_arg, TableShare *table_arg) > +ha_tina::ha_tina(drizzled::plugin::StorageEngine *engine_arg, > TableShare *table_arg) > :handler(engine_arg, table_arg), > /* > These definitions are found in handler.h > > === modified file 'plugin/csv/ha_tina.h' > --- plugin/csv/ha_tina.h 2009-06-03 01:12:56 +0000 > +++ plugin/csv/ha_tina.h 2009-09-27 23:10:31 +0000 > @@ -91,7 +91,7 @@ > int init_data_file(); > > public: > - ha_tina(StorageEngine *engine, TableShare *table_arg); > + ha_tina(drizzled::plugin::StorageEngine *engine, TableShare > *table_arg); > ~ha_tina() > { > if (chain_alloced) > > === modified file 'plugin/errmsg_stderr/errmsg_stderr.cc' > --- plugin/errmsg_stderr/errmsg_stderr.cc 2009-08-05 09:29:04 +0000 > +++ plugin/errmsg_stderr/errmsg_stderr.cc 2009-09-27 23:10:31 +0000 > @@ -18,7 +18,7 @@ > */ > > #include > -#include > +#include > #include > > #include /* for vsnprintf */ > @@ -28,7 +28,7 @@ > /* todo, make this dynamic as needed */ > #define MAX_MSG_LEN 8192 > > -class Error_message_stderr : public Error_message_handler > +class Error_message_stderr : public drizzled::plugin::ErrorMessage > { > public: > Error_message_stderr() : Error_message_handler > ("Error_message_stderr") {} > > === modified file 'plugin/gearman_udf/gearman_udf.cc' > --- plugin/gearman_udf/gearman_udf.cc 2009-08-17 20:54:05 +0000 > +++ plugin/gearman_udf/gearman_udf.cc 2009-09-27 23:10:31 +0000 > @@ -14,7 +14,7 @@ > Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA > 02110-1301 USA */ > > #include "drizzled/server_includes.h" > -#include "drizzled/slot/function.h" > +#include "drizzled/plugin/function.h" > > #include "gman_servers_set.h" > #include "gman_do.h" > @@ -41,25 +41,25 @@ > gman_do_background= new > plugin::Create_function > ("gman_do_background"); > gman_do_high_background= new > plugin::Create_function > ("gman_do_high_background"); > gman_do_low_background= new > plugin::Create_function > ("gman_do_low_background"); > - registry.function.add(gman_servers_set); > - registry.function.add(gman_do); > - registry.function.add(gman_do_high); > - registry.function.add(gman_do_low); > - registry.function.add(gman_do_background); > - registry.function.add(gman_do_high_background); > - registry.function.add(gman_do_low_background); > + registry.add(gman_servers_set); > + registry.add(gman_do); > + registry.add(gman_do_high); > + registry.add(gman_do_low); > + registry.add(gman_do_background); > + registry.add(gman_do_high_background); > + registry.add(gman_do_low_background); > return 0; > } > > static int gearman_udf_plugin_deinit(drizzled::plugin::Registry > ®istry) > { > - registry.function.remove(gman_do_low_background); > - registry.function.remove(gman_do_high_background); > - registry.function.remove(gman_do_background); > - registry.function.remove(gman_do_low); > - registry.function.remove(gman_do_high); > - registry.function.remove(gman_do); > - registry.function.remove(gman_servers_set); > + registry.remove(gman_do_low_background); > + registry.remove(gman_do_high_background); > + registry.remove(gman_do_background); > + registry.remove(gman_do_low); > + registry.remove(gman_do_high); > + registry.remove(gman_do); > + registry.remove(gman_servers_set); > delete gman_do_low_background; > delete gman_do_high_background; > delete gman_do_background; > > === modified file 'plugin/heap/ha_heap.cc' > --- plugin/heap/ha_heap.cc 2009-09-23 18:52:35 +0000 > +++ plugin/heap/ha_heap.cc 2009-09-27 23:10:31 +0000 > @@ -37,10 +37,12 @@ > NULL > }; > > -class HeapEngine : public StorageEngine > +class HeapEngine : public drizzled::plugin::StorageEngine > { > public: > - HeapEngine(string name_arg) : StorageEngine(name_arg, > HTON_CAN_RECREATE|HTON_TEMPORARY_ONLY) > + HeapEngine(string name_arg) > + : drizzled::plugin::StorageEngine(name_arg, > + HTON_CAN_RECREATE| > HTON_TEMPORARY_ONLY) > { > addAlias("HEAP"); > } > @@ -111,7 +113,8 @@ > ** HEAP tables > *****************************************************************************/ > > -ha_heap::ha_heap(StorageEngine *engine_arg, TableShare *table_arg) > +ha_heap::ha_heap(drizzled::plugin::StorageEngine *engine_arg, > + TableShare *table_arg) > :handler(engine_arg, table_arg), file(0), records_changed(0), > key_stat_version(0), > internal_table(0) > {} > > === modified file 'plugin/heap/ha_heap.h' > --- plugin/heap/ha_heap.h 2009-08-18 07:00:39 +0000 > +++ plugin/heap/ha_heap.h 2009-09-27 23:10:31 +0000 > @@ -36,7 +36,7 @@ > uint32_t key_stat_version; > bool internal_table; > public: > - ha_heap(StorageEngine *engine, TableShare *table); > + ha_heap(drizzled::plugin::StorageEngine *engine, TableShare > *table); > ~ha_heap() {} > handler *clone(MEM_ROOT *mem_root); > > > === modified file 'plugin/hello_world/hello_world.cc' > --- plugin/hello_world/hello_world.cc 2009-08-17 20:54:05 +0000 > +++ plugin/hello_world/hello_world.cc 2009-09-27 23:10:31 +0000 > @@ -18,7 +18,7 @@ > */ > > #include > -#include > +#include > #include > #include > > @@ -47,14 +47,14 @@ > { > hello_world_udf= > new plugin::Create_function("hello_world"); > - registry.function.add(hello_world_udf); > + registry.add(hello_world_udf); > > return 0; > } > > static int hello_world_plugin_deinit(drizzled::plugin::Registry > ®istry) > { > - registry.function.remove(hello_world_udf); > + registry.remove(hello_world_udf); > delete hello_world_udf; > return 0; > } > > === modified file 'plugin/info_schema/info_schema.cc' > --- plugin/info_schema/info_schema.cc 2009-08-05 09:29:04 +0000 > +++ plugin/info_schema/info_schema.cc 2009-09-27 23:10:31 +0000 > @@ -32,70 +32,71 @@ > > #include > > +using namespace drizzled; > using namespace std; > > /* > * Vectors of columns for various I_S tables. > */ > -static vector char_set_columns; > -static vector collation_columns; > -static vector coll_char_columns; > -static vector col_columns; > -static vector key_col_usage_columns; > -static vector open_tab_columns; > -static vector plugin_columns; > -static vector processlist_columns; > -static vector ref_constraint_columns; > -static vector schemata_columns; > -static vector stats_columns; > -static vector status_columns; > -static vector tab_constraints_columns; > -static vector tables_columns; > -static vector tab_names_columns; > +static vector char_set_columns; > +static vector collation_columns; > +static vector coll_char_columns; > +static vector col_columns; > +static vector key_col_usage_columns; > +static vector open_tab_columns; > +static vector plugin_columns; > +static vector processlist_columns; > +static vector ref_constraint_columns; > +static vector schemata_columns; > +static vector stats_columns; > +static vector status_columns; > +static vector tab_constraints_columns; > +static vector tables_columns; > +static vector tab_names_columns; > > /* > * Methods for various I_S tables. > */ > -static InfoSchemaMethods *char_set_methods= NULL; > -static InfoSchemaMethods *collation_methods= NULL; > -static InfoSchemaMethods *coll_char_methods= NULL; > -static InfoSchemaMethods *columns_methods= NULL; > -static InfoSchemaMethods *key_col_usage_methods= NULL; > -static InfoSchemaMethods *open_tab_methods= NULL; > -static InfoSchemaMethods *plugins_methods= NULL; > -static InfoSchemaMethods *processlist_methods= NULL; > -static InfoSchemaMethods *ref_constraint_methods= NULL; > -static InfoSchemaMethods *schemata_methods= NULL; > -static InfoSchemaMethods *stats_methods= NULL; > -static InfoSchemaMethods *status_methods= NULL; > -static InfoSchemaMethods *tab_constraints_methods= NULL; > -static InfoSchemaMethods *tables_methods= NULL; > -static InfoSchemaMethods *tab_names_methods= NULL; > -static InfoSchemaMethods *variables_methods= NULL; > +static plugin::InfoSchemaMethods *char_set_methods= NULL; > +static plugin::InfoSchemaMethods *collation_methods= NULL; > +static plugin::InfoSchemaMethods *coll_char_methods= NULL; > +static plugin::InfoSchemaMethods *columns_methods= NULL; > +static plugin::InfoSchemaMethods *key_col_usage_methods= NULL; > +static plugin::InfoSchemaMethods *open_tab_methods= NULL; > +static plugin::InfoSchemaMethods *plugins_methods= NULL; > +static plugin::InfoSchemaMethods *processlist_methods= NULL; > +static plugin::InfoSchemaMethods *ref_constraint_methods= NULL; > +static plugin::InfoSchemaMethods *schemata_methods= NULL; > +static plugin::InfoSchemaMethods *stats_methods= NULL; > +static plugin::InfoSchemaMethods *status_methods= NULL; > +static plugin::InfoSchemaMethods *tab_constraints_methods= NULL; > +static plugin::InfoSchemaMethods *tables_methods= NULL; > +static plugin::InfoSchemaMethods *tab_names_methods= NULL; > +static plugin::InfoSchemaMethods *variables_methods= NULL; > > /* > * I_S tables. > */ > -static InfoSchemaTable *char_set_table= NULL; > -static InfoSchemaTable *collation_table= NULL; > -static InfoSchemaTable *coll_char_set_table= NULL; > -static InfoSchemaTable *columns_table= NULL; > -static InfoSchemaTable *key_col_usage_table= NULL; > -static InfoSchemaTable *global_stat_table= NULL; > -static InfoSchemaTable *global_var_table= NULL; > -static InfoSchemaTable *open_tab_table= NULL; > -static InfoSchemaTable *plugins_table= NULL; > -static InfoSchemaTable *processlist_table= NULL; > -static InfoSchemaTable *ref_constraint_table= NULL; > -static InfoSchemaTable *schemata_table= NULL; > -static InfoSchemaTable *sess_stat_table= NULL; > -static InfoSchemaTable *sess_var_table= NULL; > -static InfoSchemaTable *stats_table= NULL; > -static InfoSchemaTable *status_table= NULL; > -static InfoSchemaTable *tab_constraints_table= NULL; > -static InfoSchemaTable *tables_table= NULL; > -static InfoSchemaTable *tab_names_table= NULL; > -static InfoSchemaTable *var_table= NULL; > +static plugin::InfoSchemaTable *char_set_table= NULL; > +static plugin::InfoSchemaTable *collation_table= NULL; > +static plugin::InfoSchemaTable *coll_char_set_table= NULL; > +static plugin::InfoSchemaTable *columns_table= NULL; > +static plugin::InfoSchemaTable *key_col_usage_table= NULL; > +static plugin::InfoSchemaTable *global_stat_table= NULL; > +static plugin::InfoSchemaTable *global_var_table= NULL; > +static plugin::InfoSchemaTable *open_tab_table= NULL; > +static plugin::InfoSchemaTable *plugins_table= NULL; > +static plugin::InfoSchemaTable *processlist_table= NULL; > +static plugin::InfoSchemaTable *ref_constraint_table= NULL; > +static plugin::InfoSchemaTable *schemata_table= NULL; > +static plugin::InfoSchemaTable *sess_stat_table= NULL; > +static plugin::InfoSchemaTable *sess_var_table= NULL; > +static plugin::InfoSchemaTable *stats_table= NULL; > +static plugin::InfoSchemaTable *status_table= NULL; > +static plugin::InfoSchemaTable *tab_constraints_table= NULL; > +static plugin::InfoSchemaTable *tables_table= NULL; > +static plugin::InfoSchemaTable *tab_names_table= NULL; > +static plugin::InfoSchemaTable *var_table= NULL; > > /** > * Populate the vectors of columns for each I_S table. > @@ -213,82 +214,82 @@ > */ > static bool initTableMethods() > { > - if ((char_set_methods= new(std::nothrow) CharSetISMethods()) == > NULL) > - { > - return true; > - } > - > - if ((collation_methods= new(std::nothrow) CollationISMethods()) > == NULL) > - { > - return true; > - } > - > - if ((coll_char_methods= new(std::nothrow) CollCharISMethods()) == > NULL) > - { > - return true; > - } > - > - if ((columns_methods= new(std::nothrow) ColumnsISMethods()) == > NULL) > - { > - return true; > - } > - > - if ((key_col_usage_methods= new(std::nothrow) KeyColUsageISMethods > ()) == NULL) > - { > - return true; > - } > - > - if ((open_tab_methods= new(std::nothrow) OpenTablesISMethods()) > == NULL) > - { > - return true; > - } > - > - if ((plugins_methods= new(std::nothrow) PluginsISMethods()) == > NULL) > - { > - return true; > - } > - > - if ((processlist_methods= new(std::nothrow) ProcessListISMethods > ()) == NULL) > - { > - return true; > - } > - > - if ((ref_constraint_methods= new(std::nothrow) > RefConstraintsISMethods()) == NULL) > - { > - return true; > - } > - > - if ((schemata_methods= new(std::nothrow) SchemataISMethods()) == > NULL) > - { > - return true; > - } > - > - if ((stats_methods= new(std::nothrow) StatsISMethods()) == NULL) > - { > - return true; > - } > - > - if ((status_methods= new(std::nothrow) StatusISMethods()) == NULL) > - { > - return true; > - } > - > - if ((tab_constraints_methods= new(std::nothrow) > TabConstraintsISMethods()) == NULL) > - { > - return true; > - } > - > - if ((tables_methods= new(std::nothrow) TablesISMethods()) == NULL) > - { > - return true; > - } > - > - if ((tab_names_methods= new(std::nothrow) TabNamesISMethods()) == > NULL) > - { > - return true; > - } > - > - if ((variables_methods= new(std::nothrow) VariablesISMethods()) > == NULL) > + if ((char_set_methods= new(nothrow) CharSetISMethods()) == NULL) > + { > + return true; > + } > + > + if ((collation_methods= new(nothrow) CollationISMethods()) == NULL) > + { > + return true; > + } > + > + if ((coll_char_methods= new(nothrow) CollCharISMethods()) == NULL) > + { > + return true; > + } > + > + if ((columns_methods= new(nothrow) ColumnsISMethods()) == NULL) > + { > + return true; > + } > + > + if ((key_col_usage_methods= new(nothrow) KeyColUsageISMethods()) > == NULL) > + { > + return true; > + } > + > + if ((open_tab_methods= new(nothrow) OpenTablesISMethods()) == NULL) > + { > + return true; > + } > + > + if ((plugins_methods= new(nothrow) PluginsISMethods()) == NULL) > + { > + return true; > + } > + > + if ((processlist_methods= new(nothrow) ProcessListISMethods()) == > NULL) > + { > + return true; > + } > + > + if ((ref_constraint_methods= new(nothrow) RefConstraintsISMethods > ()) == NULL) > + { > + return true; > + } > + > + if ((schemata_methods= new(nothrow) SchemataISMethods()) == NULL) > + { > + return true; > + } > + > + if ((stats_methods= new(nothrow) StatsISMethods()) == NULL) > + { > + return true; > + } > + > + if ((status_methods= new(nothrow) StatusISMethods()) == NULL) > + { > + return true; > + } > + > + if ((tab_constraints_methods= new(nothrow) TabConstraintsISMethods > ()) == NULL) > + { > + return true; > + } > + > + if ((tables_methods= new(nothrow) TablesISMethods()) == NULL) > + { > + return true; > + } > + > + if ((tab_names_methods= new(nothrow) TabNamesISMethods()) == NULL) > + { > + return true; > + } > + > + if ((variables_methods= new(nothrow) VariablesISMethods()) == NULL) > { > return true; > } > @@ -327,7 +328,7 @@ > static bool initTables() > { > > - char_set_table= new(std::nothrow) InfoSchemaTable("CHARACTER_SETS", > + char_set_table= new(nothrow) plugin::InfoSchemaTable > ("CHARACTER_SETS", > char_set_columns, > -1, -1, false, > false, 0, > char_set_methods); > @@ -336,7 +337,7 @@ > return true; > } > > - collation_table= new(std::nothrow) InfoSchemaTable("COLLATIONS", > + collation_table= new(nothrow) plugin::InfoSchemaTable("COLLATIONS", > > collation_columns, > -1, -1, false, > false, 0, > > collation_methods); > @@ -345,7 +346,7 @@ > return true; > } > > - coll_char_set_table= new(std::nothrow) InfoSchemaTable > ("COLLATION_CHARACTER_SET_APPLICABILITY", > + coll_char_set_table= new(nothrow) plugin::InfoSchemaTable > ("COLLATION_CHARACTER_SET_APPLICABILITY", > > coll_char_columns, > -1, -1, > false, false, 0, > > coll_char_methods); > @@ -354,7 +355,7 @@ > return true; > } > > - columns_table= new(std::nothrow) InfoSchemaTable("COLUMNS", > + columns_table= new(nothrow) plugin::InfoSchemaTable("COLUMNS", > col_columns, > 1, 2, false, true, > OPTIMIZE_I_S_TABLE, > @@ -364,7 +365,7 @@ > return true; > } > > - key_col_usage_table= new(std::nothrow) InfoSchemaTable > ("KEY_COLUMN_USAGE", > + key_col_usage_table= new(nothrow) plugin::InfoSchemaTable > ("KEY_COLUMN_USAGE", > > key_col_usage_columns, > 4, 5, > false, true, > > OPEN_TABLE_ONLY, > @@ -374,7 +375,7 @@ > return true; > } > > - global_stat_table= new(std::nothrow) InfoSchemaTable > ("GLOBAL_STATUS", > + global_stat_table= new(nothrow) plugin::InfoSchemaTable > ("GLOBAL_STATUS", > status_columns, > -1, -1, > false, false, > 0, > status_methods); > @@ -383,7 +384,7 @@ > return true; > } > > - global_var_table= new(std::nothrow) InfoSchemaTable > ("GLOBAL_VARIABLES", > + global_var_table= new(nothrow) plugin::InfoSchemaTable > ("GLOBAL_VARIABLES", > status_columns, > -1, -1, false, > false, > 0, > variables_methods); > @@ -392,7 +393,7 @@ > return true; > } > > - open_tab_table= new(std::nothrow) InfoSchemaTable("OPEN_TABLES", > + open_tab_table= new(nothrow) plugin::InfoSchemaTable("OPEN_TABLES", > open_tab_columns, > -1, -1, true, > false, 0, > open_tab_methods); > @@ -401,7 +402,7 @@ > return true; > } > > - plugins_table= new(std::nothrow) InfoSchemaTable("PLUGINS", > + plugins_table= new(nothrow) plugin::InfoSchemaTable("PLUGINS", > plugin_columns, > -1, -1, false, > false, 0, > plugins_methods); > @@ -410,7 +411,7 @@ > return true; > } > > - processlist_table= new(std::nothrow) InfoSchemaTable("PROCESSLIST", > + processlist_table= new(nothrow) plugin::InfoSchemaTable > ("PROCESSLIST", > > processlist_columns, > -1, -1, > false, false, 0, > > processlist_methods); > @@ -419,7 +420,7 @@ > return true; > } > > - ref_constraint_table= new(std::nothrow) InfoSchemaTable > ("REFERENTIAL_CONSTRAINTS", > + ref_constraint_table= new(nothrow) plugin::InfoSchemaTable > ("REFERENTIAL_CONSTRAINTS", > > ref_constraint_columns, > 1, 9, > false, true, > > OPEN_TABLE_ONLY, > @@ -429,7 +430,7 @@ > return true; > } > > - schemata_table= new(std::nothrow) InfoSchemaTable("SCHEMATA", > + schemata_table= new(nothrow) plugin::InfoSchemaTable("SCHEMATA", > schemata_columns, > 1, -1, false, > false, 0, > schemata_methods); > @@ -438,7 +439,7 @@ > return true; > } > > - sess_stat_table= new(std::nothrow) InfoSchemaTable > ("SESSION_STATUS", > + sess_stat_table= new(nothrow) plugin::InfoSchemaTable > ("SESSION_STATUS", > status_columns, > -1, -1, false, > false, > 0, > status_methods); > @@ -447,7 +448,7 @@ > return true; > } > > - sess_var_table= new(std::nothrow) InfoSchemaTable > ("SESSION_VARIABLES", > + sess_var_table= new(nothrow) plugin::InfoSchemaTable > ("SESSION_VARIABLES", > status_columns, > -1, -1, false, > false, 0, > > variables_methods); > @@ -456,7 +457,7 @@ > return true; > } > > - stats_table= new(std::nothrow) InfoSchemaTable("STATISTICS", > + stats_table= new(nothrow) plugin::InfoSchemaTable("STATISTICS", > stats_columns, > 1, 2, false, true, > OPEN_TABLE_ONLY | > OPTIMIZE_I_S_TABLE, > @@ -466,7 +467,7 @@ > return true; > } > > - status_table= new(std::nothrow) InfoSchemaTable("STATUS", > + status_table= new(nothrow) plugin::InfoSchemaTable("STATUS", > status_columns, > -1, -1, true, > false, 0, > status_methods); > @@ -475,7 +476,7 @@ > return true; > } > > - tab_constraints_table= new(std::nothrow) InfoSchemaTable > ("TABLE_CONSTRAINTS", > + tab_constraints_table= new(nothrow) plugin::InfoSchemaTable > ("TABLE_CONSTRAINTS", > > tab_constraints_columns, > 3, 4, > false, true, > > OPEN_TABLE_ONLY, > @@ -485,7 +486,7 @@ > return true; > } > > - tables_table= new(std::nothrow) InfoSchemaTable("TABLES", > + tables_table= new(nothrow) plugin::InfoSchemaTable("TABLES", > tables_columns, > 1, 2, false, true, > OPTIMIZE_I_S_TABLE, > @@ -495,7 +496,7 @@ > return true; > } > > - tab_names_table= new(std::nothrow) InfoSchemaTable("TABLE_NAMES", > + tab_names_table= new(nothrow) plugin::InfoSchemaTable > ("TABLE_NAMES", > > tab_names_columns, > 1, 2, true, > true, 0, > > tab_names_methods); > @@ -504,7 +505,7 @@ > return true; > } > > - var_table= new(std::nothrow) InfoSchemaTable("VARIABLES", > + var_table= new(nothrow) plugin::InfoSchemaTable("VARIABLES", > status_columns, > -1, -1, true, false, 0, > variables_methods); > > === modified file 'plugin/info_schema/info_schema_columns.cc' > --- plugin/info_schema/info_schema_columns.cc 2009-07-05 17:26:20 > +0000 > +++ plugin/info_schema/info_schema_columns.cc 2009-09-27 23:10:31 > +0000 > @@ -34,12 +34,12 @@ > > using namespace std; > > -bool createCharSetColumns(vector& cols) > +bool createCharSetColumns(vector *>& cols) > { > /* > * Create each column for the CHARACTER_SET table. > */ > - const ColumnInfo *name_col= new(std::nothrow) ColumnInfo > ("CHARACTER_SET_NAME", > + const drizzled::plugin::ColumnInfo *name_col= new(std::nothrow) > drizzled::plugin::ColumnInfo("CHARACTER_SET_NAME", > 64, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -51,7 +51,7 @@ > return true; > } > > - const ColumnInfo *collate_col= new(std::nothrow) ColumnInfo > ("DEFAULT_COLLATE_NAME", > + const drizzled::plugin::ColumnInfo *collate_col= new > (std::nothrow) drizzled::plugin::ColumnInfo("DEFAULT_COLLATE_NAME", > 64, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -63,7 +63,7 @@ > return true; > } > > - const ColumnInfo *descrip_col= new(std::nothrow) ColumnInfo > ("DESCRIPTION", > + const drizzled::plugin::ColumnInfo *descrip_col= new > (std::nothrow) drizzled::plugin::ColumnInfo("DESCRIPTION", > 60, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -75,7 +75,7 @@ > return true; > } > > - const ColumnInfo *len_col= new(std::nothrow) ColumnInfo("MAXLEN", > + const drizzled::plugin::ColumnInfo *len_col= new(std::nothrow) > drizzled::plugin::ColumnInfo("MAXLEN", > 3, > > DRIZZLE_TYPE_LONGLONG, > 0, > @@ -98,12 +98,12 @@ > return false; > } > > -bool createCollationColumns(vector& cols) > +bool createCollationColumns(vector drizzled::plugin::ColumnInfo *>& cols) > { > /* > * Create each column for the COLLATION table. > */ > - const ColumnInfo *name_col= new(std::nothrow) ColumnInfo > ("COLLATION_NAME", > + const drizzled::plugin::ColumnInfo *name_col= new(std::nothrow) > drizzled::plugin::ColumnInfo("COLLATION_NAME", > 64, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -115,7 +115,7 @@ > return true; > } > > - const ColumnInfo *char_set_col= new(std::nothrow) ColumnInfo > ("CHARACTER_SET_NAME", > + const drizzled::plugin::ColumnInfo *char_set_col= new > (std::nothrow) drizzled::plugin::ColumnInfo("CHARACTER_SET_NAME", > 64, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -127,7 +127,7 @@ > return true; > } > > - const ColumnInfo *descrip_col= new(std::nothrow) ColumnInfo > ("DESCRIPTION", > + const drizzled::plugin::ColumnInfo *descrip_col= new > (std::nothrow) drizzled::plugin::ColumnInfo("DESCRIPTION", > 60, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -139,7 +139,7 @@ > return true; > } > > - const ColumnInfo *id_col= new(std::nothrow) ColumnInfo("ID", > + const drizzled::plugin::ColumnInfo *id_col= new(std::nothrow) > drizzled::plugin::ColumnInfo("ID", > > MY_INT32_NUM_DECIMAL_DIGITS, > > DRIZZLE_TYPE_LONGLONG, > 0, > @@ -151,7 +151,7 @@ > return true; > } > > - const ColumnInfo *default_col= new(std::nothrow) ColumnInfo > ("IS_DEFAULT", > + const drizzled::plugin::ColumnInfo *default_col= new > (std::nothrow) drizzled::plugin::ColumnInfo("IS_DEFAULT", > 3, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -163,7 +163,7 @@ > return true; > } > > - const ColumnInfo *compiled_col= new(std::nothrow) ColumnInfo > ("IS_COMPILED", > + const drizzled::plugin::ColumnInfo *compiled_col= new > (std::nothrow) drizzled::plugin::ColumnInfo("IS_COMPILED", > 3, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -175,7 +175,7 @@ > return true; > } > > - const ColumnInfo *sortlen_col= new(std::nothrow) ColumnInfo > ("SORTLEN", > + const drizzled::plugin::ColumnInfo *sortlen_col= new > (std::nothrow) drizzled::plugin::ColumnInfo("SORTLEN", > 3, > > DRIZZLE_TYPE_LONGLONG, > 0, > @@ -201,12 +201,12 @@ > return false; > } > > -bool createCollCharSetColumns(vector& cols) > +bool createCollCharSetColumns(vector drizzled::plugin::ColumnInfo *>& cols) > { > /* > * Create each column for the table. > */ > - const ColumnInfo *name_col= new(std::nothrow) ColumnInfo > ("COLLATION_NAME", > + const drizzled::plugin::ColumnInfo *name_col= new(std::nothrow) > drizzled::plugin::ColumnInfo("COLLATION_NAME", > 64, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -218,7 +218,7 @@ > return true; > } > > - const ColumnInfo *char_set_col= new(std::nothrow) ColumnInfo > ("CHARACTER_SET_NAME", > + const drizzled::plugin::ColumnInfo *char_set_col= new > (std::nothrow) drizzled::plugin::ColumnInfo("CHARACTER_SET_NAME", > 64, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -239,12 +239,12 @@ > return false; > } > > -bool createColColumns(vector& cols) > +bool createColColumns(vector& > cols) > { > /* > * Create each column for the COLUMNS table. > */ > - const ColumnInfo *tab_cat= new(std::nothrow) ColumnInfo > ("TABLE_CATALOG", > + const drizzled::plugin::ColumnInfo *tab_cat= new(std::nothrow) > drizzled::plugin::ColumnInfo("TABLE_CATALOG", > FN_REFLEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -256,7 +256,7 @@ > return true; > } > > - const ColumnInfo *tab_sch= new(std::nothrow) ColumnInfo > ("TABLE_SCHEMA", > + const drizzled::plugin::ColumnInfo *tab_sch= new(std::nothrow) > drizzled::plugin::ColumnInfo("TABLE_SCHEMA", > > NAME_CHAR_LEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -268,7 +268,7 @@ > return true; > } > > - const ColumnInfo *tab_name= new(std::nothrow) ColumnInfo > ("TABLE_NAME", > + const drizzled::plugin::ColumnInfo *tab_name= new(std::nothrow) > drizzled::plugin::ColumnInfo("TABLE_NAME", > > NAME_CHAR_LEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -280,7 +280,7 @@ > return true; > } > > - const ColumnInfo *col_name= new(std::nothrow) ColumnInfo > ("COLUMN_NAME", > + const drizzled::plugin::ColumnInfo *col_name= new(std::nothrow) > drizzled::plugin::ColumnInfo("COLUMN_NAME", > > NAME_CHAR_LEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -292,7 +292,7 @@ > return true; > } > > - const ColumnInfo *ord_pos= new(std::nothrow) ColumnInfo > ("ORDINAL_POSITION", > + const drizzled::plugin::ColumnInfo *ord_pos= new(std::nothrow) > drizzled::plugin::ColumnInfo("ORDINAL_POSITION", > > MY_INT64_NUM_DECIMAL_DIGITS, > > DRIZZLE_TYPE_LONGLONG, > 0, > @@ -304,7 +304,7 @@ > return true; > } > > - const ColumnInfo *col_def= new(std::nothrow) ColumnInfo > ("COLUMN_DEFAULT", > + const drizzled::plugin::ColumnInfo *col_def= new(std::nothrow) > drizzled::plugin::ColumnInfo("COLUMN_DEFAULT", > > MAX_FIELD_VARCHARLENGTH, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -316,7 +316,7 @@ > return true; > } > > - const ColumnInfo *is_nullable= new(std::nothrow) ColumnInfo > ("IS_NULLABLE", > + const drizzled::plugin::ColumnInfo *is_nullable= new > (std::nothrow) drizzled::plugin::ColumnInfo("IS_NULLABLE", > 3, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -328,7 +328,7 @@ > return true; > } > > - const ColumnInfo *data_type= new(std::nothrow) ColumnInfo > ("DATA_TYPE", > + const drizzled::plugin::ColumnInfo *data_type= new(std::nothrow) > drizzled::plugin::ColumnInfo("DATA_TYPE", > > NAME_CHAR_LEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -340,7 +340,7 @@ > return true; > } > > - const ColumnInfo *max_len= new(std::nothrow) ColumnInfo > ("CHARACTER_MAXIMUM_LENGTH", > + const drizzled::plugin::ColumnInfo *max_len= new(std::nothrow) > drizzled::plugin::ColumnInfo("CHARACTER_MAXIMUM_LENGTH", > > MY_INT64_NUM_DECIMAL_DIGITS, > > DRIZZLE_TYPE_LONGLONG, > 0, > @@ -352,7 +352,7 @@ > return true; > } > > - const ColumnInfo *octet_len= new(std::nothrow) ColumnInfo > ("CHARACTER_OCTET_LENGTH", > + const drizzled::plugin::ColumnInfo *octet_len= new(std::nothrow) > drizzled::plugin::ColumnInfo("CHARACTER_OCTET_LENGTH", > > MY_INT64_NUM_DECIMAL_DIGITS, > > DRIZZLE_TYPE_LONGLONG, > 0, > @@ -364,7 +364,7 @@ > return true; > } > > - const ColumnInfo *num_prec= new(std::nothrow) ColumnInfo > ("NUMERIC_PRECISION", > + const drizzled::plugin::ColumnInfo *num_prec= new(std::nothrow) > drizzled::plugin::ColumnInfo("NUMERIC_PRECISION", > > MY_INT64_NUM_DECIMAL_DIGITS, > > DRIZZLE_TYPE_LONGLONG, > 0, > @@ -376,7 +376,7 @@ > return true; > } > > - const ColumnInfo *num_scale= new(std::nothrow) ColumnInfo > ("NUMERIC_SCALE", > + const drizzled::plugin::ColumnInfo *num_scale= new(std::nothrow) > drizzled::plugin::ColumnInfo("NUMERIC_SCALE", > > MY_INT64_NUM_DECIMAL_DIGITS, > > DRIZZLE_TYPE_LONGLONG, > 0, > @@ -388,7 +388,7 @@ > return true; > } > > - const ColumnInfo *char_set_name= new(std::nothrow) ColumnInfo > ("CHARACTER_SET_NAME", > + const drizzled::plugin::ColumnInfo *char_set_name= new > (std::nothrow) drizzled::plugin::ColumnInfo("CHARACTER_SET_NAME", > 64, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -400,7 +400,7 @@ > return true; > } > > - const ColumnInfo *coll_name= new(std::nothrow) ColumnInfo > ("COLLATION_NAME", > + const drizzled::plugin::ColumnInfo *coll_name= new(std::nothrow) > drizzled::plugin::ColumnInfo("COLLATION_NAME", > 64, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -412,7 +412,7 @@ > return true; > } > > - const ColumnInfo *col_type= new(std::nothrow) ColumnInfo > ("COLUMN_TYPE", > + const drizzled::plugin::ColumnInfo *col_type= new(std::nothrow) > drizzled::plugin::ColumnInfo("COLUMN_TYPE", > 65535, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -424,7 +424,7 @@ > return true; > } > > - const ColumnInfo *col_key= new(std::nothrow) ColumnInfo > ("COLUMN_KEY", > + const drizzled::plugin::ColumnInfo *col_key= new(std::nothrow) > drizzled::plugin::ColumnInfo("COLUMN_KEY", > 3, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -436,7 +436,7 @@ > return true; > } > > - const ColumnInfo *extra= new(std::nothrow) ColumnInfo("EXTRA", > + const drizzled::plugin::ColumnInfo *extra= new(std::nothrow) > drizzled::plugin::ColumnInfo("EXTRA", > 27, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -448,7 +448,7 @@ > return true; > } > > - const ColumnInfo *priv= new(std::nothrow) ColumnInfo("PRIVILEGES", > + const drizzled::plugin::ColumnInfo *priv= new(std::nothrow) > drizzled::plugin::ColumnInfo("PRIVILEGES", > 80, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -460,7 +460,7 @@ > return true; > } > > - const ColumnInfo *col_comment= new(std::nothrow) ColumnInfo > ("COLUMN_COMMENT", > + const drizzled::plugin::ColumnInfo *col_comment= new > (std::nothrow) drizzled::plugin::ColumnInfo("COLUMN_COMMENT", > > COLUMN_COMMENT_MAXLEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -472,7 +472,7 @@ > return true; > } > > - const ColumnInfo *storage= new(std::nothrow) ColumnInfo("STORAGE", > + const drizzled::plugin::ColumnInfo *storage= new(std::nothrow) > drizzled::plugin::ColumnInfo("STORAGE", > 8, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -484,7 +484,7 @@ > return true; > } > > - const ColumnInfo *format= new(std::nothrow) ColumnInfo("FORMAT", > + const drizzled::plugin::ColumnInfo *format= new(std::nothrow) > drizzled::plugin::ColumnInfo("FORMAT", > 8, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -524,9 +524,9 @@ > return false; > } > > -bool createKeyColUsageColumns(vector& cols) > +bool createKeyColUsageColumns(vector drizzled::plugin::ColumnInfo *>& cols) > { > - const ColumnInfo *cat= new(std::nothrow) ColumnInfo > ("CONSTRAINT_CATALOG", > + const drizzled::plugin::ColumnInfo *cat= new(std::nothrow) > drizzled::plugin::ColumnInfo("CONSTRAINT_CATALOG", > FN_REFLEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -538,7 +538,7 @@ > return true; > } > > - const ColumnInfo *sch= new(std::nothrow) ColumnInfo > ("CONSTRAINT_SCHEMA", > + const drizzled::plugin::ColumnInfo *sch= new(std::nothrow) > drizzled::plugin::ColumnInfo("CONSTRAINT_SCHEMA", > NAME_CHAR_LEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -550,7 +550,7 @@ > return true; > } > > - const ColumnInfo *name= new(std::nothrow) ColumnInfo > ("CONSTRAINT_NAME", > + const drizzled::plugin::ColumnInfo *name= new(std::nothrow) > drizzled::plugin::ColumnInfo("CONSTRAINT_NAME", > NAME_CHAR_LEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -562,7 +562,7 @@ > return true; > } > > - const ColumnInfo *tab_cat= new(std::nothrow) ColumnInfo > ("TABLE_CATALOG", > + const drizzled::plugin::ColumnInfo *tab_cat= new(std::nothrow) > drizzled::plugin::ColumnInfo("TABLE_CATALOG", > FN_REFLEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -574,7 +574,7 @@ > return true; > } > > - const ColumnInfo *tab_sch= new(std::nothrow) ColumnInfo > ("TABLE_SCHEMA", > + const drizzled::plugin::ColumnInfo *tab_sch= new(std::nothrow) > drizzled::plugin::ColumnInfo("TABLE_SCHEMA", > > NAME_CHAR_LEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -586,7 +586,7 @@ > return true; > } > > - const ColumnInfo *tab_name= new(std::nothrow) ColumnInfo > ("TABLE_NAME", > + const drizzled::plugin::ColumnInfo *tab_name= new(std::nothrow) > drizzled::plugin::ColumnInfo("TABLE_NAME", > > NAME_CHAR_LEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -598,7 +598,7 @@ > return true; > } > > - const ColumnInfo *col_name= new(std::nothrow) ColumnInfo > ("COLUMN_NAME", > + const drizzled::plugin::ColumnInfo *col_name= new(std::nothrow) > drizzled::plugin::ColumnInfo("COLUMN_NAME", > > NAME_CHAR_LEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -609,7 +609,7 @@ > { > return true; > } > - const ColumnInfo *ord_pos= new(std::nothrow) ColumnInfo > ("ORDINAL_POSITION", > + const drizzled::plugin::ColumnInfo *ord_pos= new(std::nothrow) > drizzled::plugin::ColumnInfo("ORDINAL_POSITION", > 10, > > DRIZZLE_TYPE_LONGLONG, > 0, > @@ -621,7 +621,7 @@ > return true; > } > > - const ColumnInfo *pos_in_uniq= new(std::nothrow) ColumnInfo > ("POSITION_IN_UNIQUE_CONSTRAINT", > + const drizzled::plugin::ColumnInfo *pos_in_uniq= new > (std::nothrow) drizzled::plugin::ColumnInfo > ("POSITION_IN_UNIQUE_CONSTRAINT", > 10, > > DRIZZLE_TYPE_LONGLONG, > 0, > @@ -633,7 +633,7 @@ > return true; > } > > - const ColumnInfo *ref_tab_sch= new(std::nothrow) ColumnInfo > ("REFERENCED_TABLE_SCHEMA", > + const drizzled::plugin::ColumnInfo *ref_tab_sch= new > (std::nothrow) drizzled::plugin::ColumnInfo("REFERENCED_TABLE_SCHEMA", > > NAME_CHAR_LEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -645,7 +645,7 @@ > return true; > } > > - const ColumnInfo *ref_tab_name= new(std::nothrow) ColumnInfo > ("REFERENCED_TABLE_NAME", > + const drizzled::plugin::ColumnInfo *ref_tab_name= new > (std::nothrow) drizzled::plugin::ColumnInfo("REFERENCED_TABLE_NAME", > > NAME_CHAR_LEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -657,7 +657,7 @@ > return true; > } > > - const ColumnInfo *ref_col_name= new(std::nothrow) ColumnInfo > ("REFERENCED_COLUMN_NAME", > + const drizzled::plugin::ColumnInfo *ref_col_name= new > (std::nothrow) drizzled::plugin::ColumnInfo("REFERENCED_COLUMN_NAME", > > NAME_CHAR_LEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -685,9 +685,9 @@ > return false; > } > > -bool createOpenTabColumns(vector& cols) > +bool createOpenTabColumns(vector *>& cols) > { > - const ColumnInfo *db= new(std::nothrow) ColumnInfo("Database", > + const drizzled::plugin::ColumnInfo *db= new(std::nothrow) > drizzled::plugin::ColumnInfo("Database", > NAME_CHAR_LEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -699,7 +699,7 @@ > return true; > } > > - const ColumnInfo *tab= new(std::nothrow) ColumnInfo("Table", > + const drizzled::plugin::ColumnInfo *tab= new(std::nothrow) > drizzled::plugin::ColumnInfo("Table", > NAME_CHAR_LEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -711,7 +711,7 @@ > return true; > } > > - const ColumnInfo *in_use= new(std::nothrow) ColumnInfo("In_use", > + const drizzled::plugin::ColumnInfo *in_use= new(std::nothrow) > drizzled::plugin::ColumnInfo("In_use", > 1, > > DRIZZLE_TYPE_LONGLONG, > 0, > @@ -723,7 +723,7 @@ > return true; > } > > - const ColumnInfo *name_locked= new(std::nothrow) ColumnInfo > ("Name_locked", > + const drizzled::plugin::ColumnInfo *name_locked= new > (std::nothrow) drizzled::plugin::ColumnInfo("Name_locked", > 4, > > DRIZZLE_TYPE_LONGLONG, > 0, > @@ -743,9 +743,9 @@ > return false; > } > > -bool createPluginsColumns(vector& cols) > +bool createPluginsColumns(vector *>& cols) > { > - const ColumnInfo *name= new(std::nothrow) ColumnInfo("PLUGIN_NAME", > + const drizzled::plugin::ColumnInfo *name= new(std::nothrow) > drizzled::plugin::ColumnInfo("PLUGIN_NAME", > NAME_CHAR_LEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -757,7 +757,7 @@ > return true; > } > > - const ColumnInfo *ver= new(std::nothrow) ColumnInfo > ("PLUGIN_VERSION", > + const drizzled::plugin::ColumnInfo *ver= new(std::nothrow) > drizzled::plugin::ColumnInfo("PLUGIN_VERSION", > 20, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -769,7 +769,7 @@ > return true; > } > > - const ColumnInfo *stat= new(std::nothrow) ColumnInfo > ("PLUGIN_STATUS", > + const drizzled::plugin::ColumnInfo *stat= new(std::nothrow) > drizzled::plugin::ColumnInfo("PLUGIN_STATUS", > 10, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -781,7 +781,7 @@ > return true; > } > > - const ColumnInfo *aut= new(std::nothrow) ColumnInfo > ("PLUGIN_AUTHOR", > + const drizzled::plugin::ColumnInfo *aut= new(std::nothrow) > drizzled::plugin::ColumnInfo("PLUGIN_AUTHOR", > NAME_CHAR_LEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -793,7 +793,7 @@ > return true; > } > > - const ColumnInfo *descrip= new(std::nothrow) ColumnInfo > ("PLUGIN_DESCRIPTION", > + const drizzled::plugin::ColumnInfo *descrip= new(std::nothrow) > drizzled::plugin::ColumnInfo("PLUGIN_DESCRIPTION", > 65535, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -805,7 +805,7 @@ > return true; > } > > - const ColumnInfo *lic= new(std::nothrow) ColumnInfo > ("PLUGIN_LICENSE", > + const drizzled::plugin::ColumnInfo *lic= new(std::nothrow) > drizzled::plugin::ColumnInfo("PLUGIN_LICENSE", > 80, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -827,12 +827,12 @@ > return false; > } > > -bool createProcessListColumns(vector& cols) > +bool createProcessListColumns(vector drizzled::plugin::ColumnInfo *>& cols) > { > /* > * Create each column for the PROCESSLIST table. > */ > - const ColumnInfo *id_col= new(std::nothrow) ColumnInfo("ID", > + const drizzled::plugin::ColumnInfo *id_col= new(std::nothrow) > drizzled::plugin::ColumnInfo("ID", > 4, > > DRIZZLE_TYPE_LONGLONG, > 0, > @@ -844,7 +844,7 @@ > return true; > } > > - const ColumnInfo *user_col= new(std::nothrow) ColumnInfo("USER", > + const drizzled::plugin::ColumnInfo *user_col= new(std::nothrow) > drizzled::plugin::ColumnInfo("USER", > 16, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -856,7 +856,7 @@ > return true; > } > > - const ColumnInfo *host_col= new(std::nothrow) ColumnInfo("HOST", > + const drizzled::plugin::ColumnInfo *host_col= new(std::nothrow) > drizzled::plugin::ColumnInfo("HOST", > > LIST_PROCESS_HOST_LEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -868,7 +868,7 @@ > return true; > } > > - const ColumnInfo *db_col= new(std::nothrow) ColumnInfo("DB", > + const drizzled::plugin::ColumnInfo *db_col= new(std::nothrow) > drizzled::plugin::ColumnInfo("DB", > > NAME_CHAR_LEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -880,7 +880,7 @@ > return true; > } > > - const ColumnInfo *command_col= new(std::nothrow) ColumnInfo > ("COMMAND", > + const drizzled::plugin::ColumnInfo *command_col= new > (std::nothrow) drizzled::plugin::ColumnInfo("COMMAND", > 16, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -892,7 +892,7 @@ > return true; > } > > - const ColumnInfo *time_col= new(std::nothrow) ColumnInfo("TIME", > + const drizzled::plugin::ColumnInfo *time_col= new(std::nothrow) > drizzled::plugin::ColumnInfo("TIME", > 7, > > DRIZZLE_TYPE_LONGLONG, > 0, > @@ -904,7 +904,7 @@ > return true; > } > > - const ColumnInfo *state_col= new(std::nothrow) ColumnInfo("STATE", > + const drizzled::plugin::ColumnInfo *state_col= new(std::nothrow) > drizzled::plugin::ColumnInfo("STATE", > 64, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -916,7 +916,7 @@ > return true; > } > > - const ColumnInfo *info_col= new(std::nothrow) ColumnInfo("INFO", > + const drizzled::plugin::ColumnInfo *info_col= new(std::nothrow) > drizzled::plugin::ColumnInfo("INFO", > > PROCESS_LIST_INFO_WIDTH, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -943,12 +943,12 @@ > return false; > } > > -bool createRefConstraintColumns(vector& cols) > +bool createRefConstraintColumns(vector drizzled::plugin::ColumnInfo *>& cols) > { > /* > * Create the columns for the table. > */ > - const ColumnInfo *cat= new(std::nothrow) ColumnInfo > ("CONSTRAINT_CATALOG", > + const drizzled::plugin::ColumnInfo *cat= new(std::nothrow) > drizzled::plugin::ColumnInfo("CONSTRAINT_CATALOG", > FN_REFLEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -961,7 +961,7 @@ > return true; > } > > - const ColumnInfo *sch= new(std::nothrow) ColumnInfo > ("CONSTRAINT_SCHEMA", > + const drizzled::plugin::ColumnInfo *sch= new(std::nothrow) > drizzled::plugin::ColumnInfo("CONSTRAINT_SCHEMA", > NAME_CHAR_LEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -973,7 +973,7 @@ > return true; > } > > - const ColumnInfo *name= new(std::nothrow) ColumnInfo > ("CONSTRAINT_NAME", > + const drizzled::plugin::ColumnInfo *name= new(std::nothrow) > drizzled::plugin::ColumnInfo("CONSTRAINT_NAME", > NAME_CHAR_LEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -985,7 +985,7 @@ > return true; > } > > - const ColumnInfo *uniq_cat= new(std::nothrow) ColumnInfo > ("UNIQUE_CONSTRAINT_CATALOG", > + const drizzled::plugin::ColumnInfo *uniq_cat= new(std::nothrow) > drizzled::plugin::ColumnInfo("UNIQUE_CONSTRAINT_CATALOG", > FN_REFLEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -997,7 +997,7 @@ > return true; > } > > - const ColumnInfo *uniq_sch= new(std::nothrow) ColumnInfo > ("UNIQUE_CONSTRAINT_SCHEMA", > + const drizzled::plugin::ColumnInfo *uniq_sch= new(std::nothrow) > drizzled::plugin::ColumnInfo("UNIQUE_CONSTRAINT_SCHEMA", > > NAME_CHAR_LEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -1009,7 +1009,7 @@ > return true; > } > > - const ColumnInfo *uniq_name= new(std::nothrow) ColumnInfo > ("UNIQUE_CONSTRAINT_NAME", > + const drizzled::plugin::ColumnInfo *uniq_name= new(std::nothrow) > drizzled::plugin::ColumnInfo("UNIQUE_CONSTRAINT_NAME", > > NAME_CHAR_LEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -1021,7 +1021,7 @@ > return true; > } > > - const ColumnInfo *match= new(std::nothrow) ColumnInfo > ("MATCH_OPTION", > + const drizzled::plugin::ColumnInfo *match= new(std::nothrow) > drizzled::plugin::ColumnInfo("MATCH_OPTION", > NAME_CHAR_LEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -1033,7 +1033,7 @@ > return true; > } > > - const ColumnInfo *update= new(std::nothrow) ColumnInfo > ("UPDATE_RULE", > + const drizzled::plugin::ColumnInfo *update= new(std::nothrow) > drizzled::plugin::ColumnInfo("UPDATE_RULE", > > NAME_CHAR_LEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -1045,7 +1045,7 @@ > return true; > } > > - const ColumnInfo *del_rule= new(std::nothrow) ColumnInfo > ("DELETE_RULE", > + const drizzled::plugin::ColumnInfo *del_rule= new(std::nothrow) > drizzled::plugin::ColumnInfo("DELETE_RULE", > > NAME_CHAR_LEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -1057,7 +1057,7 @@ > return true; > } > > - const ColumnInfo *tab_name= new(std::nothrow) ColumnInfo > ("TABLE_NAME", > + const drizzled::plugin::ColumnInfo *tab_name= new(std::nothrow) > drizzled::plugin::ColumnInfo("TABLE_NAME", > > NAME_CHAR_LEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -1069,7 +1069,7 @@ > return true; > } > > - const ColumnInfo *ref_name= new(std::nothrow) ColumnInfo > ("REFERENCED_TABLE_NAME", > + const drizzled::plugin::ColumnInfo *ref_name= new(std::nothrow) > drizzled::plugin::ColumnInfo("REFERENCED_TABLE_NAME", > > NAME_CHAR_LEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -1099,9 +1099,9 @@ > return false; > } > > -bool createSchemataColumns(vector& cols) > +bool createSchemataColumns(vector drizzled::plugin::ColumnInfo *>& cols) > { > - const ColumnInfo *cat_name= new(std::nothrow) ColumnInfo > ("CATALOG_NAME", > + const drizzled::plugin::ColumnInfo *cat_name= new(std::nothrow) > drizzled::plugin::ColumnInfo("CATALOG_NAME", > FN_REFLEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -1113,7 +1113,7 @@ > return true; > } > > - const ColumnInfo *sch_name= new(std::nothrow) ColumnInfo > ("SCHEMA_NAME", > + const drizzled::plugin::ColumnInfo *sch_name= new(std::nothrow) > drizzled::plugin::ColumnInfo("SCHEMA_NAME", > > NAME_CHAR_LEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -1125,7 +1125,7 @@ > return true; > } > > - const ColumnInfo *cs_name= new(std::nothrow) ColumnInfo > ("DEFAULT_CHARACTER_SET_NAME", > + const drizzled::plugin::ColumnInfo *cs_name= new(std::nothrow) > drizzled::plugin::ColumnInfo("DEFAULT_CHARACTER_SET_NAME", > 64, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -1137,7 +1137,7 @@ > return true; > } > > - const ColumnInfo *coll_name= new(std::nothrow) ColumnInfo > ("DEFAULT_COLLATION_NAME", > + const drizzled::plugin::ColumnInfo *coll_name= new(std::nothrow) > drizzled::plugin::ColumnInfo("DEFAULT_COLLATION_NAME", > 64, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -1149,7 +1149,7 @@ > return true; > } > > - const ColumnInfo *sql_path= new(std::nothrow) ColumnInfo > ("SQL_PATH", > + const drizzled::plugin::ColumnInfo *sql_path= new(std::nothrow) > drizzled::plugin::ColumnInfo("SQL_PATH", > FN_REFLEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -1170,9 +1170,9 @@ > return false; > } > > -bool createStatsColumns(vector& cols) > +bool createStatsColumns(vector *>& cols) > { > - const ColumnInfo *cat= new(std::nothrow) ColumnInfo > ("TABLE_CATALOG", > + const drizzled::plugin::ColumnInfo *cat= new(std::nothrow) > drizzled::plugin::ColumnInfo("TABLE_CATALOG", > FN_REFLEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -1184,7 +1184,7 @@ > return true; > } > > - const ColumnInfo *sch= new(std::nothrow) ColumnInfo("TABLE_SCHEMA", > + const drizzled::plugin::ColumnInfo *sch= new(std::nothrow) > drizzled::plugin::ColumnInfo("TABLE_SCHEMA", > NAME_CHAR_LEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -1196,7 +1196,7 @@ > return true; > } > > - const ColumnInfo *name= new(std::nothrow) ColumnInfo("TABLE_NAME", > + const drizzled::plugin::ColumnInfo *name= new(std::nothrow) > drizzled::plugin::ColumnInfo("TABLE_NAME", > NAME_CHAR_LEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -1208,7 +1208,7 @@ > return true; > } > > - const ColumnInfo *uniq= new(std::nothrow) ColumnInfo("NON_UNIQUE", > + const drizzled::plugin::ColumnInfo *uniq= new(std::nothrow) > drizzled::plugin::ColumnInfo("NON_UNIQUE", > 1, > > DRIZZLE_TYPE_LONGLONG, > 0, > @@ -1220,7 +1220,7 @@ > return true; > } > > - const ColumnInfo *idx_sch= new(std::nothrow) ColumnInfo > ("INDEX_SCHEMA", > + const drizzled::plugin::ColumnInfo *idx_sch= new(std::nothrow) > drizzled::plugin::ColumnInfo("INDEX_SCHEMA", > > NAME_CHAR_LEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -1232,7 +1232,7 @@ > return true; > } > > - const ColumnInfo *idx_name= new(std::nothrow) ColumnInfo > ("INDEX_NAME", > + const drizzled::plugin::ColumnInfo *idx_name= new(std::nothrow) > drizzled::plugin::ColumnInfo("INDEX_NAME", > > NAME_CHAR_LEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -1244,7 +1244,7 @@ > return true; > } > > - const ColumnInfo *seq_in_idx= new(std::nothrow) ColumnInfo > ("SEQ_IN_INDEX", > + const drizzled::plugin::ColumnInfo *seq_in_idx= new(std::nothrow) > drizzled::plugin::ColumnInfo("SEQ_IN_INDEX", > 2, > > DRIZZLE_TYPE_LONGLONG, > 0, > @@ -1256,7 +1256,7 @@ > return true; > } > > - const ColumnInfo *col_name= new(std::nothrow) ColumnInfo > ("COLUMN_NAME", > + const drizzled::plugin::ColumnInfo *col_name= new(std::nothrow) > drizzled::plugin::ColumnInfo("COLUMN_NAME", > > NAME_CHAR_LEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -1268,7 +1268,7 @@ > return true; > } > > - const ColumnInfo *coll= new(std::nothrow) ColumnInfo("COLLATION", > + const drizzled::plugin::ColumnInfo *coll= new(std::nothrow) > drizzled::plugin::ColumnInfo("COLLATION", > 1, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -1280,7 +1280,7 @@ > return true; > } > > - const ColumnInfo *card= new(std::nothrow) ColumnInfo("CARDINALITY", > + const drizzled::plugin::ColumnInfo *card= new(std::nothrow) > drizzled::plugin::ColumnInfo("CARDINALITY", > > MY_INT64_NUM_DECIMAL_DIGITS, > > DRIZZLE_TYPE_LONGLONG, > 0, > @@ -1292,7 +1292,7 @@ > return true; > } > > - const ColumnInfo *sub_part= new(std::nothrow) ColumnInfo > ("SUB_PART", > + const drizzled::plugin::ColumnInfo *sub_part= new(std::nothrow) > drizzled::plugin::ColumnInfo("SUB_PART", > 3, > > DRIZZLE_TYPE_LONGLONG, > 0, > @@ -1304,7 +1304,7 @@ > return true; > } > > - const ColumnInfo *packed= new(std::nothrow) ColumnInfo("PACKED", > + const drizzled::plugin::ColumnInfo *packed= new(std::nothrow) > drizzled::plugin::ColumnInfo("PACKED", > 10, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -1316,7 +1316,7 @@ > return true; > } > > - const ColumnInfo *nullable= new(std::nothrow) ColumnInfo > ("NULLABLE", > + const drizzled::plugin::ColumnInfo *nullable= new(std::nothrow) > drizzled::plugin::ColumnInfo("NULLABLE", > 3, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -1328,7 +1328,7 @@ > return true; > } > > - const ColumnInfo *idx_type= new(std::nothrow) ColumnInfo > ("INDEX_TYPE", > + const drizzled::plugin::ColumnInfo *idx_type= new(std::nothrow) > drizzled::plugin::ColumnInfo("INDEX_TYPE", > 16, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -1340,7 +1340,7 @@ > return true; > } > > - const ColumnInfo *comment= new(std::nothrow) ColumnInfo("COMMENT", > + const drizzled::plugin::ColumnInfo *comment= new(std::nothrow) > drizzled::plugin::ColumnInfo("COMMENT", > 16, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -1352,7 +1352,7 @@ > return true; > } > > - const ColumnInfo *idx_comment= new(std::nothrow) ColumnInfo > ("INDEX_COMMENT", > + const drizzled::plugin::ColumnInfo *idx_comment= new > (std::nothrow) drizzled::plugin::ColumnInfo("INDEX_COMMENT", > > INDEX_COMMENT_MAXLEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -1384,9 +1384,9 @@ > return false; > } > > -bool createStatusColumns(vector& cols) > +bool createStatusColumns(vector *>& cols) > { > - const ColumnInfo *name= new(std::nothrow) ColumnInfo > ("VARIABLE_NAME", > + const drizzled::plugin::ColumnInfo *name= new(std::nothrow) > drizzled::plugin::ColumnInfo("VARIABLE_NAME", > 64, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -1398,7 +1398,7 @@ > return true; > } > > - const ColumnInfo *value= new(std::nothrow) ColumnInfo > ("VARIABLE_VALUE", > + const drizzled::plugin::ColumnInfo *value= new(std::nothrow) > drizzled::plugin::ColumnInfo("VARIABLE_VALUE", > 16300, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -1416,9 +1416,9 @@ > return false; > } > > -bool createTabConstraintsColumns(vector& cols) > +bool createTabConstraintsColumns(vector drizzled::plugin::ColumnInfo *>& cols) > { > - const ColumnInfo *cat= new(std::nothrow) ColumnInfo > ("CONSTRAINT_CATALOG", > + const drizzled::plugin::ColumnInfo *cat= new(std::nothrow) > drizzled::plugin::ColumnInfo("CONSTRAINT_CATALOG", > FN_REFLEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -1430,7 +1430,7 @@ > return true; > } > > - const ColumnInfo *sch= new(std::nothrow) ColumnInfo > ("CONSTRAINT_SCHEMA", > + const drizzled::plugin::ColumnInfo *sch= new(std::nothrow) > drizzled::plugin::ColumnInfo("CONSTRAINT_SCHEMA", > NAME_CHAR_LEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -1442,7 +1442,7 @@ > return true; > } > > - const ColumnInfo *name= new(std::nothrow) ColumnInfo > ("CONSTRAINT_NAME", > + const drizzled::plugin::ColumnInfo *name= new(std::nothrow) > drizzled::plugin::ColumnInfo("CONSTRAINT_NAME", > NAME_CHAR_LEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -1454,7 +1454,7 @@ > return true; > } > > - const ColumnInfo *tab_sch= new(std::nothrow) ColumnInfo > ("TABLE_SCHEMA", > + const drizzled::plugin::ColumnInfo *tab_sch= new(std::nothrow) > drizzled::plugin::ColumnInfo("TABLE_SCHEMA", > > NAME_CHAR_LEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -1466,7 +1466,7 @@ > return true; > } > > - const ColumnInfo *tab_name= new(std::nothrow) ColumnInfo > ("TABLE_NAME", > + const drizzled::plugin::ColumnInfo *tab_name= new(std::nothrow) > drizzled::plugin::ColumnInfo("TABLE_NAME", > > NAME_CHAR_LEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -1478,7 +1478,7 @@ > return true; > } > > - const ColumnInfo *type= new(std::nothrow) ColumnInfo > ("CONSTRAINT_TYPE", > + const drizzled::plugin::ColumnInfo *type= new(std::nothrow) > drizzled::plugin::ColumnInfo("CONSTRAINT_TYPE", > NAME_CHAR_LEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -1500,9 +1500,9 @@ > return false; > } > > -bool createTablesColumns(vector& cols) > +bool createTablesColumns(vector *>& cols) > { > - const ColumnInfo *cat= new(std::nothrow) ColumnInfo > ("TABLE_CATALOG", > + const drizzled::plugin::ColumnInfo *cat= new(std::nothrow) > drizzled::plugin::ColumnInfo("TABLE_CATALOG", > FN_REFLEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -1514,7 +1514,7 @@ > return true; > } > > - const ColumnInfo *sch= new(std::nothrow) ColumnInfo("TABLE_SCHEMA", > + const drizzled::plugin::ColumnInfo *sch= new(std::nothrow) > drizzled::plugin::ColumnInfo("TABLE_SCHEMA", > NAME_CHAR_LEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -1526,7 +1526,7 @@ > return true; > } > > - const ColumnInfo *name= new(std::nothrow) ColumnInfo("TABLE_NAME", > + const drizzled::plugin::ColumnInfo *name= new(std::nothrow) > drizzled::plugin::ColumnInfo("TABLE_NAME", > NAME_CHAR_LEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -1538,7 +1538,7 @@ > return true; > } > > - const ColumnInfo *type= new(std::nothrow) ColumnInfo("TABLE_TYPE", > + const drizzled::plugin::ColumnInfo *type= new(std::nothrow) > drizzled::plugin::ColumnInfo("TABLE_TYPE", > NAME_CHAR_LEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -1550,7 +1550,7 @@ > return true; > } > > - const ColumnInfo *engine= new(std::nothrow) ColumnInfo("ENGINE", > + const drizzled::plugin::ColumnInfo *engine= new(std::nothrow) > drizzled::plugin::ColumnInfo("ENGINE", > > NAME_CHAR_LEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -1562,7 +1562,7 @@ > return true; > } > > - const ColumnInfo *version= new(std::nothrow) ColumnInfo("VERSION", > + const drizzled::plugin::ColumnInfo *version= new(std::nothrow) > drizzled::plugin::ColumnInfo("VERSION", > > MY_INT64_NUM_DECIMAL_DIGITS, > > DRIZZLE_TYPE_LONGLONG, > 0, > @@ -1574,7 +1574,7 @@ > return true; > } > > - const ColumnInfo *row_format= new(std::nothrow) ColumnInfo > ("ROW_FORMAT", > + const drizzled::plugin::ColumnInfo *row_format= new(std::nothrow) > drizzled::plugin::ColumnInfo("ROW_FORMAT", > 10, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -1586,7 +1586,7 @@ > return true; > } > > - const ColumnInfo *tab_rows= new(std::nothrow) ColumnInfo > ("TABLE_ROWS", > + const drizzled::plugin::ColumnInfo *tab_rows= new(std::nothrow) > drizzled::plugin::ColumnInfo("TABLE_ROWS", > > MY_INT64_NUM_DECIMAL_DIGITS, > > DRIZZLE_TYPE_LONGLONG, > 0, > @@ -1598,7 +1598,7 @@ > return true; > } > > - const ColumnInfo *avg_row_len= new(std::nothrow) ColumnInfo > ("AVG_ROW_LENGTH", > + const drizzled::plugin::ColumnInfo *avg_row_len= new > (std::nothrow) drizzled::plugin::ColumnInfo("AVG_ROW_LENGTH", > > MY_INT64_NUM_DECIMAL_DIGITS, > > DRIZZLE_TYPE_LONGLONG, > 0, > @@ -1610,7 +1610,7 @@ > return true; > } > > - const ColumnInfo *data_len= new(std::nothrow) ColumnInfo > ("DATA_LENGTH", > + const drizzled::plugin::ColumnInfo *data_len= new(std::nothrow) > drizzled::plugin::ColumnInfo("DATA_LENGTH", > > MY_INT64_NUM_DECIMAL_DIGITS, > > DRIZZLE_TYPE_LONGLONG, > 0, > @@ -1622,7 +1622,7 @@ > return true; > } > > - const ColumnInfo *max_data_len= new(std::nothrow) ColumnInfo > ("MAX_DATA_LENGTH", > + const drizzled::plugin::ColumnInfo *max_data_len= new > (std::nothrow) drizzled::plugin::ColumnInfo("MAX_DATA_LENGTH", > > MY_INT64_NUM_DECIMAL_DIGITS, > > DRIZZLE_TYPE_LONGLONG, > 0, > @@ -1634,7 +1634,7 @@ > return true; > } > > - const ColumnInfo *idx_len= new(std::nothrow) ColumnInfo > ("INDEX_LENGTH", > + const drizzled::plugin::ColumnInfo *idx_len= new(std::nothrow) > drizzled::plugin::ColumnInfo("INDEX_LENGTH", > > MY_INT64_NUM_DECIMAL_DIGITS, > > DRIZZLE_TYPE_LONGLONG, > 0, > @@ -1646,7 +1646,7 @@ > return true; > } > > - const ColumnInfo *data_free= new(std::nothrow) ColumnInfo > ("DATA_FREE", > + const drizzled::plugin::ColumnInfo *data_free= new(std::nothrow) > drizzled::plugin::ColumnInfo("DATA_FREE", > > MY_INT64_NUM_DECIMAL_DIGITS, > > DRIZZLE_TYPE_LONGLONG, > 0, > @@ -1658,7 +1658,7 @@ > return true; > } > > - const ColumnInfo *auto_inc= new(std::nothrow) ColumnInfo > ("AUTO_INCREMENT", > + const drizzled::plugin::ColumnInfo *auto_inc= new(std::nothrow) > drizzled::plugin::ColumnInfo("AUTO_INCREMENT", > > MY_INT64_NUM_DECIMAL_DIGITS, > > DRIZZLE_TYPE_LONGLONG, > 0, > @@ -1670,7 +1670,7 @@ > return true; > } > > - const ColumnInfo *create_time= new(std::nothrow) ColumnInfo > ("CREATE_TIME", > + const drizzled::plugin::ColumnInfo *create_time= new > (std::nothrow) drizzled::plugin::ColumnInfo("CREATE_TIME", > 0, > > DRIZZLE_TYPE_DATETIME, > 0, > @@ -1682,7 +1682,7 @@ > return true; > } > > - const ColumnInfo *update_time= new(std::nothrow) ColumnInfo > ("UPDATE_TIME", > + const drizzled::plugin::ColumnInfo *update_time= new > (std::nothrow) drizzled::plugin::ColumnInfo("UPDATE_TIME", > 0, > > DRIZZLE_TYPE_DATETIME, > 0, > @@ -1694,7 +1694,7 @@ > return true; > } > > - const ColumnInfo *check_time= new(std::nothrow) ColumnInfo > ("CHECK_TIME", > + const drizzled::plugin::ColumnInfo *check_time= new(std::nothrow) > drizzled::plugin::ColumnInfo("CHECK_TIME", > 0, > > DRIZZLE_TYPE_DATETIME, > 0, > @@ -1706,7 +1706,7 @@ > return true; > } > > - const ColumnInfo *table_coll= new(std::nothrow) ColumnInfo > ("TABLE_COLLATION", > + const drizzled::plugin::ColumnInfo *table_coll= new(std::nothrow) > drizzled::plugin::ColumnInfo("TABLE_COLLATION", > 64, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -1718,7 +1718,7 @@ > return true; > } > > - const ColumnInfo *checksum= new(std::nothrow) ColumnInfo > ("CHECKSUM", > + const drizzled::plugin::ColumnInfo *checksum= new(std::nothrow) > drizzled::plugin::ColumnInfo("CHECKSUM", > > MY_INT64_NUM_DECIMAL_DIGITS, > > DRIZZLE_TYPE_LONGLONG, > 0, > @@ -1730,7 +1730,7 @@ > return true; > } > > - const ColumnInfo *create_opt= new(std::nothrow) ColumnInfo > ("CREATE_OPTIONS", > + const drizzled::plugin::ColumnInfo *create_opt= new(std::nothrow) > drizzled::plugin::ColumnInfo("CREATE_OPTIONS", > 255, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -1742,7 +1742,7 @@ > return true; > } > > - const ColumnInfo *tab_comment= new(std::nothrow) ColumnInfo > ("TABLE_COMMENT", > + const drizzled::plugin::ColumnInfo *tab_comment= new > (std::nothrow) drizzled::plugin::ColumnInfo("TABLE_COMMENT", > > TABLE_COMMENT_MAXLEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -1780,9 +1780,9 @@ > } > > > -bool createTabNamesColumns(vector& cols) > +bool createTabNamesColumns(vector drizzled::plugin::ColumnInfo *>& cols) > { > - const ColumnInfo *cat= new(std::nothrow) ColumnInfo > ("TABLE_CATALOG", > + const drizzled::plugin::ColumnInfo *cat= new(std::nothrow) > drizzled::plugin::ColumnInfo("TABLE_CATALOG", > FN_REFLEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -1794,7 +1794,7 @@ > return true; > } > > - const ColumnInfo *sch= new(std::nothrow) ColumnInfo("TABLE_SCHEMA", > + const drizzled::plugin::ColumnInfo *sch= new(std::nothrow) > drizzled::plugin::ColumnInfo("TABLE_SCHEMA", > NAME_CHAR_LEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -1806,7 +1806,7 @@ > return true; > } > > - const ColumnInfo *name= new(std::nothrow) ColumnInfo("TABLE_NAME", > + const drizzled::plugin::ColumnInfo *name= new(std::nothrow) > drizzled::plugin::ColumnInfo("TABLE_NAME", > NAME_CHAR_LEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -1818,7 +1818,7 @@ > return true; > } > > - const ColumnInfo *type= new(std::nothrow) ColumnInfo("TABLE_TYPE", > + const drizzled::plugin::ColumnInfo *type= new(std::nothrow) > drizzled::plugin::ColumnInfo("TABLE_TYPE", > NAME_CHAR_LEN, > > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -1852,7 +1852,7 @@ > } > }; > > -void clearColumns(vector& cols) > +void clearColumns(vector& cols) > { > for_each(cols.begin(), cols.end(), DeleteColumns()); > cols.clear(); > > === modified file 'plugin/info_schema/info_schema_columns.h' > --- plugin/info_schema/info_schema_columns.h 2009-07-05 17:26:20 +0000 > +++ plugin/info_schema/info_schema_columns.h 2009-09-27 23:10:31 +0000 > @@ -21,7 +21,7 @@ > #ifndef DRIZZLED_INFO_SCHEMA_COLUMNS_H > #define DRIZZLED_INFO_SCHEMA_COLUMNS_H > > -#include "drizzled/info_schema.h" > +#include "drizzled/plugin/info_schema_table.h" > > #include > > @@ -32,7 +32,7 @@ > * @param[out] cols vector to add columns to > * @return false on success; true on failure > */ > -bool createCharSetColumns(std::vector& cols); > +bool createCharSetColumns(std::vector drizzled::plugin::ColumnInfo *>& cols); > > /** > * Create the various columns for the Collations I_S table and add > them > @@ -41,7 +41,7 @@ > * @param[out] cols vector to add columns to > * @return false on success; true on failure > */ > -bool createCollationColumns(std::vector& cols); > +bool createCollationColumns(std::vector drizzled::plugin::ColumnInfo *>& cols); > > /** > * Create the various columns for the character set applicability > @@ -51,7 +51,7 @@ > * @param[out] cols vector to add columns to > * @return false on success; true on failure > */ > -bool createCollCharSetColumns(std::vector& cols); > +bool createCollCharSetColumns(std::vector drizzled::plugin::ColumnInfo *>& cols); > > /** > * Create the various columns for the COLUMNS > @@ -61,7 +61,7 @@ > * @param[out] cols vector to add columns to > * @return false on success; true on failure > */ > -bool createColColumns(std::vector& cols); > +bool createColColumns(std::vector drizzled::plugin::ColumnInfo *>& cols); > > /** > * Create the various columns for the key column usage > @@ -71,7 +71,7 @@ > * @param[out] cols vector to add columns to > * @return false on success; true on failure > */ > -bool createKeyColUsageColumns(std::vector& cols); > +bool createKeyColUsageColumns(std::vector drizzled::plugin::ColumnInfo *>& cols); > > /** > * Create the various columns for the OPEN_TABLES > @@ -81,7 +81,7 @@ > * @param[out] cols vector to add columns to > * @return false on success; true on failure > */ > -bool createOpenTabColumns(std::vector& cols); > +bool createOpenTabColumns(std::vector drizzled::plugin::ColumnInfo *>& cols); > > /** > * Create the various columns for the PLUGINS > @@ -91,7 +91,7 @@ > * @param[out] cols vector to add columns to > * @return false on success; true on failure > */ > -bool createPluginsColumns(std::vector& cols); > +bool createPluginsColumns(std::vector drizzled::plugin::ColumnInfo *>& cols); > > /** > * Create the various volumns for the PROCESSLIST I_S table and add > them > @@ -100,7 +100,7 @@ > * @param[out] cols vector to add columns to > * @return false on success; true on failure > */ > -bool createProcessListColumns(std::vector& cols); > +bool createProcessListColumns(std::vector drizzled::plugin::ColumnInfo *>& cols); > > /** > * Create the various volumns for the REFERENTIAL_CONSTRAINTS I_S > table > @@ -109,7 +109,7 @@ > * @param[out] cols vector to add columns to > * @return false on success; true on failure > */ > -bool createRefConstraintColumns(std::vector& > cols); > +bool createRefConstraintColumns(std::vector drizzled::plugin::ColumnInfo *>& cols); > > /** > * Create the various volumns for the SCHEMATA I_S table > @@ -118,7 +118,7 @@ > * @param[out] cols vector to add columns to > * @return false on success; true on failure > */ > -bool createSchemataColumns(std::vector& cols); > +bool createSchemataColumns(std::vector drizzled::plugin::ColumnInfo *>& cols); > > /** > * Create the various volumns for the STATISTICS I_S table > @@ -127,7 +127,7 @@ > * @param[out] cols vector to add columns to > * @return false on success; true on failure > */ > -bool createStatsColumns(std::vector& cols); > +bool createStatsColumns(std::vector drizzled::plugin::ColumnInfo *>& cols); > > /** > * Create the various volumns for numerous I_S tables > @@ -136,7 +136,7 @@ > * @param[out] cols vector to add columns to > * @return false on success; true on failure > */ > -bool createStatusColumns(std::vector& cols); > +bool createStatusColumns(std::vector drizzled::plugin::ColumnInfo *>& cols); > > /** > * Create the various volumns for the TABLE_CONSTRAINTS I_S table > @@ -145,25 +145,25 @@ > * @param[out] cols vector to add columns to > * @return false on success; true on failure > */ > -bool createTabConstraintsColumns(std::vector& > cols); > - > -/** > - * Create the various volumns for the TABLE_NAMES I_S table > - * and add them to the std::vector of columns for this table. > - * > - * @param[out] cols vector to add columns to > - * @return false on success; true on failure > - */ > -bool createTablesColumns(std::vector& cols); > - > -/** > - * Create the various volumns for the TABLE_NAMES I_S table > - * and add them to the std::vector of columns for this table. > - * > - * @param[out] cols vector to add columns to > - * @return false on success; true on failure > - */ > -bool createTabNamesColumns(std::vector& cols); > +bool createTabConstraintsColumns(std::vector drizzled::plugin::ColumnInfo *>& cols); > + > +/** > + * Create the various volumns for the TABLE_NAMES I_S table > + * and add them to the std::vector of columns for this table. > + * > + * @param[out] cols vector to add columns to > + * @return false on success; true on failure > + */ > +bool createTablesColumns(std::vector drizzled::plugin::ColumnInfo *>& cols); > + > +/** > + * Create the various volumns for the TABLE_NAMES I_S table > + * and add them to the std::vector of columns for this table. > + * > + * @param[out] cols vector to add columns to > + * @return false on success; true on failure > + */ > +bool createTabNamesColumns(std::vector drizzled::plugin::ColumnInfo *>& cols); > > /** > * Iterate through the given vector of columns and delete the memory > that > @@ -171,6 +171,6 @@ > * > * @param[out] cols vector to clear and de-allocate memory from > */ > -void clearColumns(std::vector& cols); > +void clearColumns(std::vector *>& cols); > > #endif /* DRIZZLE_INFO_SCHEMA_COLUMNS_H */ > > === modified file 'plugin/info_schema/info_schema_methods.cc' > --- plugin/info_schema/info_schema_methods.cc 2009-08-27 18:06:03 > +0000 > +++ plugin/info_schema/info_schema_methods.cc 2009-09-27 23:10:31 > +0000 > @@ -232,13 +232,13 @@ > return 0; > } > > -int CharSetISMethods::oldFormat(Session *session, InfoSchemaTable > *schema_table) > +int CharSetISMethods::oldFormat(Session *session, > drizzled::plugin::InfoSchemaTable *schema_table) > const > { > int fields_arr[]= {0, 2, 1, 3, -1}; > int *field_num= fields_arr; > - const InfoSchemaTable::Columns columns= schema_table->getColumns(); > - const ColumnInfo *column; > + const drizzled::plugin::InfoSchemaTable::Columns columns= > schema_table->getColumns(); > + const drizzled::plugin::ColumnInfo *column; > Name_resolution_context *context= &session->lex->select_lex.context; > > for (; *field_num >= 0; field_num++) > @@ -327,13 +327,13 @@ > return 0; > } > > -int ColumnsISMethods::oldFormat(Session *session, InfoSchemaTable > *schema_table) > +int ColumnsISMethods::oldFormat(Session *session, > drizzled::plugin::InfoSchemaTable *schema_table) > const > { > int fields_arr[]= {3, 14, 13, 6, 15, 5, 16, 17, 18, -1}; > int *field_num= fields_arr; > - const InfoSchemaTable::Columns columns= schema_table->getColumns(); > - const ColumnInfo *column; > + const drizzled::plugin::InfoSchemaTable::Columns columns= > schema_table->getColumns(); > + const drizzled::plugin::ColumnInfo *column; > Name_resolution_context *context= &session->lex->select_lex.context; > > for (; *field_num >= 0; field_num++) > @@ -810,18 +810,18 @@ > return(0); > } > > -int SchemataISMethods::oldFormat(Session *session, InfoSchemaTable > *schema_table) > +int SchemataISMethods::oldFormat(Session *session, > drizzled::plugin::InfoSchemaTable *schema_table) > const > { > char tmp[128]; > LEX *lex= session->lex; > Select_Lex *sel= lex->current_select; > Name_resolution_context *context= &sel->context; > - const InfoSchemaTable::Columns columns= schema_table->getColumns(); > + const drizzled::plugin::InfoSchemaTable::Columns columns= > schema_table->getColumns(); > > if (!sel->item_list.elements) > { > - const ColumnInfo *column= columns[1]; > + const drizzled::plugin::ColumnInfo *column= columns[1]; > String buffer(tmp,sizeof(tmp), system_charset_info); > Item_field *field= new Item_field(context, > NULL, NULL, column->getName > ().c_str()); > @@ -1105,7 +1105,7 @@ > Table *show_table= tables->table; > TableShare *share= show_table->s; > handler *file= show_table->file; > - StorageEngine *tmp_db_type= share->db_type(); > + drizzled::plugin::StorageEngine *tmp_db_type= share->db_type(); > > if (share->tmp_table == SYSTEM_TMP_TABLE) > { > @@ -1249,16 +1249,16 @@ > } > > > -int TabNamesISMethods::oldFormat(Session *session, InfoSchemaTable > *schema_table) > +int TabNamesISMethods::oldFormat(Session *session, > drizzled::plugin::InfoSchemaTable *schema_table) > const > { > char tmp[128]; > String buffer(tmp,sizeof(tmp), session->charset()); > LEX *lex= session->lex; > Name_resolution_context *context= &lex->select_lex.context; > - const InfoSchemaTable::Columns columns= schema_table->getColumns(); > + const drizzled::plugin::InfoSchemaTable::Columns columns= > schema_table->getColumns(); > > - const ColumnInfo *column= columns[2]; > + const drizzled::plugin::ColumnInfo *column= columns[2]; > buffer.length(0); > buffer.append(column->getOldName().c_str()); > buffer.append(lex->select_lex.db); > > === modified file 'plugin/info_schema/info_schema_methods.h' > --- plugin/info_schema/info_schema_methods.h 2009-07-05 17:44:13 +0000 > +++ plugin/info_schema/info_schema_methods.h 2009-09-27 23:10:31 +0000 > @@ -21,7 +21,7 @@ > #ifndef DRIZZLED_INFO_SCHEMA_METHODS_H > #define DRIZZLED_INFO_SCHEMA_METHODS_H > > -#include "drizzled/info_schema.h" > +#include "drizzled/plugin/info_schema_table.h" > > /** > * @class CharSetISMethods > @@ -30,13 +30,14 @@ > * CHARACTER_SET I_S table needs besides the default > * methods. > */ > -class CharSetISMethods : public InfoSchemaMethods > +class CharSetISMethods : public drizzled::plugin::InfoSchemaMethods > { > public: > virtual int fillTable(Session *session, > TableList *tables, > COND *cond); > - virtual int oldFormat(Session *session, InfoSchemaTable > *schema_table) const; > + virtual int oldFormat(Session *session, > + drizzled::plugin::InfoSchemaTable > *schema_table) const; > }; > > /** > @@ -45,7 +46,7 @@ > * Class which implements any methods that the Collations > * I_S table needs besides the default methods > */ > -class CollationISMethods : public InfoSchemaMethods > +class CollationISMethods : public drizzled::plugin::InfoSchemaMethods > { > public: > virtual int fillTable(Session *session, > @@ -59,7 +60,7 @@ > * Class which implements any methods that the collation char set > * I_S table needs besides the default methods > */ > -class CollCharISMethods : public InfoSchemaMethods > +class CollCharISMethods : public drizzled::plugin::InfoSchemaMethods > { > public: > virtual int fillTable(Session *session, > @@ -73,10 +74,11 @@ > * Class which implements any methods that the COLUMNS > * I_S table needs besides the default methods > */ > -class ColumnsISMethods : public InfoSchemaMethods > +class ColumnsISMethods : public drizzled::plugin::InfoSchemaMethods > { > public: > - virtual int oldFormat(Session *session, InfoSchemaTable > *schema_table) const; > + virtual int oldFormat(Session *session, > + drizzled::plugin::InfoSchemaTable > *schema_table) const; > }; > > /** > @@ -85,7 +87,7 @@ > * Class which implements any methods that the key column usage > * I_S table needs besides the default methods > */ > -class KeyColUsageISMethods : public InfoSchemaMethods > +class KeyColUsageISMethods : public > drizzled::plugin::InfoSchemaMethods > { > public: > virtual int processTable(Session *session, TableList *tables, > @@ -99,7 +101,7 @@ > * Class which implements any methods that the OPEN_TABLES > * I_S table needs besides the default methods > */ > -class OpenTablesISMethods : public InfoSchemaMethods > +class OpenTablesISMethods : public > drizzled::plugin::InfoSchemaMethods > { > public: > virtual int fillTable(Session *session, > @@ -113,7 +115,7 @@ > * Class which implements any methods that the PLUGINS > * I_S table needs besides the default methods > */ > -class PluginsISMethods : public InfoSchemaMethods > +class PluginsISMethods : public drizzled::plugin::InfoSchemaMethods > { > public: > virtual int fillTable(Session *session, > @@ -127,7 +129,7 @@ > * Class which implements any methods that the PROCESSLIST > * I_S table needs besides the default methods > */ > -class ProcessListISMethods : public InfoSchemaMethods > +class ProcessListISMethods : public > drizzled::plugin::InfoSchemaMethods > { > public: > virtual int fillTable(Session *session, > @@ -141,7 +143,7 @@ > * Class which implements any methods that the > REFERENTIAL_CONSTRAINTS > * I_S table needs besides the default methods > */ > -class RefConstraintsISMethods : public InfoSchemaMethods > +class RefConstraintsISMethods : public > drizzled::plugin::InfoSchemaMethods > { > public: > /** > @@ -168,13 +170,14 @@ > * Class which implements any methods that the SCHEMATA > * I_S table needs besides the default methods > */ > -class SchemataISMethods : public InfoSchemaMethods > +class SchemataISMethods : public drizzled::plugin::InfoSchemaMethods > { > public: > virtual int fillTable(Session *session, > TableList *tables, > COND *cond); > - virtual int oldFormat(Session *session, InfoSchemaTable > *schema_table) const; > + virtual int oldFormat(Session *session, > + drizzled::plugin::InfoSchemaTable > *schema_table) const; > }; > > /** > @@ -183,7 +186,7 @@ > * Class which implements any methods that the SCHEMATA > * I_S table needs besides the default methods > */ > -class StatsISMethods : public InfoSchemaMethods > +class StatsISMethods : public drizzled::plugin::InfoSchemaMethods > { > public: > virtual int processTable(Session *session, TableList *tables, > @@ -197,7 +200,7 @@ > * Class which implements any methods that the STATUS > * I_S table needs besides the default methods > */ > -class StatusISMethods : public InfoSchemaMethods > +class StatusISMethods : public drizzled::plugin::InfoSchemaMethods > { > public: > virtual int fillTable(Session *session, > @@ -211,7 +214,7 @@ > * Class which implements any methods that the TABLE_CONSTRAINTS > * I_S table needs besides the default methods > */ > -class TabConstraintsISMethods : public InfoSchemaMethods > +class TabConstraintsISMethods : public > drizzled::plugin::InfoSchemaMethods > { > public: > virtual int processTable(Session *session, TableList *tables, > @@ -225,7 +228,7 @@ > * Class which implements any methods that the TABLE_NAMES > * I_S table needs besides the default methods > */ > -class TablesISMethods : public InfoSchemaMethods > +class TablesISMethods : public drizzled::plugin::InfoSchemaMethods > { > public: > virtual int processTable(Session *session, TableList *tables, > @@ -239,10 +242,11 @@ > * Class which implements any methods that the TABLE_NAMES > * I_S table needs besides the default methods > */ > -class TabNamesISMethods : public InfoSchemaMethods > +class TabNamesISMethods : public drizzled::plugin::InfoSchemaMethods > { > public: > - virtual int oldFormat(Session *session, InfoSchemaTable > *schema_table) const; > + virtual int oldFormat(Session *session, > + drizzled::plugin::InfoSchemaTable > *schema_table) const; > }; > > /** > @@ -251,7 +255,7 @@ > * Class which implements any methods that the VARIABLES > * I_S table needs besides the default methods > */ > -class VariablesISMethods : public InfoSchemaMethods > +class VariablesISMethods : public drizzled::plugin::InfoSchemaMethods > { > public: > virtual int fillTable(Session *session, > > === modified file 'plugin/innobase/handler/ha_innodb.cc' > --- plugin/innobase/handler/ha_innodb.cc 2009-08-27 18:06:03 +0000 > +++ plugin/innobase/handler/ha_innodb.cc 2009-09-27 23:10:31 +0000 > @@ -50,7 +50,7 @@ > #include > #include > #include > -#include > +#include > > /* Include necessary InnoDB headers */ > extern "C" { > @@ -124,7 +124,7 @@ > #endif /* MYSQL_DYNAMIC_PLUGIN && __WIN__ */ > > > -StorageEngine* innodb_engine_ptr= NULL; > +drizzled::plugin::StorageEngine* innodb_engine_ptr= NULL; > #ifdef PANDORA_DYNAMIC_PLUGIN > /* These must be weak global variables in the dynamic plugin. */ > #ifdef __WIN__ > @@ -221,11 +221,12 @@ > static INNOBASE_SHARE *get_share(const char *table_name); > static void free_share(INNOBASE_SHARE *share); > > -class InnobaseEngine : public StorageEngine > +class InnobaseEngine : public drizzled::plugin::StorageEngine > { > public: > InnobaseEngine(string name_arg) > - : StorageEngine(name_arg, HTON_NO_FLAGS, sizeof > (trx_named_savept_t)) > + : drizzled::plugin::StorageEngine(name_arg, > + HTON_NO_FLAGS, sizeof > (trx_named_savept_t)) > { > addAlias("INNOBASE"); > } > @@ -1279,7 +1280,8 @@ > / > ************************************************************************* > Construct ha_innobase handler. */ > UNIV_INTERN > -ha_innobase::ha_innobase(StorageEngine *engine_arg, TableShare > *table_arg) > +ha_innobase::ha_innobase(drizzled::plugin::StorageEngine *engine_arg, > + TableShare *table_arg) > :handler(engine_arg, table_arg), > int_table_flags(HA_REC_NOT_IN_SEQ | > HA_NULL_IN_KEY | > @@ -1349,7 +1351,7 @@ > void > innobase_register_stmt( > /*===================*/ > - StorageEngine* engine, /* in: Innobase engine */ > + drizzled::plugin::StorageEngine* engine, /* in: Innobase > engine */ > Session* session) /* in: MySQL session (connection) object */ > { > assert(engine == innodb_engine_ptr); > @@ -1368,7 +1370,7 @@ > void > innobase_register_trx_and_stmt( > /*===========================*/ > - StorageEngine *engine, /* in: Innobase StorageEngine */ > + drizzled::plugin::StorageEngine *engine, /* in: Innobase > StorageEngine */ > Session* session) /* in: MySQL session (connection) object */ > { > /* NOTE that actually innobase_register_stmt() registers also > @@ -7352,7 +7354,7 @@ > bool > innodb_show_status( > /*===============*/ > - StorageEngine* engine, /* in: the innodb StorageEngine */ > + drizzled::plugin::StorageEngine* engine, /* in: the innodb > StorageEngine */ > Session* session, /* in: the MySQL query thread of the caller */ > stat_print_fn *stat_print) > { > @@ -7439,7 +7441,7 @@ > bool > innodb_mutex_show_status( > /*=====================*/ > - StorageEngine* engine, > + drizzled::plugin::StorageEngine* engine, > Session* session, /* in: the MySQL query thread of the > caller */ > stat_print_fn* stat_print) > > === modified file 'plugin/innobase/handler/ha_innodb.h' > --- plugin/innobase/handler/ha_innodb.h 2009-08-18 07:00:39 +0000 > +++ plugin/innobase/handler/ha_innodb.h 2009-09-27 23:10:31 +0000 > @@ -95,7 +95,8 @@ > > /* Init values for the class: */ > public: > - UNIV_INTERN ha_innobase(StorageEngine *engine, TableShare > *table_arg); > + UNIV_INTERN ha_innobase(drizzled::plugin::StorageEngine *engine, > + TableShare *table_arg); > UNIV_INTERN ~ha_innobase(); > /* > Get the row type from the storage engine. If this method returns > > === modified file 'plugin/innobase/handler/i_s.cc' > --- plugin/innobase/handler/i_s.cc 2009-08-05 09:29:04 +0000 > +++ plugin/innobase/handler/i_s.cc 2009-09-27 23:10:31 +0000 > @@ -31,7 +31,7 @@ > #include > #include > #include > -#include > +#include > > #include "i_s.h" > > @@ -68,13 +68,13 @@ > > #define STRUCT_FLD(name, value) value > > -InfoSchemaTable *innodb_trx_schema_table= NULL; > -InfoSchemaTable *innodb_locks_schema_table= NULL; > -InfoSchemaTable *innodb_lock_waits_schema_table= NULL; > -InfoSchemaTable *innodb_cmp_schema_table= NULL; > -InfoSchemaTable *innodb_cmp_reset_schema_table= NULL; > -InfoSchemaTable *innodb_cmpmem_schema_table= NULL; > -InfoSchemaTable *innodb_cmpmem_reset_schema_table= NULL; > +drizzled::plugin::InfoSchemaTable *innodb_trx_schema_table= NULL; > +drizzled::plugin::InfoSchemaTable *innodb_locks_schema_table= NULL; > +drizzled::plugin::InfoSchemaTable *innodb_lock_waits_schema_table= > NULL; > +drizzled::plugin::InfoSchemaTable *innodb_cmp_schema_table= NULL; > +drizzled::plugin::InfoSchemaTable *innodb_cmp_reset_schema_table= > NULL; > +drizzled::plugin::InfoSchemaTable *innodb_cmpmem_schema_table= NULL; > +drizzled::plugin::InfoSchemaTable > *innodb_cmpmem_reset_schema_table= NULL; > > static TrxISMethods trx_methods; > static CmpISMethods cmp_methods; > @@ -199,10 +199,10 @@ > } > > /* Fields of the dynamic table INFORMATION_SCHEMA.innodb_trx */ > -static ColumnInfo innodb_trx_fields_info[] = > +static drizzled::plugin::ColumnInfo innodb_trx_fields_info[] = > { > #define IDX_TRX_ID 0 > - ColumnInfo("trx_id", > + drizzled::plugin::ColumnInfo("trx_id", > TRX_ID_MAX_LEN + 1, > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -211,7 +211,7 @@ > SKIP_OPEN_TABLE), > > #define IDX_TRX_STATE 1 > - ColumnInfo("trx_state", > + drizzled::plugin::ColumnInfo("trx_state", > TRX_QUE_STATE_STR_MAX_LEN + 1, > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -220,7 +220,7 @@ > SKIP_OPEN_TABLE), > > #define IDX_TRX_STARTED 2 > - ColumnInfo("trx_started", > + drizzled::plugin::ColumnInfo("trx_started", > 0, > DRIZZLE_TYPE_DATETIME, > 0, > @@ -229,7 +229,7 @@ > SKIP_OPEN_TABLE), > > #define IDX_TRX_REQUESTED_LOCK_ID 3 > - ColumnInfo("trx_requested_lock_id", > + drizzled::plugin::ColumnInfo("trx_requested_lock_id", > TRX_I_S_LOCK_ID_MAX_LEN + 1, > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -238,7 +238,7 @@ > SKIP_OPEN_TABLE), > > #define IDX_TRX_WAIT_STARTED 4 > - ColumnInfo("trx_wait_started", > + drizzled::plugin::ColumnInfo("trx_wait_started", > 0, > DRIZZLE_TYPE_DATETIME, > 0, > @@ -247,7 +247,7 @@ > SKIP_OPEN_TABLE), > > #define IDX_TRX_WEIGHT 5 > - ColumnInfo("trx_weight", > + drizzled::plugin::ColumnInfo("trx_weight", > MY_INT64_NUM_DECIMAL_DIGITS, > DRIZZLE_TYPE_LONGLONG, > 0, > @@ -256,7 +256,7 @@ > SKIP_OPEN_TABLE), > > #define IDX_TRX_DRIZZLE_THREAD_ID 6 > - ColumnInfo("trx_mysql_thread_id", > + drizzled::plugin::ColumnInfo("trx_mysql_thread_id", > MY_INT64_NUM_DECIMAL_DIGITS, > DRIZZLE_TYPE_LONGLONG, > 0, > @@ -265,7 +265,7 @@ > SKIP_OPEN_TABLE), > > #define IDX_TRX_QUERY 7 > - ColumnInfo("trx_query", > + drizzled::plugin::ColumnInfo("trx_query", > TRX_I_S_TRX_QUERY_MAX_LEN, > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -273,7 +273,7 @@ > "", > SKIP_OPEN_TABLE), > > - ColumnInfo() > + drizzled::plugin::ColumnInfo() > }; > > / > *********************************************************************** > @@ -367,7 +367,7 @@ > /* out: 0 on success */ > ) /* in/out: table schema object */ > { > - if ((innodb_trx_schema_table= new InfoSchemaTable) == NULL) > + if ((innodb_trx_schema_table= new > drizzled::plugin::InfoSchemaTable) == NULL) > return(1); > > innodb_trx_schema_table->setColumnInfo(innodb_trx_fields_info); > @@ -379,10 +379,10 @@ > > > /* Fields of the dynamic table INFORMATION_SCHEMA.innodb_locks */ > -static ColumnInfo innodb_locks_fields_info[] = > +static drizzled::plugin::ColumnInfo innodb_locks_fields_info[] = > { > #define IDX_LOCK_ID 0 > - ColumnInfo("lock_id", > + drizzled::plugin::ColumnInfo("lock_id", > TRX_I_S_LOCK_ID_MAX_LEN + 1, > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -391,7 +391,7 @@ > SKIP_OPEN_TABLE), > > #define IDX_LOCK_TRX_ID 1 > - ColumnInfo("lock_trx_id", > + drizzled::plugin::ColumnInfo("lock_trx_id", > TRX_ID_MAX_LEN + 1, > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -400,7 +400,7 @@ > SKIP_OPEN_TABLE), > > #define IDX_LOCK_MODE 2 > - ColumnInfo("lock_mode", > + drizzled::plugin::ColumnInfo("lock_mode", > /* S[,GAP] X[,GAP] IS[,GAP] IX[,GAP] AUTO_INC UNKNOWN */ > 32, > DRIZZLE_TYPE_VARCHAR, > @@ -410,7 +410,7 @@ > SKIP_OPEN_TABLE), > > #define IDX_LOCK_TYPE 3 > - ColumnInfo("lock_type", > + drizzled::plugin::ColumnInfo("lock_type", > 32, /* RECORD|TABLE|UNKNOWN */ > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -419,7 +419,7 @@ > SKIP_OPEN_TABLE), > > #define IDX_LOCK_TABLE 4 > - ColumnInfo("lock_table", > + drizzled::plugin::ColumnInfo("lock_table", > 1024, > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -428,7 +428,7 @@ > SKIP_OPEN_TABLE), > > #define IDX_LOCK_INDEX 5 > - ColumnInfo("lock_index", > + drizzled::plugin::ColumnInfo("lock_index", > 1024, > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -437,7 +437,7 @@ > SKIP_OPEN_TABLE), > > #define IDX_LOCK_SPACE 6 > - ColumnInfo("lock_space", > + drizzled::plugin::ColumnInfo("lock_space", > MY_INT64_NUM_DECIMAL_DIGITS, > DRIZZLE_TYPE_LONGLONG, > 0, > @@ -446,7 +446,7 @@ > SKIP_OPEN_TABLE), > > #define IDX_LOCK_PAGE 7 > - ColumnInfo("lock_page", > + drizzled::plugin::ColumnInfo("lock_page", > MY_INT64_NUM_DECIMAL_DIGITS, > DRIZZLE_TYPE_LONGLONG, > 0, > @@ -455,7 +455,7 @@ > SKIP_OPEN_TABLE), > > #define IDX_LOCK_REC 8 > - ColumnInfo("lock_rec", > + drizzled::plugin::ColumnInfo("lock_rec", > MY_INT64_NUM_DECIMAL_DIGITS, > DRIZZLE_TYPE_LONGLONG, > 0, > @@ -464,7 +464,7 @@ > SKIP_OPEN_TABLE), > > #define IDX_LOCK_DATA 9 > - ColumnInfo("lock_data", > + drizzled::plugin::ColumnInfo("lock_data", > TRX_I_S_LOCK_DATA_MAX_LEN, > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -472,7 +472,7 @@ > "", > SKIP_OPEN_TABLE), > > - ColumnInfo() > + drizzled::plugin::ColumnInfo() > }; > > / > *********************************************************************** > @@ -590,7 +590,7 @@ > ) /* in/out: table schema object */ > { > > - if ((innodb_locks_schema_table= new InfoSchemaTable) == NULL) > + if ((innodb_locks_schema_table= new > drizzled::plugin::InfoSchemaTable) == NULL) > return(1); > > innodb_locks_schema_table->setColumnInfo(innodb_locks_fields_info); > @@ -601,10 +601,10 @@ > > > /* Fields of the dynamic table INFORMATION_SCHEMA.innodb_lock_waits */ > -static ColumnInfo innodb_lock_waits_fields_info[] = > +static drizzled::plugin::ColumnInfo innodb_lock_waits_fields_info[] = > { > #define IDX_REQUESTING_TRX_ID 0 > - ColumnInfo("requesting_trx_id", > + drizzled::plugin::ColumnInfo("requesting_trx_id", > TRX_ID_MAX_LEN + 1, > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -613,7 +613,7 @@ > SKIP_OPEN_TABLE), > > #define IDX_REQUESTED_LOCK_ID 1 > - ColumnInfo("requested_lock_id", > + drizzled::plugin::ColumnInfo("requested_lock_id", > TRX_I_S_LOCK_ID_MAX_LEN + 1, > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -622,7 +622,7 @@ > SKIP_OPEN_TABLE), > > #define IDX_BLOCKING_TRX_ID 2 > - ColumnInfo("blocking_trx_id", > + drizzled::plugin::ColumnInfo("blocking_trx_id", > TRX_ID_MAX_LEN + 1, > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -631,7 +631,7 @@ > SKIP_OPEN_TABLE), > > #define IDX_BLOCKING_LOCK_ID 3 > - ColumnInfo("blocking_lock_id", > + drizzled::plugin::ColumnInfo("blocking_lock_id", > TRX_I_S_LOCK_ID_MAX_LEN + 1, > DRIZZLE_TYPE_VARCHAR, > 0, > @@ -639,7 +639,7 @@ > "", > SKIP_OPEN_TABLE), > > - ColumnInfo() > + drizzled::plugin::ColumnInfo() > }; > > / > *********************************************************************** > @@ -720,7 +720,7 @@ > ) > { > > - if ((innodb_lock_waits_schema_table= new InfoSchemaTable) == NULL) > + if ((innodb_lock_waits_schema_table= new > drizzled::plugin::InfoSchemaTable) == NULL) > return(1); > > innodb_lock_waits_schema_table->setColumnInfo > (innodb_lock_waits_fields_info); > @@ -827,9 +827,9 @@ > } > > /* Fields of the dynamic table information_schema.innodb_cmp. */ > -static ColumnInfo i_s_cmp_fields_info[] = > +static drizzled::plugin::ColumnInfo i_s_cmp_fields_info[] = > { > - ColumnInfo("page_size", > + drizzled::plugin::ColumnInfo("page_size", > 5, > DRIZZLE_TYPE_LONG, > 0, > @@ -837,7 +837,7 @@ > "Compressed Page Size", > SKIP_OPEN_TABLE), > > - ColumnInfo("compress_ops", > + drizzled::plugin::ColumnInfo("compress_ops", > MY_INT32_NUM_DECIMAL_DIGITS, > DRIZZLE_TYPE_LONG, > 0, > @@ -845,7 +845,7 @@ > "Total Number of Compressions", > SKIP_OPEN_TABLE), > > - ColumnInfo("compress_ops_ok", > + drizzled::plugin::ColumnInfo("compress_ops_ok", > MY_INT32_NUM_DECIMAL_DIGITS, > DRIZZLE_TYPE_LONG, > 0, > @@ -853,7 +853,7 @@ > "Total Number of Successful Compressions", > SKIP_OPEN_TABLE), > > - ColumnInfo("compress_time", > + drizzled::plugin::ColumnInfo("compress_time", > MY_INT32_NUM_DECIMAL_DIGITS, > DRIZZLE_TYPE_LONG, > 0, > @@ -861,7 +861,7 @@ > "Total Duration of Compressions in Seconds", > SKIP_OPEN_TABLE), > > - ColumnInfo("uncompress_ops", > + drizzled::plugin::ColumnInfo("uncompress_ops", > MY_INT32_NUM_DECIMAL_DIGITS, > DRIZZLE_TYPE_LONG, > 0, > @@ -869,7 +869,7 @@ > "Total Number of Decompressions", > SKIP_OPEN_TABLE), > > - ColumnInfo("uncompress_time", > + drizzled::plugin::ColumnInfo("uncompress_time", > MY_INT32_NUM_DECIMAL_DIGITS, > DRIZZLE_TYPE_LONG, > 0, > @@ -877,7 +877,7 @@ > "Total Duration of Decompressions in Seconds", > SKIP_OPEN_TABLE), > > - ColumnInfo() > + drizzled::plugin::ColumnInfo() > }; > > > @@ -968,7 +968,7 @@ > ) > { > > - if ((innodb_cmp_schema_table= new InfoSchemaTable) == NULL) > + if ((innodb_cmp_schema_table= new > drizzled::plugin::InfoSchemaTable) == NULL) > return(1); > > innodb_cmp_schema_table->setColumnInfo(i_s_cmp_fields_info); > @@ -987,7 +987,7 @@ > ) /* in/out: table schema object */ > { > > - if ((innodb_cmp_reset_schema_table= new InfoSchemaTable) == NULL) > + if ((innodb_cmp_reset_schema_table= new > drizzled::plugin::InfoSchemaTable) == NULL) > return(1); > > innodb_cmp_reset_schema_table->setColumnInfo(i_s_cmp_fields_info); > @@ -1000,9 +1000,9 @@ > > > /* Fields of the dynamic table information_schema.innodb_cmpmem. */ > -static ColumnInfo i_s_cmpmem_fields_info[] = > +static drizzled::plugin::ColumnInfo i_s_cmpmem_fields_info[] = > { > - ColumnInfo("page_size", > + drizzled::plugin::ColumnInfo("page_size", > 5, > DRIZZLE_TYPE_LONG, > 0, > @@ -1010,7 +1010,7 @@ > "Buddy Block Size", > SKIP_OPEN_TABLE), > > - ColumnInfo("pages_used", > + drizzled::plugin::ColumnInfo("pages_used", > MY_INT32_NUM_DECIMAL_DIGITS, > DRIZZLE_TYPE_LONG, > 0, > @@ -1018,7 +1018,7 @@ > "Currently in Use", > SKIP_OPEN_TABLE), > > - ColumnInfo("pages_free", > + drizzled::plugin::ColumnInfo("pages_free", > MY_INT32_NUM_DECIMAL_DIGITS, > DRIZZLE_TYPE_LONG, > 0, > @@ -1026,7 +1026,7 @@ > "Currently Available", > SKIP_OPEN_TABLE), > > - ColumnInfo("relocation_ops", > + drizzled::plugin::ColumnInfo("relocation_ops", > MY_INT64_NUM_DECIMAL_DIGITS, > DRIZZLE_TYPE_LONGLONG, > 0, > @@ -1034,7 +1034,7 @@ > "Total Number of Relocations", > SKIP_OPEN_TABLE), > > - ColumnInfo("relocation_time", > + drizzled::plugin::ColumnInfo("relocation_time", > MY_INT32_NUM_DECIMAL_DIGITS, > DRIZZLE_TYPE_LONG, > 0, > @@ -1042,7 +1042,7 @@ > "Total Duration of Relocations, in Seconds", > SKIP_OPEN_TABLE), > > - ColumnInfo() > + drizzled::plugin::ColumnInfo() > }; > > / > *********************************************************************** > @@ -1128,7 +1128,7 @@ > ) > { > > - if ((innodb_cmpmem_schema_table= new InfoSchemaTable) == NULL) > + if ((innodb_cmpmem_schema_table= new > drizzled::plugin::InfoSchemaTable) == NULL) > return(1); > > innodb_cmpmem_schema_table->setColumnInfo(i_s_cmpmem_fields_info); > @@ -1146,7 +1146,7 @@ > /* out: 0 on success */ > ) > { > - if ((innodb_cmpmem_reset_schema_table= new InfoSchemaTable) == NULL) > + if ((innodb_cmpmem_reset_schema_table= new > drizzled::plugin::InfoSchemaTable) == NULL) > return(1); > > innodb_cmpmem_reset_schema_table->setColumnInfo > (i_s_cmpmem_fields_info); > > === modified file 'plugin/innobase/handler/i_s.h' > --- plugin/innobase/handler/i_s.h 2009-08-05 09:29:04 +0000 > +++ plugin/innobase/handler/i_s.h 2009-09-27 23:10:31 +0000 > @@ -25,47 +25,47 @@ > #ifndef i_s_h > #define i_s_h > > -class TrxISMethods : public InfoSchemaMethods > -{ > -public: > - virtual int fillTable(Session *session, > - TableList *tables, > - COND *cond); > -}; > - > -class LocksISMethods : public InfoSchemaMethods > -{ > -public: > - virtual int fillTable(Session *session, > - TableList *tables, > - COND *cond); > -}; > - > -class CmpISMethods : public InfoSchemaMethods > -{ > -public: > - virtual int fillTable(Session *session, > - TableList *tables, > - COND *cond); > -}; > - > -class CmpResetISMethods : public InfoSchemaMethods > -{ > -public: > - virtual int fillTable(Session *session, > - TableList *tables, > - COND *cond); > -}; > - > -class CmpmemISMethods : public InfoSchemaMethods > -{ > -public: > - virtual int fillTable(Session *session, > - TableList *tables, > - COND *cond); > -}; > - > -class CmpmemResetISMethods : public InfoSchemaMethods > +class TrxISMethods : public drizzled::plugin::InfoSchemaMethods > +{ > +public: > + virtual int fillTable(Session *session, > + TableList *tables, > + COND *cond); > +}; > + > +class LocksISMethods : public drizzled::plugin::InfoSchemaMethods > +{ > +public: > + virtual int fillTable(Session *session, > + TableList *tables, > + COND *cond); > +}; > + > +class CmpISMethods : public drizzled::plugin::InfoSchemaMethods > +{ > +public: > + virtual int fillTable(Session *session, > + TableList *tables, > + COND *cond); > +}; > + > +class CmpResetISMethods : public drizzled::plugin::InfoSchemaMethods > +{ > +public: > + virtual int fillTable(Session *session, > + TableList *tables, > + COND *cond); > +}; > + > +class CmpmemISMethods : public drizzled::plugin::InfoSchemaMethods > +{ > +public: > + virtual int fillTable(Session *session, > + TableList *tables, > + COND *cond); > +}; > + > +class CmpmemResetISMethods : public > drizzled::plugin::InfoSchemaMethods > { > public: > virtual int fillTable(Session *session, > @@ -83,12 +83,12 @@ > int i_s_cmpmem_init(); > int i_s_cmpmem_reset_init(); > > -extern InfoSchemaTable *innodb_trx_schema_table; > -extern InfoSchemaTable *innodb_locks_schema_table; > -extern InfoSchemaTable *innodb_lock_waits_schema_table; > -extern InfoSchemaTable *innodb_cmp_schema_table; > -extern InfoSchemaTable *innodb_cmp_reset_schema_table; > -extern InfoSchemaTable *innodb_cmpmem_schema_table; > -extern InfoSchemaTable *innodb_cmpmem_reset_schema_table; > +extern drizzled::plugin::InfoSchemaTable *innodb_trx_schema_table; > +extern drizzled::plugin::InfoSchemaTable *innodb_locks_schema_table; > +extern drizzled::plugin::InfoSchemaTable > *innodb_lock_waits_schema_table; > +extern drizzled::plugin::InfoSchemaTable *innodb_cmp_schema_table; > +extern drizzled::plugin::InfoSchemaTable > *innodb_cmp_reset_schema_table; > +extern drizzled::plugin::InfoSchemaTable *innodb_cmpmem_schema_table; > +extern drizzled::plugin::InfoSchemaTable > *innodb_cmpmem_reset_schema_table; > > #endif /* i_s_h */ > > === modified file 'plugin/length/length.cc' > --- plugin/length/length.cc 2009-08-17 20:54:05 +0000 > +++ plugin/length/length.cc 2009-09-27 23:10:31 +0000 > @@ -19,7 +19,7 @@ > > #include > #include > -#include > +#include > > using namespace std; > using namespace drizzled; > @@ -68,13 +68,13 @@ > { > lengthudf= new plugin::Create_function("length"); > lengthudf->addAlias("octet_length"); > - registry.function.add(lengthudf); > + registry.add(lengthudf); > return 0; > } > > static int finalize(drizzled::plugin::Registry ®istry) > { > - registry.function.remove(lengthudf); > + registry.remove(lengthudf); > delete lengthudf; > return 0; > } > > === modified file 'plugin/logging_gearman/logging_gearman.cc' > --- plugin/logging_gearman/logging_gearman.cc 2009-08-21 18:11:49 > +0000 > +++ plugin/logging_gearman/logging_gearman.cc 2009-09-27 23:10:31 > +0000 > @@ -18,7 +18,7 @@ > */ > > #include > -#include > +#include > #include > #include > > @@ -162,7 +162,7 @@ > return dst; > } > > -class LoggingGearman : public Logging_handler > +class LoggingGearman : public drizzled::plugin::Logging > { > > int gearman_client_ok; > @@ -170,7 +170,9 @@ > > public: > > - LoggingGearman() : Logging_handler("LoggingGearman"), > gearman_client_ok(0) > + LoggingGearman() > + : drizzled::plugin::Logging("LoggingGearman"), > + gearman_client_ok(0) > { > gearman_return_t ret; > > @@ -285,7 +287,7 @@ > } > }; > > -static Logging_handler *handler= NULL; > +static LoggingGearman *handler= NULL; > > static int logging_gearman_plugin_init(drizzled::plugin::Registry > ®istry) > { > @@ -298,7 +300,7 @@ > static int logging_gearman_plugin_deinit(drizzled::plugin::Registry > ®istry) > { > registry.remove(handler); > - delete(handler); > + delete handler; > > return 0; > } > > === modified file 'plugin/logging_query/logging_query.cc' > --- plugin/logging_query/logging_query.cc 2009-08-21 18:11:49 +0000 > +++ plugin/logging_query/logging_query.cc 2009-09-27 23:10:31 +0000 > @@ -18,7 +18,7 @@ > */ > > #include > -#include > +#include > #include > #include > #include PCRE_HEADER > @@ -165,7 +165,7 @@ > } > > > -class Logging_query: public Logging_handler > +class Logging_query: public drizzled::plugin::Logging > { > int fd; > pcre *re; > @@ -173,7 +173,9 @@ > > public: > > - Logging_query() : Logging_handler("Logging_query"), fd(-1), re > (NULL), pe(NULL) > + Logging_query() > + : drizzled::plugin::Logging("Logging_query"), > + fd(-1), re(NULL), pe(NULL) > { > > /* if there is no destination filename, dont bother doing > anything */ > > === modified file 'plugin/logging_syslog/logging_syslog.cc' > --- plugin/logging_syslog/logging_syslog.cc 2009-08-21 18:11:49 +0000 > +++ plugin/logging_syslog/logging_syslog.cc 2009-09-27 23:10:31 +0000 > @@ -18,7 +18,7 @@ > */ > > #include > -#include > +#include > #include > #include > > @@ -59,7 +59,7 @@ > #endif > } > > -class Logging_syslog: public Logging_handler > +class Logging_syslog: public drizzled::plugin::Logging > { > > int syslog_facility; > @@ -67,7 +67,9 @@ > > public: > > - Logging_syslog() : Logging_handler("Logging_syslog"), > syslog_facility(-1), syslog_priority(-1) > + Logging_syslog() > + : drizzled::plugin::Logging("Logging_syslog"), > + syslog_facility(-1), syslog_priority(-1) > { > > for (int ndx= 0; facilitynames[ndx].c_name; ndx++) > > === modified file 'plugin/md5/md5.cc' > --- plugin/md5/md5.cc 2009-08-17 20:54:05 +0000 > +++ plugin/md5/md5.cc 2009-09-27 23:10:31 +0000 > @@ -15,7 +15,7 @@ > Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA > 02110-1301 USA */ > > #include > -#include > +#include > #include > #include > > @@ -93,13 +93,13 @@ > static int initialize(plugin::Registry ®istry) > { > md5udf= new plugin::Create_function("md5"); > - registry.function.add(md5udf); > + registry.add(md5udf); > return 0; > } > > static int finalize(plugin::Registry ®istry) > { > - registry.function.remove(md5udf); > + registry.remove(md5udf); > delete md5udf; > return 0; > } > > === modified file 'plugin/myisam/ha_myisam.cc' > --- plugin/myisam/ha_myisam.cc 2009-09-23 18:52:35 +0000 > +++ plugin/myisam/ha_myisam.cc 2009-09-27 23:10:31 +0000 > @@ -61,14 +61,14 @@ > NULL > }; > > -class MyisamEngine : public StorageEngine > +class MyisamEngine : public drizzled::plugin::StorageEngine > { > public: > MyisamEngine(string name_arg) > - : StorageEngine(name_arg, > - HTON_CAN_RECREATE | > - HTON_TEMPORARY_ONLY | > - HTON_FILE_BASED ) {} > + : drizzled::plugin::StorageEngine(name_arg, > + HTON_CAN_RECREATE | > + HTON_TEMPORARY_ONLY | > + HTON_FILE_BASED ) {} > > virtual handler *create(TableShare *table, > MEM_ROOT *mem_root) > @@ -462,18 +462,20 @@ > > } > > -ha_myisam::ha_myisam(StorageEngine *engine_arg, TableShare > *table_arg) > - :handler(engine_arg, table_arg), file(0), > - int_table_flags(HA_NULL_IN_KEY | > - HA_DUPLICATE_POS | > - HA_CAN_INDEX_BLOBS | > - HA_AUTO_PART_KEY | > - HA_NO_TRANSACTIONS | > - HA_HAS_RECORDS | > - HA_STATS_RECORDS_IS_EXACT | > - HA_NEED_READ_RANGE_BUFFER | > - HA_MRR_CANT_SORT), > - can_enable_indexes(1) > +ha_myisam::ha_myisam(drizzled::plugin::StorageEngine *engine_arg, > + TableShare *table_arg) > + : handler(engine_arg, table_arg), > + file(0), > + int_table_flags(HA_NULL_IN_KEY | > + HA_DUPLICATE_POS | > + HA_CAN_INDEX_BLOBS | > + HA_AUTO_PART_KEY | > + HA_NO_TRANSACTIONS | > + HA_HAS_RECORDS | > + HA_STATS_RECORDS_IS_EXACT | > + HA_NEED_READ_RANGE_BUFFER | > + HA_MRR_CANT_SORT), > + can_enable_indexes(1) > {} > > handler *ha_myisam::clone(MEM_ROOT *mem_root) > > === modified file 'plugin/myisam/ha_myisam.h' > --- plugin/myisam/ha_myisam.h 2009-08-24 18:48:20 +0000 > +++ plugin/myisam/ha_myisam.h 2009-09-27 23:10:31 +0000 > @@ -50,7 +50,7 @@ > int repair(Session *session, MI_CHECK ¶m, bool optimize); > > public: > - ha_myisam(StorageEngine *engine, TableShare *table_arg); > + ha_myisam(drizzled::plugin::StorageEngine *engine, TableShare > *table_arg); > ~ha_myisam() {} > handler *clone(MEM_ROOT *mem_root); > const char *index_type(uint32_t key_number); > > === modified file 'plugin/oldlibdrizzle/oldlibdrizzle.cc' > --- plugin/oldlibdrizzle/oldlibdrizzle.cc 2009-08-31 23:50:37 +0000 > +++ plugin/oldlibdrizzle/oldlibdrizzle.cc 2009-09-27 23:10:31 +0000 > @@ -815,13 +815,13 @@ > > static int init(drizzled::plugin::Registry ®istry) > { > - registry.listen.add(listen_obj); > + registry.add(listen_obj); > return 0; > } > > static int deinit(drizzled::plugin::Registry ®istry) > { > - registry.listen.remove(listen_obj); > + registry.remove(listen_obj); > return 0; > } > > > === modified file 'plugin/version/versionudf.cc' > --- plugin/version/versionudf.cc 2009-08-17 20:54:05 +0000 > +++ plugin/version/versionudf.cc 2009-09-27 23:10:31 +0000 > @@ -19,7 +19,7 @@ > > #include > #include > -#include > +#include > > using namespace std; > using namespace drizzled; > @@ -54,13 +54,13 @@ > static int initialize(plugin::Registry ®istry) > { > versionudf= new plugin::Create_function("version"); > - registry.function.add(versionudf); > + registry.add(versionudf); > return 0; > } > > static int finalize(plugin::Registry ®istry) > { > - registry.function.remove(versionudf); > + registry.remove(versionudf); > delete versionudf; > return 0; > } > > === modified file 'po/de.po' > --- po/de.po 2009-08-27 18:06:03 +0000 > +++ po/de.po 2009-09-27 23:10:31 +0000 > @@ -7,7 +7,7 @@ > msgstr "" > "Project-Id-Version: drizzle\n" > "Report-Msgid-Bugs-To: http://translations.launchpad.net/drizzle\n" > -"POT-Creation-Date: 2009-08-24 08:08-0700\n" > +"POT-Creation-Date: 2009-05-25 10:55-0700\n" > "PO-Revision-Date: 2009-07-22 13:25+0000\n" > "Last-Translator: Sebastian Wallroth \n" > "Language-Team: German