Skip to content

Commit

Permalink
Do not give warnings about #rocksdb directory information_schema
Browse files Browse the repository at this point in the history
"select * from information_schema.tables limit 1" was giving the following
warning in the log:

[ERROR] Invalid (old?) table or database name '#rocksdb'
  • Loading branch information
montywi authored and spetrunia committed Feb 3, 2023
1 parent 6c4076f commit 0176033
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sql/handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6580,7 +6580,7 @@ bool Discovered_table_list::add_file(const char *fname)
{
bool is_temp= strncmp(fname, STRING_WITH_LEN(tmp_file_prefix)) == 0;

if (is_temp && !with_temps)
if ((is_temp && !with_temps) || !strncmp(fname,STRING_WITH_LEN(ROCKSDB_DIRECTORY_NAME)))
return 0;

char tname[SAFE_NAME_LEN + 1];
Expand Down
1 change: 1 addition & 0 deletions sql/table.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ typedef ulonglong nested_join_map;
#define tmp_file_prefix "#sql" /**< Prefix for tmp tables */
#define tmp_file_prefix_length 4
#define TMP_TABLE_KEY_EXTRA 8
#define ROCKSDB_DIRECTORY_NAME "#rocksdb"

/**
Enumerate possible types of a table from re-execution
Expand Down

0 comments on commit 0176033

Please sign in to comment.