Re: ant test fails

From: Gili (cowwo..bs.darktech.org)
Date: Mon Aug 29 2005 - 14:39:20 EDT

  • Next message: jira-norepl..bjectstyle.org: "[OS-JIRA] Created: (CAY-357) Ability to set optimistic locking on a per-query basis"

            I am using MySQL 4.1.12-nt and I only have InnoDB support installed (I
    think). Isn't it possible for this statement to work on InnoDB
    databases? I think they've become the default DB type as of MySQL 4.1

    Gili

    Andrus Adamchik wrote:
    > What version of MySQL are you using? I have 4.0.24 on Mac OS X and this
    > statement works just fine.
    >
    > I found an indication on google that it can be a problem with some
    > versions of MySQL (so the statement needs to contain "'type=myisam'").
    > Autoincrements are a new feature in Cayenne and hasn't been tested
    > across the board.
    >
    > I guess if you could open a bug report (http://objectstyle.org/
    > cayenne/bugs-features.html) with your MySQL version, so that I can try
    > to reproduce it. In your own checkout copy you can fix it by overriding
    > "createTable" in the MySQLAdapter to generate syntax like this:
    >
    > CREATE TABLE my_table (
    > ...
    > ) type=myisam;
    >
    >
    > Andrus
    >
    >
    >
    > On Aug 29, 2005, at 1:32 PM, Gili wrote:
    >
    >> INFO QueryLogger: CREATE TABLE GENERATED_COLUMN_COMP_KEY (AUTO_PK
    >> INT NOT NULL, GENERATED_COLUMN INT NOT NULL AUTO_INCREMENT, NAME
    >> VARCHAR(100) NULL, PROPAGATED_PK INT NOT NULL, PRIMARY KEY (AUTO_PK,
    >> GENERATED_COLUMN, PROPAGATED_PK))
    >> ERROR CayenneTestResources: Error generating schema...
    >> java.sql.SQLException: Incorrect table definition; there can be only
    >> one auto column and it must be defined as a key
    >> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2851)
    >> at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1531)
    >> at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1622)
    >> at com.mysql.jdbc.Connection.execSQL(Connection.java:2379)
    >> at com.mysql.jdbc.Connection.execSQL(Connection.java:2306)
    >> at com.mysql.jdbc.Statement.execute(Statement.java:911)
    >> at org.objectstyle.cayenne.unit.AbstractAccessStack.createSchema
    >> (AbstractAccessStack.java:299)
    >> at org.objectstyle.cayenne.unit.SimpleAccessStack.createSchema
    >> (SimpleAccessStack.java:149)
    >>
    >
    >

    -- 
    http://www.desktopbeautifier.com/
    



    This archive was generated by hypermail 2.0.0 : Mon Aug 29 2005 - 14:39:19 EDT