colinmollenhour / mariadb-galera-swarm

MariaDb Galera Cluster container based on official mariadb image which can auto-bootstrap and recover cluster state.
https://hub.docker.com/r/colinmollenhour/mariadb-galera-swarm
Apache License 2.0
217 stars 102 forks source link

upgrade to 10.2? #30

Closed jjfraney closed 6 years ago

jjfraney commented 6 years ago

Is there any reason to expect a bump in the FROM command to 10.2 would work?

colinmollenhour commented 6 years ago

I am not aware of any reason it would not work, but as it is a complex system I wouldn't be surprised if there was some minor issues. I have not tested yet, but if you try it let us know how it goes!

moolen commented 6 years ago

10.2 introduced backwards-incompatible changes:

Honestly, i think it's fine to upgrade (my setup works!); But most importantly we should just ship different image tags like this: colinmollenhour/mariadb-galera-swarm:10.1 and colinmollenhour/mariadb-galera-swarm:10.2. What do you think?

1071: Specified key was too long

Actually, the 10.2 upgrade fixes this issue: Specified key was too long; max key length is 767 bytes

As an example run this query in a mariadb:10.1 and a mariadb:10.2 container. The 10.1 fails with the above error.

CREATE DATABASE db;
USE db;
DROP TABLE IF EXISTS `tbl`;
CREATE TABLE `tbl` (
  `foo` varchar(512) COLLATE utf8_unicode_ci NOT NULL,
  `bar` varchar(512) COLLATE utf8_unicode_ci DEFAULT NULL,
  `baz` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`foo`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; 
colinmollenhour commented 6 years ago

Thanks for sharing your results! I think mysql_zap is not a great loss since Docker typically handles term/kill signals now. I've copied the Dockerfile and made the default file use 10.2 and the new file for 10.1. I setup Docker Hub auto-builds but I don't know if it is going to work yet.. Will see soon.

cpjolly commented 6 years ago

@colinmollenhour - In case it helps, I have a setup with multiple versions. Let me know if you would like me to make a pull request.

https://github.com/cpjolly/mariadb-galera-swarm

I have been using 10.2 for the last 6 months without issue.

colinmollenhour commented 6 years ago

Thanks, @cpjolly. In order to fix the 10.1 version I actually had to make additions to the Dockerfile so I think I'll stick with just having two Dockerfiles for now.