1# switching from mysql.global_priv to mysql.user
2drop view mysql.user_bak;
3install soname 'ha_blackhole';
4install soname 'ha_archive';
5create table t1 (a int) engine=blackhole;
6create table t2 (a int) engine=archive;
7select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t1';
8table_catalog	def
9table_schema	test
10table_name	t1
11table_type	BASE TABLE
12engine	BLACKHOLE
13row_format	Fixed
14table_rows	0
15data_length	0
16table_comment
17select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t2';
18table_catalog	def
19table_schema	test
20table_name	t2
21table_type	BASE TABLE
22engine	ARCHIVE
23row_format	Compressed
24table_rows	0
25data_length	521
26table_comment
27flush tables;
28uninstall plugin blackhole;
29uninstall plugin archive;
30select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t1';
31table_catalog	def
32table_schema	test
33table_name	t1
34table_type	BASE TABLE
35engine	BLACKHOLE
36row_format	NULL
37table_rows	NULL
38data_length	NULL
39table_comment	Unknown storage engine 'BLACKHOLE'
40Warnings:
41Level	Warning
42Code	1286
43Message	Unknown storage engine 'BLACKHOLE'
44select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t2';
45table_catalog	def
46table_schema	test
47table_name	t2
48table_type	BASE TABLE
49engine	ARCHIVE
50row_format	NULL
51table_rows	NULL
52data_length	NULL
53table_comment	Unknown storage engine 'ARCHIVE'
54Warnings:
55Level	Warning
56Code	1286
57Message	Unknown storage engine 'ARCHIVE'
58# upgrade from 10.1 - engines aren't enabled
59Phase 1/7: Checking and upgrading mysql database
60Processing databases
61mysql
62mysql.column_stats                                 OK
63mysql.columns_priv                                 OK
64mysql.db                                           OK
65mysql.event                                        OK
66mysql.func                                         OK
67mysql.global_priv_bak                              OK
68mysql.gtid_slave_pos                               OK
69mysql.help_category                                OK
70mysql.help_keyword                                 OK
71mysql.help_relation                                OK
72mysql.help_topic                                   OK
73mysql.index_stats                                  OK
74mysql.innodb_index_stats                           OK
75mysql.innodb_table_stats                           OK
76mysql.plugin                                       OK
77mysql.proc                                         OK
78mysql.procs_priv                                   OK
79mysql.proxies_priv                                 OK
80mysql.roles_mapping                                OK
81mysql.servers                                      OK
82mysql.table_stats                                  OK
83mysql.tables_priv                                  OK
84mysql.time_zone                                    OK
85mysql.time_zone_leap_second                        OK
86mysql.time_zone_name                               OK
87mysql.time_zone_transition                         OK
88mysql.time_zone_transition_type                    OK
89mysql.transaction_registry                         OK
90mysql.user                                         OK
91Phase 2/7: Installing used storage engines... Skipped
92Phase 3/7: Fixing views
93Phase 4/7: Running 'mysql_fix_privilege_tables'
94Phase 5/7: Fixing table and database names
95Phase 6/7: Checking and upgrading tables
96Processing databases
97information_schema
98mtr
99mtr.global_suppressions                            OK
100mtr.test_suppressions                              OK
101performance_schema
102test
103test.t1
104Error    : Unknown storage engine 'BLACKHOLE'
105error    : Corrupt
106test.t2
107Error    : Unknown storage engine 'ARCHIVE'
108error    : Corrupt
109
110Repairing tables
111test.t1
112Error    : Unknown storage engine 'BLACKHOLE'
113error    : Corrupt
114test.t2
115Error    : Unknown storage engine 'ARCHIVE'
116error    : Corrupt
117Phase 7/7: Running 'FLUSH PRIVILEGES'
118OK
119select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t1';
120table_catalog	def
121table_schema	test
122table_name	t1
123table_type	BASE TABLE
124engine	BLACKHOLE
125row_format	NULL
126table_rows	NULL
127data_length	NULL
128table_comment	Unknown storage engine 'BLACKHOLE'
129Warnings:
130Level	Warning
131Code	1286
132Message	Unknown storage engine 'BLACKHOLE'
133select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t2';
134table_catalog	def
135table_schema	test
136table_name	t2
137table_type	BASE TABLE
138engine	ARCHIVE
139row_format	NULL
140table_rows	NULL
141data_length	NULL
142table_comment	Unknown storage engine 'ARCHIVE'
143Warnings:
144Level	Warning
145Code	1286
146Message	Unknown storage engine 'ARCHIVE'
147drop table mysql.global_priv;
148rename table mysql.global_priv_bak to mysql.global_priv;
149# switching from mysql.global_priv to mysql.user
150drop view mysql.user_bak;
151alter table mysql.user drop column default_role, drop column max_statement_time;
152# still upgrade from 10.1
153Major version upgrade detected from MariaDB  to MariaDB . Check required!
154Phase 1/7: Checking and upgrading mysql database
155Processing databases
156mysql
157mysql.column_stats                                 OK
158mysql.columns_priv                                 OK
159mysql.db                                           OK
160mysql.event                                        OK
161mysql.func                                         OK
162mysql.global_priv_bak                              OK
163mysql.gtid_slave_pos                               OK
164mysql.help_category                                OK
165mysql.help_keyword                                 OK
166mysql.help_relation                                OK
167mysql.help_topic                                   OK
168mysql.index_stats                                  OK
169mysql.innodb_index_stats                           OK
170mysql.innodb_table_stats                           OK
171mysql.plugin                                       OK
172mysql.proc                                         OK
173mysql.procs_priv                                   OK
174mysql.proxies_priv                                 OK
175mysql.roles_mapping                                OK
176mysql.servers                                      OK
177mysql.table_stats                                  OK
178mysql.tables_priv                                  OK
179mysql.time_zone                                    OK
180mysql.time_zone_leap_second                        OK
181mysql.time_zone_name                               OK
182mysql.time_zone_transition                         OK
183mysql.time_zone_transition_type                    OK
184mysql.transaction_registry                         OK
185mysql.user                                         OK
186Phase 2/7: Installing used storage engines... Skipped
187Phase 3/7: Fixing views
188Phase 4/7: Running 'mysql_fix_privilege_tables'
189Phase 5/7: Fixing table and database names
190Phase 6/7: Checking and upgrading tables
191Processing databases
192information_schema
193mtr
194mtr.global_suppressions                            OK
195mtr.test_suppressions                              OK
196performance_schema
197test
198test.t1
199Error    : Unknown storage engine 'BLACKHOLE'
200error    : Corrupt
201test.t2
202Error    : Unknown storage engine 'ARCHIVE'
203error    : Corrupt
204
205Repairing tables
206test.t1
207Error    : Unknown storage engine 'BLACKHOLE'
208error    : Corrupt
209test.t2
210Error    : Unknown storage engine 'ARCHIVE'
211error    : Corrupt
212Phase 7/7: Running 'FLUSH PRIVILEGES'
213OK
214select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t1';
215table_catalog	def
216table_schema	test
217table_name	t1
218table_type	BASE TABLE
219engine	BLACKHOLE
220row_format	NULL
221table_rows	NULL
222data_length	NULL
223table_comment	Unknown storage engine 'BLACKHOLE'
224Warnings:
225Level	Warning
226Code	1286
227Message	Unknown storage engine 'BLACKHOLE'
228select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t2';
229table_catalog	def
230table_schema	test
231table_name	t2
232table_type	BASE TABLE
233engine	ARCHIVE
234row_format	NULL
235table_rows	NULL
236data_length	NULL
237table_comment	Unknown storage engine 'ARCHIVE'
238Warnings:
239Level	Warning
240Code	1286
241Message	Unknown storage engine 'ARCHIVE'
242drop table mysql.global_priv;
243rename table mysql.global_priv_bak to mysql.global_priv;
244# switching from mysql.global_priv to mysql.user
245drop view mysql.user_bak;
246alter table mysql.user drop column default_role, drop column max_statement_time;
247# upgrade from 10.0 - engines are enabled
248Phase 1/7: Checking and upgrading mysql database
249Processing databases
250mysql
251mysql.column_stats                                 OK
252mysql.columns_priv                                 OK
253mysql.db                                           OK
254mysql.event                                        OK
255mysql.func                                         OK
256mysql.global_priv_bak                              OK
257mysql.gtid_slave_pos                               OK
258mysql.help_category                                OK
259mysql.help_keyword                                 OK
260mysql.help_relation                                OK
261mysql.help_topic                                   OK
262mysql.index_stats                                  OK
263mysql.innodb_index_stats                           OK
264mysql.innodb_table_stats                           OK
265mysql.plugin                                       OK
266mysql.proc                                         OK
267mysql.procs_priv                                   OK
268mysql.proxies_priv                                 OK
269mysql.roles_mapping                                OK
270mysql.servers                                      OK
271mysql.table_stats                                  OK
272mysql.tables_priv                                  OK
273mysql.time_zone                                    OK
274mysql.time_zone_leap_second                        OK
275mysql.time_zone_name                               OK
276mysql.time_zone_transition                         OK
277mysql.time_zone_transition_type                    OK
278mysql.transaction_registry                         OK
279mysql.user                                         OK
280Upgrading from a version before MariaDB-10.1
281Phase 2/7: Installing used storage engines
282Checking for tables with unknown storage engine
283installing plugin for 'archive' storage engine
284installing plugin for 'blackhole' storage engine
285Phase 3/7: Fixing views
286Phase 4/7: Running 'mysql_fix_privilege_tables'
287Phase 5/7: Fixing table and database names
288Phase 6/7: Checking and upgrading tables
289Processing databases
290information_schema
291mtr
292mtr.global_suppressions                            OK
293mtr.test_suppressions                              OK
294performance_schema
295test
296test.t1                                            OK
297test.t2                                            OK
298Phase 7/7: Running 'FLUSH PRIVILEGES'
299OK
300select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t1';
301table_catalog	def
302table_schema	test
303table_name	t1
304table_type	BASE TABLE
305engine	BLACKHOLE
306row_format	Fixed
307table_rows	0
308data_length	0
309table_comment
310select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t2';
311table_catalog	def
312table_schema	test
313table_name	t2
314table_type	BASE TABLE
315engine	ARCHIVE
316row_format	Compressed
317table_rows	0
318data_length	521
319table_comment
320drop table t1, t2;
321uninstall plugin blackhole;
322uninstall plugin archive;
323drop table mysql.global_priv;
324rename table mysql.global_priv_bak to mysql.global_priv;
325