List:General Discussion« Previous MessageNext Message »
From:Anoop kumar V Date:April 28 2005 10:21pm
Subject:No error / warning when data is truncated on insertion into mysql
View as plain text  
I am using MySQL and SQL server with Tomcat. 

Our application writes into both databases (mysql and ms sql server) at once 
based on some data collected from an end user. Now if the end user enters 
more data (characters) than the column can hold, the data obviously gets 
truncated.

But the surprising thing is that although MS SQL server sends a warning 
message to tomcat (seen on the tomcat console) that "data may have been 
truncated" - MySQL does not show any warning message (I would have expected 
an error actually) as the data in the column is not what the data was 
intended to be.
(Actually MS SQL shows the error and does not even insert the data...)

Does MySQL not care or maybe I need to activate some option in MySQL like 
verbose or stict checking etc... It just truncated and inserted the data 
with no warning / error or any hassle!!

how can i force mysql to check for such inconsistencies and report??
-- 
Thanks and best regards,
Anoop

Thread
No error / warning when data is truncated on insertion into mysqlAnoop kumar V29 Apr
  • RE: No error / warning when data is truncated on insertion into mysqlmathias fatene29 Apr
    • Re: No error / warning when data is truncated on insertion into mysqlAnoop kumar V29 Apr
      • Re: No error / warning when data is truncated on insertion into mysqlAnoop kumar V29 Apr
        • Re: No error / warning when data is truncated on insertion intomysqlPaul DuBois29 Apr
Re: No error / warning when data is truncated on insertion into mysqlAnoop kumar V29 Apr