MySQL Forums
Forum List  »  Quality Assurance

Re: REPLACE INTO fails when data to be truncated is in the first row
Posted by: cresley battlelite
Date: March 25, 2013 06:58PM

Not a bug. I raised a bug report http://bugs.mysql.com/bug.php?id=68769 .

Issue initially found via JDBC code, but by changing sql_mode in MySQL Workbench was able to get consistent behaviour (all rows inserted/replaced with truncation).

We need sql_mode set to NO_ENGINE_SUBSTITUTION

Tried with the session setting in JDBC, issue still occuring - strange!

A little further digging found a reference to JDBC compliance

see Mark Matthews comment on
http://bugs.mysql.com/bug.php?id=23371

Finally the arg to fix it all and allow all data through but truncated.

jdbc:mysql://HOST:PORT/SCHEMA?jdbcCompliantTruncation=false&sessionVariables=sql_mode='NO_ENGINE_SUBSTITUTION'



Edited 1 time(s). Last edit at 03/25/2013 09:40PM by cresley battlelite.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: REPLACE INTO fails when data to be truncated is in the first row
1571
March 25, 2013 06:58PM


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.