Re: MERGE table index fails to contain all records
ingo, yes, the base tables have "primary key" while the merge has "key". it's a huge difference... in fact new versions of mysql perform this check and refuse to open the merge table if it found a difference:
mysql> select * from testm;
ERROR 1168 (HY000): Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
So, this works 100%
----------------
flush tables;
drop table if exists test1;
drop table if exists test2;
drop table if exists testm;
create table test1 (id integer primary key);
create table test2 (id integer primary key);
create table testm (id integer, primary key(id)) engine=merge union=(test1,test2);
insert into test1 values (1),(2),(3);
insert into test2 values (4),(5),(6);
select * from testm;
select * from testm where id=2;
select * from testm where id<5;
Subject
Views
Written By
Posted
10147
October 04, 2006 12:29PM
5748
October 04, 2006 12:38PM
5609
October 04, 2006 12:48PM
5478
October 11, 2006 10:48AM
5522
November 20, 2006 11:56AM
Re: MERGE table index fails to contain all records
5474
February 17, 2007 11:12AM
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.