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
ccd39b2d
Commit
ccd39b2d
authored
Aug 20, 2015
by
Nirbhay Choubey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backport partition tests from 10.0-galera.
parent
98bebad6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
101 additions
and
0 deletions
+101
-0
mysql-test/suite/galera/r/galera_var_load_data_splitting.result
...test/suite/galera/r/galera_var_load_data_splitting.result
+9
-0
mysql-test/suite/galera/r/partition.result
mysql-test/suite/galera/r/partition.result
+23
-0
mysql-test/suite/galera/t/galera_var_load_data_splitting.test
...l-test/suite/galera/t/galera_var_load_data_splitting.test
+38
-0
mysql-test/suite/galera/t/partition.test
mysql-test/suite/galera/t/partition.test
+31
-0
No files found.
mysql-test/suite/galera/r/galera_var_load_data_splitting.result
0 → 100644
View file @
ccd39b2d
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
SET GLOBAL wsrep_load_data_splitting = TRUE;
SELECT COUNT(*) = 95000 FROM t1;
COUNT(*) = 95000
1
wsrep_last_committed_diff
1
SET GLOBAL wsrep_load_data_splitting = 1;;
DROP TABLE t1;
mysql-test/suite/galera/r/partition.result
0 → 100644
View file @
ccd39b2d
#
# MDEV#4953 Galera: DELETE from a partitioned table is not replicated
#
USE test;
CREATE TABLE t1 (pk INT PRIMARY KEY, i INT) ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2;
INSERT INTO t1 VALUES (1,100), (2,200);
SELECT * FROM t1;
pk i
2 200
1 100
DELETE FROM t1;
SELECT * FROM t1;
pk i
# On node_1
SELECT * FROM t1;
pk i
# On node_2
SELECT * FROM t1;
pk i
DROP TABLE t1;
# End of test
mysql-test/suite/galera/t/galera_var_load_data_splitting.test
0 → 100644
View file @
ccd39b2d
--
source
include
/
galera_cluster
.
inc
--
source
include
/
have_innodb
.
inc
--
let
$wsrep_load_data_splitting_orig
=
`SELECT @@wsrep_load_data_splitting`
# Create a file for LOAD DATA with 95K entries
--
perl
open
(
FILE
,
">"
,
"
$ENV
{
'MYSQLTEST_VARDIR'
}
/tmp/galera_var_load_data_splitting.csv"
)
or
die
;
foreach
my
$i
(
1.
.
95000
)
{
print
FILE
"
$i
\n
"
;
}
EOF
CREATE
TABLE
t1
(
f1
INTEGER
PRIMARY
KEY
)
ENGINE
=
InnoDB
;
# Record wsrep_last_committed as it was before LOAD DATA
--
connection
node_2
--
let
$wsrep_last_committed_before
=
`SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
SET
GLOBAL
wsrep_load_data_splitting
=
TRUE
;
--
disable_query_log
--
eval
LOAD
DATA
INFILE
'$MYSQLTEST_VARDIR/tmp/galera_var_load_data_splitting.csv'
INTO
TABLE
t1
;
--
enable_query_log
--
connection
node_2
--
let
$wsrep_last_committed_after
=
`SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
SELECT
COUNT
(
*
)
=
95000
FROM
t1
;
# LOAD-ing 95K rows causes 10 commits to be registered
--
disable_query_log
--
eval
SELECT
$wsrep_last_committed_after
=
$wsrep_last_committed_before
+
10
AS
wsrep_last_committed_diff
;
--
enable_query_log
--
connection
node_1
--
eval
SET
GLOBAL
wsrep_load_data_splitting
=
$wsrep_load_data_splitting_orig
;
DROP
TABLE
t1
;
mysql-test/suite/galera/t/partition.test
0 → 100644
View file @
ccd39b2d
--
source
include
/
galera_cluster
.
inc
--
source
include
/
have_innodb
.
inc
--
source
include
/
have_partition
.
inc
--
echo
#
--
echo
# MDEV#4953 Galera: DELETE from a partitioned table is not replicated
--
echo
#
USE
test
;
CREATE
TABLE
t1
(
pk
INT
PRIMARY
KEY
,
i
INT
)
ENGINE
=
INNODB
PARTITION
BY
HASH
(
pk
)
PARTITIONS
2
;
INSERT
INTO
t1
VALUES
(
1
,
100
),
(
2
,
200
);
SELECT
*
FROM
t1
;
DELETE
FROM
t1
;
SELECT
*
FROM
t1
;
--
echo
--
echo
# On node_1
--
connection
node_1
SELECT
*
FROM
t1
;
--
echo
--
echo
# On node_2
--
connection
node_2
SELECT
*
FROM
t1
;
# Cleanup
DROP
TABLE
t1
;
--
source
include
/
galera_end
.
inc
--
echo
# End of test
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