File: rpl_auth.test

package info (click to toggle)
mariadb 1%3A11.8.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 765,428 kB
  • sloc: ansic: 2,382,827; cpp: 1,803,532; asm: 378,315; perl: 63,176; sh: 46,496; pascal: 40,776; java: 39,363; yacc: 20,428; python: 19,506; sql: 17,864; xml: 12,463; ruby: 8,544; makefile: 6,059; cs: 5,855; ada: 1,700; lex: 1,193; javascript: 1,039; objc: 80; tcl: 73; awk: 46; php: 22
file content (45 lines) | stat: -rw-r--r-- 1,384 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# MSAN doesn't like gnutls_rnd
source include/not_msan.inc;

if ($MTR_COMBINATION_ED25519) {
  let $AUTH_PLUGIN = ed25519;
  let $CLIENT_PLUGIN=client_ed25519;
}

if ($MTR_COMBINATION_PARSEC) {
  let $AUTH_PLUGIN = parsec;
  let $CLIENT_PLUGIN=parsec;
}

if (`select count(*) = 0 from information_schema.plugins where plugin_name = '$AUTH_PLUGIN'`)
{
  --skip Needs $AUTH_PLUGIN plugin
}

--replace_result $CLIENT_PLUGIN CLIENT_PLUGIN
--error ER_CANT_OPEN_LIBRARY,ER_CANT_FIND_DL_ENTRY
eval install soname '$CLIENT_PLUGIN';
if ($errno == 1126) {
  # this happens in bintars when C/C is linked with gnutls
  skip $CLIENT_PLUGIN is not found or contains unresolved symbols;
}

# create a user for replication with auth plugin
--replace_result $AUTH_PLUGIN PLUGIN
eval create user rpluser@'%' identified via $AUTH_PLUGIN using PASSWORD('rpl_pass');
grant replication slave on *.* to rpluser@'%';

source include/master-slave.inc;
connection slave;

# Set the slave to connect using the user created with the auth plugin for replication
source include/stop_slave.inc;
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
change master to master_user='rpluser', master_password='rpl_pass';
source include/start_slave.inc;
source include/stop_slave.inc;
change master to master_user='root', master_password='';
source include/start_slave.inc;

source include/rpl_end.inc;
drop user rpluser@'%';