diff options
author | Sergei Petrunia <psergey@askmonty.org> | 2018-05-10 19:05:13 +0300 |
---|---|---|
committer | Sergei Petrunia <psergey@askmonty.org> | 2018-05-10 19:05:13 +0300 |
commit | b0269816a52d7fb3d8893afbafc60b27aca30815 (patch) | |
tree | 1af5ea6e8d020af631512182dea048d2cc5404aa /storage | |
parent | 4d51009a772fdfffc6cc7ae87422a3b0b19fa06a (diff) | |
download | mariadb-git-b0269816a52d7fb3d8893afbafc60b27aca30815.tar.gz |
MyRocks: post-merge fixes for Windows: take into account FN_LIBCHAR2
Table name may be passed either as "./db/table" or as ".\\db\\table".
Diffstat (limited to 'storage')
-rw-r--r-- | storage/rocksdb/ha_rocksdb.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/storage/rocksdb/ha_rocksdb.cc b/storage/rocksdb/ha_rocksdb.cc index 57efc711d61..46d963860a2 100644 --- a/storage/rocksdb/ha_rocksdb.cc +++ b/storage/rocksdb/ha_rocksdb.cc @@ -7141,13 +7141,18 @@ int rdb_normalize_tablename(const std::string &tablename, std::string *const strbuf) { DBUG_ASSERT(strbuf != nullptr); - if (tablename.size() < 2 || tablename[0] != '.' || tablename[1] != FN_LIBCHAR) { + if (tablename.size() < 2 || tablename[0] != '.' || + (tablename[1] != FN_LIBCHAR && tablename[1] != FN_LIBCHAR2)) { DBUG_ASSERT(0); // We were not passed table name? return HA_ERR_ROCKSDB_INVALID_TABLE; } size_t pos = tablename.find_first_of(FN_LIBCHAR, 2); if (pos == std::string::npos) { + pos = tablename.find_first_of(FN_LIBCHAR2, 2); + } + + if (pos == std::string::npos) { DBUG_ASSERT(0); // We were not passed table name? return HA_ERR_ROCKSDB_INVALID_TABLE; } |