1 Reply Latest reply on Oct 19, 2009 2:18 PM by Sebastian Schneider

    Duplicate KEYs/Indexes on JBPM tables

    jim Newbie

      JBPM 3.2.6 SP 1
      MYSQL 5.0.51a-log

      Most of the tables have duplicate keys, this is just one example

      CREATE TABLE `jbpm_token` (
      `ID_` BIGINT(20) NOT NULL AUTO_INCREMENT,
      `VERSION_` INT(11) NOT NULL,
      `NAME_` VARCHAR(255) DEFAULT NULL,
      `START_` DATETIME DEFAULT NULL,
      `END_` DATETIME DEFAULT NULL,
      `NODEENTER_` DATETIME DEFAULT NULL,
      `NEXTLOGINDEX_` INT(11) DEFAULT NULL,
      `ISABLETOREACTIVATEPARENT_` BIT(1) DEFAULT NULL,
      `ISTERMINATIONIMPLICIT_` BIT(1) DEFAULT NULL,
      `ISSUSPENDED_` BIT(1) DEFAULT NULL,
      `LOCK_` VARCHAR(255) DEFAULT NULL,
      `NODE_` BIGINT(20) DEFAULT NULL,
      `PROCESSINSTANCE_` BIGINT(20) DEFAULT NULL,
      `PARENT_` BIGINT(20) DEFAULT NULL,
      `SUBPROCESSINSTANCE_` BIGINT(20) DEFAULT NULL,
      PRIMARY KEY (`ID_`),
      KEY `IDX_TOKEN_PARENT` (`PARENT_`),
      KEY `IDX_TOKEN_PROCIN` (`PROCESSINSTANCE_`),
      KEY `IDX_TOKEN_NODE` (`NODE_`),
      KEY `IDX_TOKEN_SUBPI` (`SUBPROCESSINSTANCE_`),
      KEY `FK_TOKEN_SUBPI` (`SUBPROCESSINSTANCE_`),
      KEY `FK_TOKEN_PROCINST` (`PROCESSINSTANCE_`),
      KEY `FK_TOKEN_NODE` (`NODE_`),
      KEY `FK_TOKEN_PARENT` (`PARENT_`),
      CONSTRAINT `FK_TOKEN_NODE` FOREIGN KEY (`NODE_`) REFERENCES `jbpm_node` (`ID_`),
      CONSTRAINT `FK_TOKEN_PARENT` FOREIGN KEY (`PARENT_`) REFERENCES `jbpm_token` (`ID_`),
      CONSTRAINT `FK_TOKEN_PROCINST` FOREIGN KEY (`PROCESSINSTANCE_`) REFERENCES `jbpm_processinstance` (`ID_`),
      CONSTRAINT `FK_TOKEN_SUBPI` FOREIGN KEY (`SUBPROCESSINSTANCE_`) REFERENCES `jbpm_processinstance` (`ID_`)
      ) ENGINE=INNODB DEFAULT CHARSET=latin1

      Note these Keys:

      KEY `IDX_TOKEN_PARENT` (`PARENT_`),
      KEY `FK_TOKEN_PARENT` (`PARENT_`),

      This is just one example, there are duplicate keys on almost all the tables.
      This table was created using the script that came with 3.2.6 SP1.

      Is there a reason for these duplicate keys??
      Or is this a bug in the DB create script?