Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails 3.2 Explains causing weird issues with document uploads

This is a weird issue that I couldn't find any mention of in Google.

I am sometimes encountering this exception within transactions that include a document upload to AWS S3.

Mysql2::Error: Table 'app_name_development.begin' doesn't exist: EXPLAIN BEGIN

Turning off explains by commenting out this line in the environment config resolves the issue:

# config.active_record.auto_explain_threshold_in_seconds = 0.5

I'm running MySQL.

like image 950
twmills Avatar asked Nov 13 '22 05:11

twmills


1 Answers

Your problem is that you are running an older version of rails and it does not have the fixes for non-CRUD based explains: https://github.com/rails/rails/pull/7657

The problem is in activerecord itself.

like image 79
Michael Avatar answered Dec 10 '22 05:12

Michael