From: akbar6393222 at yahoo dot com Operating system: Windows Xp SP3 pro PHP version: 5.2.6 PHP Bug Type: MySQL related Bug description: replace into syntax cannot null for PK in mysql
Description: ------------ I execute this directly on mysql 5.1.25-rc-community on command line, it's work REPLACE INTO qna_content (id,service_id,qna_id,service,sub_service,content,sub_content,publish_date,status,ctn_seq,first_ctn,last_update,update_by) VALUES ( '','1','1','alam', '','tes','','0000-00-00','1', '1', '0', NOW(), 'akbar' ) But in php 5.2.6, trigger error : Incorrect integer value: ' ' for column 'id' at row 1 error number 1366 Reproduce code: --------------- REPLACE INTO qna_content (id,service_id,qna_id,service,sub_service,content,sub_content,publish_date,status,ctn_seq,first_ctn,last_update,update_by) VALUES ( '','1','1','alam', '','tes','','0000-00-00','1', '1', '0', NOW(), 'akbar' ) Expected result: ---------------- I need to be work for that code so I don't need to check another filter validation Actual result: -------------- Incorrect integer value: ' ' for column 'id' at row 1 error number 1366 -- Edit bug report at http://bugs.php.net/?id=46591&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46591&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46591&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46591&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46591&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=46591&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=46591&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46591&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=46591&r=needscript Try newer version: http://bugs.php.net/fix.php?id=46591&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46591&r=support Expected behavior: http://bugs.php.net/fix.php?id=46591&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46591&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46591&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46591&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46591&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=46591&r=dst IIS Stability: http://bugs.php.net/fix.php?id=46591&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46591&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46591&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46591&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=46591&r=mysqlcfg