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
d8aa49be
Commit
d8aa49be
authored
Aug 29, 2006
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/zip: Merge revisions 765:767 from trunk.
parent
38e09b2f
Changes
2
Show 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 @
d8aa49be
...
...
@@ -1785,6 +1785,7 @@ dict_index_build_internal_clust(
ulint
fixed_size
;
ulint
trx_id_pos
;
ulint
i
;
ibool
*
indexed
;
ut_ad
(
table
&&
index
);
ut_ad
(
dict_index_is_clust
(
index
));
...
...
@@ -1879,12 +1880,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
++
)
{
...
...
@@ -1896,7 +1894,7 @@ dict_index_build_internal_clust(
if
(
field
->
prefix_len
==
0
)
{
field
->
col
->
aux
=
0
;
indexed
[
field
->
col
->
ind
]
=
TRUE
;
}
}
...
...
@@ -1907,11 +1905,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
));
...
...
@@ -1949,6 +1949,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
(
!
dict_index_is_clust
(
index
));
...
...
@@ -1979,13 +1980,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
++
)
{
...
...
@@ -1997,7 +1994,7 @@ dict_index_build_internal_non_clust(
if
(
field
->
prefix_len
==
0
)
{
field
->
col
->
aux
=
0
;
indexed
[
field
->
col
->
ind
]
=
TRUE
;
}
}
...
...
@@ -2008,12 +2005,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 @
d8aa49be
...
...
@@ -135,8 +135,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