Fix MySQL 7.4 vs 8 compatibility bugs

Created on 21 October 2022, over 1 year ago
Updated 17 May 2023, about 1 year ago

Problem/Motivation

It looks like the tests started failing at some point between 19 Nov 2021 and 1 Oct 2022 β†’ . I couldn't see any existing issues to fix them.

I think the tests work for the narrow MySQL version range of 8.0.4 - 8.0.21.

I get the failures with MySQL 5.7.39. I think that's due to the changes made in πŸ› Compatibility with MySQL v8 Fixed which don't appear to be compatible with MySQL < 8.0.4, I don't know if that was intentional:

Prior to MySQL 8.0.4, MySQL used the Henry Spencer regular expression library to support regular expression operations, rather than International Components for Unicode (ICU). The following discussion describes differences between the Spencer and ICU libraries that may affect applications:
...

  • The Spencer library supports word-beginning and word-end boundary markers ([[:<:]] and [[:>:]] notation). ICU does not. For ICU, you can use \b to match word boundaries; double the backslash because MySQL interprets it as the escape character within strings.

I get the failures with MySQL 8.0.29. Possibly we're bit by the change in 8.0.22

Regular expression functions such as REGEXP_LIKE() yielded inconsistent results with binary string arguments. These functions now reject binary strings with an error. (Bug #98950, Bug #98951, Bug #31031886, Bug #31031888)

Steps to reproduce

Run tests.

Proposed resolution

(Is this two separate issues really?)

  1. For < 8.0.4 I don't know if was a deliberate decision to drop support for earlier versions of MySQL? If not, I can't think of anything cleverer than version detecting (🀒) myself...
  2. For > 8.0.21 it looks like we might be able to use match_type argument to specify case sensitive matching.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Fixed

Version

1.0

Component

Tests

Created by

πŸ‡¬πŸ‡§United Kingdom AndyF

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024