~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/innodb_mysql.result

  • Committer: LinuxJedi
  • Date: 2010-08-30 16:24:46 UTC
  • mto: (1738.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 1739.
  • Revision ID: linuxjedi@linuxjedi-laptop-20100830162446-qdm7pnma8vp41e5m
Fix valgrind warnings (plus make exit clean up properly)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
set global innodb_support_xa=default;
 
2
set session innodb_support_xa=default;
2
3
SET SESSION STORAGE_ENGINE = InnoDB;
3
4
SET @orig_lock_wait_timeout= @@innodb_lock_wait_timeout;
4
5
SET GLOBAL innodb_lock_wait_timeout=2;
347
348
DELETE FROM t1;
348
349
EXPLAIN SELECT DISTINCT t1.name, t1.dept FROM t1 WHERE t1.name='rs5';
349
350
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
350
 
1       SIMPLE  t1      range   name    name    164     NULL    #       Using where; Using index for group-by
 
351
1       SIMPLE  t1      range   name    name    164     NULL    2       Using where; Using index for group-by
351
352
SELECT DISTINCT t1.name, t1.dept FROM t1 WHERE t1.name='rs5';
352
353
name    dept
353
354
DROP TABLE t1;
483
484
show create table t1;
484
485
Table   Create Table
485
486
t1      CREATE TABLE `t1` (
486
 
  `a` INT DEFAULT NULL
 
487
  `a` int DEFAULT NULL
487
488
) ENGINE=InnoDB COMMENT='123' COLLATE = utf8_general_ci
488
489
drop table t1;
489
490
CREATE TABLE t1 (a CHAR(2), KEY (a)) ENGINE = InnoDB;
769
770
id      1
770
771
select_type     SIMPLE
771
772
table   t1
772
 
type    index
 
773
type    range
773
774
possible_keys   bkey
774
775
key     bkey
775
776
key_len 5
776
777
ref     NULL
777
 
rows    32
 
778
rows    16
778
779
Extra   Using where; Using index
779
780
SELECT * FROM t1 WHERE b BETWEEN 1 AND 2 ORDER BY b,a;
780
781
a       b
853
854
key     bkey
854
855
key_len 10
855
856
ref     const,const
856
 
rows    16
 
857
rows    8
857
858
Extra   Using where; Using index
858
859
SELECT * FROM t2 WHERE b=1 AND c=1 ORDER BY a;
859
860
a       b       c
882
883
key     bkey
883
884
key_len 10
884
885
ref     const,const
885
 
rows    16
 
886
rows    8
886
887
Extra   Using where; Using index
887
888
SELECT * FROM t2 WHERE b=1 AND c=1 ORDER BY b,c,a;
888
889
a       b       c
911
912
key     bkey
912
913
key_len 10
913
914
ref     const,const
914
 
rows    16
 
915
rows    8
915
916
Extra   Using where; Using index
916
917
SELECT * FROM t2 WHERE b=1 AND c=1 ORDER BY c,a;
917
918
a       b       c
940
941
show create table t1;
941
942
Table   Create Table
942
943
t1      CREATE TABLE `t1` (
943
 
  `a` TEXT COLLATE utf8_general_ci,
 
944
  `a` text,
944
945
  KEY `a` (`a`(255))
945
946
) ENGINE=InnoDB COLLATE = utf8_general_ci
946
947
drop table t1;
1022
1023
key     b
1023
1024
key_len 5
1024
1025
ref     const
1025
 
rows    2
 
1026
rows    1
1026
1027
Extra   Using where; Using index
1027
1028
SELECT * FROM t1 WHERE b=2 ORDER BY a ASC;
1028
1029
a       b
1037
1038
key     b
1038
1039
key_len 5
1039
1040
ref     const
1040
 
rows    2
 
1041
rows    1
1041
1042
Extra   Using where; Using index
1042
1043
SELECT * FROM t1 WHERE b=2 ORDER BY a DESC;
1043
1044
a       b
1151
1152
show create table t1;
1152
1153
Table   Create Table
1153
1154
t1      CREATE TABLE `t1` (
1154
 
  `a` VARCHAR(10) COLLATE utf8_general_ci NOT NULL,
1155
 
  `b` VARCHAR(4) COLLATE utf8_general_ci NOT NULL,
 
1155
  `a` varchar(10) NOT NULL,
 
1156
  `b` varchar(4) NOT NULL,
1156
1157
  UNIQUE KEY `bb` (`b`),
1157
1158
  UNIQUE KEY `aa` (`a`(1))
1158
1159
) ENGINE=InnoDB COLLATE = utf8_general_ci
1172
1173
set @my_innodb_autoextend_increment=@@global.innodb_autoextend_increment;
1173
1174
set global innodb_autoextend_increment=8;
1174
1175
set global innodb_autoextend_increment=@my_innodb_autoextend_increment;
 
1176
set @my_innodb_commit_concurrency=@@global.innodb_commit_concurrency;
 
1177
set global innodb_commit_concurrency=0;
 
1178
set global innodb_commit_concurrency=@my_innodb_commit_concurrency;
1175
1179
End of 5.0 tests
1176
1180
CREATE TABLE `t2` (
1177
1181
`k` int NOT NULL auto_increment,
1295
1299
SHOW CREATE TABLE t2;
1296
1300
Table   Create Table
1297
1301
t2      CREATE TABLE `t2` (
1298
 
  `c` INT NOT NULL,
1299
 
  `d` INT NOT NULL,
 
1302
  `c` int NOT NULL,
 
1303
  `d` int NOT NULL,
1300
1304
  PRIMARY KEY (`c`,`d`),
1301
1305
  CONSTRAINT `c1` FOREIGN KEY (`c`) REFERENCES `t1` (`a`) ON DELETE NO ACTION,
1302
1306
  CONSTRAINT `c2` FOREIGN KEY (`c`) REFERENCES `t1` (`a`) ON UPDATE NO ACTION,
1347
1351
 
1348
1352
DROP TABLE t2;
1349
1353
DROP TABLE t1;
1350
 
SET GLOBAL innodb_lock_wait_timeout=@orig_lock_wait_timeout ;
 
1354
SET innodb_lock_wait_timeout=@orig_lock_wait_timeout ;
1351
1355
End of 5.1 tests
1352
 
#
1353
 
# Test for bug #39932 "create table fails if column for FK is in different
1354
 
#                      case than in corr index".
1355
 
#
1356
 
drop tables if exists t1, t2;
1357
 
create table t1 (pk int primary key) engine=InnoDB;
1358
 
# Even although the below statement uses uppercased field names in
1359
 
# foreign key definition it still should be able to find explicitly
1360
 
# created supporting index. So it should succeed and should not
1361
 
# create any additional supporting indexes.
1362
 
create table t2 (fk int, key x (fk),
1363
 
constraint x foreign key (FK) references t1 (PK)) engine=InnoDB;
1364
 
show create table t2;
1365
 
Table   Create Table
1366
 
t2      CREATE TABLE `t2` (
1367
 
  `fk` INT DEFAULT NULL,
1368
 
  KEY `x` (`fk`),
1369
 
  CONSTRAINT `x` FOREIGN KEY (`FK`) REFERENCES `t1` (`PK`)
1370
 
) ENGINE=InnoDB COLLATE = utf8_general_ci
1371
 
drop table t2, t1;
1372
 
#
1373
 
# Bug#55826: create table .. select crashes with when KILL_BAD_DATA 
1374
 
#  is returned
1375
 
#
1376
 
CREATE TABLE t1(a INT) ENGINE=innodb;
1377
 
INSERT INTO t1 VALUES (0);
1378
 
CREATE TABLE t2 
1379
 
SELECT LEAST((SELECT '' FROM t1),NOW()) FROM `t1`;
1380
 
ERROR 22007: Incorrect datetime value: '' for column 'NOW()' at row 1
1381
 
DROP TABLE IF EXISTS t1,t2;
1382
 
Warnings:
1383
 
Note    1051    Unknown table 't2'