From 305e3dea0dd018d563587db6cbc122337dd17149 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Fri, 19 Apr 2013 14:52:05 +0200 Subject: [PATCH 1/2] MDEV-4398 - remove incorrect fix, replace with correct one - change default to OFF for innodb_use_fallocate --- .../suite/sys_vars/r/innodb_use_fallocate_basic.result | 10 +++++----- storage/innobase/handler/ha_innodb.cc | 4 ++-- storage/xtradb/handler/ha_innodb.cc | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/mysql-test/suite/sys_vars/r/innodb_use_fallocate_basic.result b/mysql-test/suite/sys_vars/r/innodb_use_fallocate_basic.result index 7ea55fba0a4..57b4b9eb94c 100644 --- a/mysql-test/suite/sys_vars/r/innodb_use_fallocate_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_use_fallocate_basic.result @@ -1,20 +1,20 @@ select @@global.innodb_use_fallocate; @@global.innodb_use_fallocate -1 +0 select @@session.innodb_use_fallocate; ERROR HY000: Variable 'innodb_use_fallocate' is a GLOBAL variable show global variables like 'innodb_use_fallocate'; Variable_name Value -innodb_use_fallocate ON +innodb_use_fallocate OFF show session variables like 'innodb_use_fallocate'; Variable_name Value -innodb_use_fallocate ON +innodb_use_fallocate OFF select * from information_schema.global_variables where variable_name='innodb_use_fallocate'; VARIABLE_NAME VARIABLE_VALUE -INNODB_USE_FALLOCATE ON +INNODB_USE_FALLOCATE OFF select * from information_schema.session_variables where variable_name='innodb_use_fallocate'; VARIABLE_NAME VARIABLE_VALUE -INNODB_USE_FALLOCATE ON +INNODB_USE_FALLOCATE OFF set global innodb_use_fallocate=1; ERROR HY000: Variable 'innodb_use_fallocate' is a read only variable set session innodb_use_fallocate=1; diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 722e6a669fb..4d8f1c7398e 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -2492,7 +2492,7 @@ innobase_change_buffering_inited_ok: innobase_commit_concurrency_init_default(); #ifdef HAVE_POSIX_FALLOCATE - srv_use_posix_fallocate = 0 && (ibool) innobase_use_fallocate; + srv_use_posix_fallocate = (ibool) innobase_use_fallocate; #endif srv_use_atomic_writes = (ibool) innobase_use_atomic_writes; if (innobase_use_atomic_writes) { @@ -11567,7 +11567,7 @@ static MYSQL_SYSVAR_BOOL(use_atomic_writes, innobase_use_atomic_writes, static MYSQL_SYSVAR_BOOL(use_fallocate, innobase_use_fallocate, PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY, "Preallocate files fast, using operating system functionality. On POSIX systems, posix_fallocate system call is used.", - NULL, NULL, TRUE); + NULL, NULL, FALSE); static MYSQL_SYSVAR_ULONG(io_capacity, srv_io_capacity, PLUGIN_VAR_RQCMDARG, diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc index dacaf6fae9c..a25a3b8679f 100644 --- a/storage/xtradb/handler/ha_innodb.cc +++ b/storage/xtradb/handler/ha_innodb.cc @@ -3082,7 +3082,7 @@ innobase_change_buffering_inited_ok: #endif #ifdef HAVE_POSIX_FALLOCATE - srv_use_posix_fallocate = 0 && (ibool) innobase_use_fallocate; + srv_use_posix_fallocate = (ibool) innobase_use_fallocate; #endif srv_use_atomic_writes = (ibool) innobase_use_atomic_writes; if (innobase_use_atomic_writes) { @@ -12817,7 +12817,7 @@ static MYSQL_SYSVAR_BOOL(use_atomic_writes, innobase_use_atomic_writes, static MYSQL_SYSVAR_BOOL(use_fallocate, innobase_use_fallocate, PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY, "Preallocate files fast, using operating system functionality. On POSIX systems, posix_fallocate system call is used.", - NULL, NULL, TRUE); + NULL, NULL, FALSE); static MYSQL_SYSVAR_ULONG(io_capacity, srv_io_capacity, PLUGIN_VAR_RQCMDARG, From 1baf3d7d14bc5df87f41dd7b1d390a9826cef655 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 19 Apr 2013 15:59:39 +0200 Subject: [PATCH 2/2] Fix missing reset of debug_sync, which could cause subsequent test to fail. --- mysql-test/include/function_defaults_notembedded.inc | 1 + mysql-test/r/function_defaults_notembedded.result | 2 ++ 2 files changed, 3 insertions(+) diff --git a/mysql-test/include/function_defaults_notembedded.inc b/mysql-test/include/function_defaults_notembedded.inc index d9708c13da5..077470125f4 100644 --- a/mysql-test/include/function_defaults_notembedded.inc +++ b/mysql-test/include/function_defaults_notembedded.inc @@ -92,3 +92,4 @@ FLUSH TABLE t1; SELECT * FROM t1; DROP TABLE t1; +SET debug_sync = 'RESET'; diff --git a/mysql-test/r/function_defaults_notembedded.result b/mysql-test/r/function_defaults_notembedded.result index c54ae14aef4..9bd03ab9f05 100644 --- a/mysql-test/r/function_defaults_notembedded.result +++ b/mysql-test/r/function_defaults_notembedded.result @@ -85,6 +85,7 @@ a b 5 1982-03-20 20:22:34 6 1982-03-20 20:22:34 DROP TABLE t1; +SET debug_sync = 'RESET'; # # Function defaults run 2. Six digits scale on seconds precision. # @@ -169,3 +170,4 @@ a b 5 1982-03-20 20:22:34.876543 6 1982-03-20 20:22:34.876543 DROP TABLE t1; +SET debug_sync = 'RESET';