MariaDB fails to upgrade - unable to CAST as JSON
Bug #1752688 reported by
Robert Lyon
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
High
|
Robert Lyon | ||
17.10 |
Fix Released
|
High
|
Unassigned | ||
18.04 |
Fix Released
|
High
|
Robert Lyon |
Bug Description
There is a problem in htdocs/
if (is_mysql() && version_
The problem is Mahara recognises both MySQL and MariaDB as being is_mysql() and their numbering systems are different (where MariaDB is around 10.* while MySQL is around 5.*)
While both are mostly compatible with each other there are some slight differences and in this case CAST as JSON is not yet available in MariaDB.
In this case we need to check which type of is_mysql() we have and if it is not 'MySQL' then we need to return the if statement as false rather than true.
Changed in mahara: | |
assignee: | nobody → Robert Lyon (robertl-9) |
To post a comment you must log in.
Hmm, of course there will be no easy way to work out which flavour of mysql we have:
https:/ /stackoverflow. com/questions/ 43611296/ how-can- i-detect- whether- connected- database- is-mariadb- or-mysql
With the best idea being to look at variable version_comment
https:/ /stackoverflow. com/questions/ 37317869/ determine- if-mysql- or-percona- or-mariadb