Re: MERGE Table Problem
Sergey,
The table structures as well as the server version are in the first message, and replicated here for completeness:
I'll be happy to send data samples (the size is 10mb) now. By removing the PRIMARY key for the raw tables and removing the compound key on the merge table definition, everything worked fine.
If you want data samples, I'd be happy to upload them (to bugs.mysql.com???) They are approx 10MB now to get a complete data dump of the database (I've only been recording since the last week of March).
Let me know if you need more.
-- --------------------------------------------------------
-- Host: localhost
-- Generation Time: Apr 05, 2005 at 08:17 PM
-- Server version: 4.1.10
-- PHP Version: 4.3.10
--
-- Database: `server_stats`
--
-- Table structure for table `2005_03_minutes`
--
CREATE TABLE `2005_03_minutes` (
`what` varchar(30) NOT NULL default '',
`value` double NOT NULL default '0',
`type` enum('sum','avg') NOT NULL default 'sum',
`modified` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`what`,`modified`),
KEY `what` (`what`),
KEY `modified` (`modified`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `2005_04_minutes`
--
CREATE TABLE `2005_04_minutes` (
`what` varchar(30) NOT NULL default '',
`value` double NOT NULL default '0',
`type` enum('sum','avg') NOT NULL default 'sum',
`modified` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`what`,`modified`),
KEY `what` (`what`),
KEY `modified` (`modified`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `minutes`
--
CREATE TABLE `minutes` (
`what` varchar(30) NOT NULL default '',
`value` double NOT NULL default '0',
`type` enum('sum','avg') NOT NULL default 'sum',
`modified` datetime NOT NULL default '0000-00-00 00:00:00',
KEY `what` (`what`,`modified`),
KEY `what_2` (`what`),
KEY `modified` (`modified`)
) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`2005_03_minutes`,`2005_04_minutes`);