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
9311c81a
Commit
9311c81a
authored
Sep 14, 2004
by
mskold@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mskold@build.mysql.com:/home/bk/mysql-4.1
into mysql.com:/usr/local/home/marty/MySQL/test/mysql-4.1
parents
d10383d6
6370af0b
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
48 additions
and
26 deletions
+48
-26
ndb/include/mgmcommon/ConfigRetriever.hpp
ndb/include/mgmcommon/ConfigRetriever.hpp
+1
-1
ndb/src/common/debugger/signaldata/ScanTab.cpp
ndb/src/common/debugger/signaldata/ScanTab.cpp
+1
-1
ndb/src/common/mgmcommon/ConfigRetriever.cpp
ndb/src/common/mgmcommon/ConfigRetriever.cpp
+2
-2
ndb/src/common/mgmcommon/LocalConfig.cpp
ndb/src/common/mgmcommon/LocalConfig.cpp
+1
-1
ndb/src/ndbapi/Ndb.cpp
ndb/src/ndbapi/Ndb.cpp
+2
-2
ndb/src/ndbapi/NdbDictionary.cpp
ndb/src/ndbapi/NdbDictionary.cpp
+2
-1
ndb/src/ndbapi/NdbDictionaryImpl.cpp
ndb/src/ndbapi/NdbDictionaryImpl.cpp
+4
-4
ndb/src/ndbapi/Ndbif.cpp
ndb/src/ndbapi/Ndbif.cpp
+7
-5
ndb/src/ndbapi/Ndbinit.cpp
ndb/src/ndbapi/Ndbinit.cpp
+1
-1
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+20
-5
sql/ha_ndbcluster.h
sql/ha_ndbcluster.h
+4
-0
sql/handler.cc
sql/handler.cc
+3
-3
No files found.
ndb/include/mgmcommon/ConfigRetriever.hpp
View file @
9311c81a
...
...
@@ -95,7 +95,7 @@ private:
BaseString
_localConfigFileName
;
struct
LocalConfig
_localConfig
;
int
_ownNodeId
;
Uint32
_ownNodeId
;
BaseString
m_connectString
;
...
...
ndb/src/common/debugger/signaldata/ScanTab.cpp
View file @
9311c81a
...
...
@@ -67,7 +67,7 @@ printSCANTABCONF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 recei
fprintf
(
output
,
" Operation(s) [api tc rows len]:
\n
"
);
ScanTabConf
::
OpData
*
op
=
(
ScanTabConf
::
OpData
*
)
(
theData
+
ScanTabConf
::
SignalLength
);
for
(
in
t
i
=
0
;
i
<
op_count
;
i
++
){
for
(
size_
t
i
=
0
;
i
<
op_count
;
i
++
){
if
(
op
->
info
!=
ScanTabConf
::
EndOfData
)
fprintf
(
output
,
" [0x%x 0x%x %d %d]"
,
op
->
apiPtrI
,
op
->
tcPtrI
,
...
...
ndb/src/common/mgmcommon/ConfigRetriever.cpp
View file @
9311c81a
...
...
@@ -94,7 +94,7 @@ ConfigRetriever::do_connect(int exit_on_connect_failure){
while
(
retry
<
retry_max
){
Uint32
type
=
CR_ERROR
;
BaseString
tmp
;
for
(
int
i
=
0
;
i
<
_localConfig
.
ids
.
size
();
i
++
){
for
(
unsigned
int
i
=
0
;
i
<
_localConfig
.
ids
.
size
();
i
++
){
MgmtSrvrId
*
m
=
&
_localConfig
.
ids
[
i
];
switch
(
m
->
type
){
case
MgmId_TCP
:
...
...
@@ -139,7 +139,7 @@ ConfigRetriever::getConfig() {
if
(
m_handle
!=
0
){
p
=
getConfig
(
m_handle
);
}
else
{
for
(
int
i
=
0
;
i
<
_localConfig
.
ids
.
size
();
i
++
){
for
(
unsigned
int
i
=
0
;
i
<
_localConfig
.
ids
.
size
();
i
++
){
MgmtSrvrId
*
m
=
&
_localConfig
.
ids
[
i
];
switch
(
m
->
type
){
case
MgmId_File
:
...
...
ndb/src/common/mgmcommon/LocalConfig.cpp
View file @
9311c81a
...
...
@@ -241,7 +241,7 @@ bool LocalConfig::readFile(const char * filename, bool &fopenError)
return
false
;
}
int
sz
=
1024
;
unsigned
int
sz
=
1024
;
char
*
theString
=
(
char
*
)
NdbMem_Allocate
(
sz
);
theString
[
0
]
=
0
;
...
...
ndb/src/ndbapi/Ndb.cpp
View file @
9311c81a
...
...
@@ -1145,7 +1145,7 @@ void Ndb::setCatalogName(const char * a_catalog_name)
int
len
=
snprintf
(
prefixName
,
sizeof
(
prefixName
),
"%s%c%s%c"
,
theDataBase
,
table_name_separator
,
theDataBaseSchema
,
table_name_separator
);
prefixEnd
=
prefixName
+
(
len
<
sizeof
(
prefixName
)
?
len
:
prefixEnd
=
prefixName
+
(
len
<
(
int
)
sizeof
(
prefixName
)
?
len
:
sizeof
(
prefixName
)
-
1
);
}
}
...
...
@@ -1164,7 +1164,7 @@ void Ndb::setSchemaName(const char * a_schema_name)
int
len
=
snprintf
(
prefixName
,
sizeof
(
prefixName
),
"%s%c%s%c"
,
theDataBase
,
table_name_separator
,
theDataBaseSchema
,
table_name_separator
);
prefixEnd
=
prefixName
+
(
len
<
sizeof
(
prefixName
)
?
len
:
prefixEnd
=
prefixName
+
(
len
<
(
int
)
sizeof
(
prefixName
)
?
len
:
sizeof
(
prefixName
)
-
1
);
}
}
...
...
ndb/src/ndbapi/NdbDictionary.cpp
View file @
9311c81a
...
...
@@ -229,7 +229,8 @@ NdbDictionary::Table::Table(const char * name)
}
NdbDictionary
::
Table
::
Table
(
const
NdbDictionary
::
Table
&
org
)
:
m_impl
(
*
new
NdbTableImpl
(
*
this
))
:
NdbDictionary
::
Object
(),
m_impl
(
*
new
NdbTableImpl
(
*
this
))
{
m_impl
.
assign
(
org
.
m_impl
);
}
...
...
ndb/src/ndbapi/NdbDictionaryImpl.cpp
View file @
9311c81a
...
...
@@ -383,7 +383,7 @@ void
NdbTableImpl
::
buildColumnHash
(){
const
Uint32
size
=
m_columns
.
size
();
size_
t
i
;
in
t
i
;
for
(
i
=
31
;
i
>=
0
;
i
--
){
if
(((
1
<<
i
)
&
size
)
!=
0
){
m_columnHashMask
=
(
1
<<
(
i
+
1
))
-
1
;
...
...
@@ -393,7 +393,7 @@ NdbTableImpl::buildColumnHash(){
Vector
<
Uint32
>
hashValues
;
Vector
<
Vector
<
Uint32
>
>
chains
;
chains
.
fill
(
size
,
hashValues
);
for
(
i
=
0
;
i
<
size
;
i
++
){
for
(
i
=
0
;
i
<
(
int
)
size
;
i
++
){
Uint32
hv
=
Hash
(
m_columns
[
i
]
->
getName
())
&
0xFFFE
;
Uint32
bucket
=
hv
&
m_columnHashMask
;
bucket
=
(
bucket
<
size
?
bucket
:
bucket
-
size
);
...
...
@@ -407,7 +407,7 @@ NdbTableImpl::buildColumnHash(){
m_columnHash
.
fill
((
unsigned
)
size
-
1
,
tmp
);
// Default no chaining
Uint32
pos
=
0
;
// In overflow vector
for
(
i
=
0
;
i
<
size
;
i
++
){
for
(
i
=
0
;
i
<
(
int
)
size
;
i
++
){
Uint32
sz
=
chains
[
i
].
size
();
if
(
sz
==
1
){
Uint32
col
=
chains
[
i
][
0
];
...
...
@@ -1421,7 +1421,7 @@ NdbDictInterface::createOrAlterTable(Ndb & ndb,
internalName
);
bool
haveAutoIncrement
=
false
;
Uint64
autoIncrementValue
;
Uint64
autoIncrementValue
=
0
;
for
(
i
=
0
;
i
<
sz
;
i
++
){
const
NdbColumnImpl
*
col
=
impl
.
m_columns
[
i
];
if
(
col
==
0
)
...
...
ndb/src/ndbapi/Ndbif.cpp
View file @
9311c81a
...
...
@@ -392,7 +392,8 @@ Ndb::handleReceivedSignal(NdbApiSignal* aSignal, LinearSectionPtr ptr[3])
break
;
case
NdbReceiver
:
:
NDB_SCANRECEIVER
:
tCon
->
theScanningOp
->
receiver_delivered
(
tRec
);
theWaiter
.
m_state
=
(
tWaitState
==
WAIT_SCAN
?
NO_WAIT
:
tWaitState
);
theWaiter
.
m_state
=
(((
WaitSignalType
)
tWaitState
)
==
WAIT_SCAN
?
(
Uint32
)
NO_WAIT
:
tWaitState
);
break
;
default:
goto
InvalidSignal
;
...
...
@@ -764,7 +765,8 @@ Ndb::handleReceivedSignal(NdbApiSignal* aSignal, LinearSectionPtr ptr[3])
switch
(
com
){
case
1
:
tCon
->
theScanningOp
->
receiver_delivered
(
tRec
);
theWaiter
.
m_state
=
(
tWaitState
==
WAIT_SCAN
?
NO_WAIT
:
tWaitState
);
theWaiter
.
m_state
=
(((
WaitSignalType
)
tWaitState
)
==
WAIT_SCAN
?
(
Uint32
)
NO_WAIT
:
tWaitState
);
break
;
case
0
:
break
;
...
...
@@ -888,8 +890,8 @@ Ndb::completedTransaction(NdbConnection* aCon)
return
;
}
//if
}
else
{
ndbout
<<
"theNoOfSentTransactions = "
<<
theNoOfSentTransactions
;
ndbout
<<
" theListState = "
<<
aCon
->
theListState
;
ndbout
<<
"theNoOfSentTransactions = "
<<
(
int
)
theNoOfSentTransactions
;
ndbout
<<
" theListState = "
<<
(
int
)
aCon
->
theListState
;
ndbout
<<
" theTransArrayIndex = "
<<
aCon
->
theTransArrayIndex
;
ndbout
<<
endl
<<
flush
;
#ifdef VM_TRACE
...
...
@@ -940,7 +942,7 @@ Ndb::pollCompleted(NdbConnection** aCopyArray)
aCopyArray
[
i
]
=
theCompletedTransactionsArray
[
i
];
if
(
aCopyArray
[
i
]
->
theListState
!=
NdbConnection
::
InCompletedList
)
{
ndbout
<<
"pollCompleted error "
;
ndbout
<<
aCopyArray
[
i
]
->
theListState
<<
endl
;
ndbout
<<
(
int
)
aCopyArray
[
i
]
->
theListState
<<
endl
;
abort
();
}
//if
theCompletedTransactionsArray
[
i
]
=
NULL
;
...
...
ndb/src/ndbapi/Ndbinit.cpp
View file @
9311c81a
...
...
@@ -163,7 +163,7 @@ void Ndb::setup(Ndb_cluster_connection *ndb_cluster_connection,
int
len
=
snprintf
(
prefixName
,
sizeof
(
prefixName
),
"%s%c%s%c"
,
theDataBase
,
table_name_separator
,
theDataBaseSchema
,
table_name_separator
);
prefixEnd
=
prefixName
+
(
len
<
sizeof
(
prefixName
)
?
len
:
prefixEnd
=
prefixName
+
(
len
<
(
int
)
sizeof
(
prefixName
)
?
len
:
sizeof
(
prefixName
)
-
1
);
NdbMutex_Lock
(
&
createNdbMutex
);
...
...
sql/ha_ndbcluster.cc
View file @
9311c81a
...
...
@@ -2085,8 +2085,8 @@ int ha_ndbcluster::index_end()
int
ha_ndbcluster
::
index_read
(
byte
*
buf
,
const
byte
*
key
,
uint
key_len
,
enum
ha_rkey_function
find_flag
)
const
byte
*
key
,
uint
key_len
,
enum
ha_rkey_function
find_flag
)
{
DBUG_ENTER
(
"index_read"
);
DBUG_PRINT
(
"enter"
,
(
"active_index: %u, key_len: %u, find_flag: %d"
,
...
...
@@ -2096,7 +2096,7 @@ int ha_ndbcluster::index_read(byte *buf,
start_key
.
key
=
key
;
start_key
.
length
=
key_len
;
start_key
.
flag
=
find_flag
;
DBUG_RETURN
(
read_range_first
(
&
start_key
,
NULL
,
false
,
true
));
DBUG_RETURN
(
read_range_first
_to_buf
(
&
start_key
,
NULL
,
false
,
true
,
buf
));
}
...
...
@@ -2163,10 +2163,25 @@ int ha_ndbcluster::read_range_first(const key_range *start_key,
const
key_range
*
end_key
,
bool
eq_range
,
bool
sorted
)
{
KEY
*
key_info
;
int
error
=
1
;
byte
*
buf
=
table
->
record
[
0
];
DBUG_ENTER
(
"ha_ndbcluster::read_range_first"
);
DBUG_RETURN
(
read_range_first_to_buf
(
start_key
,
end_key
,
eq_range
,
sorted
,
buf
));
}
inline
int
ha_ndbcluster
::
read_range_first_to_buf
(
const
key_range
*
start_key
,
const
key_range
*
end_key
,
bool
eq_range
,
bool
sorted
,
byte
*
buf
)
{
KEY
*
key_info
;
int
error
=
1
;
DBUG_ENTER
(
"ha_ndbcluster::read_range_first_to_buf"
);
DBUG_PRINT
(
"info"
,
(
"eq_range: %d, sorted: %d"
,
eq_range
,
sorted
));
if
(
m_active_cursor
)
...
...
sql/ha_ndbcluster.h
View file @
9311c81a
...
...
@@ -107,6 +107,10 @@ class ha_ndbcluster: public handler
int
read_range_first
(
const
key_range
*
start_key
,
const
key_range
*
end_key
,
bool
eq_range
,
bool
sorted
);
int
read_range_first_to_buf
(
const
key_range
*
start_key
,
const
key_range
*
end_key
,
bool
eq_range
,
bool
sorted
,
byte
*
buf
);
int
read_range_next
();
bool
get_error_message
(
int
error
,
String
*
buf
);
...
...
sql/handler.cc
View file @
9311c81a
...
...
@@ -1434,9 +1434,9 @@ int handler::read_range_first(const key_range *start_key,
start_key
->
length
,
start_key
->
flag
);
if
(
result
)
DBUG_RETURN
((
result
==
HA_ERR_KEY_NOT_FOUND
||
result
==
HA_ERR_END_OF_FILE
)
?
HA_ERR_END_OF_FILE
:
result
);
DBUG_RETURN
((
result
==
HA_ERR_KEY_NOT_FOUND
)
?
HA_ERR_END_OF_FILE
:
result
);
DBUG_RETURN
(
compare_key
(
end_range
)
<=
0
?
0
:
HA_ERR_END_OF_FILE
);
}
...
...
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