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
b476c944
Commit
b476c944
authored
Nov 08, 2023
by
Julius Goryavsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-30456: post-review changes
parent
1fd16b89
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
13 deletions
+17
-13
mysql-test/suite/galera/r/galera_alter_table_algorithm.result
...l-test/suite/galera/r/galera_alter_table_algorithm.result
+6
-6
mysql-test/suite/galera/t/galera_alter_table_algorithm.cnf
mysql-test/suite/galera/t/galera_alter_table_algorithm.cnf
+0
-1
mysql-test/suite/galera/t/galera_alter_table_algorithm.test
mysql-test/suite/galera/t/galera_alter_table_algorithm.test
+8
-4
sql/sql_alter.h
sql/sql_alter.h
+3
-2
No files found.
mysql-test/suite/galera/r/galera_alter_table_algorithm.result
View file @
b476c944
...
...
@@ -12,11 +12,11 @@ connection node_1;
ALTER TABLE t1 ADD COLUMN f2 INTEGER, ALGORITHM=INSTANT;
show binlog events limit 1 offset 4;
Log_name Pos Event_type Server_id End_log_pos Info
binlog.000001 367 Query 1 489
use `test`; ALTER TABLE t1 ADD COLUMN f2 INTEGER, ALGORITHM=INSTANT
LOG_NAME POS Query SERVER_ID END_LOG_POS
use `test`; ALTER TABLE t1 ADD COLUMN f2 INTEGER, ALGORITHM=INSTANT
connection node_2;
show binlog events limit 1 offset 4;
Log_name Pos Event_type Server_id End_log_pos Info
binlog.000001 367 Query 1 489
use `test`; ALTER TABLE t1 ADD COLUMN f2 INTEGER, ALGORITHM=INSTANT
LOG_NAME POS Query SERVER_ID END_LOG_POS
use `test`; ALTER TABLE t1 ADD COLUMN f2 INTEGER, ALGORITHM=INSTANT
connection node_1;
set global wsrep_on=OFF;
reset master;
...
...
@@ -30,11 +30,11 @@ SET SESSION alter_algorithm='INSTANT';
ALTER TABLE t1 ADD COLUMN f3 INTEGER;
show binlog events limit 1 offset 4;
Log_name Pos Event_type Server_id End_log_pos Info
binlog.000001 367 Query 1 470
use `test`; ALTER TABLE t1 ADD COLUMN f3 INTEGER
LOG_NAME POS Query SERVER_ID END_LOG_POS
use `test`; ALTER TABLE t1 ADD COLUMN f3 INTEGER
connection node_2;
show binlog events limit 1 offset 4;
Log_name Pos Event_type Server_id End_log_pos Info
binlog.000001 367 Query 1 489
use `test`; ALTER TABLE t1 ADD COLUMN f3 INTEGER ,ALGORITHM=INSTANT
LOG_NAME POS Query SERVER_ID END_LOG_POS
use `test`; ALTER TABLE t1 ADD COLUMN f3 INTEGER ,ALGORITHM=INSTANT
connection node_1;
set global wsrep_on=OFF;
reset master;
...
...
@@ -48,11 +48,11 @@ SET SESSION alter_algorithm='INSTANT';
ALTER TABLE t1 ADD COLUMN f4 INTEGER, ALGORITHM=COPY;
show binlog events limit 1 offset 4;
Log_name Pos Event_type Server_id End_log_pos Info
binlog.000001 367 Query 1 486
use `test`; ALTER TABLE t1 ADD COLUMN f4 INTEGER, ALGORITHM=COPY
LOG_NAME POS Query SERVER_ID END_LOG_POS
use `test`; ALTER TABLE t1 ADD COLUMN f4 INTEGER, ALGORITHM=COPY
connection node_2;
show binlog events limit 1 offset 4;
Log_name Pos Event_type Server_id End_log_pos Info
binlog.000001 367 Query 1 486
use `test`; ALTER TABLE t1 ADD COLUMN f4 INTEGER, ALGORITHM=COPY
LOG_NAME POS Query SERVER_ID END_LOG_POS
use `test`; ALTER TABLE t1 ADD COLUMN f4 INTEGER, ALGORITHM=COPY
connection node_1;
DROP TABLE t1;
set global wsrep_on=OFF;
...
...
mysql-test/suite/galera/t/galera_alter_table_algorithm.cnf
View file @
b476c944
...
...
@@ -7,4 +7,3 @@ log_bin=binlog
[mysqld.2]
log_slave_updates=ON
log_bin=binlog
mysql-test/suite/galera/t/galera_alter_table_algorithm.test
View file @
b476c944
...
...
@@ -2,10 +2,10 @@
--
source
include
/
have_innodb
.
inc
#
# Test
# Test
#
CREATE
TABLE
t1
(
f1
INTEGER
)
ENGINE
=
InnoDB
;
CREATE
TABLE
t1
(
f1
INTEGER
)
ENGINE
=
InnoDB
;
set
global
wsrep_on
=
OFF
;
reset
master
;
...
...
@@ -18,9 +18,11 @@ set global wsrep_on=ON;
--
connection
node_1
ALTER
TABLE
t1
ADD
COLUMN
f2
INTEGER
,
ALGORITHM
=
INSTANT
;
--
replace_column
1
LOG_NAME
2
POS
4
SERVER_ID
5
END_LOG_POS
show
binlog
events
limit
1
offset
4
;
--
connection
node_2
--
replace_column
1
LOG_NAME
2
POS
4
SERVER_ID
5
END_LOG_POS
show
binlog
events
limit
1
offset
4
;
...
...
@@ -39,9 +41,11 @@ set global wsrep_on=ON;
--
connection
node_1
SET
SESSION
alter_algorithm
=
'INSTANT'
;
ALTER
TABLE
t1
ADD
COLUMN
f3
INTEGER
;
--
replace_column
1
LOG_NAME
2
POS
4
SERVER_ID
5
END_LOG_POS
show
binlog
events
limit
1
offset
4
;
--
connection
node_2
--
replace_column
1
LOG_NAME
2
POS
4
SERVER_ID
5
END_LOG_POS
show
binlog
events
limit
1
offset
4
;
...
...
@@ -60,9 +64,11 @@ set global wsrep_on=ON;
--
connection
node_1
SET
SESSION
alter_algorithm
=
'INSTANT'
;
ALTER
TABLE
t1
ADD
COLUMN
f4
INTEGER
,
ALGORITHM
=
COPY
;
--
replace_column
1
LOG_NAME
2
POS
4
SERVER_ID
5
END_LOG_POS
show
binlog
events
limit
1
offset
4
;
--
connection
node_2
--
replace_column
1
LOG_NAME
2
POS
4
SERVER_ID
5
END_LOG_POS
show
binlog
events
limit
1
offset
4
;
...
...
@@ -78,5 +84,3 @@ set global wsrep_on=ON;
set
global
wsrep_on
=
OFF
;
reset
master
;
set
global
wsrep_on
=
ON
;
sql/sql_alter.h
View file @
b476c944
...
...
@@ -106,9 +106,10 @@ class Alter_info
List
<
const
char
>
partition_names
;
// Number of partitions.
uint
num_parts
;
#ifndef WITH_WSREP
private:
#
ifdef WITH_WSREP
/* wsrep patch needs to p
ea
k the algorithm clause used in ALTER statement
#
else
/* wsrep patch needs to p
ic
k the algorithm clause used in ALTER statement
in order to see if ALTER statement needs to be rewritten for replication
*/
public:
...
...
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