1

When we visit Cartthrob CT Admin (D=cp&C=addons_modules&M=show_module_cp&module=ct_admin&method=orders), it throws following sql error( error no 1104)

A Database Error Occurred
Error Number: 1104

The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay

SELECT ect.entry_id, ect.title, em.member_id, field_id_38 AS first_name, field_id_44 AS last_name, field_id_34 AS email, ect.status, field_id_23 AS order_total, entry_date FROM exp_channel_titles ect, exp_channel_data ecd LEFT JOIN exp_members em ON field_id_34 = em.email WHERE ect.entry_id = ecd.entry_id AND ecd.channel_id = '4' GROUP BY ect.entry_id ORDER BY entry_date DESC LIMIT 0, 10

Filename: third_party/ct_admin/libraries/Ct_admin_orders.php

Line Number: 198

Somebody suggests to run the following query before that query

SET SQL_BIG_SELECTS=1

But i don't want to change the code. is there any other setting we can do in my.conf so that it will be resolved?(Also i don't want to set any query which need to run again if we restart mysql server).

Btw, We're using EE 2.5.3 and Cartthrob 2.1.5 PHP 5.4.6 and Mysql 5.6.12

Thanks

3
  • Btw, as i've emergency, i've added following line - $this->EE->db->query("SET SQL_BIG_SELECTS=1"); on line# 184, on /ct_admin/libraries/Ct_admin_orders.php, solved the issue.
    – codegeek
    Feb 4 '14 at 6:47
  • I'm the developer of CT Admin so this is very interesting to me. I'm actually working on the 2.0 release, which should be out in a couple days in fact, so I'll add in some sort of mechanism into the core to handle this weird, weird, problem. If you shoot me an email (eric at mithra62 dot com) I'll send you a review copy if you'd like.
    – Eric Lamb
    Feb 4 '14 at 22:55
  • Thanks Eric, I dont need the review copy now but we've plan to upgrade the EE and addons soon, hope you'll handle this on new codebase.
    – codegeek
    Feb 5 '14 at 6:57
3

You can just add it into your my.conf:

max_join_size=#
sql_big_selects=1

but is better to ask CT Admin dev team to add it into code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.