Data Truncation errors

Issue #222 open
Robert Jäschke created an issue

If the data of a char/varchar/text column is too long during INSERT, mySQL throws a data truncation error and aborts the insertion. (Since mySQL 5.0.3 this is an error before it was a warning and data was inserted truncated) There are several options to cope with this problem:

  • disable data truncation errors (i.e., make them warnings instead of errors), the C API has a call for this, I'm not sure if the Java API has (since it's JDBC ...)

  • truncate all data silently in Bibtex.java (this needs for every column to know its length)

  • make all columns text (and ignore the error on more than 6000 characters (or so))

How will this be handled in BibSonoym2?

Current fix: none. It happened on the column "pages" which is varchar(15).

Comments (2)

  1. Former user Account Deleted

    Commented by dbe: This problem is not yet handled properly in BibSonomy 2. the mentioned error throws still an exception when "too long data" is inserted.

    We really should keep this in mind and handle it properly when migrating the post bibtex pages to the new framework.

  2. Log in to comment