Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: [mv] MV 4: Some notes on successfully setting up some SQL tables in MV 4.



******    message to minivend-users from Mike Heins <mike@minivend.com>     ******

Quoting Mark Stosberg (mark@summersault.com):
> 
> 
> I just set up an empty SQL table with MV 4beta1. I had a few stumbling
> blocks in the process, one potentially serious bug, so I'll post them
> there so that they might help one of you, or that some of ideas might
> make it to the official documention or code. :) First I'll paste in the
> catalog.cfg definitions so that they are easier to talk  about
> 
> <snip>
> Database	sheet_music sheet_music.tab  dbi:Pg:dbname=music;host=my.host.com;port=5432
> Database sheet_music LongReadLen  128
> Database sheet_music USER    	music
> Database	sheet_music NUMERIC	    id,seller_id,price
> 
> Database	sheet_music COLUMN_DEF	id=serial
> Database	sheet_music COLUMN_DEF	seller_id=int4
> Database	sheet_music COLUMN_DEF	composer=varchar(64)
> Database	sheet_music COLUMN_DEF	title=varchar(64)
> Database	sheet_music COLUMN_DEF	ensemble=varchar(32)
> Database	sheet_music COLUMN_DEF	publisher=varchar(64)
> Database	sheet_music COLUMN_DEF	description=text
> Database	sheet_music COLUMN_DEF	price=float
> Database	sheet_music COLUMN_DEF	condition=char(4)
> </snip>
> 
> I discovered that the 'LongReadLen' and USER declarations must come
> _after_  the DSN connection line. Perhaps the docs or the error logs
> could offer further hints about this. Here's what I saw in my error log
> (which did help me debug it):

This is documentation -- that line must be first, for it is what creates
the initial database definition. I don't know if the docs explicitly
state that.

> 
> <log>
> 199.120.185.113 3qB3qUJa:199.120.185.113 - [17/February/2000:23:38:54
> -0500] market-dev /market-dev.cgi/config/dbedit.html Runtime error:
> Couldn't open '/home/music/catalogs/market-dev/products/USER'
> read/write: No such file or directory>
> 199.120.185.113 3qB3qUJa:199.120.185.113 - [17/February/2000:23:41:07
> -0500] market-dev /market-dev.cgi/config/dbedit.html Runtime error:
> Couldn't open '/home/music/catalogs/market-dev/products/LongReadLen'
> read/write: No such file or directory
> </log>
> 
> Once I had those in the right place and restarted the server, Minived
> paused at this catalog configuration and then eventually ran out of
> memory. The problem was that I had not created a the 'sheet_music.tab'
> file I had mentioned. Actually, I left this token out all together in
> the beginning since I didn't actually want to import anything from a
> text database. Then, I tried mentioning the file without it actually
> existing. Minivend most of have gone into a loop trying to open it, thus
> the memory crash. IMHO, Minivend should give up after 5 seconds or so
> and report 'file not found'. 

This is a bug, and I will look at it in due time...thanks
for finding it. 8-)

-- 
Mike Heins                          http://www.minivend.com/  ___ 
                                    Internet Robotics        |_ _|____
Any man who is under 30, and is     131 Willow Lane, Floor 2  | ||  _ \
not liberal, has not heart; and     Oxford, OH  45056         | || |_) |
any man who is over 30, and is not  <mikeh@minivend.com>     |___|  _ <
a conservative, has not brains.     513.523.7621 FAX 7501        |_| \_\
 -- Winston Churchill              
-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: