In Prep for TPC...

Matts on 2004-07-21T21:22:34

I thought I'd bring you all this gift:

The uploaded file

DBD-SQLite-1.00.tar.gz

has entered CPAN as

file: $CPAN/authors/id/M/MS/MSERGEANT/DBD-SQLite-1.00.tar.gz size: 423215 bytes md5: f45880ccd6dffe8bd2c785e0c064a02a

No action is required on your part Request entered by: MSERGEANT (Matt Sergeant) Request entered on: Wed, 21 Jul 2004 21:18:42 GMT Request completed: Wed, 21 Jul 2004 21:19:34 GMT

Thanks, -- paused, v460
Changes:

1.00 - Port to sqlite3 API - Support bind types SQL_BLOB, SQL_NUMBER, SQL_TEXT etc - Support $dbh->last_insert_id() - Added timeout API

(I forgot to document the timeout API though - oops)


Incompatible?

2shortplanks on 2004-07-22T08:19:28

Won't this break all the aplications that install DBD::SQLite off of cpan and expect it to be able to read a version 2 database?

Re:Incompatible?

yudel on 2004-07-22T15:05:28

Yup! I just upgraded from .27 to 1.0, hoping to solve a sqllite/Moveable Type bug, and.... well, I'm glad I exported my postings first!

Question: Are there any utilities for converting version 1 dbs?

Re:Incompatible?

2shortplanks on 2004-07-22T15:16:26

This document on the sqlite website that was linked to in a previous journal entry seems to suggest:
sqlite OLD.DB .dump | sqlite3 NEW.DB

Re:Incompatible?

yudel on 2004-07-22T20:51:24

Isn't the point of sqlite the fact that it's embedded? Because I don't seem to have any sqlite command line on my server.

(I am, of course, now in the process of installing one).

Re:Incompatible?

yudel on 2004-07-22T21:32:31

OK, it's not that hard. Here's a few more of the steps on a linux machine:

go to sqlite.org and download sqlite v.3 from

http://www.sqlite.org/download.html

Download version 2 as well

gunzip sqlite*.gz

copy sqlite3-3.0.3.bin to /usr/bin as sqlite3

copy sqlite-2.8.15.bin to /usr/bin as sqlite

chmod 755 sql*

Then, with the two different programs properly named, the command above works quite well:

          sqlite OLD.DB .dump | sqlite3 NEW.DB

Re:Incompatible?

Matts on 2004-07-22T21:17:46

That's why there are big warnings when you run Makefile.PL if you have <1.0 installed.

There's little else I can do without investing a HUGE amount of time into it, and nobody is paying me to do that :-)

Re:Incompatible?

yudel on 2004-07-22T21:35:50

Yup, I saw the warnings. That's why I made sure to export my databases so it wasn't a total disaster :-)

Since the translation to the new format is relatively simple (now that I've figured it out), maybe a web page with simple upgrade instructions and more detailed warnings could be set up? Something along the lines of

CAUTION: Upgrading will make previous databases unreadable without manulal intervention. See http://sqlite.perl.org for details.

I'll volunteer to write a draft of the web page if you think that's worthwhile.

Re:Incompatible?

yudel on 2004-07-22T21:37:14

Oops! Bad formatting. I meant to say this:

Yup, I saw the warnings. That's why I made sure to export my databases so it wasn't a total disaster :-)

Since the translation to the new format is relatively simple (now that I've figured it out), maybe a web page with simple upgrade instructions and more detailed warnings could be set up? Something along the lines of

CAUTION: Upgrading will make previous databases unreadable without manulal intervention. See http://sqlite.perl.org for details.

I'll volunteer to write a draft of the web page if you think that's worthwhile.

This may be a bug....

yudel on 2004-07-22T21:49:28

Running MT 2.66 with DBI::SQLite 1.0 screws the dates all up.

This is true whether I create a new database or upgrade from an old database.

Take a look at http://www.demsformars.com/ and you'll see some truly amazing dates.

Updated URL.

yudel on 2004-07-22T21:58:22

http://www.demsformars.com/index-bug.html

(I'm rebuilding the main site)

Re:Updated URL.

Matts on 2004-07-22T22:04:11

Awesome :-)

I can't really help without seeing SQL.