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
e5b60f0a
Commit
e5b60f0a
authored
Mar 27, 2013
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-26: Global transaction ID.
Fix bug that RESET SLAVE did not reset Using_Gtid back to 0.
parent
20e02111
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
0 deletions
+48
-0
mysql-test/suite/rpl/r/rpl_gtid_startpos.result
mysql-test/suite/rpl/r/rpl_gtid_startpos.result
+18
-0
mysql-test/suite/rpl/t/rpl_gtid_startpos.test
mysql-test/suite/rpl/t/rpl_gtid_startpos.test
+29
-0
sql/rpl_mi.cc
sql/rpl_mi.cc
+1
-0
No files found.
mysql-test/suite/rpl/r/rpl_gtid_startpos.result
View file @
e5b60f0a
...
...
@@ -111,5 +111,23 @@ SELECT * FROM t1 ORDER BY a;
a
1
2
*** Test that RESET SLAVE clears the Using_Gtid flag. ***
include/stop_slave.inc
RESET SLAVE;
Using_Gtid = '0'
START SLAVE;
include/wait_for_slave_sql_error.inc [errno=1050]
STOP SLAVE IO_THREAD;
CHANGE MASTER TO MASTER_GTID_POS=AUTO;
include/start_slave.inc
INSERT INTO t1 VALUES(3);
SELECT * FROM t1 ORDER BY a;
a
1
2
3
SET SQL_LOG_BIN=0;
call mtr.add_suppression("Slave: Table 't1' already exists Error_code: 1050");
SET SQL_LOG_BIN=1;
DROP TABLE t1;
include/rpl_end.inc
mysql-test/suite/rpl/t/rpl_gtid_startpos.test
View file @
e5b60f0a
...
...
@@ -181,6 +181,35 @@ eval CHANGE MASTER TO master_gtid_pos='';
--
sync_with_master
SELECT
*
FROM
t1
ORDER
BY
a
;
--
echo
***
Test
that
RESET
SLAVE
clears
the
Using_Gtid
flag
.
***
--
source
include
/
stop_slave
.
inc
RESET
SLAVE
;
--
let
$status_items
=
Using_Gtid
--
source
include
/
show_slave_status
.
inc
# Starting the slave now reverts to old-style position which defaults to
# the first non-purged binlog file on the master.
# This should give error due to table already existing.
START
SLAVE
;
--
let
$slave_sql_errno
=
1050
--
source
include
/
wait_for_slave_sql_error
.
inc
# Going back to using GTID should fix things.
STOP
SLAVE
IO_THREAD
;
CHANGE
MASTER
TO
MASTER_GTID_POS
=
AUTO
;
--
source
include
/
start_slave
.
inc
--
connection
server_1
INSERT
INTO
t1
VALUES
(
3
);
--
connection
server_2
--
let
$wait_condition
=
SELECT
COUNT
(
*
)
=
3
FROM
t1
--
source
include
/
wait_condition
.
inc
SELECT
*
FROM
t1
ORDER
BY
a
;
SET
SQL_LOG_BIN
=
0
;
call
mtr
.
add_suppression
(
"Slave: Table 't1' already exists Error_code: 1050"
);
SET
SQL_LOG_BIN
=
1
;
# Clean up.
--
connection
server_1
...
...
sql/rpl_mi.cc
View file @
e5b60f0a
...
...
@@ -143,6 +143,7 @@ void init_master_log_pos(Master_info* mi)
mi
->
master_log_name
[
0
]
=
0
;
mi
->
master_log_pos
=
BIN_LOG_HEADER_SIZE
;
// skip magic number
mi
->
using_gtid
=
false
;
/* Intentionally init ssl_verify_server_cert to 0, no option available */
mi
->
ssl_verify_server_cert
=
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