1
1
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
2
2
CREATE user backup@localhost IDENTIFIED BY 'xyz';
3
3
4
+ let SEARCH_FILE=$MYSQLTEST_VARDIR/tmp/backup.log;
4
5
# backup possible for unprivileges user, with --no-lock
5
6
--disable_result_log
6
- exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup -ubackup -pxyz --no-lock --target-dir=$targetdir;
7
+ exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup -ubackup -pxyz --no-lock --target-dir=$targetdir > $MYSQLTEST_VARDIR/tmp/backup.log 2>&1 ;
7
8
--enable_result_log
9
+
10
+ --let SEARCH_PATTERN= missing required privilege
11
+ --source include/search_pattern_in_file.inc
8
12
rmdir $targetdir;
9
13
10
14
# backup fails without --no-lock, because of FTWRL
@@ -13,7 +17,6 @@ error 1;
13
17
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup -ubackup -pxyz --target-dir=$targetdir > $MYSQLTEST_VARDIR/tmp/backup.log 2>&1;
14
18
--enable_result_log
15
19
16
- let SEARCH_FILE=$MYSQLTEST_VARDIR/tmp/backup.log;
17
20
--let SEARCH_PATTERN= missing required privilege RELOAD
18
21
--source include/search_pattern_in_file.inc
19
22
--let SEARCH_PATTERN= missing required privilege PROCESS
@@ -23,25 +26,29 @@ let SEARCH_FILE=$MYSQLTEST_VARDIR/tmp/backup.log;
23
26
# backup succeeds with RELOAD privilege
24
27
GRANT RELOAD, PROCESS on *.* to backup@localhost;
25
28
--disable_result_log
26
- exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --user=backup --password=xyz --target-dir=$targetdir;
29
+ exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --user=backup --password=xyz --target-dir=$targetdir > $MYSQLTEST_VARDIR/tmp/backup.log 2>&1 ;
27
30
--enable_result_log
31
+ --let SEARCH_PATTERN= missing required privilege
32
+ --source include/search_pattern_in_file.inc
28
33
rmdir $targetdir;
29
34
30
35
# MDEV-23607 Warning: missing required privilege REPLICATION CLIENT
31
- # --slave-info and galera info require REPLICA MONITOR
36
+ # --slave-info and -- galera- info require REPLICA MONITOR
32
37
--disable_result_log
33
38
error 1;
34
39
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --user backup --password xyz --slave-info --target-dir=$targetdir > $MYSQLTEST_VARDIR/tmp/backup.log 2>&1;
35
40
--enable_result_log
36
41
rmdir $targetdir;
37
42
38
- --let SEARCH_PATTERN= missing required privilege REPLICA MONITOR
43
+ --let SEARCH_PATTERN= missing required privilege SLAVE MONITOR
39
44
--source include/search_pattern_in_file.inc
40
45
41
46
GRANT REPLICA MONITOR ON *.* TO backup@localhost;
42
47
--disable_result_log
43
- exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup -ubackup -pxyz --slave-info --target-dir=$targetdir;
48
+ exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup -ubackup -pxyz --slave-info --target-dir=$targetdir > $MYSQLTEST_VARDIR/tmp/backup.log 2>&1 ;
44
49
--enable_result_log
50
+ --let SEARCH_PATTERN= missing required privilege
51
+ --source include/search_pattern_in_file.inc
45
52
rmdir $targetdir;
46
53
REVOKE REPLICA MONITOR ON *.* FROM backup@localhost;
47
54
@@ -59,8 +66,10 @@ rmdir $targetdir;
59
66
60
67
GRANT CONNECTION ADMIN ON *.* TO backup@localhost;
61
68
--disable_result_log
62
- exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --user=backup --password=xyz --kill-long-query-type=all --kill-long-queries-timeout=1 --target-dir=$targetdir;
69
+ exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup -ubackup --password=xyz --kill-long-query-type=all --kill-long-queries-timeout=1 --target-dir=$targetdir > $MYSQLTEST_VARDIR/tmp/backup.log 2>&1 ;
63
70
--enable_result_log
71
+ --let SEARCH_PATTERN= missing required privilege
72
+ --source include/search_pattern_in_file.inc
64
73
rmdir $targetdir;
65
74
66
75
# --safe-slave-backup requires REPLICATION SLAVE ADMIN, and REPLICA MONITOR
@@ -72,14 +81,16 @@ rmdir $targetdir;
72
81
73
82
--let SEARCH_PATTERN= missing required privilege REPLICATION SLAVE ADMIN
74
83
--source include/search_pattern_in_file.inc
75
- --let SEARCH_PATTERN= missing required privilege REPLICA MONITOR
84
+ --let SEARCH_PATTERN= missing required privilege SLAVE MONITOR
76
85
--source include/search_pattern_in_file.inc
77
86
78
87
GRANT REPLICATION SLAVE ADMIN ON *.* TO backup@localhost;
79
88
GRANT REPLICA MONITOR ON *.* TO backup@localhost;
80
89
--disable_result_log
81
- exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup -ubackup -pxyz --safe-slave-backup --target-dir=$targetdir;
90
+ exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup -ubackup -pxyz --safe-slave-backup --target-dir=$targetdir > $MYSQLTEST_VARDIR/tmp/backup.log 2>&1 ;
82
91
--enable_result_log
92
+ --let SEARCH_PATTERN= missing required privilege
93
+ --source include/search_pattern_in_file.inc
83
94
rmdir $targetdir;
84
95
85
96
DROP USER backup@localhost;
0 commit comments