summaryrefslogtreecommitdiffstats
path: root/extensions/TrackingFlags/lib
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2013-10-16 16:26:31 +0200
committerByron Jones <bjones@mozilla.com>2013-10-16 16:26:31 +0200
commit4b5b03e55429a6e1c531650aa5be00f624b2bfa2 (patch)
tree11fce978297727eb1f1054c812ec20f87de2f628 /extensions/TrackingFlags/lib
parentbebd1cb6430faa08b9937f1bf2c65af8c8f823ef (diff)
downloadbugzilla-4b5b03e55429a6e1c531650aa5be00f624b2bfa2.tar.gz
bugzilla-4b5b03e55429a6e1c531650aa5be00f624b2bfa2.tar.xz
Bug 926109: Error when searching for many columns at once (MariaDB can only use 61 tables in a join)
Diffstat (limited to 'extensions/TrackingFlags/lib')
-rw-r--r--extensions/TrackingFlags/lib/Flag.pm11
1 files changed, 11 insertions, 0 deletions
diff --git a/extensions/TrackingFlags/lib/Flag.pm b/extensions/TrackingFlags/lib/Flag.pm
index 08886c267..bc422243e 100644
--- a/extensions/TrackingFlags/lib/Flag.pm
+++ b/extensions/TrackingFlags/lib/Flag.pm
@@ -214,6 +214,17 @@ sub get_all {
values %{ $cache->{'tracking_flags'} };
}
+# avoids the overhead of pre-loading if just the field names are required
+sub get_all_names {
+ my $self = shift;
+ my $cache = Bugzilla->request_cache;
+ if (!exists $cache->{'tracking_flags_names'}) {
+ $cache->{'tracking_flags_names'} =
+ Bugzilla->dbh->selectcol_arrayref("SELECT name FROM tracking_flags ORDER BY name");
+ }
+ return @{ $cache->{'tracking_flags_names'} };
+}
+
sub remove_from_db {
my $self = shift;
my $dbh = Bugzilla->dbh;