~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/include/mix2.inc

  • Committer: Brian Aker
  • Date: 2009-11-18 22:58:22 UTC
  • mto: (1223.1.1 push) (1226.1.2 push)
  • mto: This revision was merged to the branch mainline in revision 1224.
  • Revision ID: brian@gaz-20091118225822-4ryr9rviir23o0kr
Second pass through bugs related to CREATE TABLE LIKE

Show diffs side-by-side

added added

removed removed

Lines of Context:
111
111
explain select level,id,parent_id from t1 where level=1;
112
112
select level,id from t1 where level=1;
113
113
select level,id,parent_id from t1 where level=1;
114
 
eval alter table t1 engine=$engine_type;
 
114
optimize table t1;
115
115
--replace_column 7 #
116
 
#show keys from t1;
 
116
show keys from t1;
117
117
drop table t1;
118
118
 
119
119
#
138
138
 
139
139
eval create $temp table t1 (a int) engine=$engine_type;
140
140
insert into t1 values (1), (2);
141
 
eval alter table t1 ENGINE=$engine_type;
 
141
optimize table t1;
142
142
delete from t1 where a = 1;
143
143
select * from t1;
144
144
check table t1;
152
152
insert into t1 values (3,""), (4,"testing");
153
153
analyze table t1;
154
154
--replace_column 7 #
155
 
#show keys from t1;
 
155
show keys from t1;
156
156
drop table t1;
157
157
 
158
158
 
339
339
eval create $temp table t1 (a int not null, b int not null,c int not null,
340
340
key(a),primary key(a,b), unique(c),key(a),unique(b)) ENGINE = $engine_type;
341
341
--replace_column 7 #
342
 
#show index from t1;
 
342
show index from t1;
343
343
drop table t1;
344
344
 
345
345
#
352
352
select * from t1;
353
353
update t1 set col2='7' where col1='4';
354
354
select * from t1;
355
 
alter table t1 add co3 int DEFAULT 42 not null;
 
355
alter table t1 add co3 int not null;
356
356
select * from t1;
357
357
update t1 set col2='9' where col1='2';
358
358
select * from t1;
516
516
eval create $temp table t1 (a varchar(100) not null, primary key(a), b int not null) engine=$engine_type;
517
517
insert into t1 values("hello",1),("world",2);
518
518
select * from t1 order by b desc;
519
 
eval alter table t1 ENGINE=$engine_type;
 
519
optimize table t1;
520
520
--replace_column 7 #
521
 
#show keys from t1;
 
521
show keys from t1;
522
522
drop table t1;
523
523
 
524
524
#
687
687
#
688
688
 
689
689
eval create $temp table t1 (t int not null default 1, key (t)) engine=$engine_type;
690
 
#desc t1;
 
690
desc t1;
691
691
drop table t1;
692
692
 
693
693
#
991
991
insert t4 select * from t1;
992
992
insert t5 select * from t1;
993
993
insert t6 select * from t1;
 
994
checksum table t1, t2, t3, t4, t5, t6, t7 quick;
 
995
checksum table t1, t2, t3, t4, t5, t6, t7;
 
996
checksum table t1, t2, t3, t4, t5, t6, t7 extended;
994
997
# #show table status;
995
998
drop table t1,t2,t3, t4, t5, t6;
996
999
 
1562
1565
}
1563
1566
# End of FOREIGN tests
1564
1567
 
 
1568
if ($test_transactions)
 
1569
{
 
1570
#
 
1571
# Test that checksum table uses a consistent read Bug #12669
 
1572
#
 
1573
connect (a,localhost,root,,);
 
1574
connect (b,localhost,root,,);
 
1575
connection a;
 
1576
eval create $temp table t1(a int not null) engine=$engine_type DEFAULT CHARSET=latin1;
 
1577
insert into t1 values (1),(2);
 
1578
set autocommit=0;
 
1579
checksum table t1;
 
1580
connection b;
 
1581
insert into t1 values(3);
 
1582
connection a;
 
1583
#
 
1584
# Here checksum should not see insert
 
1585
#
 
1586
checksum table t1;
 
1587
connection a;
 
1588
commit;
 
1589
checksum table t1;
 
1590
commit;
 
1591
drop table t1;
 
1592
#
 
1593
# autocommit = 1
 
1594
#
 
1595
connection a;
 
1596
eval create $temp table t1(a int not null) engine=$engine_type DEFAULT CHARSET=latin1;
 
1597
insert into t1 values (1),(2);
 
1598
set autocommit=1;
 
1599
checksum table t1;
 
1600
connection b;
 
1601
set autocommit=1;
 
1602
insert into t1 values(3);
 
1603
connection a;
 
1604
#
 
1605
# Here checksum sees insert
 
1606
#
 
1607
checksum table t1;
 
1608
drop table t1;
 
1609
 
 
1610
connection default;
 
1611
disconnect a;
 
1612
disconnect b;
 
1613
}
 
1614
 
1565
1615
# tests for bugs #9802 and #13778
1566
1616
 
1567
1617
if ($test_foreign_keys)
2162
2212
eval create $temp table t1 ( a int ) ENGINE=$engine_type;
2163
2213
BEGIN;
2164
2214
INSERT INTO t1 VALUES (1);
2165
 
eval ALTER TABLE t1 ENGINE=$engine_type;
 
2215
OPTIMIZE TABLE t1;
2166
2216
DROP TABLE t1;
2167
2217
 
2168
2218
#######################################################################