Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Ivlev
bugzilla
Commits
d8f3d06a
Commit
d8f3d06a
authored
Apr 15, 2005
by
mkanat%kerio.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 290414: bz_index_info is slightly broken and has unclear API
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=Tomas.Kopal, a=justdave
parent
7be1f1c9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
+13
-5
DB.pm
Bugzilla/DB.pm
+10
-3
Schema.pm
Bugzilla/DB/Schema.pm
+3
-2
No files found.
Bugzilla/DB.pm
View file @
d8f3d06a
...
...
@@ -587,8 +587,12 @@ sub bz_column_info {
sub
bz_index_info
{
my
(
$self
,
$table
,
$index
)
=
@_
;
return
$self
->
_bz_real_schema
->
get_index_abstract
(
$table
,
$index
);
my
$index_def
=
$self
->
_bz_real_schema
->
get_index_abstract
(
$table
,
$index
);
if
(
ref
(
$index_def
)
eq
'ARRAY'
)
{
$index_def
=
{
FIELDS
=>
$index_def
,
TYPE
=>
''
};
}
return
$index_def
;
}
...
...
@@ -1368,7 +1372,10 @@ C<Bugzilla::DB::Schema::ABSTRACT_SCHEMA>.
Description: Get abstract index definition.
Params: $table - The table the index is on.
$index - The name of the index.
Returns: An abstract index definition for that index.
Returns: An abstract index definition for that index,
always in hashref format. The hashref will
always contain the TYPE element, but it will
be an empty string if it's just a normal index.
If the index does not exist, we return undef.
=back
...
...
Bugzilla/DB/Schema.pm
View file @
d8f3d06a
...
...
@@ -1608,8 +1608,9 @@ sub get_index_abstract {
# Prevent a possible dereferencing of an undef hash, if the
# table doesn't exist.
if
(
exists
$self
->
{
abstract_schema
}
->
{
$table
})
{
my
%
indexes
=
(
@
{
$self
->
{
abstract_schema
}{
$table
}{
INDEXES
}
});
my
$index_table
=
$self
->
get_table_abstract
(
$table
);
if
(
$index_table
&&
exists
$index_table
->
{
INDEXES
})
{
my
%
indexes
=
(
@
{
$index_table
->
{
INDEXES
}
});
return
$indexes
{
$index
};
}
return
undef
;
...
...
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