[ 
https://issues.apache.org/jira/browse/IGNITE-24152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17922722#comment-17922722
 ] 

Evgeny Stanilovsky commented on IGNITE-24152:
---------------------------------------------

[~korlov] [~mzhuravkov] guys plz make a review

> Sql. Dml. Varbinary value in dynamic parameter is truncated if its length is 
> larger than 65536 
> -----------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-24152
>                 URL: https://issues.apache.org/jira/browse/IGNITE-24152
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>    Affects Versions: 3.0.0-beta1
>            Reporter: Maksim Zhuravkov
>            Assignee: Evgeny Stanilovsky
>            Priority: Major
>              Labels: ignite-3
>             Fix For: 3.1
>
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> it is possible to create a table with that has a VARBINARY column with length 
> that is larger than 65536 but inserting byte strings longer than 65536 
> results in data truncation upon write. 
> {code:java}
> @Test
>     public void test() {
>         sql("CREATE TABLE t(id INT PRIMARY KEY, val VARBINARY(2000000))");
>         Object s = "1".repeat(1024*1024*20).getBytes(StandardCharsets.UTF_8);
>         sql("INSERT INTO t VALUES(1, ?)", s);
>         for (var row : sql("SELECT id, val FROM t")) {
>             byte[] bytes = (byte[]) row.get(1);
>             System.err.println( bytes.length);
>             // Prints 65536
>         }
>     }
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to