diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2018-12-06 05:23:39 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2018-12-11 05:08:59 +0900 |
commit | cf71f31e2e152eceeb311aea6eadba3f2a814d81 (patch) | |
tree | 9c1499216fc66bf0774e3e7d3e88318811f3f950 /activesupport/lib/active_support/railtie.rb | |
parent | bde898c1df17722a83e5e8866b2009273c5190c6 (diff) | |
download | rails-cf71f31e2e152eceeb311aea6eadba3f2a814d81.tar.gz rails-cf71f31e2e152eceeb311aea6eadba3f2a814d81.tar.bz2 rails-cf71f31e2e152eceeb311aea6eadba3f2a814d81.zip |
Prevent write queries with prepared statements for mysql2 adapter
Without this change, mysql2 adapter with prepared statements won't pass
`base_test.rb`.
```
% ARCONN=mysql2 be ruby -w -Itest test/cases/base_test.rb
Using mysql2
Run options: --seed 27614
# Running:
....S..............................F
Failure:
BasicsTest#test_creating_a_record_raises_if_preventing_writes [test/cases/base_test.rb:1493]:
ActiveRecord::ReadOnlyError expected but nothing was raised.
rails test test/cases/base_test.rb:1492
...F
Failure:
BasicsTest#test_deleting_a_record_raises_if_preventing_writes [test/cases/base_test.rb:1513]:
ActiveRecord::ReadOnlyError expected but nothing was raised.
rails test test/cases/base_test.rb:1510
............................................................................................................F
Failure:
BasicsTest#test_updating_a_record_raises_if_preventing_writes [test/cases/base_test.rb:1503]:
ActiveRecord::ReadOnlyError expected but nothing was raised.
rails test test/cases/base_test.rb:1500
..........
Finished in 2.534490s, 62.7345 runs/s, 149.5370 assertions/s.
159 runs, 379 assertions, 3 failures, 0 errors, 1 skips
```
Diffstat (limited to 'activesupport/lib/active_support/railtie.rb')
0 files changed, 0 insertions, 0 deletions