summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb
diff options
context:
space:
mode:
authorJan Lindström <jplindst@mariadb.org>2014-05-24 21:37:21 +0300
committerJan Lindström <jplindst@mariadb.org>2014-05-24 21:37:21 +0300
commit1016ee9d77e8c9cd6e9bd114b808fff66f398255 (patch)
treee14ea38c4e7a8cfe794bdb00780a6d0c21cb0c20 /mysql-test/suite/innodb
parent105060e3077a30950bcefb7a05141176bdd25872 (diff)
parentedf1fbd25b81ecb0d5636566b35fa2f7fb09b0b8 (diff)
downloadmariadb-git-1016ee9d77e8c9cd6e9bd114b808fff66f398255.tar.gz
Merge 10.0 -> 10.1
Diffstat (limited to 'mysql-test/suite/innodb')
-rw-r--r--mysql-test/suite/innodb/r/blob-update-debug.result15
-rw-r--r--mysql-test/suite/innodb/r/create-index.result9
-rw-r--r--mysql-test/suite/innodb/r/innodb-autoinc.result27
-rw-r--r--mysql-test/suite/innodb/r/innodb-changed-pages.result72
-rw-r--r--mysql-test/suite/innodb/r/innodb-update-insert.result43
-rw-r--r--mysql-test/suite/innodb/r/innodb.result2
-rw-r--r--mysql-test/suite/innodb/r/row_lock.result3
-rw-r--r--mysql-test/suite/innodb/t/blob-update-debug.test17
-rw-r--r--mysql-test/suite/innodb/t/create-index.test11
-rw-r--r--mysql-test/suite/innodb/t/innodb-autoinc.test18
-rw-r--r--mysql-test/suite/innodb/t/innodb-changed-pages-master.opt1
-rw-r--r--mysql-test/suite/innodb/t/innodb-changed-pages.test63
-rw-r--r--mysql-test/suite/innodb/t/innodb-update-insert.test38
-rw-r--r--mysql-test/suite/innodb/t/row_lock.test16
14 files changed, 320 insertions, 15 deletions
diff --git a/mysql-test/suite/innodb/r/blob-update-debug.result b/mysql-test/suite/innodb/r/blob-update-debug.result
new file mode 100644
index 00000000000..1360745b7e6
--- /dev/null
+++ b/mysql-test/suite/innodb/r/blob-update-debug.result
@@ -0,0 +1,15 @@
+#
+# Bug#18185930 UPD_NODE_INSERT_BLOB CAUSES BTR_EXTERN_OWNER_FLAG
+# ASSERTION
+#
+create table t1 (f1 int primary key, f2 blob) engine = innodb;
+insert into t1 values (1, repeat('*', 50000));
+select f1, substring(f2, 1, 40) from t1;
+f1 substring(f2, 1, 40)
+1 ****************************************
+set debug_dbug = 'd,row_ins_index_entry_timeout';
+update t1 set f1 = 3;
+select f1, substring(f2, 1, 40) from t1;
+f1 substring(f2, 1, 40)
+3 ****************************************
+drop table t1;
diff --git a/mysql-test/suite/innodb/r/create-index.result b/mysql-test/suite/innodb/r/create-index.result
new file mode 100644
index 00000000000..ad358a86329
--- /dev/null
+++ b/mysql-test/suite/innodb/r/create-index.result
@@ -0,0 +1,9 @@
+#
+# Bug #18010711 UNIQUE PREFIX INDEX ON BINARY COLUMN: FAILING
+# ASSERTION: FLEN == LEN
+#
+create table t1 (f1 binary(5)) engine=innodb;
+insert into t1 values ('w'), ('w');
+create unique index index_t1 on t1(f1(4));
+ERROR 23000: Duplicate entry 'w' for key 'index_t1'
+drop table t1;
diff --git a/mysql-test/suite/innodb/r/innodb-autoinc.result b/mysql-test/suite/innodb/r/innodb-autoinc.result
index 2ae51b62062..d5ad06e861f 100644
--- a/mysql-test/suite/innodb/r/innodb-autoinc.result
+++ b/mysql-test/suite/innodb/r/innodb-autoinc.result
@@ -1309,3 +1309,30 @@ t1 CREATE TABLE `t1` (
PRIMARY KEY (`c1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t1;
+#
+# Bug #14049391 INNODB MISCALCULATES AUTO-INCREMENT
+# AFTER CHANGING AUTO_INCREMENT_INCREMEMENT
+#
+CREATE TABLE t ( i INT AUTO_INCREMENT, KEY(i) ) ENGINE=InnoDB;
+SET auto_increment_increment = 300;
+INSERT INTO t VALUES (NULL), (NULL);
+SHOW CREATE TABLE t;
+Table Create Table
+t CREATE TABLE `t` (
+ `i` int(11) NOT NULL AUTO_INCREMENT,
+ KEY `i` (`i`)
+) ENGINE=InnoDB AUTO_INCREMENT=601 DEFAULT CHARSET=latin1
+SET auto_increment_increment = 50;
+INSERT INTO t VALUES (NULL);
+SELECT * FROM t;
+i
+1
+301
+351
+SHOW CREATE TABLE t;
+Table Create Table
+t CREATE TABLE `t` (
+ `i` int(11) NOT NULL AUTO_INCREMENT,
+ KEY `i` (`i`)
+) ENGINE=InnoDB AUTO_INCREMENT=401 DEFAULT CHARSET=latin1
+DROP TABLE t;
diff --git a/mysql-test/suite/innodb/r/innodb-changed-pages.result b/mysql-test/suite/innodb/r/innodb-changed-pages.result
new file mode 100644
index 00000000000..392b5e64e2e
--- /dev/null
+++ b/mysql-test/suite/innodb/r/innodb-changed-pages.result
@@ -0,0 +1,72 @@
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn < 10 AND end_lsn > 20 ;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA . `INNODB_CHANGED_PAGES` AS table1 WHERE ( ( (NOT ( ( ( ( (NOT ( table1 . `page_id` <> table1 . `start_lsn` AND table1 . `space_id` <> 8) AND table1 . `page_id` >= table1 . `end_lsn`) OR table1 . `end_lsn` = table1 . `space_id`) AND table1 . `end_lsn` <> table1 . `page_id`) OR table1 . `end_lsn` < 8) AND table1 . `space_id` >= '2000-06-10 11:33:07.046821') AND table1 . `end_lsn` >= 5) AND table1 . `start_lsn` < 'mm') OR table1 . `end_lsn` != table1 . `end_lsn`) HAVING ( table1 . `start_lsn` < '2005-09-09 01:34:19.012946' OR table1 . `page_id` < 6) ORDER BY table1 . `start_lsn`
+LIMIT 3;
+space_id page_id start_lsn end_lsn
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: 'mm'
+Warning 1292 Truncated incorrect DOUBLE value: '2005-09-09 01:34:19.012946'
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn < 2000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn <= 2000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE end_lsn > 2000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE end_lsn >= 2000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn > 2000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn >= 2000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE end_lsn > 2000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE end_lsn >= 2000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn > 2000000 and end_lsn < 3000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn >= 2000000 and end_lsn < 3000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn > 2000000 and end_lsn <= 3000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn >= 2000000 and end_lsn <= 3000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn = 2000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE end_lsn = 2000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn < 2000000 or end_lsn < 3000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn <= 2000000 or end_lsn < 3000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn < 2000000 or end_lsn <= 3000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn <= 2000000 or end_lsn <= 3000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn > 2000000 or end_lsn < 3000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn >= 2000000 or end_lsn < 3000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn > 2000000 or end_lsn <= 3000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn >= 2000000 or end_lsn <= 3000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn < 2000000 or end_lsn > 3000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn <= 2000000 or end_lsn > 3000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn < 2000000 or end_lsn >= 3000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn <= 2000000 or end_lsn >= 3000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn > 2000000 or end_lsn > 3000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn >= 2000000 or end_lsn > 3000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn > 2000000 or end_lsn >= 3000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn >= 2000000 or end_lsn >= 3000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE (start_lsn > 2000000 and end_lsn < 3000000) or (start_lsn > 4000000 and end_lsn < 5000000);
+space_id page_id start_lsn end_lsn
diff --git a/mysql-test/suite/innodb/r/innodb-update-insert.result b/mysql-test/suite/innodb/r/innodb-update-insert.result
new file mode 100644
index 00000000000..cd0fed101ab
--- /dev/null
+++ b/mysql-test/suite/innodb/r/innodb-update-insert.result
@@ -0,0 +1,43 @@
+#
+# Bug#14668683 ASSERT REC_GET_DELETED_FLAG(REC, PAGE_IS_COMP(PAGE))
+#
+create table t1(f1 char(1) primary key, f2 int not null, f3 blob)
+engine=innodb;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `f1` char(1) NOT NULL,
+ `f2` int(11) NOT NULL,
+ `f3` blob,
+ PRIMARY KEY (`f1`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+insert into t1 values ('a', 0, repeat('b',8102));
+select f1 from t1;
+f1
+a
+update t1 set f1='A';
+select f1 from t1;
+f1
+A
+drop table t1;
+#
+# Another test case
+#
+create table t1 (f1 char(1), f2 longblob, f3 blob, primary key(f1))
+charset=utf8 engine=innodb;
+replace into t1 set f1=0xa3;
+Warnings:
+Warning 1366 Incorrect string value: '\xA3' for column 'f1' at row 1
+select f1 from t1;
+f1
+
+update t1 set f1=0x6a;
+update t1 set f3=repeat(0xb1,8103);
+update t1 set f1=0x4a;
+update t1 set f1=0x82;
+Warnings:
+Warning 1366 Incorrect string value: '\x82' for column 'f1' at row 1
+select f1 from t1;
+f1
+
+drop table t1;
diff --git a/mysql-test/suite/innodb/r/innodb.result b/mysql-test/suite/innodb/r/innodb.result
index bc961ba1e46..f8020e080e6 100644
--- a/mysql-test/suite/innodb/r/innodb.result
+++ b/mysql-test/suite/innodb/r/innodb.result
@@ -1691,7 +1691,7 @@ variable_value - @innodb_rows_deleted_orig
71
SELECT variable_value - @innodb_rows_inserted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_inserted';
variable_value - @innodb_rows_inserted_orig
-1007
+964
SELECT variable_value - @innodb_rows_updated_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_updated';
variable_value - @innodb_rows_updated_orig
866
diff --git a/mysql-test/suite/innodb/r/row_lock.result b/mysql-test/suite/innodb/r/row_lock.result
index c2fb7b90c3f..7344927a587 100644
--- a/mysql-test/suite/innodb/r/row_lock.result
+++ b/mysql-test/suite/innodb/r/row_lock.result
@@ -6,10 +6,7 @@ CREATE TABLE t3 (e INT) ENGINE=InnoDB;
CREATE TABLE t4 ENGINE=InnoDB AS SELECT * FROM t2;
BEGIN;
UPDATE t1 SET a = 0 WHERE a = ( SELECT e FROM t3 );
-SET DEBUG_SYNC='srv_suspend_mysql_thread_enter SIGNAL waiting';
UPDATE t4 SET d = 1 WHERE d in ( SELECT a FROM t1 ) ORDER BY c LIMIT 6;
-SET DEBUG_SYNC='now WAIT_FOR waiting';
-SET DEBUG_SYNC='RESET';
UPDATE t4 SET d = 9;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
commit;
diff --git a/mysql-test/suite/innodb/t/blob-update-debug.test b/mysql-test/suite/innodb/t/blob-update-debug.test
new file mode 100644
index 00000000000..948cd749148
--- /dev/null
+++ b/mysql-test/suite/innodb/t/blob-update-debug.test
@@ -0,0 +1,17 @@
+# This file contains tests involving update operations on blob data type.
+
+--source include/have_innodb.inc
+--source include/have_debug.inc
+
+--echo #
+--echo # Bug#18185930 UPD_NODE_INSERT_BLOB CAUSES BTR_EXTERN_OWNER_FLAG
+--echo # ASSERTION
+--echo #
+
+create table t1 (f1 int primary key, f2 blob) engine = innodb;
+insert into t1 values (1, repeat('*', 50000));
+select f1, substring(f2, 1, 40) from t1;
+set debug_dbug = 'd,row_ins_index_entry_timeout';
+update t1 set f1 = 3;
+select f1, substring(f2, 1, 40) from t1;
+drop table t1;
diff --git a/mysql-test/suite/innodb/t/create-index.test b/mysql-test/suite/innodb/t/create-index.test
new file mode 100644
index 00000000000..e1e5b856aca
--- /dev/null
+++ b/mysql-test/suite/innodb/t/create-index.test
@@ -0,0 +1,11 @@
+--source include/have_innodb.inc
+
+--echo #
+--echo # Bug #18010711 UNIQUE PREFIX INDEX ON BINARY COLUMN: FAILING
+--echo # ASSERTION: FLEN == LEN
+--echo #
+create table t1 (f1 binary(5)) engine=innodb;
+insert into t1 values ('w'), ('w');
+--error ER_DUP_ENTRY
+create unique index index_t1 on t1(f1(4));
+drop table t1;
diff --git a/mysql-test/suite/innodb/t/innodb-autoinc.test b/mysql-test/suite/innodb/t/innodb-autoinc.test
index 17df8877ad4..fd40b50ebbc 100644
--- a/mysql-test/suite/innodb/t/innodb-autoinc.test
+++ b/mysql-test/suite/innodb/t/innodb-autoinc.test
@@ -1,3 +1,8 @@
+if (`select plugin_auth_version <= "5.5.37-MariaDB-34.0" from information_schema.plugins where plugin_name='innodb'`)
+{
+ --skip Not fixed in XtraDB as of 5.5.37-MariaDB-34.0 or earlier
+}
+
--source include/have_innodb.inc
# embedded server ignores 'delayed', so skip this
-- source include/not_embedded.inc
@@ -666,3 +671,16 @@ SELECT * FROM t1;
SHOW CREATE TABLE t1;
DROP TABLE t1;
+--echo #
+--echo # Bug #14049391 INNODB MISCALCULATES AUTO-INCREMENT
+--echo # AFTER CHANGING AUTO_INCREMENT_INCREMEMENT
+--echo #
+CREATE TABLE t ( i INT AUTO_INCREMENT, KEY(i) ) ENGINE=InnoDB;
+SET auto_increment_increment = 300;
+INSERT INTO t VALUES (NULL), (NULL);
+SHOW CREATE TABLE t;
+SET auto_increment_increment = 50;
+INSERT INTO t VALUES (NULL);
+SELECT * FROM t;
+SHOW CREATE TABLE t;
+DROP TABLE t;
diff --git a/mysql-test/suite/innodb/t/innodb-changed-pages-master.opt b/mysql-test/suite/innodb/t/innodb-changed-pages-master.opt
new file mode 100644
index 00000000000..bdee9614faa
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb-changed-pages-master.opt
@@ -0,0 +1 @@
+--innodb-track-changed-pages=0 --innodb-changed-pages=1 \ No newline at end of file
diff --git a/mysql-test/suite/innodb/t/innodb-changed-pages.test b/mysql-test/suite/innodb/t/innodb-changed-pages.test
new file mode 100644
index 00000000000..14668af25cb
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb-changed-pages.test
@@ -0,0 +1,63 @@
+-- source include/have_xtradb.inc
+
+#
+# This test requires innodb-changed-pages=1 so that necessary information schema table exists
+# and innodb-track-changed-pages=0 to disable actual changed pages tracking, because
+# page number are not consistent from run to run
+#
+
+#
+# MDEV-4791: ssertion range_end >= range_start fails in log0online.c
+# on select from I_S.INNODB_CHANGED_PAGES
+
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn < 10 AND end_lsn > 20 ;
+
+SELECT * FROM INFORMATION_SCHEMA . `INNODB_CHANGED_PAGES` AS table1 WHERE ( ( (NOT ( ( ( ( (NOT ( table1 . `page_id` <> table1 . `start_lsn` AND table1 . `space_id` <> 8) AND table1 . `page_id` >= table1 . `end_lsn`) OR table1 . `end_lsn` = table1 . `space_id`) AND table1 . `end_lsn` <> table1 . `page_id`) OR table1 . `end_lsn` < 8) AND table1 . `space_id` >= '2000-06-10 11:33:07.046821') AND table1 . `end_lsn` >= 5) AND table1 . `start_lsn` < 'mm') OR table1 . `end_lsn` != table1 . `end_lsn`) HAVING ( table1 . `start_lsn` < '2005-09-09 01:34:19.012946' OR table1 . `page_id` < 6) ORDER BY table1 . `start_lsn`
+LIMIT 3;
+
+#
+# Basic tests
+#
+
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES;
+
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn < 2000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn <= 2000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE end_lsn > 2000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE end_lsn >= 2000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn > 2000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn >= 2000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE end_lsn > 2000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE end_lsn >= 2000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn > 2000000 and end_lsn < 3000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn >= 2000000 and end_lsn < 3000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn > 2000000 and end_lsn <= 3000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn >= 2000000 and end_lsn <= 3000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn = 2000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE end_lsn = 2000000;
+
+#
+# OR
+#
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn < 2000000 or end_lsn < 3000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn <= 2000000 or end_lsn < 3000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn < 2000000 or end_lsn <= 3000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn <= 2000000 or end_lsn <= 3000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn > 2000000 or end_lsn < 3000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn >= 2000000 or end_lsn < 3000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn > 2000000 or end_lsn <= 3000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn >= 2000000 or end_lsn <= 3000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn < 2000000 or end_lsn > 3000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn <= 2000000 or end_lsn > 3000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn < 2000000 or end_lsn >= 3000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn <= 2000000 or end_lsn >= 3000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn > 2000000 or end_lsn > 3000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn >= 2000000 or end_lsn > 3000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn > 2000000 or end_lsn >= 3000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn >= 2000000 or end_lsn >= 3000000;
+
+#
+# Range
+#
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE (start_lsn > 2000000 and end_lsn < 3000000) or (start_lsn > 4000000 and end_lsn < 5000000);
+
diff --git a/mysql-test/suite/innodb/t/innodb-update-insert.test b/mysql-test/suite/innodb/t/innodb-update-insert.test
new file mode 100644
index 00000000000..95387e0564e
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb-update-insert.test
@@ -0,0 +1,38 @@
+#
+# Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
+#
+
+# This file contains test cases for checking the functionality "update by
+# delete + insert".
+
+--source include/have_innodb.inc
+
+--echo #
+--echo # Bug#14668683 ASSERT REC_GET_DELETED_FLAG(REC, PAGE_IS_COMP(PAGE))
+--echo #
+
+create table t1(f1 char(1) primary key, f2 int not null, f3 blob)
+engine=innodb;
+show create table t1;
+
+insert into t1 values ('a', 0, repeat('b',8102));
+select f1 from t1;
+update t1 set f1='A';
+select f1 from t1;
+drop table t1;
+
+--echo #
+--echo # Another test case
+--echo #
+create table t1 (f1 char(1), f2 longblob, f3 blob, primary key(f1))
+charset=utf8 engine=innodb;
+
+replace into t1 set f1=0xa3;
+select f1 from t1;
+update t1 set f1=0x6a;
+update t1 set f3=repeat(0xb1,8103);
+update t1 set f1=0x4a;
+update t1 set f1=0x82;
+select f1 from t1;
+
+drop table t1;
diff --git a/mysql-test/suite/innodb/t/row_lock.test b/mysql-test/suite/innodb/t/row_lock.test
index 7a209f08956..d9f9a7289c4 100644
--- a/mysql-test/suite/innodb/t/row_lock.test
+++ b/mysql-test/suite/innodb/t/row_lock.test
@@ -1,8 +1,3 @@
-if (`select plugin_auth_version < "5.6.17" from information_schema.plugins where plugin_name='innodb'`)
-{
- --skip Not fixed in InnoDB before 5.6.17
-}
-
#
# Test of wrong call to unlock_row
# MDEV-5629 Failing assertion: state == TRX_STATE_NOT_STARTED on
@@ -10,7 +5,6 @@ if (`select plugin_auth_version < "5.6.17" from information_schema.plugins where
#
--source include/have_innodb.inc
---source include/have_debug_sync.inc
CREATE TABLE t1 (a INT, b INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1,1),(2,2);
@@ -28,17 +22,17 @@ UPDATE t1 SET a = 0 WHERE a = ( SELECT e FROM t3 );
--connect (con12,localhost,root,,test)
-SET DEBUG_SYNC='srv_suspend_mysql_thread_enter SIGNAL waiting';
-
--send
UPDATE t4 SET d = 1 WHERE d in ( SELECT a FROM t1 ) ORDER BY c LIMIT 6;
--connection con11
# Wait for con12 to start waiting for con11
-
-SET DEBUG_SYNC='now WAIT_FOR waiting';
-SET DEBUG_SYNC='RESET';
+let $wait_condition=
+ select count(*) = 1 from information_schema.innodb_trx
+ where trx_state = "lock wait" and
+ trx_query like "%SELECT a FROM t1%";
+--source include/wait_condition.inc
UPDATE t4 SET d = 9;