svnno****@sourc*****
svnno****@sourc*****
2008年 6月 12日 (木) 15:45:24 JST
Revision: 143 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=tritonn&view=rev&rev=143 Author: mir Date: 2008-06-12 15:45:24 +0900 (Thu, 12 Jun 2008) Log Message: ----------- added handlerton->XXX definitions Modified Paths: -------------- trunk/src/ha_tritonn.cc -------------- next part -------------- Modified: trunk/src/ha_tritonn.cc =================================================================== --- trunk/src/ha_tritonn.cc 2008-06-12 06:20:52 UTC (rev 142) +++ trunk/src/ha_tritonn.cc 2008-06-12 06:45:24 UTC (rev 143) @@ -26,10 +26,27 @@ sen_encoding db_encoding = sen_enc_utf8; int ctx_flag = SEN_CTX_USEQL; -static handler *create_handler(handlerton *hton, - TABLE_SHARE *table, +/* create ha_tritonn instance */ +static handler *tritonn_create_handler(handlerton *hton, + TABLE_SHARE *table, MEM_ROOT *mem_root); +/* delete database files */ +static void tritonn_drop_database(handlerton *hton, char* path); + +/* flush logfile */ +static bool tritonn_flush_logs(handlerton *hton); + +/* show engine status */ +static bool tritonn_show_status(handlerton *hton, THD *thd, stat_print_fn *print, + enum ha_stat_type stat); + +/* handlerton capability flags. see handler.h for more information */ +static int tritonn_hton_flags = HTON_ALTER_NOT_SUPPORTED | HTON_CAN_RECREATE | + HTON_TEMPORARY_NOT_SUPPORTED | HTON_NO_PARTITION; + + + /* Variables for tritonn share methods */ static HASH tritonn_open_tables; ///< Hash used to track the number of open tables; variable for tritonn share methods pthread_mutex_t tritonn_mutex; ///< This is the mutex used to init the hash; variable for tritonn share methods @@ -57,9 +74,7 @@ hton->drop_database = tritonn_drop_database; hton->flush_logs = tritonn_flush_logs; hton->show_status = tritonn_show_status; - hton->flags = HTON_ALTER_NOT_SUPPORTED | HTON_CAN_RECREATE | - HTON_TEMPORARY_NOT_SUPPORTED | HTON_NO_PARTITION; - + hton->flags = tritonn_hton_flags; DBUG_RETURN(0); } @@ -145,13 +160,31 @@ return 0; } -static handler* create_handler(handlerton *hton, - TABLE_SHARE *table, - MEM_ROOT *mem_root) +/* create ha_tritonn instance */ +static handler* tritonn_create_handler(handlerton *hton, + TABLE_SHARE *table, + MEM_ROOT *mem_root) { return new (mem_root) ha_tritonn(hton, table); } +/* delete database files */ +static void tritonn_drop_database(handlerton *hton, char* path) +{} + +/* flush logfile */ +static bool tritonn_flush_logs(handlerton *hton) +{ + return true; +} + +/* show engine status */ +static bool tritonn_show_status(handlerton *hton, THD *thd, stat_print_fn *print, + enum ha_stat_type stat) +{ + return true; +} + ha_tritonn::ha_tritonn(handlerton *hton, TABLE_SHARE *table_arg) :handler(hton, table_arg) {}