Zen Cart Logo
Forums / General Questions / Incorrect key file for table '/tmp/#sql_767b_0.MYI'; try to repair it

Incorrect key file for table '/tmp/#sql_767b_0.MYI'; try to repair it

Locked

Views: 10,526

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
6 Aug 2007, 1:04 PM
#1
hollygds avatar

hollygds

New Zenner

Join Date:
Feb 2007
Posts:
36
Plugin Contributions:
0

Incorrect key file for table '/tmp/#sql_767b_0.MYI'; try to repair it

When i go into shop admin and the to Customers > Orders, I'm getting this error:

126 Incorrect key file for table '/tmp/#sql_767b_0.MYI'; try to repair it
in:
[select o.orders_id, o.customers_id, o.customers_name, o.payment_method, o.shipping_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total, o.customers_company, o.customers_email_address, o.customers_street_address, o.delivery_company, o.delivery_name, o.delivery_street_address, o.billing_company, o.billing_name, o.billing_street_address, o.payment_module_code, o.shipping_module_code, o.ip_address from zen_orders o left join zen_orders_total ot on (o.orders_id = ot.orders_id), zen_orders_status s where o.orders_status = s.orders_status_id and s.language_id = '1' and ot.class = 'ot_total' order by o.orders_id DESC limit 0, 20]

I'm assuming that this particular script is creating a temp table so I have no way to go in and repair it. This table has 52,000 records in it so could that be the problem?

6 Aug 2007, 3:50 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Incorrect key file for table '/tmp/#sql_767b_0.MYI'; try to repair it

You might want to backup your database then try a repair on the orders and orders_total and orders_status tables ...

6 Aug 2007, 7:03 PM
#3
hollygds avatar

hollygds

New Zenner

Join Date:
Feb 2007
Posts:
36
Plugin Contributions:
0

Re: Incorrect key file for table '/tmp/#sql_767b_0.MYI'; try to repair it

unfortunately that didn't do the trick. I've repaired all tables beginning with "order" as well as the customers table. Same error.

Any other thoughts?

6 Aug 2007, 11:03 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Incorrect key file for table '/tmp/#sql_767b_0.MYI'; try to repair it

hollygds:

unfortunately that didn't do the trick. I've repaired all tables beginning with "order" as well as the customers table. Same error.

Any other thoughts?

The tables affected by that query on your server are:

  • zen_orders
  • zen_orders_total
  • zen_orders_status

I would suggest these approaches:

  • ensure that the /tmp folder and drive have no quota/space restrictions, and that your mysql process has sufficient rights to create its temporary files there without limitations (talk to your hosting company)
  • repair those tables
  • drop and rebuild all the indexes on those tables
  • worst case, backup what you have now and restore from a working copy