Commit 5f398e9b authored by Alice Sherepa's avatar Alice Sherepa

innodb suite

parent 940f23ca
#
# Bug #19471516 SERVER CRASHES WHEN EXECUTING ALTER TABLE
# ADD FOREIGN KEY
#
CREATE TABLE `department` (`department_id` INT, `department_people_fk` INT,
PRIMARY KEY (`department_id`)) engine=innodb;
CREATE TABLE `title` (`title_id` INT, `title_manager_fk` INT,
`title_reporter_fk` INT, PRIMARY KEY (`title_id`)) engine=innodb;
CREATE TABLE `people` (`people_id` INT, PRIMARY KEY (`people_id`)) engine=innodb;
ALTER TABLE `department` ADD FOREIGN KEY (`department_people_fk`) REFERENCES
`people` (`people_id`);
ALTER TABLE `title` ADD FOREIGN KEY (`title_manager_fk`) REFERENCES `people`
(`people_id`);
ALTER TABLE `title` ADD FOREIGN KEY (`title_reporter_fk`) REFERENCES `people`
(`people_id`);
drop table title, department, people;
......@@ -2,7 +2,7 @@ drop table if exists t1;
CREATE TABLE t1 (c1 BIGINT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (9223372036854775807, null);
INSERT INTO t1 (c2) VALUES ('innodb');
ERROR 22003: Out of range value for column 'c1' at row 1
Got one of the listed errors
SELECT * FROM t1;
c1 c2
9223372036854775807 NULL
......@@ -10,7 +10,7 @@ DROP TABLE t1;
CREATE TABLE t1 (c1 TINYINT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (127, null);
INSERT INTO t1 (c2) VALUES ('innodb');
ERROR 22003: Out of range value for column 'c1' at row 1
Got one of the listed errors
SELECT * FROM t1;
c1 c2
127 NULL
......@@ -18,7 +18,7 @@ DROP TABLE t1;
CREATE TABLE t1 (c1 TINYINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (255, null);
INSERT INTO t1 (c2) VALUES ('innodb');
ERROR 22003: Out of range value for column 'c1' at row 1
Got one of the listed errors
SELECT * FROM t1;
c1 c2
255 NULL
......@@ -26,7 +26,7 @@ DROP TABLE t1;
CREATE TABLE t1 (c1 SMALLINT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (32767, null);
INSERT INTO t1 (c2) VALUES ('innodb');
ERROR 22003: Out of range value for column 'c1' at row 1
Got one of the listed errors
SELECT * FROM t1;
c1 c2
32767 NULL
......@@ -34,7 +34,7 @@ DROP TABLE t1;
CREATE TABLE t1 (c1 SMALLINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (65535, null);
INSERT INTO t1 (c2) VALUES ('innodb');
ERROR 22003: Out of range value for column 'c1' at row 1
Got one of the listed errors
SELECT * FROM t1;
c1 c2
65535 NULL
......@@ -42,7 +42,7 @@ DROP TABLE t1;
CREATE TABLE t1 (c1 MEDIUMINT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (8388607, null);
INSERT INTO t1 (c2) VALUES ('innodb');
ERROR 22003: Out of range value for column 'c1' at row 1
Got one of the listed errors
SELECT * FROM t1;
c1 c2
8388607 NULL
......@@ -50,7 +50,7 @@ DROP TABLE t1;
CREATE TABLE t1 (c1 MEDIUMINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (16777215, null);
INSERT INTO t1 (c2) VALUES ('innodb');
ERROR 22003: Out of range value for column 'c1' at row 1
Got one of the listed errors
SELECT * FROM t1;
c1 c2
16777215 NULL
......@@ -58,7 +58,7 @@ DROP TABLE t1;
CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (2147483647, null);
INSERT INTO t1 (c2) VALUES ('innodb');
ERROR 22003: Out of range value for column 'c1' at row 1
Got one of the listed errors
SELECT * FROM t1;
c1 c2
2147483647 NULL
......@@ -66,7 +66,7 @@ DROP TABLE t1;
CREATE TABLE t1 (c1 INT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (4294967295, null);
INSERT INTO t1 (c2) VALUES ('innodb');
ERROR 22003: Out of range value for column 'c1' at row 1
Got one of the listed errors
SELECT * FROM t1;
c1 c2
4294967295 NULL
......@@ -74,7 +74,7 @@ DROP TABLE t1;
CREATE TABLE t1 (c1 BIGINT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (9223372036854775807, null);
INSERT INTO t1 (c2) VALUES ('innodb');
ERROR 22003: Out of range value for column 'c1' at row 1
Got one of the listed errors
SELECT * FROM t1;
c1 c2
9223372036854775807 NULL
......@@ -567,7 +567,7 @@ Variable_name Value
auto_increment_increment 65535
auto_increment_offset 65535
INSERT INTO t1 VALUES (NULL),(NULL);
ERROR HY000: Failed to read auto-increment value from storage engine
ERROR 22003: Out of range value for column 't1' at row 167
SELECT * FROM t1;
c1
1
......@@ -641,18 +641,6 @@ 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` (
......@@ -660,7 +648,7 @@ t2 CREATE TABLE `t2` (
`n` int(10) unsigned NOT NULL,
`o` enum('FALSE','TRUE') DEFAULT NULL,
PRIMARY KEY (`m`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=latin1
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=latin1
INSERT INTO t1 (b,c) SELECT n,o FROM t2 ;
SHOW CREATE TABLE t1;
Table Create Table
......@@ -870,7 +858,7 @@ PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t2 SELECT c1 FROM t1;
Got one of the listed errors
INSERT INTO t2 SELECT NULL FROM t1;
ERROR 22003: Out of range value for column 'c1' at row 1
Got one of the listed errors
DROP TABLE t1;
DROP TABLE t2;
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
......@@ -1321,6 +1309,54 @@ t1 CREATE TABLE `t1` (
PRIMARY KEY (`c1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1 (c1 INT AUTO_INCREMENT PRIMARY KEY, c2 INT) ENGINE = MyISAM;
INSERT INTO t1 (c1) VALUES (NULL), (-290783232), (NULL);
Warnings:
Warning 1264 Out of range value for column 'c1' at row 3
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` int(11) NOT NULL AUTO_INCREMENT,
`c2` int(11) DEFAULT NULL,
PRIMARY KEY (`c1`)
) ENGINE=MyISAM AUTO_INCREMENT=2147483648 DEFAULT CHARSET=latin1
SELECT * FROM t1;
c1 c2
1 NULL
-290783232 NULL
2147483647 NULL
ALTER TABLE t1 ENGINE = InnoDB;
SELECT * FROM t1;
c1 c2
-290783232 NULL
1 NULL
2147483647 NULL
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` int(11) NOT NULL AUTO_INCREMENT,
`c2` int(11) DEFAULT NULL,
PRIMARY KEY (`c1`)
) ENGINE=InnoDB AUTO_INCREMENT=2147483648 DEFAULT CHARSET=latin1
REPLACE INTO t1 (c2 ) VALUES (0);
ERROR HY000: Failed to read auto-increment value from storage engine
SELECT * FROM t1;
c1 c2
-290783232 NULL
1 NULL
2147483647 NULL
DROP TABLE t1;
CREATE TABLE t1 (c1 DOUBLE NOT NULL PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB
AUTO_INCREMENT=10000000000000000000;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` double NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`c1`)
) ENGINE=InnoDB AUTO_INCREMENT=10000000000000000000 DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ();
ERROR HY000: Failed to read auto-increment value from storage engine
DROP TABLE t1;
#
# Bug #14049391 INNODB MISCALCULATES AUTO-INCREMENT
# AFTER CHANGING AUTO_INCREMENT_INCREMEMENT
......
......@@ -57,6 +57,8 @@ a b
3 24
SELECT * FROM t1 WHERE a=3 FOR UPDATE;
SET DEBUG_SYNC='now SIGNAL select5';
Warnings:
Warning 1062 Duplicate entry '3' for key 'PRIMARY'
a b
3 24
SET DEBUG_SYNC='write_row_replace SIGNAL insert6 WAIT_FOR select6';
......
--innodb-log-files-in-group=12 --innodb-log-file-size=5M
--innodb-log-files-in-group=12
--innodb-log-file-size=5M
--innodb_page_size=16384
--source include/not_embedded.inc
--source include/not_crashrep.inc
--source include/have_innodb.inc
--source include/have_innodb_16k.inc
--echo #
--echo # Bug #19498877 LIMITATION ON BLOB SIZE IS TOO STRICT, BLOB CAN
......
--innodb_page_size=16384
\ No newline at end of file
--source include/have_innodb.inc
--source include/have_innodb_16k.inc
--source include/have_debug.inc
SET @saved_debug_dbug = @@SESSION.debug_dbug;
......
--innodb_page_size=16384
\ No newline at end of file
--source include/have_debug.inc
--source include/have_innodb.inc
--source include/have_innodb_16k.inc
--echo #
--echo # Bug #18010711 UNIQUE PREFIX INDEX ON BINARY COLUMN: FAILING
......
--innodb-sys-tablespaces
--innodb_page_size=16384
-- source include/have_innodb.inc
-- source include/have_innodb_16k.inc
--echo #
--echo # Bug#15923864 (Bug#67718):
--echo # INNODB DRASTICALLY UNDER-FILLS PAGES IN CERTAIN CONDITIONS
......
......@@ -435,7 +435,7 @@ SELECT * FROM t3;
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--shutdown_server 10
--shutdown_server
--source include/wait_until_disconnected.inc
# Do something while server is down
--enable_reconnect
......
--loose-innodb-fast-shutdown=0
--innodb_page_size=16384
......@@ -4,7 +4,6 @@
-- source include/not_embedded.inc
-- source include/have_innodb.inc
-- source include/have_innodb_16k.inc
call mtr.add_suppression('InnoDB: Error: Table "mysql"."innodb_(table|index)_stats" not found');
call mtr.add_suppression('InnoDB: Error: Fetch of persistent statistics requested');
......
......@@ -17,7 +17,6 @@
let $MYSQL_DATA_DIR = `select @@datadir`;
let SEARCH_FILE = $MYSQLTEST_VARDIR/log/my_restart.err;
let $args=--loose-console --default-storage-engine=innodb > $SEARCH_FILE 2>&1;
#-----------------------------------------------------------------------------
use test;
......@@ -30,7 +29,7 @@ use test;
--mkdir $MYSQL_DATA_DIR/tmpdata
--chmod 0400 $MYSQL_DATA_DIR/tmpdata
--error 1
--exec $MYSQLD_CMD --innodb_data_home_dir=$MYSQL_DATA_DIR/tmpdata $args
--exec $MYSQLD_CMD --loose-console --default-storage-engine=innodb --innodb_data_home_dir=$MYSQL_DATA_DIR/tmpdata> $SEARCH_FILE 2>&1;
let SEARCH_PATTERN = returned OS error 113;
--source include/search_pattern_in_file.inc
......
--innodb-trx
\ No newline at end of file
......@@ -3,7 +3,7 @@
--echo # TRANSACTION IS COMMITTED
--echo #
--source include/big_test.inc
#--source include/big_test.inc
--source include/not_valgrind.inc
--echo "Test 1:- Uncommited delete test"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment