summaryrefslogtreecommitdiff
path: root/mysql-test/suite/binlog
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-02-10 17:01:45 +0100
committerSergei Golubchik <serg@mariadb.org>2017-02-10 17:01:45 +0100
commit2195bb4e416232ab807ff67eecf03b1223bf6bff (patch)
tree4555af02df68cb0f26d454b1cf65086b62542875 /mysql-test/suite/binlog
parent3ae038b732ce503fb839e9095355e05f5c6866f9 (diff)
parentbc4686f0f4d17dc57dd727c9f5390caa3022bdca (diff)
downloadmariadb-git-2195bb4e416232ab807ff67eecf03b1223bf6bff.tar.gz
Merge branch '10.1' into 10.2
Diffstat (limited to 'mysql-test/suite/binlog')
-rw-r--r--mysql-test/suite/binlog/r/binlog_max_binlog_stmt_cache_size.result22
-rw-r--r--mysql-test/suite/binlog/t/binlog_max_binlog_stmt_cache_size.opt1
-rw-r--r--mysql-test/suite/binlog/t/binlog_max_binlog_stmt_cache_size.test36
3 files changed, 59 insertions, 0 deletions
diff --git a/mysql-test/suite/binlog/r/binlog_max_binlog_stmt_cache_size.result b/mysql-test/suite/binlog/r/binlog_max_binlog_stmt_cache_size.result
new file mode 100644
index 00000000000..00f01b59732
--- /dev/null
+++ b/mysql-test/suite/binlog/r/binlog_max_binlog_stmt_cache_size.result
@@ -0,0 +1,22 @@
+#
+# MDEV-4774: Strangeness with max_binlog_stmt_cache_size Settings
+#
+CALL mtr.add_suppression("unsigned value 18446744073709547520 adjusted to 4294963200");
+SELECT @@global.max_binlog_stmt_cache_size;
+@@global.max_binlog_stmt_cache_size
+MAX_BINLOG_STMT_CACHE_SIZE
+SET @cache_size= @@max_binlog_stmt_cache_size;
+SET @@global.max_binlog_stmt_cache_size= @cache_size+1;
+SELECT @@global.max_binlog_stmt_cache_size;
+@@global.max_binlog_stmt_cache_size
+MAX_BINLOG_STMT_CACHE_SIZE
+SET @@global.max_binlog_stmt_cache_size = @cache_size+4095;
+SELECT @@global.max_binlog_stmt_cache_size;
+@@global.max_binlog_stmt_cache_size
+MAX_BINLOG_STMT_CACHE_SIZE
+SET @@global.max_binlog_stmt_cache_size= @cache_size-1;
+SELECT @@global.max_binlog_stmt_cache_size = @cache_size-4096;
+@@global.max_binlog_stmt_cache_size = @cache_size-4096
+1
+SET @@global.max_binlog_stmt_cache_size= @cache_size;
+# End of test
diff --git a/mysql-test/suite/binlog/t/binlog_max_binlog_stmt_cache_size.opt b/mysql-test/suite/binlog/t/binlog_max_binlog_stmt_cache_size.opt
new file mode 100644
index 00000000000..c52ef14d5d0
--- /dev/null
+++ b/mysql-test/suite/binlog/t/binlog_max_binlog_stmt_cache_size.opt
@@ -0,0 +1 @@
+--max_binlog_stmt_cache_size=18446744073709547520
diff --git a/mysql-test/suite/binlog/t/binlog_max_binlog_stmt_cache_size.test b/mysql-test/suite/binlog/t/binlog_max_binlog_stmt_cache_size.test
new file mode 100644
index 00000000000..ca3f45c154c
--- /dev/null
+++ b/mysql-test/suite/binlog/t/binlog_max_binlog_stmt_cache_size.test
@@ -0,0 +1,36 @@
+
+--echo #
+--echo # MDEV-4774: Strangeness with max_binlog_stmt_cache_size Settings
+--echo #
+
+CALL mtr.add_suppression("unsigned value 18446744073709547520 adjusted to 4294963200");
+
+--replace_result 18446744073709547520 MAX_BINLOG_STMT_CACHE_SIZE 4294963200 MAX_BINLOG_STMT_CACHE_SIZE
+SELECT @@global.max_binlog_stmt_cache_size;
+
+# Save the initial value of @@global.max_binlog_stmt_cache_size.
+--replace_result 18446744073709547520 MAX_BINLOG_STMT_CACHE_SIZE 4294963200 MAX_BINLOG_STMT_CACHE_SIZE
+SET @cache_size= @@max_binlog_stmt_cache_size;
+
+--disable_warnings
+SET @@global.max_binlog_stmt_cache_size= @cache_size+1;
+--enable_warnings
+--replace_result 18446744073709547520 MAX_BINLOG_STMT_CACHE_SIZE 4294963200 MAX_BINLOG_STMT_CACHE_SIZE
+SELECT @@global.max_binlog_stmt_cache_size;
+
+--disable_warnings
+SET @@global.max_binlog_stmt_cache_size = @cache_size+4095;
+--enable_warnings
+--replace_result 4294963200 MAX_BINLOG_STMT_CACHE_SIZE 18446744073709547520 MAX_BINLOG_STMT_CACHE_SIZE
+SELECT @@global.max_binlog_stmt_cache_size;
+
+--disable_warnings
+SET @@global.max_binlog_stmt_cache_size= @cache_size-1;
+--enable_warnings
+SELECT @@global.max_binlog_stmt_cache_size = @cache_size-4096;
+
+# Restore @@global.max_binlog_stmt_cache_size to its initial value.
+SET @@global.max_binlog_stmt_cache_size= @cache_size;
+
+--echo # End of test
+