aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/adapters/mysql/mysql_adapter_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Remove unused `pk_and_sequence_for` in AbstractMysqlAdapterRyuta Kamizono2015-10-081-24/+0
| | | | | | `pk_and_sequence_for` is implemented for PG and MySQL adapters (not implemented for Sqlite3 adapter). But MySQL adapters are not using `pk_and_sequence_for` already.
* Eliminate `test_tables_quoting` following seems to be left in #21687Ronak Jangir2015-09-211-8/+0
|
* :scissors: empty line at the top of filesAkira Matsuda2015-09-211-1/+0
|
* Remove unnecessary display widthRyuta Kamizono2015-09-161-4/+4
| | | | | | | The **(11)** does not affect the storage size of the data type, which for an INT will always be 4 bytes. It affects the **display width**. http://www.tocker.ca/2015/07/02/proposal-to-deprecate-mysql-integer-display-width-and-zerofill.html
* make it possible to run AR tests with bin/testYves Senn2015-06-111-1/+1
|
* prefer `drop_table if_exists: true` over raw SQL.Yves Senn2015-02-181-1/+1
| | | | | | | /cc @yahonda This makes it easier for third party adapters to run our tests, even if that database does not support IF EXISTS.
* `Type#type_cast_from_database` -> `Type#deserialize`Sean Griffin2015-02-171-1/+1
|
* Removed magic comments # encoding: utf-8 , since its default from ruby 2.0 ↵Vipul A M2015-02-031-1/+0
| | | | onwards.
* Remove Relation#bind_paramsSean Griffin2015-01-271-3/+3
| | | | | | | | `bound_attributes` is now used universally across the board, removing the need for the conversion layer. These changes are mostly mechanical, with the exception of the log subscriber. Additional, we had to implement `hash` on the attribute objects, so they could be used as a key for query caching.
* Ensures that primary_key method will return nil when multi-pkArthur Neves2014-12-301-0/+6
| | | | | | | When table has a composite primary key, the `primary_key` method for sqlite3 and postgresql was only returning the first field of the key. Ensures that it will return nil instead, as AR dont support composite pks.
* Rename `type_cast` to `type_cast_from_database`Sean Griffin2014-06-091-1/+1
| | | | | | | | In some cases there is a difference between the two, we should always be doing one or the other. For convenience, `type_cast` is still a private method on type, so new types that do not need different behavior don't need to implement two methods, but it has been moved to private so it cannot be used accidentally.
* Clean up tables after each test.Guo Xiang Tan2014-03-221-53/+55
| | | | | | | 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.
* Change the inexistent database name to inexistent_activerecord_unittestYasuo Honda2014-01-011-1/+1
| | | | | | to make this grant statement described in the document works GRANT ALL PRIVILEGES ON inexistent_activerecord_unittest.* to 'rails'@'localhost';
* used user-defined configurations for running tests that might depend on ↵Kuldeep Aggarwal2013-12-291-1/+2
| | | | user's system configuration
* Move mysql2 test for when adapter will be loadedschneems2013-12-241-7/+0
| | | | | | When run with only the Mysql adapter, we get this failure: https://travis-ci.org/rails/rails/jobs/15937907#L2416 Porting the test over to only run when mysql2 is loaded
* Raise NoDatabaseError when db does not existschneems2013-12-241-0/+14
| | | Building on the work of #13427 this PR adds a helpful error message to the adapters: mysql, mysql2, and sqlite3
* 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.
* Define enable_extension method to prevent undefined method errorAntonio Santos2013-08-021-0/+12
| | | | | | | When mixing postgresql and another adapter like sqlite3 (for dev and test respectively), the task `db:test:prepare` will fail due to the `enable_extension` method not being defined in the abstract adapter. This patch simply adds an empty definition to prevent it.
* add failing test exposing mysql adapter tinyint bugphinze2013-05-151-3/+16
| | | | | | in myself, a column with type TINYINT(N) where N > 1 can be used to represent an integer, but the rails mysql adapter refuses to interpret as anything but a boolean.
* Created a layer of abstraction for the valid type checking in schema dumper. ↵Ranjay Krishna2013-03-251-0/+9
| | | | Now, connection handles the check for valid types so that each database can handle the changes individually.
* Revert "checking in the abstractions for valid type checking:"Jon Leighton2013-02-151-9/+0
| | | | | | | | | | | | | | | | This reverts commit c321b309a9a90bbfa0912832c11b3fef52e71840. Conflicts: activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb Reason: failing test 1) Error: test_valid_column(ActiveRecord::ConnectionAdapters::SQLite3AdapterTest): NoMethodError: undefined method `column' for test/cases/adapters/sqlite3/sqlite3_adapter_test.rb:29:in `test_valid_column'
* checking in the abstractions for valid type checking:Ranjay Krishna2013-02-121-0/+9
|
* Remove unnecessary begin..rescue..end, use only rescueAkira Matsuda2013-01-061-7/+5
|
* fixing tests to deal with data differences between prepared statements and ↵Aaron Patterson2012-07-131-1/+3
| | | | | | | non-prepared statements Conflicts: activerecord/test/cases/query_cache_test.rb
* be sure to currectly fetch PK name from MySQL even if the PK has some custom ↵Akira Matsuda2012-04-191-0/+30
| | | | option
* Change the string to use in test case.kennyj2012-03-071-1/+1
|
* Fix message assertions for quoting database name in "show tables" for mysqlCarlos Antonio da Silva2012-03-041-1/+1
|
* Fix GH #3163. Should quote database on mysql/mysql2.kennyj2012-03-051-0/+10
|
* remove checks for encodings availabilitySergey Nartimov2011-12-251-11/+5
|
* 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.
* fixing variable name in mysql testAaron Patterson2011-04-111-1/+1
|
* adding mysql adapter test caseAaron Patterson2011-04-111-0/+69