Skip to content

Commit 21c7f8b

Browse files
committed
Bug#35837220 ndb.ndbapi-examples does not pass with TLS
If TLS is used on some cluster links copy TLS certificates and keys to a temporary $HOME/ndb-tls/ directory (on Windows %HOMEPATH/ndb-tls/) such that example programs will find the keys. Change-Id: Idd6f54bc382a815e92656fab0718394b7cac4adf
1 parent fc22db8 commit 21c7f8b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

mysql-test/suite/ndb/t/ndbapi-examples.test

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ let MASTER_MYSOCK=`select @@socket`;
88
# Setup path for log file
99
let NDB_EXAMPLES_OUTPUT=$MYSQLTEST_VARDIR/log/ndbapi_examples.log;
1010

11+
# If test is run with TLS then programs need to find the keys.
12+
let $tls = `SELECT COUNT(*) > 0 FROM ndbinfo.transporters WHERE encrypted = 1`;
13+
if ($tls) {
14+
let HOME=$MYSQL_TMP_DIR;
15+
let HOMEPATH=$MYSQL_TMP_DIR;
16+
--force-cpdir $MYSQLTEST_VARDIR/std_data/ndb-tls/active $HOME/ndb-tls
17+
}
18+
1119
--echo Running ndb_ndbapi_simple
1220
--exec $NDB_EXAMPLES_DIR/ndb_ndbapi_simple $MASTER_MYSOCK "$NDB_CONNECTSTRING" > $NDB_EXAMPLES_OUTPUT
1321

@@ -73,3 +81,6 @@ CREATE TABLE api_array_using_adapter(
7381
--exec $NDB_EXAMPLES_DIR/ndb_ndbapi_array_using_adapter "$NDB_CONNECTSTRING" test
7482
drop table api_array_using_adapter;
7583

84+
if ($tls) {
85+
--force-rmdir $HOME/ndb-tls
86+
}

0 commit comments

Comments
 (0)