svnno****@sourc*****
svnno****@sourc*****
2008年 6月 18日 (水) 13:46:05 JST
Revision: 149 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=tritonn&view=rev&rev=149 Author: mir Date: 2008-06-18 13:46:04 +0900 (Wed, 18 Jun 2008) Log Message: ----------- added dump function for handler::create Modified Paths: -------------- trunk/src/ha_tritonn.cc -------------- next part -------------- Modified: trunk/src/ha_tritonn.cc =================================================================== --- trunk/src/ha_tritonn.cc 2008-06-13 08:26:06 UTC (rev 148) +++ trunk/src/ha_tritonn.cc 2008-06-18 04:46:04 UTC (rev 149) @@ -41,6 +41,9 @@ static bool tritonn_show_status(handlerton *hton, THD *thd, stat_print_fn *print, enum ha_stat_type stat); +static void dump_create(const char *name, TABLE *table_arg, + HA_CREATE_INFO *create_info); + /* 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; @@ -330,6 +333,8 @@ { DBUG_ENTER("ha_tritonn::create"); DBTN; + dump_create(name,table_arg,create_info); + DBUG_RETURN(0); } @@ -433,3 +438,60 @@ dump_condition(item); return cond; } + +static void dump_create(const char *name, TABLE *table_arg, + HA_CREATE_INFO *create_info) +{ + int i; + printf("===dump_create is called===\n"); + printf("argments:: name=%s, table_arg=%p, create_info=%p\n",name,table_arg,create_info); + printf("table_arg->s->table_name = %s\n",table_arg->s->table_name); + printf("table_arg->s->db = %s\n", table_arg->s->db); + printf("table_arg->s->path = %s\n", table_arg->s->path); + printf("table_arg->s->fields = %d\n", table_arg->s->fields); + printf("table_arg->s->keys = %d\n", table_arg->s->keys); + printf("table_arg->s->primary_key = %d\n", table_arg->s->primary_key); + printf("table_arg->s->row_type = %d\n", table_arg->s->row_type); + printf("create_info->alias = %s\n", create_info->alias); + printf("create_info->table_charset = %p\n", create_info->table_charset); + printf("create_info->default_table_charset = %p\n", create_info->default_table_charset); + printf("create_info->connect_string.str = %s\n",create_info->connect_string.str); + printf("create_info->comment.str = %s\n", create_info->comment.str); + + for (i=0; i < table_arg->s->fieldnames.count; i++) { + printf(" table_arg->s->fieldnames.type_names=%s\n", table_arg->s->fieldnames.type_names[i]); + } + for (i=0; i < table_arg->s->keynames.count; i++) { + printf(" table_arg->s->keynames.type_names=%s\n", table_arg->s->keynames.type_names[i]); + } + + for (i=0; i < table_arg->s->fields; i++) { + Field *field = table_arg->s->field[i]; + printf(" field=%p\n",field); + printf(" field->field_name = %s\n", field->field_name); + printf(" field->comment.str = %s\n", field->comment.str); + printf(" field->field_length = %d\n", field->field_length); + printf(" field->unireg_chekc = %d\n", field->unireg_check); + printf(" field->flags = %d\n", field->flags); + printf(" field->field_index = %d\n", field->field_index); + printf(" field->type() = %d\n", field->type()); + printf(" field->result_type() = %d\n", field->result_type()); + } + + int keys = table_arg->s->keys; + for (i=0; i < keys; i++) { + KEY *key = table_arg->key_info+i; + printf(" key=%p\n",key); + printf(" key->name = %s\n", key->name); + printf(" key->algorithm = %d\n", key->algorithm); + printf(" key->key_parts = %d\n", key->key_parts); + int j; + for (j=0; j < key->key_parts; j++) { + KEY_PART_INFO *part = key->key_part+j; + printf(" part=%p\n",part); + printf(" part->fieldnr=%d\n",part->fieldnr); + printf(" part->field->field_name=%s\n",part->field->field_name); + printf(" part->field->comment.str=%s\n",part->field->comment.str); + } + } +}