MySQL Forums
Forum List  »  InnoDB

Re: Lock timeout
Posted by: David Wynter
Date: July 07, 2005 06:09AM

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

Options: ReplyQuote


Subject
Views
Written By
Posted
4263
June 30, 2005 02:43PM
2254
July 06, 2005 03:56PM
2585
July 06, 2005 04:54PM
2550
July 07, 2005 01:34AM
Re: Lock timeout
2287
July 07, 2005 06:09AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.