View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003782 | Composr | core_database_drivers | public | 2019-02-25 21:40 | 2019-06-23 18:04 |
Reporter | Chris Graham | Assigned To | Chris Graham | ||
Severity | Feature-request | ||||
Status | resolved | Resolution | fixed | ||
Product Version | |||||
Fixed in Version | |||||
Summary | 0003782: Clean MySQL 8 support | ||||
Description | MySQL 8 made 3 things keywords which we have used for field names: 1) groups 2) path 3) description This caused some major havoc. We use 'description' a lot. I tried to fix it in this commit where I added escaping throughout the codebase https://github.com/ocproducts/composr/commit/e07e7bcbf4cccddfe9882bf9fdb503f234c8dec1 (I put this in a separate branch). The commit was way too complex, mostly due to having to selectively target MySQL (which has special snowflake escaping), and still buggy - it would have needed a lot of work to trim out ` in more places. It was horrible. So instead I did a novel approach, I did a late-stage pre-parsing of the generated MySQL query, and added field escaping while spitting it back out as a query again. The parser should be pretty simple and efficient, I only had to program it with the MySQL-syntax-subset we actually use. The code only activates on MySQL 8. https://github.com/ocproducts/composr/commit/88240b081dcc5302ea12e18ef5692b81e03395cf All unit tests pass. However, really we should rename our fields. See the first failed commit to see where and what needs renaming, although there'll be more field name references than covered in this commit. | ||||
Tags | No tags attached. | ||||
Time estimation (hours) | 5 | ||||
Sponsorship open | |||||
Date Modified | Username | Field | Change |
---|---|---|---|
2019-02-25 21:40 | Chris Graham | New Issue | |
2019-06-23 18:04 | Chris Graham | Assigned To | => Chris Graham |
2019-06-23 18:04 | Chris Graham | Status | non-assigned => resolved |
2019-06-23 18:04 | Chris Graham | Resolution | open => fixed |