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
97d7edff
Commit
97d7edff
authored
6 months ago
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix a typo and an old bug in prefschema.transaction test
parent
7b669c4d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
16 deletions
+13
-16
mysql-test/suite/perfschema/r/transaction.result
mysql-test/suite/perfschema/r/transaction.result
+8
-10
mysql-test/suite/perfschema/t/transaction.test
mysql-test/suite/perfschema/t/transaction.test
+4
-6
sql/log.cc
sql/log.cc
+1
-0
No files found.
mysql-test/suite/perfschema/r/transaction.result
View file @
97d7edff
...
@@ -408,8 +408,6 @@ CALL clear_transaction_tables();
...
@@ -408,8 +408,6 @@ CALL clear_transaction_tables();
# STEP 8 - TRANSACTIONAL AND NON-TRANSACTIONAL TABLES
# STEP 8 - TRANSACTIONAL AND NON-TRANSACTIONAL TABLES
# ========================================================================
# ========================================================================
#
#
## MariaDB bug: MDEV-6012? MDEV-14436?
set @mariadb_bug=1;
connection con1;
connection con1;
SET SESSION AUTOCOMMIT = 0;
SET SESSION AUTOCOMMIT = 0;
SELECT * FROM performance_schema.events_transactions_current ORDER BY event_id;
SELECT * FROM performance_schema.events_transactions_current ORDER BY event_id;
...
@@ -422,17 +420,17 @@ INSERT INTO nt1 VALUES (801, 'NON-TRANSACTIONAL');
...
@@ -422,17 +420,17 @@ INSERT INTO nt1 VALUES (801, 'NON-TRANSACTIONAL');
#
#
## Expect 0 transactions in events_transactions_current
## Expect 0 transactions in events_transactions_current
connection default;
connection default;
CALL transaction_verifier(0, @con1_thread_id, 'transaction', '', 0, '', '', '', '', '', '', '', 0, 0, 0,
@mariadb_bug
);
CALL transaction_verifier(0, @con1_thread_id, 'transaction', '', 0, '', '', '', '', '', '', '', 0, 0, 0,
0
);
ACTUAL EXPECTED
ACTUAL EXPECTED
1 1
0 0
connection con1;
connection con1;
COMMIT;
COMMIT;
#
#
## Expect 0 transactions in events_transactions_history
## Expect 0 transactions in events_transactions_history
connection default;
connection default;
CALL transaction_verifier(1, @con1_thread_id, 'transaction', '', 0, '', '', '', '', '', '', '', 0, 0, 0,
@mariadb_bug
);
CALL transaction_verifier(1, @con1_thread_id, 'transaction', '', 0, '', '', '', '', '', '', '', 0, 0, 0,
0
);
ACTUAL EXPECTED
ACTUAL EXPECTED
1 1
0 0
#
#
#
#
# STEP 8.2 - UPDATE TRANSACTIONAL AND NON-TRANSACTIONAL TABLES
# STEP 8.2 - UPDATE TRANSACTIONAL AND NON-TRANSACTIONAL TABLES
...
@@ -445,9 +443,9 @@ INSERT INTO nt1 VALUES (802, 'NON-TRANSACTIONAL');
...
@@ -445,9 +443,9 @@ INSERT INTO nt1 VALUES (802, 'NON-TRANSACTIONAL');
#
#
## Expect 0 transactions in events_transactions_current
## Expect 0 transactions in events_transactions_current
connection default;
connection default;
CALL transaction_verifier(0, @con1_thread_id, 'transaction', '', 0, '', '', '', '', '', '', '', 0, 0, 0,
@mariadb_bug
);
CALL transaction_verifier(0, @con1_thread_id, 'transaction', '', 0, '', '', '', '', '', '', '', 0, 0, 0,
0
);
ACTUAL EXPECTED
ACTUAL EXPECTED
1 1
0 0
#
#
## Now transactional. Transaction should be started.
## Now transactional. Transaction should be started.
connection con1;
connection con1;
...
@@ -467,9 +465,9 @@ connection default;
...
@@ -467,9 +465,9 @@ connection default;
CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
ACTUAL EXPECTED
ACTUAL EXPECTED
1 1
1 1
CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1
+@mariadb_bug
);
CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
ACTUAL EXPECTED
ACTUAL EXPECTED
2 2
1 1
CALL clear_transaction_tables();
CALL clear_transaction_tables();
#
#
# ========================================================================
# ========================================================================
...
...
This diff is collapsed.
Click to expand it.
mysql-test/suite/perfschema/t/transaction.test
View file @
97d7edff
...
@@ -409,8 +409,6 @@ CALL clear_transaction_tables();
...
@@ -409,8 +409,6 @@ CALL clear_transaction_tables();
--
echo
# STEP 8 - TRANSACTIONAL AND NON-TRANSACTIONAL TABLES
--
echo
# STEP 8 - TRANSACTIONAL AND NON-TRANSACTIONAL TABLES
--
echo
# ========================================================================
--
echo
# ========================================================================
--
echo
#
--
echo
#
--
echo
## MariaDB bug: MDEV-6012? MDEV-14436?
set
@
mariadb_bug
=
1
;
## Statements that work with non-transactional engines have no effect on the
## Statements that work with non-transactional engines have no effect on the
## transaction state of the connection. For implicit transactions,
## transaction state of the connection. For implicit transactions,
...
@@ -431,7 +429,7 @@ INSERT INTO nt1 VALUES (801, 'NON-TRANSACTIONAL');
...
@@ -431,7 +429,7 @@ INSERT INTO nt1 VALUES (801, 'NON-TRANSACTIONAL');
--
echo
#
--
echo
#
--
echo
## Expect 0 transactions in events_transactions_current
--
echo
## Expect 0 transactions in events_transactions_current
--
connection
default
--
connection
default
CALL
transaction_verifier
(
0
,
@
con1_thread_id
,
'transaction'
,
''
,
0
,
''
,
''
,
''
,
''
,
''
,
''
,
''
,
0
,
0
,
0
,
@
mariadb_bug
);
CALL
transaction_verifier
(
0
,
@
con1_thread_id
,
'transaction'
,
''
,
0
,
''
,
''
,
''
,
''
,
''
,
''
,
''
,
0
,
0
,
0
,
0
);
--
connection
con1
--
connection
con1
COMMIT
;
COMMIT
;
...
@@ -439,7 +437,7 @@ COMMIT;
...
@@ -439,7 +437,7 @@ COMMIT;
--
echo
#
--
echo
#
--
echo
## Expect 0 transactions in events_transactions_history
--
echo
## Expect 0 transactions in events_transactions_history
--
connection
default
--
connection
default
CALL
transaction_verifier
(
1
,
@
con1_thread_id
,
'transaction'
,
''
,
0
,
''
,
''
,
''
,
''
,
''
,
''
,
''
,
0
,
0
,
0
,
@
mariadb_bug
);
CALL
transaction_verifier
(
1
,
@
con1_thread_id
,
'transaction'
,
''
,
0
,
''
,
''
,
''
,
''
,
''
,
''
,
''
,
0
,
0
,
0
,
0
);
--
echo
#
--
echo
#
--
echo
#
--
echo
#
...
@@ -454,7 +452,7 @@ INSERT INTO nt1 VALUES (802, 'NON-TRANSACTIONAL');
...
@@ -454,7 +452,7 @@ INSERT INTO nt1 VALUES (802, 'NON-TRANSACTIONAL');
--
echo
#
--
echo
#
--
echo
## Expect 0 transactions in events_transactions_current
--
echo
## Expect 0 transactions in events_transactions_current
--
connection
default
--
connection
default
CALL
transaction_verifier
(
0
,
@
con1_thread_id
,
'transaction'
,
''
,
0
,
''
,
''
,
''
,
''
,
''
,
''
,
''
,
0
,
0
,
0
,
@
mariadb_bug
);
CALL
transaction_verifier
(
0
,
@
con1_thread_id
,
'transaction'
,
''
,
0
,
''
,
''
,
''
,
''
,
''
,
''
,
''
,
0
,
0
,
0
,
0
);
--
echo
#
--
echo
#
--
echo
## Now transactional. Transaction should be started.
--
echo
## Now transactional. Transaction should be started.
...
@@ -475,7 +473,7 @@ COMMIT;
...
@@ -475,7 +473,7 @@ COMMIT;
--
echo
## Expect 1 committed transaction in events_transactions_current and history
--
echo
## Expect 1 committed transaction in events_transactions_current and history
--
connection
default
--
connection
default
CALL
transaction_verifier
(
0
,
@
con1_thread_id
,
'transaction'
,
'COMMITTED'
,
0
,
''
,
''
,
''
,
''
,
'READ WRITE'
,
''
,
'NO'
,
0
,
0
,
0
,
1
);
CALL
transaction_verifier
(
0
,
@
con1_thread_id
,
'transaction'
,
'COMMITTED'
,
0
,
''
,
''
,
''
,
''
,
'READ WRITE'
,
''
,
'NO'
,
0
,
0
,
0
,
1
);
CALL
transaction_verifier
(
1
,
@
con1_thread_id
,
'transaction'
,
'COMMITTED'
,
0
,
''
,
''
,
''
,
''
,
'READ WRITE'
,
''
,
'NO'
,
0
,
0
,
0
,
1
+@
mariadb_bug
);
CALL
transaction_verifier
(
1
,
@
con1_thread_id
,
'transaction'
,
'COMMITTED'
,
0
,
''
,
''
,
''
,
''
,
'READ WRITE'
,
''
,
'NO'
,
0
,
0
,
0
,
1
);
CALL
clear_transaction_tables
();
CALL
clear_transaction_tables
();
--
echo
#
--
echo
#
...
...
This diff is collapsed.
Click to expand it.
sql/log.cc
View file @
97d7edff
...
@@ -1648,6 +1648,7 @@ binlog_trans_log_truncate(THD *thd, my_off_t pos)
...
@@ -1648,6 +1648,7 @@ binlog_trans_log_truncate(THD *thd, my_off_t pos)
int
binlog_init
(
void
*
p
)
int
binlog_init
(
void
*
p
)
{
{
binlog_hton
=
(
handlerton
*
)
p
;
binlog_hton
=
(
handlerton
*
)
p
;
binlog_hton
->
db_type
=
DB_TYPE_BINLOG
;
binlog_hton
->
savepoint_offset
=
sizeof
(
my_off_t
);
binlog_hton
->
savepoint_offset
=
sizeof
(
my_off_t
);
binlog_hton
->
close_connection
=
binlog_close_connection
;
binlog_hton
->
close_connection
=
binlog_close_connection
;
binlog_hton
->
savepoint_set
=
binlog_savepoint_set
;
binlog_hton
->
savepoint_set
=
binlog_savepoint_set
;
...
...
This diff is collapsed.
Click to expand it.
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