Commit 82a37794 authored by unknown's avatar unknown

Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.0

into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0


support-files/mysql.spec.sh:
  Auto merged
ndb/src/mgmsrv/Services.cpp:
  merge
parents 47302570 db849fe7
...@@ -65,6 +65,7 @@ ...@@ -65,6 +65,7 @@
#define CFG_DB_BACKUP_DATA_BUFFER_MEM 134 #define CFG_DB_BACKUP_DATA_BUFFER_MEM 134
#define CFG_DB_BACKUP_LOG_BUFFER_MEM 135 #define CFG_DB_BACKUP_LOG_BUFFER_MEM 135
#define CFG_DB_BACKUP_WRITE_SIZE 136 #define CFG_DB_BACKUP_WRITE_SIZE 136
#define CFG_DB_BACKUP_MAX_WRITE_SIZE 139
#define CFG_LOG_DESTINATION 147 #define CFG_LOG_DESTINATION 147
......
...@@ -74,7 +74,7 @@ public: ...@@ -74,7 +74,7 @@ public:
/** /**
* Constructor / Destructor * Constructor / Destructor
*/ */
SocketServer(int maxSessions = 32); SocketServer(unsigned maxSessions = ~(unsigned)0);
~SocketServer(); ~SocketServer();
/** /**
......
...@@ -105,10 +105,10 @@ Transporter::connect_server(NDB_SOCKET_TYPE sockfd) { ...@@ -105,10 +105,10 @@ Transporter::connect_server(NDB_SOCKET_TYPE sockfd) {
} }
{ {
struct sockaddr addr; struct sockaddr_in addr;
SOCKET_SIZE_TYPE addrlen= sizeof(addr); SOCKET_SIZE_TYPE addrlen= sizeof(addr);
int r= getpeername(sockfd, &addr, &addrlen); int r= getpeername(sockfd, (struct sockaddr*)&addr, &addrlen);
m_connect_address= ((struct sockaddr_in *)&addr)->sin_addr; m_connect_address= (&addr)->sin_addr;
} }
bool res = connect_server_impl(sockfd); bool res = connect_server_impl(sockfd);
...@@ -198,10 +198,10 @@ Transporter::connect_client(NDB_SOCKET_TYPE sockfd) { ...@@ -198,10 +198,10 @@ Transporter::connect_client(NDB_SOCKET_TYPE sockfd) {
} }
{ {
struct sockaddr addr; struct sockaddr_in addr;
SOCKET_SIZE_TYPE addrlen= sizeof(addr); SOCKET_SIZE_TYPE addrlen= sizeof(addr);
int r= getpeername(sockfd, &addr, &addrlen); int r= getpeername(sockfd, (struct sockaddr*)&addr, &addrlen);
m_connect_address= ((struct sockaddr_in *)&addr)->sin_addr; m_connect_address= (&addr)->sin_addr;
} }
bool res = connect_client_impl(sockfd); bool res = connect_client_impl(sockfd);
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#define DEBUG(x) ndbout << x << endl; #define DEBUG(x) ndbout << x << endl;
SocketServer::SocketServer(int maxSessions) : SocketServer::SocketServer(unsigned maxSessions) :
m_sessions(10), m_sessions(10),
m_services(5) m_services(5)
{ {
...@@ -136,7 +136,7 @@ SocketServer::setup(SocketServer::Service * service, ...@@ -136,7 +136,7 @@ SocketServer::setup(SocketServer::Service * service,
} }
DBUG_PRINT("info",("bound to %u",ntohs(servaddr.sin_port))); DBUG_PRINT("info",("bound to %u",ntohs(servaddr.sin_port)));
if (listen(sock, m_maxSessions) == -1){ if (listen(sock, m_maxSessions > 32 ? 32 : m_maxSessions) == -1){
DBUG_PRINT("error",("listen() - %d - %s", DBUG_PRINT("error",("listen() - %d - %s",
errno, strerror(errno))); errno, strerror(errno)));
NDB_CLOSE_SOCKET(sock); NDB_CLOSE_SOCKET(sock);
......
...@@ -114,15 +114,16 @@ Backup::execREAD_CONFIG_REQ(Signal* signal) ...@@ -114,15 +114,16 @@ Backup::execREAD_CONFIG_REQ(Signal* signal)
Uint32 szDataBuf = (2 * 1024 * 1024); Uint32 szDataBuf = (2 * 1024 * 1024);
Uint32 szLogBuf = (2 * 1024 * 1024); Uint32 szLogBuf = (2 * 1024 * 1024);
Uint32 szWrite = 32768; Uint32 szWrite = 32768, maxWriteSize = (256 * 1024);
ndb_mgm_get_int_parameter(p, CFG_DB_BACKUP_DATA_BUFFER_MEM, &szDataBuf); ndb_mgm_get_int_parameter(p, CFG_DB_BACKUP_DATA_BUFFER_MEM, &szDataBuf);
ndb_mgm_get_int_parameter(p, CFG_DB_BACKUP_LOG_BUFFER_MEM, &szLogBuf); ndb_mgm_get_int_parameter(p, CFG_DB_BACKUP_LOG_BUFFER_MEM, &szLogBuf);
ndb_mgm_get_int_parameter(p, CFG_DB_BACKUP_WRITE_SIZE, &szWrite); ndb_mgm_get_int_parameter(p, CFG_DB_BACKUP_WRITE_SIZE, &szWrite);
ndb_mgm_get_int_parameter(p, CFG_DB_BACKUP_MAX_WRITE_SIZE, &maxWriteSize);
c_defaults.m_logBufferSize = szLogBuf; c_defaults.m_logBufferSize = szLogBuf;
c_defaults.m_dataBufferSize = szDataBuf; c_defaults.m_dataBufferSize = szDataBuf;
c_defaults.m_minWriteSize = szWrite; c_defaults.m_minWriteSize = szWrite;
c_defaults.m_maxWriteSize = szWrite; c_defaults.m_maxWriteSize = maxWriteSize;
{ // Init all tables { // Init all tables
ArrayList<Table> tables(c_tablePool); ArrayList<Table> tables(c_tablePool);
......
...@@ -1199,7 +1199,19 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1199,7 +1199,19 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::CI_INT, ConfigInfo::CI_INT,
"32K", "32K",
"0", "2K",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_DB_BACKUP_MAX_WRITE_SIZE,
"BackupMaxWriteSize",
DB_TOKEN,
"Max size of filesystem writes made by backup (in bytes)",
ConfigInfo::CI_USED,
false,
ConfigInfo::CI_INT,
"256K",
"2K",
STR_VALUE(MAX_INT_RNIL) }, STR_VALUE(MAX_INT_RNIL) },
/*************************************************************************** /***************************************************************************
......
...@@ -468,9 +468,9 @@ MgmApiSession::get_nodeid(Parser_t::Context &, ...@@ -468,9 +468,9 @@ MgmApiSession::get_nodeid(Parser_t::Context &,
return; return;
} }
struct sockaddr addr; struct sockaddr_in addr;
SOCKET_SIZE_TYPE addrlen= sizeof(addr); SOCKET_SIZE_TYPE addrlen= sizeof(addr);
int r = getpeername(m_socket, &addr, &addrlen); int r = getpeername(m_socket, (struct sockaddr*)&addr, &addrlen);
if (r != 0 ) { if (r != 0 ) {
m_output->println(cmd); m_output->println(cmd);
m_output->println("result: getpeername(%d) failed, err= %d", m_socket, r); m_output->println("result: getpeername(%d) failed, err= %d", m_socket, r);
...@@ -485,7 +485,7 @@ MgmApiSession::get_nodeid(Parser_t::Context &, ...@@ -485,7 +485,7 @@ MgmApiSession::get_nodeid(Parser_t::Context &,
NDB_TICKS tick= 0; NDB_TICKS tick= 0;
/* only report error on second attempt as not to clog the cluster log */ /* only report error on second attempt as not to clog the cluster log */
while (!m_mgmsrv.alloc_node_id(&tmp, (enum ndb_mgm_node_type)nodetype, while (!m_mgmsrv.alloc_node_id(&tmp, (enum ndb_mgm_node_type)nodetype,
&addr, &addrlen, error_code, error_string, (struct sockaddr*)&addr, &addrlen, error_code, error_string,
tick == 0 ? 0 : log_event)) tick == 0 ? 0 : log_event))
{ {
/* NDB_MGM_ALLOCID_CONFIG_MISMATCH is a non retriable error */ /* NDB_MGM_ALLOCID_CONFIG_MISMATCH is a non retriable error */
......
...@@ -655,6 +655,7 @@ fi ...@@ -655,6 +655,7 @@ fi
%attr(755, root, root) %{_bindir}/ndb_desc %attr(755, root, root) %{_bindir}/ndb_desc
%attr(755, root, root) %{_bindir}/ndb_show_tables %attr(755, root, root) %{_bindir}/ndb_show_tables
%attr(755, root, root) %{_bindir}/ndb_test_platform %attr(755, root, root) %{_bindir}/ndb_test_platform
%attr(755, root, root) %{_bindir}/ndb_config
%files ndb-extra %files ndb-extra
%defattr(-,root,root,0755) %defattr(-,root,root,0755)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment