Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
cd590a6a
Commit
cd590a6a
authored
Jul 15, 2005
by
tomas@poseidon.ndb.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge poseidon.ndb.mysql.com:/home/tomas/mysql-4.1-release
into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1-new
parents
ec52d680
52d40b3f
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
82 additions
and
20 deletions
+82
-20
mysql-test/t/ctype_utf8.test
mysql-test/t/ctype_utf8.test
+2
-0
ndb/include/transporter/TransporterRegistry.hpp
ndb/include/transporter/TransporterRegistry.hpp
+2
-0
ndb/src/common/mgmcommon/ConfigRetriever.cpp
ndb/src/common/mgmcommon/ConfigRetriever.cpp
+4
-6
ndb/src/common/transporter/Transporter.cpp
ndb/src/common/transporter/Transporter.cpp
+15
-0
ndb/src/common/transporter/Transporter.hpp
ndb/src/common/transporter/Transporter.hpp
+1
-0
ndb/src/common/transporter/TransporterRegistry.cpp
ndb/src/common/transporter/TransporterRegistry.cpp
+6
-0
ndb/src/mgmsrv/MgmtSrvr.cpp
ndb/src/mgmsrv/MgmtSrvr.cpp
+18
-0
ndb/src/mgmsrv/MgmtSrvr.hpp
ndb/src/mgmsrv/MgmtSrvr.hpp
+1
-1
sql/sql_prepare.cc
sql/sql_prepare.cc
+8
-4
support-files/mysql.spec.sh
support-files/mysql.spec.sh
+11
-5
tests/mysql_client_test.c
tests/mysql_client_test.c
+14
-4
No files found.
mysql-test/t/ctype_utf8.test
View file @
cd590a6a
...
...
@@ -785,12 +785,14 @@ INSERT INTO t1 VALUES
(
1
,
'blah'
,
'464'
,
'aaa'
,
'fkc1c9ilc20x0hgae7lx6j09'
,
'ERR'
,
'ERR Имри.Афимим.Аеимимримдмримрмрирор имримримримр имридм ирбднримрфмририримрфмфмим.Ад.Д имдимримрад.Адимримримрмдиримримримр м.Дадимфшьмримд им.Адимимрн имадми'
,
'ИМРИ.АФИМИМ.АЕИМИМРИМДМРИМРМРИРОР'
,
3
,
'2005-06-01 17:30:43'
,
'1234567890'
),
(
2
,
'blah'
,
'464'
,
'aaa'
,
'haxpl2ilc20x00bj4tt2m5ti'
,
'11'
,
'11 g'
,
'G'
,
3
,
'2005-06-02 22:43:10'
,
'1234567890'
);
--
disable_warnings
CREATE
TABLE
t2
(
`msisdn`
varchar
(
15
)
NOT
NULL
default
''
,
`operator_id`
int
(
11
)
NOT
NULL
default
'0'
,
`created`
datetime
NOT
NULL
default
'0000-00-00 00:00:00'
,
UNIQUE
KEY
`PK_user`
(
`msisdn`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
;
--
enable_warnings
INSERT
INTO
t2
VALUES
(
'1234567890'
,
2
,
'2005-05-24 13:53:25'
);
...
...
ndb/include/transporter/TransporterRegistry.hpp
View file @
cd590a6a
...
...
@@ -238,6 +238,8 @@ public:
};
Vector
<
Transporter_interface
>
m_transporter_interface
;
void
add_transporter_interface
(
const
char
*
interf
,
unsigned
short
port
);
struct
in_addr
get_connect_address
(
NodeId
node_id
)
const
;
protected:
private:
...
...
ndb/src/common/mgmcommon/ConfigRetriever.cpp
View file @
cd590a6a
...
...
@@ -136,16 +136,14 @@ ConfigRetriever::getConfig() {
}
ndb_mgm_configuration
*
ConfigRetriever
::
getConfig
(
NdbMgmHandle
m_handle
)
{
ConfigRetriever
::
getConfig
(
NdbMgmHandle
m_handle
)
{
ndb_mgm_configuration
*
conf
=
ndb_mgm_get_configuration
(
m_handle
,
m_version
);
if
(
conf
==
0
){
if
(
conf
==
0
)
{
setError
(
CR_ERROR
,
ndb_mgm_get_latest_error_desc
(
m_handle
));
return
0
;
}
ndb_mgm_disconnect
(
m_handle
);
return
conf
;
}
...
...
ndb/src/common/transporter/Transporter.cpp
View file @
cd590a6a
...
...
@@ -74,6 +74,7 @@ Transporter::Transporter(TransporterRegistry &t_reg,
m_connected
=
false
;
m_timeOutMillis
=
1000
;
m_connect_address
.
s_addr
=
0
;
if
(
isServer
)
m_socket_client
=
0
;
else
...
...
@@ -98,6 +99,13 @@ Transporter::connect_server(NDB_SOCKET_TYPE sockfd) {
DBUG_RETURN
(
true
);
// TODO assert(0);
}
{
struct
sockaddr
addr
;
SOCKET_SIZE_TYPE
addrlen
=
sizeof
(
addr
);
int
r
=
getpeername
(
sockfd
,
&
addr
,
&
addrlen
);
m_connect_address
=
((
struct
sockaddr_in
*
)
&
addr
)
->
sin_addr
;
}
bool
res
=
connect_server_impl
(
sockfd
);
if
(
res
){
m_connected
=
true
;
...
...
@@ -164,6 +172,13 @@ Transporter::connect_client() {
g_eventLogger
.
warning
(
"Unable to verify transporter compatability with node %d"
,
nodeId
);
}
{
struct
sockaddr
addr
;
SOCKET_SIZE_TYPE
addrlen
=
sizeof
(
addr
);
int
r
=
getpeername
(
sockfd
,
&
addr
,
&
addrlen
);
m_connect_address
=
((
struct
sockaddr_in
*
)
&
addr
)
->
sin_addr
;
}
bool
res
=
connect_client_impl
(
sockfd
);
if
(
res
){
m_connected
=
true
;
...
...
ndb/src/common/transporter/Transporter.hpp
View file @
cd590a6a
...
...
@@ -122,6 +122,7 @@ protected:
private:
SocketClient
*
m_socket_client
;
struct
in_addr
m_connect_address
;
protected:
Uint32
getErrorCount
();
...
...
ndb/src/common/transporter/TransporterRegistry.cpp
View file @
cd590a6a
...
...
@@ -51,6 +51,12 @@ extern int g_ndb_shm_signum;
#include <EventLogger.hpp>
extern
EventLogger
g_eventLogger
;
struct
in_addr
TransporterRegistry
::
get_connect_address
(
NodeId
node_id
)
const
{
return
theTransporters
[
node_id
]
->
m_connect_address
;
}
SocketServer
::
Session
*
TransporterService
::
newSession
(
NDB_SOCKET_TYPE
sockfd
)
{
DBUG_ENTER
(
"SocketServer::Session * TransporterService::newSession"
);
...
...
ndb/src/mgmsrv/MgmtSrvr.cpp
View file @
cd590a6a
...
...
@@ -2126,6 +2126,24 @@ MgmtSrvr::getNodeType(NodeId nodeId) const
return
nodeTypes
[
nodeId
];
}
const
char
*
MgmtSrvr
::
get_connect_address
(
Uint32
node_id
)
{
if
(
m_connect_address
[
node_id
].
s_addr
==
0
&&
theFacade
&&
theFacade
->
theTransporterRegistry
&&
theFacade
->
theClusterMgr
&&
getNodeType
(
node_id
)
==
NDB_MGM_NODE_TYPE_NDB
)
{
const
ClusterMgr
::
Node
&
node
=
theFacade
->
theClusterMgr
->
getNodeInfo
(
node_id
);
if
(
node
.
connected
)
{
m_connect_address
[
node_id
]
=
theFacade
->
theTransporterRegistry
->
get_connect_address
(
node_id
);
}
}
return
inet_ntoa
(
m_connect_address
[
node_id
]);
}
void
MgmtSrvr
::
get_connected_nodes
(
NodeBitmask
&
connected_nodes
)
const
{
...
...
ndb/src/mgmsrv/MgmtSrvr.hpp
View file @
cd590a6a
...
...
@@ -509,7 +509,7 @@ public:
int
setDbParameter
(
int
node
,
int
parameter
,
const
char
*
value
,
BaseString
&
);
const
char
*
get_connect_address
(
Uint32
node_id
)
{
return
inet_ntoa
(
m_connect_address
[
node_id
]);
}
const
char
*
get_connect_address
(
Uint32
node_id
)
;
void
get_connected_nodes
(
NodeBitmask
&
connected_nodes
)
const
;
SocketServer
*
get_socket_server
()
{
return
m_socket_server
;
}
...
...
sql/sql_prepare.cc
View file @
cd590a6a
...
...
@@ -306,24 +306,28 @@ static void set_param_int64(Item_param *param, uchar **pos, ulong len)
static
void
set_param_float
(
Item_param
*
param
,
uchar
**
pos
,
ulong
len
)
{
float
data
;
#ifndef EMBEDDED_LIBRARY
if
(
len
<
4
)
return
;
#endif
float
data
;
float4get
(
data
,
*
pos
);
#else
data
=
*
(
float
*
)
*
pos
;
#endif
param
->
set_double
((
double
)
data
);
*
pos
+=
4
;
}
static
void
set_param_double
(
Item_param
*
param
,
uchar
**
pos
,
ulong
len
)
{
double
data
;
#ifndef EMBEDDED_LIBRARY
if
(
len
<
8
)
return
;
#endif
double
data
;
float8get
(
data
,
*
pos
);
#else
data
=
*
(
double
*
)
*
pos
;
#endif
param
->
set_double
((
double
)
data
);
*
pos
+=
8
;
}
...
...
support-files/mysql.spec.sh
View file @
cd590a6a
...
...
@@ -437,19 +437,20 @@ then
/sbin/chkconfig
--add
mysql
fi
# Create a MySQL user. Do not report any problems if it already
# exists. This is redhat specific and should be handled more portable
useradd
-M
-r
-d
$mysql_datadir
-s
/bin/bash
-c
"MySQL server"
%
{
mysqld_user
}
2> /dev/null
||
true
# Create a MySQL user and group. Do not report any problems if it already
# exists.
groupadd
-r
-c
"MySQL server"
%
{
mysqld_user
}
2> /dev/null
||
true
useradd
-M
-r
-d
$mysql_datadir
-s
/bin/bash
-c
"MySQL server"
-g
%
{
mysqld_user
}
%
{
mysqld_user
}
2> /dev/null
||
true
# Change permissions so that the user that will run the MySQL daemon
# owns all database files.
chown
-R
%
{
mysqld_user
}
$mysql_datadir
chown
-R
%
{
mysqld_user
}
:%
{
mysqld_user
}
$mysql_datadir
# Initiate databases
%
{
_bindir
}
/mysql_install_db
--rpm
--user
=
%
{
mysqld_user
}
# Change permissions again to fix any new files.
chown
-R
%
{
mysqld_user
}
$mysql_datadir
chown
-R
%
{
mysqld_user
}
:%
{
mysqld_user
}
$mysql_datadir
# Fix permissions for the permission database so that only the user
# can read them.
...
...
@@ -667,6 +668,11 @@ fi
# itself - note that they must be ordered by date (important when
# merging BK trees)
%changelog
*
Fri Jul 15 2005 Lenz Grimmer <lenz@mysql.com>
- create a
"mysql"
user group and assign the mysql user account to that group
in
the server postinstall section.
(
BUG 10984
)
*
Tue Jun 14 2005 Lenz Grimmer <lenz@mysql.com>
- Do not build statically on i386 by default, only when adding either
"--with
...
...
tests/mysql_client_test.c
View file @
cd590a6a
...
...
@@ -166,6 +166,14 @@ DIE_UNLESS(stmt == 0);\
#define mytest_r(x) if (x) {myerror(NULL);DIE_UNLESS(FALSE);}
/* A workaround for Sun Forte 5.6 on Solaris x86 */
static
int
cmp_double
(
double
*
a
,
double
*
b
)
{
return
*
a
==
*
b
;
}
/* Print the error message */
static
void
print_error
(
const
char
*
msg
)
...
...
@@ -1396,7 +1404,7 @@ static void test_prepare()
DIE_UNLESS
(
real_data
==
o_real_data
);
DIE_UNLESS
(
length
[
5
]
==
4
);
DIE_UNLESS
(
double_data
==
o_double_data
);
DIE_UNLESS
(
cmp_double
(
&
double_data
,
&
o_double_data
)
);
DIE_UNLESS
(
length
[
6
]
==
8
);
DIE_UNLESS
(
strcmp
(
data
,
str_data
)
==
0
);
...
...
@@ -9583,7 +9591,7 @@ static void test_bug3035()
uint32
uint32_val
;
longlong
int64_val
;
ulonglong
uint64_val
;
double
double_val
,
udouble_val
;
double
double_val
,
udouble_val
,
double_tmp
;
char
longlong_as_string
[
22
],
ulonglong_as_string
[
22
];
/* mins and maxes */
...
...
@@ -9727,7 +9735,8 @@ static void test_bug3035()
DIE_UNLESS
(
int64_val
==
int64_min
);
DIE_UNLESS
(
uint64_val
==
uint64_min
);
DIE_UNLESS
(
double_val
==
(
longlong
)
uint64_min
);
DIE_UNLESS
(
udouble_val
==
ulonglong2double
(
uint64_val
));
double_tmp
=
ulonglong2double
(
uint64_val
);
DIE_UNLESS
(
cmp_double
(
&
udouble_val
,
&
double_tmp
));
DIE_UNLESS
(
!
strcmp
(
longlong_as_string
,
"0"
));
DIE_UNLESS
(
!
strcmp
(
ulonglong_as_string
,
"0"
));
...
...
@@ -9743,7 +9752,8 @@ static void test_bug3035()
DIE_UNLESS
(
int64_val
==
int64_max
);
DIE_UNLESS
(
uint64_val
==
uint64_max
);
DIE_UNLESS
(
double_val
==
(
longlong
)
uint64_val
);
DIE_UNLESS
(
udouble_val
==
ulonglong2double
(
uint64_val
));
double_tmp
=
ulonglong2double
(
uint64_val
);
DIE_UNLESS
(
cmp_double
(
&
udouble_val
,
&
double_tmp
));
DIE_UNLESS
(
!
strcmp
(
longlong_as_string
,
"-1"
));
DIE_UNLESS
(
!
strcmp
(
ulonglong_as_string
,
"18446744073709551615"
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment