v.19.14Improvement
Removed Recursive Rwlock by Thread
Removed recursive rwlock by thread. It makes no sense, because threads are reused between queries.SELECTquery may acquire a lock in one thread, hold a lock from another thread and exit from first thread. In the same time, first thread can be reused byDROPquery. This will lead to false "Attempt to acquire exclusive lock recursively" messages. #6771 (alexey-milovidov)
Why it matters
The previous implementation tracked recursive rwlock ownership by thread, which caused false "Attempt to acquire exclusive lock recursively" errors because threads are reused between different queries. For example, aSELECT query might acquire a lock on one thread and release it on another, while the original thread could be reused for a DROP query. This feature removes that problematic mechanism to prevent these misleading error messages and improve lock handling accuracy.