[Commits] 54a892e: Post-merge fixes

Sergei Petrunia psergey at askmonty.org
Fri Mar 31 01:32:59 EEST 2017


revision-id: 54a892e133026aa93fed4fe2d5e8f379cfb92c5e
parent(s): 5210c69e71ddcf39ca14194504e45baa4d325610
committer: Sergei Petrunia
branch nick: 10.2-mariarocks
timestamp: 2017-03-31 01:32:59 +0300
message:

Post-merge fixes

---
 storage/rocksdb/rdb_datadic.cc | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/storage/rocksdb/rdb_datadic.cc b/storage/rocksdb/rdb_datadic.cc
index 829b825..c286272 100644
--- a/storage/rocksdb/rdb_datadic.cc
+++ b/storage/rocksdb/rdb_datadic.cc
@@ -2831,8 +2831,10 @@ bool Rdb_validate_tbls::check_frm_file(const std::string &fullpath,
     did in the future we would need to make a version that does it without
     the connection handle as we don't have one here.
   */
-  enum legacy_db_type eng_type;
-  frm_type_enum type = dd_frm_type(nullptr, fullfilename.c_ptr(), &eng_type);
+  char eng_type_buf[NAME_CHAR_LEN+1];
+  LEX_STRING eng_type_str = {eng_type_buf, 0}; 
+  //enum legacy_db_type eng_type;
+  frm_type_enum type = dd_frm_type(nullptr, fullfilename.c_ptr(), &eng_type_str);
   if (type == FRMTYPE_ERROR) {
     sql_print_warning("RocksDB: Failed to open/read .from file: %s",
                       fullfilename.ptr());
@@ -2841,7 +2843,7 @@ bool Rdb_validate_tbls::check_frm_file(const std::string &fullpath,
 
   if (type == FRMTYPE_TABLE) {
     /* For a RocksDB table do we have a reference in the data dictionary? */
-    if (eng_type == DB_TYPE_ROCKSDB) {
+    if (!strncmp(eng_type_str.str, "ROCKSDB", eng_type_str.length)) {
       /*
         Attempt to remove the table entry from the list of tables.  If this
         fails then we know we had a .frm file that wasn't registered in RocksDB.
@@ -2854,7 +2856,7 @@ bool Rdb_validate_tbls::check_frm_file(const std::string &fullpath,
                           dbname.c_str(), tablename.c_str());
         *has_errors = true;
       }
-    } else if (eng_type == DB_TYPE_PARTITION_DB) {
+    } else if (!strncmp(eng_type_str.str, "partition", eng_type_str.length)) {
       /*
         For partition tables, see if it is in the m_list as a partition,
         but don't generate an error if it isn't there - we don't know that the


More information about the commits mailing list