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
9320ec8d
Commit
9320ec8d
authored
Nov 01, 2007
by
tomas@whalegate.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug #31484 Cluster LOST_EVENTS entry not added to binlog on mysqld restart.
parent
d8eb4cdc
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
16 deletions
+37
-16
mysql-test/include/have_multi_ndb.inc
mysql-test/include/have_multi_ndb.inc
+2
-10
mysql-test/suite/ndb/r/ndb_multi_row.result
mysql-test/suite/ndb/r/ndb_multi_row.result
+1
-0
mysql-test/suite/ndb/t/ndb_multi_row.test
mysql-test/suite/ndb/t/ndb_multi_row.test
+2
-1
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+1
-1
sql/ha_ndbcluster_binlog.cc
sql/ha_ndbcluster_binlog.cc
+31
-4
No files found.
mysql-test/include/have_multi_ndb.inc
View file @
9320ec8d
...
@@ -5,10 +5,6 @@ connect (server2,127.0.0.1,root,,test,$MASTER_MYPORT1,);
...
@@ -5,10 +5,6 @@ connect (server2,127.0.0.1,root,,test,$MASTER_MYPORT1,);
# Check that server1 has NDB support
# Check that server1 has NDB support
connection
server1
;
connection
server1
;
disable_query_log
;
disable_query_log
;
--
disable_warnings
drop
table
if
exists
t1
,
t2
;
--
enable_warnings
flush
tables
;
--
require
r
/
true
.
require
--
require
r
/
true
.
require
select
(
support
=
'YES'
or
support
=
'DEFAULT'
)
as
`TRUE`
from
information_schema
.
engines
where
engine
=
'ndbcluster'
;
select
(
support
=
'YES'
or
support
=
'DEFAULT'
)
as
`TRUE`
from
information_schema
.
engines
where
engine
=
'ndbcluster'
;
--
source
include
/
ndb_not_readonly
.
inc
--
source
include
/
ndb_not_readonly
.
inc
...
@@ -17,14 +13,10 @@ enable_query_log;
...
@@ -17,14 +13,10 @@ enable_query_log;
# Check that server2 has NDB support
# Check that server2 has NDB support
connection
server2
;
connection
server2
;
disable_query_log
;
disable_query_log
;
--
disable_warnings
drop
table
if
exists
t1
,
t2
;
--
enable_warnings
flush
tables
;
--
require
r
/
true
.
require
--
require
r
/
true
.
require
select
(
support
=
'YES'
or
support
=
'DEFAULT'
)
as
`TRUE`
from
information_schema
.
engines
where
engine
=
'ndbcluster'
;
select
(
support
=
'YES'
or
support
=
'DEFAULT'
)
as
`TRUE`
from
information_schema
.
engines
where
engine
=
'ndbcluster'
;
--
source
include
/
ndb_not_readonly
.
inc
--
source
include
/
ndb_not_readonly
.
inc
enable_query_log
;
enable_query_log
;
# Set the default connection
to 'server1'
# Set the default connection
connection
server1
;
connection
default
;
mysql-test/suite/ndb/r/ndb_multi_row.result
View file @
9320ec8d
drop table if exists t1, t2, t3, t4;
drop table if exists t1, t2, t3, t4;
flush status;
drop table if exists t1, t2, t3, t4;
drop table if exists t1, t2, t3, t4;
flush status;
flush status;
create table t1 (a int) engine=ndbcluster;
create table t1 (a int) engine=ndbcluster;
...
...
mysql-test/suite/ndb/t/ndb_multi_row.test
View file @
9320ec8d
...
@@ -6,11 +6,12 @@
...
@@ -6,11 +6,12 @@
--
disable_warnings
--
disable_warnings
connection
server2
;
connection
server2
;
drop
table
if
exists
t1
,
t2
,
t3
,
t4
;
drop
table
if
exists
t1
,
t2
,
t3
,
t4
;
flush
status
;
connection
server1
;
connection
server1
;
drop
table
if
exists
t1
,
t2
,
t3
,
t4
;
drop
table
if
exists
t1
,
t2
,
t3
,
t4
;
flush
status
;
--
enable_warnings
--
enable_warnings
flush
status
;
# Create test tables on server1
# Create test tables on server1
create
table
t1
(
a
int
)
engine
=
ndbcluster
;
create
table
t1
(
a
int
)
engine
=
ndbcluster
;
...
...
sql/ha_ndbcluster.cc
View file @
9320ec8d
...
@@ -618,7 +618,7 @@ bool ha_ndbcluster::get_error_message(int error,
...
@@ -618,7 +618,7 @@ bool ha_ndbcluster::get_error_message(int error,
DBUG_ENTER
(
"ha_ndbcluster::get_error_message"
);
DBUG_ENTER
(
"ha_ndbcluster::get_error_message"
);
DBUG_PRINT
(
"enter"
,
(
"error: %d"
,
error
));
DBUG_PRINT
(
"enter"
,
(
"error: %d"
,
error
));
Ndb
*
ndb
=
get_ndb
(
);
Ndb
*
ndb
=
check_ndb_in_thd
(
current_thd
);
if
(
!
ndb
)
if
(
!
ndb
)
DBUG_RETURN
(
FALSE
);
DBUG_RETURN
(
FALSE
);
...
...
sql/ha_ndbcluster_binlog.cc
View file @
9320ec8d
...
@@ -3587,6 +3587,7 @@ pthread_handler_t ndb_binlog_thread_func(void *arg)
...
@@ -3587,6 +3587,7 @@ pthread_handler_t ndb_binlog_thread_func(void *arg)
Thd_ndb
*
thd_ndb
=
0
;
Thd_ndb
*
thd_ndb
=
0
;
int
ndb_update_ndb_binlog_index
=
1
;
int
ndb_update_ndb_binlog_index
=
1
;
injector
*
inj
=
injector
::
instance
();
injector
*
inj
=
injector
::
instance
();
uint
incident_id
=
0
;
#ifdef RUN_NDB_BINLOG_TIMER
#ifdef RUN_NDB_BINLOG_TIMER
Timer
main_timer
;
Timer
main_timer
;
...
@@ -3692,17 +3693,43 @@ pthread_handler_t ndb_binlog_thread_func(void *arg)
...
@@ -3692,17 +3693,43 @@ pthread_handler_t ndb_binlog_thread_func(void *arg)
pthread_mutex_unlock
(
&
injector_mutex
);
pthread_mutex_unlock
(
&
injector_mutex
);
pthread_cond_signal
(
&
injector_cond
);
pthread_cond_signal
(
&
injector_cond
);
/*
wait for mysql server to start (so that the binlog is started
and thus can receive the first GAP event)
*/
pthread_mutex_lock
(
&
LOCK_server_started
);
while
(
!
mysqld_server_started
)
{
struct
timespec
abstime
;
set_timespec
(
abstime
,
1
);
pthread_cond_timedwait
(
&
COND_server_started
,
&
LOCK_server_started
,
&
abstime
);
if
(
ndbcluster_terminating
)
{
pthread_mutex_unlock
(
&
LOCK_server_started
);
pthread_mutex_lock
(
&
LOCK_ndb_util_thread
);
goto
err
;
}
}
pthread_mutex_unlock
(
&
LOCK_server_started
);
restart:
restart:
/*
/*
Main NDB Injector loop
Main NDB Injector loop
*/
*/
{
{
/*
/*
Always insert a GAP event as we cannot know what has happened
in the cluster
Always insert a GAP event as we cannot know what has happened
while not being connected.
in the cluster
while not being connected.
*/
*/
LEX_STRING
const
msg
=
{
C_STRING_WITH_LEN
(
"Cluster connect"
)
};
LEX_STRING
const
msg
[
2
]
=
inj
->
record_incident
(
thd
,
INCIDENT_LOST_EVENTS
,
msg
);
{
{
C_STRING_WITH_LEN
(
"mysqld startup"
)
},
{
C_STRING_WITH_LEN
(
"cluster disconnect"
)}
};
IF_DBUG
(
int
error
=
)
inj
->
record_incident
(
thd
,
INCIDENT_LOST_EVENTS
,
msg
[
incident_id
]);
DBUG_ASSERT
(
!
error
);
incident_id
=
1
;
}
}
{
{
thd
->
proc_info
=
"Waiting for ndbcluster to start"
;
thd
->
proc_info
=
"Waiting for ndbcluster to start"
;
...
...
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