| 6592 | */ |
| 6593 | |
| 6594 | TABLE_LIST *TABLE_LIST::find_underlying_table(TABLE *table_to_find) |
| 6595 | { |
| 6596 | /* is this real table and table which we are looking for? */ |
| 6597 | if (table == table_to_find && view == 0) |
| 6598 | return this; |
| 6599 | if (!view) |
| 6600 | return 0; |
| 6601 | |
| 6602 | for (TABLE_LIST *tbl= view->first_select_lex()->get_table_list(); |
| 6603 | tbl; |
| 6604 | tbl= tbl->next_local) |
| 6605 | { |
| 6606 | TABLE_LIST *result; |
| 6607 | if ((result= tbl->find_underlying_table(table_to_find))) |
| 6608 | return result; |
| 6609 | } |
| 6610 | return 0; |
| 6611 | } |
| 6612 | |
| 6613 | /* |
| 6614 | cleanup items belonged to view fields translation table |
no test coverage detected