~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/innodb.result

  • Committer: Jay Pipes
  • Date: 2009-09-21 14:33:44 UTC
  • mfrom: (1126.10.26 dtrace-probes)
  • mto: This revision was merged to the branch mainline in revision 1133.
  • Revision ID: jpipes@serialcoder-20090921143344-jnarp7gcn6zmg19c
Merge fixes from Trond and Padraig on dtrace probes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
164
164
1       1005    101
165
165
1       1006    101
166
166
1       1007    101
167
 
alter table t1 ENGINE=innodb;
 
167
optimize table t1;
 
168
Table   Op      Msg_type        Msg_text
 
169
test.t1 optimize        status  OK
168
170
show keys from t1;
169
 
Table   Unique  Key_name        Seq_in_index    Column_name
170
 
t1      TRUE    PRIMARY 1       id
171
 
t1      FALSE   parent_id       1       parent_id
172
 
t1      FALSE   level   1       level
 
171
Table   Non_unique      Key_name        Seq_in_index    Column_name     Collation       Cardinality     Sub_part        Packed  Null    Index_type      Comment Index_Comment
 
172
t1      0       PRIMARY 1       id      A       #       NULL    NULL            BTREE           
 
173
t1      1       parent_id       1       parent_id       A       #       NULL    NULL            BTREE           
 
174
t1      1       level   1       level   A       #       NULL    NULL            BTREE           
173
175
drop table t1;
174
176
CREATE TABLE t1 (
175
177
gesuchnr int DEFAULT '0' NOT NULL,
186
188
drop table t1;
187
189
create table t1 (a int) engine=innodb;
188
190
insert into t1 values (1), (2);
189
 
alter table t1 engine=innodb;
 
191
optimize table t1;
 
192
Table   Op      Msg_type        Msg_text
 
193
test.t1 optimize        status  OK
190
194
delete from t1 where a = 1;
191
195
select * from t1;
192
196
a
207
211
Table   Op      Msg_type        Msg_text
208
212
test.t1 analyze status  OK
209
213
show keys from t1;
210
 
Table   Unique  Key_name        Seq_in_index    Column_name
211
 
t1      FALSE   skr     1       a
 
214
Table   Non_unique      Key_name        Seq_in_index    Column_name     Collation       Cardinality     Sub_part        Packed  Null    Index_type      Comment Index_Comment
 
215
t1      1       skr     1       a       A       #       NULL    NULL    YES     BTREE           
212
216
drop table t1;
213
217
create table t1 (a int,b varchar(20),key(a)) engine=innodb;
214
218
insert into t1 values (1,""), (2,"testing");
273
277
rollback to savepoint `my_savepoint`;
274
278
ERROR 42000: SAVEPOINT my_savepoint does not exist
275
279
rollback to savepoint savept2;
 
280
ERROR 42000: SAVEPOINT savept2 does not exist
276
281
insert into t1 values (8);
277
282
savepoint sv;
278
283
commit;
394
399
CREATE TABLE t1 (a int not null, b int not null,c int not null,
395
400
key(a),primary key(a,b), unique(c),key(a),unique(b));
396
401
show index from t1;
397
 
Table   Unique  Key_name        Seq_in_index    Column_name
398
 
t1      TRUE    PRIMARY 1       a
399
 
t1      TRUE    PRIMARY 2       b
400
 
t1      TRUE    c       1       c
401
 
t1      TRUE    b       1       b
402
 
t1      FALSE   a       1       a
403
 
t1      FALSE   a_2     1       a
 
402
Table   Non_unique      Key_name        Seq_in_index    Column_name     Collation       Cardinality     Sub_part        Packed  Null    Index_type      Comment Index_Comment
 
403
t1      0       PRIMARY 1       a       A       #       NULL    NULL            BTREE           
 
404
t1      0       PRIMARY 2       b       A       #       NULL    NULL            BTREE           
 
405
t1      0       c       1       c       A       #       NULL    NULL            BTREE           
 
406
t1      0       b       1       b       A       #       NULL    NULL            BTREE           
 
407
t1      1       a       1       a       A       #       NULL    NULL            BTREE           
 
408
t1      1       a_2     1       a       A       #       NULL    NULL            BTREE           
404
409
drop table t1;
405
410
create table t1 (col1 int not null, col2 char(4) not null, primary key(col1));
406
411
alter table t1 engine=innodb;
730
735
a       b
731
736
world   2
732
737
hello   1
733
 
alter table t1 engine=innodb;
 
738
optimize table t1;
 
739
Table   Op      Msg_type        Msg_text
 
740
test.t1 optimize        status  OK
734
741
show keys from t1;
735
 
Table   Unique  Key_name        Seq_in_index    Column_name
736
 
t1      TRUE    PRIMARY 1       a
 
742
Table   Non_unique      Key_name        Seq_in_index    Column_name     Collation       Cardinality     Sub_part        Packed  Null    Index_type      Comment Index_Comment
 
743
t1      0       PRIMARY 1       a       A       #       NULL    NULL            BTREE           
737
744
drop table t1;
738
745
create table t1 (i int, j int ) ENGINE=innodb;
739
746
insert into t1 values (1,2);
818
825
insert into mysqltest.t1 values(1);
819
826
create TEMPORARY table mysqltest.t2 (a int not null) engine= myisam;
820
827
insert into mysqltest.t2 values(1);
821
 
create temporary table mysqltest.t3 (a int not null) engine= MEMORY;
 
828
create temporary table mysqltest.t3 (a int not null) engine= heap;
822
829
insert into mysqltest.t3 values(1);
823
830
commit;
824
831
drop database mysqltest;
883
890
drop table t1;
884
891
create table t1 (t int not null default 1, key (t)) engine=innodb;
885
892
desc t1;
886
 
Field   Type    Null    Default Default_is_NULL On_Update
887
 
t       INTEGER FALSE   1       FALSE   
 
893
Field   Type    Null    Key     Default Extra
 
894
t       int     NO      MUL     1       
888
895
drop table t1;
889
896
create table t1 (id int not null auto_increment, code int not null, name char(20) not null, primary key (id), key (code), unique (name)) engine=innodb;
890
897
BEGIN;
1127
1134
insert t1 values (1, "aaa", "bbb"), (NULL, "", "ccccc"), (0, NULL, "");
1128
1135
insert t2 select * from t1;
1129
1136
insert t3 select * from t1;
1130
 
checksum table t1, t2, t3, t4;
1131
 
Table   Checksum
1132
 
test.t1 2948697075
1133
 
test.t2 3505595080
1134
 
test.t3 3505595080
1135
 
test.t4 NULL
1136
 
Warnings:
1137
 
Error   1146    Table 'test.t4' doesn't exist
1138
 
checksum table t1, t2, t3, t4;
1139
 
Table   Checksum
1140
 
test.t1 2948697075
1141
 
test.t2 3505595080
1142
 
test.t3 3505595080
1143
 
test.t4 NULL
1144
 
Warnings:
1145
 
Error   1146    Table 'test.t4' doesn't exist
1146
 
checksum table t1, t2, t3, t4;
1147
 
Table   Checksum
1148
 
test.t1 2948697075
1149
 
test.t2 3505595080
1150
 
test.t3 3505595080
 
1137
checksum table t1, t2, t3, t4 quick;
 
1138
Table   Checksum
 
1139
test.t1 NULL
 
1140
test.t2 NULL
 
1141
test.t3 NULL
 
1142
test.t4 NULL
 
1143
Warnings:
 
1144
Error   1146    Table 'test.t4' doesn't exist
 
1145
checksum table t1, t2, t3, t4;
 
1146
Table   Checksum
 
1147
test.t1 2948697075
 
1148
test.t2 2948697075
 
1149
test.t3 2948697075
 
1150
test.t4 NULL
 
1151
Warnings:
 
1152
Error   1146    Table 'test.t4' doesn't exist
 
1153
checksum table t1, t2, t3, t4 extended;
 
1154
Table   Checksum
 
1155
test.t1 2948697075
 
1156
test.t2 2948697075
 
1157
test.t3 2948697075
1151
1158
test.t4 NULL
1152
1159
Warnings:
1153
1160
Error   1146    Table 'test.t4' doesn't exist
1428
1435
count(*)
1429
1436
1
1430
1437
drop table t1;
1431
 
show status like "Innodb_buffer_pool_pages_total";
1432
 
Variable_name   Value
1433
 
show status like "Innodb_page_size";
1434
 
Variable_name   Value
1435
 
show status like "Innodb_rows_deleted";
1436
 
Variable_name   Value
1437
 
show status like "Innodb_rows_inserted";
1438
 
Variable_name   Value
1439
 
show status like "Innodb_rows_updated";
1440
 
Variable_name   Value
1441
 
show status like "Innodb_row_lock_waits";
1442
 
Variable_name   Value
1443
 
show status like "Innodb_row_lock_current_waits";
1444
 
Variable_name   Value
1445
 
show status like "Innodb_row_lock_time";
1446
 
Variable_name   Value
1447
 
show status like "Innodb_row_lock_time_max";
1448
 
Variable_name   Value
1449
 
show status like "Innodb_row_lock_time_avg";
1450
 
Variable_name   Value
1451
1438
show variables like "innodb_sync_spin_loops";
1452
1439
Variable_name   Value
1453
 
innodb_sync_spin_loops  30
 
1440
innodb_sync_spin_loops  20
1454
1441
set global innodb_sync_spin_loops=1000;
1455
1442
show variables like "innodb_sync_spin_loops";
1456
1443
Variable_name   Value
2061
2048
  `v` varchar(10) DEFAULT NULL
2062
2049
) ENGINE=InnoDB
2063
2050
drop table t1;
2064
 
create  table t1 (v varchar(10), c char(10));
 
2051
create  table t1 (v varchar(10), c char(10)) row_format=fixed;
 
2052
Warnings:
 
2053
Warning 1478    InnoDB: assuming ROW_FORMAT=COMPACT.
2065
2054
show create table t1;
2066
2055
Table   Create Table
2067
2056
t1      CREATE TABLE `t1` (
2068
2057
  `v` varchar(10) DEFAULT NULL,
2069
2058
  `c` varchar(10) DEFAULT NULL
2070
 
) ENGINE=InnoDB
 
2059
) ENGINE=InnoDB ROW_FORMAT=FIXED
2071
2060
insert into t1 values('a','a'),('a ','a ');
2072
2061
select concat('*',v,'*',c,'*') from t1;
2073
2062
concat('*',v,'*',c,'*')
2378
2367
key (a,b,c,d,e)) engine=innodb;
2379
2368
ERROR 42000: Specified key was too long; max key length is 3500 bytes
2380
2369
create table t1 (s1 varbinary(2),primary key (s1)) engine=innodb;
2381
 
create table t3 (s1 varchar(2) ,primary key (s1)) engine=innodb;
2382
 
create table t4 (s1 char(2) ,primary key (s1)) engine=innodb;
 
2370
create table t3 (s1 varchar(2) binary,primary key (s1)) engine=innodb;
 
2371
create table t4 (s1 char(2) binary,primary key (s1)) engine=innodb;
2383
2372
insert into t1 values (0x41),(0x4120),(0x4100);
2384
2373
insert into t3 values (0x41),(0x4120),(0x4100);
2385
2374
ERROR 23000: Duplicate entry 'A ' for key 'PRIMARY'
2448
2437
4120
2449
2438
4120
2450
2439
drop table t2,t1;
2451
 
create table t1 (a int primary key,s1 varchar(2) not null unique) engine=innodb;
2452
 
create table t2 (s1 char(2) not null, constraint c foreign key(s1) references t1(s1) on update cascade) engine=innodb;
 
2440
create table t1 (a int primary key,s1 varchar(2) binary not null unique) engine=innodb;
 
2441
create table t2 (s1 char(2) binary not null, constraint c foreign key(s1) references t1(s1) on update cascade) engine=innodb;
2453
2442
insert into t1 values(1,0x4100),(2,0x41);
2454
2443
insert into t2 values(0x41);
2455
2444
select hex(s1) from t2;
2711
2700
CREATE TABLE t1 ( a int ) ENGINE=innodb;
2712
2701
BEGIN;
2713
2702
INSERT INTO t1 VALUES (1);
2714
 
ALTER TABLE t1 ENGINE=innodb;
 
2703
OPTIMIZE TABLE t1;
 
2704
Table   Op      Msg_type        Msg_text
 
2705
test.t1 optimize        status  OK
2715
2706
DROP TABLE t1;
2716
2707
CREATE TABLE t1 (id int PRIMARY KEY, f int NOT NULL, INDEX(f)) ENGINE=InnoDB;
2717
2708
CREATE TABLE t2 (id int PRIMARY KEY, f INT NOT NULL,
2736
2727
INSERT INTO t2 VALUES (1);
2737
2728
ALTER TABLE t2 ADD FOREIGN KEY (a) REFERENCES t1 (a) ON DELETE SET NULL;
2738
2729
ALTER TABLE t2 MODIFY a INT NOT NULL;
2739
 
ERROR HY000: Error on rename of '#sql-temporary' to 'test.t2' (errno: 150)
 
2730
ERROR HY000: Error on rename of '#sql-temporary' to './test/t2' (errno: 150)
2740
2731
DELETE FROM t1;
2741
2732
DROP TABLE t2,t1;
2742
2733
CREATE TABLE t1 (a VARCHAR(5) COLLATE utf8_unicode_ci PRIMARY KEY)