in reply to Re^5: Is anyone at perlmonks aware that... (browser vs lwp-request)
in thread Is anyone at perlmonks aware that...

I've (again) restarted the Apache server. mod_perl currently throws errors for SQL statements that otherwise run fine, so maybe some memory corruption happens for long-running processes...

DBD::mysql::st execute failed: You have an error in your SQL syntax; c +heck the manual that corresponds to your MySQL server version for the + right syntax to use near ' NOW() )

for

my $in= $DB->getDatabaseHandle->prepare( 'REPLACE INTO iplog( user_id, ip_id, tstamp )' . ' VALUES( ?, ?, NOW() )' ); $in->execute( getId($USER), $ip );

Update: (and looking at the mysql access log, it is even right in its error message (one IP address redacted, the other, blank space is as-is)):

1566594 Query REPLACE INTO iplog( user_id, ip_id, + tstamp ) VALUES( '5348', 1234567890, NOW() ) 1566350 Query REPLACE INTO iplog( user_id, ip_id, + tstamp ) VALUES( '806480', , NOW() )

As to who/what circumstances allow DBD::mysql (3.0008) to create this invalid SQL for the placeholder-guarded statement is quite unclear to me.

Replies are listed 'Best First'.
Re^7: Is anyone at perlmonks aware that... (placeholders)
by tye (Sage) on Jun 02, 2011 at 21:02 UTC