| 1 |
--let $rpl_skip_start_slave=1 |
| 2 |
--source include/master-slave.inc |
| 3 |
--source include/have_binlog_format_row.inc |
| 4 |
|
| 5 |
# Add data on source |
| 6 |
CREATE TABLE t1(a INT PRIMARY KEY); |
| 7 |
DROP TABLE t1; |
| 8 |
|
| 9 |
--let $source_pos=query_get_value('SHOW BINARY LOGS','File_size',1) |
| 10 |
--let $source_file=query_get_value('SHOW BINARY LOGS','Log_name',1) |
| 11 |
|
| 12 |
--source include/rpl_connection_slave.inc |
| 13 |
|
| 14 |
# Execute START REPLICA with MASTER_LOG_FILE and MASTER_LOG_POS param |
| 15 |
--replace_result $source_file source_file $source_pos source_pos |
| 16 |
--eval START REPLICA UNTIL MASTER_LOG_FILE='$source_file',MASTER_LOG_POS=$source_pos |
| 17 |
|
| 18 |
# Check Until_Condition value is 'Source' in the output of |
| 19 |
# SHOW REPLICA STATUS |
| 20 |
--let $replica_until_cond=query_get_value('SHOW REPLICA STATUS','Until_Condition',1) |
| 21 |
--let $assert_cond= "$replica_until_cond" = "Source" |
| 22 |
--let $assert_text= Until condition is 'source' on replica |
| 23 |
--source include/assert.inc |
| 24 |
|
| 25 |
--source include/wait_for_slave_sql_to_stop.inc |
| 26 |
# Start replication to continue |
| 27 |
--source include/start_slave.inc |
| 28 |
|
| 29 |
# |
| 30 |
# SHOW REPLICAS |
| 31 |
# |
| 32 |
|
| 33 |
--source include/rpl_connection_master.inc |
| 34 |
|
| 35 |
# first assert that the fields are in the result set with the expected |
| 36 |
# name (old and new names). Do not record in the result file, since |
| 37 |
# the output is not deterministic |
| 38 |
|
| 39 |
--let $dontcare = query_get_value(SHOW SLAVE HOSTS, Slave_UUID, 1) |
| 40 |
--let $dontcare = query_get_value(SHOW SLAVE HOSTS, Master_id, 1) |
| 41 |
|
| 42 |
# new syntax and assert that the new names of the fields are |
| 43 |
# the ones used |
| 44 |
|
| 45 |
--let $dontcare = query_get_value(SHOW REPLICAS, Replica_UUID, 1) |
| 46 |
--let $dontcare = query_get_value(SHOW REPLICAS, Source_Id, 1) |
| 47 |
|
| 48 |
--disable_result_log |
| 49 |
# emits a deprecation warning |
| 50 |
SHOW SLAVE HOSTS; |
| 51 |
--enable_result_log |
| 52 |
SHOW WARNINGS; |
| 53 |
--disable_result_log |
| 54 |
# does not emit a warning |
| 55 |
SHOW REPLICAS; |
| 56 |
--enable_result_log |
| 57 |
SHOW WARNINGS; |
| 58 |
|
| 59 |
# |
| 60 |
# SHOW REPLICA STATUS |
| 61 |
# |
| 62 |
|
| 63 |
--source include/rpl_connection_slave.inc |
| 64 |
|
| 65 |
# first assert that the fields are in the result set with the expected |
| 66 |
# name (old and new names). Do not record in the result file, since |
| 67 |
# the output is not deterministic |
| 68 |
|
| 69 |
--let $dontcare = query_get_value(SHOW SLAVE STATUS, Slave_IO_State, 1) |
| 70 |
--let $dontcare = query_get_value(SHOW SLAVE STATUS, Master_Host, 1) |
| 71 |
--let $dontcare = query_get_value(SHOW SLAVE STATUS, Master_User, 1) |
| 72 |
--let $dontcare = query_get_value(SHOW SLAVE STATUS, Master_Port, 1) |
| 73 |
--let $dontcare = query_get_value(SHOW SLAVE STATUS, Master_Log_File, 1) |
| 74 |
--let $dontcare = query_get_value(SHOW SLAVE STATUS, Read_Master_Log_Pos, 1) |
| 75 |
--let $dontcare = query_get_value(SHOW SLAVE STATUS, Relay_Master_Log_File, 1) |
| 76 |
--let $dontcare = query_get_value(SHOW SLAVE STATUS, Slave_IO_Running, 1) |
| 77 |
--let $dontcare = query_get_value(SHOW SLAVE STATUS, Slave_SQL_Running, 1) |
| 78 |
--let $dontcare = query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1) |
| 79 |
--let $dontcare = query_get_value(SHOW SLAVE STATUS, Master_SSL_Allowed, 1) |
| 80 |
--let $dontcare = query_get_value(SHOW SLAVE STATUS, Master_SSL_CA_File, 1) |
| 81 |
--let $dontcare = query_get_value(SHOW SLAVE STATUS, Master_SSL_CA_Path, 1) |
| 82 |
--let $dontcare = query_get_value(SHOW SLAVE STATUS, Master_SSL_Cert, 1) |
| 83 |
--let $dontcare = query_get_value(SHOW SLAVE STATUS, Master_SSL_Cipher, 1) |
| 84 |
--let $dontcare = query_get_value(SHOW SLAVE STATUS, Master_SSL_Key, 1) |
| 85 |
--let $dontcare = query_get_value(SHOW SLAVE STATUS, Seconds_Behind_Master, 1) |
| 86 |
--let $dontcare = query_get_value(SHOW SLAVE STATUS, Master_SSL_Verify_Server_Cert, 1) |
| 87 |
--let $dontcare = query_get_value(SHOW SLAVE STATUS, Master_Server_Id, 1) |
| 88 |
--let $dontcare = query_get_value(SHOW SLAVE STATUS, Master_UUID, 1) |
| 89 |
--let $dontcare = query_get_value(SHOW SLAVE STATUS, Master_Info_File, 1) |
| 90 |
--let $dontcare = query_get_value(SHOW SLAVE STATUS, Slave_SQL_Running_State, 1) |
| 91 |
--let $dontcare = query_get_value(SHOW SLAVE STATUS, Master_Retry_Count, 1) |
| 92 |
--let $dontcare = query_get_value(SHOW SLAVE STATUS, Master_Bind, 1) |
| 93 |
--let $dontcare = query_get_value(SHOW SLAVE STATUS, Master_SSL_Crl, 1) |
| 94 |
--let $dontcare = query_get_value(SHOW SLAVE STATUS, Master_SSL_Crlpath, 1) |
| 95 |
--let $dontcare = query_get_value(SHOW SLAVE STATUS, Master_TLS_Version, 1) |
| 96 |
--let $dontcare = query_get_value(SHOW SLAVE STATUS, Master_public_key_path, 1) |
| 97 |
--let $dontcare = query_get_value(SHOW SLAVE STATUS, Get_master_public_key, 1) |
| 98 |
|
| 99 |
# new syntax and assert that the new names of the fields are |
| 100 |
# the ones used |
| 101 |
|
| 102 |
--let $dontcare = query_get_value(SHOW REPLICA STATUS, Replica_IO_State, 1) |
| 103 |
--let $dontcare = query_get_value(SHOW REPLICA STATUS, Source_Host, 1) |
| 104 |
--let $dontcare = query_get_value(SHOW REPLICA STATUS, Source_User, 1) |
| 105 |
--let $dontcare = query_get_value(SHOW REPLICA STATUS, Source_Port, 1) |
| 106 |
--let $dontcare = query_get_value(SHOW REPLICA STATUS, Source_Log_File, 1) |
| 107 |
--let $dontcare = query_get_value(SHOW REPLICA STATUS, Read_Source_Log_Pos, 1) |
| 108 |
--let $dontcare = query_get_value(SHOW REPLICA STATUS, Relay_Source_Log_File, 1) |
| 109 |
--let $dontcare = query_get_value(SHOW REPLICA STATUS, Replica_IO_Running, 1) |
| 110 |
--let $dontcare = query_get_value(SHOW REPLICA STATUS, Replica_SQL_Running, 1) |
| 111 |
--let $dontcare = query_get_value(SHOW REPLICA STATUS, Exec_Source_Log_Pos, 1) |
| 112 |
--let $dontcare = query_get_value(SHOW REPLICA STATUS, Source_SSL_Allowed, 1) |
| 113 |
--let $dontcare = query_get_value(SHOW REPLICA STATUS, Source_SSL_CA_File, 1) |
| 114 |
--let $dontcare = query_get_value(SHOW REPLICA STATUS, Source_SSL_CA_Path, 1) |
| 115 |
--let $dontcare = query_get_value(SHOW REPLICA STATUS, Source_SSL_Cert, 1) |
| 116 |
--let $dontcare = query_get_value(SHOW REPLICA STATUS, Source_SSL_Cipher, 1) |
| 117 |
--let $dontcare = query_get_value(SHOW REPLICA STATUS, Source_SSL_Key, 1) |
| 118 |
--let $dontcare = query_get_value(SHOW REPLICA STATUS, Seconds_Behind_Source, 1) |
| 119 |
--let $dontcare = query_get_value(SHOW REPLICA STATUS, Source_SSL_Verify_Server_Cert, 1) |
| 120 |
--let $dontcare = query_get_value(SHOW REPLICA STATUS, Source_Server_Id, 1) |
| 121 |
--let $dontcare = query_get_value(SHOW REPLICA STATUS, Source_UUID, 1) |
| 122 |
--let $dontcare = query_get_value(SHOW REPLICA STATUS, Source_Info_File, 1) |
| 123 |
--let $dontcare = query_get_value(SHOW REPLICA STATUS, Replica_SQL_Running_State, 1) |
| 124 |
--let $dontcare = query_get_value(SHOW REPLICA STATUS, Source_Retry_Count, 1) |
| 125 |
--let $dontcare = query_get_value(SHOW REPLICA STATUS, Source_Bind, 1) |
| 126 |
--let $dontcare = query_get_value(SHOW REPLICA STATUS, Source_SSL_Crl, 1) |
| 127 |
--let $dontcare = query_get_value(SHOW REPLICA STATUS, Source_SSL_Crlpath, 1) |
| 128 |
--let $dontcare = query_get_value(SHOW REPLICA STATUS, Source_TLS_Version, 1) |
| 129 |
--let $dontcare = query_get_value(SHOW REPLICA STATUS, Source_public_key_path, 1) |
| 130 |
--let $dontcare = query_get_value(SHOW REPLICA STATUS, Get_Source_public_key, 1) |
| 131 |
|
| 132 |
# Now check for the deprecation warning and record it in the result file. |
| 133 |
# We output a single deterministic field to make the test case resilient. |
| 134 |
|
| 135 |
--disable_result_log |
| 136 |
# emits a deprecation warning |
| 137 |
SHOW SLAVE STATUS; |
| 138 |
--enable_result_log |
| 139 |
SHOW WARNINGS; |
| 140 |
--disable_result_log |
| 141 |
# does not emit a deprecation warning |
| 142 |
SHOW REPLICA STATUS; |
| 143 |
--enable_result_log |
| 144 |
SHOW WARNINGS; |
| 145 |
|
| 146 |
# |
| 147 |
# RESET REPLICA |
| 148 |
# |
| 149 |
|
| 150 |
--source include/stop_slave.inc |
| 151 |
|
| 152 |
# must emit a deprecation warning |
| 153 |
RESET SLAVE; |
| 154 |
|
| 155 |
# must not emit a deprecation warning |
| 156 |
RESET REPLICA; |
| 157 |
|
| 158 |
# must emit a deprecation warning |
| 159 |
START SLAVE; |
| 160 |
--source include/wait_for_slave_to_start.inc |
| 161 |
|
| 162 |
# must emit a deprecation warning |
| 163 |
STOP SLAVE; |
| 164 |
--source include/wait_for_slave_to_stop.inc |
| 165 |
|
| 166 |
# must not emit a deprecation warning |
| 167 |
START REPLICA; |
| 168 |
--source include/wait_for_slave_to_start.inc |
| 169 |
|
| 170 |
# must not emit a deprecation warning |
| 171 |
STOP REPLICA; |
| 172 |
--source include/wait_for_slave_to_stop.inc |
| 173 |
|
| 174 |
# must emit a deprecation warning |
| 175 |
RESET SLAVE ALL; |
| 176 |
|
| 177 |
# must not emit a deprecation warning |
| 178 |
RESET REPLICA ALL; |
| 179 |
|
| 180 |
--replace_result $MASTER_MYPORT MASTER_PORT |
| 181 |
--eval CHANGE REPLICATION SOURCE TO SOURCE_HOST='127.0.0.1',SOURCE_PORT=$MASTER_MYPORT,SOURCE_USER='root' for CHANNEL '' |
| 182 |
|
| 183 |
### START REPLICA UNTIL SOURCE_LOG_FILE and SOURCE_LOG_POS |
| 184 |
|
| 185 |
--source include/rpl_connection_master.inc |
| 186 |
CREATE TABLE t1 (c1 INT); |
| 187 |
INSERT INTO t1 VALUES (1); |
| 188 |
--let $log_file= query_get_value(SHOW MASTER STATUS, File, 1) |
| 189 |
--let $log_pos= query_get_value(SHOW MASTER STATUS, Position, 1) |
| 190 |
--source include/rpl_connection_slave.inc |
| 191 |
# Once deprecation warnings are introduced, this statement shall |
| 192 |
# continue to not produce any warnings |
| 193 |
--replace_result $log_file LOG_FILE $log_pos LOG_POS |
| 194 |
--eval START REPLICA UNTIL SOURCE_LOG_FILE='$log_file', SOURCE_LOG_POS=$log_pos |
| 195 |
--source include/wait_for_slave_sql_to_stop.inc |
| 196 |
--source include/stop_slave.inc |
| 197 |
--let $diff_tables=master:t1,slave:t1 |
| 198 |
--source include/diff_tables.inc |
| 199 |
DROP TABLE t1; |
| 200 |
RESET REPLICA; |
| 201 |
RESET MASTER; |
| 202 |
# Once deprecation warnings are introduced, this statement shall |
| 203 |
# produce warnings |
| 204 |
--replace_result $log_file LOG_FILE $log_pos LOG_POS |
| 205 |
--eval START REPLICA UNTIL MASTER_LOG_FILE='$log_file', MASTER_LOG_POS=$log_pos |
| 206 |
--source include/wait_for_slave_sql_to_stop.inc |
| 207 |
--source include/stop_slave.inc |
| 208 |
--let $diff_tables=master:t1,slave:t1 |
| 209 |
--source include/diff_tables.inc |
| 210 |
--source include/rpl_connection_master.inc |
| 211 |
DROP TABLE t1; |
| 212 |
RESET MASTER; |
| 213 |
--source include/rpl_connection_slave.inc |
| 214 |
DROP TABLE t1; |
| 215 |
RESET REPLICA; |
| 216 |
RESET MASTER; |
| 217 |
--source include/start_slave.inc |
| 218 |
--source include/rpl_connection_master.inc |
| 219 |
|
| 220 |
--source include/rpl_end.inc |