diff --git a/sql/slave.cc b/sql/slave.cc index 5534ddb1b49..9c6e8ebc200 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -2626,6 +2626,7 @@ bool show_master_info(THD *thd, Master_info *mi, bool full) void show_master_info_get_fields(THD *thd, List *field_list, bool full, size_t gtid_pos_length) { + Master_info *mi; MEM_ROOT *mem_root= thd->mem_root; DBUG_ENTER("show_master_info_get_fields"); @@ -2644,10 +2645,10 @@ void show_master_info_get_fields(THD *thd, List *field_list, Item_empty_string(thd, "Slave_IO_State", 30), mem_root); field_list->push_back(new (mem_root) - Item_empty_string(thd, "Master_Host", sizeof(Master_info::host)), + Item_empty_string(thd, "Master_Host", sizeof(mi->host)), mem_root); field_list->push_back(new (mem_root) - Item_empty_string(thd, "Master_User", sizeof(Master_info::user)), + Item_empty_string(thd, "Master_User", sizeof(mi->user)), mem_root); field_list->push_back(new (mem_root) Item_return_int(thd, "Master_Port", 7, MYSQL_TYPE_LONG), @@ -2732,23 +2733,23 @@ void show_master_info_get_fields(THD *thd, List *field_list, mem_root); field_list->push_back(new (mem_root) Item_empty_string(thd, "Master_SSL_CA_File", - sizeof(Master_info::ssl_ca)), + sizeof(mi->ssl_ca)), mem_root); field_list->push_back(new (mem_root) Item_empty_string(thd, "Master_SSL_CA_Path", - sizeof(Master_info::ssl_capath)), + sizeof(mi->ssl_capath)), mem_root); field_list->push_back(new (mem_root) Item_empty_string(thd, "Master_SSL_Cert", - sizeof(Master_info::ssl_cert)), + sizeof(mi->ssl_cert)), mem_root); field_list->push_back(new (mem_root) Item_empty_string(thd, "Master_SSL_Cipher", - sizeof(Master_info::ssl_cipher)), + sizeof(mi->ssl_cipher)), mem_root); field_list->push_back(new (mem_root) Item_empty_string(thd, "Master_SSL_Key", - sizeof(Master_info::ssl_key)), + sizeof(mi->ssl_key)), mem_root); field_list->push_back(new (mem_root) Item_return_int(thd, "Seconds_Behind_Master", 10, @@ -2782,11 +2783,11 @@ void show_master_info_get_fields(THD *thd, List *field_list, mem_root); field_list->push_back(new (mem_root) Item_empty_string(thd, "Master_SSL_Crl", - sizeof(Master_info::ssl_crl)), + sizeof(mi->ssl_crl)), mem_root); field_list->push_back(new (mem_root) Item_empty_string(thd, "Master_SSL_Crlpath", - sizeof(Master_info::ssl_crlpath)), + sizeof(mi->ssl_crlpath)), mem_root); field_list->push_back(new (mem_root) Item_empty_string(thd, "Using_Gtid",