aboutsummaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2010-04-07 01:54:55 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2010-04-07 01:54:55 +0200
commitc0771f4504ec5eff8de034a443c844d6effb8de0 (patch)
tree3170183e8c638de7fa9638f90665e17e807ba688 /Bugzilla
parent6479bb0febd76bad944eb9a012a96cac8d64cd9a (diff)
downloadbugs-c0771f4504ec5eff8de034a443c844d6effb8de0.tar
bugs-c0771f4504ec5eff8de034a443c844d6effb8de0.tar.gz
bugs-c0771f4504ec5eff8de034a443c844d6effb8de0.tar.bz2
bugs-c0771f4504ec5eff8de034a443c844d6effb8de0.tar.xz
bugs-c0771f4504ec5eff8de034a443c844d6effb8de0.zip
Bug 557495: PostgreSQL crashes when deleting a custom field of type BugID
r/a=mkanat
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Field.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/Bugzilla/Field.pm b/Bugzilla/Field.pm
index 15f84e75f..31ace90e0 100644
--- a/Bugzilla/Field.pm
+++ b/Bugzilla/Field.pm
@@ -821,8 +821,10 @@ sub remove_from_db {
$bugs_query = "SELECT COUNT(*) FROM bug_$name";
}
else {
- $bugs_query = "SELECT COUNT(*) FROM bugs WHERE $name IS NOT NULL
- AND $name != ''";
+ $bugs_query = "SELECT COUNT(*) FROM bugs WHERE $name IS NOT NULL";
+ if ($self->type != FIELD_TYPE_BUG_ID) {
+ $bugs_query .= " AND $name != ''";
+ }
# Ignore the default single select value
if ($self->type == FIELD_TYPE_SINGLE_SELECT) {
$bugs_query .= " AND $name != '---'";