You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by sa...@apache.org on 2016/11/04 22:13:45 UTC
[18/50] [abbrv] phoenix git commit: PHOENIX-3396 Valid Multi-byte
strings whose total byte size is greater than the max char limit cannot be
inserted into VARCHAR fields in the PK
PHOENIX-3396 Valid Multi-byte strings whose total byte size is greater than the max char limit cannot be inserted into VARCHAR fields in the PK
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/6ef3a3f0
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/6ef3a3f0
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/6ef3a3f0
Branch: refs/heads/encodecolumns2
Commit: 6ef3a3f04597df0404601437e6ba17aa7f4f46e5
Parents: 030fb76
Author: James Taylor <ja...@apache.org>
Authored: Fri Oct 28 08:59:13 2016 -0700
Committer: James Taylor <ja...@apache.org>
Committed: Fri Oct 28 17:23:29 2016 -0700
----------------------------------------------------------------------
.../src/test/java/org/apache/phoenix/schema/MutationTest.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/phoenix/blob/6ef3a3f0/phoenix-core/src/test/java/org/apache/phoenix/schema/MutationTest.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/test/java/org/apache/phoenix/schema/MutationTest.java b/phoenix-core/src/test/java/org/apache/phoenix/schema/MutationTest.java
index ce2e22f..e0f48c0 100644
--- a/phoenix-core/src/test/java/org/apache/phoenix/schema/MutationTest.java
+++ b/phoenix-core/src/test/java/org/apache/phoenix/schema/MutationTest.java
@@ -83,8 +83,9 @@ public class MutationTest extends BaseConnectionlessQueryTest {
conn.setAutoCommit(false);
String bvalue = "01234567890123456789";
assertEquals(20,PVarchar.INSTANCE.toBytes(bvalue).length);
- String value = "\u6fb4\u7c96\u87e4\u092f\u893b\u9143\u5ca4\u8c66\ud311\u85b0\u9129\u813c\u056a\ub066\u7889\u7889\u7889\u7889\u7889\u7889";
- assertTrue(value.length() <= maxLength2 && value.getBytes().length > maxLength2);
+ String value = "\u6fb4\u7c96\u87e4\u092f\u893b\u9143\u5ca4\u8c66\ud311\u85b0\u9129\u813c\u056a\ub066\u7889\u7889\u7889\u7889\u7889";
+ assertTrue(value.length() <= maxLength2);
+ assertTrue(PVarchar.INSTANCE.toBytes(value).length > maxLength2);
conn.createStatement().execute("CREATE TABLE t1 (k1 char(" + maxLength1 + ") not null, k2 varchar(" + maxLength2 + "), "
+ "v1 varchar(" + maxLength2 + "), v2 varbinary(" + maxLength2 + "), v3 binary(" + maxLength2 + "), constraint pk primary key (k1, k2))");
conn.createStatement().execute("UPSERT INTO t1 VALUES('a','" + value + "', '" + value + "','" + bvalue + "','" + bvalue + "')");