66# ==== Requirements ====
77#
88# TC1: Verify that the column is added when doing an upgrade
9- # TC2: On upgrade verify that the value for REQUIRE_ROW_FORMAT is 0 for
10- # channels with no PRIVILEGE_CHECKS_USER
9+ # TC2: On upgrade verify that the value for REQUIRE_ROW_FORMAT is 0
1110# TC3: On upgrade verify that the value for REQUIRE_ROW_FORMAT is 1 for
12- # channels with a defined PRIVILEGE_CHECKS_USER
13- # TC4: On upgrade verify that the value for REQUIRE_ROW_FORMAT is 1 for
1411# group replication channels
15- # TC5 : Verify that TC2 and TC3 are true when upgrading from/to
12+ # TC4 : Verify that TC2 and TC3 are true when upgrading from/to
1613# File repositories
17- # TC6 : Verify that TC2, TC3 and TC4 are true when upgrading from/to
14+ # TC5 : Verify that TC2, TC3 and TC4 are true when upgrading from/to
1815# Table repositories
1916#
2017# ==== Implementation ====
2421#
2522# 1. Basic operations with REQUIRE_ROW_FORMAT
2623#
27- # 1.1. Set REQUIRE_ROW_FORMAT and REQUIRE_ROW_FORMAT to valid values
24+ # 1.1. Set REQUIRE_ROW_FORMAT to 1
2825# Check the performance_schema table and file repository are correct
29- # 1.2. Set REQUIRE_ROW_FORMAT and REQUIRE_ROW_FORMAT to valid values
26+ # 1.2. Set REQUIRE_ROW_FORMAT to 0
3027# Check the performance_schema table and file repository are correct
3128#
3229# 2. File to File upgrades
3633# REQUIRE_ROW_FORMAT must be 0
3734# 2.2 Upgrade the server while using File repositories
3835# Start the server using a file repository that has a privileged user
39- # REQUIRE_ROW_FORMAT must be 1
36+ # REQUIRE_ROW_FORMAT must be 0
4037#
4138# 3. File to Table upgrades
4239#
4542# REQUIRE_ROW_FORMAT must be 0
4643# 3.2 Upgrade the server to Table repositories from File repositories
4744# Start the server using a file repository that has a privileged user
48- # REQUIRE_ROW_FORMAT must be 1
45+ # REQUIRE_ROW_FORMAT must be 0
4946#
5047# 4. Table to Table upgrades
5148#
5451# 1. A channel with no privileged user (ch1)
5552# 2. A group_replication channel (group_replication_recovery)
5653# 3. A channel with a privileged user (default channel)
57- # REQUIRE_ROW_FORMAT must be 0 for 1). It must be 1 for 2) and 3 )
54+ # REQUIRE_ROW_FORMAT must be 0 for 1) and 3) . It must be 1 for 2)
5855#
5956# 5. Cleanup
6057#
@@ -97,7 +94,7 @@ FLUSH PRIVILEGES;
9794
9895 --let $assert_text = In the file the field is set to 1
9996 --let $assert_file = $MYSQLD_DATADIR/$rl_info_filename
100- --let $assert_only_after = localhost
97+ --let $assert_only_after = ^1\$
10198 --let $assert_select = 1
10299 --let $assert_count = 1
103100 --source include/assert_grep.inc
@@ -123,20 +120,20 @@ END_OF_PROCEDURE
123120# 1. Basic operations with REQUIRE_ROW_FORMAT
124121
125122--echo
126- --echo # 1.1. Set REQUIRE_ROW_FORMAT and REQUIRE_ROW_FORMAT to valid values
123+ --echo # 1.1. Set REQUIRE_ROW_FORMAT to 1
127124--echo # Check the performance_schema table and file repository are correct
128125
129126STOP SLAVE;
130127
131- CHANGE MASTER TO MASTER_HOST="localhost", REQUIRE_ROW_FORMAT = 1, PRIVILEGE_CHECKS_USER='replication_applier'@'localhost' ;
128+ CHANGE MASTER TO MASTER_HOST="localhost", REQUIRE_ROW_FORMAT = 1;
132129
133130--source $MYSQL_TMP_DIR/check_require_row_format_enabled_in_file_repo.inc
134131
135132--echo
136- --echo # 1.2. Set REQUIRE_ROW_FORMAT and REQUIRE_ROW_FORMAT to valid values
133+ --echo # 1.2. Set REQUIRE_ROW_FORMAT to 0
137134--echo # Check the performance_schema table and file repository are correct
138135
139- CHANGE MASTER TO PRIVILEGE_CHECKS_USER=NULL, REQUIRE_ROW_FORMAT = 0;
136+ CHANGE MASTER TO REQUIRE_ROW_FORMAT = 0;
140137
141138--source $MYSQL_TMP_DIR/check_require_row_format_disabled_in_file_repo.inc
142139
@@ -157,14 +154,14 @@ CHANGE MASTER TO PRIVILEGE_CHECKS_USER=NULL, REQUIRE_ROW_FORMAT = 0;
157154--echo
158155--echo # 2.2 Upgrade the server while using File repositories
159156--echo # Start the server using a file repository that has a privileged user
160- --echo # REQUIRE_ROW_FORMAT must be 1
157+ --echo # REQUIRE_ROW_FORMAT must be 0
161158
162159--let $sub_testcase = no_flag_with_priv_user
163160--let $rpl_server_restart_parameters = --skip_slave_start
164161--let $slave_server_num = 2
165162--source extra/rpl_tests/restart_slave_with_custom_relaylog_repo_file.inc
166163
167- --source $MYSQL_TMP_DIR/check_require_row_format_enabled_in_file_repo .inc
164+ --source $MYSQL_TMP_DIR/check_require_row_format_disabled_in_file_repo .inc
168165
169166--echo # Reset the repository to default values
170167
@@ -198,7 +195,7 @@ ALTER TABLE mysql.slave_relay_log_info DROP COLUMN Require_row_format;
198195--echo
199196--echo # 3.2 Upgrade the server to Table repositories from File repositories
200197--echo # Start the server using a file repository that has a privileged user
201- --echo # REQUIRE_ROW_FORMAT must be 1
198+ --echo # REQUIRE_ROW_FORMAT must be 0
202199
203200--let $rpl_server_number = 2
204201--let $rpl_server_parameters = --relay-log-info-repository=FILE
@@ -212,11 +209,11 @@ ALTER TABLE mysql.slave_relay_log_info DROP COLUMN Require_row_format;
212209--let $slave_server_num = 2
213210--source extra/rpl_tests/restart_slave_with_custom_relaylog_repo_file.inc
214211
215- --let $assert_text = Check that mysql.slave_relay_log_info has an entry with REQUIRE_ROW_FORMAT set to 1
216- --let $assert_cond = [SELECT COUNT(*) FROM mysql.slave_relay_log_info WHERE CHANNEL_NAME="" AND REQUIRE_ROW_FORMAT = 1 ] = 1
212+ --let $assert_text = Check that mysql.slave_relay_log_info has an entry with REQUIRE_ROW_FORMAT set to 0
213+ --let $assert_cond = [SELECT COUNT(*) FROM mysql.slave_relay_log_info WHERE CHANNEL_NAME="" AND REQUIRE_ROW_FORMAT = 0 ] = 1
217214--source include/assert.inc
218215
219- --let $count = `SELECT COUNT(*) FROM performance_schema.replication_applier_configuration WHERE REQUIRE_ROW_FORMAT = 'YES '`
216+ --let $count = `SELECT COUNT(*) FROM performance_schema.replication_applier_configuration WHERE REQUIRE_ROW_FORMAT = 'NO '`
220217--let $assert_text = Check entry for default channel "" in performance_schema.replication_applier_configuration
221218--let $assert_cond = $count = 1
222219--source include/assert.inc
@@ -229,12 +226,13 @@ ALTER TABLE mysql.slave_relay_log_info DROP COLUMN Require_row_format;
229226--echo # 1. A channel with no privileged user (ch1)
230227--echo # 2. A group_replication channel (group_replication_recovery)
231228--echo # 3. A channel with a privileged user (default channel)
232- --echo # REQUIRE_ROW_FORMAT must be 0 for 1). It must be 1 for 2) and 3 )
229+ --echo # REQUIRE_ROW_FORMAT must be 0 for 1) and 3) . It must be 1 for 2)
233230
234231CHANGE MASTER TO MASTER_HOST="localhost", MASTER_PORT=12 FOR CHANNEL "ch1" ;
235232--disable_warnings
236233CHANGE MASTER TO MASTER_USER="root" FOR CHANNEL "group_replication_recovery";
237234--enable_warnings
235+ CHANGE MASTER TO MASTER_HOST="localhost", MASTER_PORT=12, PRIVILEGE_CHECKS_USER = 'replication_applier'@'localhost' FOR CHANNEL "";
238236
239237# Revert the table to 10 lines (pre upgrade)
240238ALTER TABLE mysql.slave_relay_log_info DROP COLUMN Require_row_format;
@@ -248,16 +246,16 @@ UPDATE mysql.slave_relay_log_info SET Number_of_lines = 10;
248246# We have only 1 table here as group_replication_recovery does not show up
249247--let $count = `SELECT COUNT(*) FROM performance_schema.replication_applier_configuration WHERE REQUIRE_ROW_FORMAT = 'YES'`
250248--let $assert_text = Check the number of channels with enabled REQUIRE_ROW_FORMAT
251- --let $assert_cond = $count = 1
249+ --let $assert_cond = $count = 0
252250--source include/assert.inc
253251
254252--let $count = `SELECT COUNT(*) FROM performance_schema.replication_applier_configuration WHERE REQUIRE_ROW_FORMAT = 'NO'`
255253--let $assert_text = Check the number of channels with disabled REQUIRE_ROW_FORMAT
256- --let $assert_cond = $count = 1
254+ --let $assert_cond = $count = 2
257255--source include/assert.inc
258256
259- --let $assert_text = Check that mysql.slave_relay_log_info has an entry with REQUIRE_ROW_FORMAT set to 1
260- --let $assert_cond = [SELECT COUNT(*) FROM mysql.slave_relay_log_info WHERE CHANNEL_NAME="" AND REQUIRE_ROW_FORMAT = 1 ] = 1
257+ --let $assert_text = Check that mysql.slave_relay_log_info has an entry with REQUIRE_ROW_FORMAT set to 0
258+ --let $assert_cond = [SELECT COUNT(*) FROM mysql.slave_relay_log_info WHERE CHANNEL_NAME="" AND REQUIRE_ROW_FORMAT = 0 ] = 1
261259--source include/assert.inc
262260
263261--let $assert_text = Check that mysql.slave_relay_log_info has an entry with REQUIRE_ROW_FORMAT set to 1
0 commit comments