in reply to Bitten by the lazy execution bug?

Can you show your replace_code table CREATE statement?

Also did you try to explicit define colunms? Like so:

REPLACE INTO reference_code (col_name_1, col_name_2, col_name_3) VALUES (?, ?, ?)

Replies are listed 'Best First'.
Re^2: Bitten by the lazy execution bug?
by Anonymous Monk on Dec 08, 2007 at 20:53 UTC
    I'm glad you asked that, because it forced me to take a hard look at the full create statement (as given by show create table reference_code (Did I mention I'm using a mysql db?)):
    CREATE TABLE `reference_code` ( `processor` enum('PTP','GNC') default NULL, `code` varchar(255) NOT NULL default '', `explanation` text NOT NULL )
    (minus indexes and other miscellanea) It's interesting that the two columns that have defaults specified don't need their respective variables ( $1 and $2) messed with. I tried recreating the table with a default for the explanation column, but apparently blob's can't have defaults as the default option was silently dropped. I also checked to see if, after a successful run of the script (using the  my $x=$3; method), any "processor" values were null or any "code" values were '', and they weren't.