Welcome Guest, Not a member yet? Register   Sign In
Active Record query cache eating queries. Looks like BUG
#3

[eluser]mikerh[/eluser]
[quote author="jmadsen" date="1353120345"]what is it exactly you are trying to point out?[/quote]

Sorry...your blindness must be affecting you.

Here is the query as I have it in CI.

Code:
$this->db->start_cache();
$this->db->select("
tableb.c_number,
(SELECT
CASE
WHEN GROUP_CONCAT(CONCAT(tablea.a_number,' - ',tablea.b_number),CONCAT(' (',tablea.b_status,') ')) IS NULL
THEN 'NO A_NUMBER'
ELSE GROUP_CONCAT(CONCAT(tablea.a_number,' - ',tablea.b_number),CONCAT(' (',tablea.b_status,') '))
END
FROM tablea
WHERE tablea.c_number = tableb.c_number)
",FALSE);
$this->db->from('tableb');
$this->db->stop_cache();
$this->db->get();

Here is the query that CI is sending to mysql

Code:
SELECT tableb.c_number,
(SELECT
CASE
WHEN GROUP_CONCAT(CONCAT(tablea.a_number, ' - ', tablea.b_number), CONCAT(' (', tablea.b_status, ') ')) IS NULL
THEN 'NO A_NUMBER'
ELSE GROUP_CONCAT(CONCAT(tablea.a_number, ') '))
END
FROM (`tableb`)

If I don't use query cache the query is fine.

Really? You can't see what's in plain English there...did you even try to re-create the issue before replying?


Messages In This Thread
Active Record query cache eating queries. Looks like BUG - by El Forum - 11-16-2012, 08:13 PM



Theme © iAndrew 2016 - Forum software by © MyBB