Trying to import schema file included in the distribution package fails on db1.xmpp-… machines:
tigase@node1:~/tigase-server72$ java -cp "jars/*" tigase.util.DBSchemaLoader -dbHostname ${HOSTNAME} -dbType ${DB_TYPE} -rootUser ${ROOT_USER} -dbPass ${DB_USER_PASS} -dbName ${DB_NAME} -schemaVersion ${DB_VERSION} -rootPass ${ROOT_USER_PASS} -dbUser ${DB_USER} -logLevel ALL -file database/${DB_TYPE}-muc-schema-2.5.0.sql
LogLevel: ALL
tigase.util.DBSchemaLoader <init> CONFIG Properties: [{dbHostname=xxxxx, logLevel=ALL, dbType=mysql, file=database/mysql-muc-schema-2.5.0.sql, rootUser=xxxxx, dbPass=xxxx, dbName=xxxx, schemaVersion=7-1, rootPass=xxxx, dbUser=xxxx}]
tigase.util.DBSchemaLoader validateDBConnection INFO Validating DBConnection, URI: jdbc:mysql://xxxx
tigase.util.DBSchemaLoader validateDBConnection CONFIG DriverManager (available drivers): [[com.mysql.jdbc.Driver@4a574795, com.mysql.fabric.jdbc.FabricMySQLDriver@3f99bd52, org.apache.derby.jdbc.AutoloadedDriver@6e8cf4c6, jTDS 1.3.1, org.postgresql.Driver@37a71e93]]
tigase.util.DBSchemaLoader validateDBConnection INFO Connection OK
tigase.util.DBSchemaLoader validateDBExists INFO Validating whether DB Exists, URI: jdbc:mysql://xxxx
tigase.util.DBSchemaLoader validateDBExists INFO Exists OK
tigase.util.DBSchemaLoader loadSchemaFile INFO Loading schema from file: database/mysql-muc-schema-2.5.0.sql, URI: jdbc:mysql://xxxx
tigase.util.DBSchemaLoader loadSQLQueries FINER Loading queries, resource: database/mysql-muc-schema-2.5.0.sql, res_prefix: null
tigase.util.DBSchemaLoader getResource FINEST Getting resource: database/mysql-muc-schema-2.5.0.sql @ filename: /home/tigase/tigase-server-7.2.0-SNAPSHOT-b4649/database/mysql-muc-schema-2.5.0.sql
tigase.util.DBSchemaLoader loadSchemaFile FINEST Executing query: create table if not exists tig_muc_rooms ( room_id bigint not null auto_increment, jid varchar(2049) not null, jid_sha1 char(40) not null, name varchar(1024), config text, creator varchar(2049) not null, creation_date timestamp(6) not null, subject text, subject_creator_nick varchar(1024), subject_date timestamp(6) null default null, primary key ( room_id ), index using hash ( jid(255) ), unique index using hash ( jid_sha1(40) ) ) ENGINE=InnoDB default character set utf8 ROW_FORMAT=DYNAMIC
tigase.util.DBSchemaLoader loadSchemaFile SEVERE Failed to execute query: create table if not exists tig_muc_rooms ( room_id bigint not null auto_increment, jid varchar(2049) not null, jid_sha1 char(40) not null, name varchar(1024), config text, creator varchar(2049) not null, creation_date timestamp(6) not null, subject text, subject_creator_nick varchar(1024), subject_date timestamp(6) null default null, primary key ( room_id ), index using hash ( jid(255) ), unique index using hash ( jid_sha1(40) ) ) ENGINE=InnoDB default character set utf8 ROW_FORMAT=DYNAMIC
tigase.util.DBSchemaLoader loadSchemaFile WARNING Can't finalize: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(6) not null, subject text, subject_creator_nick varchar(1024), subject_date tim' at line 1
tigase.util.DBSchemaLoader printInfo WARNING Database schema is invalid
wojciech.kapcia@tigase.net commented 8 years ago
Importing exactly same schema file locally works without problem.
db1 mysql version (master-slave setup):
root@db1 ~/ # mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 37936
Server version: 5.5.29-0ubuntu0.12.04.1-log (Ubuntu)
I'm using MariaDB:
wojtek@atlantiscity.local ~/dev $ mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 4340
Server version: 10.1.21-MariaDB Homebrew
wojciech.kapcia@tigase.net commented 8 years ago
Tigase 7.2.0 and it's MUC requires newer MySQL version due to timestamp precision.
Trying to import schema file included in the distribution package fails on db1.xmpp-… machines: