aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiří Netolický <netolish@netolish.cz>2013-09-23 17:43:00 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2013-09-23 17:43:00 +0200
commitc38c549a63c98fcdeca5a47edeaeba26bff7591f (patch)
treedf3b62412efe450dce1dfea1218f8ff0ffaf11ee
parentfix typo in comment (diff)
downloadbugzilla-c38c549a63c98fcdeca5a47edeaeba26bff7591f.tar.gz
bugzilla-c38c549a63c98fcdeca5a47edeaeba26bff7591f.tar.bz2
bugzilla-c38c549a63c98fcdeca5a47edeaeba26bff7591f.zip
Bug 919475: [Oracle] Crash when non-mandatory free text custom fields are left empty on bug creation
r=LpSolit a=justdave
-rw-r--r--Bugzilla/DB/Schema/Oracle.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/Bugzilla/DB/Schema/Oracle.pm b/Bugzilla/DB/Schema/Oracle.pm
index 381906d2e..a97929726 100644
--- a/Bugzilla/DB/Schema/Oracle.pm
+++ b/Bugzilla/DB/Schema/Oracle.pm
@@ -204,6 +204,10 @@ sub get_add_column_ddl {
}
else {
@sql = $self->SUPER::get_add_column_ddl(@_);
+ # Create triggers to deal with empty string.
+ if ($definition->{TYPE} =~ /varchar|TEXT/i && $definition->{NOTNULL}) {
+ push(@sql, _get_notnull_trigger_ddl($table, $column));
+ }
}
return @sql;