mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
perfschema compilation, test and misc fixes
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
Table replication_connection_configuration (implementation).
|
||||
*/
|
||||
|
||||
#define HAVE_REPLICATION
|
||||
//#define HAVE_REPLICATION
|
||||
|
||||
#include "my_global.h"
|
||||
#include "table_replication_connection_configuration.h"
|
||||
@@ -39,6 +39,7 @@
|
||||
#include "sql_parse.h"
|
||||
//#include "rpl_msr.h" /* Multisource replciation */
|
||||
|
||||
#ifdef HAVE_REPLICATION
|
||||
THR_LOCK table_replication_connection_configuration::m_table_lock;
|
||||
|
||||
PFS_engine_table_share
|
||||
@@ -123,7 +124,7 @@ int table_replication_connection_configuration::rnd_next(void)
|
||||
{
|
||||
make_row(mi);
|
||||
m_next_pos.set_after(&m_pos);
|
||||
channel_map.unlock();
|
||||
mysql_mutex_unlock(&LOCK_active_mi);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -163,21 +164,21 @@ void table_replication_connection_configuration::make_row(Master_info *mi)
|
||||
mysql_mutex_lock(&mi->data_lock);
|
||||
mysql_mutex_lock(&mi->rli.data_lock);
|
||||
|
||||
m_row.channel_name_length= mi->connection_name.length;
|
||||
m_row.channel_name_length= static_cast<uint>(mi->connection_name.length);
|
||||
memcpy(m_row.channel_name, mi->connection_name.str, m_row.channel_name_length);
|
||||
|
||||
m_row.host_length= strlen(mi->host);
|
||||
m_row.host_length= static_cast<uint>(strlen(mi->host));
|
||||
memcpy(m_row.host, mi->host, m_row.host_length);
|
||||
|
||||
m_row.port= (unsigned int) mi->port;
|
||||
|
||||
/* can't the user be NULL? */
|
||||
temp_store= (char*)mi->user;
|
||||
m_row.user_length= strlen(temp_store);
|
||||
m_row.user_length= static_cast<uint>(strlen(temp_store));
|
||||
memcpy(m_row.user, temp_store, m_row.user_length);
|
||||
|
||||
temp_store= const_cast<char*>(""); //(char*)mi->bind_addr;
|
||||
m_row.network_interface_length= strlen(temp_store);
|
||||
m_row.network_interface_length= static_cast<uint>(strlen(temp_store));
|
||||
memcpy(m_row.network_interface, temp_store, m_row.network_interface_length);
|
||||
|
||||
if (mi->using_gtid)
|
||||
@@ -192,23 +193,23 @@ void table_replication_connection_configuration::make_row(Master_info *mi)
|
||||
#endif
|
||||
|
||||
temp_store= (char*)mi->ssl_ca;
|
||||
m_row.ssl_ca_file_length= strlen(temp_store);
|
||||
m_row.ssl_ca_file_length= static_cast<uint>(strlen(temp_store));
|
||||
memcpy(m_row.ssl_ca_file, temp_store, m_row.ssl_ca_file_length);
|
||||
|
||||
temp_store= (char*)mi->ssl_capath;
|
||||
m_row.ssl_ca_path_length= strlen(temp_store);
|
||||
m_row.ssl_ca_path_length= static_cast<uint>(strlen(temp_store));
|
||||
memcpy(m_row.ssl_ca_path, temp_store, m_row.ssl_ca_path_length);
|
||||
|
||||
temp_store= (char*)mi->ssl_cert;
|
||||
m_row.ssl_certificate_length= strlen(temp_store);
|
||||
m_row.ssl_certificate_length= static_cast<uint>(strlen(temp_store));
|
||||
memcpy(m_row.ssl_certificate, temp_store, m_row.ssl_certificate_length);
|
||||
|
||||
temp_store= (char*)mi->ssl_cipher;
|
||||
m_row.ssl_cipher_length= strlen(temp_store);
|
||||
m_row.ssl_cipher_length= static_cast<uint>(strlen(temp_store));
|
||||
memcpy(m_row.ssl_cipher, temp_store, m_row.ssl_cipher_length);
|
||||
|
||||
temp_store= (char*)mi->ssl_key;
|
||||
m_row.ssl_key_length= strlen(temp_store);
|
||||
m_row.ssl_key_length= static_cast<uint>(strlen(temp_store));
|
||||
memcpy(m_row.ssl_key, temp_store, m_row.ssl_key_length);
|
||||
|
||||
if (mi->ssl_verify_server_cert)
|
||||
@@ -217,11 +218,11 @@ void table_replication_connection_configuration::make_row(Master_info *mi)
|
||||
m_row.ssl_verify_server_certificate= PS_RPL_NO;
|
||||
|
||||
temp_store= (char*)mi->ssl_crl;
|
||||
m_row.ssl_crl_file_length= strlen(temp_store);
|
||||
m_row.ssl_crl_file_length= static_cast<uint>(strlen(temp_store));
|
||||
memcpy(m_row.ssl_crl_file, temp_store, m_row.ssl_crl_file_length);
|
||||
|
||||
temp_store= (char*)mi->ssl_crlpath;
|
||||
m_row.ssl_crl_path_length= strlen(temp_store);
|
||||
m_row.ssl_crl_path_length= static_cast<uint>(strlen(temp_store));
|
||||
memcpy(m_row.ssl_crl_path, temp_store, m_row.ssl_crl_path_length);
|
||||
|
||||
m_row.connection_retry_interval= (unsigned int) mi->connect_retry;
|
||||
@@ -231,7 +232,7 @@ void table_replication_connection_configuration::make_row(Master_info *mi)
|
||||
m_row.heartbeat_interval= (double)mi->heartbeat_period;
|
||||
|
||||
temp_store= (char*)""; //mi->tls_version;
|
||||
m_row.tls_version_length= strlen(temp_store);
|
||||
m_row.tls_version_length= static_cast<uint>(strlen(temp_store));
|
||||
memcpy(m_row.tls_version, temp_store, m_row.tls_version_length);
|
||||
|
||||
mysql_mutex_unlock(&mi->rli.data_lock);
|
||||
@@ -329,3 +330,4 @@ int table_replication_connection_configuration::read_row_values(TABLE *table,
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user