Re: [Cgi-session-user] MySQL driver doc bug (was: how load works)
Brought to you by:
sherzodr
From: Justin S. <ju...@sk...> - 2006-07-31 03:26:59
|
Final followup, Dropping the session table and creating this one: CREATE TABLE sessions ( id CHAR(32) NOT NULL PRIMARY KEY, a_session TEXT NOT NULL ); And running the Test::More test Mark made me create has it pass in every case I noted, with or without either of those two lines commented - looks like we're in good shape! Testing the web app itself, I'm seeing similar positive results - multiple copies of the session information are not being created - one session entry per session - perfect. Thanks for all the help, would never have figured that out :) (Justin realizes the power of the Test::More test script, will file in back of mind for later use...) Justin Simoni -- :: is an eccentric artist, living and working in Denver, Colorado :: URL: http://justinsimoni.com :: Mailing List - http://justinsimoni.com/mailing_list.html On Jul 30, 2006, at 9:48 PM, Mark Stosberg wrote: > Justin Simoni wrote: >>> There's probably a bug here. Could you boil this down to a >>> Test::More >>> style test case? It looks like you are nearly there. >> Done! Be gentle - this is my first real Test::More test - I know >> these are supposed to be pretty simple, but setting up all the DBI >> parameters seems a bit verbose, but I've attached it to this >> message, as well as attempted to place it inline (notes to follow >> code): > > Thanks Justin. > > I adapted this test for the SQLite driver... and it passed when it > fails for MySQL. So that points to something MySQL-specific. > Looking at the code for the MySQL driver, it does do something a > little different. It use the non-standard "REPLACE INTO" function. > It's documented here: > > http://sunsite.mff.cuni.cz/MIRRORS/ftp.mysql.com/doc/en/REPLACE.html > > Your test excluded creating the session table itself. Notice in the > docs for REPLACE INTO where it says that if there is no UNIQUE or > PRIMARY KEY constraint, then it will always INSERT, never update. > > That sounds a lot like your case. If that's the issue. we should > add a big note to the MySQL driver about that. > > Mark > > -- > http://mark.stosberg.com/ > > |