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
4dd7e113
Commit
4dd7e113
authored
Feb 01, 2017
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup: mark_columns_used_by_index_no_reset in handler::get_auto_increment
use table->mark_columns_used_by_index, don't copy it
parent
bf8f70a4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
15 deletions
+13
-15
sql/handler.cc
sql/handler.cc
+3
-5
sql/table.cc
sql/table.cc
+6
-6
sql/table.h
sql/table.h
+4
-4
No files found.
sql/handler.cc
View file @
4dd7e113
...
...
@@ -3222,11 +3222,9 @@ void handler::get_auto_increment(ulonglong offset, ulonglong increment,
{
ulonglong
nr
;
int
error
;
MY_BITMAP
*
old_read_set
;
(
void
)
extra
(
HA_EXTRA_KEYREAD
);
table
->
mark_columns_used_by_index_no_reset
(
table
->
s
->
next_number_index
,
table
->
read_set
);
column_bitmaps_signal
();
old_read_set
=
table
->
mark_columns_used_by_index
(
table
->
s
->
next_number_index
);
if
(
ha_index_init
(
table
->
s
->
next_number_index
,
1
))
{
...
...
@@ -3278,7 +3276,7 @@ void handler::get_auto_increment(ulonglong offset, ulonglong increment,
nr
=
((
ulonglong
)
table
->
next_number_field
->
val_int_offset
(
table
->
s
->
rec_buff_length
)
+
1
);
ha_index_end
();
(
void
)
extra
(
HA_EXTRA_NO_KEYREAD
);
table
->
restore_column_maps_after_mark_index
(
old_read_set
);
*
first_value
=
nr
;
return
;
}
...
...
sql/table.cc
View file @
4dd7e113
...
...
@@ -6080,16 +6080,17 @@ void TABLE::prepare_for_position()
or TABLE::restore_column_maps_after_mark_index()
*/
void
TABLE
::
mark_columns_used_by_index_in_bitmap
(
uint
index
,
MY_BITMAP
*
bitmap
)
MY_BITMAP
*
TABLE
::
mark_columns_used_by_index_in_bitmap
(
uint
index
,
MY_BITMAP
*
bitmap
)
{
MY_BITMAP
*
backup
=
read_set
;
DBUG_ENTER
(
"TABLE::mark_columns_used_by_index_in_bitmap"
);
if
(
!
no_keyread
)
file
->
ha_start_keyread
();
bitmap_clear_all
(
bitmap
);
mark_columns_used_by_index_no_reset
(
index
,
bitmap
);
column_bitmaps_set
(
bitmap
);
DBUG_
VOID_RETURN
;
DBUG_
RETURN
(
backup
)
;
}
...
...
@@ -6125,12 +6126,11 @@ void TABLE::add_read_columns_used_by_index(uint index)
when calling mark_columns_used_by_index
*/
void
TABLE
::
restore_column_maps_after_mark_index
()
void
TABLE
::
restore_column_maps_after_mark_index
(
MY_BITMAP
*
backup
)
{
DBUG_ENTER
(
"TABLE::restore_column_maps_after_mark_index"
);
file
->
ha_end_keyread
();
default_column_bitmaps
()
;
read_set
=
backup
;
file
->
column_bitmaps_signal
();
DBUG_VOID_RETURN
;
}
...
...
sql/table.h
View file @
4dd7e113
...
...
@@ -1307,11 +1307,11 @@ struct TABLE
void
clear_column_bitmaps
(
void
);
void
prepare_for_position
(
void
);
void
mark_columns_used_by_index_no_reset
(
uint
index
,
MY_BITMAP
*
map
);
void
mark_columns_used_by_index_in_bitmap
(
uint
index
,
MY_BITMAP
*
map
);
void
mark_columns_used_by_index
(
uint
index
)
{
mark_columns_used_by_index_in_bitmap
(
index
,
&
tmp_set
);
}
MY_BITMAP
*
mark_columns_used_by_index_in_bitmap
(
uint
index
,
MY_BITMAP
*
map
);
MY_BITMAP
*
mark_columns_used_by_index
(
uint
index
)
{
return
mark_columns_used_by_index_in_bitmap
(
index
,
&
tmp_set
);
}
void
add_read_columns_used_by_index
(
uint
index
);
void
restore_column_maps_after_mark_index
();
void
restore_column_maps_after_mark_index
(
MY_BITMAP
*
backup
);
void
mark_auto_increment_column
(
void
);
void
mark_columns_needed_for_update
(
void
);
void
mark_columns_needed_for_delete
(
void
);
...
...
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