MySQL Forums
Forum List  »  Microsoft SQL Server

Invalid insert does not raise error, yet creates record
Posted by: Dan Vokt
Date: November 08, 2010 05:11AM

I am trying to convert a database from MSSQL to MySQl v5.1.36 under Win2003 server. The conversion is basically OK but I am experiencing some odd behavior using the MySQL database.

I have a table "brands" with a field "name" set to varchar(10).

If I insert an eleven (11) character string, it DOES NOT raise and error creates the record anyway and sets the field to the empty string. In contrast MSSQL DOES raise and error and does not insert the record.

Am I missing something?

I have sql-mode = "traditional" In the [mysqld] section on my.ini.

The value of @@GLOBAL.SQL_MODE =
STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER

Thanks!

-Dan

Options: ReplyQuote


Subject
Written By
Posted
Invalid insert does not raise error, yet creates record
November 08, 2010 05:11AM


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.