Skip to content

Use portable JSON SQL so the server runs on MariaDB as well as MySQL - #16

Open
hal-niner wants to merge 1 commit into
scripting:mainfrom
hal-niner:mariadb-portability
Open

Use portable JSON SQL so the server runs on MariaDB as well as MySQL#16
hal-niner wants to merge 1 commit into
scripting:mainfrom
hal-niner:mariadb-portability

Conversation

@hal-niner

Copy link
Copy Markdown

The item, user, and feed queries extract prefs fields with the ->> operator, which MySQL supports but MariaDB does not -- on MariaDB every one of those queries fails with ER_PARSE_ERROR, so timelines and feeds come up empty. json_unquote(json_extract(col, '$.path')) is the exact equivalent, standard in both engines; MySQL's own docs define ->> as shorthand for it. All ten uses rewritten; no behavior change on MySQL. Running in production on a MariaDB instance (perstitio.us) since 7/18.

The item, user, and feed queries extract prefs fields with the ->> operator,
which MySQL supports but MariaDB does not -- on MariaDB every one of those
queries fails with ER_PARSE_ERROR, so timelines and feeds come up empty.
json_unquote(json_extract(col, '$.path')) is the exact equivalent, standard
in both engines; MySQL's own docs define ->> as shorthand for it. All ten
uses rewritten; no behavior change on MySQL. Running in production on a
MariaDB instance (perstitio.us) since 7/18.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant