| 170 | } |
| 171 | |
| 172 | inline USHORT DOWNGRADE(thread_db* tdbb, Lock* lock) |
| 173 | { |
| 174 | Database* const dbb = tdbb->getDatabase(); |
| 175 | |
| 176 | FbLocalStatus statusVector; |
| 177 | |
| 178 | USHORT ret = lock->lck_compatible ? |
| 179 | internal_downgrade(tdbb, &statusVector, lock) : |
| 180 | dbb->lockManager()->downgrade(tdbb, &statusVector, lock->lck_id); |
| 181 | |
| 182 | fb_assert(statusVector.isEmpty()); |
| 183 | |
| 184 | return ret; |
| 185 | } |
| 186 | |
| 187 | #ifdef DEV_BUILD |
| 188 | /* Valid locks are not NULL, |
no test coverage detected