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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
84a4db26
Commit
84a4db26
authored
Mar 28, 2015
by
Nirbhay Choubey
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '5.5-galera' into 10.0-galera
parents
555915fa
d7445ea6
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
115 additions
and
82 deletions
+115
-82
mysql-test/suite/galera/r/binlog_checksum.result
mysql-test/suite/galera/r/binlog_checksum.result
+36
-0
mysql-test/suite/galera/t/binlog_checksum.test
mysql-test/suite/galera/t/binlog_checksum.test
+36
-0
mysql-test/suite/wsrep/r/mdev_7798.result
mysql-test/suite/wsrep/r/mdev_7798.result
+13
-0
mysql-test/suite/wsrep/t/mdev_7798.opt
mysql-test/suite/wsrep/t/mdev_7798.opt
+1
-0
mysql-test/suite/wsrep/t/mdev_7798.test
mysql-test/suite/wsrep/t/mdev_7798.test
+17
-0
sql/log.cc
sql/log.cc
+0
-70
sql/log_event.cc
sql/log_event.cc
+0
-1
sql/mysqld.cc
sql/mysqld.cc
+2
-1
sql/sql_class.cc
sql/sql_class.cc
+0
-2
sql/sql_class.h
sql/sql_class.h
+0
-1
sql/wsrep_applier.cc
sql/wsrep_applier.cc
+4
-7
sql/wsrep_mysqld.cc
sql/wsrep_mysqld.cc
+6
-0
No files found.
mysql-test/suite/galera/r/binlog_checksum.result
0 → 100644
View file @
84a4db26
# On node_1
SET @binlog_checksum_saved= @@GLOBAL.BINLOG_CHECKSUM;
SET @@GLOBAL.BINLOG_CHECKSUM=CRC32;
# On node_2
SET @binlog_checksum_saved= @@GLOBAL.BINLOG_CHECKSUM;
SET @@GLOBAL.BINLOG_CHECKSUM=CRC32;
USE test;
CREATE TABLE t1(c1 INT PRIMARY KEY) ENGINE=INNODB;
INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
SELECT * FROM t1;
c1
1
2
3
4
5
SELECT * FROM test.t1;
c1
1
2
3
4
5
# On node_2
SELECT * FROM test.t1;
c1
1
2
3
4
5
DROP TABLE t1;
SET @@GLOBAL.BINLOG_CHECKSUM = @binlog_checksum_saved;
SET @@GLOBAL.BINLOG_CHECKSUM = @binlog_checksum_saved;
# End of test
mysql-test/suite/galera/t/binlog_checksum.test
0 → 100644
View file @
84a4db26
--
source
include
/
galera_cluster
.
inc
--
source
include
/
have_innodb
.
inc
--
echo
# On node_1
--
connection
node_1
SET
@
binlog_checksum_saved
=
@@
GLOBAL
.
BINLOG_CHECKSUM
;
SET
@@
GLOBAL
.
BINLOG_CHECKSUM
=
CRC32
;
--
echo
# On node_2
--
connection
node_2
SET
@
binlog_checksum_saved
=
@@
GLOBAL
.
BINLOG_CHECKSUM
;
SET
@@
GLOBAL
.
BINLOG_CHECKSUM
=
CRC32
;
USE
test
;
CREATE
TABLE
t1
(
c1
INT
PRIMARY
KEY
)
ENGINE
=
INNODB
;
INSERT
INTO
t1
VALUES
(
1
),
(
2
),
(
3
),
(
4
),
(
5
);
SELECT
*
FROM
t1
;
SELECT
*
FROM
test
.
t1
;
--
echo
--
echo
# On node_2
--
connection
node_2
SELECT
*
FROM
test
.
t1
;
--
let
$galera_diff_statement
=
SELECT
*
FROM
t1
--
source
include
/
galera_diff
.
inc
# Cleanup
DROP
TABLE
t1
;
--
connection
node_1
SET
@@
GLOBAL
.
BINLOG_CHECKSUM
=
@
binlog_checksum_saved
;
--
connection
node_2
SET
@@
GLOBAL
.
BINLOG_CHECKSUM
=
@
binlog_checksum_saved
;
--
source
include
/
galera_end
.
inc
--
echo
# End of test
mysql-test/suite/wsrep/r/mdev_7798.result
0 → 100644
View file @
84a4db26
#
# MDEV-7798: mysql.server init script can't stop mysqld when WSREP is
# turned off
#
SELECT @@GLOBAL.WSREP_ON;
@@GLOBAL.WSREP_ON
1
SET GLOBAL WSREP_ON= 0;
Restart the node.
SELECT @@GLOBAL.WSREP_ON;
@@GLOBAL.WSREP_ON
1
# End of test.
mysql-test/suite/wsrep/t/mdev_7798.opt
0 → 100644
View file @
84a4db26
--wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm:// --wsrep-on=1 --wsrep_causal_reads=ON
mysql-test/suite/wsrep/t/mdev_7798.test
0 → 100644
View file @
84a4db26
--
source
include
/
have_wsrep_provider
.
inc
--
source
include
/
have_binlog_format_row
.
inc
--
echo
#
--
echo
# MDEV-7798: mysql.server init script can't stop mysqld when WSREP is
--
echo
# turned off
--
echo
#
SELECT
@@
GLOBAL
.
WSREP_ON
;
SET
GLOBAL
WSREP_ON
=
0
;
--
echo
Restart
the
node
.
--
source
include
/
restart_mysqld
.
inc
SELECT
@@
GLOBAL
.
WSREP_ON
;
--
echo
# End of test.
sql/log.cc
View file @
84a4db26
...
...
@@ -582,76 +582,6 @@ void thd_binlog_rollback_stmt(THD * thd)
if
(
cache_mngr
)
cache_mngr
->
trx_cache
.
set_prev_position
(
MY_OFF_T_UNDEF
);
}
#ifdef REMOVED
/*
Write the contents of a cache to memory buffer.
This function quite the same as MYSQL_BIN_LOG::write_cache(),
with the exception that here we write in buffer instead of log file.
*/
int
wsrep_write_cache
(
IO_CACHE
*
cache
,
uchar
**
buf
,
int
*
buf_len
)
{
if
(
reinit_io_cache
(
cache
,
READ_CACHE
,
0
,
0
,
0
))
return
ER_ERROR_ON_WRITE
;
uint
length
=
my_b_bytes_in_cache
(
cache
);
long
long
total_length
=
0
;
uchar
*
buf_ptr
=
NULL
;
do
{
/* bail out if buffer grows too large
This is a temporary fix to avoid flooding replication
TODO: remove this check for 0.7.4 release
*/
if
(
total_length
>
wsrep_max_ws_size
)
{
WSREP_WARN
(
"transaction size limit (%lld) exceeded: %lld"
,
wsrep_max_ws_size
,
total_length
);
if
(
reinit_io_cache
(
cache
,
WRITE_CACHE
,
0
,
0
,
0
))
{
WSREP_WARN
(
"failed to initialize io-cache"
);
}
if
(
buf_ptr
)
my_free
(
*
buf
);
*
buf_len
=
0
;
return
ER_ERROR_ON_WRITE
;
}
if
(
total_length
>
0
)
{
*
buf_len
+=
length
;
*
buf
=
(
uchar
*
)
my_realloc
(
*
buf
,
total_length
+
length
,
MYF
(
MY_ALLOW_ZERO_PTR
));
if
(
!*
buf
)
{
WSREP_ERROR
(
"io cache write problem: %d %d"
,
*
buf_len
,
length
);
return
ER_ERROR_ON_WRITE
;
}
buf_ptr
=
*
buf
+
total_length
;
}
else
{
if
(
buf_ptr
!=
NULL
)
{
WSREP_ERROR
(
"io cache alloc error: %d %d"
,
*
buf_len
,
length
);
my_free
(
*
buf
);
}
if
(
length
>
0
)
{
*
buf
=
(
uchar
*
)
my_malloc
(
length
,
MYF
(
0
));
buf_ptr
=
*
buf
;
*
buf_len
=
length
;
}
}
total_length
+=
length
;
memcpy
(
buf_ptr
,
cache
->
read_pos
,
length
);
cache
->
read_pos
=
cache
->
read_end
;
}
while
((
cache
->
file
>=
0
)
&&
(
length
=
my_b_fill
(
cache
)));
return
0
;
}
#endif
/* REMOVED */
#endif
...
...
sql/log_event.cc
View file @
84a4db26
...
...
@@ -12723,7 +12723,6 @@ void Incident_log_event::pack_info(THD *thd, Protocol *protocol)
}
#endif
#if WITH_WSREP && !defined(MYSQL_CLIENT)
Format_description_log_event
*
wsrep_format_desc
;
// TODO: free them at the end
/*
read the first event from (*buf). The size of the (*buf) is (*buf_len).
At the end (*buf) is shitfed to point to the following event or NULL and
...
...
sql/mysqld.cc
View file @
84a4db26
...
...
@@ -1954,7 +1954,8 @@ static void __cdecl kill_server(int sig_ptr)
}
#endif
#ifdef WITH_WSREP
if
(
WSREP_ON
)
wsrep_stop_replication
(
NULL
);
/* Stop wsrep threads in case they are running. */
wsrep_stop_replication
(
NULL
);
#endif
close_connections
();
...
...
sql/sql_class.cc
View file @
84a4db26
...
...
@@ -1605,7 +1605,6 @@ void THD::init(void)
wsrep_trx_meta
.
depends_on
=
WSREP_SEQNO_UNDEFINED
;
wsrep_converted_lock_session
=
false
;
wsrep_retry_counter
=
0
;
wsrep_rli
=
NULL
;
wsrep_rgi
=
NULL
;
wsrep_PA_safe
=
true
;
wsrep_consistency_check
=
NO_CONSISTENCY_CHECK
;
...
...
@@ -1820,7 +1819,6 @@ THD::~THD()
mysql_mutex_lock
(
&
LOCK_wsrep_thd
);
mysql_mutex_unlock
(
&
LOCK_wsrep_thd
);
mysql_mutex_destroy
(
&
LOCK_wsrep_thd
);
if
(
wsrep_rli
)
delete
wsrep_rli
;
if
(
wsrep_rgi
)
delete
wsrep_rgi
;
if
(
wsrep_status_vars
)
wsrep
->
stats_free
(
wsrep
,
wsrep_status_vars
);
#endif
...
...
sql/sql_class.h
View file @
84a4db26
...
...
@@ -2777,7 +2777,6 @@ class THD :public Statement,
// wsrep_seqno_t wsrep_trx_seqno;
wsrep_trx_meta_t
wsrep_trx_meta
;
uint32
wsrep_rand
;
Relay_log_info
*
wsrep_rli
;
rpl_group_info
*
wsrep_rgi
;
bool
wsrep_converted_lock_session
;
wsrep_ws_handle_t
wsrep_ws_handle
;
...
...
sql/wsrep_applier.cc
View file @
84a4db26
...
...
@@ -76,13 +76,10 @@ static inline Format_description_log_event*
wsrep_get_apply_format
(
THD
*
thd
)
{
if
(
thd
->
wsrep_apply_format
)
return
(
Format_description_log_event
*
)
thd
->
wsrep_apply_format
;
/* TODO: mariadb does not support rli->get_rli_description_event()
* => look for alternative way to remember last FDE in replication
*/
//return thd->wsrep_rli->get_rli_description_event();
thd
->
wsrep_apply_format
=
new
Format_description_log_event
(
4
);
return
(
Format_description_log_event
*
)
thd
->
wsrep_apply_format
;
{
return
(
Format_description_log_event
*
)
thd
->
wsrep_apply_format
;
}
return
thd
->
wsrep_rgi
->
rli
->
relay_log
.
description_event_for_exec
;
}
static
wsrep_cb_status_t
wsrep_apply_events
(
THD
*
thd
,
...
...
sql/wsrep_mysqld.cc
View file @
84a4db26
...
...
@@ -738,6 +738,7 @@ void wsrep_deinit(bool free_options)
provider_name
[
0
]
=
'\0'
;
provider_version
[
0
]
=
'\0'
;
provider_vendor
[
0
]
=
'\0'
;
wsrep_inited
=
0
;
if
(
free_options
)
...
...
@@ -1134,6 +1135,11 @@ int wsrep_to_buf_helper(
return
1
;
int
ret
(
0
);
Format_description_log_event
*
tmp_fd
=
new
Format_description_log_event
(
4
);
tmp_fd
->
checksum_alg
=
binlog_checksum_options
;
tmp_fd
->
write
(
&
tmp_io_cache
);
delete
tmp_fd
;
#ifdef GTID_SUPPORT
if
(
thd
->
variables
.
gtid_next
.
type
==
GTID_GROUP
)
{
...
...
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