
Setting the database adapter to sqlite3 in a dm-rails app segfaults on 1.9.2-preview3
Reported by Postmodern | June 17th, 2010 @ 04:22 AM | in 1.0.2
While struggling to get rspec to work, I accidentally changed the adapter for the test database to 'sqlite3'. When invoking any rake task which created a connection to the test database, a segfault occurred. This was on 1.9.2-preview3, but other versions could be effected as well.
Steps to reproduce:
$ rails new test_rails_sqlite3 -m http://datamapper.org/templates/rails.rb
$ cd test_rails_sqlite3
$ bundle install
$ rails generate model User name:string
# Accidentally change the default adapter in config/database.yml to "sqlite3"
$ rake db:migrate --trace
$ rake db:automigrate --trace
Comments and changes to this ticket
-
Martin Gamsjaeger (snusnu) June 17th, 2010 @ 07:32 AM
- State changed from new to resolved
- Assigned user changed from Dirkjan Bussink to Martin Gamsjaeger (snusnu)
I can't reproduce this on master and I think it's related to #1325
-
Postmodern June 17th, 2010 @ 04:45 PM
I'm not getting segfaults when using the "sqlite" adapter, when bundling against dm-rails edge.
-
Postmodern June 17th, 2010 @ 04:48 PM
Ah, dbussink hasn't pushed the fix yet. Please leave marked as unresolved until we can confirm this has been fixed.
-
Martin Gamsjaeger (snusnu) June 17th, 2010 @ 05:10 PM
- State changed from resolved to unconfirmed
Ok, unconfirmed, but i couldn't replicate the segfault on my ruby-1.9.2-preview3. Neither with sqlite, nor with sqlite3.
-
Postmodern June 19th, 2010 @ 07:55 PM
This segfault appears to be from the fact that the 'database' option being passed to SqliteAdapter is a Pathname object. Normalizing the 'database' option to a String fixes the segfault.
http://github.com/postmodern/dm-sqlite-adapter/commit/7588c0c69ff58...
-
Martin Gamsjaeger (snusnu) June 24th, 2010 @ 06:39 PM
- Milestone set to 1.0.2
- State changed from unconfirmed to confirmed
-
Dan Kubb (dkubb) June 27th, 2010 @ 10:10 AM
- Milestone order changed from 0 to 0
(from [528fe377b687c978d33e583e240b3ec627e4a28b]) do_sqlite3 expects :database and :path options to be Strings
Once do_sqlite3 accepts both a Pathname or a String,
normalizing the database and path won't be necessary
anymore[#1324 state_resolved] http://github.com/datamapper/dm-sqlite-adapter/commit/528fe377b687c...
-
Martin Gamsjaeger (snusnu) June 27th, 2010 @ 10:11 AM
- State changed from confirmed to resolved
Hehe, I mixed up the LH ticket resolving handle in the commit msg.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
People watching this ticket
Tags
Referenced by
-
1324 Setting the database adapter to sqlite3 in a dm-rails app segfaults on 1.9.2-preview3 [#1324 state_resolved] http://github.com/datamapper/dm-s...