| 6084 | } |
| 6085 | |
| 6086 | TABLE_LIST::TABLE_LIST(THD *thd, |
| 6087 | Lex_ident_db db_str, |
| 6088 | bool fqtn, |
| 6089 | Lex_ident_table alias_str, |
| 6090 | bool has_alias_ptr, |
| 6091 | Table_ident *table_ident, |
| 6092 | thr_lock_type lock_t, |
| 6093 | enum_mdl_type mdl_t, |
| 6094 | ulong table_opts, |
| 6095 | bool info_schema, |
| 6096 | st_select_lex *sel, |
| 6097 | List<Index_hint> *index_hints_ptr, |
| 6098 | LEX_STRING *option_ptr) |
| 6099 | { |
| 6100 | reset(); |
| 6101 | db= Lex_ident_db(db_str); |
| 6102 | is_fqtn= fqtn; |
| 6103 | alias= alias_str; |
| 6104 | is_alias= has_alias_ptr; |
| 6105 | |
| 6106 | if (lower_case_table_names) |
| 6107 | { |
| 6108 | if (!(table_name= |
| 6109 | thd->lex_ident_casedn(Lex_ident_table(table_ident->table))).str) |
| 6110 | { |
| 6111 | table_name.str= 0; |
| 6112 | return; //EOM |
| 6113 | } |
| 6114 | if (db.length && db.str != any_db.str && |
| 6115 | !(db= thd->lex_ident_casedn(db)).str) |
| 6116 | { |
| 6117 | table_name.str= 0; |
| 6118 | return; //EOM |
| 6119 | } |
| 6120 | } |
| 6121 | else |
| 6122 | table_name= Lex_ident_table(table_ident->table); |
| 6123 | lock_type= lock_t; |
| 6124 | mdl_type= mdl_t; |
| 6125 | table_options= table_opts; |
| 6126 | updating= table_options & TL_OPTION_UPDATING; |
| 6127 | ignore_leaves= table_options & TL_OPTION_IGNORE_LEAVES; |
| 6128 | sequence= table_options & TL_OPTION_SEQUENCE; |
| 6129 | derived= table_ident->sel; |
| 6130 | |
| 6131 | if (!table_ident->sel && info_schema) |
| 6132 | { |
| 6133 | schema_table= find_schema_table(thd, &table_name); |
| 6134 | schema_table_name= Lex_ident_i_s_table(table_name); |
| 6135 | } |
| 6136 | select_lex= sel; |
| 6137 | /* |
| 6138 | We can't cache internal temporary tables between prepares as the |
| 6139 | table may be deleted before next exection. |
| 6140 | */ |
| 6141 | cacheable_table= !table_ident->is_derived_table(); |
| 6142 | index_hints= index_hints_ptr; |
| 6143 | option= option_ptr ? option_ptr->str : 0; |
nothing calls this directly
no test coverage detected