public void testBug81196() throws Exception { createSchemaObject(this.stmt, "DATABASE", "TestDb", "CHARACTER SET utf8mb4"); createTable("TestDb.TestTable", "(`id` int AUTO_INCREMENT NOT NULL, `name` varchar(50) NULL," + "CONSTRAINT `PK_LastViewedMatch_id` PRIMARY KEY (`id`))" + " ENGINE=InnoDB AUTO_INCREMENT=1 CHARSET=utf8mb4 DEFAULT COLLATE utf8mb4_unicode_ci"); Connection conn1 = getConnectionWithProps("jdbc:mysql://localhost:3306/TestDb", "user=root,password=pwd,useUnicode=true,characterEncoding=utf8"); // characterSetResults=utf8,,connectionCollation=utf8mb4_unicode_ci Statement st1 = conn1.createStatement(); st1.executeUpdate("SET NAMES utf8mb4"); st1.executeUpdate("INSERT INTO TestTable(name) VALUES ('𠜎')"); ResultSet rs1 = st1.executeQuery("SELECT * from TestTable"); assertTrue(rs1.next()); System.out.println(rs1.getString(2)); assertEquals("𠜎", rs1.getString(2)); }