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
91d12b08
Commit
91d12b08
authored
Sep 17, 2018
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
s/COLUMNS_INSTANT/INSTANT
parent
ab609d3a
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
49 additions
and
49 deletions
+49
-49
storage/innobase/btr/btr0cur.cc
storage/innobase/btr/btr0cur.cc
+1
-1
storage/innobase/include/rem0rec.h
storage/innobase/include/rem0rec.h
+13
-13
storage/innobase/include/rem0rec.ic
storage/innobase/include/rem0rec.ic
+2
-2
storage/innobase/page/page0cur.cc
storage/innobase/page/page0cur.cc
+2
-2
storage/innobase/rem/rem0rec.cc
storage/innobase/rem/rem0rec.cc
+26
-26
storage/innobase/row/row0log.cc
storage/innobase/row/row0log.cc
+4
-4
storage/innobase/row/row0upd.cc
storage/innobase/row/row0upd.cc
+1
-1
No files found.
storage/innobase/btr/btr0cur.cc
View file @
91d12b08
...
...
@@ -652,7 +652,7 @@ btr_cur_instant_init_low(dict_index_t* index, mtr_t* mtr)
if
(
dict_table_is_comp
(
index
->
table
))
{
if
(
rec_get_info_bits
(
rec
,
true
)
!=
REC_INFO_MIN_REC_FLAG
&&
rec_get_status
(
rec
)
!=
REC_STATUS_
COLUMNS_
INSTANT
)
{
&&
rec_get_status
(
rec
)
!=
REC_STATUS_INSTANT
)
{
incompatible:
ib
::
error
()
<<
"Table "
<<
index
->
table
->
name
<<
" contains unrecognizable "
...
...
storage/innobase/include/rem0rec.h
View file @
91d12b08
...
...
@@ -67,19 +67,19 @@ enum rec_comp_status_t {
REC_STATUS_SUPREMUM
=
3
,
/** Clustered index record that has been inserted or updated
after instant ADD COLUMN (more than dict_index_t::n_core_fields) */
REC_STATUS_
COLUMNS_
INSTANT
=
4
REC_STATUS_INSTANT
=
4
};
/** The dtuple_t::info_bits of the 'default row' record.
@see rec_is_default_row() */
static
const
byte
REC_INFO_DEFAULT_ROW
=
REC_INFO_MIN_REC_FLAG
|
REC_STATUS_
COLUMNS_
INSTANT
;
=
REC_INFO_MIN_REC_FLAG
|
REC_STATUS_INSTANT
;
/** The dtuple_t::info_bits of the 'default row' record with dropped
column information. */
static
const
byte
REC_INFO_DEFAULT_ROW_DROP
=
REC_INFO_MIN_REC_FLAG
|
REC_INFO_DELETED_FLAG
|
REC_STATUS_
COLUMNS_
INSTANT
;
|
REC_STATUS_INSTANT
;
#define REC_NEW_STATUS 3
/* This is single byte bit-field */
#define REC_NEW_STATUS_MASK 0x7UL
...
...
@@ -308,7 +308,7 @@ rec_comp_status_t
rec_get_status
(
const
rec_t
*
rec
)
{
byte
bits
=
rec
[
-
REC_NEW_STATUS
]
&
REC_NEW_STATUS_MASK
;
ut_ad
(
bits
<=
REC_STATUS_
COLUMNS_
INSTANT
);
ut_ad
(
bits
<=
REC_STATUS_INSTANT
);
return
static_cast
<
rec_comp_status_t
>
(
bits
);
}
...
...
@@ -319,12 +319,12 @@ inline
void
rec_set_status
(
rec_t
*
rec
,
byte
bits
)
{
ut_ad
(
bits
<=
REC_STATUS_
COLUMNS_
INSTANT
);
ut_ad
(
bits
<=
REC_STATUS_INSTANT
);
rec
[
-
REC_NEW_STATUS
]
=
(
rec
[
-
REC_NEW_STATUS
]
&
~
REC_NEW_STATUS_MASK
)
|
bits
;
}
/** Get the length of added field count in a REC_STATUS_
COLUMNS_
INSTANT record.
/** Get the length of added field count in a REC_STATUS_INSTANT record.
@param[in] n_add_field number of added fields, minus one
@return storage size of the field count, in bytes */
inline
unsigned
rec_get_n_add_field_len
(
ulint
n_add_field
)
...
...
@@ -333,8 +333,8 @@ inline unsigned rec_get_n_add_field_len(ulint n_add_field)
return
n_add_field
<
0x80
?
1
:
2
;
}
/** Set the added field count in a REC_STATUS_
COLUMNS_
INSTANT record.
@param[in,out] header variable header of a REC_STATUS_
COLUMNS_
INSTANT record
/** Set the added field count in a REC_STATUS_INSTANT record.
@param[in,out] header variable header of a REC_STATUS_INSTANT record
@param[in] n_add number of added fields, minus 1
@return record header before the number of added fields */
inline
void
rec_set_n_add_field
(
byte
*&
header
,
ulint
n_add
)
...
...
@@ -830,7 +830,7 @@ rec_is_default_row(const rec_t* rec, const dict_index_t* index)
&
REC_INFO_MIN_REC_FLAG
;
ut_ad
(
!
is
||
index
->
is_instant
());
ut_ad
(
!
is
||
!
dict_table_is_comp
(
index
->
table
)
||
rec_get_status
(
rec
)
==
REC_STATUS_
COLUMNS_
INSTANT
);
||
rec_get_status
(
rec
)
==
REC_STATUS_INSTANT
);
return
is
;
}
...
...
@@ -848,7 +848,7 @@ rec_is_new_default_row(const rec_t* rec, const dict_index_t* index)
is
=
is
&&
rec_get_deleted_flag
(
rec
,
dict_table_is_comp
(
index
->
table
));
ut_ad
(
!
is
||
index
->
is_instant
());
ut_ad
(
!
is
||
!
dict_table_is_comp
(
index
->
table
)
||
rec_get_status
(
rec
)
==
REC_STATUS_
COLUMNS_
INSTANT
);
||
rec_get_status
(
rec
)
==
REC_STATUS_INSTANT
);
return
is
;
}
...
...
@@ -1045,7 +1045,7 @@ rec_copy(
@param[in] fields data fields
@param[in] n_fields number of data fields
@param[out] extra record header size
@param[in] status REC_STATUS_ORDINARY or REC_STATUS_
COLUMNS_
INSTANT
@param[in] status REC_STATUS_ORDINARY or REC_STATUS_INSTANT
@return total size, in bytes */
ulint
rec_get_converted_size_temp
(
...
...
@@ -1062,7 +1062,7 @@ rec_get_converted_size_temp(
@param[in,out] offsets offsets to the fields; in: rec_offs_n_fields(offsets)
@param[in] n_core number of core fields (index->n_core_fields)
@param[in] def_val default values for non-core fields
@param[in] status REC_STATUS_ORDINARY or REC_STATUS_
COLUMNS_
INSTANT */
@param[in] status REC_STATUS_ORDINARY or REC_STATUS_INSTANT */
void
rec_init_offsets_temp
(
const
rec_t
*
rec
,
...
...
@@ -1089,7 +1089,7 @@ rec_init_offsets_temp(
@param[in] index clustered or secondary index
@param[in] fields data fields
@param[in] n_fields number of data fields
@param[in] status REC_STATUS_ORDINARY or REC_STATUS_
COLUMNS_
INSTANT */
@param[in] status REC_STATUS_ORDINARY or REC_STATUS_INSTANT */
void
rec_convert_dtuple_to_temp
(
rec_t
*
rec
,
...
...
storage/innobase/include/rem0rec.ic
View file @
91d12b08
...
...
@@ -67,7 +67,7 @@ most significant bytes and bits are written below less significant.
001=REC_STATUS_NODE_PTR
010=REC_STATUS_INFIMUM
011=REC_STATUS_SUPREMUM
100=REC_STATUS_
COLUMNS_
INSTANT
100=REC_STATUS_INSTANT
1xx=reserved
5 bits heap number
4 8 bits heap number
...
...
@@ -453,7 +453,7 @@ rec_get_n_fields(
}
switch (rec_get_status(rec)) {
case REC_STATUS_
COLUMNS_
INSTANT:
case REC_STATUS_INSTANT:
case REC_STATUS_ORDINARY:
return(dict_index_get_n_fields(index));
case REC_STATUS_NODE_PTR:
...
...
storage/innobase/page/page0cur.cc
View file @
91d12b08
...
...
@@ -1370,7 +1370,7 @@ page_cur_insert_rec_low(
switch
(
rec_get_status
(
current_rec
))
{
case
REC_STATUS_ORDINARY
:
case
REC_STATUS_NODE_PTR
:
case
REC_STATUS_
COLUMNS_
INSTANT
:
case
REC_STATUS_INSTANT
:
case
REC_STATUS_INFIMUM
:
break
;
case
REC_STATUS_SUPREMUM
:
...
...
@@ -1379,7 +1379,7 @@ page_cur_insert_rec_low(
switch
(
rec_get_status
(
insert_rec
))
{
case
REC_STATUS_ORDINARY
:
case
REC_STATUS_NODE_PTR
:
case
REC_STATUS_
COLUMNS_
INSTANT
:
case
REC_STATUS_INSTANT
:
break
;
case
REC_STATUS_INFIMUM
:
case
REC_STATUS_SUPREMUM
:
...
...
storage/innobase/rem/rem0rec.cc
View file @
91d12b08
...
...
@@ -176,7 +176,7 @@ rec_get_n_extern_new(
ut_ad
(
!
index
->
table
->
supports_instant
()
||
index
->
is_dummy
);
ut_ad
(
!
index
->
is_instant
());
ut_ad
(
rec_get_status
(
rec
)
==
REC_STATUS_ORDINARY
||
rec_get_status
(
rec
)
==
REC_STATUS_
COLUMNS_
INSTANT
);
||
rec_get_status
(
rec
)
==
REC_STATUS_INSTANT
);
ut_ad
(
n
==
ULINT_UNDEFINED
||
n
<=
dict_index_get_n_fields
(
index
));
if
(
n
==
ULINT_UNDEFINED
)
{
...
...
@@ -238,8 +238,8 @@ rec_get_n_extern_new(
return
(
n_extern
);
}
/** Get the added field count in a REC_STATUS_
COLUMNS_
INSTANT record.
@param[in,out] header variable header of a REC_STATUS_
COLUMNS_
INSTANT record
/** Get the added field count in a REC_STATUS_INSTANT record.
@param[in,out] header variable header of a REC_STATUS_INSTANT record
@return number of added fields */
static
inline
unsigned
rec_get_n_add_field
(
const
byte
*&
header
)
{
...
...
@@ -261,12 +261,12 @@ enum rec_leaf_format {
/** Temporary file record */
REC_LEAF_TEMP
,
/** Temporary file record, with added columns
(REC_STATUS_
COLUMNS_
INSTANT) */
(REC_STATUS_INSTANT) */
REC_LEAF_TEMP_COLUMNS_ADDED
,
/** Normal (REC_STATUS_ORDINARY) */
REC_LEAF_ORDINARY
,
/** With add or drop columns (REC_STATUS_
COLUMNS_
INSTANT) */
REC_LEAF_
COLUMNS_
INSTANT
/** With add or drop columns (REC_STATUS_INSTANT) */
REC_LEAF_INSTANT
};
/** Determine the offset to each field in a leaf-page record
...
...
@@ -322,7 +322,7 @@ rec_init_offsets_comp_ordinary(
ut_d
(
n_null
=
std
::
min
(
index
->
n_core_null_bytes
*
8U
,
index
->
n_nullable
));
break
;
case
REC_LEAF_
COLUMNS_
INSTANT
:
case
REC_LEAF_INSTANT
:
/* We would have !index->is_instant() when rolling back
an instant ADD COLUMN operation. */
nulls
-=
REC_N_NEW_EXTRA_BYTES
;
...
...
@@ -552,7 +552,7 @@ rec_offs_validate(
dict_index_get_n_unique_in_tree
(
index
)
+
1
);
if
(
comp
&&
rec
)
{
switch
(
rec_get_status
(
rec
))
{
case
REC_STATUS_
COLUMNS_
INSTANT
:
case
REC_STATUS_INSTANT
:
case
REC_STATUS_ORDINARY
:
break
;
case
REC_STATUS_NODE_PTR
:
...
...
@@ -857,12 +857,12 @@ rec_init_offsets(
=
dict_index_get_n_unique_in_tree_nonleaf
(
index
);
break
;
case
REC_STATUS_
COLUMNS_
INSTANT
:
case
REC_STATUS_INSTANT
:
ut_ad
(
leaf
);
rec_init_offsets_comp_ordinary
(
rec
,
index
,
offsets
,
index
->
n_core_fields
,
NULL
,
REC_LEAF_
COLUMNS_
INSTANT
);
REC_LEAF_INSTANT
);
return
;
case
REC_STATUS_ORDINARY
:
ut_ad
(
leaf
);
...
...
@@ -1048,7 +1048,7 @@ rec_get_offsets_func(
if
(
dict_table_is_comp
(
index
->
table
))
{
switch
(
UNIV_EXPECT
(
rec_get_status
(
rec
),
REC_STATUS_ORDINARY
))
{
case
REC_STATUS_
COLUMNS_
INSTANT
:
case
REC_STATUS_INSTANT
:
if
(
UNIV_UNLIKELY
(
rec_get_info_bits
(
rec
,
true
)
==
(
REC_INFO_MIN_REC_FLAG
...
...
@@ -1431,9 +1431,9 @@ rec_get_converted_size_comp_prefix_low(
ut_ad
(
n_fields
<=
dict_index_get_n_fields
(
index
));
ut_d
(
ulint
n_null
=
index
->
n_nullable
);
ut_ad
(
status
==
REC_STATUS_ORDINARY
||
status
==
REC_STATUS_NODE_PTR
||
status
==
REC_STATUS_
COLUMNS_
INSTANT
);
||
status
==
REC_STATUS_INSTANT
);
if
(
status
==
REC_STATUS_
COLUMNS_
INSTANT
if
(
status
==
REC_STATUS_INSTANT
&&
(
!
temp
||
n_fields
>
index
->
n_core_fields
))
{
ut_ad
(
index
->
is_instant
());
ut_ad
(
UT_BITS_IN_BYTES
(
n_null
)
>=
index
->
n_core_null_bytes
);
...
...
@@ -1599,10 +1599,10 @@ rec_get_converted_size_comp(
case
REC_STATUS_ORDINARY
:
if
(
n_fields
>
index
->
n_core_fields
)
{
ut_ad
(
index
->
is_instant
());
status
=
REC_STATUS_
COLUMNS_
INSTANT
;
status
=
REC_STATUS_INSTANT
;
}
/* fall through */
case
REC_STATUS_
COLUMNS_
INSTANT
:
case
REC_STATUS_INSTANT
:
ut_ad
(
n_fields
>=
index
->
n_core_fields
);
/** In case of default row with drop column info, there
is a possiblity of n_fields can be higher than
...
...
@@ -1824,7 +1824,7 @@ rec_convert_dtuple_to_default_rec_comp(
rec_set_heap_no_new
(
rec
,
PAGE_HEAP_NO_USER_LOW
);
rec_set_status
(
rec
,
REC_STATUS_
COLUMNS_
INSTANT
);
rec_set_status
(
rec
,
REC_STATUS_INSTANT
);
lens
=
nulls
-
n_null_bytes
;
...
...
@@ -1943,7 +1943,7 @@ rec_convert_dtuple_to_rec_comp(
ut_d
(
ulint
n_null
=
index
->
n_nullable
);
switch
(
status
)
{
case
REC_STATUS_
COLUMNS_
INSTANT
:
case
REC_STATUS_INSTANT
:
ut_ad
(
index
->
is_instant
());
if
(
index
->
is_drop_field_exist
())
{
...
...
@@ -1963,7 +1963,7 @@ rec_convert_dtuple_to_rec_comp(
rec_set_status
(
rec
,
n_fields
==
index
->
n_core_fields
?
REC_STATUS_ORDINARY
:
REC_STATUS_
COLUMNS_
INSTANT
);
:
REC_STATUS_INSTANT
);
}
if
(
dict_table_is_comp
(
index
->
table
))
{
...
...
@@ -2113,7 +2113,7 @@ rec_convert_dtuple_to_rec_new(
if
(
status
==
REC_STATUS_ORDINARY
&&
dtuple
->
n_fields
>
index
->
n_core_fields
)
{
ut_ad
(
index
->
is_instant
());
status
=
REC_STATUS_
COLUMNS_
INSTANT
;
status
=
REC_STATUS_INSTANT
;
}
ulint
extra_size
;
...
...
@@ -2177,7 +2177,7 @@ rec_convert_dtuple_to_rec(
@param[in] fields data fields
@param[in] n_fields number of data fields
@param[out] extra record header size
@param[in] status REC_STATUS_ORDINARY or REC_STATUS_
COLUMNS_
INSTANT
@param[in] status REC_STATUS_ORDINARY or REC_STATUS_INSTANT
@return total size, in bytes */
ulint
rec_get_converted_size_temp
(
...
...
@@ -2197,7 +2197,7 @@ rec_get_converted_size_temp(
@param[in,out] offsets offsets to the fields; in: rec_offs_n_fields(offsets)
@param[in] n_core number of core fields (index->n_core_fields)
@param[in] def_val default values for non-core fields
@param[in] status REC_STATUS_ORDINARY or REC_STATUS_
COLUMNS_
INSTANT */
@param[in] status REC_STATUS_ORDINARY or REC_STATUS_INSTANT */
void
rec_init_offsets_temp
(
const
rec_t
*
rec
,
...
...
@@ -2208,13 +2208,13 @@ rec_init_offsets_temp(
rec_comp_status_t
status
)
{
ut_ad
(
status
==
REC_STATUS_ORDINARY
||
status
==
REC_STATUS_
COLUMNS_
INSTANT
);
||
status
==
REC_STATUS_INSTANT
);
/* The table may have been converted to plain format
if it was emptied during an ALTER TABLE operation. */
ut_ad
(
index
->
n_core_fields
==
n_core
||
!
index
->
is_instant
());
ut_ad
(
index
->
n_core_fields
>=
n_core
);
rec_init_offsets_comp_ordinary
(
rec
,
index
,
offsets
,
n_core
,
def_val
,
status
==
REC_STATUS_
COLUMNS_
INSTANT
status
==
REC_STATUS_INSTANT
?
REC_LEAF_TEMP_COLUMNS_ADDED
:
REC_LEAF_TEMP
);
}
...
...
@@ -2241,7 +2241,7 @@ rec_init_offsets_temp(
@param[in] index clustered or secondary index
@param[in] fields data fields
@param[in] n_fields number of data fields
@param[in] status REC_STATUS_ORDINARY or REC_STATUS_
COLUMNS_
INSTANT
@param[in] status REC_STATUS_ORDINARY or REC_STATUS_INSTANT
*/
void
rec_convert_dtuple_to_temp
(
...
...
@@ -2411,7 +2411,7 @@ rec_copy_prefix_to_buf(
ut_ad
(
n_fields
<=
dict_index_get_n_unique_in_tree_nonleaf
(
index
));
break
;
case
REC_STATUS_
COLUMNS_
INSTANT
:
case
REC_STATUS_INSTANT
:
/* We would have !index->is_instant() when rolling back
an instant ADD COLUMN operation. */
ut_ad
(
index
->
is_instant
()
||
page_rec_is_default_row
(
rec
));
...
...
@@ -2526,7 +2526,7 @@ rec_copy_prefix_to_buf(
/* copy the fixed-size header and the record prefix */
memcpy
(
b
-
REC_N_NEW_EXTRA_BYTES
,
rec
-
REC_N_NEW_EXTRA_BYTES
,
prefix_len
+
REC_N_NEW_EXTRA_BYTES
);
ut_ad
(
rec_get_status
(
b
)
==
REC_STATUS_
COLUMNS_
INSTANT
);
ut_ad
(
rec_get_status
(
b
)
==
REC_STATUS_INSTANT
);
rec_set_status
(
b
,
REC_STATUS_ORDINARY
);
return
b
;
}
else
{
...
...
storage/innobase/row/row0log.cc
View file @
91d12b08
...
...
@@ -851,7 +851,7 @@ row_log_table_low_redundant(
const
bool
is_instant
=
index
->
online_log
->
is_instant
(
index
);
rec_comp_status_t
status
=
is_instant
?
REC_STATUS_
COLUMNS_
INSTANT
:
REC_STATUS_ORDINARY
;
?
REC_STATUS_INSTANT
:
REC_STATUS_ORDINARY
;
size
=
rec_get_converted_size_temp
(
index
,
tuple
->
fields
,
tuple
->
n_fields
,
&
extra_size
,
status
);
...
...
@@ -905,7 +905,7 @@ row_log_table_low_redundant(
*
b
++
=
static_cast
<
byte
>
(
extra_size
);
}
if
(
status
==
REC_STATUS_
COLUMNS_
INSTANT
)
{
if
(
status
==
REC_STATUS_INSTANT
)
{
ut_ad
(
is_instant
);
if
(
n_fields
<=
index
->
online_log
->
n_core_fields
)
{
status
=
REC_STATUS_ORDINARY
;
...
...
@@ -993,7 +993,7 @@ row_log_table_low(
ut_ad
(
page_is_comp
(
page_align
(
rec
)));
ut_ad
(
rec_get_status
(
rec
)
==
REC_STATUS_ORDINARY
||
rec_get_status
(
rec
)
==
REC_STATUS_
COLUMNS_
INSTANT
);
||
rec_get_status
(
rec
)
==
REC_STATUS_INSTANT
);
const
ulint
omit_size
=
REC_N_NEW_EXTRA_BYTES
;
...
...
@@ -1067,7 +1067,7 @@ row_log_table_low(
if
(
is_instant
)
{
*
b
++
=
fake_extra_size
?
REC_STATUS_
COLUMNS_
INSTANT
?
REC_STATUS_INSTANT
:
rec_get_status
(
rec
);
}
else
{
ut_ad
(
rec_get_status
(
rec
)
==
REC_STATUS_ORDINARY
);
...
...
storage/innobase/row/row0upd.cc
View file @
91d12b08
...
...
@@ -682,7 +682,7 @@ row_upd_rec_in_place(
switch
(
rec_get_status
(
rec
))
{
case
REC_STATUS_ORDINARY
:
break
;
case
REC_STATUS_
COLUMNS_
INSTANT
:
case
REC_STATUS_INSTANT
:
ut_ad
(
index
->
is_instant
());
break
;
case
REC_STATUS_NODE_PTR
:
...
...
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