summaryrefslogtreecommitdiffstats
path: root/Bugzilla/DB.pm
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2008-01-18 22:56:53 +0100
committermkanat%bugzilla.org <>2008-01-18 22:56:53 +0100
commit793c103590ff0742b6163dca25cfc6250c68f803 (patch)
tree854667752ad8e4377c7bc18c2b40177e7f3083da /Bugzilla/DB.pm
parent2c8316b9f30ca3ab96b7e8acd1275253ae3e272f (diff)
downloadbugzilla-793c103590ff0742b6163dca25cfc6250c68f803.tar.gz
bugzilla-793c103590ff0742b6163dca25cfc6250c68f803.tar.xz
Bug 408172: [Oracle] Bug lists longer than 1000 bugs fail
Patch By Xiaoou Wu <xiaoou.wu@oracle.com> r=mkanat, a=mkanat
Diffstat (limited to 'Bugzilla/DB.pm')
-rw-r--r--Bugzilla/DB.pm31
1 files changed, 31 insertions, 0 deletions
diff --git a/Bugzilla/DB.pm b/Bugzilla/DB.pm
index 40cd3e3a1..2a71bcd75 100644
--- a/Bugzilla/DB.pm
+++ b/Bugzilla/DB.pm
@@ -391,6 +391,11 @@ sub sql_string_concat {
return '(' . join(' || ', @params) . ')';
}
+sub sql_in {
+ my ($self, $column_name, $in_list_ref) = @_;
+ return " $column_name IN (" . join(',', @$in_list_ref) . ") ";
+}
+
sub sql_fulltext_search {
my ($self, $column, $text) = @_;
@@ -1918,6 +1923,32 @@ will not be usually used unless it was created as LOWER(column).
=back
+=item C<sql_in>
+
+=over
+
+=item B<Description>
+
+Returns SQL syntax for the C<IN ()> operator.
+
+Only necessary where an C<IN> clause can have more than 1000 items.
+
+=item B<Params>
+
+=over
+
+=item C<$column_name> - Column name (e.g. C<bug_id>)
+
+=item C<$in_list_ref> - an arrayref containing values for C<IN ()>
+
+=back
+
+=item B<Returns>
+
+Formatted SQL for the C<IN> operator.
+
+=back
+
=item C<bz_lock_tables>
=over