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
e6748062
Commit
e6748062
authored
Nov 01, 2017
by
Eugene Kosov
Committed by
Aleksey Midenkov
Nov 15, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IB: DICT_TF2_VERSIONED flag removed
Reverted DICT_TF2_BITS (midenok)
parent
4a662df9
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
39 deletions
+25
-39
storage/innobase/dict/dict0mem.cc
storage/innobase/dict/dict0mem.cc
+2
-4
storage/innobase/handler/ha_innodb.cc
storage/innobase/handler/ha_innodb.cc
+5
-11
storage/innobase/include/dict0mem.h
storage/innobase/include/dict0mem.h
+3
-4
storage/innobase/row/row0ins.cc
storage/innobase/row/row0ins.cc
+3
-4
storage/innobase/row/row0merge.cc
storage/innobase/row/row0merge.cc
+4
-8
storage/innobase/row/row0mysql.cc
storage/innobase/row/row0mysql.cc
+8
-8
No files found.
storage/innobase/dict/dict0mem.cc
View file @
e6748062
...
...
@@ -305,12 +305,10 @@ dict_mem_table_add_col(
dict_mem_fill_column_struct
(
col
,
i
,
mtype
,
prtype
,
len
);
if
(
prtype
&
DATA_VERS_ROW_START
)
{
ut_ad
(
table
->
flags2
&
DICT_TF2_VERSIONED
&&
!
(
prtype
&
DATA_VERS_ROW_END
));
ut_ad
(
!
(
prtype
&
DATA_VERS_ROW_END
));
table
->
vers_row_start
=
i
;
}
else
if
(
prtype
&
DATA_VERS_ROW_END
)
{
ut_ad
(
table
->
flags2
&
DICT_TF2_VERSIONED
&&
!
(
prtype
&
DATA_VERS_ROW_START
));
ut_ad
(
!
(
prtype
&
DATA_VERS_ROW_START
));
table
->
vers_row_end
=
i
;
}
}
...
...
storage/innobase/handler/ha_innodb.cc
View file @
e6748062
...
...
@@ -8870,9 +8870,8 @@ calc_row_difference(
n_changed
++
;
if
(
!
prebuilt
->
upd_node
->
versioned
&&
DICT_TF2_FLAG_IS_SET
(
prebuilt
->
table
,
DICT_TF2_VERSIONED
)
&&
!
(
field
->
flags
&
VERS_OPTIMIZED_UPDATE_FLAG
))
{
prebuilt
->
table
->
with_versioning
()
&&
!
(
field
->
flags
&
VERS_OPTIMIZED_UPDATE_FLAG
))
{
prebuilt
->
upd_node
->
versioned
=
true
;
}
...
...
@@ -8982,9 +8981,8 @@ calc_row_difference(
++
n_changed
;
if
(
!
prebuilt
->
upd_node
->
versioned
&&
DICT_TF2_FLAG_IS_SET
(
prebuilt
->
table
,
DICT_TF2_VERSIONED
)
&&
!
(
field
->
flags
&
VERS_OPTIMIZED_UPDATE_FLAG
))
{
prebuilt
->
table
->
with_versioning
()
&&
!
(
field
->
flags
&
VERS_OPTIMIZED_UPDATE_FLAG
))
{
prebuilt
->
upd_node
->
versioned
=
true
;
}
}
else
{
...
...
@@ -11400,7 +11398,7 @@ create_table_info_t::create_table_def()
ulint
vers_row_start
=
0
;
ulint
vers_row_end
=
0
;
if
(
m_f
lags2
&
DICT_TF2_VERSIONED
)
{
if
(
m_f
orm
->
versioned
()
)
{
if
(
i
==
m_form
->
s
->
row_start_field
)
{
vers_row_start
=
DATA_VERS_ROW_START
;
}
else
if
(
i
==
m_form
->
s
->
row_end_field
)
{
...
...
@@ -12522,10 +12520,6 @@ create_table_info_t::innobase_table_flags()
DBUG_EXECUTE_IF
(
"innodb_test_wrong_fts_aux_table_name"
,
m_flags2
&=
~
DICT_TF2_FTS_AUX_HEX_NAME
;);
if
(
m_create_info
->
options
&
HA_VERSIONED_TABLE
)
{
m_flags2
|=
DICT_TF2_VERSIONED
;
}
DBUG_RETURN
(
true
);
}
...
...
storage/innobase/include/dict0mem.h
View file @
e6748062
...
...
@@ -245,7 +245,7 @@ ROW_FORMAT=REDUNDANT. InnoDB engines do not check these flags
for unknown bits in order to protect backward incompatibility. */
/* @{ */
/** Total number of bits in table->flags2. */
#define DICT_TF2_BITS
8
#define DICT_TF2_BITS
7
#define DICT_TF2_UNUSED_BIT_MASK (~0U << DICT_TF2_BITS)
#define DICT_TF2_BIT_MASK ~DICT_TF2_UNUSED_BIT_MASK
...
...
@@ -273,9 +273,6 @@ use its own tablespace instead of the system tablespace. */
index tables) of a FTS table are in HEX format. */
#define DICT_TF2_FTS_AUX_HEX_NAME 64U
/** System Versioning bit. */
#define DICT_TF2_VERSIONED 128U
/* @} */
#define DICT_TF2_FLAG_SET(table, flag) \
...
...
@@ -1492,6 +1489,8 @@ struct dict_table_t {
/** Add the table definition to the data dictionary cache */
void
add_to_cache
();
bool
with_versioning
()
const
{
return
vers_row_start
||
vers_row_end
;
}
/** Id of the table. */
table_id_t
id
;
...
...
storage/innobase/row/row0ins.cc
View file @
e6748062
...
...
@@ -1705,9 +1705,8 @@ row_ins_check_foreign_constraint(
}
/* System Versioning: if sys_trx_end != Inf, we
suppress the foreign key check */
if
(
DICT_TF2_FLAG_IS_SET
(
table
,
DICT_TF2_VERSIONED
)
&&
dfield_get_type
(
field
)
->
prtype
&
DATA_VERS_ROW_END
)
{
if
(
table
->
with_versioning
()
&&
dfield_get_type
(
field
)
->
prtype
&
DATA_VERS_ROW_END
)
{
byte
*
data
=
static_cast
<
byte
*>
(
dfield_get_data
(
field
));
ut_ad
(
data
);
trx_id_t
end_trx_id
=
mach_read_from_8
(
data
);
...
...
@@ -1842,7 +1841,7 @@ row_ins_check_foreign_constraint(
cmp
=
cmp_dtuple_rec
(
entry
,
rec
,
offsets
);
if
(
cmp
==
0
)
{
if
(
DICT_TF2_FLAG_IS_SET
(
check_table
,
DICT_TF2_VERSIONED
))
{
if
(
check_table
->
with_versioning
(
))
{
trx_id_t
end_trx_id
=
0
;
if
(
dict_index_is_clust
(
check_index
))
{
...
...
storage/innobase/row/row0merge.cc
View file @
e6748062
...
...
@@ -2241,8 +2241,7 @@ row_merge_read_clustered_index(
<
dict_table_get_n_user_cols
(
new_table
));
bool
historical_row
=
false
;
if
(
DICT_TF2_FLAG_IS_SET
(
new_table
,
DICT_TF2_VERSIONED
))
{
if
(
new_table
->
with_versioning
())
{
const
dfield_t
*
dfield
=
dtuple_get_nth_field
(
row
,
new_table
->
vers_row_end
);
const
byte
*
data
=
static_cast
<
const
byte
*>
(
...
...
@@ -2304,10 +2303,8 @@ row_merge_read_clustered_index(
}
}
if
(
DICT_TF2_FLAG_IS_SET
(
old_table
,
DICT_TF2_VERSIONED
))
{
if
(
DICT_TF2_FLAG_IS_SET
(
new_table
,
DICT_TF2_VERSIONED
)
&&
!
drop_historical
)
{
if
(
old_table
->
with_versioning
())
{
if
(
new_table
->
with_versioning
()
&&
!
drop_historical
)
{
dfield_t
*
end
=
dtuple_get_nth_field
(
row
,
new_table
->
vers_row_end
);
byte
*
data
=
static_cast
<
byte
*>
(
...
...
@@ -2333,8 +2330,7 @@ row_merge_read_clustered_index(
if
(
mach_read_from_8
(
sys_trx_end
)
!=
TRX_ID_MAX
)
continue
;
}
}
else
if
(
DICT_TF2_FLAG_IS_SET
(
new_table
,
DICT_TF2_VERSIONED
))
{
}
else
if
(
new_table
->
with_versioning
())
{
void
*
sys_trx_start
=
mem_heap_alloc
(
row_heap
,
8
);
void
*
sys_trx_end
=
mem_heap_alloc
(
row_heap
,
8
);
mach_write_to_8
(
sys_trx_start
,
trx
->
id
);
...
...
storage/innobase/row/row0mysql.cc
View file @
e6748062
...
...
@@ -1569,7 +1569,7 @@ row_insert_for_mysql(
node
->
duplicate
=
NULL
;
if
(
DICT_TF2_FLAG_IS_SET
(
node
->
table
,
DICT_TF2_VERSIONED
))
{
if
(
node
->
table
->
with_versioning
(
))
{
trx
->
vtq_notify_on_commit
=
true
;
}
...
...
@@ -2127,8 +2127,8 @@ row_update_for_mysql_using_upd_graph(
node
->
cascade_upd_nodes
=
cascade_upd_nodes
;
cascade_upd_nodes
->
pop_front
();
thr
->
fk_cascade_depth
++
;
vers_set_fields
=
DICT_TF2_FLAG_IS_SET
(
node
->
table
,
DICT_TF2_VERSIONED
)
&&
(
node
->
is_delete
||
node
->
versioned
);
vers_set_fields
=
node
->
table
->
with_versioning
()
&&
(
node
->
is_delete
||
node
->
versioned
);
goto
run_again
;
}
...
...
@@ -2208,11 +2208,11 @@ row_update_for_mysql_using_upd_graph(
prebuilt
->
table
->
stat_modified_counter
++
;
}
if
(
DICT_TF2_FLAG_IS_SET
(
node
->
table
,
DICT_TF2_VERSIONED
)
&&
(
node
->
versioned
||
node
->
vers_delete
||
// TODO: imrove this check (check if we touch only
// unversioned fields in foreigh table
node
->
foreign
))
{
if
(
node
->
table
->
with_versioning
(
)
&&
(
node
->
versioned
||
node
->
vers_delete
||
// TODO: imrove this check (check if we touch only
// unversioned fields in foreigh table)
node
->
foreign
))
{
trx
->
vtq_notify_on_commit
=
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