Bug 1048293
Summary: | RFE/TECH DEBT: support mysql 5.6 or mariadb 10.x database for Zanata | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Retired] Zanata | Reporter: | Dmitry <dmitry.trunikov> | ||||||||
Component: | DatabaseChange | Assignee: | Sean Flanigan <sflaniga> | ||||||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Zanata-QA Mailling List <zanata-qa> | ||||||||
Severity: | high | Docs Contact: | |||||||||
Priority: | medium | ||||||||||
Version: | 3.0 | CC: | aeng, camunoz, dchen, djansen, pahuang, sflaniga, yshao, zanata-bugs | ||||||||
Target Milestone: | --- | Keywords: | Reopened | ||||||||
Target Release: | 3.7 | ||||||||||
Hardware: | x86_64 | ||||||||||
OS: | Linux | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||||
Doc Text: | Story Points: | 1 | |||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | 2015-07-22 02:19:55 UTC | Type: | --- | ||||||||
Regression: | --- | Mount Type: | --- | ||||||||
Documentation: | --- | CRM: | |||||||||
Verified Versions: | Category: | --- | |||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||
Embargoed: | |||||||||||
Attachments: |
|
Description
Dmitry
2014-01-03 15:57:39 UTC
Created attachment 845002 [details]
server log
You mean MySQL, not PostgreSQL, right? Unfortunately, Zanata doesn't yet support MySQL 5.6, let alone PostgreSQL. It seems that changing a column to be autoincrement violates foreign key constraints starting with MySQL 5.6, so we'll need to modify changeset db/changelogs/db.changelog-1.5.xml::8::aeng to drop the constraint and recreate it. There could be quite a few other changes required too. By the way, Dmitry, it looks like your databases are using latin1 for 'Db characterset'. All of our testing is with UTF-8 databases, so you may have trouble storing non-ASCII text in Zanata (even non-ASCII Latin-1 text). I think this shows what we need to do in that changeset: http://stackoverflow.com/a/13606801/14379 (In reply to Sean Flanigan from comment #2) > You mean MySQL, not PostgreSQL, right? Yes, you are right. I meant MySql. > By the way, Dmitry, it looks like your databases are using latin1 for 'Db > characterset'. All of our testing is with UTF-8 databases, so you may have > trouble storing non-ASCII text in Zanata (even non-ASCII Latin-1 text). I thought that option "characterEncoding=UTF-8" in the JDBC connection string should negotiate correct sort order. BTW in the documentation at https://github.com/zanata/zanata-server/wiki/Database-Setup#Setup_for_Zanata I found this statement to create database: CREATE DATABASE zanata /*!40100 DEFAULT CHARACTER SET utf8 */; which I used to. If it so important it should be replaced on more precise version: CREATE DATABASE zanata CHARACTER SET utf8 COLLATE utf8_general_ci; Fedora 21 isn't far away, and it doesn't include mysql 5.5, only mysql 5.6 and mariadb 10.0. We need to do something about this. http://fedoraproject.org/wiki/Releases/21/Schedule Zanata 3.6 seems to work with MariaDB 10.0 on some of our Fedora 21 dev boxes, although we haven't given it a great deal of testing: our main test/prod servers still use RHEL 6 with MySQL 5.1. MariaDB 10 seems to be more compatible with MySQL 5.5 than MySQL 5.6 is, at least for Zanata's purposes. Zanata should be working with MySQL 5.1 up to 5.5, or MariaDB 5.1 or later (at least up to 10.0). On Fedora 21+, please install the package 'mariadb-server', not 'community-mysql-server'. I think you need 'mariadb-server' on Ubuntu as well. We are not currently planning any development work to target MySQL 5.6 or later. Carlos, Patrick, one thing though: our functional tests use com.jcabi:jcabi-mysql-maven-plugin, which may be able to work with mariadb, but doesn't make it as easy to install. Right now these tests use mysql 5.5, but at some point we may need to convince jcabi-mysql-maven-plugin to install mariadb. Reopening. According to dchen, this has been happening on MariaDB too. So it looks like Zanata won't run on Fedora 21+ either with MySQL or MariaDB. A similar problem was reported here: https://groups.google.com/a/openmrs.org/d/msg/dev/lX5Bo__O9eM/1A46a5NJvEwJ and fixed here: https://github.com/openmrs/openmrs-core/pull/622/files (Compare liquibase changeset 1-fix:sunbiz with 3-increase-privilege-col-size-person_attribute_type:dkayiw. We basically have to drop the constraint, change the column and create the constraint again.) Created attachment 1008135 [details]
server.log
Run /usr/share/wildfly/bin/standalone.sh
failed with
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Can't DROP 'sourceRef'; check that column/key exists
Full server.log is attached
=======
rpm -q wildfly
wildfly-8.1.0-3.fc21.noarch
rpm -qa mariadb\*
mariadb-10.0.15-4.fc21.x86_64
mariadb-config-10.0.15-4.fc21.x86_64
mariadb-common-10.0.15-4.fc21.x86_64
mariadb-libs-10.0.15-4.fc21.x86_64
mariadb-errmsg-10.0.15-4.fc21.x86_64
mariadb-server-10.0.15-4.fc21.x86_64
Created attachment 1008147 [details]
server..log after rebuild db
Rebuild db with following command
echo 'drop database if exists zanata; create database zanata /*!40100 DEFAULT CHARACTER SET utf8 */;' | mysql -u root
Then run
/usr/share/wildfly/bin/standalone.sh
Full server.log is attached.
Pull request: https://github.com/zanata/zanata-server/pull/756 |