This project is archived and is in readonly mode.
sqlite missing ddl transactions and savepoints
-
JasonKing
- Tag changed from 2.2, sqlite, sqlite3, sqlite_adapter to 2.3, patch, sqlite, sqlite3, sqlite_adapter
Just noticed another bug in the existing version comparisons. Attaching a new patch including both changesets.
-
Repository
- State changed from new to committed
(from [38136f86dc5504bde94dc7399d4a854023d7481f]) DDL transactions and savepoints for sqlite
Sqlite has had DDL transactions since 2.0.0[1] and savepoints since 3.6.8[2]. This patch updates the connection_adapters.
[1] http://tinyurl.com/sqlite-v2-0-0 [2] http://tinyurl.com/sqlite-v3-6-8
Signed-off-by: Michael Koziarski michael@koziarski.com [#2080 state:committed] http://github.com/rails/rails/co...
-
Repository
- State changed from committed to open
(from [818556ec4f237b19f28fdecdfe6037718cceba37]) Revert "DDL transactions and savepoints for sqlite"
This reverts commit 38136f86dc5504bde94dc7399d4a854023d7481f.
Caused several test failures on the ci box:
http://ci.rubyonrails.org/builds... [#2080 state:open] http://github.com/rails/rails/co...
-
JasonKing
Fixed.
I hadn't run the tests, but have now. All fixed to take account of the old VACUUM call in add_column which was preventing it from being wrapped in a transaction.
-
JasonKing
- Assigned user set to Michael Koziarski
Not sure if I was meant to assign this to you Michael. I haven't seen any action on it, and wanted to make sure it doesn't slip off the plate.
It's a good patch that will give sqlite3 users an important boost - especially for migrations.
-
Michael Koziarski
Yeah, you were meant to assign it to me :)
- def supports_count_distinct? #:nodoc: - false - endWhy did you remove that?
-
JasonKing
Because this is in SQLiteAdapter which SQLite2Adapter inherits from:
@@@ruby def supports_count_distinct? #:nodoc: sqlite_version >= '3.2.6' end @@@@
Which made it redundant in SQLite2Adapter.
-
JasonKing
Oops:
def supports_count_distinct? #:nodoc: sqlite_version >= '3.2.6' end -
JasonKing
Ok, I give up :)
-
Michael Koziarski
Looks good to me, I'll take a proper look tomorrow though.
As for the comments, don't stress, I pretty much only use the emails anyway ;)
-
Michael Koziarski
This doesn't apply cleanly any more? but yes, this looks good and I'm happy to apply it.
-
Michael Koziarski
If you can upload a rebased version that is.
-
JasonKing
Rebased.
-
JasonKing
Just nudging this ticket - I've rebased it again...
-
Jeremy Kemper
- State changed from open to verified
- Milestone cleared.
Works for me. We indent with 2 spaces, not tabs, though.
-
JasonKing
Fixed, and rebased again.
-
Pratik
The patch should also modify migration_test.rb#test_migrator_one_up_with_exception_and_rollback for testing that with sqlite adapters supporting ddl transactions.
-
JasonKing
Thanks. I'll have some time later today (about 8 hours from now) and will take a look and add these tests then.
-
Pratik
- State changed from verified to open
-
Pratik
- Assigned user changed from Michael Koziarski to Pratik
You should probably open a new ticket for the savepoints.
Thanks
-
Repository
- State changed from open to resolved
(from [ac3848201dfd7400708d3ccae0acb9388318fb99]) SQLite adapters now support DDL transactions [#2080 state:resolved]
Signed-off-by: Pratik Naik pratiknaik@gmail.com http://github.com/rails/rails/co...
