summaryrefslogtreecommitdiff
path: root/mysql-test/suite/sys_vars/t/aria_max_sort_file_size_basic.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/sys_vars/t/aria_max_sort_file_size_basic.test')
-rw-r--r--mysql-test/suite/sys_vars/t/aria_max_sort_file_size_basic.test47
1 files changed, 47 insertions, 0 deletions
diff --git a/mysql-test/suite/sys_vars/t/aria_max_sort_file_size_basic.test b/mysql-test/suite/sys_vars/t/aria_max_sort_file_size_basic.test
new file mode 100644
index 00000000000..b2385d2f99b
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/aria_max_sort_file_size_basic.test
@@ -0,0 +1,47 @@
+# ulong global
+--source include/have_maria.inc
+
+SET @start_global_value = @@global.aria_max_sort_file_size;
+
+#
+# exists as global only
+#
+select @@global.aria_max_sort_file_size;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.aria_max_sort_file_size;
+show global variables like 'aria_max_sort_file_size';
+show session variables like 'aria_max_sort_file_size';
+select * from information_schema.global_variables where variable_name='aria_max_sort_file_size';
+select * from information_schema.session_variables where variable_name='aria_max_sort_file_size';
+
+#
+# show that it's writable
+#
+set global aria_max_sort_file_size=1024*1024*10;
+select @@global.aria_max_sort_file_size;
+--error ER_GLOBAL_VARIABLE
+set session aria_max_sort_file_size=1;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global aria_max_sort_file_size=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global aria_max_sort_file_size=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global aria_max_sort_file_size="foo";
+
+#
+# min/max values, block size
+#
+set global aria_max_sort_file_size=1;
+select @@global.aria_max_sort_file_size;
+set global aria_max_sort_file_size=@@global.aria_max_sort_file_size + 1024*1024 - 1;
+select @@global.aria_max_sort_file_size;
+set global aria_max_sort_file_size=@@global.aria_max_sort_file_size + 1024*1024;
+select @@global.aria_max_sort_file_size;
+set global aria_max_sort_file_size=cast(-1 as unsigned int);
+select @@global.aria_max_sort_file_size;
+
+SET @@global.aria_max_sort_file_size = @start_global_value;