Port FacebookSQL gap lock detection, logging, and error.

Registered by George Ormond Lorch III

Port FacebookSQL features that recognize gap locks and optionally logs and errors when gap locks are taken against a storage engine that does not support them.

gap_lock_write_log : Write to gap_lock_log_file when executing queries relying on Gap Lock.
gap_lock_log_file : Log file path where queries using Gap Lock are written. gap_lock_write_log needs to be turned on to write logs
gap_lock_raise_error : Raise an error when executing queries relying on Gap Lock

Blueprint information

Status:
Complete
Approver:
George Ormond Lorch III
Priority:
Medium
Drafter:
George Ormond Lorch III
Direction:
Approved
Assignee:
George Ormond Lorch III
Definition:
Approved
Series goal:
Accepted for 5.6
Implementation:
Implemented
Milestone target:
milestone icon 5.6.36-82.0
Started by
George Ormond Lorch III
Completed by
George Ormond Lorch III

Related branches

Sprints

Whiteboard

See these upstream commits for needed functionality:

https://github.com/facebook/mysql-5.6/commit/782cc5a4f4e2c18b2f961b78f4369f4d72c080c2 : Optionally block/log queries relying on Gap Locks
https://github.com/facebook/mysql-5.6/commit/2fb6321d5cc239d63a66cc5a04bdb62a04794f6d : Checking Gap Lock for InnoDB and MyRocks only
https://github.com/facebook/mysql-5.6/commit/6078c85bcceb09849971726c262570529bca8ece : Preventing to write "Got error 122.." to err log on Gap Lock errors
https://github.com/facebook/mysql-5.6/commit/9b439ee4010d0db8f48b206bc16a53c1ea293744 : Add option to exclude tables from gap lock check ** Uses the Regex_list_handler up in server code mentioned in MYR-9 DO NOT PORT **
https://github.com/facebook/mysql-5.6/commit/b62cee1fad43b1c0848d80d736689019bd8750e9 : Gap Lock: skip raising error if calling ha_rnd_init(0) (#254)
https://github.com/facebook/mysql-5.6/commit/179bdf1b14b6b88b0661527eb039ae32cb1fc2ba : Issue #287: gap_lock_exceptions was not initialized at startup
https://github.com/facebook/mysql-5.6/commit/03690d6807555ce6898ed4496785d0303a208f06 : Refactor regex code to handle regexes in table lists easier ** Basis for MYR-9
https://github.com/facebook/mysql-5.6/commit/fbd5a3c246e0946f1eec4363ad2305e2c866a808 : Suppress Gap Lock errors for unique key lookups

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.