MySQL Forums
Forum List  »  Other Migration

Re: sql-mode="strict_all_tables" has no effect when using Load Data Infile
Posted by: L Peal
Date: July 28, 2010 12:13PM

Hi, I tried that but no luck. Using 5.1.45 Community Edition.
These are my settings:
SET SQL_MODE=`STRICT_ALL_TABLES,TRADITIONAL,NO_ZERO_DATE,NO_AUTO_VALUE_ON_ZERO,NO_AUTO_VALUE_ON_ZERO,ERROR_FOR_DIVISION_BY_ZERO`;
DROP TABLE pdsn_raw;
CREATE TABLE `pdsn_raw` (
`PDSN_RAW_ID` BIGINT(15) NOT NULL AUTO_INCREMENT,
`INTERNAL_TIMESTAMP` DATETIME NOT NULL,
`IP_ADDRESS` VARCHAR(25) NOT NULL DEFAULT '', .....

I tested it by trying to insert some bad data into my numeric fields and sure enough it converts bad data to 0.

I've tried setting it in the my.cnf file, stopping and restarting the server. As you see, I even tried dropping the table and recreating it with options in effect. I've already spent 2 days trying to figure this out and now have to resort to adding all the data I don't want to the table then deleting it again via a PHP script. If anyone has any ideas about what I did wrong, I greatly appreciate your help.

Thanks

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: sql-mode="strict_all_tables" has no effect when using Load Data Infile
2178
July 28, 2010 12:13PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.