MCPcopy Create free account
hub / github.com/MariaDB/server / add_schema_table

Function add_schema_table

sql/sql_show.cc:4650–4679  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4648
4649
4650static my_bool add_schema_table(THD *thd, plugin_ref plugin,
4651 void* p_data)
4652{
4653 LEX_CSTRING *file_name= 0;
4654 st_add_schema_table *data= (st_add_schema_table *)p_data;
4655 Dynamic_array<LEX_CSTRING*> *file_list= data->files;
4656 const char *wild= data->wild;
4657 ST_SCHEMA_TABLE *schema_table= plugin_data(plugin, ST_SCHEMA_TABLE *);
4658 DBUG_ENTER("add_schema_table");
4659
4660 if (schema_table->hidden)
4661 DBUG_RETURN(0);
4662 if (wild)
4663 {
4664 if (lower_case_table_names)
4665 {
4666 if (wild_case_compare(files_charset_info,
4667 schema_table->table_name.str,
4668 wild))
4669 DBUG_RETURN(0);
4670 }
4671 else if (wild_compare(schema_table->table_name.str, wild, 0))
4672 DBUG_RETURN(0);
4673 }
4674
4675 if ((file_name= thd->make_clex_string(schema_table->table_name)) &&
4676 !file_list->append(file_name))
4677 DBUG_RETURN(0);
4678 DBUG_RETURN(1);
4679}
4680
4681
4682int schema_tables_add(THD *thd, Dynamic_array<LEX_CSTRING*> *files,

Callers

nothing calls this directly

Calls 4

wild_case_compareFunction · 0.85
wild_compareFunction · 0.85
make_clex_stringMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected