From f28375f006a3c0a47c26c736c53fb6023cd3c836 Mon Sep 17 00:00:00 2001
From: Tomas Cohen Arazi <tomascohen@gmail.com>
Date: Tue, 29 Oct 2013 18:39:22 -0300
Subject: [PATCH] Bug 11163: Wrong itemtype usage count when deleting an
 itemtype

Wrong usage of UNION instead of UNION ALL prevented the count to match
the expected value.

Regards
To+
---
 admin/itemtypes.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/admin/itemtypes.pl b/admin/itemtypes.pl
index ee70238..3c33073 100755
--- a/admin/itemtypes.pl
+++ b/admin/itemtypes.pl
@@ -200,7 +200,7 @@ elsif ( $op eq 'delete_confirm' ) {
     my $sth = $dbh->prepare('
         SELECT COUNT(*) AS total FROM (
             SELECT itemtype AS t FROM biblioitems
-            UNION
+            UNION ALL
             SELECT itype AS t FROM items
         ) AS tmp
         WHERE tmp.t=?
-- 
1.8.3.2