mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into deer.(none):/home/hf/work/mysql-4.1.3188
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
drop table if exists t1,t2,t3,t4,T1;
|
||||
drop table if exists t1,t2,t3,t4;
|
||||
create table T1 (id int primary key, Word varchar(40) not null, Index(Word));
|
||||
create table t4 (id int primary key, Word varchar(40) not null);
|
||||
INSERT INTO T1 VALUES (1, 'a'), (2, 'b'), (3, 'c');
|
||||
@ -49,3 +49,12 @@ delete P1.*,p2.* from t1 as P1, t2 as P2 where P1.a=p2.a;
|
||||
update t1 as p1, t2 as p2 SET p1.a=1,P2.a=1 where p1.a=P2.a;
|
||||
update t1 as P1, t2 as P2 SET P1.a=1,p2.a=1 where P1.a=p2.a;
|
||||
drop table t1,t2;
|
||||
create table t1 (a int);
|
||||
create table t2 (a int);
|
||||
select * from t1 c, t2 C;
|
||||
ERROR 42000: Not unique table/alias: 'C'
|
||||
select C.a, c.a from t1 c, t2 C;
|
||||
ERROR 42000: Not unique table/alias: 'C'
|
||||
drop table t1, t2;
|
||||
show tables;
|
||||
Tables_in_test
|
||||
|
@ -9,6 +9,21 @@ repair table t1 use_frm;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair error The storage engine for the table doesn't support repair
|
||||
drop table t1;
|
||||
create table t1(id int PRIMARY KEY, st varchar(10), KEY st_key(st));
|
||||
insert into t1 values(1, "One");
|
||||
alter table t1 disable keys;
|
||||
show keys from t1;
|
||||
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
|
||||
t1 0 PRIMARY 1 id A 1 NULL NULL BTREE
|
||||
t1 1 st_key 1 st A NULL NULL NULL YES BTREE disabled
|
||||
repair table t1 extended;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair status OK
|
||||
show keys from t1;
|
||||
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
|
||||
t1 0 PRIMARY 1 id A 1 NULL NULL BTREE
|
||||
t1 1 st_key 1 st A NULL NULL NULL YES BTREE disabled
|
||||
drop table t1;
|
||||
repair table t1 use_frm;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair error Table 'test.t1' doesn't exist
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1,t2,t3,t4,T1;
|
||||
drop table if exists t1,t2,t3,t4;
|
||||
--enable_warnings
|
||||
|
||||
create table T1 (id int primary key, Word varchar(40) not null, Index(Word));
|
||||
@ -41,3 +41,16 @@ delete P1.*,p2.* from t1 as P1, t2 as P2 where P1.a=p2.a;
|
||||
update t1 as p1, t2 as p2 SET p1.a=1,P2.a=1 where p1.a=P2.a;
|
||||
update t1 as P1, t2 as P2 SET P1.a=1,p2.a=1 where P1.a=p2.a;
|
||||
drop table t1,t2;
|
||||
|
||||
#
|
||||
# aliases case insensitive
|
||||
#
|
||||
create table t1 (a int);
|
||||
create table t2 (a int);
|
||||
-- error 1066
|
||||
select * from t1 c, t2 C;
|
||||
-- error 1066
|
||||
select C.a, c.a from t1 c, t2 C;
|
||||
drop table t1, t2;
|
||||
|
||||
show tables;
|
||||
|
@ -12,6 +12,18 @@ alter table t1 ENGINE=HEAP;
|
||||
repair table t1 use_frm;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# disabled keys during repair
|
||||
#
|
||||
create table t1(id int PRIMARY KEY, st varchar(10), KEY st_key(st));
|
||||
insert into t1 values(1, "One");
|
||||
alter table t1 disable keys;
|
||||
show keys from t1;
|
||||
repair table t1 extended;
|
||||
show keys from t1;
|
||||
drop table t1;
|
||||
|
||||
|
||||
# non-existent table
|
||||
repair table t1 use_frm;
|
||||
|
||||
|
Reference in New Issue
Block a user