From 01760333e82e2f4364a31343eefa5837ae44b8f5 Mon Sep 17 00:00:00 2001 From: Monty Date: Fri, 25 Nov 2022 15:25:44 +0200 Subject: [PATCH] Do not give warnings about #rocksdb directory information_schema "select * from information_schema.tables limit 1" was giving the following warning in the log: [ERROR] Invalid (old?) table or database name '#rocksdb' --- sql/handler.cc | 2 +- sql/table.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sql/handler.cc b/sql/handler.cc index 0d66da589f2..03445e9ed06 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -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]; diff --git a/sql/table.h b/sql/table.h index 218fb0e8104..e725dd1152e 100644 --- a/sql/table.h +++ b/sql/table.h @@ -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