summaryrefslogtreecommitdiffstats
path: root/mysql-test/main/backup_syntax.result
blob: 4b8e74edd571cb3c3a3b2acff5188813ab143276 (plain)
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
#-----------------------------------------------------------------------
# Basic syntax checks
#-----------------------------------------------------------------------
# Check existing BACKUP STAGE statements in the sequence to be used.
BACKUP STAGE START;
BACKUP STAGE FLUSH;
BACKUP STAGE BLOCK_DDL;
BACKUP STAGE BLOCK_COMMIT;
BACKUP STAGE END;
# Check invalid variants of BACKUP .... syntax.
BACKUP LOG;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'LOG' at line 1
BACKUP LOCK;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
BACKUP STAGE;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
BACKUP STAGE LOCK;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'LOCK' at line 1
BACKUP STAGE not_existing;
ERROR HY000: Unknown backup stage: 'not_existing'. Stage should be one of START, FLUSH, BLOCK_DDL, BLOCK_COMMIT or END
#-----------------------------------------------------------------------
# BACKUP STAGE statements in various orders.
#-----------------------------------------------------------------------
# All BACKUP STAGE statements != 'BACKUP STAGE START' expect that a
# backup lock (generated by BACKUP STAGE START) already exists.
#
backup stage start;
backup stage flush;
backup stage start;
ERROR HY000: Backup stage 'START' is same or before current backup stage 'FLUSH'
backup stage start;
ERROR HY000: Backup stage 'START' is same or before current backup stage 'FLUSH'
backup stage block_commit;
backup stage flush;
ERROR HY000: Backup stage 'FLUSH' is same or before current backup stage 'BLOCK_COMMIT'
backup stage flush;
ERROR HY000: Backup stage 'FLUSH' is same or before current backup stage 'BLOCK_COMMIT'
backup stage end;
backup stage flush;
ERROR HY000: You must start backup with "BACKUP STAGE START"
BACKUP STAGE END;
ERROR HY000: You must start backup with "BACKUP STAGE START"
BACKUP STAGE BLOCK_COMMIT;
ERROR HY000: You must start backup with "BACKUP STAGE START"
BACKUP STAGE BLOCK_DDL;
ERROR HY000: You must start backup with "BACKUP STAGE START"
BACKUP STAGE FLUSH;
ERROR HY000: You must start backup with "BACKUP STAGE START"
# Ordered "give up" with 'BACKUP STAGE END' because of whatever reason.
# Some existing backup lock assumed a 'BACKUP STAGE END' is allowed in
# every situation.
BACKUP STAGE START;
BACKUP STAGE END;
#----
BACKUP STAGE START;
BACKUP STAGE FLUSH;
BACKUP STAGE END;
#----
BACKUP STAGE START;
BACKUP STAGE FLUSH;
BACKUP STAGE BLOCK_DDL;
BACKUP STAGE END;
# Orders with BACKUP STAGE FLUSH omitted.
BACKUP STAGE START;
BACKUP STAGE BLOCK_DDL;
BACKUP STAGE END;
#----
BACKUP STAGE START;
BACKUP STAGE BLOCK_DDL;
BACKUP STAGE BLOCK_COMMIT;
BACKUP STAGE END;
# Orders with BACKUP STAGE BLOCK_DDL omitted.
BACKUP STAGE START;
BACKUP STAGE FLUSH;
BACKUP STAGE BLOCK_COMMIT;
BACKUP STAGE END;
# Orders with BACKUP STAGE BLOCK_COMMIT omitted.
BACKUP STAGE START;
BACKUP STAGE FLUSH;
BACKUP STAGE BLOCK_DDL;
BACKUP STAGE END;
# Orders with doubled BACKUP STAGE statements.
# We get an error but that seems to have no bad impact on the state.
# And so we are allowed to go on with BACKUP STAGE statements.
BACKUP STAGE START;
BACKUP STAGE START;
ERROR HY000: Backup stage 'START' is same or before current backup stage 'START'
BACKUP STAGE FLUSH;
BACKUP STAGE BLOCK_DDL;
BACKUP STAGE BLOCK_COMMIT;
BACKUP STAGE END;
#----
BACKUP STAGE START;
BACKUP STAGE FLUSH;
BACKUP STAGE FLUSH;
ERROR HY000: Backup stage 'FLUSH' is same or before current backup stage 'FLUSH'
BACKUP STAGE END;
#----
BACKUP STAGE START;
BACKUP STAGE FLUSH;
BACKUP STAGE BLOCK_DDL;
BACKUP STAGE BLOCK_DDL;
ERROR HY000: Backup stage 'BLOCK_DDL' is same or before current backup stage 'BLOCK_DDL'
BACKUP STAGE END;
#----
BACKUP STAGE START;
BACKUP STAGE FLUSH;
BACKUP STAGE BLOCK_DDL;
BACKUP STAGE BLOCK_COMMIT;
BACKUP STAGE BLOCK_COMMIT;
ERROR HY000: Backup stage 'BLOCK_COMMIT' is same or before current backup stage 'BLOCK_COMMIT'
BACKUP STAGE END;
# Scrambled orders.
BACKUP STAGE START;
BACKUP STAGE FLUSH;
BACKUP STAGE START;
ERROR HY000: Backup stage 'START' is same or before current backup stage 'FLUSH'
BACKUP STAGE BLOCK_DDL;
BACKUP STAGE START;
ERROR HY000: Backup stage 'START' is same or before current backup stage 'BLOCK_DDL'
BACKUP STAGE BLOCK_COMMIT;
BACKUP STAGE START;
ERROR HY000: Backup stage 'START' is same or before current backup stage 'BLOCK_COMMIT'
BACKUP STAGE END;
#----
BACKUP STAGE START;
BACKUP STAGE FLUSH;
BACKUP STAGE BLOCK_DDL;
BACKUP STAGE FLUSH;
ERROR HY000: Backup stage 'FLUSH' is same or before current backup stage 'BLOCK_DDL'
BACKUP STAGE BLOCK_COMMIT;
BACKUP STAGE FLUSH;
ERROR HY000: Backup stage 'FLUSH' is same or before current backup stage 'BLOCK_COMMIT'
BACKUP STAGE END;
#----
BACKUP STAGE START;
BACKUP STAGE FLUSH;
BACKUP STAGE BLOCK_DDL;
BACKUP STAGE BLOCK_COMMIT;
BACKUP STAGE BLOCK_DDL;
ERROR HY000: Backup stage 'BLOCK_DDL' is same or before current backup stage 'BLOCK_COMMIT'
BACKUP STAGE END;
#----
BACKUP STAGE START;
BACKUP STAGE BLOCK_DDL;
BACKUP STAGE FLUSH;
ERROR HY000: Backup stage 'FLUSH' is same or before current backup stage 'BLOCK_DDL'
BACKUP STAGE BLOCK_COMMIT;
BACKUP STAGE END;
#----
BACKUP STAGE START;
BACKUP STAGE FLUSH;
BACKUP STAGE BLOCK_COMMIT;
BACKUP STAGE BLOCK_DDL;
ERROR HY000: Backup stage 'BLOCK_DDL' is same or before current backup stage 'BLOCK_COMMIT'
BACKUP STAGE END;
#
# Check Oracle syntax
#
set SQL_MODE=Oracle;
backup stage start;
backup stage end;
set SQL_MODE=default;