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
03ee2cb6
Commit
03ee2cb6
authored
May 08, 2008
by
mkanat%bugzilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 432726: [Oracle] DROP INDEX doesn't hash the index name
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> (module owner) a=mkanat
parent
5ff69349
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
Oracle.pm
Bugzilla/DB/Schema/Oracle.pm
+15
-3
No files found.
Bugzilla/DB/Schema/Oracle.pm
View file @
03ee2cb6
...
...
@@ -105,7 +105,7 @@ sub get_table_ddl {
sub
_get_create_index_ddl
{
my
(
$self
,
$table_name
,
$index_name
,
$index_fields
,
$index_type
)
=
@_
;
$index_name
=
"idx_"
.
substr
(
md5_hex
(
$index_name
),
0
,
20
);
$index_name
=
"idx_"
.
$self
->
_hash_index_name
(
$index_name
);
if
(
$index_type
eq
'FULLTEXT'
)
{
my
$sql
=
"CREATE INDEX $index_name ON $table_name ("
.
join
(
','
,
@$index_fields
)
...
...
@@ -117,7 +117,19 @@ sub _get_create_index_ddl {
return
(
$self
->
SUPER::
_get_create_index_ddl
(
$table_name
,
$index_name
,
$index_fields
,
$index_type
));
}
#eosub--_get_create_index_ddl
}
sub
get_drop_index_ddl
{
my
$self
=
shift
;
my
(
$table
,
$name
)
=
@_
;
$name
=
'idx_'
.
$self
->
_hash_index_name
(
$name
);
return
$self
->
SUPER::
get_drop_index_ddl
(
$table
,
$name
);
}
sub
_hash_index_name
{
return
substr
(
md5_hex
(
$_
[
1
]),
0
,
20
);
}
# Oracle supports the use of FOREIGN KEY integrity constraints
# to define the referential integrity actions, including:
...
...
@@ -175,7 +187,7 @@ sub _get_fk_name {
my
$to_table
=
$references
->
{
TABLE
};
my
$to_column
=
$references
->
{
COLUMN
};
my
$fk_name
=
"${table}_${column}_${to_table}_${to_column}"
;
$fk_name
=
"fk_"
.
substr
(
md5_hex
(
$fk_name
),
0
,
20
);
$fk_name
=
"fk_"
.
$self
->
_hash_index_name
(
$fk_name
);
return
$fk_name
;
}
...
...
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