Re: [Cgi-session-user] MySQL driver doc bug (was: how load works)
Brought to you by:
sherzodr
From: Mark S. <ma...@su...> - 2006-07-31 02:52:20
|
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/ |