Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[CONJ-359] test correction : metadata text octet size depend on charset
  • Loading branch information
rusher committed Oct 3, 2016
1 parent 8de9661 commit e609b09
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Expand Up @@ -51,10 +51,10 @@ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWIS
package org.mariadb.jdbc.internal.util.constant;

public final class Version {
public static final String version = "1.5.3";
public static final String version = "1.6.0-SNAPSHOT";
public static final int majorVersion = 1;
public static final int minorVersion = 5;
public static final int patchVersion = 3;
public static final String qualifier = "";
public static final int minorVersion = 6;
public static final int patchVersion = 0;
public static final String qualifier = "SNAPSHOT";

}
7 changes: 4 additions & 3 deletions src/test/java/org/mariadb/jdbc/DatabaseMetadataTest.java
Expand Up @@ -371,7 +371,8 @@ public void testGetTables3() throws SQLException {

@Test
public void testGetColumns() throws SQLException {
createTable("tablegetcolumns", "a INT NOT NULL primary key auto_increment, b VARCHAR(32), c INT AS (a mod 10) VIRTUAL, d VARCHAR(5) AS (left(b,5)) PERSISTENT");
createTable("tablegetcolumns", "a INT NOT NULL primary key auto_increment, b VARCHAR(32), c INT AS (a mod 10) VIRTUAL, d VARCHAR(5) AS (left(b,5)) PERSISTENT", "CHARACTER SET 'utf8mb4'");

DatabaseMetaData dbmd = sharedConnection.getMetaData();
ResultSet rs = dbmd.getColumns(null, null, "tablegetcolumns", null);

Expand Down Expand Up @@ -411,7 +412,7 @@ public void testGetColumns() throws SQLException {
Assert.assertEquals(1, rs.getInt(11)); //NULLABLE
Assert.assertEquals("", rs.getString(12)); //REMARKS
Assert.assertEquals(null, rs.getString(13)); //COLUMN_DEF
Assert.assertEquals(32 * 3, rs.getInt(16)); //CHAR_OCTET_LENGTH
Assert.assertEquals(32 * 4, rs.getInt(16)); //CHAR_OCTET_LENGTH
Assert.assertEquals(2, rs.getInt(17)); //ORDINAL_POSITION
Assert.assertEquals("YES", rs.getString(18)); //IS_NULLABLE
Assert.assertEquals(null, rs.getString(19)); //SCOPE_CATALOG
Expand Down Expand Up @@ -457,7 +458,7 @@ public void testGetColumns() throws SQLException {
Assert.assertEquals(1, rs.getInt(11)); //NULLABLE
Assert.assertEquals("", rs.getString(12)); //REMARKS
Assert.assertEquals(null, rs.getString(13)); //COLUMN_DEF
Assert.assertEquals(5 * 3, rs.getInt(16)); //CHAR_OCTET_LENGTH
Assert.assertEquals(5 * 4, rs.getInt(16)); //CHAR_OCTET_LENGTH
Assert.assertEquals(4, rs.getInt(17)); //ORDINAL_POSITION
Assert.assertEquals("YES", rs.getString(18)); //IS_NULLABLE
Assert.assertEquals(null, rs.getString(19)); //SCOPE_CATALOG
Expand Down

0 comments on commit e609b09

Please sign in to comment.