diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-10-21 16:06:34 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-10-21 16:06:34 +0300 |
commit | 73f5cbd0b6c1461d1a4c3b69ca9e8e9fb187de92 (patch) | |
tree | 4846b1a8a677f2e7687b4d6ec6bd43db3feccd43 /sql/sql_show.cc | |
parent | 78dec1f199458cff30062296b2cf0b42a71d2466 (diff) | |
parent | a0fda162ebd991a60634103f2c9d0735154b9dd3 (diff) | |
download | mariadb-git-73f5cbd0b6c1461d1a4c3b69ca9e8e9fb187de92.tar.gz |
Merge 10.5 into 10.6
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r-- | sql/sql_show.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 663670794c6..b706829451d 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -4479,7 +4479,9 @@ make_table_name_list(THD *thd, Dynamic_array<LEX_CSTRING*> *table_names, if (!lookup_field_vals->wild_table_value && lookup_field_vals->table_value.str) { - if (lookup_field_vals->table_value.length > NAME_LEN) + if (check_table_name(lookup_field_vals->table_value.str, + lookup_field_vals->table_value.length, + false)) { /* Impossible value for a table name, @@ -4516,6 +4518,9 @@ make_table_name_list(THD *thd, Dynamic_array<LEX_CSTRING*> *table_names, return (schema_tables_add(thd, table_names, lookup_field_vals->table_value.str)); + if (check_db_name((LEX_STRING*)db_name)) + return 0; // Impossible TABLE_SCHEMA name + find_files_result res= find_files(thd, table_names, db_name, path, &lookup_field_vals->table_value); if (res != FIND_FILES_OK) |