From: scut_tang Date: July 29 2009 11:29am Subject: Some questions about get_all_tables List-Archive: http://lists.mysql.com/soc/428 Message-Id: <1118009.428681248866981488.JavaMail.coremail@bj126app81.126.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_113876_16386136.1248866981486" ------=_Part_113876_16386136.1248866981486 Content-Type: text/plain; charset=gbk Content-Transfer-Encoding: 7bit Hi, Sergei I have understanded how get_all_tables() work roughly. The index for tables based on filesystem is to be implemented by making the right database names and table names. And the process_table function pointer is to fill data into table according by database name and table name. The old_format function pointer is used for SHOW statements, also there are some old names in fileds_info. I want do know more about MySQL internal, instead of being a code porter :) The questions list: 1. What does thd->lex->wild mean? I see there are lots of "char *wild" and functions, like wild_case_compare(). Especially, the struct LOOKUP_FIELD_VALUES, which contains wild_db_name and wild_table_value; 2. What do table->next_number_field and table->found_next_field mean? 3. The I_S storage engine should support SHOW statements? like, SHOW COLUMNS FROM XXX.XXX; 4. In get_all_tables(), SELECT_LEX *lsel= tables->schema_select_lex comes from TABLE_LIST *tables, but there are no TABLE_LIST in class handler. But I see table->pos_in_table_list and table->pos_in_locked_tables. Could I use them? 5. Why storage engine do not get some fields' data according by table->read_set, instead of all fields. For example: SELECT id FROM t1; only get id field data, not entire record. 6. What is the purpose of partial_cond->val_int() in get_all_tables()? Verify the condition again? So many questions :P Regards, Robin ------=_Part_113876_16386136.1248866981486--