# Weird bug in SQLite3

**URL:** <https://www.ruby-forum.com/t/weird-bug-in-sqlite3/101425>\
**Category:** Ruby\
**Created:** [February 6, 2006, 12:41am UTC](https://www.ruby-forum.com/t/weird-bug-in-sqlite3/101425 "2006-02-06T00:41:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dvancoevorden](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/a88e4f/32.png) [@dvancoevorden](https://www.ruby-forum.com/u/dvancoevorden)\
**Post date:** [February 6, 2006, 12:41am UTC](https://www.ruby-forum.com/t/weird-bug-in-sqlite3/101425/1 "2006-02-06T00:41:52Z")

</div>

I was trying to do some remote bugsquashing by SSHing on a Windows  
computer  
running the Cygwin sshd. It’s a clean Cygwin ruby setup, with the  
minimum  
required for Rails, and the SQLite3 Driver compiled with gcc 3.4.4  
(cygming  
special), which seems to fallback to the DL driver after I hacked api.rb  
to  
recognize cygwin as a host.

Whatever Rails is doing to connect to the database, it threw a can’t  
open  
exception or some such. I then tried to recreate that in “irb”, and got  
this  
weird beaviour:

(I edited some gruesome gemspec dum spam from the log)

irb(main):001:0\> require ‘rubygems’  
=\> true  
irb(main):002:0\> 'require require ‘sqlite3’  
=\> false  
irb(main):003:0\> require ‘irb/omp completion’  
=\> true  
irb(main):004:0\> require ‘pp’  
=\> true  
irb(main):005:0\> pp SQLite3. ::Database.new ’ ‘production.sqlitwe  
e3’  
#\<SQLite3::Database:0x661fce0  
@closed=false,  
@driver=#SQLite3::Driver::DL::Driver:0x693f480,  
@gempath\_searcher=  
#\< … \>,  
@handle=#\<DL::PtrData:0x0x102a2430 ptr=0x0x6803430 size=0 free=0x0x0\>,  
@results\_as\_hash=false,  
@statement\_factory=SQLite3::Statement,  
@translator=nil,  
@type\_translation=false\>  
=\> nil  
irb(main):006:0\> quit

I didn’t test if this DB handle actually worked. The next ones I created  
in  
another session looked perfectly normal.

Is this just a really, really weird coinkydink related to my obscure  
setup  
where some DLLs seem to clash and cause strange interpreter states, or  
can it  
be considered a proper bug in one of the parties involved?

David V.

---

<div class="post-metadata">

**Author:** ![dvancoevorden](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/a88e4f/32.png) [@dvancoevorden](https://www.ruby-forum.com/u/dvancoevorden)\
**Post date:** [February 6, 2006, 4:36am UTC](https://www.ruby-forum.com/t/weird-bug-in-sqlite3/101425/2 "2006-02-06T04:36:55Z")

</div>

Sidenote: please ignore the nonsense in the commands I typed, that’s me  
forgetting to edit out the control characters from the tee output. (Does  
IRB  
have any logging features?)

David V.
