aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/adapters/mysql/connection_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Stringify variables names for mysql connectionsPaul Nikitochkin2014-04-301-0/+8
| | | | | | | For mysql2/mysql adapters, `sql_mode` variable name set in `database.yml` as string, was ignored and `sql_mode` was set to use strict mode. Fixes #14895
* Add ConnectionHelper to refactor tests.Guo Xiang Tan2014-04-031-9/+2
|
* Clean up tables after each test.Guo Xiang Tan2014-03-221-39/+41
| | | | | | | Follow-Up to https://github.com/rails/rails/pull/14400 This ensures that all tables are removed after each test and thereby allowing us to run the tests in a random order.
* Remove `DEFAULT NULL` for primary key column to support MySQL 5.7.3Yasuo Honda2013-12-101-3/+3
| | | | Since MySQL 5.7.3 m13 does now allow primary key column is null.
* Merge pull request #12779 from ↵Aaron Patterson2013-11-151-0/+5
|\ | | | | | | | | dougbarth/dont_swallow_exceptions_during_transactional_statements_in_mysql Don't swallow exceptions in transctional statements
| * Remove tests for not swallowing exceptions.Doug Barth2013-11-151-21/+0
| | | | | | | | From PR, @tenderlove would prefer to not maintain these tests.
| * Don't swallow exceptions in transctional statementsDoug Barth2013-11-051-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MySQL connection adapater swallows all StandardError exceptions, which includes Mysql::Error and Mysql2::Error. The comment in the exception clause claims errors thrown here indicate that transactions aren't supported by the server but that isn't necessarily true. It's possible the MySQL server has gone away and swallowing a failed commit may let the application return a successful response when the data has not been saved. Also, replication libraries like Galera require that the application handle exceptions thrown at BEGIN/COMMIT. I'm unable to determine what version of MySQL threw an exception for transactional statements. I tried as far back as 3.23.49 with InnoDB disabled but BEGIN & COMMIT statements do not throw an error. If there's a real case for this logic to continue, we could instead push this behavior into a configuration setting. The exception swallowing has been there since the beginning: db045dbbf60b53dbe013ef25554fd013baf88134
* | Don't skip tests if we don't need to.Rafael Mendonça França2013-11-081-9/+9
|/ | | | | | | We can conditional define the tests depending on the adapter or connection. Lets keep the skip for fail tests that need to be fixed.
* Removed unused loop variableAnupam Choudhury2013-03-221-1/+1
|
* Skip connection url test when the machine is using socket configuration.Rafael Mendonça França2013-02-241-0/+3
| | | | The connection url parssing don't accept the socket option
* Don't use anonymous classes in connection testsGuillermo Iguaran2013-01-191-3/+5
|
* Session variables for mysql, mysql2, and postgresql adapters can be setAaron Stone2012-12-081-0/+17
| | | | | | | | | in the new 'variables:' hash in each database config section in database.yml. The key-value pairs of this hash will be sent in a 'SET key = value, ...' query on new database connections. The configure_connection methods from mysql and mysql2 into are consolidated into the abstract_mysql base class.
* Remove ActiveRecord::ModelJon Leighton2012-10-261-11/+11
| | | | | | | | | | In the end I think the pain of implementing this seamlessly was not worth the gain provided. The intention was that it would allow plain ruby objects that might not live in your main application to be subclassed and have persistence mixed in. But I've decided that the benefit of doing that is not worth the amount of complexity that the implementation introduced.
* Rename to test_mysql_strict_mode_disabled_dont_override_global_sql_modeYasuo Honda2012-08-221-3/+4
| | | | | | | | | Reason since MySQL 5.6.6-m9 the `sql_mode` default value is `NO_ENGINE_SUBSTITUTION`. This default parameter change is out of control from Rails. This test verifies Rails not overriding the default `@@GLOBAL.sql_mode` value by checking if `@@GLOBAL.sql_mode` is the same as `@@SESSION.sql_mode`.
* fixing tests to deal with data differences between prepared statements and ↵Aaron Patterson2012-07-131-1/+4
| | | | | | | non-prepared statements Conflicts: activerecord/test/cases/query_cache_test.rb
* Add config option, rdoc, tests for mysql(2) STRICT_ALL_TABLES mode.Michael Pearson2012-05-051-0/+13
|
* Fix CIJon Leighton2011-12-281-8/+8
|
* move around testsAaron Patterson2011-07-211-0/+10
|
* please use ruby -I lib:test path/to/test.rb, or export RUBY_OPTAaron Patterson2011-06-061-1/+1
|
* Refactor Active Record test connection setup. Please see the ↵Jon Leighton2011-06-041-1/+1
| | | | RUNNING_UNIT_TESTS file for details, but essentially you can now configure things in test/config.yml. You can also run tests directly via the command line, e.g. ruby path/to/test.rb (no rake needed, uses default db connection from test/config.yml). This will help us fix the CI by enabling us to isolate the different Rails versions to different databases.
* use index based substitution for bind parametersAaron Patterson2011-04-131-1/+1
|
* IdentityMap - misc fixesMarcin Raczkowski2010-11-191-1/+1
| | | | | | - Added IdentityMap to be included into AR::Base - Fixed bug with Mysql namespace missing when running tests only for sqlite - Added sqlite as default connection
* renaming exec in the mysql adapterAaron Patterson2010-11-051-13/+13
|
* mysql tests are mostly passingAaron Patterson2010-10-261-0/+58
|
* Bug Fix -- clean up connection after stored procedure [#3151 state:resolved]Jeff Lawson2010-08-171-0/+1
|
* fixed indentation in test casesMark Turner2010-08-111-1/+1
| | | | Signed-off-by: wycats <wycats@gmail.com>
* reorganizing adapter specific tests. [#4974 state:resolved]Aaron Patterson2010-06-251-0/+64
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>