View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000967 | SymmetricDS | Bug | public | 2013-01-02 10:42 | 2014-02-03 01:53 |
Reporter | seroteev | Assigned To | chenson | ||
Priority | normal | ||||
Status | closed | Resolution | fixed | ||
Product Version | 3.2.0 | ||||
Target Version | 3.3.0 | Fixed in Version | 3.3.0 | ||
Summary | 0000967: Unknown table "INFORMATION_SCHEMA.SESSION_STATUS" error for MySQL 5.0.XX | ||||
Description | An exception was thrown when I tried to create the sym tables, because INFORMATION_SCHEMA.SESSION_STATUS does not exist in my version of MYSQL. I tried to locate the problem and I think it has something to do with the "IF" statement in in org.jumpmind.symmetric.db.mysql.MySqlSymmetricDialect.createRequiredDatabaseObjects(MySqlSymmetricDialect.java:88) There is a check for the version of mysql. For version between 5.0 and 5.1.23 the first part of the statement is executed. For versions above 5.1.23 -> the "else" part of the statement is executed. The problem is that the "sql" string is the same for both cases, but it should differ. I am not sure how exactly to fix this, but I hope that you will help me with this issue. Best Regards, Stefan | ||||
Steps To Reproduce | Run the following command: ../bin/symadmin --engine myserver-000 create-sym-tables 2>&1 | less | ||||
Additional Information | [myserver-000] - MySqlSymmetricDialect - Done with auto update of SymmetricDS tables Exception in thread "symmetric-startup" org.jumpmind.db.sql.SqlException: Unknown table 'SESSION_STATUS' in information_schema at org.jumpmind.db.sql.AbstractSqlTemplate.translate(AbstractSqlTemplate.java:260) at org.jumpmind.db.sql.AbstractSqlTemplate.translate(AbstractSqlTemplate.java:251) at org.jumpmind.db.sql.JdbcSqlTemplate.execute(JdbcSqlTemplate.java:391) at org.jumpmind.db.sql.JdbcSqlTemplate.update(JdbcSqlTemplate.java:261) at org.jumpmind.db.sql.AbstractSqlTemplate.update(AbstractSqlTemplate.java:184) at org.jumpmind.symmetric.db.AbstractSymmetricDialect.install(AbstractSymmetricDialect.java:161) at org.jumpmind.symmetric.db.mysql.MySqlSymmetricDialect.createRequiredDatabaseObjects(MySqlSymmetricDialect.java:88) at org.jumpmind.symmetric.db.AbstractSymmetricDialect.initTablesAndDatabaseObjects(AbstractSymmetricDialect.java:144) at org.jumpmind.symmetric.AbstractSymmetricEngine.setupDatabase(AbstractSymmetricEngine.java:360) at org.jumpmind.symmetric.AbstractSymmetricEngine.setup(AbstractSymmetricEngine.java:352) at org.jumpmind.symmetric.AbstractSymmetricEngine.start(AbstractSymmetricEngine.java:486) at org.jumpmind.symmetric.AbstractSymmetricEngine.start(AbstractSymmetricEngine.java:482) at org.jumpmind.symmetric.web.SymmetricEngineHolder$EngineStarter.run(SymmetricEngineHolder.java:320) Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown table 'SESSION_STATUS' in information_schema at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) at com.mysql.jdbc.Util.getInstance(Util.java:386) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3597) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3529) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1990) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2151) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2625) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2119) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2415) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2333) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2318) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) at org.jumpmind.db.sql.JdbcSqlTemplate$5.execute(JdbcSqlTemplate.java:283) at org.jumpmind.db.sql.JdbcSqlTemplate$5.execute(JdbcSqlTemplate.java:261) at org.jumpmind.db.sql.JdbcSqlTemplate.execute(JdbcSqlTemplate.java:389) ... 10 more | ||||
Tags | No tags attached. | ||||
|
I think that the 'sql' variable in the first part of the if statement should be changed to the following, but I am not sure how to rebuild the project from source code: String sql = "create function $(functionName)() " + " returns varchar(50) NOT DETERMINISTIC READS SQL DATA " + " begin " + " declare comm_name varchar(50); " + " declare comm_value varchar(50); " + " declare comm_cur cursor for show status like 'Com_commit'; " + " if @@autocommit = 0 then " + " open comm_cur; " + " fetch comm_cur into comm_name, comm_value; " + " close comm_cur; " + " return concat(concat(connection_id(), '.'), comm_value); " + " else " + " return null; " + " end if; " + " end "; |
Date Modified | Username | Field | Change |
---|---|---|---|
2013-01-02 10:42 | seroteev | New Issue | |
2013-01-02 13:21 | seroteev | Note Added: 0000179 | |
2013-01-02 13:23 | seroteev | Note Edited: 0000179 | View Revisions |
2013-01-31 13:55 | chenson | Fixed in Version | => 3.3.0.pre.1 |
2013-01-31 13:55 | chenson | Target Version | => 3.3.0.pre.1 |
2013-01-31 13:55 | chenson | Status | new => closed |
2013-01-31 13:55 | chenson | Assigned To | => chenson |
2013-01-31 13:55 | chenson | Resolution | open => fixed |
2013-02-04 20:48 | chenson | Fixed in Version | 3.3.0.pre.1 => 3.3.0 |
2014-02-03 01:53 | Changeset attached | => SymmetricDS trunk r6800 | |
2015-07-31 01:49 | chenson | Changeset attached | => SymmetricDS master 49227036 |