summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Shulga <dmitry.shulga@mariadb.com>2021-07-14 19:27:01 +0700
committerDmitry Shulga <dmitry.shulga@mariadb.com>2021-07-15 11:03:16 +0700
commit1e5624fe8efa1554ceed835ffe06a5917859ccfa (patch)
tree0bc1d5a0c34757a3a170a4872ed87174745af681
parent04369f9cee4e2ce7562d42344cd59683b5fbb8ae (diff)
downloadmariadb-git-bb-10.6-MDEV-26142.tar.gz
MDEV-26142: Fix failures of the tests main.features and sys_vars.stored_program_cache_func when they are run in PS modebb-10.6-MDEV-26142
These tests produced different results in case they were run with the option --ps-protocol. These tests produced different result sets since a value of Feature_subquery and handler_read_key status system variables are updated one time more for ps-protocol (the first time it is updated on Prepare phase and the second time on Execute phase of PS protocol) So different result sets are expected for both tests. To make tests successfully runnable both for case it is run with and without the option --ps-protocol the new protocol combination [ps, nm] and protocol specific result files have been added. Moreover, the perl script mysql-test/mariadb-test-run.pl has been updated to make the variable opt_ps_protocol visible outside perl file containing this variable.
-rw-r--r--mysql-test/include/protocol.combinations3
-rw-r--r--mysql-test/include/protocol.inc2
-rw-r--r--mysql-test/main/features,ps.rdiff21
-rw-r--r--mysql-test/main/features.test5
-rwxr-xr-xmysql-test/mariadb-test-run.pl2
-rw-r--r--mysql-test/suite.pm6
-rw-r--r--mysql-test/suite/sys_vars/r/stored_program_cache_func,ps.rdiff18
-rw-r--r--mysql-test/suite/sys_vars/t/stored_program_cache_func.test6
8 files changed, 54 insertions, 9 deletions
diff --git a/mysql-test/include/protocol.combinations b/mysql-test/include/protocol.combinations
new file mode 100644
index 00000000000..fa5b08c0e51
--- /dev/null
+++ b/mysql-test/include/protocol.combinations
@@ -0,0 +1,3 @@
+[nm]
+
+[ps]
diff --git a/mysql-test/include/protocol.inc b/mysql-test/include/protocol.inc
new file mode 100644
index 00000000000..02f8c3f3dec
--- /dev/null
+++ b/mysql-test/include/protocol.inc
@@ -0,0 +1,2 @@
+# The goal of including this file is to enable protocol
+# combinations (see include/protocol.combinations)
diff --git a/mysql-test/main/features,ps.rdiff b/mysql-test/main/features,ps.rdiff
new file mode 100644
index 00000000000..9065c132714
--- /dev/null
+++ b/mysql-test/main/features,ps.rdiff
@@ -0,0 +1,21 @@
+--- features.result
++++ features,ps.result
+@@ -46,7 +46,7 @@
+ 1212
+ show status like "feature_dynamic_columns";
+ Variable_name Value
+-Feature_dynamic_columns 2
++Feature_dynamic_columns 4
+ #
+ # Feature fulltext
+ #
+@@ -93,7 +93,7 @@
+ drop table t1;
+ show status like "feature_subquery";
+ Variable_name Value
+-Feature_subquery 4
++Feature_subquery 5
+ #
+ # Feature timezone
+ #
+
diff --git a/mysql-test/main/features.test b/mysql-test/main/features.test
index 0dd0be20c9e..14c86255c37 100644
--- a/mysql-test/main/features.test
+++ b/mysql-test/main/features.test
@@ -1,10 +1,7 @@
# Testing of feature statistics
-if (`SELECT $PS_PROTOCOL != 0`)
-{
- --skip Test temporarily disabled for ps-protocol
-}
-- source include/have_geometry.inc
+-- source include/protocol.inc
--disable_warnings
drop table if exists t1;
diff --git a/mysql-test/mariadb-test-run.pl b/mysql-test/mariadb-test-run.pl
index becf799c825..7b9422565ab 100755
--- a/mysql-test/mariadb-test-run.pl
+++ b/mysql-test/mariadb-test-run.pl
@@ -244,7 +244,7 @@ my $opt_ssl;
my $opt_skip_ssl;
my @opt_skip_test_list;
our $opt_ssl_supported;
-my $opt_ps_protocol;
+our $opt_ps_protocol;
my $opt_sp_protocol;
my $opt_cursor_protocol;
my $opt_view_protocol;
diff --git a/mysql-test/suite.pm b/mysql-test/suite.pm
index 5100b4137a2..4cc6b410fa1 100644
--- a/mysql-test/suite.pm
+++ b/mysql-test/suite.pm
@@ -25,6 +25,12 @@ sub skip_combinations {
$skip{'include/platform.combinations'} = [ 'aix', 'win' ];
}
+ if ( $::opt_ps_protocol ) {
+ $skip{'include/protocol.combinations'} = [ 'nm' ];
+ } else {
+ $skip{'include/protocol.combinations'} = [ 'ps' ];
+ }
+
$skip{'include/maybe_debug.combinations'} =
[ defined $::mysqld_variables{'debug-dbug'} ? 'release' : 'debug' ];
diff --git a/mysql-test/suite/sys_vars/r/stored_program_cache_func,ps.rdiff b/mysql-test/suite/sys_vars/r/stored_program_cache_func,ps.rdiff
new file mode 100644
index 00000000000..f07e82c3472
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/stored_program_cache_func,ps.rdiff
@@ -0,0 +1,18 @@
+--- stored_program_cache_func.result
++++ stored_program_cache_func,ps.result
+@@ -21,13 +21,13 @@
+ 1
+ show status like 'handler_read_key';
+ Variable_name Value
+-Handler_read_key 2
++Handler_read_key 3
+ call p1;
+ 1
+ 1
+ show status like 'handler_read_key';
+ Variable_name Value
+-Handler_read_key 3
++Handler_read_key 5
+ drop procedure p1;
+ set global stored_program_cache=default;
+ create procedure pr(i int) begin
diff --git a/mysql-test/suite/sys_vars/t/stored_program_cache_func.test b/mysql-test/suite/sys_vars/t/stored_program_cache_func.test
index 86cdd56a6de..611c33b530e 100644
--- a/mysql-test/suite/sys_vars/t/stored_program_cache_func.test
+++ b/mysql-test/suite/sys_vars/t/stored_program_cache_func.test
@@ -1,7 +1,5 @@
-if (`SELECT $PS_PROTOCOL != 0`)
-{
- --skip Test temporarily disabled for ps-protocol
-}
+--source include/protocol.inc
+
create procedure p1() select 1;
flush status;