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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
33ed2aa4
Commit
33ed2aa4
authored
Aug 29, 2006
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove dict_col_t::aux, which was only used when copying an index definition
to the data dictionary cache.
parent
27dffa4f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
19 deletions
+16
-19
dict/dict0dict.c
dict/dict0dict.c
+16
-17
include/dict0mem.h
include/dict0mem.h
+0
-2
No files found.
dict/dict0dict.c
View file @
33ed2aa4
...
...
@@ -1782,6 +1782,7 @@ dict_index_build_internal_clust(
ulint
fixed_size
;
ulint
trx_id_pos
;
ulint
i
;
ibool
*
indexed
;
ut_ad
(
table
&&
index
);
ut_ad
(
index
->
type
&
DICT_CLUSTERED
);
...
...
@@ -1876,12 +1877,9 @@ dict_index_build_internal_clust(
}
/* Set auxiliary variables in table columns as undefined */
for
(
i
=
0
;
i
<
table
->
n_cols
;
i
++
)
{
col
=
dict_table_get_nth_col
(
table
,
i
);
col
->
aux
=
ULINT_UNDEFINED
;
}
/* Remember the table columns already contained in new_index */
indexed
=
mem_alloc
(
table
->
n_cols
*
sizeof
*
indexed
);
memset
(
indexed
,
0
,
table
->
n_cols
*
sizeof
*
indexed
);
/* Mark with 0 the table columns already contained in new_index */
for
(
i
=
0
;
i
<
new_index
->
n_def
;
i
++
)
{
...
...
@@ -1893,7 +1891,7 @@ dict_index_build_internal_clust(
if
(
field
->
prefix_len
==
0
)
{
field
->
col
->
aux
=
0
;
indexed
[
field
->
col
->
ind
]
=
TRUE
;
}
}
...
...
@@ -1904,11 +1902,13 @@ dict_index_build_internal_clust(
col
=
dict_table_get_nth_col
(
table
,
i
);
ut_ad
(
col
->
type
.
mtype
!=
DATA_SYS
);
if
(
col
->
aux
==
ULINT_UNDEFINED
)
{
if
(
!
indexed
[
col
->
ind
]
)
{
dict_index_add_col
(
new_index
,
col
,
0
);
}
}
mem_free
(
indexed
);
ut_ad
((
index
->
type
&
DICT_IBUF
)
||
(
UT_LIST_GET_LEN
(
table
->
indexes
)
==
0
));
...
...
@@ -1946,6 +1946,7 @@ dict_index_build_internal_non_clust(
dict_index_t
*
new_index
;
dict_index_t
*
clust_index
;
ulint
i
;
ibool
*
indexed
;
ut_ad
(
table
&&
index
);
ut_ad
(
0
==
(
index
->
type
&
DICT_CLUSTERED
));
...
...
@@ -1976,13 +1977,9 @@ dict_index_build_internal_non_clust(
/* Copy fields from index to new_index */
dict_index_copy
(
new_index
,
index
,
0
,
index
->
n_fields
);
/* Set the auxiliary variables in the clust_index unique columns
as undefined */
for
(
i
=
0
;
i
<
clust_index
->
n_uniq
;
i
++
)
{
field
=
dict_index_get_nth_field
(
clust_index
,
i
);
field
->
col
->
aux
=
ULINT_UNDEFINED
;
}
/* Remember the table columns already contained in new_index */
indexed
=
mem_alloc
(
table
->
n_cols
*
sizeof
*
indexed
);
memset
(
indexed
,
0
,
table
->
n_cols
*
sizeof
*
indexed
);
/* Mark with 0 table columns already contained in new_index */
for
(
i
=
0
;
i
<
new_index
->
n_def
;
i
++
)
{
...
...
@@ -1994,7 +1991,7 @@ dict_index_build_internal_non_clust(
if
(
field
->
prefix_len
==
0
)
{
field
->
col
->
aux
=
0
;
indexed
[
field
->
col
->
ind
]
=
TRUE
;
}
}
...
...
@@ -2005,12 +2002,14 @@ dict_index_build_internal_non_clust(
field
=
dict_index_get_nth_field
(
clust_index
,
i
);
if
(
field
->
col
->
aux
==
ULINT_UNDEFINED
)
{
if
(
!
indexed
[
field
->
col
->
ind
]
)
{
dict_index_add_col
(
new_index
,
field
->
col
,
field
->
prefix_len
);
}
}
mem_free
(
indexed
);
if
((
index
->
type
)
&
DICT_UNIQUE
)
{
new_index
->
n_uniq
=
index
->
n_fields
;
}
else
{
...
...
include/dict0mem.h
View file @
33ed2aa4
...
...
@@ -132,8 +132,6 @@ struct dict_col_struct{
const
char
*
name
;
/* name */
dtype_t
type
;
/* data type */
dict_table_t
*
table
;
/* back pointer to table of this column */
ulint
aux
;
/* this is used as an auxiliary variable
in some of the functions below */
};
/* DICT_MAX_INDEX_COL_LEN is measured in bytes and is the max index column
...
...
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