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
b9673a64
Commit
b9673a64
authored
Nov 19, 2019
by
Will DeVries
Committed by
Sergei Petrunia
Mar 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Always mark committed and rolled back transactions closed.
parent
bdaffefd
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
12 deletions
+12
-12
mysql-test/suite/clustrixdb/update.result
mysql-test/suite/clustrixdb/update.result
+3
-3
mysql-test/suite/clustrixdb/update.test
mysql-test/suite/clustrixdb/update.test
+3
-3
storage/clustrixdb/clustrix_connection.cc
storage/clustrixdb/clustrix_connection.cc
+6
-6
No files found.
mysql-test/suite/clustrixdb/update.result
View file @
b9673a64
...
...
@@ -6,18 +6,18 @@ Note 1051 Unknown table 'db1.t1'
CREATE TABLE `t1`(i BIGINT, t TEXT)ENGINE=clustrixdb;
INSERT INTO `t1` (i, t) VALUES (42, 'один');
INSERT INTO `t1` (i, t) VALUES (42, 'ноль');
SELECT * FROM `t1` ORDER BY `i`;
SELECT * FROM `t1` ORDER BY `i`
DESC, `t` DESC
;
i t
42 один
42 ноль
UPDATE `t1` SET i=i+1,t='два' WHERE t='один';
SELECT * FROM `t1` ORDER BY `i`;
SELECT * FROM `t1` ORDER BY `i`
DESC, `t` DESC
;
i t
42 один
42 ноль
USE test;
UPDATE `db1`.`t1` SET i=i+1,t='три' WHERE t='два';
SELECT * FROM `db1`.`t1` ORDER BY `i`;
SELECT * FROM `db1`.`t1` ORDER BY `i`
DESC, `t` DESC
;
i t
42 один
42 ноль
...
...
mysql-test/suite/clustrixdb/update.test
View file @
b9673a64
...
...
@@ -4,14 +4,14 @@ DROP TABLE IF EXISTS `t1`;
CREATE
TABLE
`t1`
(
i
BIGINT
,
t
TEXT
)
ENGINE
=
clustrixdb
;
INSERT
INTO
`t1`
(
i
,
t
)
VALUES
(
42
,
'один'
);
INSERT
INTO
`t1`
(
i
,
t
)
VALUES
(
42
,
'ноль'
);
SELECT
*
FROM
`t1`
ORDER
BY
`i`
;
SELECT
*
FROM
`t1`
ORDER
BY
`i`
DESC
,
`t`
DESC
;
UPDATE
`t1`
SET
i
=
i
+
1
,
t
=
'два'
WHERE
t
=
'один'
;
SELECT
*
FROM
`t1`
ORDER
BY
`i`
;
SELECT
*
FROM
`t1`
ORDER
BY
`i`
DESC
,
`t`
DESC
;
USE
test
;
UPDATE
`db1`
.
`t1`
SET
i
=
i
+
1
,
t
=
'три'
WHERE
t
=
'два'
;
SELECT
*
FROM
`db1`
.
`t1`
ORDER
BY
`i`
;
SELECT
*
FROM
`db1`
.
`t1`
ORDER
BY
`i`
DESC
,
`t`
DESC
;
DROP
TABLE
`db1`
.
`t1`
;
...
...
storage/clustrixdb/clustrix_connection.cc
View file @
b9673a64
...
...
@@ -228,14 +228,14 @@ bool clustrix_connection::commit_transaction()
DBUG_ENTER
(
"clustrix_connection::commit_transaction"
);
assert
(
has_transaction
);
has_transaction
=
FALSE
;
has_anonymous_savepoint
=
FALSE
;
if
(
commit_flag_next
&
CLUSTRIX_TRANS_BEGIN
)
{
commit_flag_next
&=
~
CLUSTRIX_TRANS_BEGIN
;
DBUG_RETURN
(
FALSE
);
}
commit_flag_next
|=
CLUSTRIX_TRANS_COMMIT
;
has_transaction
=
FALSE
;
has_anonymous_savepoint
=
FALSE
;
DBUG_RETURN
(
TRUE
);
}
...
...
@@ -244,14 +244,14 @@ bool clustrix_connection::rollback_transaction()
DBUG_ENTER
(
"clustrix_connection::rollback_transaction"
);
assert
(
has_transaction
);
has_transaction
=
FALSE
;
has_anonymous_savepoint
=
FALSE
;
if
(
commit_flag_next
&
CLUSTRIX_TRANS_BEGIN
)
{
commit_flag_next
&=
~
CLUSTRIX_TRANS_BEGIN
;
DBUG_RETURN
(
FALSE
);
}
commit_flag_next
|=
CLUSTRIX_TRANS_ROLLBACK
;
has_transaction
=
FALSE
;
has_anonymous_savepoint
=
FALSE
;
DBUG_RETURN
(
TRUE
);
}
...
...
@@ -287,12 +287,12 @@ bool clustrix_connection::release_anonymous_savepoint()
assert
(
has_transaction
);
assert
(
has_anonymous_savepoint
);
has_anonymous_savepoint
=
FALSE
;
if
(
commit_flag_next
&
CLUSTRIX_STMT_NEW
)
{
commit_flag_next
&=
~
CLUSTRIX_STMT_NEW
;
DBUG_RETURN
(
FALSE
);
}
has_anonymous_savepoint
=
FALSE
;
DBUG_RETURN
(
TRUE
);
}
...
...
@@ -302,13 +302,13 @@ bool clustrix_connection::rollback_to_anonymous_savepoint()
assert
(
has_transaction
);
assert
(
has_anonymous_savepoint
);
has_anonymous_savepoint
=
FALSE
;
if
(
commit_flag_next
&
CLUSTRIX_STMT_NEW
)
{
commit_flag_next
&=
~
CLUSTRIX_STMT_NEW
;
DBUG_RETURN
(
FALSE
);
}
commit_flag_next
|=
CLUSTRIX_STMT_ROLLBACK
;
has_anonymous_savepoint
=
FALSE
;
DBUG_RETURN
(
TRUE
);
}
...
...
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