mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 18:20:07 +01:00
Merge mysql.com:/home/svoj/devel/mysql/merge/mysql-4.1-engines
into mysql.com:/home/svoj/devel/mysql/merge/mysql-5.0-engines
This commit is contained in:
commit
bfb6ff6bdd
3 changed files with 28 additions and 2 deletions
|
@ -89,7 +89,10 @@ MYRG_INFO *myrg_open(const char *name, int mode, int handle_locking)
|
|||
else
|
||||
fn_format(buff, buff, "", "", 0);
|
||||
if (!(isam=mi_open(buff,mode,(handle_locking?HA_OPEN_WAIT_IF_LOCKED:0))))
|
||||
{
|
||||
my_errno= HA_ERR_WRONG_MRG_TABLE_DEF;
|
||||
goto err;
|
||||
}
|
||||
if (!m_info) /* First file */
|
||||
{
|
||||
key_parts=isam->s->base.key_parts;
|
||||
|
|
|
@ -178,9 +178,9 @@ t3 CREATE TABLE `t3` (
|
|||
) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=(`t1`,`t2`)
|
||||
create table t4 (a int not null, b char(10), key(a)) engine=MERGE UNION=(t1,t2);
|
||||
select * from t4;
|
||||
ERROR HY000: All tables in the MERGE table are not identically defined
|
||||
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exists
|
||||
alter table t4 add column c int;
|
||||
ERROR HY000: All tables in the MERGE table are not identically defined
|
||||
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exists
|
||||
create database mysqltest;
|
||||
create table mysqltest.t6 (a int not null primary key auto_increment, message char(20));
|
||||
create table t5 (a int not null, b char(20), key(a)) engine=MERGE UNION=(test.t1,mysqltest.t6);
|
||||
|
@ -785,4 +785,13 @@ insert into t1 values (1);
|
|||
ERROR HY000: Table 't1' is read only
|
||||
drop table t2;
|
||||
drop table t1;
|
||||
CREATE TABLE t1(a INT) ENGINE=MEMORY;
|
||||
CREATE TABLE t2(a INT) ENGINE=MERGE UNION=(t1);
|
||||
SELECT * FROM t2;
|
||||
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exists
|
||||
DROP TABLE t1, t2;
|
||||
CREATE TABLE t2(a INT) ENGINE=MERGE UNION=(t3);
|
||||
SELECT * FROM t2;
|
||||
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exists
|
||||
DROP TABLE t2;
|
||||
End of 5.0 tests
|
||||
|
|
|
@ -378,6 +378,20 @@ select * from t3;
|
|||
check table t1, t2;
|
||||
drop table t1, t2, t3;
|
||||
|
||||
#
|
||||
# BUG#10974 - No error message if merge table based on union of innodb,
|
||||
# memory
|
||||
#
|
||||
CREATE TABLE t1(a INT) ENGINE=MEMORY;
|
||||
CREATE TABLE t2(a INT) ENGINE=MERGE UNION=(t1);
|
||||
--error 1168
|
||||
SELECT * FROM t2;
|
||||
DROP TABLE t1, t2;
|
||||
CREATE TABLE t2(a INT) ENGINE=MERGE UNION=(t3);
|
||||
--error 1168
|
||||
SELECT * FROM t2;
|
||||
DROP TABLE t2;
|
||||
|
||||
# End of 4.1 tests
|
||||
|
||||
#
|
||||
|
|
Loading…
Add table
Reference in a new issue