| 608 | } |
| 609 | |
| 610 | TABLE_LIST * find_table(const char *table_name) { |
| 611 | SQL_I_List<TABLE_LIST> table_list = current_lex->table_list; |
| 612 | TABLE_LIST *table = table_list.first; |
| 613 | while (table != NULL) { |
| 614 | if (is_not_tmp_table(table)){ |
| 615 | if (strcasecmp(table->table_name, table_name) == 0 || strcasecmp(table->alias, table_name) == 0) { |
| 616 | return table; |
| 617 | } |
| 618 | } |
| 619 | table = table->next_local; |
| 620 | } |
| 621 | return NULL; |
| 622 | } |
| 623 | |
| 624 | //增加这个函数的目的是因为有的时候field本身table_name的值为空,一般这种情况为where column xxx ,而table_name不为空的情况则是where tbname.column xxxxx |
| 625 | TABLE_LIST * find_table(Item_field * field) { |
no test coverage detected