Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mysql: introduce icuregex package (#13391)
* mysql: introduce icuregex package Co-authored-by: Dirkjan Bussink <[email protected]> Signed-off-by: Vicent Marti <[email protected]> * icuregex: implement freeze set optimization Signed-off-by: Vicent Marti <[email protected]> * evalengine: wire up regex Signed-off-by: Vicent Marti <[email protected]> * Fix remaining TODOs and fix a bunch of bugs Signed-off-by: Dirkjan Bussink <[email protected]> * Update sizegen Signed-off-by: Dirkjan Bussink <[email protected]> * icuregex: Fix invalid slice creation Parse the structure so we can create buffers with the proper size and never with infinite sizes. While this was not the immediate cause of the race error, it's better to create with the right slice size also for debugging when digging into it. The real fix here is that the size of `algorithmicRange` includes the size of the struct itself, so if we want to get the remaining slice size it needs to subtract this value. Signed-off-by: Dirkjan Bussink <[email protected]> * icuregex: Create valid slice length for algorithmicRange We also want to create a valid slice length for the additional data, this was too long if an offset was given and would read into the next entry. Signed-off-by: Dirkjan Bussink <[email protected]> * icuregex: Clean up more unsafe usage This reduces unsafe usage to just udata and doesn't use it anywhere outside of it. Makes it more Go idiomatic this way. Signed-off-by: Dirkjan Bussink <[email protected]> * icuregex: Use more Go like naming and reduce exposed API Signed-off-by: Dirkjan Bussink <[email protected]> * regex: Implement additional regular expression functions This implements the additional MySQL regular expression functions in the evalengine. The evaluator is only implementing this for now, but the compiler is up next. Signed-off-by: Dirkjan Bussink <[email protected]> * regexp: Update generated data Signed-off-by: Dirkjan Bussink <[email protected]> * Revert accidentally committed test Signed-off-by: Dirkjan Bussink <[email protected]> * evalengine: Add compilation for regular expressions Also fixes a whole slew of bugs identified. Signed-off-by: Dirkjan Bussink <[email protected]> * icuregex: Allow for setting explicit dumper Remove the usage of a global variable here. Signed-off-by: Dirkjan Bussink <[email protected]> * evalengine: Add a whole bunch of regex tests This adds a bunch of tests and fixes the bugs exposed through them. Signed-off-by: Dirkjan Bussink <[email protected]> * Fix license Signed-off-by: Dirkjan Bussink <[email protected]> * More license fixes Signed-off-by: Dirkjan Bussink <[email protected]> * evalengine: Improve handling of constant expression regexps Signed-off-by: Dirkjan Bussink <[email protected]> --------- Signed-off-by: Vicent Marti <[email protected]> Signed-off-by: Dirkjan Bussink <[email protected]> Co-authored-by: Dirkjan Bussink <[email protected]>
- Loading branch information