Opened 3 weeks ago

Last modified 83 seconds ago

#29451 new Cleanup/optimization

Add compatibility with MySQL 8

Reported by: Tim Graham Owned by: nobody
Component: Database layer (models, ORM) Version: master
Severity: Normal Keywords:
Cc: Adam (Chainz) Johnson Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

See attached log for some test failures I experienced with MySQL 8.0.11.

It seems there's at least some changes in how regular expression matching works.

Attachments (1)

mysql-failures.log (9.2 KB) - added by Tim Graham 3 weeks ago.

Download all attachments as: .zip

Change History (6)

Changed 3 weeks ago by Tim Graham

Attachment: mysql-failures.log added

comment:1 Changed 3 weeks ago by Adam (Chainz) Johnson

Cc: Adam (Chainz) Johnson added

comment:2 Changed 2 weeks ago by Tom Forbes

Got a small patch to fix the syntax errors: https://github.com/django/django/pull/10021

Seems you need to quote the column names in mysql 8

comment:3 Changed 2 weeks ago by Carlton Gibson <carlton.gibson@…>

In a253a580:

Refs #29451 -- Quoted MySQL column names in tests.

comment:4 Changed 2 weeks ago by GitHub <noreply@…>

In c4f099d:

Refs #29451 -- Used quote_name for column names in tests.

Regression in a253a580e6f20fb7087490225538422eb6cab0bb

comment:5 Changed 84 seconds ago by Tom Forbes

I was investigating this and was surprised to see that REGEXP BINARY '.*' matched nothing when using MySQL 8. I thought there might be a bug with MySQL but could not find much online other than this cryptic commit entitled Work around REGEXP BINARY not working correctly on MySQL 8 by using REGEXP_LIKE:

https://github.com/jeremyevans/sequel/commit/ba3ea1c218d10bbab3f2b48039faedd4859865f8

After copying the Oracle regex_lookup method which does exactly this all tests pass on 8, however the REGEXP_LIKE function does not exist in MySQL 5.6.

Note: See TracTickets for help on using tickets.
Back to Top