summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb/r
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2015-12-21 21:24:22 +0100
committerSergei Golubchik <serg@mariadb.org>2015-12-21 21:24:22 +0100
commita2bcee626d4ef2836e38e4932305871390164644 (patch)
treeb41e357427318bad8985078b91bbd2b0360defc8 /mysql-test/suite/innodb/r
parent1788bfe93a745582d938a608d5959b7d2e6b2f23 (diff)
parent4fdf25afa8188905653a83e08fc387243e584600 (diff)
downloadmariadb-git-a2bcee626d4ef2836e38e4932305871390164644.tar.gz
Merge branch '10.0' into 10.1
Diffstat (limited to 'mysql-test/suite/innodb/r')
-rw-r--r--mysql-test/suite/innodb/r/dropdb.result9
-rw-r--r--mysql-test/suite/innodb/r/innodb-autoinc.result16
-rw-r--r--mysql-test/suite/innodb/r/innodb-dict.result40
-rw-r--r--mysql-test/suite/innodb/r/innodb-get-fk.result71
-rw-r--r--mysql-test/suite/innodb/r/innodb-stats-modified-counter.result20
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug56947.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb_information_schema_tables.result2
7 files changed, 157 insertions, 3 deletions
diff --git a/mysql-test/suite/innodb/r/dropdb.result b/mysql-test/suite/innodb/r/dropdb.result
new file mode 100644
index 00000000000..6b11b5e5205
--- /dev/null
+++ b/mysql-test/suite/innodb/r/dropdb.result
@@ -0,0 +1,9 @@
+#
+# Bug #19929435 DROP DATABASE HANGS WITH MALFORMED TABLE
+#
+set session default_storage_engine=innodb;
+create database `b`;
+use `b`;
+create table `#mysql50#q.q` select 1;
+ERROR 42000: Incorrect table name '#mysql50#q.q'
+drop database `b`;
diff --git a/mysql-test/suite/innodb/r/innodb-autoinc.result b/mysql-test/suite/innodb/r/innodb-autoinc.result
index 6ac8bb53c66..ddca4685e05 100644
--- a/mysql-test/suite/innodb/r/innodb-autoinc.result
+++ b/mysql-test/suite/innodb/r/innodb-autoinc.result
@@ -567,7 +567,7 @@ Variable_name Value
auto_increment_increment 65535
auto_increment_offset 65535
INSERT INTO t1 VALUES (NULL),(NULL);
-ERROR 22003: Out of range value for column 'c1' at row 1
+ERROR HY000: Failed to read auto-increment value from storage engine
SELECT * FROM t1;
c1
1
@@ -641,6 +641,18 @@ PRIMARY KEY (m)) ENGINE = InnoDB;
INSERT INTO t2 (n,o) VALUES
(1 , 'true'), (1 , 'false'), (2 , 'true'), (2 , 'false'), (3 , 'true'),
(3 , 'false'), (4 , 'true'), (4 , 'false'), (5 , 'true'), (5 , 'false');
+SELECT * FROM t2;
+m n o
+1 1 TRUE
+2 1 FALSE
+3 2 TRUE
+4 2 FALSE
+5 3 TRUE
+6 3 FALSE
+7 4 TRUE
+8 4 FALSE
+9 5 TRUE
+10 5 FALSE
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -648,7 +660,7 @@ t2 CREATE TABLE `t2` (
`n` int(10) unsigned NOT NULL,
`o` enum('FALSE','TRUE') DEFAULT NULL,
PRIMARY KEY (`m`)
-) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=latin1
+) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=latin1
INSERT INTO t1 (b,c) SELECT n,o FROM t2 ;
SHOW CREATE TABLE t1;
Table Create Table
diff --git a/mysql-test/suite/innodb/r/innodb-dict.result b/mysql-test/suite/innodb/r/innodb-dict.result
new file mode 100644
index 00000000000..e3b2f0d5288
--- /dev/null
+++ b/mysql-test/suite/innodb/r/innodb-dict.result
@@ -0,0 +1,40 @@
+CREATE TABLE t1 (D INT) ENGINE=innodb;
+INSERT INTO t1 VALUES (10);
+ALTER TABLE t1 MODIFY COLUMN d INT;
+ALTER TABLE t1 ADD INDEX my_d (d);
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `d` int(11) DEFAULT NULL,
+ KEY `my_d` (`d`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9);
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+EXPLAIN SELECT d FROM t1 WHERE d = 5;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref my_d my_d 5 const 128 Using index
+EXPLAIN SELECT D FROM t1 WHERE D = 5;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref my_d my_d 5 const 128 Using index
+ALTER TABLE t1 DROP INDEX my_d;
+ALTER TABLE t1 MODIFY COLUMN D INT;
+ALTER TABLE t1 ADD INDEX my_d (D);
+EXPLAIN SELECT d FROM t1 WHERE d = 5;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref my_d my_d 5 const 128 Using index
+EXPLAIN SELECT D FROM t1 WHERE D = 5;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref my_d my_d 5 const 128 Using index
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `D` int(11) DEFAULT NULL,
+ KEY `my_d` (`D`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/innodb-get-fk.result b/mysql-test/suite/innodb/r/innodb-get-fk.result
new file mode 100644
index 00000000000..0dca82c2d10
--- /dev/null
+++ b/mysql-test/suite/innodb/r/innodb-get-fk.result
@@ -0,0 +1,71 @@
+CREATE SCHEMA `repro`;
+CREATE TABLE `repro`.`crew` (
+`id` int(11) NOT NULL AUTO_INCREMENT,
+`code` varchar(50) NOT NULL,
+`name` varchar(50) NOT NULL,
+`created_at` timestamp NULL DEFAULT NULL,
+`updated_at` timestamp NULL DEFAULT NULL,
+PRIMARY KEY (`id`),
+KEY `code` (`code`)
+) ENGINE=InnoDB;
+CREATE TABLE `repro`.`pilot` (
+`id` int(11) NOT NULL AUTO_INCREMENT,
+`code` varchar(50) NOT NULL,
+`name` varchar(50) NOT NULL,
+`created_at` timestamp NULL DEFAULT NULL,
+`updated_at` timestamp NULL DEFAULT NULL,
+PRIMARY KEY (`id`),
+KEY `code` (`code`)
+) ENGINE=InnoDB;
+CREATE TABLE `repro`.`crew_role_assigned` (
+`id` int(11) NOT NULL AUTO_INCREMENT,
+`crew_id` int(11) NOT NULL,
+`role_code` varchar(50) NOT NULL,
+PRIMARY KEY (`id`),
+KEY `fk_crewRoleAssigned_roleCode` (`role_code`),
+CONSTRAINT `fk_crewRoleAssigned_crewId` FOREIGN KEY (`crew_id`) REFERENCES `repro`.`crew` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
+CONSTRAINT `fk_crewRoleAssigned_pilotId` FOREIGN KEY (`crew_id`) REFERENCES `repro`.`pilot` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB COMMENT="This is a comment about tables";
+# Restart mysqld --innodb_read_only_mode=1
+SHOW CREATE TABLE `repro`.`crew_role_assigned`;
+Table Create Table
+crew_role_assigned CREATE TABLE `crew_role_assigned` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `crew_id` int(11) NOT NULL,
+ `role_code` varchar(50) NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `fk_crewRoleAssigned_roleCode` (`role_code`),
+ KEY `fk_crewRoleAssigned_pilotId` (`crew_id`),
+ CONSTRAINT `fk_crewRoleAssigned_crewId` FOREIGN KEY (`crew_id`) REFERENCES `crew` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_crewRoleAssigned_pilotId` FOREIGN KEY (`crew_id`) REFERENCES `pilot` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='This is a comment about tables'
+ALTER TABLE `repro`.`crew_role_assigned` COMMENT = "This is a new comment about tables";
+SHOW CREATE TABLE `repro`.`crew_role_assigned`;
+Table Create Table
+crew_role_assigned CREATE TABLE `crew_role_assigned` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `crew_id` int(11) NOT NULL,
+ `role_code` varchar(50) NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `fk_crewRoleAssigned_roleCode` (`role_code`),
+ KEY `fk_crewRoleAssigned_pilotId` (`crew_id`),
+ CONSTRAINT `fk_crewRoleAssigned_crewId` FOREIGN KEY (`crew_id`) REFERENCES `crew` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_crewRoleAssigned_pilotId` FOREIGN KEY (`crew_id`) REFERENCES `pilot` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='This is a new comment about tables'
+# Restart mysqld --innodb_read_only_mode=1
+SHOW CREATE TABLE `repro`.`crew_role_assigned`;
+Table Create Table
+crew_role_assigned CREATE TABLE `crew_role_assigned` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `crew_id` int(11) NOT NULL,
+ `role_code` varchar(50) NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `fk_crewRoleAssigned_roleCode` (`role_code`),
+ KEY `fk_crewRoleAssigned_pilotId` (`crew_id`),
+ CONSTRAINT `fk_crewRoleAssigned_crewId` FOREIGN KEY (`crew_id`) REFERENCES `crew` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_crewRoleAssigned_pilotId` FOREIGN KEY (`crew_id`) REFERENCES `pilot` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='This is a new comment about tables'
+DROP TABLE `repro`.`crew_role_assigned`;
+DROP TABLE `repro`.`pilot`;
+DROP TABLE `repro`.`crew`;
+DROP SCHEMA `repro`;
diff --git a/mysql-test/suite/innodb/r/innodb-stats-modified-counter.result b/mysql-test/suite/innodb/r/innodb-stats-modified-counter.result
new file mode 100644
index 00000000000..db56c6ba81a
--- /dev/null
+++ b/mysql-test/suite/innodb/r/innodb-stats-modified-counter.result
@@ -0,0 +1,20 @@
+set global innodb_stats_auto_recalc=off;
+CREATE TABLE t1 (i int) ENGINE=InnoDB;
+SELECT NAME, STATS_INITIALIZED, NUM_ROWS, MODIFIED_COUNTER FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
+NAME STATS_INITIALIZED NUM_ROWS MODIFIED_COUNTER
+test/t1 Initialized 0 0
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+SELECT NAME, STATS_INITIALIZED, NUM_ROWS, MODIFIED_COUNTER FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
+NAME STATS_INITIALIZED NUM_ROWS MODIFIED_COUNTER
+test/t1 Initialized 2 2
+DELETE FROM t1 WHERE i = 1;
+SELECT NAME, STATS_INITIALIZED, NUM_ROWS, MODIFIED_COUNTER FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
+NAME STATS_INITIALIZED NUM_ROWS MODIFIED_COUNTER
+test/t1 Initialized 1 3
+UPDATE t1 SET i = 4 WHERE i = 2;
+SELECT NAME, STATS_INITIALIZED, NUM_ROWS, MODIFIED_COUNTER FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
+NAME STATS_INITIALIZED NUM_ROWS MODIFIED_COUNTER
+test/t1 Initialized 1 4
+DROP TABLE t1;
+set global innodb_stats_auto_recalc=default;
diff --git a/mysql-test/suite/innodb/r/innodb_bug56947.result b/mysql-test/suite/innodb/r/innodb_bug56947.result
index 54af78047dd..878450144a2 100644
--- a/mysql-test/suite/innodb/r/innodb_bug56947.result
+++ b/mysql-test/suite/innodb/r/innodb_bug56947.result
@@ -2,7 +2,7 @@ SET GLOBAL innodb_file_per_table=0;
create table bug56947(a int not null) engine = innodb;
SET DEBUG_DBUG='+d,ib_rebuild_cannot_rename';
alter table bug56947 add unique index (a);
-ERROR HY000: Got error 11 "Resource temporarily unavailable" from storage engine InnoDB
+ERROR HY000: Got error 11 "xxx" from storage engine InnoDB
SET DEBUG_DBUG='-d,ib_rebuild_cannot_rename';
check table bug56947;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/innodb/r/innodb_information_schema_tables.result b/mysql-test/suite/innodb/r/innodb_information_schema_tables.result
new file mode 100644
index 00000000000..ea713ea6f6a
--- /dev/null
+++ b/mysql-test/suite/innodb/r/innodb_information_schema_tables.result
@@ -0,0 +1,2 @@
+CREATE TABLE t1 ENGINE=InnoDB AS SELECT * FROM mysql.help_topic;
+DROP TABLE t1;