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
7488c8fd
Commit
7488c8fd
authored
Sep 04, 2006
by
jonas@perch.ndb.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge perch.ndb.mysql.com:/home/jonas/src/41-work
into perch.ndb.mysql.com:/home/jonas/src/mysql-4.1-ndb
parents
e6500528
96ff8b4c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
8 deletions
+23
-8
ndb/src/ndbapi/NdbScanOperation.cpp
ndb/src/ndbapi/NdbScanOperation.cpp
+9
-4
sql/log.cc
sql/log.cc
+7
-2
sql/sql_class.h
sql/sql_class.h
+1
-0
sql/sql_repl.cc
sql/sql_repl.cc
+6
-2
No files found.
ndb/src/ndbapi/NdbScanOperation.cpp
View file @
7488c8fd
...
@@ -504,6 +504,8 @@ int NdbScanOperation::nextResult(bool fetchAllowed, bool forceSend)
...
@@ -504,6 +504,8 @@ int NdbScanOperation::nextResult(bool fetchAllowed, bool forceSend)
idx
=
m_current_api_receiver
;
idx
=
m_current_api_receiver
;
last
=
m_api_receivers_count
;
last
=
m_api_receivers_count
;
Uint32
timeout
=
tp
->
m_waitfor_timeout
;
do
{
do
{
if
(
theError
.
code
){
if
(
theError
.
code
){
...
@@ -531,7 +533,7 @@ int NdbScanOperation::nextResult(bool fetchAllowed, bool forceSend)
...
@@ -531,7 +533,7 @@ int NdbScanOperation::nextResult(bool fetchAllowed, bool forceSend)
*/
*/
theNdb
->
theImpl
->
theWaiter
.
m_node
=
nodeId
;
theNdb
->
theImpl
->
theWaiter
.
m_node
=
nodeId
;
theNdb
->
theImpl
->
theWaiter
.
m_state
=
WAIT_SCAN
;
theNdb
->
theImpl
->
theWaiter
.
m_state
=
WAIT_SCAN
;
int
return_code
=
theNdb
->
receiveResponse
(
WAITFOR_SCAN_TIMEOUT
);
int
return_code
=
theNdb
->
receiveResponse
(
3
*
timeout
);
if
(
return_code
==
0
&&
seq
==
tp
->
getNodeSequence
(
nodeId
))
{
if
(
return_code
==
0
&&
seq
==
tp
->
getNodeSequence
(
nodeId
))
{
continue
;
continue
;
}
else
{
}
else
{
...
@@ -1372,6 +1374,7 @@ NdbIndexScanOperation::next_result_ordered(bool fetchAllowed,
...
@@ -1372,6 +1374,7 @@ NdbIndexScanOperation::next_result_ordered(bool fetchAllowed,
return
-
1
;
return
-
1
;
Uint32
seq
=
theNdbCon
->
theNodeSequence
;
Uint32
seq
=
theNdbCon
->
theNodeSequence
;
Uint32
nodeId
=
theNdbCon
->
theDBnode
;
Uint32
nodeId
=
theNdbCon
->
theDBnode
;
Uint32
timeout
=
tp
->
m_waitfor_timeout
;
if
(
seq
==
tp
->
getNodeSequence
(
nodeId
)
&&
if
(
seq
==
tp
->
getNodeSequence
(
nodeId
)
&&
!
send_next_scan_ordered
(
s_idx
,
forceSend
)){
!
send_next_scan_ordered
(
s_idx
,
forceSend
)){
Uint32
tmp
=
m_sent_receivers_count
;
Uint32
tmp
=
m_sent_receivers_count
;
...
@@ -1379,7 +1382,7 @@ NdbIndexScanOperation::next_result_ordered(bool fetchAllowed,
...
@@ -1379,7 +1382,7 @@ NdbIndexScanOperation::next_result_ordered(bool fetchAllowed,
while
(
m_sent_receivers_count
>
0
&&
!
theError
.
code
){
while
(
m_sent_receivers_count
>
0
&&
!
theError
.
code
){
theNdb
->
theImpl
->
theWaiter
.
m_node
=
nodeId
;
theNdb
->
theImpl
->
theWaiter
.
m_node
=
nodeId
;
theNdb
->
theImpl
->
theWaiter
.
m_state
=
WAIT_SCAN
;
theNdb
->
theImpl
->
theWaiter
.
m_state
=
WAIT_SCAN
;
int
return_code
=
theNdb
->
receiveResponse
(
WAITFOR_SCAN_TIMEOUT
);
int
return_code
=
theNdb
->
receiveResponse
(
3
*
timeout
);
if
(
return_code
==
0
&&
seq
==
tp
->
getNodeSequence
(
nodeId
))
{
if
(
return_code
==
0
&&
seq
==
tp
->
getNodeSequence
(
nodeId
))
{
continue
;
continue
;
}
}
...
@@ -1520,6 +1523,8 @@ NdbScanOperation::close_impl(TransporterFacade* tp, bool forceSend){
...
@@ -1520,6 +1523,8 @@ NdbScanOperation::close_impl(TransporterFacade* tp, bool forceSend){
return
-
1
;
return
-
1
;
}
}
Uint32
timeout
=
tp
->
m_waitfor_timeout
;
/**
/**
* Wait for outstanding
* Wait for outstanding
*/
*/
...
@@ -1527,7 +1532,7 @@ NdbScanOperation::close_impl(TransporterFacade* tp, bool forceSend){
...
@@ -1527,7 +1532,7 @@ NdbScanOperation::close_impl(TransporterFacade* tp, bool forceSend){
{
{
theNdb
->
theImpl
->
theWaiter
.
m_node
=
nodeId
;
theNdb
->
theImpl
->
theWaiter
.
m_node
=
nodeId
;
theNdb
->
theImpl
->
theWaiter
.
m_state
=
WAIT_SCAN
;
theNdb
->
theImpl
->
theWaiter
.
m_state
=
WAIT_SCAN
;
int
return_code
=
theNdb
->
receiveResponse
(
WAITFOR_SCAN_TIMEOUT
);
int
return_code
=
theNdb
->
receiveResponse
(
3
*
timeout
);
switch
(
return_code
){
switch
(
return_code
){
case
0
:
case
0
:
break
;
break
;
...
@@ -1597,7 +1602,7 @@ NdbScanOperation::close_impl(TransporterFacade* tp, bool forceSend){
...
@@ -1597,7 +1602,7 @@ NdbScanOperation::close_impl(TransporterFacade* tp, bool forceSend){
{
{
theNdb
->
theImpl
->
theWaiter
.
m_node
=
nodeId
;
theNdb
->
theImpl
->
theWaiter
.
m_node
=
nodeId
;
theNdb
->
theImpl
->
theWaiter
.
m_state
=
WAIT_SCAN
;
theNdb
->
theImpl
->
theWaiter
.
m_state
=
WAIT_SCAN
;
int
return_code
=
theNdb
->
receiveResponse
(
WAITFOR_SCAN_TIMEOUT
);
int
return_code
=
theNdb
->
receiveResponse
(
3
*
timeout
);
switch
(
return_code
){
switch
(
return_code
){
case
0
:
case
0
:
break
;
break
;
...
...
sql/log.cc
View file @
7488c8fd
...
@@ -409,13 +409,18 @@ shutdown the MySQL server and restart it.", log_name, errno);
...
@@ -409,13 +409,18 @@ shutdown the MySQL server and restart it.", log_name, errno);
int
MYSQL_LOG
::
get_current_log
(
LOG_INFO
*
linfo
)
int
MYSQL_LOG
::
get_current_log
(
LOG_INFO
*
linfo
)
{
{
pthread_mutex_lock
(
&
LOCK_log
);
pthread_mutex_lock
(
&
LOCK_log
);
int
ret
=
raw_get_current_log
(
linfo
);
pthread_mutex_unlock
(
&
LOCK_log
);
return
ret
;
}
int
MYSQL_LOG
::
raw_get_current_log
(
LOG_INFO
*
linfo
)
{
strmake
(
linfo
->
log_file_name
,
log_file_name
,
sizeof
(
linfo
->
log_file_name
)
-
1
);
strmake
(
linfo
->
log_file_name
,
log_file_name
,
sizeof
(
linfo
->
log_file_name
)
-
1
);
linfo
->
pos
=
my_b_tell
(
&
log_file
);
linfo
->
pos
=
my_b_tell
(
&
log_file
);
pthread_mutex_unlock
(
&
LOCK_log
);
return
0
;
return
0
;
}
}
/*
/*
Move all data up in a file in an filename index file
Move all data up in a file in an filename index file
...
...
sql/sql_class.h
View file @
7488c8fd
...
@@ -177,6 +177,7 @@ public:
...
@@ -177,6 +177,7 @@ public:
bool
need_mutex
);
bool
need_mutex
);
int
find_next_log
(
LOG_INFO
*
linfo
,
bool
need_mutex
);
int
find_next_log
(
LOG_INFO
*
linfo
,
bool
need_mutex
);
int
get_current_log
(
LOG_INFO
*
linfo
);
int
get_current_log
(
LOG_INFO
*
linfo
);
int
raw_get_current_log
(
LOG_INFO
*
linfo
);
uint
next_file_id
();
uint
next_file_id
();
inline
bool
is_open
()
{
return
log_type
!=
LOG_CLOSED
;
}
inline
bool
is_open
()
{
return
log_type
!=
LOG_CLOSED
;
}
inline
char
*
get_index_fname
()
{
return
index_file_name
;}
inline
char
*
get_index_fname
()
{
return
index_file_name
;}
...
...
sql/sql_repl.cc
View file @
7488c8fd
...
@@ -1359,10 +1359,14 @@ int show_binlogs(THD* thd)
...
@@ -1359,10 +1359,14 @@ int show_binlogs(THD* thd)
MYSQL_TYPE_LONGLONG
));
MYSQL_TYPE_LONGLONG
));
if
(
protocol
->
send_fields
(
&
field_list
,
1
))
if
(
protocol
->
send_fields
(
&
field_list
,
1
))
DBUG_RETURN
(
1
);
DBUG_RETURN
(
1
);
pthread_mutex_lock
(
mysql_bin_log
.
get_log_lock
());
mysql_bin_log
.
lock_index
();
mysql_bin_log
.
lock_index
();
index_file
=
mysql_bin_log
.
get_index_file
();
index_file
=
mysql_bin_log
.
get_index_file
();
mysql_bin_log
.
get_current_log
(
&
cur
);
mysql_bin_log
.
raw_get_current_log
(
&
cur
);
// dont take mutex
pthread_mutex_unlock
(
mysql_bin_log
.
get_log_lock
());
// lockdep, OK
cur_dir_len
=
dirname_length
(
cur
.
log_file_name
);
cur_dir_len
=
dirname_length
(
cur
.
log_file_name
);
reinit_io_cache
(
index_file
,
READ_CACHE
,
(
my_off_t
)
0
,
0
,
0
);
reinit_io_cache
(
index_file
,
READ_CACHE
,
(
my_off_t
)
0
,
0
,
0
);
...
...
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