summaryrefslogtreecommitdiff
path: root/mysql-test/suite/sys_vars
diff options
context:
space:
mode:
authorThirunarayanan Balathandayuthapani <thiru@mariadb.com>2022-02-24 19:42:43 +0530
committerThirunarayanan Balathandayuthapani <thiru@mariadb.com>2022-02-24 22:41:23 +0530
commita76731e1a13933548ad4eaf6ee8b599cbc1260b6 (patch)
tree56bb78feb4f9df3d38f67852502793fd031fdc1e /mysql-test/suite/sys_vars
parenta6f258e47f425a3ebecf6aaba87bdfcc241dc416 (diff)
downloadmariadb-git-a76731e1a13933548ad4eaf6ee8b599cbc1260b6.tar.gz
MDEV-27913 innodb_ft_cache_size max possible value (80000000) is too small for practical purposes
- Make innodb_ft_cache_size & innodb_ft_total_cache_size are dynamic variable and increase the maximum value of innodb_ft_cache_size to 512MB for 32-bit system and 1 TB for 64-bit system and set innodb_ft_total_cache_size maximum value to 1 TB for 64-bit system. - Print warning if the fts cache exceeds the innodb_ft_cache_size and also unlock the cache if fts cache memory reduces less than innodb_ft_cache_size.
Diffstat (limited to 'mysql-test/suite/sys_vars')
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_ft_cache_size_basic.result13
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_ft_total_cache_size_basic.result13
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_ft_cache_size_basic.test11
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_ft_total_cache_size_basic.test10
4 files changed, 33 insertions, 14 deletions
diff --git a/mysql-test/suite/sys_vars/r/innodb_ft_cache_size_basic.result b/mysql-test/suite/sys_vars/r/innodb_ft_cache_size_basic.result
index f50b6d4180c..a7786b53e3c 100644
--- a/mysql-test/suite/sys_vars/r/innodb_ft_cache_size_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_ft_cache_size_basic.result
@@ -16,6 +16,15 @@ select * from information_schema.session_variables where variable_name='innodb_f
VARIABLE_NAME VARIABLE_VALUE
INNODB_FT_CACHE_SIZE 8000000
set global innodb_ft_cache_size=1;
-ERROR HY000: Variable 'innodb_ft_cache_size' is a read only variable
+Warnings:
+Warning 1292 Truncated incorrect innodb_ft_cache_size value: '1'
+SHOW VARIABLES like 'innodb_ft_cache_size';
+Variable_name Value
+innodb_ft_cache_size 1600000
set session innodb_ft_cache_size=1;
-ERROR HY000: Variable 'innodb_ft_cache_size' is a read only variable
+ERROR HY000: Variable 'innodb_ft_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
+set global innodb_ft_cache_size=512*1024*1024;
+SHOW VARIABLES like 'innodb_ft_cache_size';
+Variable_name Value
+innodb_ft_cache_size 536870912
+set global innodb_ft_cache_size=default;
diff --git a/mysql-test/suite/sys_vars/r/innodb_ft_total_cache_size_basic.result b/mysql-test/suite/sys_vars/r/innodb_ft_total_cache_size_basic.result
index ff234a1fcbf..3f21a57385c 100644
--- a/mysql-test/suite/sys_vars/r/innodb_ft_total_cache_size_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_ft_total_cache_size_basic.result
@@ -16,6 +16,15 @@ select * from information_schema.session_variables where variable_name='innodb_f
VARIABLE_NAME VARIABLE_VALUE
INNODB_FT_TOTAL_CACHE_SIZE 640000000
set global innodb_ft_total_cache_size=1;
-ERROR HY000: Variable 'innodb_ft_total_cache_size' is a read only variable
+Warnings:
+Warning 1292 Truncated incorrect innodb_ft_total_cache_size value: '1'
set session innodb_ft_total_cache_size=1;
-ERROR HY000: Variable 'innodb_ft_total_cache_size' is a read only variable
+ERROR HY000: Variable 'innodb_ft_total_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
+SHOW VARIABLES like 'innodb_ft_total_cache_size';
+Variable_name Value
+innodb_ft_total_cache_size 32000000
+set global innodb_ft_total_cache_size=512*1024*1024;
+show variables like 'innodb_ft_total_cache_size';
+Variable_name Value
+innodb_ft_total_cache_size 536870912
+set global innodb_ft_total_cache_size=default;
diff --git a/mysql-test/suite/sys_vars/t/innodb_ft_cache_size_basic.test b/mysql-test/suite/sys_vars/t/innodb_ft_cache_size_basic.test
index 30bcd08d4dd..9def2e36137 100644
--- a/mysql-test/suite/sys_vars/t/innodb_ft_cache_size_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_ft_cache_size_basic.test
@@ -18,11 +18,12 @@ select * from information_schema.global_variables where variable_name='innodb_ft
select * from information_schema.session_variables where variable_name='innodb_ft_cache_size';
--enable_warnings
-#
-# show that it's read-only
-#
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
set global innodb_ft_cache_size=1;
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SHOW VARIABLES like 'innodb_ft_cache_size';
+
+--error ER_GLOBAL_VARIABLE
set session innodb_ft_cache_size=1;
+set global innodb_ft_cache_size=512*1024*1024;
+SHOW VARIABLES like 'innodb_ft_cache_size';
+set global innodb_ft_cache_size=default;
diff --git a/mysql-test/suite/sys_vars/t/innodb_ft_total_cache_size_basic.test b/mysql-test/suite/sys_vars/t/innodb_ft_total_cache_size_basic.test
index 207ec64b705..d032cd76771 100644
--- a/mysql-test/suite/sys_vars/t/innodb_ft_total_cache_size_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_ft_total_cache_size_basic.test
@@ -18,11 +18,11 @@ select * from information_schema.global_variables where variable_name='innodb_ft
select * from information_schema.session_variables where variable_name='innodb_ft_total_cache_size';
--enable_warnings
-#
-# show that it's read-only
-#
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
set global innodb_ft_total_cache_size=1;
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
+--error ER_GLOBAL_VARIABLE
set session innodb_ft_total_cache_size=1;
+SHOW VARIABLES like 'innodb_ft_total_cache_size';
+set global innodb_ft_total_cache_size=512*1024*1024;
+show variables like 'innodb_ft_total_cache_size';
+set global innodb_ft_total_cache_size=default;