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
42105381
Commit
42105381
authored
Jan 13, 2016
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup: avoid Field::field_index
prefer x->field over table->field[x->field->field_index]
parent
03a0623f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
7 deletions
+7
-7
sql/item_subselect.cc
sql/item_subselect.cc
+1
-1
sql/item_subselect.h
sql/item_subselect.h
+2
-2
sql/sql_load.cc
sql/sql_load.cc
+1
-1
sql/sql_select.cc
sql/sql_select.cc
+1
-1
sql/sql_statistics.cc
sql/sql_statistics.cc
+2
-2
No files found.
sql/item_subselect.cc
View file @
42105381
...
...
@@ -6186,7 +6186,7 @@ subselect_rowid_merge_engine::init(MY_BITMAP *non_null_key_parts,
Check if the first and only indexed column contains NULL in the curent
row, and add the row number to the corresponding key.
*/
if
(
tmp_table
->
field
[
merge_keys
[
i
]
->
get_field_idx
(
0
)]
->
is_null
())
if
(
merge_keys
[
i
]
->
get_field
(
0
)
->
is_null
())
merge_keys
[
i
]
->
set_null
(
cur_rownum
);
else
merge_keys
[
i
]
->
add_key
(
cur_rownum
);
...
...
sql/item_subselect.h
View file @
42105381
...
...
@@ -1236,10 +1236,10 @@ class Ordered_key : public Sql_alloc
uint
get_column_count
()
{
return
key_column_count
;
}
uint
get_keyid
()
{
return
keyid
;
}
uint
get_field_idx
(
uint
i
)
Field
*
get_field
(
uint
i
)
{
DBUG_ASSERT
(
i
<
key_column_count
);
return
key_columns
[
i
]
->
field
->
field_index
;
return
key_columns
[
i
]
->
field
;
}
rownum_t
get_min_null_row
()
{
return
min_null_row
;
}
rownum_t
get_max_null_row
()
{
return
max_null_row
;
}
...
...
sql/sql_load.cc
View file @
42105381
...
...
@@ -881,7 +881,7 @@ read_fixed_length(THD *thd, COPY_INFO &info, TABLE_LIST *table_list,
while
((
sql_field
=
(
Item_field
*
)
it
++
))
{
if
(
table
->
field
[
sql_field
->
field
->
field_index
]
==
table
->
next_number_field
)
if
(
sql_field
->
field
==
table
->
next_number_field
)
auto_increment_field_not_null
=
true
;
}
...
...
sql/sql_select.cc
View file @
42105381
...
...
@@ -7490,7 +7490,7 @@ double table_multi_eq_cond_selectivity(JOIN *join, uint idx, JOIN_TAB *s,
if
(
!
s
->
keyuse
)
return
sel
;
Item_equal
*
item_equal
;
Item_equal
*
item_equal
;
List_iterator_fast
<
Item_equal
>
it
(
cond_equal
->
current_level
);
TABLE
*
table
=
s
->
table
;
table_map
table_bit
=
table
->
map
;
...
...
sql/sql_statistics.cc
View file @
42105381
...
...
@@ -3591,7 +3591,7 @@ double get_column_avg_frequency(Field * field)
return
res
;
}
Column_statistics
*
col_stats
=
table
->
s
->
field
[
field
->
field_index
]
->
read_stats
;
Column_statistics
*
col_stats
=
field
->
read_stats
;
if
(
!
col_stats
)
res
=
table
->
stat_records
();
...
...
@@ -3629,7 +3629,7 @@ double get_column_range_cardinality(Field *field,
{
double
res
;
TABLE
*
table
=
field
->
table
;
Column_statistics
*
col_stats
=
table
->
field
[
field
->
field_index
]
->
read_stats
;
Column_statistics
*
col_stats
=
field
->
read_stats
;
double
tab_records
=
table
->
stat_records
();
if
(
!
col_stats
)
...
...
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