| 776 | |
| 777 | |
| 778 | int make_schemata_old_format(THD *thd, ST_SCHEMA_TABLE *schema_table) |
| 779 | { |
| 780 | char tmp[128]; |
| 781 | LEX *lex= thd->lex; |
| 782 | SELECT_LEX *sel= lex->current_select; |
| 783 | Name_resolution_context *context= &sel->context; |
| 784 | |
| 785 | if (!sel->item_list.elements) |
| 786 | { |
| 787 | ST_FIELD_INFO *field_info= &schema_table->fields_info[1]; |
| 788 | String buffer(tmp,sizeof(tmp), system_charset_info); |
| 789 | Item_field *field= new Item_field(context, |
| 790 | NullS, NullS, field_info->field_name); |
| 791 | if (!field || add_item_to_list(thd, field)) |
| 792 | return 1; |
| 793 | buffer.length(0); |
| 794 | buffer.append(field_info->old_name); |
| 795 | if (lex->wild && lex->wild->ptr()) |
| 796 | { |
| 797 | buffer.append(STRING_WITH_LEN(" (")); |
| 798 | buffer.append(lex->wild->ptr()); |
| 799 | buffer.append(')'); |
| 800 | } |
| 801 | field->item_name.copy(buffer.ptr(), buffer.length(), system_charset_info); |
| 802 | } |
| 803 | return 0; |
| 804 | } |
| 805 | |
| 806 | |
| 807 | int make_table_names_old_format(THD *thd, ST_SCHEMA_TABLE *schema_table) |
nothing calls this directly
no test coverage detected