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
a2944816
Commit
a2944816
authored
Apr 16, 2007
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/zip: Make use of the function dict_index_is_unique().
parent
39dc9f71
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
12 deletions
+12
-12
dict/dict0dict.c
dict/dict0dict.c
+5
-5
include/ibuf0ibuf.ic
include/ibuf0ibuf.ic
+1
-1
row/row0ins.c
row/row0ins.c
+4
-4
row/row0mysql.c
row/row0mysql.c
+1
-1
row/row0sel.c
row/row0sel.c
+1
-1
No files found.
dict/dict0dict.c
View file @
a2944816
...
...
@@ -1669,7 +1669,7 @@ dict_index_build_internal_clust(
new_index
->
n_uniq
=
REC_MAX_N_FIELDS
;
}
else
if
(
index
->
type
&
DICT_UNIQUE
)
{
}
else
if
(
dict_index_is_unique
(
index
)
)
{
/* Only the fields defined so far are needed to identify
the index entry uniquely */
...
...
@@ -1696,7 +1696,7 @@ dict_index_build_internal_clust(
# error "DATA_ROLL_PTR != 2"
#endif
if
(
!
(
index
->
type
&
DICT_UNIQUE
))
{
if
(
!
dict_index_is_unique
(
index
))
{
dict_index_add_col
(
new_index
,
table
,
dict_table_get_sys_col
(
table
,
DATA_ROW_ID
),
...
...
@@ -1855,7 +1855,7 @@ dict_index_build_internal_non_clust(
mem_free
(
indexed
);
if
(
(
index
->
type
)
&
DICT_UNIQUE
)
{
if
(
dict_index_is_unique
(
index
)
)
{
new_index
->
n_uniq
=
index
->
n_fields
;
}
else
{
new_index
->
n_uniq
=
new_index
->
n_def
;
...
...
@@ -4171,9 +4171,9 @@ dict_index_print_low(
n_vals
=
index
->
stat_n_diff_key_vals
[
1
];
}
if
(
index
->
type
&
DICT_CLUSTERED
)
{
if
(
dict_index_is_clust
(
index
)
)
{
type_string
=
"clustered index"
;
}
else
if
(
index
->
type
&
DICT_UNIQUE
)
{
}
else
if
(
dict_index_is_unique
(
index
)
)
{
type_string
=
"unique index"
;
}
else
{
type_string
=
"secondary index"
;
...
...
include/ibuf0ibuf.ic
View file @
a2944816
...
...
@@ -89,7 +89,7 @@ ibuf_should_try(
decide */
{
if (!dict_index_is_clust(index)
&& (ignore_sec_unique || !
(index->type & DICT_UNIQUE
))) {
&& (ignore_sec_unique || !
dict_index_is_unique(index
))) {
ibuf_flush_count++;
...
...
row/row0ins.c
View file @
a2944816
...
...
@@ -1813,7 +1813,7 @@ row_ins_duplicate_error_in_clust(
UT_NOT_USED
(
mtr
);
ut_a
(
dict_index_is_clust
(
cursor
->
index
));
ut_ad
(
cursor
->
index
->
type
&
DICT_UNIQUE
);
ut_ad
(
dict_index_is_unique
(
cursor
->
index
)
);
/* NOTE: For unique non-clustered indexes there may be any number
of delete marked records with the same value for the non-clustered
...
...
@@ -2052,8 +2052,8 @@ row_ins_index_entry_low(
n_unique
=
dict_index_get_n_unique
(
index
);
if
(
index
->
type
&
DICT_UNIQUE
&&
(
cursor
.
up_match
>=
n_unique
||
cursor
.
low_match
>=
n_unique
))
{
if
(
dict_index_is_unique
(
index
)
&&
(
cursor
.
up_match
>=
n_unique
||
cursor
.
low_match
>=
n_unique
))
{
if
(
dict_index_is_clust
(
index
))
{
/* Note that the following may return also
...
...
@@ -2291,7 +2291,7 @@ row_ins_alloc_row_id_step(
ut_ad
(
node
->
state
==
INS_NODE_ALLOC_ROW_ID
);
if
(
dict_
table_get_first_index
(
node
->
table
)
->
type
&
DICT_UNIQUE
)
{
if
(
dict_
index_is_unique
(
dict_table_get_first_index
(
node
->
table
))
)
{
/* No row id is stored if the clustered index is unique */
...
...
row/row0mysql.c
View file @
a2944816
...
...
@@ -4200,7 +4200,7 @@ row_scan_and_check_index(
rec_print_new
(
stderr
,
rec
,
offsets
);
putc
(
'\n'
,
stderr
);
is_ok
=
FALSE
;
}
else
if
(
(
index
->
type
&
DICT_UNIQUE
)
}
else
if
(
dict_index_is_unique
(
index
)
&&
!
contains_null
&&
matched_fields
>=
dict_index_get_n_ordering_defined_by_user
(
...
...
row/row0sel.c
View file @
a2944816
...
...
@@ -3462,7 +3462,7 @@ row_search_for_mysql(
locks when locking delete-marked records. */
if
(
match_mode
==
ROW_SEL_EXACT
&&
index
->
type
&
DICT_UNIQUE
&&
dict_index_is_unique
(
index
)
&&
dtuple_get_n_fields
(
search_tuple
)
==
dict_index_get_n_unique
(
index
)
&&
(
dict_index_is_clust
(
index
)
...
...
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