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
605cf619
Commit
605cf619
authored
Jan 09, 2016
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup: extra_rec_buf_length
parent
98be2d85
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
28 deletions
+5
-28
sql/ha_partition.cc
sql/ha_partition.cc
+0
-12
sql/ha_partition.h
sql/ha_partition.h
+0
-6
sql/handler.h
sql/handler.h
+0
-1
sql/table.cc
sql/table.cc
+5
-7
sql/unireg.cc
sql/unireg.cc
+0
-2
No files found.
sql/ha_partition.cc
View file @
605cf619
...
...
@@ -8440,18 +8440,6 @@ uint ha_partition::max_supported_keys() const
}
uint
ha_partition
::
extra_rec_buf_length
()
const
{
handler
**
file
;
uint
max
=
(
*
m_file
)
->
extra_rec_buf_length
();
for
(
file
=
m_file
,
file
++
;
*
file
;
file
++
)
if
(
max
<
(
*
file
)
->
extra_rec_buf_length
())
max
=
(
*
file
)
->
extra_rec_buf_length
();
return
max
;
}
uint
ha_partition
::
min_record_length
(
uint
options
)
const
{
handler
**
file
;
...
...
sql/ha_partition.h
View file @
605cf619
...
...
@@ -1009,12 +1009,6 @@ class ha_partition :public handler
virtual
uint
max_supported_key_parts
()
const
;
virtual
uint
max_supported_key_length
()
const
;
virtual
uint
max_supported_key_part_length
()
const
;
/*
The extra record buffer length is the maximum needed by all handlers.
The minimum record length is the maximum of all involved handlers.
*/
virtual
uint
extra_rec_buf_length
()
const
;
virtual
uint
min_record_length
(
uint
options
)
const
;
/*
...
...
sql/handler.h
View file @
605cf619
...
...
@@ -2951,7 +2951,6 @@ class handler :public Sql_alloc
virtual
const
key_map
*
keys_to_use_for_scanning
()
{
return
&
key_map_empty
;
}
bool
has_transactions
()
{
return
(
ha_table_flags
()
&
HA_NO_TRANSACTIONS
)
==
0
;
}
virtual
uint
extra_rec_buf_length
()
const
{
return
0
;
}
/**
This method is used to analyse the error to see whether the error
...
...
sql/table.cc
View file @
605cf619
...
...
@@ -932,7 +932,7 @@ static void mysql57_calculate_null_position(TABLE_SHARE *share,
if
((
strpos
[
10
]
&
MYSQL57_GENERATED_FIELD
))
{
/* Skip virtual (not stored) generated field */
bool
stored_in_db
=
(
bool
)
(
uint
)
(
vcol_screen_pos
[
3
])
;
bool
stored_in_db
=
vcol_screen_pos
[
3
]
;
vcol_screen_pos
+=
(
uint2korr
(
vcol_screen_pos
+
1
)
+
MYSQL57_GCOL_HEADER_SIZE
);
if
(
!
stored_in_db
)
...
...
@@ -982,7 +982,6 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
uint
interval_count
,
interval_parts
,
read_length
,
int_length
;
uint
db_create_options
,
keys
,
key_parts
,
n_length
;
uint
com_length
,
null_bit_pos
,
mysql57_vcol_null_bit_pos
,
bitmap_count
;
uint
extra_rec_buf_length
;
uint
i
;
bool
use_hash
,
mysql57_null_bits
=
0
;
char
*
keynames
,
*
names
,
*
comment_pos
;
...
...
@@ -1400,8 +1399,7 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
if
(
share
->
db_plugin
&&
!
plugin_equals
(
share
->
db_plugin
,
se_plugin
))
goto
err
;
// wrong engine (someone changed the frm under our feet?)
extra_rec_buf_length
=
uint2korr
(
frm_image
+
59
);
rec_buff_length
=
ALIGN_SIZE
(
share
->
reclength
+
1
+
extra_rec_buf_length
);
rec_buff_length
=
ALIGN_SIZE
(
share
->
reclength
+
1
);
share
->
rec_buff_length
=
rec_buff_length
;
if
(
!
(
record
=
(
uchar
*
)
alloc_root
(
&
share
->
mem_root
,
rec_buff_length
)))
...
...
@@ -1638,7 +1636,7 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
vcol_info
=
new
(
&
share
->
mem_root
)
Virtual_column_info
();
vcol_info_length
=
uint2korr
(
vcol_screen_pos
+
1
);
DBUG_ASSERT
(
vcol_info_length
);
vcol_info
->
stored_in_db
=
(
bool
)
(
uint
)
vcol_screen_pos
[
3
];
vcol_info
->
stored_in_db
=
vcol_screen_pos
[
3
];
if
(
!
(
vcol_info
->
expr_str
.
str
=
(
char
*
)
memdup_root
(
&
share
->
mem_root
,
vcol_screen_pos
+
MYSQL57_GCOL_HEADER_SIZE
,
...
...
@@ -1673,7 +1671,7 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
else
if
((
uint
)
vcol_screen_pos
[
0
]
!=
1
)
goto
err
;
vcol_info
->
stored_in_db
=
(
bool
)
(
uint
)
vcol_screen_pos
[
2
];
vcol_info
->
stored_in_db
=
vcol_screen_pos
[
2
];
vcol_expr_length
=
vcol_info_length
-
(
uint
)(
FRM_VCOL_OLD_HEADER_SIZE
(
opt_interval_id
));
if
(
!
(
vcol_info
->
expr_str
.
str
=
...
...
@@ -3731,7 +3729,7 @@ void prepare_frm_header(THD *thd, uint reclength, uchar *fileinfo,
int4store
(
fileinfo
+
51
,
tmp
);
int4store
(
fileinfo
+
55
,
create_info
->
extra_size
);
/*
59-60 is
reserved for extra_rec_buf_length,
59-60 is
unused since 10.2.4
61 for default_part_db_type
*/
int2store
(
fileinfo
+
62
,
create_info
->
key_block_size
);
...
...
sql/unireg.cc
View file @
605cf619
...
...
@@ -284,8 +284,6 @@ LEX_CUSTRING build_frm_image(THD *thd, const char *table,
DBUG_PRINT
(
"info"
,
(
"part_db_type = %d"
,
fileinfo
[
61
]));
}
int2store
(
fileinfo
+
59
,
db_file
->
extra_rec_buf_length
());
memcpy
(
frm_ptr
,
fileinfo
,
FRM_HEADER_SIZE
);
pos
+=
key_buff_length
;
...
...
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