Re: Lock timeout
Well easier said than done. The plain INSERT does not work
Here is another table with a ID auto increment column, it all of these I am having a problem with.
This will not parse, Error Nr. 1064
EXPLAIN INSERT INTO fi_cross_ref_data_identifiers (ASSET_ID, ID_CD, ID_NUMBER, ID_EFFECTIVE_DATE, PROCESSED, ENT_TIME, ACTIVE)
VALUES (21, 'CSP', 'DUMMY', '2005-07-01', 0, NOW(), 0)
I have tried it with the ID column included and a NULL set for that value
EXPLAIN INSERT INTO fi_cross_ref_data_identifiers (ID, ASSET_ID, ID_CD, ID_NUMBER, ID_EFFECTIVE_DATE, PROCESSED, ENT_TIME, ACTIVE)
VALUES (NULL, 21, 'CSP', 'DUMMY', '2005-07-01', 0, NOW(), 0)
Neither work. I checked the syntax against the manual and it is correct as far as I can see.
Here is the DDL
CREATE TABLE `fi_cross_ref_data_identifiers` (
`ID` int(10) unsigned NOT NULL auto_increment,
`ASSET_ID` bigint(20) NOT NULL default '0',
`ID_CD` char(3) NOT NULL default '',
`ID_NUMBER` varchar(30) NOT NULL default '',
`ID_EFFECTIVE_DATE` date NOT NULL default '0000-00-00',
`PROCESSED` int(11) default NULL,
`ENT_TIME` datetime NOT NULL default '0000-00-00 00:00:00',
`ACTIVE` tinyint(3) unsigned default NULL,
PRIMARY KEY (`ID`),
KEY `IX_ID_EFF_DATE` TYPE BTREE (`ASSET_ID`,`ID_CD`,`ID_EFFECTIVE_DATE`),
CONSTRAINT `FK_FI_CROSS_REF_DATA_IDS_BOND_CORE_INFO` FOREIGN KEY (`ASSET_ID`) REFERENCES `bond_core_information` (`ASSET_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
What gives? P.S. Remember Troy McClure from the Simpsons, this table is like Troy, 'you may remember me from such forum messages as 'Replacing a subset of records in a 8.5M row table, with performance'" ;)
David