MySQL Forums
Forum List  »  Merge Storage Engine

Insert into merge table fails
Posted by: Bharat Satyanarayan
Date: July 23, 2006 08:51AM

hi,
i have created merge tables and insert into merge table fails. its giving me duplicate key entry.

i am pretty sure i am missing some thing very simple here.

thanks
bharat.

Mysql Version : 4.0.18
OS:Windows Xp

create table structure

/*
merge table structure
*/

CREATE TABLE `logxxx` (

`id` int(11) unsigned NOT NULL auto_increment,

`aid` int(11) unsigned NOT NULL default '0',

`bid` int(11) unsigned default NULL,

`c` text,

`d` varchar(50) default NULL,

`f` varchar(255) default NULL,

`g` varchar(255) default NULL,

`h` int(2) default '0',

`i` int(11) unsigned default NULL,

`j` enum('w','t') NOT NULL default 'w',

`k` timestamp(14) NOT NULL,

`l` int(11) NOT NULL default '0',

`m` enum('no','yes') NOT NULL default 'no',

`n` date NOT NULL default '0000-00-00',

`o` time NOT NULL default '00:00:00',

KEY `id` (`id`),

KEY `aid` (`aid`),

KEY `k` (`k`)

) TYPE=MRG_MyISAM INSERT_METHOD=FIRST union=(logyyy,logzzz,logqqq);


/*
myisam structure
*/


CREATE TABLE `logyyy` (

`id` int(11) unsigned NOT NULL auto_increment,

`aid` int(11) unsigned NOT NULL default '0',

`bid` int(11) unsigned default NULL,

`c` text,

`d` varchar(50) default NULL,

`f` varchar(255) default NULL,

`g` varchar(255) default NULL,

`h` int(2) default '0',

`i` int(11) unsigned default NULL,

`j` enum('w','t') NOT NULL default 'w',

`k` timestamp(14) NOT NULL,

`l` int(11) NOT NULL default '0',

`m` enum('no','yes') NOT NULL default 'no',

`n` date NOT NULL default '0000-00-00',

`o` time NOT NULL default '00:00:00',

PRIMARY KEY (`id`),

KEY `aid` (`aid`),

KEY `k` (`k`)

) TYPE=MyISAM MAX_ROWS=4294967295 AVG_ROW_LENGTH=122

Options: ReplyQuote


Subject
Views
Written By
Posted
Insert into merge table fails
9311
July 23, 2006 08:51AM
4826
July 23, 2006 08:09PM
4470
July 25, 2006 07:08PM


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.