I don't think I opened one.  Here is the extra data I have:

1. When I attempted to run EXPLAIN, I didn't get any results.  I expect it put the DB into a bad state.
2. Optimizing the database seems to have fixed the issue.

On Fri, May 27, 2011 at 7:33 AM, Robert Munteanu <robert.munteanu@gmail.com> wrote:
One extra curiosity - is there an open bug on mantisbt.org/bugs/
related to this?

On Tue, Apr 12, 2011 at 1:21 AM, Robert Munteanu
<robert.munteanu@gmail.com> wrote:
> On Mon, Apr 11, 2011 at 8:53 PM, Victor Boctor <vboctor@gmail.com> wrote:
>> Hi all,
>>
>> I've a MantisBT instance (running 1.2.4) that crafted a query that caused
>> the MySQL server to hit the too many connections error.  According to the
>> hosting support, this query would take hours or days to run and during that
>> time no other queries can run.  These kind of queries are also the likely
>> cause of the occassional errors we hit on our official instance.
>>
>> Here is the query:
>
> Out of curiosity, can you run an EXPLAIN with that query?
>
> Robert
>
>>
>> # Query_time: 31467.114444  Lock_time: 0.001562 Rows_sent: 0
>> Rows_examined: 0
>> SET timestamp=1302537655;
>> SELECT Count( DISTINCT mantis_bug_table.id ) as idcnt   FROM
>> mantis_project_table, mantis_bug_table LEFT JOIN
>> mantis_custom_field_string_table mantis_custom_field_string_table_12 ON
>> mantis_bug_table.id = mantis_custom_field_string_table_12.bug_id AND
>> mantis_custom_field_string_table_12.field_id = 12 LEFT JOIN
>> mantis_custom_field_string_table mantis_custom_field_string_table_15 ON
>> mantis_bug_table.id = mantis_custom_field_string_table_15.bug_id AND
>> mantis_custom_field_string_table_15.field_id = 15 LEFT JOIN
>> mantis_custom_field_string_table mantis_custom_field_string_table_16 ON
>> mantis_bug_table.id = mantis_custom_field_string_table_16.bug_id AND
>> mantis_custom_field_string_table_16.field_id = 16 LEFT JOIN
>> mantis_custom_field_string_table mantis_custom_field_string_table_17 ON
>> mantis_bug_table.id = mantis_custom_field_string_table_17.bug_id AND
>> mantis_custom_field_string_table_17.field_id = 17 LEFT JOIN
>> mantis_custom_field_string_table mantis_custom_field_string_table_18 ON
>> mantis_bug_table.id = mantis_custom_field_string_table_18.bug_id AND
>> mantis_custom_field_string_table_18.field_id = 18 LEFT JOIN
>> mantis_custom_field_string_table mantis_custom_field_string_table_19 ON
>> mantis_bug_table.id = mantis_custom_field_string_table_19.bug_id AND
>> mantis_custom_field_string_table_19.field_id = 19 LEFT JOIN
>> mantis_custom_field_string_table mantis_custom_field_string_table_21 ON
>> mantis_bug_table.id = mantis_custom_field_string_table_21.bug_id AND
>> mantis_custom_field_string_table_21.field_id = 21 LEFT JOIN
>> mantis_custom_field_string_table mantis_custom_field_string_table_22 ON
>> mantis_bug_table.id = mantis_custom_field_string_table_22.bug_id AND
>> mantis_custom_field_string_table_22.field_id = 22 LEFT JOIN
>> mantis_custom_field_string_table mantis_custom_field_string_table_23 ON
>> mantis_bug_table.id = mantis_custom_field_string_table_23.bug_id AND
>> mantis_custom_field_string_table_23.field_id = 23 LEFT JOIN
>> mantis_custom_field_string_table mantis_custom_field_string_table_24 ON
>> mantis_bug_table.id = mantis_custom_field_string_table_24.bug_id AND
>> mantis_custom_field_string_table_24.field_id = 24 LEFT JOIN
>> mantis_custom_field_string_table mantis_custom_field_string_table_25 ON
>> mantis_bug_table.id = mantis_custom_field_string_table_25.bug_id AND
>> mantis_custom_field_string_table_25.field_id = 25 LEFT JOIN
>> mantis_custom_field_string_table mantis_custom_field_string_table_27 ON
>> mantis_bug_table.id = mantis_custom_field_string_table_27.bug_id AND
>> mantis_custom_field_string_table_27.field_id = 27 LEFT JOIN
>> mantis_custom_field_string_table mantis_custom_field_string_table_28 ON
>> mantis_bug_table.id = mantis_custom_field_string_table_28.bug_id AND
>> mantis_custom_field_string_table_28.field_id = 28 LEFT JOIN
>> mantis_custom_field_string_table mantis_custom_field_string_table_29 ON
>> mantis_bug_table.id = mantis_custom_field_string_table_29.bug_id AND
>> mantis_custom_field_string_table_29.field_id = 29 LEFT JOIN
>> mantis_custom_field_string_table mantis_custom_field_string_table_30 ON
>> mantis_bug_table.id = mantis_custom_field_string_table_30.bug_id AND
>> mantis_custom_field_string_table_30.field_id = 30 LEFT JOIN
>> mantis_custom_field_string_table mantis_custom_field_string_table_31 ON
>> mantis_bug_table.id = mantis_custom_field_string_table_31.bug_id AND
>> mantis_custom_field_string_table_31.field_id = 31 LEFT JOIN
>> mantis_custom_field_string_table mantis_custom_field_string_table_32 ON
>> mantis_bug_table.id = mantis_custom_field_string_table_32.bug_id AND
>> mantis_custom_field_string_table_32.field_id = 32 LEFT JOIN
>> mantis_custom_field_string_table mantis_custom_field_string_table_33 ON
>> mantis_bug_table.id = mantis_custom_field_string_table_33.bug_id AND
>> mantis_custom_field_string_table_33.field_id = 33 LEFT JOIN
>> mantis_custom_field_string_table mantis_custom_field_string_table_34 ON
>> mantis_bug_table.id = mantis_custom_field_string_table_34.bug_id AND
>> mantis_custom_field_string_table_34.field_id = 34 LEFT JOIN
>> mantis_custom_field_string_table mantis_custom_field_string_table_36 ON
>> mantis_bug_table.id = mantis_custom_field_string_table_36.bug_id AND
>> mantis_custom_field_string_table_36.field_id = 36 LEFT JOIN
>> mantis_custom_field_string_table mantis_custom_field_string_table_37 ON
>> mantis_bug_table.id = mantis_custom_field_string_table_37.bug_id AND
>> mantis_custom_field_string_table_37.field_id = 37 LEFT JOIN
>> mantis_custom_field_string_table mantis_custom_field_string_table_38 ON
>> mantis_bug_table.id = mantis_custom_field_string_table_38.bug_id AND
>> mantis_custom_field_string_table_38.field_id = 38 LEFT JOIN
>> mantis_custom_field_string_table mantis_custom_field_string_table_39 ON
>> mantis_bug_table.id = mantis_custom_field_string_table_39.bug_id AND
>> mantis_custom_field_string_table_39.field_id = 39 LEFT JOIN
>> mantis_custom_field_string_table mantis_custom_field_string_table_40 ON
>> mantis_bug_table.id = mantis_custom_field_string_table_40.bug_id AND
>> mantis_custom_field_string_table_40.field_id = 40 WHERE
>> mantis_project_table.enabled = 1 AND mantis_project_table.id =
>> mantis_bug_table.project_id AND ( mantis_bug_table.project_id in (28, 18,
>> 41, 37, 57, 33, 60, 63, 65, 71, 50, 75, 78, 95, 91, 86, 69, 87, 82, 84,
>> 89, 92, 93, 80, 9, 72, 45, 38, 101, 96, 54) ) AND (
>> mantis_bug_table.category_id in ( SELECT id FROM mantis_category_table
>> WHERE name='Billing') ) AND ( mantis_bug_table.status in (10, 20, 30, 40,
>> 50, 80) ) AND ( mantis_bug_table.build='' ) AND
>> (mantis_custom_field_string_table_12.value = 'Pcakage definition') AND
>> ((mantis_custom_field_string_table_15.value LIKE '%|N|%')) AND
>> ((mantis_custom_field_string_table_16.value LIKE '%|Y|%')) AND
>> ((mantis_custom_field_string_table_17.value LIKE '%|Y|%')) AND
>> (mantis_custom_field_string_table_18.value = 'Performance') AND
>> ((mantis_custom_field_string_table_19.value LIKE '%|Y|%')) AND
>> ((mantis_custom_field_string_table_21.value LIKE '%|N|%')) AND
>> ((mantis_custom_field_string_table_22.value LIKE '%|N|%')) AND
>> ((mantis_custom_field_string_table_23.value LIKE '%|Y|%')) AND
>> (mantis_custom_field_string_table_24.value = 'TKSV - Turkey') AND
>> ((mantis_custom_field_string_table_25.value LIKE '%|Y|%')) AND
>> (mantis_custom_field_string_table_27.value = 'Both') AND
>> (mantis_custom_field_string_table_28.value = 'Both') AND
>> ((mantis_custom_field_string_table_29.value LIKE '%|Five|%')) AND
>> (mantis_custom_field_string_table_30.value = 'R-01631') AND
>> (mantis_custom_field_string_table_31.value = 'PM Approved') AND
>> ((mantis_custom_field_string_table_32.value LIKE '%|Y|%')) AND
>> (mantis_custom_field_string_table_33.value = 'Other') AND
>> (mantis_custom_field_string_table_34.value = 'sp1-60') AND
>> ((mantis_custom_field_string_table_36.value LIKE '%|Y|%')) AND
>> ((mantis_custom_field_string_table_37.value LIKE '%|Y|%')) AND
>> (mantis_custom_field_string_table_38.value = 'Updated message structure
>> in request.') AND (mantis_custom_field_string_table_39.value = 'New
>> Requirement') AND (mantis_custom_field_string_table_40.value = 'xyz);
>>
>> Thanks,
>> -Victor
>> ------------------------------------------------------------------------------
>> Xperia(TM) PLAY
>> It's a major breakthrough. An authentic gaming
>> smartphone on the nation's most reliable network.
>> And it wants your games.
>> http://p.sf.net/sfu/verizon-sfdev
>> _______________________________________________
>> mantisbt-dev mailing list
>> mantisbt-dev@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/mantisbt-dev
>>
>>
>
>
>
> --
> Sent from my (old) computer
>



--
Sent from my (old) computer

------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery,
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now.
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
mantisbt-dev mailing list
mantisbt-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mantisbt-dev