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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
882d0395
Commit
882d0395
authored
Sep 23, 2005
by
mkanat%kerio.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 308717: Column name "PUBLIC" in SERIES table is an Oracle reserved word
Patch By Lance Larsh <lance.larsh@oracle.com> r=mkanat, a=justdave
parent
fa82fac5
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
6 deletions
+15
-6
Schema.pm
Bugzilla/DB/Schema.pm
+1
-1
Series.pm
Bugzilla/Series.pm
+6
-5
checksetup.pl
checksetup.pl
+8
-0
No files found.
Bugzilla/DB/Schema.pm
View file @
882d0395
...
...
@@ -873,7 +873,7 @@ use constant ABSTRACT_SCHEMA => {
frequency
=>
{
TYPE
=>
'INT2'
,
NOTNULL
=>
1
},
last_viewed
=>
{
TYPE
=>
'DATETIME'
},
query
=>
{
TYPE
=>
'MEDIUMTEXT'
,
NOTNULL
=>
1
},
public
=>
{
TYPE
=>
'BOOLEAN'
,
NOTNULL
=>
1
,
is_public
=>
{
TYPE
=>
'BOOLEAN'
,
NOTNULL
=>
1
,
DEFAULT
=>
'FALSE'
},
],
INDEXES
=>
[
...
...
Bugzilla/Series.pm
View file @
882d0395
...
...
@@ -18,6 +18,7 @@
# Rights Reserved.
#
# Contributor(s): Gervase Markham <gerv@gerv.net>
# Lance Larsh <lance.larsh@oracle.com>
use
strict
;
use
lib
"."
;
...
...
@@ -90,7 +91,7 @@ sub initFromDatabase {
my
$dbh
=
Bugzilla
->
dbh
;
my
@series
=
$dbh
->
selectrow_array
(
"SELECT series.series_id, cc1.name, "
.
"cc2.name, series.name, series.creator, series.frequency, "
.
"series.query, series.public "
.
"series.query, series.
is_
public "
.
"FROM series "
.
"LEFT JOIN series_categories AS cc1 "
.
" ON series.category = cc1.id "
.
...
...
@@ -103,11 +104,11 @@ sub initFromDatabase {
" AND ugm.user_id = "
.
Bugzilla
->
user
->
id
.
" AND isbless = 0 "
.
"WHERE series.series_id = $series_id AND "
.
"(public = 1 OR creator = "
.
Bugzilla
->
user
->
id
.
" OR "
.
"(
is_
public = 1 OR creator = "
.
Bugzilla
->
user
->
id
.
" OR "
.
"(ugm.group_id IS NOT NULL)) "
.
$dbh
->
sql_group_by
(
'series.series_id'
,
'cc1.name, cc2.name, '
.
'series.name, series.creator, series.frequency, '
.
'series.query, series.public'
));
'series.query, series.
is_
public'
));
if
(
@series
)
{
$self
->
initFromParameters
(
@series
);
...
...
@@ -189,7 +190,7 @@ sub writeToDatabase {
my
$dbh
=
Bugzilla
->
dbh
;
$dbh
->
do
(
"UPDATE series SET "
.
"category = ?, subcategory = ?,"
.
"name = ?, frequency = ?, public = ? "
.
"name = ?, frequency = ?,
is_
public = ? "
.
"WHERE series_id = ?"
,
undef
,
$category_id
,
$subcategory_id
,
$self
->
{
'name'
},
$self
->
{
'frequency'
},
$self
->
{
'public'
},
...
...
@@ -198,7 +199,7 @@ sub writeToDatabase {
else
{
# Insert the new series into the series table
$dbh
->
do
(
"INSERT INTO series (creator, category, subcategory, "
.
"name, frequency, query, public) VALUES "
.
"name, frequency, query,
is_
public) VALUES "
.
"($self->{'creator'}, "
.
"$category_id, $subcategory_id, "
.
$dbh
->
quote
(
$self
->
{
'name'
})
.
", $self->{'frequency'},"
.
...
...
checksetup.pl
View file @
882d0395
...
...
@@ -4031,6 +4031,14 @@ if ($dbh->bz_column_info("attachments", "thedata")) {
$dbh
->
bz_drop_column
(
"attachments"
,
"thedata"
);
}
# 2005-09-15 lance.larsh@oracle.com Bug 308717
if
(
$dbh
->
bz_column_info
(
"series"
,
"public"
))
{
# PUBLIC is a reserved word in Oracle, so renaming the column
# PUBLIC in table SERIES avoids having to quote the column name
# in every query against that table
$dbh
->
bz_rename_column
(
'series'
,
'public'
,
'is_public'
);
}
# If you had to change the --TABLE-- definition in any way, then add your
# differential change code *** A B O V E *** this comment.
...
...
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