Fix error and unit test. Looks like a bad error.
Some uncertainty re this diagnosis: the error message is caused by asking the planner to plan an UPDATE of a replicated table in a single partition procedure.
2012-07-23 09:56:45,472 INFO [main] COMPILER: [procedures.modules.assets.admin_getAll]: Compiling Statement: SELECT * FROM assets WHERE deleted=0;
2012-07-23 09:56:45,484 INFO [main] COMPILER: [procedures.modules.assets.admin_search]: Compiling Statement: SELECT * FROM assets WHERE deleted=0 AND name LIKE ? LIMIT 25;
2012-07-23 09:56:45,509 INFO [main] COMPILER: [admin_upsert.class]: Compiling Statement: UPDATE assets SET type = ?, name = ?, url = ?, deleted = ? WHERE assetID = ?;
2012-07-23 09:56:45,510 ERROR [main] COMPILER: [admin_upsert.class]: Failed to plan for stmt: updateStmt
2012-07-23 09:56:45,511 ERROR [main] COMPILER: Failed to compile XML
2012-07-23 09:56:45,511 ERROR [main] COMPILER: Catalog compilation failed.
The above was placed into a procedure as you can see.
The table defined in my ddl.sql as:
CREATE TABLE assets (
assetID BIGINT UNIQUE NOT NULL,
type TINYINT NOT NULL,
name VARCHAR(100) NOT NULL,
url VARCHAR(225) NOT NULL,
deleted TINYINT DEFAULT '0' NOT NULL,
CONSTRAINT IDX_assets_PK PRIMARY KEY (assetID)
Adding the following to my project.xml solved the issue:
[partition table='assets' column='assetID' /]
(This forum is making my < and > brackets hide the content, I had to change them to square brackets)