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
a4439fef
Commit
a4439fef
authored
Nov 14, 2017
by
Aleksey Midenkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SQL: don't update TRT when altered [#305, #302]
Tests affected: main.mysqlcheck
parent
ecf259ca
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
6 deletions
+27
-6
mysql-test/r/mysqlcheck.result
mysql-test/r/mysqlcheck.result
+9
-0
sql/sql_table.cc
sql/sql_table.cc
+1
-1
sql/table.h
sql/table.h
+17
-5
No files found.
mysql-test/r/mysqlcheck.result
View file @
a4439fef
...
...
@@ -31,6 +31,7 @@ mysql.time_zone_leap_second OK
mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.transaction_registry OK
mysql.user OK
mysql.vtmd_template OK
mtr.global_suppressions Table is already up to date
...
...
@@ -66,6 +67,9 @@ mysql.time_zone_leap_second OK
mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.transaction_registry
note : Table does not support optimize, doing recreate + analyze instead
status : OK
mysql.user OK
mysql.vtmd_template
note : Table does not support optimize, doing recreate + analyze instead
...
...
@@ -97,6 +101,7 @@ mysql.time_zone_leap_second OK
mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.transaction_registry OK
mysql.user OK
mysql.vtmd_template OK
mysql.column_stats Table is already up to date
...
...
@@ -130,6 +135,9 @@ mysql.time_zone_leap_second Table is already up to date
mysql.time_zone_name Table is already up to date
mysql.time_zone_transition Table is already up to date
mysql.time_zone_transition_type Table is already up to date
mysql.transaction_registry
note : Table does not support optimize, doing recreate + analyze instead
status : OK
mysql.user Table is already up to date
mysql.vtmd_template
note : Table does not support optimize, doing recreate + analyze instead
...
...
@@ -455,6 +463,7 @@ mysql.time_zone_leap_second Table is already up to date
mysql.time_zone_name Table is already up to date
mysql.time_zone_transition Table is already up to date
mysql.time_zone_transition_type Table is already up to date
mysql.transaction_registry OK
mysql.user Table is already up to date
mysql.vtmd_template OK
mysqltest1.t1
...
...
sql/sql_table.cc
View file @
a4439fef
...
...
@@ -7430,7 +7430,7 @@ static bool mysql_inplace_alter_table(THD *thd,
{
TR_table
trt
(
thd
,
true
);
if
(
table
->
file
->
native_versioned
())
if
(
table
->
file
->
native_versioned
()
&&
trt
!=
*
table_list
)
{
if
(
opt_transaction_registry
&&
trt
.
update
())
return
true
;
...
...
sql/table.h
View file @
a4439fef
...
...
@@ -2961,6 +2961,15 @@ class TR_table: public TABLE_LIST
ulonglong
commit_id1
=
0
,
enum_tx_isolation
iso_level1
=
ISO_READ_UNCOMMITTED
,
ulonglong
commit_id0
=
0
);
enum_tx_isolation
iso_level
()
const
;
void
store_iso_level
(
enum_tx_isolation
iso_level
)
{
DBUG_ASSERT
(
iso_level
<=
ISO_SERIALIZABLE
);
store
(
FLD_ISO_LEVEL
,
iso_level
+
1
);
}
bool
check
();
public:
TABLE
*
operator
->
()
const
{
return
table
;
...
...
@@ -2974,13 +2983,16 @@ class TR_table: public TABLE_LIST
{
return
table
;
}
enum_tx_isolation
iso_level
()
const
;
void
store_iso_level
(
enum_tx_isolation
iso_level
)
bool
operator
==
(
TABLE_LIST
&
subj
)
const
{
DBUG_ASSERT
(
iso_level
<=
ISO_SERIALIZABLE
);
store
(
FLD_ISO_LEVEL
,
iso_level
+
1
);
if
(
0
!=
strcmp
(
db
,
subj
.
db
))
return
false
;
return
(
0
==
strcmp
(
table_name
,
subj
.
table_name
));
}
bool
operator
!=
(
TABLE_LIST
&
subj
)
const
{
return
!
(
*
this
==
subj
);
}
bool
check
();
};
#endif
/* MYSQL_CLIENT */
...
...
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