From b591cce1d2c0c65c5aa80c42fd1f1f2da6c1f139 Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Wed, 2 Jun 2010 15:49:05 +0300 Subject: [PATCH 01/12] Adjust .bzr-mysql/default.conf that was reverted by a recent bzr pull --- .bzr-mysql/default.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.bzr-mysql/default.conf b/.bzr-mysql/default.conf index 4eab3d239d0..df9a60f35ad 100644 --- a/.bzr-mysql/default.conf +++ b/.bzr-mysql/default.conf @@ -1,4 +1,4 @@ [MYSQL] -post_commit_to = "commits@lists.mysql.com" -post_push_to = "commits@lists.mysql.com" -tree_name = "mysql-trunk-bugfixing" +post_commit_to = commits@lists.mysql.com, innodb_dev_ww@oracle.com +post_push_to = commits@lists.mysql.com, innodb_dev_ww@oracle.com +tree_name = "mysql-trunk-innodb" From c440ee86762ff33a4aff48fc9295fb07c7b72a27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Thu, 3 Jun 2010 13:28:40 +0300 Subject: [PATCH 02/12] Merge a change from mysql-5.1-innodb: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------------------------------------------------------ revno: 3500 revision-id: marko.makela@oracle.com-20100603095032-v5ptkkzt1bhz0m1d parent: marko.makela@oracle.com-20100603094859-8cibt7xns239jjvc committer: Marko Mäkelä branch nick: 5.1-innodb timestamp: Thu 2010-06-03 12:50:32 +0300 message: Move some InnoDB tests to mysql-test/suite/innodb. --- mysql-test/{ => suite/innodb}/r/innodb-autoinc-optimize.result | 0 mysql-test/{ => suite/innodb}/r/innodb-ucs2.result | 0 .../{ => suite/innodb}/r/innodb_autoinc_lock_mode_zero.result | 0 mysql-test/{ => suite/innodb}/r/innodb_bug30919.result | 0 mysql-test/{ => suite/innodb}/r/innodb_bug42419.result | 0 mysql-test/{ => suite/innodb}/r/innodb_gis.result | 0 mysql-test/{ => suite/innodb}/r/innodb_lock_wait_timeout_1.result | 0 mysql-test/{ => suite/innodb}/r/innodb_mysql.result | 0 mysql-test/{ => suite/innodb}/r/innodb_mysql_rbk.result | 0 mysql-test/{ => suite/innodb}/r/innodb_notembedded.result | 0 mysql-test/{ => suite/innodb}/r/innodb_timeout_rollback.result | 0 mysql-test/{ => suite/innodb}/t/innodb-autoinc-optimize.test | 0 mysql-test/{ => suite/innodb}/t/innodb-ucs2.test | 0 .../{ => suite/innodb}/t/innodb_autoinc_lock_mode_zero-master.opt | 0 .../{ => suite/innodb}/t/innodb_autoinc_lock_mode_zero.test | 0 mysql-test/{ => suite/innodb}/t/innodb_bug30919-master.opt | 0 mysql-test/{ => suite/innodb}/t/innodb_bug30919.test | 0 mysql-test/{ => suite/innodb}/t/innodb_bug42419.test | 0 mysql-test/{ => suite/innodb}/t/innodb_gis.test | 0 .../{ => suite/innodb}/t/innodb_lock_wait_timeout_1-master.opt | 0 mysql-test/{ => suite/innodb}/t/innodb_lock_wait_timeout_1.test | 0 mysql-test/{ => suite/innodb}/t/innodb_mysql-master.opt | 0 mysql-test/{ => suite/innodb}/t/innodb_mysql.test | 0 mysql-test/{ => suite/innodb}/t/innodb_mysql_rbk-master.opt | 0 mysql-test/{ => suite/innodb}/t/innodb_mysql_rbk.test | 0 mysql-test/{ => suite/innodb}/t/innodb_notembedded.test | 0 .../{ => suite/innodb}/t/innodb_timeout_rollback-master.opt | 0 mysql-test/{ => suite/innodb}/t/innodb_timeout_rollback.test | 0 28 files changed, 0 insertions(+), 0 deletions(-) rename mysql-test/{ => suite/innodb}/r/innodb-autoinc-optimize.result (100%) rename mysql-test/{ => suite/innodb}/r/innodb-ucs2.result (100%) rename mysql-test/{ => suite/innodb}/r/innodb_autoinc_lock_mode_zero.result (100%) rename mysql-test/{ => suite/innodb}/r/innodb_bug30919.result (100%) rename mysql-test/{ => suite/innodb}/r/innodb_bug42419.result (100%) rename mysql-test/{ => suite/innodb}/r/innodb_gis.result (100%) rename mysql-test/{ => suite/innodb}/r/innodb_lock_wait_timeout_1.result (100%) rename mysql-test/{ => suite/innodb}/r/innodb_mysql.result (100%) rename mysql-test/{ => suite/innodb}/r/innodb_mysql_rbk.result (100%) rename mysql-test/{ => suite/innodb}/r/innodb_notembedded.result (100%) rename mysql-test/{ => suite/innodb}/r/innodb_timeout_rollback.result (100%) rename mysql-test/{ => suite/innodb}/t/innodb-autoinc-optimize.test (100%) rename mysql-test/{ => suite/innodb}/t/innodb-ucs2.test (100%) rename mysql-test/{ => suite/innodb}/t/innodb_autoinc_lock_mode_zero-master.opt (100%) rename mysql-test/{ => suite/innodb}/t/innodb_autoinc_lock_mode_zero.test (100%) rename mysql-test/{ => suite/innodb}/t/innodb_bug30919-master.opt (100%) rename mysql-test/{ => suite/innodb}/t/innodb_bug30919.test (100%) rename mysql-test/{ => suite/innodb}/t/innodb_bug42419.test (100%) rename mysql-test/{ => suite/innodb}/t/innodb_gis.test (100%) rename mysql-test/{ => suite/innodb}/t/innodb_lock_wait_timeout_1-master.opt (100%) rename mysql-test/{ => suite/innodb}/t/innodb_lock_wait_timeout_1.test (100%) rename mysql-test/{ => suite/innodb}/t/innodb_mysql-master.opt (100%) rename mysql-test/{ => suite/innodb}/t/innodb_mysql.test (100%) rename mysql-test/{ => suite/innodb}/t/innodb_mysql_rbk-master.opt (100%) rename mysql-test/{ => suite/innodb}/t/innodb_mysql_rbk.test (100%) rename mysql-test/{ => suite/innodb}/t/innodb_notembedded.test (100%) rename mysql-test/{ => suite/innodb}/t/innodb_timeout_rollback-master.opt (100%) rename mysql-test/{ => suite/innodb}/t/innodb_timeout_rollback.test (100%) diff --git a/mysql-test/r/innodb-autoinc-optimize.result b/mysql-test/suite/innodb/r/innodb-autoinc-optimize.result similarity index 100% rename from mysql-test/r/innodb-autoinc-optimize.result rename to mysql-test/suite/innodb/r/innodb-autoinc-optimize.result diff --git a/mysql-test/r/innodb-ucs2.result b/mysql-test/suite/innodb/r/innodb-ucs2.result similarity index 100% rename from mysql-test/r/innodb-ucs2.result rename to mysql-test/suite/innodb/r/innodb-ucs2.result diff --git a/mysql-test/r/innodb_autoinc_lock_mode_zero.result b/mysql-test/suite/innodb/r/innodb_autoinc_lock_mode_zero.result similarity index 100% rename from mysql-test/r/innodb_autoinc_lock_mode_zero.result rename to mysql-test/suite/innodb/r/innodb_autoinc_lock_mode_zero.result diff --git a/mysql-test/r/innodb_bug30919.result b/mysql-test/suite/innodb/r/innodb_bug30919.result similarity index 100% rename from mysql-test/r/innodb_bug30919.result rename to mysql-test/suite/innodb/r/innodb_bug30919.result diff --git a/mysql-test/r/innodb_bug42419.result b/mysql-test/suite/innodb/r/innodb_bug42419.result similarity index 100% rename from mysql-test/r/innodb_bug42419.result rename to mysql-test/suite/innodb/r/innodb_bug42419.result diff --git a/mysql-test/r/innodb_gis.result b/mysql-test/suite/innodb/r/innodb_gis.result similarity index 100% rename from mysql-test/r/innodb_gis.result rename to mysql-test/suite/innodb/r/innodb_gis.result diff --git a/mysql-test/r/innodb_lock_wait_timeout_1.result b/mysql-test/suite/innodb/r/innodb_lock_wait_timeout_1.result similarity index 100% rename from mysql-test/r/innodb_lock_wait_timeout_1.result rename to mysql-test/suite/innodb/r/innodb_lock_wait_timeout_1.result diff --git a/mysql-test/r/innodb_mysql.result b/mysql-test/suite/innodb/r/innodb_mysql.result similarity index 100% rename from mysql-test/r/innodb_mysql.result rename to mysql-test/suite/innodb/r/innodb_mysql.result diff --git a/mysql-test/r/innodb_mysql_rbk.result b/mysql-test/suite/innodb/r/innodb_mysql_rbk.result similarity index 100% rename from mysql-test/r/innodb_mysql_rbk.result rename to mysql-test/suite/innodb/r/innodb_mysql_rbk.result diff --git a/mysql-test/r/innodb_notembedded.result b/mysql-test/suite/innodb/r/innodb_notembedded.result similarity index 100% rename from mysql-test/r/innodb_notembedded.result rename to mysql-test/suite/innodb/r/innodb_notembedded.result diff --git a/mysql-test/r/innodb_timeout_rollback.result b/mysql-test/suite/innodb/r/innodb_timeout_rollback.result similarity index 100% rename from mysql-test/r/innodb_timeout_rollback.result rename to mysql-test/suite/innodb/r/innodb_timeout_rollback.result diff --git a/mysql-test/t/innodb-autoinc-optimize.test b/mysql-test/suite/innodb/t/innodb-autoinc-optimize.test similarity index 100% rename from mysql-test/t/innodb-autoinc-optimize.test rename to mysql-test/suite/innodb/t/innodb-autoinc-optimize.test diff --git a/mysql-test/t/innodb-ucs2.test b/mysql-test/suite/innodb/t/innodb-ucs2.test similarity index 100% rename from mysql-test/t/innodb-ucs2.test rename to mysql-test/suite/innodb/t/innodb-ucs2.test diff --git a/mysql-test/t/innodb_autoinc_lock_mode_zero-master.opt b/mysql-test/suite/innodb/t/innodb_autoinc_lock_mode_zero-master.opt similarity index 100% rename from mysql-test/t/innodb_autoinc_lock_mode_zero-master.opt rename to mysql-test/suite/innodb/t/innodb_autoinc_lock_mode_zero-master.opt diff --git a/mysql-test/t/innodb_autoinc_lock_mode_zero.test b/mysql-test/suite/innodb/t/innodb_autoinc_lock_mode_zero.test similarity index 100% rename from mysql-test/t/innodb_autoinc_lock_mode_zero.test rename to mysql-test/suite/innodb/t/innodb_autoinc_lock_mode_zero.test diff --git a/mysql-test/t/innodb_bug30919-master.opt b/mysql-test/suite/innodb/t/innodb_bug30919-master.opt similarity index 100% rename from mysql-test/t/innodb_bug30919-master.opt rename to mysql-test/suite/innodb/t/innodb_bug30919-master.opt diff --git a/mysql-test/t/innodb_bug30919.test b/mysql-test/suite/innodb/t/innodb_bug30919.test similarity index 100% rename from mysql-test/t/innodb_bug30919.test rename to mysql-test/suite/innodb/t/innodb_bug30919.test diff --git a/mysql-test/t/innodb_bug42419.test b/mysql-test/suite/innodb/t/innodb_bug42419.test similarity index 100% rename from mysql-test/t/innodb_bug42419.test rename to mysql-test/suite/innodb/t/innodb_bug42419.test diff --git a/mysql-test/t/innodb_gis.test b/mysql-test/suite/innodb/t/innodb_gis.test similarity index 100% rename from mysql-test/t/innodb_gis.test rename to mysql-test/suite/innodb/t/innodb_gis.test diff --git a/mysql-test/t/innodb_lock_wait_timeout_1-master.opt b/mysql-test/suite/innodb/t/innodb_lock_wait_timeout_1-master.opt similarity index 100% rename from mysql-test/t/innodb_lock_wait_timeout_1-master.opt rename to mysql-test/suite/innodb/t/innodb_lock_wait_timeout_1-master.opt diff --git a/mysql-test/t/innodb_lock_wait_timeout_1.test b/mysql-test/suite/innodb/t/innodb_lock_wait_timeout_1.test similarity index 100% rename from mysql-test/t/innodb_lock_wait_timeout_1.test rename to mysql-test/suite/innodb/t/innodb_lock_wait_timeout_1.test diff --git a/mysql-test/t/innodb_mysql-master.opt b/mysql-test/suite/innodb/t/innodb_mysql-master.opt similarity index 100% rename from mysql-test/t/innodb_mysql-master.opt rename to mysql-test/suite/innodb/t/innodb_mysql-master.opt diff --git a/mysql-test/t/innodb_mysql.test b/mysql-test/suite/innodb/t/innodb_mysql.test similarity index 100% rename from mysql-test/t/innodb_mysql.test rename to mysql-test/suite/innodb/t/innodb_mysql.test diff --git a/mysql-test/t/innodb_mysql_rbk-master.opt b/mysql-test/suite/innodb/t/innodb_mysql_rbk-master.opt similarity index 100% rename from mysql-test/t/innodb_mysql_rbk-master.opt rename to mysql-test/suite/innodb/t/innodb_mysql_rbk-master.opt diff --git a/mysql-test/t/innodb_mysql_rbk.test b/mysql-test/suite/innodb/t/innodb_mysql_rbk.test similarity index 100% rename from mysql-test/t/innodb_mysql_rbk.test rename to mysql-test/suite/innodb/t/innodb_mysql_rbk.test diff --git a/mysql-test/t/innodb_notembedded.test b/mysql-test/suite/innodb/t/innodb_notembedded.test similarity index 100% rename from mysql-test/t/innodb_notembedded.test rename to mysql-test/suite/innodb/t/innodb_notembedded.test diff --git a/mysql-test/t/innodb_timeout_rollback-master.opt b/mysql-test/suite/innodb/t/innodb_timeout_rollback-master.opt similarity index 100% rename from mysql-test/t/innodb_timeout_rollback-master.opt rename to mysql-test/suite/innodb/t/innodb_timeout_rollback-master.opt diff --git a/mysql-test/t/innodb_timeout_rollback.test b/mysql-test/suite/innodb/t/innodb_timeout_rollback.test similarity index 100% rename from mysql-test/t/innodb_timeout_rollback.test rename to mysql-test/suite/innodb/t/innodb_timeout_rollback.test From 5f336d9956e558baca964e15aac9135b6d4ad2a4 Mon Sep 17 00:00:00 2001 From: Jimmy Yang Date: Thu, 3 Jun 2010 06:37:01 -0700 Subject: [PATCH 03/12] Remove the unneccesary innobase_strcasecmp() in innobase_get_mysql_key_number_for_index() created as a bug fix for #53592 since dict_table_t could already unique identify the table. --- storage/innobase/handler/ha_innodb.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 86246e62eee..21d30dc4904 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -7610,8 +7610,7 @@ innobase_get_mysql_key_number_for_index( /* If index does not belong to the table of share structure. Search index->table instead */ - if (index->table != ib_table - && innobase_strcasecmp(index->table->name, share->table_name)) { + if (index->table != ib_table) { i = 0; ind = dict_table_get_first_index(index->table); From d264c3afbccaf1a4ffd0e08ab30df29f96784f1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Tue, 8 Jun 2010 14:47:34 +0300 Subject: [PATCH 04/12] =?UTF-8?q?Merge=20a=20change=20from=20mysql-5.1-inn?= =?UTF-8?q?odb:=20--------------------------------------------------------?= =?UTF-8?q?----=20revno:=203502=20revision-id:=20marko.makela@oracle.com-2?= =?UTF-8?q?0100608114055-7b04ytuqz0lde6v1=20parent:=20jimmy.yang@oracle.co?= =?UTF-8?q?m-20100603134448-itzduhwgbw0b8nlh=20committer:=20Marko=20M?= =?UTF-8?q?=C3=A4kel=C3=A4=20=20branch=20nick:=20?= =?UTF-8?q?5.1-innodb=20timestamp:=20Tue=202010-06-08=2014:40:55=20+0300?= =?UTF-8?q?=20message:=20=20=20buf=5Fpage=5Fget=5Fgen():=20Pass=20file,lin?= =?UTF-8?q?e=20to=20rw=5Flock=5Fx=5Flock().?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- storage/innobase/buf/buf0buf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c index ae228732270..4b6b0a82486 100644 --- a/storage/innobase/buf/buf0buf.c +++ b/storage/innobase/buf/buf0buf.c @@ -2957,7 +2957,7 @@ wait_until_unfixed: block->page.buf_fix_count = 1; buf_block_set_io_fix(block, BUF_IO_READ); - rw_lock_x_lock(&block->lock); + rw_lock_x_lock_func(&block->lock, 0, file, line); UNIV_MEM_INVALID(bpage, sizeof *bpage); From a9c223cf05356e057fcc7c394d4938ab680f5543 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Tue, 8 Jun 2010 15:26:45 +0300 Subject: [PATCH 05/12] =?UTF-8?q?Merge=20a=20change=20from=20mysql-5.1-inn?= =?UTF-8?q?odb:=20--------------------------------------------------------?= =?UTF-8?q?----=20revno:=203503=20revision-id:=20marko.makela@oracle.com-2?= =?UTF-8?q?0100608121041-l7t9r6lrpx6lh361=20parent:=20marko.makela@oracle.?= =?UTF-8?q?com-20100608114055-7b04ytuqz0lde6v1=20committer:=20Marko=20M?= =?UTF-8?q?=C3=A4kel=C3=A4=20=20branch=20nick:=20?= =?UTF-8?q?5.1-innodb=20timestamp:=20Tue=202010-06-08=2015:10:41=20+0300?= =?UTF-8?q?=20message:=20=20=20Bug#54009:=20Server=20crashes=20when=20data?= =?UTF-8?q?=20is=20selected=20from=20non=20backed=20up=20table=20=20=20for?= =?UTF-8?q?=20InnoDB=20plugin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit dict_load_table(): Pass the correct tablespace flags to fil_open_single_table_tablespace(). For ROW_FORMAT=COMPACT and REDUNDANT, the tablespace flags are 0. The table flags would be 0 or DICT_TF_COMPACT. --- storage/innobase/dict/dict0load.c | 1 + 1 file changed, 1 insertion(+) diff --git a/storage/innobase/dict/dict0load.c b/storage/innobase/dict/dict0load.c index b061fe696c1..6bf2c1d9d81 100644 --- a/storage/innobase/dict/dict0load.c +++ b/storage/innobase/dict/dict0load.c @@ -1694,6 +1694,7 @@ err_exit: /* Try to open the tablespace */ if (!fil_open_single_table_tablespace( TRUE, table->space, + table->flags == DICT_TF_COMPACT ? 0 : table->flags & ~(~0 << DICT_TF_BITS), name)) { /* We failed to find a sensible tablespace file */ From 28ec745704a231ce7064b14c2d94cf2b9bf7408c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Mon, 14 Jun 2010 09:35:01 +0300 Subject: [PATCH 06/12] Merge a change from mysql-5.1-innodb: ------------------------------------------------------------ revno: 3506 revision-id: sergey.glukhov@sun.com-20100609121718-04mpk5kjxvnrxdu8 parent: sergey.glukhov@sun.com-20100609120734-ndy2281wau9067zv committer: Sergey Glukhov branch nick: mysql-5.1-innodb timestamp: Wed 2010-06-09 16:17:18 +0400 message: Bug#38999 valgrind warnings for update statement in function compare_record() (InnoDB plugin branch) @ mysql-test/suite/innodb_plugin/r/innodb_mysql.result test case @ mysql-test/suite/innodb_plugin/t/innodb_mysql.test test case @ storage/innodb_plugin/row/row0sel.c init null bytes with default values as they might be left uninitialized in some cases and these uninited bytes might be copied into mysql record buffer that leads to valgrind warnings on next use of the buffer. --- mysql-test/suite/innodb/r/innodb_mysql.result | 12 ++++++++++++ mysql-test/suite/innodb/t/innodb_mysql.test | 14 ++++++++++++++ storage/innobase/row/row0sel.c | 6 ++++++ 3 files changed, 32 insertions(+) diff --git a/mysql-test/suite/innodb/r/innodb_mysql.result b/mysql-test/suite/innodb/r/innodb_mysql.result index 1845b32564d..90ced3c8b16 100644 --- a/mysql-test/suite/innodb/r/innodb_mysql.result +++ b/mysql-test/suite/innodb/r/innodb_mysql.result @@ -2413,6 +2413,18 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 const PRIMARY NULL NULL NULL 1 Impossible ON condition 1 SIMPLE t2 ALL NULL NULL NULL NULL 3 Using where DROP TABLE t1,t2; +# +# Bug#38999 valgrind warnings for update statement in function compare_record() +# +CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB; +CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=InnoDB; +INSERT INTO t1 values (1),(2),(3),(4),(5); +INSERT INTO t2 values (1); +SELECT * FROM t1 WHERE a = 2; +a +2 +UPDATE t1,t2 SET t1.a = t1.a + 100 WHERE t1.a = 1; +DROP TABLE t1,t2; End of 5.1 tests # # Test for bug #39932 "create table fails if column for FK is in different diff --git a/mysql-test/suite/innodb/t/innodb_mysql.test b/mysql-test/suite/innodb/t/innodb_mysql.test index f2c770cce42..c49b215887b 100644 --- a/mysql-test/suite/innodb/t/innodb_mysql.test +++ b/mysql-test/suite/innodb/t/innodb_mysql.test @@ -649,6 +649,20 @@ EXPLAIN SELECT t1.id,t2.id FROM t2 LEFT JOIN t1 ON t1.id>=74 AND t1.id<=0 DROP TABLE t1,t2; +--echo # +--echo # Bug#38999 valgrind warnings for update statement in function compare_record() +--echo # + +CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB; +CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=InnoDB; +INSERT INTO t1 values (1),(2),(3),(4),(5); +INSERT INTO t2 values (1); + +SELECT * FROM t1 WHERE a = 2; +UPDATE t1,t2 SET t1.a = t1.a + 100 WHERE t1.a = 1; + +DROP TABLE t1,t2; + --echo End of 5.1 tests diff --git a/storage/innobase/row/row0sel.c b/storage/innobase/row/row0sel.c index a5bf361661b..2861235a995 100644 --- a/storage/innobase/row/row0sel.c +++ b/storage/innobase/row/row0sel.c @@ -2678,6 +2678,12 @@ row_sel_store_mysql_rec( prebuilt->blob_heap = NULL; } + /* init null bytes with default values as they might be + left uninitialized in some cases and these uninited bytes + might be copied into mysql record buffer that leads to + valgrind warnings */ + memcpy(mysql_rec, prebuilt->default_rec, prebuilt->null_bitmap_len); + for (i = 0; i < prebuilt->n_template; i++) { templ = prebuilt->mysql_template + i; From ac3c92e435e94b96f8ae942d28a9f80f9d9427c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Mon, 14 Jun 2010 09:50:30 +0300 Subject: [PATCH 07/12] =?UTF-8?q?Merge=20a=20change=20from=20mysql-5.1-inn?= =?UTF-8?q?odb:=20--------------------------------------------------------?= =?UTF-8?q?----=20revno:=203507=20revision-id:=20marko.makela@oracle.com-2?= =?UTF-8?q?0100610125623-ar6qf4w2pv2kr7mb=20parent:=20sergey.glukhov@sun.c?= =?UTF-8?q?om-20100609121718-04mpk5kjxvnrxdu8=20committer:=20Marko=20M?= =?UTF-8?q?=C3=A4kel=C3=A4=20=20branch=20nick:=20?= =?UTF-8?q?5.1-innodb=20timestamp:=20Thu=202010-06-10=2015:56:23=20+0300?= =?UTF-8?q?=20message:=20=20=20Bug=20#38999:=20Re-enable=20innodb=5Fmulti?= =?UTF-8?q?=5Fupdate.test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mysql-test/suite/innodb/t/disabled.def | 1 - 1 file changed, 1 deletion(-) diff --git a/mysql-test/suite/innodb/t/disabled.def b/mysql-test/suite/innodb/t/disabled.def index da04138fd0a..888298bbb09 100644 --- a/mysql-test/suite/innodb/t/disabled.def +++ b/mysql-test/suite/innodb/t/disabled.def @@ -9,4 +9,3 @@ # Do not use any TAB characters for whitespace. # ############################################################################## -innodb_multi_update: Bug #38999 2010-05-05 mmakela Valgrind warnings From 5a0b9cd2968839759f783f7b869852fafa8ef8f7 Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Tue, 15 Jun 2010 17:51:57 +0300 Subject: [PATCH 08/12] Increment InnoDB version number from 1.1.1 to 1.1.2, the 1.1.1 release will be included inside MySQL 5.5.5 and is up to (inclusive): vasil.dimov@oracle.com-20100602124314-21l3cb27w4rbfqrq --- storage/innobase/include/univ.i | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/innobase/include/univ.i b/storage/innobase/include/univ.i index 11cec113fc8..15acb81f0d8 100644 --- a/storage/innobase/include/univ.i +++ b/storage/innobase/include/univ.i @@ -46,7 +46,7 @@ Created 1/20/1994 Heikki Tuuri #define INNODB_VERSION_MAJOR 1 #define INNODB_VERSION_MINOR 1 -#define INNODB_VERSION_BUGFIX 1 +#define INNODB_VERSION_BUGFIX 2 /* The following is the InnoDB version as shown in SELECT plugin_version FROM information_schema.plugins; From 8ccbb4211bcbcddb9a5e6bbd35c426b6e5cbaece Mon Sep 17 00:00:00 2001 From: Sunny Bains Date: Thu, 17 Jun 2010 11:06:13 +1000 Subject: [PATCH 09/12] Revert a change that should have been a part of 3008.2.76..3008.2.78. --- storage/innobase/srv/srv0srv.c | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c index b1f3a543b07..5bdeca7b01d 100644 --- a/storage/innobase/srv/srv0srv.c +++ b/storage/innobase/srv/srv0srv.c @@ -2371,30 +2371,6 @@ loop: OS_THREAD_DUMMY_RETURN; } -/******************************************************************//** -Increment the server activity count. */ -UNIV_INLINE -void -srv_inc_activity_count_low(void) -/*============================*/ -{ - mutex_enter(&kernel_mutex); - - ++srv_activity_count; - - mutex_exit(&kernel_mutex); -} - -/******************************************************************//** -Increment the server activity count. */ -UNIV_INTERN -void -srv_inc_activity_count(void) -/*========================*/ -{ - srv_inc_activity_count_low(); -} - /**********************************************************************//** Check whether any background thread is active. @return FALSE if all are are suspended or have exited. */ @@ -2431,9 +2407,7 @@ void srv_active_wake_master_thread(void) /*===============================*/ { - ut_ad(!mutex_own(&kernel_mutex)); - - srv_inc_activity_count_low(); + srv_activity_count++; if (srv_n_threads_active[SRV_MASTER] == 0) { From 0cbc668fc2583c44600256e5800f4a158302e855 Mon Sep 17 00:00:00 2001 From: Jimmy Yang Date: Thu, 17 Jun 2010 02:13:53 -0700 Subject: [PATCH 10/12] This change splits innodb_file_format_check into innodb_file_format_check and innodb_file_format_max two system variables. And this also fixes bug #53654 after 2nd shutdown innodb_file_format_check attains strange values. rb://366 approved by Marko --- mysql-test/suite/innodb/r/innodb-index.result | 2 +- mysql-test/suite/innodb/r/innodb-zip.result | 20 +- .../suite/innodb/r/innodb_bug47167.result | 42 ++-- .../suite/innodb/r/innodb_bug52745.result | 2 +- .../suite/innodb/r/innodb_bug53591.result | 2 +- .../suite/innodb/r/innodb_file_format.result | 35 ++-- .../suite/innodb/t/innodb-autoinc-44030.test | 4 +- mysql-test/suite/innodb/t/innodb-autoinc.test | 4 +- mysql-test/suite/innodb/t/innodb-index.test | 6 +- mysql-test/suite/innodb/t/innodb-zip.test | 16 +- .../suite/innodb/t/innodb_bug36172.test | 4 +- .../suite/innodb/t/innodb_bug47167.test | 45 ++-- .../suite/innodb/t/innodb_bug52745.test | 4 +- .../suite/innodb/t/innodb_bug53591.test | 4 +- .../suite/innodb/t/innodb_file_format.test | 28 ++- mysql-test/suite/sys_vars/r/all_vars.result | 2 + .../r/innodb_file_format_check_basic.result | 84 ++++---- .../t/innodb_file_format_check_basic.test | 46 ++--- storage/innobase/handler/ha_innodb.cc | 195 ++++++++---------- storage/innobase/include/dict0mem.h | 4 + storage/innobase/include/srv0srv.h | 2 +- storage/innobase/srv/srv0srv.c | 2 +- storage/innobase/srv/srv0start.c | 2 +- storage/innobase/trx/trx0sys.c | 8 +- 24 files changed, 277 insertions(+), 286 deletions(-) diff --git a/mysql-test/suite/innodb/r/innodb-index.result b/mysql-test/suite/innodb/r/innodb-index.result index 5d67a06b80f..e43f70a2365 100644 --- a/mysql-test/suite/innodb/r/innodb-index.result +++ b/mysql-test/suite/innodb/r/innodb-index.result @@ -920,7 +920,7 @@ create index t1u on t1 (u(1)); drop table t1; set global innodb_file_per_table=0; set global innodb_file_format=Antelope; -set global innodb_file_format_check=Antelope; +set global innodb_file_format_max=Antelope; SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; CREATE TABLE t1( diff --git a/mysql-test/suite/innodb/r/innodb-zip.result b/mysql-test/suite/innodb/r/innodb-zip.result index bcd3849238f..6c93f4bb6ca 100644 --- a/mysql-test/suite/innodb/r/innodb-zip.result +++ b/mysql-test/suite/innodb/r/innodb-zip.result @@ -397,25 +397,25 @@ set global innodb_file_per_table=0; set global innodb_file_format=Antelope; set global innodb_file_per_table=on; set global innodb_file_format=`Barracuda`; -set global innodb_file_format_check=`Antelope`; +set global innodb_file_format_max=`Antelope`; create table normal_table ( c1 int ) engine = innodb; -select @@innodb_file_format_check; -@@innodb_file_format_check +select @@innodb_file_format_max; +@@innodb_file_format_max Antelope create table zip_table ( c1 int ) engine = innodb key_block_size = 8; -select @@innodb_file_format_check; -@@innodb_file_format_check +select @@innodb_file_format_max; +@@innodb_file_format_max Barracuda -set global innodb_file_format_check=`Antelope`; -select @@innodb_file_format_check; -@@innodb_file_format_check +set global innodb_file_format_max=`Antelope`; +select @@innodb_file_format_max; +@@innodb_file_format_max Antelope show table status; -select @@innodb_file_format_check; -@@innodb_file_format_check +select @@innodb_file_format_max; +@@innodb_file_format_max Barracuda drop table normal_table, zip_table; diff --git a/mysql-test/suite/innodb/r/innodb_bug47167.result b/mysql-test/suite/innodb/r/innodb_bug47167.result index cf8cb0c0d7b..656a4846a52 100644 --- a/mysql-test/suite/innodb/r/innodb_bug47167.result +++ b/mysql-test/suite/innodb/r/innodb_bug47167.result @@ -1,24 +1,24 @@ -set @old_innodb_file_format_check=@@innodb_file_format_check; -select @old_innodb_file_format_check; -@old_innodb_file_format_check +set @old_innodb_file_format_max=@@innodb_file_format_max; +select @old_innodb_file_format_max; +@old_innodb_file_format_max Antelope -set global innodb_file_format_check = Barracuda; -select @@innodb_file_format_check; -@@innodb_file_format_check +set global innodb_file_format_max = Barracuda; +select @@innodb_file_format_max; +@@innodb_file_format_max Barracuda -set global innodb_file_format_check = DEFAULT; -select @@innodb_file_format_check; -@@innodb_file_format_check -Barracuda -set global innodb_file_format_check = @old_innodb_file_format_check; -select @@innodb_file_format_check; -@@innodb_file_format_check +set global innodb_file_format_max = DEFAULT; +select @@innodb_file_format_max; +@@innodb_file_format_max Antelope -set global innodb_file_format_check = cheetah; -ERROR 42000: Variable 'innodb_file_format_check' can't be set to the value of 'cheetah' -set global innodb_file_format_check = Bear; -ERROR 42000: Variable 'innodb_file_format_check' can't be set to the value of 'Bear' -set global innodb_file_format_check = on; -ERROR 42000: Variable 'innodb_file_format_check' can't be set to the value of 'ON' -set global innodb_file_format_check = off; -ERROR 42000: Variable 'innodb_file_format_check' can't be set to the value of 'off' +set global innodb_file_format_max = @old_innodb_file_format_max; +select @@innodb_file_format_max; +@@innodb_file_format_max +Antelope +set global innodb_file_format_max = cheetah; +ERROR 42000: Variable 'innodb_file_format_max' can't be set to the value of 'cheetah' +set global innodb_file_format_max = Bear; +ERROR 42000: Variable 'innodb_file_format_max' can't be set to the value of 'Bear' +set global innodb_file_format_max = on; +ERROR 42000: Variable 'innodb_file_format_max' can't be set to the value of 'ON' +set global innodb_file_format_max = off; +ERROR 42000: Variable 'innodb_file_format_max' can't be set to the value of 'off' diff --git a/mysql-test/suite/innodb/r/innodb_bug52745.result b/mysql-test/suite/innodb/r/innodb_bug52745.result index 254c6525257..d746fb427b5 100644 --- a/mysql-test/suite/innodb/r/innodb_bug52745.result +++ b/mysql-test/suite/innodb/r/innodb_bug52745.result @@ -126,5 +126,5 @@ Warning 1265 Data truncated for column 'col79' at row 1 Warning 1264 Out of range value for column 'col84' at row 1 DROP TABLE bug52745; SET GLOBAL innodb_file_format=Antelope; -SET GLOBAL innodb_file_format_check=Antelope; +SET GLOBAL innodb_file_format_max=Antelope; SET GLOBAL innodb_file_per_table=0; diff --git a/mysql-test/suite/innodb/r/innodb_bug53591.result b/mysql-test/suite/innodb/r/innodb_bug53591.result index 1f05b6d2a57..d3f8dfeafc2 100644 --- a/mysql-test/suite/innodb/r/innodb_bug53591.result +++ b/mysql-test/suite/innodb/r/innodb_bug53591.result @@ -12,5 +12,5 @@ Error 1118 Row size too large. The maximum row size for the used table type, not Error 1030 Got error 139 from storage engine DROP TABLE bug53591; SET GLOBAL innodb_file_format=Antelope; -SET GLOBAL innodb_file_format_check=Antelope; +SET GLOBAL innodb_file_format_max=Antelope; SET GLOBAL innodb_file_per_table=0; diff --git a/mysql-test/suite/innodb/r/innodb_file_format.result b/mysql-test/suite/innodb/r/innodb_file_format.result index 6a573d8658e..70cfc9e4f47 100644 --- a/mysql-test/suite/innodb/r/innodb_file_format.result +++ b/mysql-test/suite/innodb/r/innodb_file_format.result @@ -3,6 +3,9 @@ select @@innodb_file_format; Antelope select @@innodb_file_format_check; @@innodb_file_format_check +1 +select @@innodb_file_format_max; +@@innodb_file_format_max Antelope set global innodb_file_format=antelope; set global innodb_file_format=barracuda; @@ -22,22 +25,26 @@ ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'off' select @@innodb_file_format; @@innodb_file_format Antelope -set global innodb_file_format_check=antelope; -set global innodb_file_format_check=barracuda; -set global innodb_file_format_check=cheetah; -ERROR 42000: Variable 'innodb_file_format_check' can't be set to the value of 'cheetah' -select @@innodb_file_format_check; -@@innodb_file_format_check -Barracuda -set global innodb_file_format_check=default; -select @@innodb_file_format_check; -@@innodb_file_format_check +set global innodb_file_format_max=antelope; +set global innodb_file_format_max=barracuda; +set global innodb_file_format_max=cheetah; +ERROR 42000: Variable 'innodb_file_format_max' can't be set to the value of 'cheetah' +select @@innodb_file_format_max; +@@innodb_file_format_max Barracuda +set global innodb_file_format_max=default; +select @@innodb_file_format_max; +@@innodb_file_format_max +Antelope set global innodb_file_format=on; ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'ON' set global innodb_file_format=off; ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'off' -select @@innodb_file_format_check; -@@innodb_file_format_check -Barracuda -set global innodb_file_format_check=antelope; +select @@innodb_file_format_max; +@@innodb_file_format_max +Antelope +set global innodb_file_format_max=antelope; +set global innodb_file_format_check=off; +ERROR HY000: Variable 'innodb_file_format_check' is a read only variable +SET GLOBAL innodb_file_format=Antelope; +SET GLOBAL innodb_file_format_max=Antelope; diff --git a/mysql-test/suite/innodb/t/innodb-autoinc-44030.test b/mysql-test/suite/innodb/t/innodb-autoinc-44030.test index 17c836004a1..790646fe13b 100644 --- a/mysql-test/suite/innodb/t/innodb-autoinc-44030.test +++ b/mysql-test/suite/innodb/t/innodb-autoinc-44030.test @@ -2,7 +2,7 @@ # embedded server ignores 'delayed', so skip this -- source include/not_embedded.inc -let $innodb_file_format_check_orig=`select @@innodb_file_format_check`; +let $innodb_file_format_max_orig=`select @@innodb_file_format_max`; --disable_warnings drop table if exists t1; @@ -40,4 +40,4 @@ DROP TABLE t1; # -- disable_query_log -eval SET GLOBAL innodb_file_format_check=$innodb_file_format_check_orig; +eval SET GLOBAL innodb_file_format_max=$innodb_file_format_max_orig; diff --git a/mysql-test/suite/innodb/t/innodb-autoinc.test b/mysql-test/suite/innodb/t/innodb-autoinc.test index c1cae16153e..a8e853baef7 100644 --- a/mysql-test/suite/innodb/t/innodb-autoinc.test +++ b/mysql-test/suite/innodb/t/innodb-autoinc.test @@ -2,7 +2,7 @@ # embedded server ignores 'delayed', so skip this -- source include/not_embedded.inc -let $innodb_file_format_check_orig=`select @@innodb_file_format_check`; +let $innodb_file_format_max_orig=`select @@innodb_file_format_max`; --disable_warnings drop table if exists t1; @@ -671,4 +671,4 @@ DROP TABLE t1; # -- disable_query_log -eval SET GLOBAL innodb_file_format_check=$innodb_file_format_check_orig; +eval SET GLOBAL innodb_file_format_max=$innodb_file_format_max_orig; diff --git a/mysql-test/suite/innodb/t/innodb-index.test b/mysql-test/suite/innodb/t/innodb-index.test index f7cf3050704..05d1d37c422 100644 --- a/mysql-test/suite/innodb/t/innodb-index.test +++ b/mysql-test/suite/innodb/t/innodb-index.test @@ -2,7 +2,7 @@ let $MYSQLD_DATADIR= `select @@datadir`; -let $innodb_file_format_check_orig=`select @@innodb_file_format_check`; +let $innodb_file_format_max_orig=`select @@innodb_file_format_max`; create table t1(a int not null, b int, c char(10) not null, d varchar(20)) engine = innodb; insert into t1 values (5,5,'oo','oo'),(4,4,'tr','tr'),(3,4,'ad','ad'),(2,3,'ak','ak'); @@ -403,7 +403,7 @@ create index t1u on t1 (u(1)); drop table t1; eval set global innodb_file_per_table=$per_table; eval set global innodb_file_format=$format; -eval set global innodb_file_format_check=$format; +eval set global innodb_file_format_max=$format; # # Test to check whether CREATE INDEX handles implicit foreign key @@ -550,4 +550,4 @@ DROP TABLE t1; # -- disable_query_log -eval SET GLOBAL innodb_file_format_check=$innodb_file_format_check_orig; +eval SET GLOBAL innodb_file_format_max=$innodb_file_format_max_orig; diff --git a/mysql-test/suite/innodb/t/innodb-zip.test b/mysql-test/suite/innodb/t/innodb-zip.test index 8ba83517b44..3acd7e42fa6 100644 --- a/mysql-test/suite/innodb/t/innodb-zip.test +++ b/mysql-test/suite/innodb/t/innodb-zip.test @@ -2,7 +2,7 @@ let $per_table=`select @@innodb_file_per_table`; let $format=`select @@innodb_file_format`; -let $innodb_file_format_check_orig=`select @@innodb_file_format_check`; +let $innodb_file_format_max_orig=`select @@innodb_file_format_max`; set global innodb_file_per_table=off; set global innodb_file_format=`0`; @@ -316,21 +316,21 @@ eval set global innodb_file_format=$format; -- disable_info set global innodb_file_per_table=on; set global innodb_file_format=`Barracuda`; -set global innodb_file_format_check=`Antelope`; +set global innodb_file_format_max=`Antelope`; create table normal_table ( c1 int ) engine = innodb; -select @@innodb_file_format_check; +select @@innodb_file_format_max; create table zip_table ( c1 int ) engine = innodb key_block_size = 8; -select @@innodb_file_format_check; -set global innodb_file_format_check=`Antelope`; -select @@innodb_file_format_check; +select @@innodb_file_format_max; +set global innodb_file_format_max=`Antelope`; +select @@innodb_file_format_max; -- disable_result_log show table status; -- enable_result_log -select @@innodb_file_format_check; +select @@innodb_file_format_max; drop table normal_table, zip_table; -- disable_result_log @@ -341,4 +341,4 @@ drop table normal_table, zip_table; -- disable_query_log eval set global innodb_file_format=$format; eval set global innodb_file_per_table=$per_table; -eval set global innodb_file_format_check=$innodb_file_format_check_orig; +eval set global innodb_file_format_max=$innodb_file_format_max_orig; diff --git a/mysql-test/suite/innodb/t/innodb_bug36172.test b/mysql-test/suite/innodb/t/innodb_bug36172.test index c6c4e6fae47..6f5dd7629ff 100644 --- a/mysql-test/suite/innodb/t/innodb_bug36172.test +++ b/mysql-test/suite/innodb/t/innodb_bug36172.test @@ -15,7 +15,7 @@ SET storage_engine=InnoDB; -- disable_result_log let $file_format=`select @@innodb_file_format`; -let $file_format_check=`select @@innodb_file_format_check`; +let $file_format_max=`select @@innodb_file_format_max`; let $file_per_table=`select @@innodb_file_per_table`; SET GLOBAL innodb_file_format='Barracuda'; SET GLOBAL innodb_file_per_table=on; @@ -28,5 +28,5 @@ INSERT IGNORE INTO `table0` SET `col19` = '19940127002709', `col20` = 2383927.90 CHECK TABLE table0 EXTENDED; DROP TABLE table0; EVAL SET GLOBAL innodb_file_format=$file_format; -EVAL SET GLOBAL innodb_file_format_check=$file_format_check; +EVAL SET GLOBAL innodb_file_format_max=$file_format_max; EVAL SET GLOBAL innodb_file_per_table=$file_per_table; diff --git a/mysql-test/suite/innodb/t/innodb_bug47167.test b/mysql-test/suite/innodb/t/innodb_bug47167.test index 9b8bff0292f..622182acefa 100644 --- a/mysql-test/suite/innodb/t/innodb_bug47167.test +++ b/mysql-test/suite/innodb/t/innodb_bug47167.test @@ -1,45 +1,44 @@ -# This is the unit test for bug *47167. -# It tests setting the global variable -# "innodb_file_format_check" with a -# user-Defined Variable. +# This is the unit test for bug #47167. +# It tests setting the global variable "innodb_file_format_max" ( +# originally "innodb_file_format_check") with a user-Defined Variable. --source include/have_innodb.inc -# Save the value (Antelope) in 'innodb_file_format_check' to -# 'old_innodb_file_format_check' -set @old_innodb_file_format_check=@@innodb_file_format_check; +# Save the value (Antelope) in 'innodb_file_format_max' to +# 'old_innodb_file_format_max' +set @old_innodb_file_format_max=@@innodb_file_format_max; -# @old_innodb_file_format_check shall have the value of 'Antelope' -select @old_innodb_file_format_check; +# @old_innodb_file_format_max shall have the value of 'Antelope' +select @old_innodb_file_format_max; -# Reset the value in 'innodb_file_format_check' to 'Barracuda' -set global innodb_file_format_check = Barracuda; +# Reset the value in 'innodb_file_format_max' to 'Barracuda' +set global innodb_file_format_max = Barracuda; -select @@innodb_file_format_check; +select @@innodb_file_format_max; -# Set 'innodb_file_format_check' to its default value, which +# Set 'innodb_file_format_max' to its default value, which # is the latest file format supported in the current release. -set global innodb_file_format_check = DEFAULT; +set global innodb_file_format_max = DEFAULT; -select @@innodb_file_format_check; +select @@innodb_file_format_max; -# Put the saved value back to 'innodb_file_format_check' -set global innodb_file_format_check = @old_innodb_file_format_check; +# Put the saved value back to 'innodb_file_format_max' +set global innodb_file_format_max = @old_innodb_file_format_max; -# Check whether 'innodb_file_format_check' get its original value. -select @@innodb_file_format_check; +# Check whether 'innodb_file_format_max' get its original value. +select @@innodb_file_format_max; # Following are negative tests, all should fail. --disable_warnings --error ER_WRONG_VALUE_FOR_VAR -set global innodb_file_format_check = cheetah; +set global innodb_file_format_max = cheetah; --error ER_WRONG_VALUE_FOR_VAR -set global innodb_file_format_check = Bear; +set global innodb_file_format_max = Bear; --error ER_WRONG_VALUE_FOR_VAR -set global innodb_file_format_check = on; +set global innodb_file_format_max = on; --error ER_WRONG_VALUE_FOR_VAR -set global innodb_file_format_check = off; +set global innodb_file_format_max = off; --enable_warnings diff --git a/mysql-test/suite/innodb/t/innodb_bug52745.test b/mysql-test/suite/innodb/t/innodb_bug52745.test index d2de869648b..686ca705ab7 100644 --- a/mysql-test/suite/innodb/t/innodb_bug52745.test +++ b/mysql-test/suite/innodb/t/innodb_bug52745.test @@ -1,7 +1,7 @@ -- source include/have_innodb.inc let $file_format=`select @@innodb_file_format`; -let $file_format_check=`select @@innodb_file_format_check`; +let $file_format_max=`select @@innodb_file_format_max`; let $file_per_table=`select @@innodb_file_per_table`; SET GLOBAL innodb_file_format='Barracuda'; SET GLOBAL innodb_file_per_table=on; @@ -105,5 +105,5 @@ SHOW WARNINGS; DROP TABLE bug52745; EVAL SET GLOBAL innodb_file_format=$file_format; -EVAL SET GLOBAL innodb_file_format_check=$file_format_check; +EVAL SET GLOBAL innodb_file_format_max=$file_format_max; EVAL SET GLOBAL innodb_file_per_table=$file_per_table; diff --git a/mysql-test/suite/innodb/t/innodb_bug53591.test b/mysql-test/suite/innodb/t/innodb_bug53591.test index 58a7596dff9..e0e568034d8 100644 --- a/mysql-test/suite/innodb/t/innodb_bug53591.test +++ b/mysql-test/suite/innodb/t/innodb_bug53591.test @@ -1,7 +1,7 @@ -- source include/have_innodb.inc let $file_format=`select @@innodb_file_format`; -let $file_format_check=`select @@innodb_file_format_check`; +let $file_format_max=`select @@innodb_file_format_max`; let $file_per_table=`select @@innodb_file_per_table`; SET GLOBAL innodb_file_format='Barracuda'; @@ -18,5 +18,5 @@ SHOW WARNINGS; DROP TABLE bug53591; EVAL SET GLOBAL innodb_file_format=$file_format; -EVAL SET GLOBAL innodb_file_format_check=$file_format_check; +EVAL SET GLOBAL innodb_file_format_max=$file_format_max; EVAL SET GLOBAL innodb_file_per_table=$file_per_table; diff --git a/mysql-test/suite/innodb/t/innodb_file_format.test b/mysql-test/suite/innodb/t/innodb_file_format.test index 5d094cb9dba..26c3646c0dd 100644 --- a/mysql-test/suite/innodb/t/innodb_file_format.test +++ b/mysql-test/suite/innodb/t/innodb_file_format.test @@ -1,7 +1,11 @@ -- source include/have_innodb.inc +let $innodb_file_format_orig=`select @@innodb_file_format`; +let $innodb_file_format_max_orig=`select @@innodb_file_format_max`; + select @@innodb_file_format; select @@innodb_file_format_check; +select @@innodb_file_format_max; set global innodb_file_format=antelope; set global innodb_file_format=barracuda; --error ER_WRONG_VALUE_FOR_VAR @@ -14,16 +18,24 @@ set global innodb_file_format=on; --error ER_WRONG_VALUE_FOR_VAR set global innodb_file_format=off; select @@innodb_file_format; -set global innodb_file_format_check=antelope; -set global innodb_file_format_check=barracuda; +set global innodb_file_format_max=antelope; +set global innodb_file_format_max=barracuda; --error ER_WRONG_VALUE_FOR_VAR -set global innodb_file_format_check=cheetah; -select @@innodb_file_format_check; -set global innodb_file_format_check=default; -select @@innodb_file_format_check; +set global innodb_file_format_max=cheetah; +select @@innodb_file_format_max; +set global innodb_file_format_max=default; +select @@innodb_file_format_max; --error ER_WRONG_VALUE_FOR_VAR set global innodb_file_format=on; --error ER_WRONG_VALUE_FOR_VAR set global innodb_file_format=off; -select @@innodb_file_format_check; -set global innodb_file_format_check=antelope; +select @@innodb_file_format_max; +set global innodb_file_format_max=antelope; + +# innodb_file_format_check is read only variable, can be +# set as server startup parameter +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +set global innodb_file_format_check=off; + +eval SET GLOBAL innodb_file_format=$innodb_file_format_orig; +eval SET GLOBAL innodb_file_format_max=$innodb_file_format_max_orig; diff --git a/mysql-test/suite/sys_vars/r/all_vars.result b/mysql-test/suite/sys_vars/r/all_vars.result index 0f741ff930a..7f6dca3eb7b 100644 --- a/mysql-test/suite/sys_vars/r/all_vars.result +++ b/mysql-test/suite/sys_vars/r/all_vars.result @@ -10,5 +10,7 @@ There should be *no* long test name listed below: select variable_name as `There should be *no* variables listed below:` from t2 left join t1 on variable_name=test_name where test_name is null; There should be *no* variables listed below: +INNODB_FILE_FORMAT_MAX +INNODB_FILE_FORMAT_MAX drop table t1; drop table t2; diff --git a/mysql-test/suite/sys_vars/r/innodb_file_format_check_basic.result b/mysql-test/suite/sys_vars/r/innodb_file_format_check_basic.result index 29be30cf096..c59e1b802f4 100644 --- a/mysql-test/suite/sys_vars/r/innodb_file_format_check_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_file_format_check_basic.result @@ -1,59 +1,59 @@ -SET @start_global_value = @@global.innodb_file_format_check; +SET @start_global_value = @@global.innodb_file_format_max; SELECT @start_global_value; @start_global_value Antelope Valid values are 'Antelope' and 'Barracuda' -select @@global.innodb_file_format_check in ('Antelope', 'Barracuda'); -@@global.innodb_file_format_check in ('Antelope', 'Barracuda') +select @@global.innodb_file_format_max in ('Antelope', 'Barracuda'); +@@global.innodb_file_format_max in ('Antelope', 'Barracuda') 1 -select @@global.innodb_file_format_check; -@@global.innodb_file_format_check +select @@global.innodb_file_format_max; +@@global.innodb_file_format_max Antelope -select @@session.innodb_file_format_check; -ERROR HY000: Variable 'innodb_file_format_check' is a GLOBAL variable -show global variables like 'innodb_file_format_check'; +select @@session.innodb_file_format_max; +ERROR HY000: Variable 'innodb_file_format_max' is a GLOBAL variable +show global variables like 'innodb_file_format_max'; Variable_name Value -innodb_file_format_check Antelope -show session variables like 'innodb_file_format_check'; +innodb_file_format_max Antelope +show session variables like 'innodb_file_format_max'; Variable_name Value -innodb_file_format_check Antelope -select * from information_schema.global_variables where variable_name='innodb_file_format_check'; +innodb_file_format_max Antelope +select * from information_schema.global_variables where variable_name='innodb_file_format_max'; VARIABLE_NAME VARIABLE_VALUE -INNODB_FILE_FORMAT_CHECK Antelope -select * from information_schema.session_variables where variable_name='innodb_file_format_check'; +INNODB_FILE_FORMAT_MAX Antelope +select * from information_schema.session_variables where variable_name='innodb_file_format_max'; VARIABLE_NAME VARIABLE_VALUE -INNODB_FILE_FORMAT_CHECK Antelope -set global innodb_file_format_check='Antelope'; -select @@global.innodb_file_format_check; -@@global.innodb_file_format_check +INNODB_FILE_FORMAT_MAX Antelope +set global innodb_file_format_max='Antelope'; +select @@global.innodb_file_format_max; +@@global.innodb_file_format_max Antelope -select * from information_schema.global_variables where variable_name='innodb_file_format_check'; +select * from information_schema.global_variables where variable_name='innodb_file_format_max'; VARIABLE_NAME VARIABLE_VALUE -INNODB_FILE_FORMAT_CHECK Antelope -select * from information_schema.session_variables where variable_name='innodb_file_format_check'; +INNODB_FILE_FORMAT_MAX Antelope +select * from information_schema.session_variables where variable_name='innodb_file_format_max'; VARIABLE_NAME VARIABLE_VALUE -INNODB_FILE_FORMAT_CHECK Antelope -set @@global.innodb_file_format_check='Barracuda'; -select @@global.innodb_file_format_check; -@@global.innodb_file_format_check +INNODB_FILE_FORMAT_MAX Antelope +set @@global.innodb_file_format_max='Barracuda'; +select @@global.innodb_file_format_max; +@@global.innodb_file_format_max Barracuda -select * from information_schema.global_variables where variable_name='innodb_file_format_check'; +select * from information_schema.global_variables where variable_name='innodb_file_format_max'; VARIABLE_NAME VARIABLE_VALUE -INNODB_FILE_FORMAT_CHECK Barracuda -select * from information_schema.session_variables where variable_name='innodb_file_format_check'; +INNODB_FILE_FORMAT_MAX Barracuda +select * from information_schema.session_variables where variable_name='innodb_file_format_max'; VARIABLE_NAME VARIABLE_VALUE -INNODB_FILE_FORMAT_CHECK Barracuda -set session innodb_file_format_check='Salmon'; -ERROR HY000: Variable 'innodb_file_format_check' is a GLOBAL variable and should be set with SET GLOBAL -set @@session.innodb_file_format_check='Salmon'; -ERROR HY000: Variable 'innodb_file_format_check' is a GLOBAL variable and should be set with SET GLOBAL -set global innodb_file_format_check=1.1; -ERROR 42000: Incorrect argument type to variable 'innodb_file_format_check' -set global innodb_file_format_check=1e1; -ERROR 42000: Incorrect argument type to variable 'innodb_file_format_check' -set global innodb_file_format_check='Salmon'; -ERROR 42000: Variable 'innodb_file_format_check' can't be set to the value of 'Salmon' -SET @@global.innodb_file_format_check = @start_global_value; -SELECT @@global.innodb_file_format_check; -@@global.innodb_file_format_check +INNODB_FILE_FORMAT_MAX Barracuda +set session innodb_file_format_max='Salmon'; +ERROR HY000: Variable 'innodb_file_format_max' is a GLOBAL variable and should be set with SET GLOBAL +set @@session.innodb_file_format_max='Salmon'; +ERROR HY000: Variable 'innodb_file_format_max' is a GLOBAL variable and should be set with SET GLOBAL +set global innodb_file_format_max=1.1; +ERROR 42000: Incorrect argument type to variable 'innodb_file_format_max' +set global innodb_file_format_max=1e1; +ERROR 42000: Incorrect argument type to variable 'innodb_file_format_max' +set global innodb_file_format_max='Salmon'; +ERROR 42000: Variable 'innodb_file_format_max' can't be set to the value of 'Salmon' +SET @@global.innodb_file_format_max = @start_global_value; +SELECT @@global.innodb_file_format_max; +@@global.innodb_file_format_max Antelope diff --git a/mysql-test/suite/sys_vars/t/innodb_file_format_check_basic.test b/mysql-test/suite/sys_vars/t/innodb_file_format_check_basic.test index 4c60957561c..e087cc738b0 100644 --- a/mysql-test/suite/sys_vars/t/innodb_file_format_check_basic.test +++ b/mysql-test/suite/sys_vars/t/innodb_file_format_check_basic.test @@ -5,51 +5,51 @@ --source include/have_innodb.inc -SET @start_global_value = @@global.innodb_file_format_check; +SET @start_global_value = @@global.innodb_file_format_max; SELECT @start_global_value; # # exists as global only # --echo Valid values are 'Antelope' and 'Barracuda' -select @@global.innodb_file_format_check in ('Antelope', 'Barracuda'); -select @@global.innodb_file_format_check; +select @@global.innodb_file_format_max in ('Antelope', 'Barracuda'); +select @@global.innodb_file_format_max; --error ER_INCORRECT_GLOBAL_LOCAL_VAR -select @@session.innodb_file_format_check; -show global variables like 'innodb_file_format_check'; -show session variables like 'innodb_file_format_check'; -select * from information_schema.global_variables where variable_name='innodb_file_format_check'; -select * from information_schema.session_variables where variable_name='innodb_file_format_check'; +select @@session.innodb_file_format_max; +show global variables like 'innodb_file_format_max'; +show session variables like 'innodb_file_format_max'; +select * from information_schema.global_variables where variable_name='innodb_file_format_max'; +select * from information_schema.session_variables where variable_name='innodb_file_format_max'; # # show that it's writable # -set global innodb_file_format_check='Antelope'; -select @@global.innodb_file_format_check; -select * from information_schema.global_variables where variable_name='innodb_file_format_check'; -select * from information_schema.session_variables where variable_name='innodb_file_format_check'; -set @@global.innodb_file_format_check='Barracuda'; -select @@global.innodb_file_format_check; -select * from information_schema.global_variables where variable_name='innodb_file_format_check'; -select * from information_schema.session_variables where variable_name='innodb_file_format_check'; +set global innodb_file_format_max='Antelope'; +select @@global.innodb_file_format_max; +select * from information_schema.global_variables where variable_name='innodb_file_format_max'; +select * from information_schema.session_variables where variable_name='innodb_file_format_max'; +set @@global.innodb_file_format_max='Barracuda'; +select @@global.innodb_file_format_max; +select * from information_schema.global_variables where variable_name='innodb_file_format_max'; +select * from information_schema.session_variables where variable_name='innodb_file_format_max'; --error ER_GLOBAL_VARIABLE -set session innodb_file_format_check='Salmon'; +set session innodb_file_format_max='Salmon'; --error ER_GLOBAL_VARIABLE -set @@session.innodb_file_format_check='Salmon'; +set @@session.innodb_file_format_max='Salmon'; # # incorrect types # --error ER_WRONG_TYPE_FOR_VAR -set global innodb_file_format_check=1.1; +set global innodb_file_format_max=1.1; --error ER_WRONG_TYPE_FOR_VAR -set global innodb_file_format_check=1e1; +set global innodb_file_format_max=1e1; --error ER_WRONG_VALUE_FOR_VAR -set global innodb_file_format_check='Salmon'; +set global innodb_file_format_max='Salmon'; # # Cleanup # -SET @@global.innodb_file_format_check = @start_global_value; -SELECT @@global.innodb_file_format_check; +SET @@global.innodb_file_format_max = @start_global_value; +SELECT @@global.innodb_file_format_max; diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 21d30dc4904..675edc61ac7 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -149,10 +149,10 @@ static char* innobase_log_group_home_dir = NULL; static char* innobase_file_format_name = NULL; static char* innobase_change_buffering = NULL; -/* Note: This variable can be set to on/off and any of the supported -file formats in the configuration file, but can only be set to any -of the supported file formats during runtime. */ -static char* innobase_file_format_check = NULL; +/* The highest file format being used in the database. The value can be +set by user, however, it will be adjusted to the newer file format if +a table of such format is created/opened. */ +static char* innobase_file_format_max = NULL; static char* innobase_file_flush_method = NULL; @@ -160,6 +160,7 @@ static char* innobase_file_flush_method = NULL; values */ static ulong innobase_fast_shutdown = 1; +static my_bool innobase_file_format_check = TRUE; #ifdef UNIV_LOG_ARCHIVE static my_bool innobase_log_archive = FALSE; static char* innobase_log_arch_dir = NULL; @@ -171,6 +172,7 @@ static my_bool innobase_rollback_on_timeout = FALSE; static my_bool innobase_create_status_file = FALSE; static my_bool innobase_stats_on_metadata = TRUE; + static char* internal_innobase_data_file_path = NULL; static char* innodb_version_str = (char*) INNODB_VERSION_STR; @@ -366,22 +368,13 @@ innobase_file_format_name_lookup( name */ /************************************************************//** Validate the file format check config parameters, as a side effect it -sets the srv_check_file_format_at_startup variable. -@return true if one of "on" or "off" */ -static -bool -innobase_file_format_check_on_off( -/*==============================*/ - const char* format_check); /*!< in: parameter value */ -/************************************************************//** -Validate the file format check config parameters, as a side effect it -sets the srv_check_file_format_at_startup variable. +sets the srv_max_file_format_at_startup variable. @return the format_id if valid config value, otherwise, return -1 */ static int innobase_file_format_validate_and_set( -/*================================*/ - const char* format_check); /*!< in: parameter value */ +/*==================================*/ + const char* format_max); /*!< in: parameter value */ /****************************************************************//** Return alter table flags supported in an InnoDB database. */ static @@ -2264,32 +2257,35 @@ mem_free_and_error: innobase_file_format_name is used in the MySQL set variable interface and so can't be const. */ - innobase_file_format_name = + innobase_file_format_name = (char*) trx_sys_file_format_id_to_name(format_id); - /* Process innobase_file_format_check variable */ - ut_a(innobase_file_format_check != NULL); + /* Check innobase_file_format_check variable */ + if (!innobase_file_format_check) { - /* As a side effect it will set srv_check_file_format_at_startup - on valid input. First we check for "on"/"off". */ - if (!innobase_file_format_check_on_off(innobase_file_format_check)) { + /* Set the value to disable checking. */ + srv_max_file_format_at_startup = DICT_TF_FORMAT_MAX + 1; - /* Did the user specify a format name that we support ? - As a side effect it will update the variable - srv_check_file_format_at_startup */ - if (innobase_file_format_validate_and_set( - innobase_file_format_check) < 0) { + } else { - sql_print_error("InnoDB: invalid " - "innodb_file_format_check value: " - "should be either 'on' or 'off' or " - "any value up to %s or its " - "equivalent numeric id", - trx_sys_file_format_id_to_name( - DICT_TF_FORMAT_MAX)); + /* Set the value to the lowest supported format. */ + srv_max_file_format_at_startup = DICT_TF_FORMAT_MIN; + } - goto mem_free_and_error; - } + /* Did the user specify a format name that we support? + As a side effect it will update the variable + srv_max_file_format_at_startup */ + if (innobase_file_format_validate_and_set( + innobase_file_format_max) < 0) { + + sql_print_error("InnoDB: invalid " + "innodb_file_format_max value: " + "should be any value up to %s or its " + "equivalent numeric id", + trx_sys_file_format_id_to_name( + DICT_TF_FORMAT_MAX)); + + goto mem_free_and_error; } if (innobase_change_buffering) { @@ -2451,7 +2447,7 @@ innobase_change_buffering_inited_ok: #endif /* MYSQL_DYNAMIC_PLUGIN */ /* Get the current high water mark format. */ - innobase_file_format_check = (char*) trx_sys_file_format_max_get(); + innobase_file_format_max = (char*) trx_sys_file_format_max_get(); DBUG_RETURN(FALSE); error: @@ -3836,7 +3832,7 @@ retry: space, if this table has higher file format setting. */ trx_sys_file_format_max_upgrade( - (const char**) &innobase_file_format_check, + (const char**) &innobase_file_format_max, dict_table_get_format(prebuilt->table)); } @@ -6959,7 +6955,7 @@ ha_innobase::create( space, if this table has higher file format setting. */ trx_sys_file_format_max_upgrade( - (const char**) &innobase_file_format_check, + (const char**) &innobase_file_format_max, dict_table_get_format(innobase_table)); } @@ -10347,50 +10343,22 @@ innobase_file_format_name_lookup( return(DICT_TF_FORMAT_MAX + 1); } -/************************************************************//** -Validate the file format check value, is it one of "on" or "off", -as a side effect it sets the srv_check_file_format_at_startup variable. -@return true if config value one of "on" or "off" */ -static -bool -innobase_file_format_check_on_off( -/*==============================*/ - const char* format_check) /*!< in: parameter value */ -{ - bool ret = true; - - if (!innobase_strcasecmp(format_check, "off")) { - - /* Set the value to disable checking. */ - srv_check_file_format_at_startup = DICT_TF_FORMAT_MAX + 1; - - } else if (!innobase_strcasecmp(format_check, "on")) { - - /* Set the value to the lowest supported format. */ - srv_check_file_format_at_startup = DICT_TF_FORMAT_51; - } else { - ret = FALSE; - } - - return(ret); -} - /************************************************************//** Validate the file format check config parameters, as a side effect it -sets the srv_check_file_format_at_startup variable. +sets the srv_max_file_format_at_startup variable. @return the format_id if valid config value, otherwise, return -1 */ static int innobase_file_format_validate_and_set( -/*================================*/ - const char* format_check) /*!< in: parameter value */ +/*==================================*/ + const char* format_max) /*!< in: parameter value */ { uint format_id; - format_id = innobase_file_format_name_lookup(format_check); + format_id = innobase_file_format_name_lookup(format_max); if (format_id < DICT_TF_FORMAT_MAX + 1) { - srv_check_file_format_at_startup = format_id; + srv_max_file_format_at_startup = format_id; return((int) format_id); } else { @@ -10478,15 +10446,14 @@ innodb_file_format_name_update( *static_cast(var_ptr) = trx_sys_file_format_id_to_name(srv_file_format); } - /*************************************************************//** -Check if valid argument to innodb_file_format_check. This -function is registered as a callback with MySQL. +Check if valid argument to innodb_file_format_max. This function +is registered as a callback with MySQL. @return 0 for valid file format */ static int -innodb_file_format_check_validate( -/*==============================*/ +innodb_file_format_max_validate( +/*============================*/ THD* thd, /*!< in: thread handle */ struct st_mysql_sys_var* var, /*!< in: pointer to system variable */ @@ -10506,39 +10473,27 @@ innodb_file_format_check_validate( if (file_format_input != NULL) { - /* Check if user set on/off, we want to print a suitable - message if they did so. */ + format_id = innobase_file_format_validate_and_set( + file_format_input); + + if (format_id >= 0) { + /* Save a pointer to the name in the + 'file_format_name_map' constant array. */ + *static_cast(save) = + trx_sys_file_format_id_to_name( + (uint)format_id); + + return(0); - if (innobase_file_format_check_on_off(file_format_input)) { - push_warning_printf(thd, - MYSQL_ERROR::WARN_LEVEL_WARN, - ER_WRONG_ARGUMENTS, - "InnoDB: invalid innodb_file_format_check " - "value; on/off can only be set at startup or " - "in the configuration file"); } else { - format_id = innobase_file_format_validate_and_set( - file_format_input); - - if (format_id >= 0) { - /* Save a pointer to the name in the - 'file_format_name_map' constant array. */ - *static_cast(save) = - trx_sys_file_format_id_to_name( - (uint)format_id); - - return(0); - - } else { - push_warning_printf(thd, - MYSQL_ERROR::WARN_LEVEL_WARN, - ER_WRONG_ARGUMENTS, - "InnoDB: invalid innodb_file_format_check " - "value; can be any format up to %s " - "or its equivalent numeric id", - trx_sys_file_format_id_to_name( - DICT_TF_FORMAT_MAX)); - } + push_warning_printf(thd, + MYSQL_ERROR::WARN_LEVEL_WARN, + ER_WRONG_ARGUMENTS, + "InnoDB: invalid innodb_file_format_max " + "value; can be any format up to %s " + "or equivalent id of %d", + trx_sys_file_format_id_to_name(DICT_TF_FORMAT_MAX), + DICT_TF_FORMAT_MAX); } } @@ -10547,12 +10502,12 @@ innodb_file_format_check_validate( } /****************************************************************//** -Update the system variable innodb_file_format_check using the "saved" +Update the system variable innodb_file_format_max using the "saved" value. This function is registered as a callback with MySQL. */ static void -innodb_file_format_check_update( -/*============================*/ +innodb_file_format_max_update( +/*==========================*/ THD* thd, /*!< in: thread handle */ struct st_mysql_sys_var* var, /*!< in: pointer to system variable */ @@ -10862,15 +10817,26 @@ static MYSQL_SYSVAR_STR(file_format, innobase_file_format_name, innodb_file_format_name_validate, innodb_file_format_name_update, "Antelope"); +/* "innobase_file_format_check" decides whether we would continue +booting the server if the file format stamped on the system +table space exceeds the maximum file format supported +by the server. Can be set during server startup at command +line or configure file, and a read only variable after +server startup */ +static MYSQL_SYSVAR_BOOL(file_format_check, innobase_file_format_check, + PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_READONLY, + "Whether to perform system file format check.", + NULL, NULL, TRUE); + /* If a new file format is introduced, the file format name needs to be updated accordingly. Please refer to file_format_name_map[] defined in trx0sys.c for the next file format name. */ -static MYSQL_SYSVAR_STR(file_format_check, innobase_file_format_check, +static MYSQL_SYSVAR_STR(file_format_max, innobase_file_format_max, PLUGIN_VAR_OPCMDARG, "The highest file format in the tablespace.", - innodb_file_format_check_validate, - innodb_file_format_check_update, "Barracuda"); + innodb_file_format_max_validate, + innodb_file_format_max_update, "Antelope"); static MYSQL_SYSVAR_ULONG(flush_log_at_trx_commit, srv_flush_log_at_trx_commit, PLUGIN_VAR_OPCMDARG, @@ -11118,6 +11084,7 @@ static struct st_mysql_sys_var* innobase_system_variables[]= { MYSQL_SYSVAR(file_per_table), MYSQL_SYSVAR(file_format), MYSQL_SYSVAR(file_format_check), + MYSQL_SYSVAR(file_format_max), MYSQL_SYSVAR(flush_log_at_trx_commit), MYSQL_SYSVAR(flush_method), MYSQL_SYSVAR(force_recovery), diff --git a/storage/innobase/include/dict0mem.h b/storage/innobase/include/dict0mem.h index f93b2f8c8a3..57e5b5394ee 100644 --- a/storage/innobase/include/dict0mem.h +++ b/storage/innobase/include/dict0mem.h @@ -88,6 +88,10 @@ combination of types */ new BLOB treatment */ /** Maximum supported file format */ #define DICT_TF_FORMAT_MAX DICT_TF_FORMAT_ZIP + +/** Minimum supported file format */ +#define DICT_TF_FORMAT_MIN DICT_TF_FORMAT_51 + /* @} */ #define DICT_TF_BITS 6 /*!< number of flag bits */ #if (1 << (DICT_TF_BITS - DICT_TF_FORMAT_SHIFT)) <= DICT_TF_FORMAT_MAX diff --git a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h index 98e127d41e2..18f7c07c3c6 100644 --- a/storage/innobase/include/srv0srv.h +++ b/storage/innobase/include/srv0srv.h @@ -101,7 +101,7 @@ extern ulint srv_file_format; /** Whether to check file format during startup. A value of DICT_TF_FORMAT_MAX + 1 means no checking ie. FALSE. The default is to set it to the highest format we support. */ -extern ulint srv_check_file_format_at_startup; +extern ulint srv_max_file_format_at_startup; /** Place locks to records only i.e. do not use next-key locking except on duplicate key checking and foreign key checking */ extern ibool srv_locks_unsafe_for_binlog; diff --git a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c index 5bdeca7b01d..6354689105a 100644 --- a/storage/innobase/srv/srv0srv.c +++ b/storage/innobase/srv/srv0srv.c @@ -127,7 +127,7 @@ UNIV_INTERN ulint srv_file_format = 0; /** Whether to check file format during startup. A value of DICT_TF_FORMAT_MAX + 1 means no checking ie. FALSE. The default is to set it to the highest format we support. */ -UNIV_INTERN ulint srv_check_file_format_at_startup = DICT_TF_FORMAT_MAX; +UNIV_INTERN ulint srv_max_file_format_at_startup = DICT_TF_FORMAT_MAX; #if DICT_TF_FORMAT_51 # error "DICT_TF_FORMAT_51 must be 0!" diff --git a/storage/innobase/srv/srv0start.c b/storage/innobase/srv/srv0start.c index 1b96a2f4708..4a0ecc5154f 100644 --- a/storage/innobase/srv/srv0start.c +++ b/storage/innobase/srv/srv0start.c @@ -1590,7 +1590,7 @@ innobase_start_or_create_for_mysql(void) consistent state, this is REQUIRED for the recovery process to work. */ err = trx_sys_file_format_max_check( - srv_check_file_format_at_startup); + srv_max_file_format_at_startup); if (err != DB_SUCCESS) { return(err); diff --git a/storage/innobase/trx/trx0sys.c b/storage/innobase/trx/trx0sys.c index 9c531e64662..e2f0ff6d532 100644 --- a/storage/innobase/trx/trx0sys.c +++ b/storage/innobase/trx/trx0sys.c @@ -135,7 +135,7 @@ UNIV_INTERN mysql_pfs_key_t file_format_max_mutex_key; #ifndef UNIV_HOTBACKUP /** This is used to track the maximum file format id known to InnoDB. It's -updated via SET GLOBAL innodb_file_format_check = 'x' or when we open +updated via SET GLOBAL innodb_file_format_max = 'x' or when we open or create a table. */ static file_format_t file_format_max; @@ -1160,7 +1160,7 @@ trx_sys_file_format_max_check( if (format_id == ULINT_UNDEFINED) { /* Format ID was not set. Set it to minimum possible value. */ - format_id = DICT_TF_FORMAT_51; + format_id = DICT_TF_FORMAT_MIN; } ut_print_timestamp(stderr); @@ -1240,7 +1240,7 @@ trx_sys_file_format_tag_init(void) /* If format_id is not set then set it to the minimum. */ if (format_id == ULINT_UNDEFINED) { - trx_sys_file_format_max_set(DICT_TF_FORMAT_51, NULL); + trx_sys_file_format_max_set(DICT_TF_FORMAT_MIN, NULL); } } @@ -1296,7 +1296,7 @@ trx_sys_file_format_init(void) /* We don't need a mutex here, as this function should only be called once at start up. */ - file_format_max.id = DICT_TF_FORMAT_51; + file_format_max.id = DICT_TF_FORMAT_MIN; file_format_max.name = trx_sys_file_format_id_to_name( file_format_max.id); From 028bb395b747a505d3c94f8c4c33f3d7ef0e17a8 Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Thu, 17 Jun 2010 12:35:23 +0300 Subject: [PATCH 11/12] Decrement version number from 1.1.2 to 1.1.1, this latest tree is going to be 1.1.1. --- storage/innobase/include/univ.i | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/innobase/include/univ.i b/storage/innobase/include/univ.i index 15acb81f0d8..11cec113fc8 100644 --- a/storage/innobase/include/univ.i +++ b/storage/innobase/include/univ.i @@ -46,7 +46,7 @@ Created 1/20/1994 Heikki Tuuri #define INNODB_VERSION_MAJOR 1 #define INNODB_VERSION_MINOR 1 -#define INNODB_VERSION_BUGFIX 2 +#define INNODB_VERSION_BUGFIX 1 /* The following is the InnoDB version as shown in SELECT plugin_version FROM information_schema.plugins; From e4b19dd475348504a9fda38193f03e8b28cd8145 Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Thu, 17 Jun 2010 12:59:53 +0300 Subject: [PATCH 12/12] Adjust innodb_mysql.result after the resolved conflict from the merge --- mysql-test/suite/innodb/r/innodb_mysql.result | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mysql-test/suite/innodb/r/innodb_mysql.result b/mysql-test/suite/innodb/r/innodb_mysql.result index 1624a9e64b7..124370fa630 100644 --- a/mysql-test/suite/innodb/r/innodb_mysql.result +++ b/mysql-test/suite/innodb/r/innodb_mysql.result @@ -2414,8 +2414,8 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ALL NULL NULL NULL NULL 3 Using where DROP TABLE t1,t2; # -# # Bug#38999 valgrind warnings for update statement in function compare_record() +# CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB; CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t1 values (1),(2),(3),(4),(5); @@ -2425,7 +2425,9 @@ a 2 UPDATE t1,t2 SET t1.a = t1.a + 100 WHERE t1.a = 1; DROP TABLE t1,t2; +# # Bug #53830: !table || (!table->read_set || bitmap_is_set(table->read_set, field_index)) +# CREATE TABLE t1 (a INT, b INT, c INT, d INT, PRIMARY KEY(a,b,c), KEY(b,d)) ENGINE=InnoDB;