mirror of
https://github.com/MariaDB/server.git
synced 2026-10-23 18:49:29 +03:00
When starting to do a full table/index scan without a WHERE or JOIN condition, tell the storage engine so and the corresponding ulong-truncated LIMIT. Include an innodb implementation: added an innodb switch table_lock_on_full_scan, so that when the switch is on, on receiving the full scan signal from the sql layer, if the truncated LIMIT is ULONG_MAX (likely no LIMIT), attempt to acquire a table lock. Updated tests that have different results with the switch on. The three deadlock_*_race tests cannot reach their DEBUG_SYNC race under a table lock (it degenerates to a timeout), and the three I_S tests only restate a lock-mode change already covered by innodb_full_scan.test. (Comment and code edited by Sergei Petrunia <sergey@mariadb.com> and Thirunarayanan Balathandayuthapani <thiru@mariadb.com>)
104 KiB
104 KiB