From: Jiří Netolický Date: Mon, 23 Sep 2013 15:41:26 +0000 (+0200) Subject: Bug 919475: [Oracle] Crash when non-mandatory free text custom fields are left empty... X-Git-Tag: bugzilla-4.5.1~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9ddb229412d652238dabd39f8c46d2e81c0466f6;p=thirdparty%2Fbugzilla.git Bug 919475: [Oracle] Crash when non-mandatory free text custom fields are left empty on bug creation r=LpSolit a=justdave --- diff --git a/Bugzilla/DB/Schema/Oracle.pm b/Bugzilla/DB/Schema/Oracle.pm index 1bed5b5cad..1554a0fe19 100644 --- a/Bugzilla/DB/Schema/Oracle.pm +++ b/Bugzilla/DB/Schema/Oracle.pm @@ -205,6 +205,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;