sounds you're most of the way to a patch

On 16 June 2017 at 22:29, kburjack via H2 Database <
h2-database@googlegroups.com> wrote:

> Thanks for the info.
> I dug into H2's source code and it seems that H2 actually has no notion of
> a "maximum" string length for fixed-length CHAR(N) types. I debugged one of
> the tests in the H2 codebase and in ../dml/Insert.java:143 and ultimately
> ..table/Column.java:167 where the column value is converted to the correct
> column type, the precision/length of the target CHAR(N) type is not
> respected. No matter how small the N in CHAR(N) is, H2 will always happily
> insert any string value into that column and not even generate an SQL error
> if the value is too big. That's where things have to change at least, I
> reckon. The Column.convert(Value) method needs to pass at least its
> Column.precision value into Value.convertTo(int) for that function to
> correctly apply any padding when converting the value to a ValueStringFixed.
>
> --
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to