1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-22 06:39:43 +02:00

Support MySQL 8.x series

Two issues resolved relating to MySQL 8:

1. DB version checking skips MINOR/PATCH checks if MAJOR release changed.
2. Keyword 'admin' quoted to ensure MySQL compat.

Closes #152
This commit is contained in:
sauls8t 2018-05-10 15:14:50 +01:00
parent 0f87d5b07e
commit 2066f72258
7 changed files with 700 additions and 673 deletions

View file

@ -77,6 +77,10 @@ func Check(runtime *env.Runtime) bool {
}
for k, v := range verInts {
// If major release is higher then skip minor/patch checks (e.g. 8.x.x > 5.x.x)
if k == 0 && len(verNums) > 0 && verNums[0] > verInts[0] {
break
}
if verNums[k] < v {
want := fmt.Sprintf("%d.%d.%d", verInts[0], verInts[1], verInts[2])
runtime.Log.Error("MySQL version element "+strconv.Itoa(k+1)+" of '"+version+"' not high enough, need at least version "+want, errors.New("bad MySQL version"))