Skip to content

Commit

Permalink
Bug #25083555 SOME TESTS FAIL WITH DEBUG SERVER ON SOLARIS WHEN BUILT…
Browse files Browse the repository at this point in the history
… WITH DEVELOPER STUDIO

When we do a release type build of the server (with both optimized and
debug enabled server/plugins) with Developer Studio, some MTR tests
when run with --debug-server will fail in one of two ways:

1. Tests which try to load a plugin into the mysql client fail with
   missing symbols. This is caused by the plugin having references to
   functions which do not exist in the non-debug client.

2. Some tests on sparc fail with Thread stack overrun.

Fix for issue #1: mtr will have appended /debug to the plugin dir part
when running with --debug-server and if there actually is such a
directory. The fix is to remove any trailing /debug from the
env. variable within the test. This will affect the client only, not
the server. Developer builds will not have put the plugins in a
subdirectory /debug so it makes no different to those.

Fix for issue #2: apparently this thread stack overrun is not feasible
to avoid, so just skip the test if running with debug server on sparc;
there is already an include file to do that.

Also added not_sparc_debug.inc to the "white list" so the tests are
skipped even when running mtr --no-skip.

(cherry picked from commit 9c79e477261ab252e38def436bca3336ef597603)
  • Loading branch information
bjornmu committed Mar 14, 2017
1 parent dcde034 commit cf3c400
Show file tree
Hide file tree
Showing 14 changed files with 55 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
--echo # Do proxy setup
--source ../inc/setup_proxy_accounts.inc

# Official builds include separate debug enabled plugins to be used by
# the debug enabled server. But the non-debug *client* should not use them.

let PLUGIN_AUTH_OPT=`SELECT TRIM(TRAILING '/debug' FROM '$PLUGIN_AUTH_OPT')`;
let CONNECTION_CONTROL_PLUGIN_OPT=`SELECT TRIM(TRAILING '/debug' FROM '$CONNECTION_CONTROL_PLUGIN_OPT')`;

# Suppress error messages from test_plugin_server
CALL mtr.add_suppression("Plugin test_plugin_server reported: 'Wrong password supplied for proxied'");

Expand Down
3 changes: 3 additions & 0 deletions mysql-test/suite/funcs_1/triggers/triggers_1011ext.inc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
#======================================================================
# WL#4084: enable disabled parts, 2007-11-15, hhunger

# Thread stack overrun in debug mode on sparc
--source include/not_sparc_debug.inc

USE test;
--source suite/funcs_1/include/tb3.inc

Expand Down
2 changes: 2 additions & 0 deletions mysql-test/suite/rpl/t/rpl_mix_found_rows.test
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
source include/master-slave.inc;
source include/have_binlog_format_mixed.inc;
# Thread stack overrun in debug mode on sparc
--source include/not_sparc_debug.inc

# It is not possible to replicate FOUND_ROWS() using statement-based
# replication, but there is a workaround that stores the result of
Expand Down
2 changes: 2 additions & 0 deletions mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
-- source include/not_group_replication_plugin.inc
-- source include/not_gtid_enabled.inc
-- source include/master-slave.inc
# Thread stack overrun in debug mode on sparc
--source include/not_sparc_debug.inc

# Since this test generates row-based events in the binary log, the
# slave SQL thread cannot be in STATEMENT mode to execute this test,
Expand Down
3 changes: 3 additions & 0 deletions mysql-test/suite/sysschema/t/pr_diagnostics.test
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@

-- source include/not_embedded.inc

# Thread stack overrun in debug mode on sparc
--source include/not_sparc_debug.inc

# Sanity check that the procedure completes two iterations with full debug,
# raw output, and Information Schema table outputs without generating
# any warnings.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
# Bug #23290879 - For reasons unknown to man this test fails randomly only on Windows
-- source include/not_windows.inc

# Thread stack overrun in debug mode on sparc
--source include/not_sparc_debug.inc

use test;
--disable_warnings
DROP TABLE IF EXISTS t1;
Expand Down
4 changes: 4 additions & 0 deletions mysql-test/t/bug33509.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
# BUG#33509: Server crashes with number of recursive subqueries=61
# (the query may or may not fail with an error so we're using it with SP
#

# Thread stack overrun in debug mode on sparc
--source include/not_sparc_debug.inc

create table t1 (a int not null);

delimiter |;
Expand Down
5 changes: 5 additions & 0 deletions mysql-test/t/grant_alter_user_qa.test
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@

call mtr.add_suppression("\\[Warning\\] Server shutdown in progress");

# Official builds include separate debug enabled plugins to be used by
# the debug enabled server. But the non-debug *client* should not use them.

let PLUGIN_AUTH_OPT=`SELECT TRIM(TRAILING '/debug' FROM '$PLUGIN_AUTH_OPT')`;

--echo # CREATE USER
--echo
CREATE USER user1;
Expand Down
3 changes: 3 additions & 0 deletions mysql-test/t/mix2_myisam.test
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

--source include/have_myisam.inc

# Thread stack overrun in debug mode on sparc
--source include/not_sparc_debug.inc

let $engine_type= MyISAM;
let $other_engine_type= MEMORY;
# There are unfortunately only MyISAM and MEMORY all time available
Expand Down
5 changes: 5 additions & 0 deletions mysql-test/t/plugin_auth.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
--source include/mysql_upgrade_preparation.inc
CALL mtr.add_suppression("Plugin test_plugin_server reported: 'Wrong password supplied for plug_dest'");

# Official builds include separate debug enabled plugins to be used by
# the debug enabled server. But the non-debug *client* should not use them.

let PLUGIN_AUTH_OPT=`SELECT TRIM(TRAILING '/debug' FROM '$PLUGIN_AUTH_OPT')`;

query_vertical SELECT PLUGIN_STATUS, PLUGIN_TYPE, PLUGIN_DESCRIPTION
FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME='test_plugin_server';

Expand Down
5 changes: 5 additions & 0 deletions mysql-test/t/plugin_auth_qa_1.test
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
CALL mtr.add_suppression("Plugin test_plugin_server reported: 'Wrong password supplied for plug_dest'");
CALL mtr.add_suppression("The plugin 'new_plugin_server' used to authenticate user 'new_user'@'%' is not loaded. Nobody can currently login using this account.");

# Official builds include separate debug enabled plugins to be used by
# the debug enabled server. But the non-debug *client* should not use them.

let PLUGIN_AUTH_OPT=`SELECT TRIM(TRAILING '/debug' FROM '$PLUGIN_AUTH_OPT')`;

CREATE DATABASE test_user_db;

--source include/plugin_auth_check_non_default_users.inc
Expand Down
5 changes: 5 additions & 0 deletions mysql-test/t/plugin_auth_qa_2.test
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
--source include/have_plugin_interface.inc
--source include/not_embedded.inc

# Official builds include separate debug enabled plugins to be used by
# the debug enabled server. But the non-debug *client* should not use them.

let PLUGIN_AUTH_OPT=`SELECT TRIM(TRAILING '/debug' FROM '$PLUGIN_AUTH_OPT')`;

CREATE DATABASE test_user_db;

--echo ========== test 1.1.3.2 ====================================
Expand Down
5 changes: 5 additions & 0 deletions mysql-test/t/plugin_auth_qa_3.test
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
--source include/have_plugin_server.inc
--source include/not_embedded.inc

# Official builds include separate debug enabled plugins to be used by
# the debug enabled server. But the non-debug *client* should not use them.

let PLUGIN_AUTH_OPT=`SELECT TRIM(TRAILING '/debug' FROM '$PLUGIN_AUTH_OPT')`;

CREATE DATABASE test_user_db;

CREATE USER qa_test_11_user IDENTIFIED WITH qa_auth_server AS 'qa_test_11_dest';
Expand Down
4 changes: 4 additions & 0 deletions mysql-test/t/sp-lock.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
# Metadata lock handling for stored procedures and
# functions.
#

# Thread stack overrun in debug mode on sparc
--source include/not_sparc_debug.inc

--echo #
--echo # Test coverage for changes performed by the fix
--echo # for Bug#30977 "Concurrent statement using stored function
Expand Down

0 comments on commit cf3c400

Please sign in to comment.