@@ -50,10 +50,10 @@ TableLockHolder IStorage::lockForShare(const String & query_id, const std::chron
5050{
5151 TableLockHolder result = tryLockTimed (drop_lock, RWLockImpl::Read, query_id, acquire_timeout);
5252
53- if (is_dropped || is_detached )
53+ if (is_dropped)
5454 {
5555 auto table_id = getStorageID ();
56- throw Exception (ErrorCodes::TABLE_IS_DROPPED, " Table {}.{} is dropped or detached " , table_id.database_name , table_id.table_name );
56+ throw Exception (ErrorCodes::TABLE_IS_DROPPED, " Table {}.{} is dropped" , table_id.database_name , table_id.table_name );
5757 }
5858 return result;
5959}
@@ -62,7 +62,7 @@ TableLockHolder IStorage::tryLockForShare(const String & query_id, const std::ch
6262{
6363 TableLockHolder result = tryLockTimed (drop_lock, RWLockImpl::Read, query_id, acquire_timeout);
6464
65- if (is_dropped || is_detached )
65+ if (is_dropped)
6666 {
6767 // Table was dropped while acquiring the lock
6868 result = nullptr ;
@@ -81,7 +81,7 @@ IStorage::AlterLockHolder IStorage::lockForAlter(const std::chrono::milliseconds
8181 " Possible deadlock avoided. Client should retry." ,
8282 getStorageID ().getFullTableName (), acquire_timeout.count ());
8383
84- if (is_dropped || is_detached )
84+ if (is_dropped)
8585 throw Exception (ErrorCodes::TABLE_IS_DROPPED, " Table {} is dropped or detached" , getStorageID ());
8686
8787 return lock;
@@ -93,7 +93,7 @@ TableExclusiveLockHolder IStorage::lockExclusively(const String & query_id, cons
9393 TableExclusiveLockHolder result;
9494 result.drop_lock = tryLockTimed (drop_lock, RWLockImpl::Write, query_id, acquire_timeout);
9595
96- if (is_dropped || is_detached )
96+ if (is_dropped)
9797 throw Exception (ErrorCodes::TABLE_IS_DROPPED, " Table {} is dropped or detached" , getStorageID ());
9898
9999 return result;
0 commit comments