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
86e57eaa
Commit
86e57eaa
authored
Nov 24, 2017
by
Marko Mäkelä
Committed by
Aleksey Midenkov
Nov 27, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove upd_node_t::versioned
parent
0b89a42f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
40 deletions
+22
-40
storage/innobase/handler/ha_innodb.cc
storage/innobase/handler/ha_innodb.cc
+19
-33
storage/innobase/include/row0upd.h
storage/innobase/include/row0upd.h
+0
-2
storage/innobase/row/row0mysql.cc
storage/innobase/row/row0mysql.cc
+3
-3
storage/innobase/row/row0upd.cc
storage/innobase/row/row0upd.cc
+0
-2
No files found.
storage/innobase/handler/ha_innodb.cc
View file @
86e57eaa
...
...
@@ -8639,7 +8639,6 @@ calc_row_difference(
doc_id_t
doc_id
=
FTS_NULL_DOC_ID
;
ulint
num_v
=
0
;
uint
n_fields
=
mysql_fields
(
table
);
bool
table_versioned
=
prebuilt
->
table
->
versioned
();
ut_ad
(
!
srv_read_only_mode
);
...
...
@@ -8649,9 +8648,6 @@ calc_row_difference(
/* We use upd_buff to convert changed fields */
buf
=
(
byte
*
)
upd_buff
;
prebuilt
->
upd_node
->
versioned
=
false
;
prebuilt
->
upd_node
->
vers_delete
=
false
;
for
(
i
=
0
;
i
<
n_fields
;
i
++
)
{
field
=
table
->
field
[
i
];
bool
is_virtual
=
innobase_is_v_fld
(
field
);
...
...
@@ -8890,11 +8886,6 @@ calc_row_difference(
}
n_changed
++
;
if
(
table_versioned
&&
!
field
->
vers_update_unversioned
())
{
prebuilt
->
upd_node
->
versioned
=
true
;
}
/* If an FTS indexed column was changed by this
UPDATE then we need to inform the FTS sub-system.
...
...
@@ -8999,10 +8990,6 @@ calc_row_difference(
innodb_table
,
ufield
,
&
trx
->
fts_next_doc_id
);
++
n_changed
;
if
(
table_versioned
&&
!
field
->
vers_update_unversioned
())
{
prebuilt
->
upd_node
->
versioned
=
true
;
}
}
else
{
/* We have a Doc ID column, but none of FTS indexed
columns are touched, nor the Doc ID column, so set
...
...
@@ -9159,8 +9146,6 @@ ha_innobase::update_row(
upd_t
*
uvect
=
row_get_prebuilt_update_vector
(
m_prebuilt
);
ib_uint64_t
autoinc
;
bool
vers_set_fields
=
false
;
bool
vers_ins_row
=
false
;
/* Build an update vector from the modified fields in the rows
(uses m_upd_buf of the handle) */
...
...
@@ -9183,29 +9168,30 @@ ha_innobase::update_row(
/* This is not a delete */
m_prebuilt
->
upd_node
->
is_delete
=
FALSE
;
m_prebuilt
->
upd_node
->
vers_delete
=
false
;
innobase_srv_conc_enter_innodb
(
m_prebuilt
);
if
(
!
table
->
versioned_write
())
{
m_prebuilt
->
upd_node
->
versioned
=
false
;
}
{
bool
vers_ins_row
=
false
;
const
bool
vers_set_fields
=
table
->
versioned_write
()
&&
m_prebuilt
->
upd_node
->
update
->
affects_versioned
();
if
(
m_prebuilt
->
upd_node
->
versioned
)
{
vers_set_fields
=
true
;
if
(
thd_sql_command
(
m_user_thd
)
==
SQLCOM_ALTER_TABLE
&&
!
table
->
s
->
vtmd
)
{
m_prebuilt
->
upd_node
->
vers_delete
=
true
;
}
else
{
m_prebuilt
->
upd_node
->
vers_delete
=
false
;
vers_ins_row
=
true
;
if
(
vers_set_fields
)
{
vers_ins_row
=
table
->
s
->
vtmd
||
thd_sql_command
(
m_user_thd
)
!=
SQLCOM_ALTER_TABLE
;
m_prebuilt
->
upd_node
->
vers_delete
=
!
vers_ins_row
;
}
}
error
=
row_update_for_mysql
(
m_prebuilt
,
vers_set_fields
);
innobase_srv_conc_enter_innodb
(
m_prebuilt
);
error
=
row_update_for_mysql
(
m_prebuilt
,
vers_set_fields
);
if
(
error
==
DB_SUCCESS
&&
vers_ins_row
)
{
if
(
trx
->
id
!=
static_cast
<
trx_id_t
>
(
table
->
vers_start_field
()
->
val_int
()))
{
error
=
row_insert_for_mysql
((
byte
*
)
old_row
,
m_prebuilt
,
ROW_INS_HISTORICAL
);
if
(
error
==
DB_SUCCESS
&&
vers_ins_row
&&
trx
->
id
!=
static_cast
<
trx_id_t
>
(
table
->
vers_start_field
()
->
val_int
()))
{
error
=
row_insert_for_mysql
((
byte
*
)
old_row
,
m_prebuilt
,
ROW_INS_HISTORICAL
);
}
}
...
...
storage/innobase/include/row0upd.h
View file @
86e57eaa
...
...
@@ -585,8 +585,6 @@ struct upd_node_t{
compilation; speeds up execution:
UPD_NODE_NO_ORD_CHANGE and
UPD_NODE_NO_SIZE_CHANGE, ORed */
/** working with system versioned table */
bool
versioned
;
/** set sys_trx_end = CUR_TRX_ID */
bool
vers_delete
;
/*----------------------*/
...
...
storage/innobase/row/row0mysql.cc
View file @
86e57eaa
...
...
@@ -2006,8 +2006,7 @@ row_update_for_mysql(
thr
->
fk_cascade_depth
=
0
;
run_again:
if
(
vers_set_fields
)
{
if
(
vers_set_fields
)
{
/* System Versioning: modify update vector to set
sys_trx_start (or sys_trx_end in case of DELETE)
to current trx_id. */
...
...
@@ -2143,7 +2142,8 @@ row_update_for_mysql(
cascade_upd_nodes
->
pop_front
();
thr
->
fk_cascade_depth
++
;
vers_set_fields
=
node
->
table
->
versioned
()
&&
(
node
->
is_delete
||
node
->
versioned
);
&&
(
node
->
is_delete
||
node
->
update
->
affects_versioned
());
goto
run_again
;
}
...
...
storage/innobase/row/row0upd.cc
View file @
86e57eaa
...
...
@@ -493,8 +493,6 @@ upd_node_create(
node
->
common
.
type
=
QUE_NODE_UPDATE
;
node
->
state
=
UPD_NODE_UPDATE_CLUSTERED
;
node
->
heap
=
mem_heap_create
(
128
);
node
->
cmpl_info
=
0
;
node
->
versioned
=
false
;
node
->
magic_n
=
UPD_NODE_MAGIC_N
;
return
(
node
);
...
...
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