Note that there are some explanatory texts on larger screens.

plurals
  1. POSome combo of Rails 3.2.8+ & MySQL not playing well together
    primarykey
    data
    text
    <p>We are in the process of upgrading to Ruby 1.9.3 from 1.8.7 plus trying to update Rails from 3.2.1 to 3.2.8 or 9. Our app works with Ruby 1.9.3-p327 and Rails 3.2.1, but as soon as I upgrade Rails to any higher version, I start seeing MySQL errors:</p> <pre><code>(0.2ms) BEGIN SQL (0.5ms) INSERT INTO `orders` (`cancelled_at`, `completed_at`, `created_at`, `customer_id`, `refunded_at`, `updated_at`, `uuid`, `website_id`, `workflow_state`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) Mysql2::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?, ?, ?, ?, ?, ?, ?, ?, ?)' at line 1: INSERT INTO `orders` (`cancelled_at`, `completed_at`, `created_at`, `customer_id`, `refunded_at`, `updated_at`, `uuid`, `website_id`, `workflow_state`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) (0.1ms) ROLLBACK Completed 500 Internal Server Error in 194ms ActiveRecord::StatementInvalid (Mysql2::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?, ?, ?, ?, ?, ?, ?, ?, ?)' at line 1: INSERT INTO `orders` (`cancelled_at`, `completed_at`, `created_at`, `customer_id`, `refunded_at`, `updated_at`, `uuid`, `website_id`, `workflow_state`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)): app/controllers/search_controller.rb:231:in `build_new_order' app/controllers/search_controller.rb:432:in `add_to_cart?' app/controllers/search_controller.rb:37:in `new' </code></pre> <p>And all we're doing is a basic:</p> <pre><code>@order = Order.create! @website </code></pre> <p>If we just call Order.new or Order.create and check the validity of @order, it passes (@website is also valid). Call save!, we get the MySQL error. We can run the same Order.create! in the console and it passes!!</p> <p>Also, once we see see the error, then the whole site errors. We've seen some issues with Workflow and have 'downgraded' it to 0.8.1. I've tried different versions of MySQL2 (currently using 0.3.11). I've tried using activerecord-mysql2-adapter instead and the site blows up completely. I haven't tried a different version of Paper Trail (currently using 2.6.4) and maybe I'm concentrating too much on the model since it works on in the console. However, the controller does work until we try to add something to the cart and create an Order.</p> <p>Searching the web, rails website, workflow, mysql2 and stack overflow hasn't turned up anything.</p> <p>Has anyone else ran into something similar? Any other suggestions would be appreciated. Thanks!</p> <p>EDIT:</p> <p>The release notes for 3.2.2 say "Query cache instrumentation includes bindings in the payload". So I searched for 'cache instrumentation' and found this:</p> <p><a href="https://github.com/orslumen/record-cache/issues/21" rel="nofollow">https://github.com/orslumen/record-cache/issues/21</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload