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
f1a6d24a
Commit
f1a6d24a
authored
Jun 21, 2017
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-11003 ndb test suite still exists and does not work
fix a merge mistake
parent
3f240bff
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
103 deletions
+0
-103
mysql-test/suite/ndb/r/ndb_restore_discover.result
mysql-test/suite/ndb/r/ndb_restore_discover.result
+0
-33
mysql-test/suite/ndb/t/ndb_restore_discover.test
mysql-test/suite/ndb/t/ndb_restore_discover.test
+0
-70
No files found.
mysql-test/suite/ndb/r/ndb_restore_discover.result
deleted
100644 → 0
View file @
3f240bff
#
# 18075170 - sql node restart required to avoid deadlock after
# restore
#
CREATE TABLE t1 (id INT) ENGINE=NDBCluster;
CREATE TABLE t2 (id INT) ENGINE=NDBCluster;
INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1);
DROP TABLE t1;
DROP TABLE t2;
SET autocommit = 0;
SELECT * FROM t1;
id
1
SELECT * FROM t2;
id
1
ROLLBACK;
SET autocommit = 1;
drop table t1;
drop table t2;
SET autocommit = 0;
SELECT * FROM t1;
id
1
SELECT * FROM t2;
id
1
ALTER TABLE t1 ADD val INT;
ROLLBACK;
SET autocommit = 1;
drop table t1;
drop table t2;
mysql-test/suite/ndb/t/ndb_restore_discover.test
deleted
100644 → 0
View file @
3f240bff
--
source
include
/
have_ndb
.
inc
--
source
include
/
count_sessions
.
inc
--
echo
#
--
echo
# 18075170 - sql node restart required to avoid deadlock after
--
echo
# restore
--
echo
#
# Test Auto Discover option within a transaction
# and make sure the transaction is not broken.
CREATE
TABLE
t1
(
id
INT
)
ENGINE
=
NDBCluster
;
CREATE
TABLE
t2
(
id
INT
)
ENGINE
=
NDBCluster
;
INSERT
INTO
t1
VALUES
(
1
);
INSERT
INTO
t2
VALUES
(
1
);
--
source
include
/
ndb_backup
.
inc
DROP
TABLE
t1
;
DROP
TABLE
t2
;
--
source
include
/
ndb_restore_master
.
inc
SET
autocommit
=
0
;
SELECT
*
FROM
t1
;
# Without fix below select was resulting in DEADLOCK error. With fix select
# should succeed.
SELECT
*
FROM
t2
;
ROLLBACK
;
SET
autocommit
=
1
;
drop
table
t1
;
drop
table
t2
;
#
# Checking lock preservation in transaction
#
# Using existing backup to create the scenario. Tables are deleted as part of
# above test cleanup. Thus restoring the backup will bring the system to
# required state.
--
source
include
/
ndb_restore_master
.
inc
SET
autocommit
=
0
;
SELECT
*
FROM
t1
;
SELECT
*
FROM
t2
;
connect
(
con2
,
localhost
,
root
);
--
SEND
ALTER
TABLE
t1
ADD
val
INT
connection
default
;
# Alter from con2 will be in waiting state as there is a lock on t1 from
# default connection due to active transaction. We check for this condition
# then releasing the lock by rollbacking active transaction.
let
$wait_condition
=
SELECT
count
(
*
)
=
1
FROM
information_schema
.
processlist
WHERE
state
LIKE
"Waiting%"
AND
info
=
"ALTER TABLE t1 ADD val INT"
;
--
source
include
/
wait_condition
.
inc
ROLLBACK
;
SET
autocommit
=
1
;
connection
con2
;
--
REAP
disconnect
con2
;
connection
default
;
drop
table
t1
;
drop
table
t2
;
# Wait till all disconnects are completed
--
source
include
/
wait_until_count_sessions
.
inc
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