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
27ce25cd
Commit
27ce25cd
authored
May 10, 2007
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-opt
into whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb
parents
ba9657bc
198a7991
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
117 additions
and
17 deletions
+117
-17
mysql-test/ndb/ndb_config_1_node.ini
mysql-test/ndb/ndb_config_1_node.ini
+3
-1
mysql-test/ndb/ndb_config_2_node.ini
mysql-test/ndb/ndb_config_2_node.ini
+3
-1
mysql-test/ndb/ndb_config_4_node.ini
mysql-test/ndb/ndb_config_4_node.ini
+3
-1
mysql-test/r/ndb_basic.result
mysql-test/r/ndb_basic.result
+6
-0
mysql-test/t/ndb_basic.test
mysql-test/t/ndb_basic.test
+15
-0
ndb/include/ndbapi/NdbRecAttr.hpp
ndb/include/ndbapi/NdbRecAttr.hpp
+28
-0
ndb/src/kernel/blocks/dblqh/Dblqh.hpp
ndb/src/kernel/blocks/dblqh/Dblqh.hpp
+3
-0
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
+27
-1
ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
+5
-1
ndb/src/mgmsrv/MgmtSrvr.cpp
ndb/src/mgmsrv/MgmtSrvr.cpp
+10
-0
ndb/src/ndbapi/ClusterMgr.cpp
ndb/src/ndbapi/ClusterMgr.cpp
+4
-9
ndb/src/ndbapi/ClusterMgr.hpp
ndb/src/ndbapi/ClusterMgr.hpp
+2
-0
ndb/src/ndbapi/NdbRecAttr.cpp
ndb/src/ndbapi/NdbRecAttr.cpp
+3
-3
sql/ha_ndbcluster.h
sql/ha_ndbcluster.h
+1
-0
sql/set_var.cc
sql/set_var.cc
+4
-0
No files found.
mysql-test/ndb/ndb_config_1_node.ini
View file @
27ce25cd
...
...
@@ -13,9 +13,11 @@ TimeBetweenGlobalCheckpoints= 500
NoOfFragmentLogFiles
=
3
#
# Increase
deadlock-timeout
to cater for slow test-machines
# Increase
timeouts
to cater for slow test-machines
# (possibly running several tests in parallell)
#
HeartbeatIntervalDbDb
=
30000
HeartbeatIntervalDbApi
=
30000
#TransactionDeadlockDetectionTimeout= 7500
[ndbd]
...
...
mysql-test/ndb/ndb_config_2_node.ini
View file @
27ce25cd
...
...
@@ -13,9 +13,11 @@ TimeBetweenGlobalCheckpoints= 500
NoOfFragmentLogFiles
=
3
#
# Increase
deadlock-timeout
to cater for slow test-machines
# Increase
timeouts
to cater for slow test-machines
# (possibly running several tests in parallell)
#
HeartbeatIntervalDbDb
=
30000
HeartbeatIntervalDbApi
=
30000
#TransactionDeadlockDetectionTimeout= 7500
[ndbd]
...
...
mysql-test/ndb/ndb_config_4_node.ini
View file @
27ce25cd
...
...
@@ -13,9 +13,11 @@ TimeBetweenGlobalCheckpoints= 500
NoOfFragmentLogFiles
=
3
#
# Increase
deadlock-timeout
to cater for slow test-machines
# Increase
timeouts
to cater for slow test-machines
# (possibly running several tests in parallell)
#
HeartbeatIntervalDbDb
=
30000
HeartbeatIntervalDbApi
=
30000
#TransactionDeadlockDetectionTimeout= 7500
[ndbd]
...
...
mysql-test/r/ndb_basic.result
View file @
27ce25cd
...
...
@@ -667,6 +667,12 @@ counter datavalue
57 newval
58 newval
drop table t1;
create table t1 (a int primary key auto_increment) engine = ndb;
insert into t1() values (),(),(),(),(),(),(),(),(),(),(),();
insert into t1(a) values (20),(28);
insert into t1() values (),(),(),(),(),(),(),(),(),(),(),();
insert into t1() values (21), (22);
drop table t1;
CREATE TABLE t1 ( b INT ) PACK_KEYS = 0 ENGINE = ndb;
select * from t1;
b
...
...
mysql-test/t/ndb_basic.test
View file @
27ce25cd
...
...
@@ -606,6 +606,21 @@ select * from t1 order by counter;
drop
table
t1
;
#
# bug#27437
connection
con1
;
create
table
t1
(
a
int
primary
key
auto_increment
)
engine
=
ndb
;
insert
into
t1
()
values
(),(),(),(),(),(),(),(),(),(),(),();
connection
con2
;
insert
into
t1
(
a
)
values
(
20
),(
28
);
connection
con1
;
insert
into
t1
()
values
(),(),(),(),(),(),(),(),(),(),(),();
connection
con2
;
insert
into
t1
()
values
(
21
),
(
22
);
connection
con1
;
drop
table
t1
;
#
# BUG#14514 Creating table with packed key fails silently
#
...
...
ndb/include/ndbapi/NdbRecAttr.hpp
View file @
27ce25cd
...
...
@@ -166,6 +166,13 @@ public:
*/
char
char_value
()
const
;
/**
* Get value stored in NdbRecAttr object.
*
* @return Int8 value.
*/
Int8
int8_value
()
const
;
/**
* Get value stored in NdbRecAttr object.
*
...
...
@@ -201,6 +208,13 @@ public:
*/
Uint8
u_char_value
()
const
;
/**
* Get value stored in NdbRecAttr object.
*
* @return Uint8 value.
*/
Uint8
u_8_value
()
const
;
/**
* Get value stored in NdbRecAttr object.
*
...
...
@@ -346,6 +360,13 @@ NdbRecAttr::char_value() const
return
*
(
char
*
)
theRef
;
}
inline
Int8
NdbRecAttr
::
int8_value
()
const
{
return
*
(
Int8
*
)
theRef
;
}
inline
Uint32
NdbRecAttr
::
u_32_value
()
const
...
...
@@ -367,6 +388,13 @@ NdbRecAttr::u_char_value() const
return
*
(
Uint8
*
)
theRef
;
}
inline
Uint8
NdbRecAttr
::
u_8_value
()
const
{
return
*
(
Uint8
*
)
theRef
;
}
inline
void
NdbRecAttr
::
release
()
...
...
ndb/src/kernel/blocks/dblqh/Dblqh.hpp
View file @
27ce25cd
...
...
@@ -2059,6 +2059,9 @@ public:
Uint8
simpleRead
;
Uint8
seqNoReplica
;
Uint8
tcNodeFailrec
;
#ifdef VM_TRACE
Uint8
tupkeyref
;
#endif
};
/* p2c: size = 280 bytes */
typedef
Ptr
<
TcConnectionrec
>
TcConnectionrecPtr
;
...
...
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
View file @
27ce25cd
...
...
@@ -2765,6 +2765,12 @@ void Dblqh::execTUPKEYREF(Signal* signal)
tcConnectptr
.
i
=
tupKeyRef
->
userRef
;
terrorCode
=
tupKeyRef
->
errorCode
;
ptrCheckGuard
(
tcConnectptr
,
ctcConnectrecFileSize
,
tcConnectionrec
);
#ifdef VM_TRACE
ndbrequire
(
tcConnectptr
.
p
->
tupkeyref
==
0
);
tcConnectptr
.
p
->
tupkeyref
=
1
;
#endif
switch
(
tcConnectptr
.
p
->
transactionState
)
{
case
TcConnectionrec
:
:
WAIT_TUP
:
jam
();
...
...
@@ -3330,6 +3336,10 @@ void Dblqh::seizeTcrec()
locTcConnectptr
.
p
->
tcTimer
=
cLqhTimeOutCount
;
locTcConnectptr
.
p
->
tableref
=
RNIL
;
locTcConnectptr
.
p
->
savePointId
=
0
;
#ifdef VM_TRACE
locTcConnectptr
.
p
->
tupkeyref
=
1
;
#endif
cfirstfreeTcConrec
=
nextTc
;
tcConnectptr
=
locTcConnectptr
;
locTcConnectptr
.
p
->
connectState
=
TcConnectionrec
::
CONNECTED
;
...
...
@@ -4049,6 +4059,9 @@ void Dblqh::execACCKEYCONF(Signal* signal)
tupKeyReq
->
tcOpIndex
=
tcConnectptr
.
p
->
tcOprec
;
tupKeyReq
->
savePointId
=
tcConnectptr
.
p
->
savePointId
;
#ifdef VM_TRACE
tcConnectptr
.
p
->
tupkeyref
=
0
;
#endif
EXECUTE_DIRECT
(
tup
,
GSN_TUPKEYREQ
,
signal
,
TupKeyReq
::
SignalLength
);
}
//Dblqh::execACCKEYCONF()
...
...
@@ -5860,6 +5873,10 @@ void Dblqh::completeUnusualLab(Signal* signal)
void
Dblqh
::
releaseTcrec
(
Signal
*
signal
,
TcConnectionrecPtr
locTcConnectptr
)
{
jam
();
#ifdef VM_TRACE
locTcConnectptr
.
p
->
tupkeyref
=
1
;
#endif
locTcConnectptr
.
p
->
tcTimer
=
0
;
locTcConnectptr
.
p
->
transactionState
=
TcConnectionrec
::
TC_NOT_CONNECTED
;
locTcConnectptr
.
p
->
nextTcConnectrec
=
cfirstfreeTcConrec
;
...
...
@@ -5882,6 +5899,9 @@ void Dblqh::releaseTcrec(Signal* signal, TcConnectionrecPtr locTcConnectptr)
void
Dblqh
::
releaseTcrecLog
(
Signal
*
signal
,
TcConnectionrecPtr
locTcConnectptr
)
{
jam
();
#ifdef VM_TRACE
locTcConnectptr
.
p
->
tupkeyref
=
1
;
#endif
locTcConnectptr
.
p
->
tcTimer
=
0
;
locTcConnectptr
.
p
->
transactionState
=
TcConnectionrec
::
TC_NOT_CONNECTED
;
locTcConnectptr
.
p
->
nextTcConnectrec
=
cfirstfreeTcConrec
;
...
...
@@ -8336,6 +8356,9 @@ void Dblqh::nextScanConfLoopLab(Signal* signal)
tupKeyReq
->
tcOpIndex
=
tcConnectptr
.
p
->
tcOprec
;
tupKeyReq
->
savePointId
=
tcConnectptr
.
p
->
savePointId
;
Uint32
blockNo
=
refToBlock
(
tcConnectptr
.
p
->
tcTupBlockref
);
#ifdef VM_TRACE
tcConnectptr
.
p
->
tupkeyref
=
0
;
#endif
EXECUTE_DIRECT
(
blockNo
,
GSN_TUPKEYREQ
,
signal
,
TupKeyReq
::
SignalLength
);
}
...
...
@@ -9455,6 +9478,9 @@ void Dblqh::copySendTupkeyReqLab(Signal* signal)
tupKeyReq
->
tcOpIndex
=
tcConnectptr
.
p
->
tcOprec
;
tupKeyReq
->
savePointId
=
tcConnectptr
.
p
->
savePointId
;
Uint32
blockNo
=
refToBlock
(
tcConnectptr
.
p
->
tcTupBlockref
);
#ifdef VM_TRACE
tcConnectptr
.
p
->
tupkeyref
=
0
;
#endif
EXECUTE_DIRECT
(
blockNo
,
GSN_TUPKEYREQ
,
signal
,
TupKeyReq
::
SignalLength
);
}
...
...
ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
View file @
27ce25cd
...
...
@@ -1138,7 +1138,11 @@ Dbtup::updateStartLab(Signal* signal,
regOperPtr
->
attrinbufLen
);
}
else
{
jam
();
retValue
=
interpreterStartLab
(
signal
,
pagePtr
,
regOperPtr
->
pageOffset
);
if
(
interpreterStartLab
(
signal
,
pagePtr
,
regOperPtr
->
pageOffset
)
==
-
1
)
{
jam
();
return
-
1
;
}
}
//if
if
(
retValue
==
-
1
)
{
...
...
ndb/src/mgmsrv/MgmtSrvr.cpp
View file @
27ce25cd
...
...
@@ -627,6 +627,16 @@ MgmtSrvr::start(BaseString &error_string)
ndbout_c
(
"This is probably a bug."
);
}
/*
set api reg req frequency quite high:
100 ms interval to make sure we have fairly up-to-date
info from the nodes. This to make sure that this info
is not dependent on heart beat settings in the
configuration
*/
theFacade
->
theClusterMgr
->
set_max_api_reg_req_interval
(
100
);
TransporterRegistry
*
reg
=
theFacade
->
get_registry
();
for
(
unsigned
int
i
=
0
;
i
<
reg
->
m_transporter_interface
.
size
();
i
++
)
{
BaseString
msg
;
...
...
ndb/src/ndbapi/ClusterMgr.cpp
View file @
27ce25cd
...
...
@@ -68,6 +68,7 @@ ClusterMgr::ClusterMgr(TransporterFacade & _facade):
clusterMgrThreadMutex
=
NdbMutex_Create
();
waitForHBCond
=
NdbCondition_Create
();
waitingForHB
=
false
;
m_max_api_reg_req_interval
=
0xFFFFFFFF
;
// MAX_INT
noOfAliveNodes
=
0
;
noOfConnectedNodes
=
0
;
theClusterMgrThread
=
0
;
...
...
@@ -251,7 +252,7 @@ ClusterMgr::threadMain( ){
* Start of Secure area for use of Transporter
*/
theFacade
.
lock_mutex
();
for
(
int
i
=
1
;
i
<
MAX_NODES
;
i
++
){
for
(
int
i
=
1
;
i
<
MAX_N
DB_N
ODES
;
i
++
){
/**
* Send register request (heartbeat) to all available nodes
* at specified timing intervals
...
...
@@ -272,7 +273,8 @@ ClusterMgr::threadMain( ){
}
theNode
.
hbCounter
+=
timeSlept
;
if
(
theNode
.
hbCounter
>=
theNode
.
hbFrequency
)
{
if
(
theNode
.
hbCounter
>=
m_max_api_reg_req_interval
||
theNode
.
hbCounter
>=
theNode
.
hbFrequency
)
{
/**
* It is now time to send a new Heartbeat
*/
...
...
@@ -281,13 +283,6 @@ ClusterMgr::threadMain( ){
theNode
.
hbCounter
=
0
;
}
/**
* If the node is of type REP,
* then the receiver of the signal should be API_CLUSTERMGR
*/
if
(
theNode
.
m_info
.
m_type
==
NodeInfo
::
REP
)
{
signal
.
theReceiversBlockNumber
=
API_CLUSTERMGR
;
}
#ifdef DEBUG_REG
ndbout_c
(
"ClusterMgr: Sending API_REGREQ to node %d"
,
(
int
)
nodeId
);
#endif
...
...
ndb/src/ndbapi/ClusterMgr.hpp
View file @
27ce25cd
...
...
@@ -50,6 +50,7 @@ public:
void
startThread
();
void
forceHB
();
void
set_max_api_reg_req_interval
(
unsigned
int
millisec
)
{
m_max_api_reg_req_interval
=
millisec
;
}
private:
void
threadMain
();
...
...
@@ -83,6 +84,7 @@ public:
Uint32
m_connect_count
;
private:
Uint32
m_max_api_reg_req_interval
;
Uint32
noOfAliveNodes
;
Uint32
noOfConnectedNodes
;
Node
theNodes
[
MAX_NODES
];
...
...
ndb/src/ndbapi/NdbRecAttr.cpp
View file @
27ce25cd
...
...
@@ -272,7 +272,7 @@ ndbrecattr_print_formatted(NdbOut& out, const NdbRecAttr &r,
out
<<
r
.
u_short_value
();
break
;
case
NdbDictionary
:
:
Column
::
Tinyunsigned
:
out
<<
(
unsigned
)
r
.
u_
char
_value
();
out
<<
(
unsigned
)
r
.
u_
8
_value
();
break
;
case
NdbDictionary
:
:
Column
::
Bigint
:
out
<<
r
.
int64_value
();
...
...
@@ -287,7 +287,7 @@ ndbrecattr_print_formatted(NdbOut& out, const NdbRecAttr &r,
out
<<
r
.
short_value
();
break
;
case
NdbDictionary
:
:
Column
::
Tinyint
:
out
<<
(
int
)
r
.
char
_value
();
out
<<
(
int
)
r
.
int8
_value
();
break
;
case
NdbDictionary
:
:
Column
::
Binary
:
if
(
!
f
.
hex_format
)
...
...
@@ -413,7 +413,7 @@ ndbrecattr_print_formatted(NdbOut& out, const NdbRecAttr &r,
break
;
case
NdbDictionary
:
:
Column
::
Year
:
{
uint
year
=
1900
+
r
.
u_
char
_value
();
uint
year
=
1900
+
r
.
u_
8
_value
();
char
buf
[
40
];
sprintf
(
buf
,
"%04d"
,
year
);
out
<<
buf
;
...
...
sql/ha_ndbcluster.h
View file @
27ce25cd
...
...
@@ -40,6 +40,7 @@ class ha_ndbcluster_cond;
// connectstring to cluster if given by mysqld
extern
const
char
*
ndbcluster_connectstring
;
extern
ulong
ndb_cache_check_time
;
extern
char
opt_ndb_constrbuf
[];
typedef
enum
ndb_index_type
{
UNDEFINED_INDEX
=
0
,
...
...
sql/set_var.cc
View file @
27ce25cd
...
...
@@ -475,6 +475,8 @@ sys_var_thd_bool
sys_ndb_use_transactions
(
"ndb_use_transactions"
,
&
SV
::
ndb_use_transactions
);
sys_var_long_ptr
sys_ndb_cache_check_time
(
"ndb_cache_check_time"
,
&
ndb_cache_check_time
);
sys_var_const_str
sys_ndb_connectstring
(
"ndb_connectstring"
,
opt_ndb_constrbuf
);
#endif
/* Time/date/datetime formats */
...
...
@@ -792,6 +794,7 @@ sys_var *sys_variables[]=
#ifdef HAVE_NDBCLUSTER_DB
&
sys_ndb_autoincrement_prefetch_sz
,
&
sys_ndb_cache_check_time
,
&
sys_ndb_connectstring
,
&
sys_ndb_force_send
,
&
sys_ndb_use_exact_count
,
&
sys_ndb_use_transactions
,
...
...
@@ -996,6 +999,7 @@ struct show_var_st init_vars[]= {
{
sys_ndb_use_exact_count
.
name
,(
char
*
)
&
sys_ndb_use_exact_count
,
SHOW_SYS
},
{
sys_ndb_use_transactions
.
name
,(
char
*
)
&
sys_ndb_use_transactions
,
SHOW_SYS
},
{
sys_ndb_cache_check_time
.
name
,(
char
*
)
&
sys_ndb_cache_check_time
,
SHOW_SYS
},
{
sys_ndb_connectstring
.
name
,(
char
*
)
&
sys_ndb_connectstring
,
SHOW_SYS
},
#endif
{
sys_net_buffer_length
.
name
,(
char
*
)
&
sys_net_buffer_length
,
SHOW_SYS
},
{
sys_net_read_timeout
.
name
,
(
char
*
)
&
sys_net_read_timeout
,
SHOW_SYS
},
...
...
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