aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb
Commit message (Collapse)AuthorAgeFilesLines
...
| * Possibly clearer way of getting rid of ` and " Seamus Abshere2012-02-011-1/+1
| | | | | | | | | | | | | | | | Incidentally it's also faster... >> a = 'hello "id` world'; Benchmark.realtime { 500_000.times { a.tr('`"', "") } } => 0.7388770580291748 >> a = 'hello "id` world'; Benchmark.realtime { 500_000.times { a.gsub(/[`"]/, "") } } => 1.7843739986419678
* | Fix GH #3163. Should quote database on mysql/mysql2.kennyj2012-03-051-1/+1
| |
* | Fix type_to_sql with text and limit on mysql/mysql2. Fix GH #3931.kennyj2012-02-261-9/+20
| |
* | prepared statements can be disabledAaron Patterson2012-02-211-1/+11
| |
* | more ruby 2.0 respond_to? changesAaron Patterson2012-02-211-1/+1
| |
* | Remove useless argument in #columns.Sebastian Martinez2012-02-021-1/+1
|/
* Fix GH #4754. Remove double-quote when using ANSI_QUOTESkennyj2012-01-311-1/+1
|
* Handle nil in add_index :length option in MySQLPaul Sadauskas2012-01-241-1/+1
| | | | | | | | | | | | | | | | | Our schema.rb is being generated with an `add_index` line similar to this: add_index "foo", ["foo", "bar"], :name => "xxx", :length => {"foo"=>8, "bar=>nil} This is the same as it was on Rails 3.1.3, however, now when that schema.rb is evaluated, its generating bad SQL in MySQL: Mysql::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: CREATE UNIQUE INDEX `xxx` ON `foo` (`foo`(8), `bar`()) This commit adds a check for nil on the length attribute to prevent the empty parens from being output.
* Revert naive O(1) table_exists? implementation.Jon Leighton2011-12-131-5/+8
| | | | | | | | | | It was a bad idea to rescue exceptions here. This can interfere with transaction rollbacks which seems to be the cause of current CI failure. Instead, each adapter should implement its own DB-specific O(1) implementation, and we fall back on the generic, slower, implementation otherwise.
* Use show create table.kennyj2011-12-031-3/+8
|
* implements automatic EXPLAIN logging for slow queriesXavier Noria2011-12-021-74/+0
|
* removing deprecated methodsAaron Patterson2011-11-191-4/+0
|
* adding visitors to the respective adaptersAaron Patterson2011-11-191-0/+1
|
* Use `show index from`. We could fix `pk_and_sequence_for` method's ↵kennyj2011-11-191-18/+2
| | | | performance problem (GH #3678)
* Only used detailed schema introspection when doing a schema dump.Christos Zisopoulos2011-11-181-0/+7
| | | Fixes #3678
* Join method uses empty string by default, so remove itAaron Patterson2011-11-161-2/+2
|
* adds trailing +s to the output of EXPLAIN for MySQLXavier Noria2011-11-071-3/+2
|
* implements AR::Relation#explainXavier Noria2011-11-051-0/+75
| | | | | | | | | | | | | | | | | | | This is a first implementation, EXPLAIN is highly dependent on the database and I have made some compromises. On one hand, the method allows you to run the most common EXPLAIN and that's it. If you want EXPLAIN ANALYZE in PostgreSQL you need to do it by hand. On the other hand, I've tried to construct a string as close as possible to the ones built by the respective shells. The rationale is that IMO the user should feel at home with the output and recognize it at first sight. Per database. I don't know whether this implementation is going to work well. Let's see whether people like it.
* Merge pull request #3525 from kennyj/fix_3440-1Jon Leighton2011-11-051-2/+11
|\ | | | | Fixed an issue id false option is ignored on mysql/mysql2 (fix #3440)
| * Fixed an issue id false option is ignored on mysql/mysql2 (fix #3440)kennyj2011-11-061-2/+11
| |
* | AR changes to support creating ordered (asc, desc) indexesVlad Jebelev2011-11-041-9/+27
|/
* Only use LOWER for mysql case insensitive uniqueness check when column has a ↵Joseph Palermo2011-10-091-4/+23
| | | | case sensitive collation.
* Move the bulk alter table code into the abstract mysql adapter, hence it is ↵Jon Leighton2011-08-291-0/+42
| | | | supported for mysql2 as well now.
* Extract simplified_type into the abstract classJon Leighton2011-08-291-1/+18
|
* Create an AbstractMysqlAdapter to abstract the common code between ↵Jon Leighton2011-08-291-0/+552
MysqlAdapter and Mysql2Adapter.