This project is archived and is in readonly mode.
sqlite missing ddl transactions and savepoints
Reported by JasonKing | February 26th, 2009 @ 05:54 AM
The sqlite adapter is out of date regarding ddl transactions and savepoint support. This patch updates it.
Hard for you guys to confirm, so I have the forum post from drh where he states when DDL support in transactions came into sqlite, and the commit history of sqlite showing when savepoints arrived.
Comments and changes to this ticket
-
JasonKing February 26th, 2009 @ 10:34 AM
- 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 March 2nd, 2009 @ 05:47 AM
- 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 March 2nd, 2009 @ 06:09 AM
- 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 March 2nd, 2009 @ 11:06 AM
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 March 5th, 2009 @ 11:06 PM
- 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 March 5th, 2009 @ 11:23 PM
Yeah, you were meant to assign it to me :)
- def supports_count_distinct? #:nodoc: - false - end
Why did you remove that?
-
JasonKing March 6th, 2009 @ 01:35 AM
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 March 6th, 2009 @ 01:36 AM
Oops:
def supports_count_distinct? #:nodoc: sqlite_version >= '3.2.6' end
-
Michael Koziarski March 6th, 2009 @ 02:54 AM
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 March 9th, 2009 @ 08:02 AM
This doesn't apply cleanly any more? but yes, this looks good and I'm happy to apply it.
-
Jeremy Kemper March 11th, 2009 @ 04:08 PM
- State changed from open to verified
- Milestone cleared.
Works for me. We indent with 2 spaces, not tabs, though.
-
Pratik March 12th, 2009 @ 01:37 PM
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.
-
Pratik March 12th, 2009 @ 05:27 PM
This is related to #1651. The patch should incorporate tests from the trac patch if relevant.
-
JasonKing March 13th, 2009 @ 12:34 AM
Thanks. I'll have some time later today (about 8 hours from now) and will take a look and add these tests then.
-
Pratik March 13th, 2009 @ 11:16 AM
- State changed from verified to open
-
JasonKing March 14th, 2009 @ 12:35 PM
Pulled out the savepoint stuff and rebased (and squashed some whitespace I pulled in when I pasted the tests from #1651).
-
Pratik March 14th, 2009 @ 12:52 PM
- Assigned user changed from Michael Koziarski to Pratik
You should probably open a new ticket for the savepoints.
Thanks
-
Repository March 14th, 2009 @ 01:02 PM
- 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...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Tags
Referenced by
- 1 Migrations will not run on a fresh database Signed-off-by: Michael Koziarski michael@koziarski.com [#...
- 2 rake rails:freeze:edge on windows Signed-off-by: Michael Koziarski michael@koziarski.com [#...
- 1 Migrations will not run on a fresh database Signed-off-by: Michael Koziarski michael@koziarski.com [#...
- 2 rake rails:freeze:edge on windows Signed-off-by: Michael Koziarski michael@koziarski.com [#...
- 2080 sqlite missing ddl transactions and savepoints Signed-off-by: Michael Koziarski michael@koziarski.com [#...
- 2080 sqlite missing ddl transactions and savepoints http://ci.rubyonrails.org/builds... [#2080 state:open] h...
- 1651 Sqlite, sqlite3 bug in add_column when column is primary key (Trac #9385) I suspect that Pratik meant to put the ticket #2080 in hi...
- 2080 sqlite missing ddl transactions and savepoints (from [ac3848201dfd7400708d3ccae0acb9388318fb99]) SQLite ...
- 2235 savepoints in sqlite3 I had them patched into #2080 but other tests seemed to b...