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
92d6bd72
Commit
92d6bd72
authored
Nov 29, 2017
by
Marko Mäkelä
Committed by
Aleksey Midenkov
Dec 04, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor InnoDB cleanup (follow-up to #337)
parent
5bf14f93
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
20 deletions
+20
-20
storage/innobase/handler/ha_innodb.cc
storage/innobase/handler/ha_innodb.cc
+9
-11
storage/innobase/include/row0mysql.h
storage/innobase/include/row0mysql.h
+7
-7
storage/innobase/row/row0mysql.cc
storage/innobase/row/row0mysql.cc
+4
-2
No files found.
storage/innobase/handler/ha_innodb.cc
View file @
92d6bd72
...
...
@@ -9167,9 +9167,6 @@ ha_innobase::update_row(
DB_FORCED_ABORT
,
0
,
m_user_thd
));
}
/* This is not a delete */
m_prebuilt
->
upd_node
->
is_delete
=
NO_DELETE
;
{
const
bool
vers_set_fields
=
m_prebuilt
->
versioned_write
&&
m_prebuilt
->
upd_node
->
update
->
affects_versioned
();
...
...
@@ -9177,8 +9174,11 @@ ha_innobase::update_row(
&&
(
table
->
s
->
vtmd
||
thd_sql_command
(
m_user_thd
)
!=
SQLCOM_ALTER_TABLE
);
if
(
vers_set_fields
&&
!
vers_ins_row
)
m_prebuilt
->
upd_node
->
is_delete
=
VERSIONED_DELETE
;
/* This is not a delete */
m_prebuilt
->
upd_node
->
is_delete
=
vers_set_fields
&&
!
vers_ins_row
?
VERSIONED_DELETE
:
NO_DELETE
;
innobase_srv_conc_enter_innodb
(
m_prebuilt
);
...
...
@@ -9301,12 +9301,10 @@ ha_innobase::delete_row(
}
/* This is a delete */
if
(
table
->
versioned_write
()
&&
table
->
vers_end_field
()
->
is_max
())
{
m_prebuilt
->
upd_node
->
is_delete
=
VERSIONED_DELETE
;
}
else
{
m_prebuilt
->
upd_node
->
is_delete
=
PLAIN_DELETE
;
}
m_prebuilt
->
upd_node
->
is_delete
=
table
->
versioned_write
()
&&
table
->
vers_end_field
()
->
is_max
()
?
VERSIONED_DELETE
:
PLAIN_DELETE
;
innobase_srv_conc_enter_innodb
(
m_prebuilt
);
...
...
storage/innobase/include/row0mysql.h
View file @
92d6bd72
...
...
@@ -860,16 +860,16 @@ struct row_prebuilt_t {
/** The MySQL table object */
TABLE
*
m_mysql_table
;
/** Get template by
column
number */
/** Get template by
dict_table_t::cols[]
number */
const
mysql_row_templ_t
*
get_template_by_col
(
ulint
col
)
const
{
ut_a
(
col
<
n_template
);
ut_a
(
mysql_template
);
for
(
int
i
=
col
;
i
<
n_template
;
++
i
)
{
const
mysql_row_templ_t
*
templ
=
mysql_template
+
i
;
if
(
!
templ
->
is_virtual
&&
templ
->
col_no
==
col
)
ut_ad
(
col
<
n_template
);
ut_ad
(
mysql_template
);
for
(
int
i
=
col
;
i
<
n_template
;
++
i
)
{
const
mysql_row_templ_t
*
templ
=
&
mysql_template
[
i
];
if
(
!
templ
->
is_virtual
&&
templ
->
col_no
==
col
)
{
return
templ
;
}
}
return
NULL
;
}
...
...
storage/innobase/row/row0mysql.cc
View file @
92d6bd72
...
...
@@ -1518,7 +1518,8 @@ row_insert_for_mysql(
/* Return back modified fields into mysql_rec, so that
upper logic may benefit from it (f.ex. 'on duplicate key'). */
const
mysql_row_templ_t
*
t
=
prebuilt
->
get_template_by_col
(
table
->
vers_end
);
ut_ad
(
t
&&
t
->
mysql_col_len
==
8
);
ut_ad
(
t
);
ut_ad
(
t
->
mysql_col_len
==
8
);
if
(
ins_mode
==
ROW_INS_HISTORICAL
)
{
set_tuple_col_8
(
node
->
row
,
table
->
vers_end
,
trx
->
id
,
node
->
vers_end_buf
);
...
...
@@ -1527,7 +1528,8 @@ row_insert_for_mysql(
set_tuple_col_8
(
node
->
row
,
table
->
vers_end
,
TRX_ID_MAX
,
node
->
vers_end_buf
);
int8store
(
&
mysql_rec
[
t
->
mysql_col_offset
],
TRX_ID_MAX
);
t
=
prebuilt
->
get_template_by_col
(
table
->
vers_start
);
ut_ad
(
t
&&
t
->
mysql_col_len
==
8
);
ut_ad
(
t
);
ut_ad
(
t
->
mysql_col_len
==
8
);
set_tuple_col_8
(
node
->
row
,
table
->
vers_start
,
trx
->
id
,
node
->
vers_start_buf
);
int8store
(
&
mysql_rec
[
t
->
mysql_col_offset
],
trx
->
id
);
}
...
...
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