Commit Graph

69 Commits

Author SHA1 Message Date
Ryan Culpepper
b3afbdd485 added unstable/socket 2013-02-14 17:19:08 -05:00
Ryan Culpepper
681558328e add last inserted row, # changes to simple-result info
The info keys are 'insert-id, 'affected-rows, as for mysql.
2013-01-07 19:52:51 -05:00
Ryan Culpepper
a2ae813739 replace db's sql-bits with data/bit-vector 2012-12-16 22:39:02 -05:00
Ryan Culpepper
ce567c861e use define-logger 2012-12-05 12:19:16 -05:00
Ryan Culpepper
fd7d8a412c move lazy-require to racket/lazy-require 2012-12-03 19:28:12 -05:00
Ryan Culpepper
27e9988226 fix hex conversion
closes PR 13335
2012-12-01 11:17:13 -05:00
Ryan Culpepper
30397acc37 use exn:fail:sql for sqlite errors too 2012-12-01 01:33:56 -05:00
Ryan Culpepper
05e7e61d85 added #:option to start-transaction, call-with-transaction 2012-12-01 01:33:56 -05:00
Ryan Culpepper
fa21ce397c add diagnostics for SQLITE_BUSY 2012-11-30 14:42:18 -05:00
Ryan Culpepper
46fb05e6ee ignore reset result, reset on error
Reset result is from last step; looking at it was probably causing
spurious failures and busy-timeouts.

Transaction completion relies on statements being reset reliably.
2012-11-30 14:40:12 -05:00
Ryan Culpepper
c64c325a55 remove redundant statement resets 2012-11-28 17:09:25 -05:00
Ryan Culpepper
0ac903f527 work around missing _v2 functions on old libsqlite3 versions
Missing sqlite3_next_stmt is still a problem, but harder to work
around.
2012-11-28 17:08:53 -05:00
Ryan Culpepper
438f906fb9 reset statement after use 2012-11-28 15:06:06 -05:00
Matthew Flatt
41e9e3e5ff db: add `sqlite3-available?'
Loading `db/sqlite3' no longer raises an exception if
the SQLite library isn't found. Instead, `sqlite3-connect'
raises an exception, while `sqlite3-available?' reports
whether it will work.

The dynamic test allows the documentation-help system
to continue to work if SQLite3 is not available. Currently,
though, `raco setup' still insists on using SQLite3 to
build the database of documented tags.
2012-11-23 18:44:51 -07:00
Ryan Culpepper
8db023c624 add string typeid for mysql char(N) fields
closes PR 13255

Need to add tests, but "select cast(? as char(5))" results in var-string,
not string. Only get string typeid when reading from table.
2012-11-14 20:40:14 -05:00
Eli Barzilay
672910f27b Lots of bad TAB eliminations.
I started from tabs that are not on the beginning of lines, and in
several places I did further cleanings.

If you're worried about knowing who wrote some code, for example, if you
get to this commit in "git blame", then note that you can use the "-w"
flag in many git commands to ignore whitespaces.  For example, to see
per-line authors, use "git blame -w <file>".  Another example: to see
the (*much* smaller) non-whitespace changes in this (or any other)
commit, use "git log -p -w -1 <sha1>".
2012-11-07 11:22:20 -05:00
Ryan Culpepper
203a7a660c db: fix another sqlite3 finalization bug 2012-10-30 12:33:02 -04:00
Ryan Culpepper
8226899df3 db: fix finalization bug 2012-10-22 13:27:59 -04:00
Ryan Culpepper
9d34f0f147 db: added support for postgresql 9.2 types (json, ranges)
Other major changes:
 - pg code now uses only binary format
 - pg timestamptz now always UTC (tz = 0), added doc section
 - added contracts to most pg "can't-convert" errors
2012-09-17 12:29:17 -04:00
Ryan Culpepper
ecb88ffd45 Revert "db: use channel instead of semaphore + result variable"
Using a sync. channel breaks kill-safety.

This reverts commit 8363db9258.
2012-08-28 22:04:05 -04:00
Ryan Culpepper
c5472fbf3e db: eliminate some copying from postgresql message reading 2012-08-25 19:04:24 -04:00
Ryan Culpepper
8363db9258 db: use channel instead of semaphore + result variable 2012-08-25 19:02:18 -04:00
Ryan Culpepper
7c395e9c7c db: updated to new error convention (mostly) 2012-08-25 19:02:18 -04:00
Ryan Culpepper
9bd5a9189b db: use log-based-eval for most examples 2012-08-22 11:55:05 -04:00
Ryan Culpepper
00fd18bc62 db: various fixes and additions
- fix connection-pool for nested tx, fix race condition
 - ensure connected? always nonblocking
 - added and reorganized some doc sections
 - added grouping, contracts to in-query
 - added rows->dict
2012-05-09 09:17:52 -06:00
Eli Barzilay
17090fca4f A bunch of fprintf' -> eprintf' conversions (and a few related things). 2012-05-06 12:06:00 -04:00
Ryan Culpepper
9f492c10a7 db: fix mysql large blobs, other changes
MySQL:
 - support multi-packet data rows
 - fixed very old length-coding bug (24 vs 32 bit length)
 - support large params via long-data packets
 - 'any' pseudo-type for parameters
 - distinguish 'blob'/'text', 'var-string'/'var-binary'
 - read 'text' results as string, not bytes
SQLite3:
 - enabled sql types tests
2012-04-14 19:47:32 -06:00
Ryan Culpepper
c10bf245c5 db: fix mysql close-on-exec slowdown (TCP issue) 2012-03-18 03:31:17 -06:00
Ryan Culpepper
1b7368f80c db: fix memory leaks
- sqlite3: table prevented pst gc unless close-on-exec
 - statement cache wrongly disabled close-on-exec
   (not a leak, just gc'd very slowly)
 - limit statement cache size
2012-03-13 19:50:08 -06:00
Eli Barzilay
c007c345f9 A bunch of more typos like the ones in David's commit. 2012-02-21 14:21:43 -05:00
Ryan Culpepper
766790b9e4 db: clean up disconnect 2012-02-08 22:32:51 -07:00
Ryan Culpepper
f142a1c5f2 db: clean up communication, locking
Disconnect on break exn within lock; other break-safety fixes.
2012-02-08 22:32:51 -07:00
Ryan Culpepper
f5711c6cc3 db: added prepared statement cache 2012-02-08 22:32:51 -07:00
Ryan Culpepper
6fe7e65ff0 db: clean up common tx code 2012-02-08 22:32:51 -07:00
Ryan Culpepper
654ccb277f db: added cursors 2012-02-08 22:32:51 -07:00
Ryan Culpepper
618173c97e db: finalize close-on-exec psts within lock 2012-02-08 22:32:51 -07:00
Ryan Culpepper
4c817d0f7f db: clean up and reogranize common impl code 2012-02-08 22:32:50 -07:00
Ryan Culpepper
0b3691691a db: fix sqlite3 #:use-place for raco exe 2012-01-24 15:28:32 -07:00
Ryan Culpepper
dba35c3116 db: added nested transactions 2012-01-08 23:25:53 -07:00
Ryan Culpepper
6742c308d9 db: fix sqlite3 memory corruption bug 2011-12-16 19:18:46 -07:00
Ryan Culpepper
d312744aae db: make debugging easier 2011-12-13 23:51:31 -07:00
Ryan Culpepper
b355abfdb3 db: allow mysql-connect without db 2011-12-13 22:18:13 -07:00
Ryan Culpepper
fd74709e1c db: implement mysql auth plugin support, old password support
related to PR 12415
2011-12-13 22:17:51 -07:00
Ryan Culpepper
0dcafac0c9 db: improved message debugging for mysql 2011-12-07 13:23:33 -07:00
Ryan Culpepper
f38d959b3a db: fix transaction contract bugs, added transaction tests
closes PR 12364
2011-11-13 15:11:12 -07:00
Ryan Culpepper
b4e856cc3c db: fixed space leak in statement finalizer thread
This "fixes" the segfault in the test program, but it seems
like there must be another underlying problem.
2011-11-13 15:11:12 -07:00
Ryan Culpepper
1dade8ee1d db: added support for postgresql arrays 2011-10-30 18:51:16 -06:00
Ryan Culpepper
717bc17aaf db: adjust lazy requires for cross-place mode 2011-09-27 19:28:44 -06:00
Ryan Culpepper
52a738140d db: minimize dependencies 2011-09-27 19:28:44 -06:00
Ryan Culpepper
36149b92a7 db: added ssl support for mysql connections 2011-09-27 19:28:44 -06:00