aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
Commit message (Collapse)AuthorAgeFilesLines
* Fixed many references to the old config/environment.rb and Rails::InitializerBenjamin Quorning2010-07-131-1/+1
|
* Remove block definition from method, is not needed since yield is used inside.Emilio Tagua2010-06-241-1/+1
|
* MySQL: require 2.7 or later so we can rely on result.each_hashJeremy Kemper2010-06-051-49/+8
|
* Revert "Don't carry default value when changing column for a binary type on ↵Jeremy Kemper2010-05-181-5/+1
| | | | | | | | | | | | | | MySQL" Broke mysql tests. This reverts commit edec1afe25014749f0e2df86d27477b45586a9e3. Conflicts: activerecord/test/cases/migration_test.rb [#3234 state:open]
* Don't carry default value when changing column for a binary type on MySQL ↵Elomar França2010-05-161-1/+5
| | | | | | [#3234 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Better code formatting and proper line numbers for stack tracesNeeraj Singh2010-05-141-15/+15
| | | | | | [#4596 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Revert "Revert "Add index length support for MySQL [#1852 state:open]""Pratik Naik2010-05-091-1/+14
| | | | This reverts commit 6626833db13a69786f9f6cd56b9f53c4017c3e39.
* Revert "Add index length support for MySQL [#1852 state:open]"José Valim2010-05-081-14/+1
| | | | | | | | | | | | | This commit breaks dumping a few tables, as the sessions table. To reproduce, just create a new application and: rake db:sessions:create rake db:migrate rake db:test:prepare And then look at the db/schema.rb file (ht: Sam Ruby). This reverts commit 5b95730edc33ee97f53da26a3868eb983305a771.
* Add index length support for MySQL [#1852 state:resolved]Emili Parreno2010-05-081-1/+14
| | | | | | | | | | | | Example: add_index(:accounts, :name, :name => 'by_name', :length => 10) => CREATE INDEX by_name ON accounts(name(10)) add_index(:accounts, [:name, :surname], :name => 'by_name_surname', :length => {:name => 10, :surname => 15}) => CREATE INDEX by_name_surname ON accounts(name(10), surname(15)) Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* adds missing requires for Object#blank? and Object#present?Xavier Noria2010-03-281-0/+1
|
* Revert "primary_key now supports :limit for MySQL". Break Sam Ruby app.José Valim2010-03-271-16/+10
| | | | | | To reproduce, start a new application, create a scaffold and run test suite. [#876 state:open] This reverts commit faeca694b3d4afebf6b623b493e86731e773c462.
* primary_key now supports :limit for MySQLRizwan Reza2010-03-271-10/+16
| | | | Signed-off-by: wycats <wycats@gmail.com>
* Revert "primary_key now supports :limit. [#876 state:resolved]" since it ↵José Valim2010-03-271-16/+10
| | | | | | broke AR test suite. This reverts commit 41e5c7ed44fedb95636ef9b7a792c46ea03309bd.
* primary_key now supports :limit. [#876 state:resolved]Rizwan Reza2010-03-271-10/+16
| | | | Signed-off-by: wycats <wycats@gmail.com>
* Better MySQL Error message. [#3775 state:resolved]Rizwan Reza2010-03-261-1/+1
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Add add_limit_offset! to adapters.Emilio Tagua2010-03-251-0/+12
|
* Silenced "SHOW FIELDS" and "SET SQL_AUTO_IS_NULL=0" statements from the ↵David Heinemeier Hansson2010-02-061-4/+8
| | | | MySQL driver to improve log signal to noise ration in development [DHH]
* Expose connections available in the connection pool.José Valim2010-01-111-0/+2
|
* Add support for Mysql column positioning via #add_column and #change_columnBen Marini2009-12-031-0/+15
| | | | | | | | | | | | | | add_column and change_column in the Mysql adapter now accept some additional options: :first => true # Put the column in front of all the columns :after => column_name # Put the colmn after 'column_name' add_column :new_col, :string, :first => true add_column :another_col, :integer, :default => 0, :after => :new_col [#3286 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Merge commit 'rails/master'Emilio Tagua2009-09-211-1/+4
|\
| * Enable use of MySQL stored procedures by default.Justin Bailey2009-09-171-1/+4
| | | | | | | | | | | | [#3204 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* | Merge commit 'rails/master'Emilio Tagua2009-09-141-1/+2
|\|
| * Ruby 1.9 compat: corrected instance_methods checksdsykes2009-09-131-1/+2
| | | | | | | | | | | | [#3156 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* | Merge commit 'rails/master'Emilio Tagua2009-08-101-8/+17
|\| | | | | | | | | | | | | Conflicts: activerecord/lib/active_record/calculations.rb activerecord/lib/active_record/connection_adapters/mysql_adapter.rb activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
| * raises exception (ActiveRecord::ConfigurationError with message) on habtm ↵Jaime Bellmyer2009-08-091-0/+10
| | | | | | | | | | | | association creation if join table contains a primary key Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
| * AR should respect default values for MySQL BINARY and VARBINARY columns.Jatinder Singh2009-08-091-2/+2
| | | | | | | | | | | | [#1273 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
| * No longer require database name for MySQL to allow cross database selects.Tristan Dunn2009-08-091-6/+1
| | | | | | | | | | | | [#1122 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
| * Allow connect_timeout, read_timeout and write_timeout settings for MySQL ↵Matt Conway2009-08-091-0/+4
| | | | | | | | | | | | [#2544 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* | Merge commit 'rails/master'Emilio Tagua2009-06-301-0/+13
|\| | | | | | | | | Conflicts: activerecord/test/cases/adapter_test.rb
| * Make sure the wrapped exceptions also have the original exception available.Michael Koziarski2009-06-261-2/+2
| | | | | | | | [#2419 state:committed]
| * Translate foreign key violations to ActiveRecord::InvalidForeignKey exceptions.Michael Schuerig2009-06-261-0/+2
| | | | | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com>
| * Translate adapter errors that indicate a violated uniqueness constraint to ↵Michael Schuerig2009-06-261-0/+11
| | | | | | | | | | | | ActiveRecord::RecordNotUnique exception derived from ActiveReecord::StatementInvalid. Signed-off-by: Michael Koziarski <michael@koziarski.com>
* | Removed unused methods.Emilio Tagua2009-06-231-12/+0
| |
* | Refactors to work with latest Arel implementation.Emilio Tagua2009-06-021-0/+1
| |
* | Merge commit 'rails/master'Emilio Tagua2009-05-181-0/+1
|\| | | | | | | | | | | | | | | Conflicts: activerecord/lib/active_record/base.rb activerecord/lib/active_record/migration.rb activerecord/test/cases/helper.rb
| * Cherry-pick core extensionsJeremy Kemper2009-05-131-0/+1
| |
* | construct_finder_sql now use ArelEmilio Tagua2009-04-241-1/+1
|/
* Mysql#reconnect is set according to the 'reconnect' key in the connection spec.Dov Murik2009-01-271-2/+5
| | | | | | | | | | | | The 'reconenct' boolean option is read from the connection specification and is used to set the reconnect attribute of Mysql. The default is false in order not to change existing application behaviour. Also, reconnect is set AFTER real_connect is called, so its value sticks (the mysql gem sets reconnect to false inside real_connect). Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1797 state:committed]
* Merge branch 'master' into savepointsJeremy Kemper2009-01-101-15/+26
|\
| * Inline code comments for class_eval/module_eval [#1657 state:resolved]Xavier Noria2008-12-281-11/+13
| | | | | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
| * Free MySQL::Result objects after a call to execute [#1416 state:resolved]Manfred Stienstra2008-12-181-4/+13
| | | | | | | | | | | | | | | | No freeing Result objects causes the MySQL driver to free result sets at undefined times, this can lead to erratic performance in your application. Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com>
* | Merge commit 'origin/master' into savepointsHongli Lai (Phusion)2008-12-091-6/+9
|\|
| * Merge with docrailsPratik Naik2008-12-071-6/+9
| |
| * Revert commit which breaks all the tests.Michael Koziarski2008-11-071-8/+4
| | | | | | | | | | | | | | | | This reverts commit 8adb79b9b5983cda8dbdd4ef401661fbd51d8844. Conflicts: activerecord/CHANGELOG
| * Stop logging SHOW FIELDS and SET SQL_AUTO_IS_NULL=0 for the MysqlAdapter as ↵David Heinemeier Hansson2008-11-061-4/+8
| | | | | | | | they only clutter up the log and offer no value [DHH]
* | Make SQLite3 pass the unit tests for savepoints.Hongli Lai (Phusion)2008-11-031-0/+4
| |
* | Implement savepoints.Jonathan Viney2008-11-031-0/+11
|/
* don't quote decimal values for mysql. It doesn't make sense and breaks in ↵Aliaksey Kandratsenka2008-10-041-1/+1
| | | | | | | newer versions of mysql Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1168 state:committed]
* Make sure recreate MySQL test database with the proper encoding and ↵Luca Guidi2008-10-031-2/+2
| | | | | | | collation [#1165 state:resolved] Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1165 state:committed]
* Deal with MySQL's quirky handling of defaults and blob/text columnsFrederick Cheung2008-09-141-1/+6
| | | | | | [#1043 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>