Skip to content

Commit

Permalink
[CONJ-1068] ResultSetMetaData.getColumnTypeName() returns VARCHAR ins…
Browse files Browse the repository at this point in the history
…tead of TINYTEXT
  • Loading branch information
rusher committed Jun 17, 2024
1 parent d094b85 commit 9330b44
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/mariadb/jdbc/client/column/BlobColumn.java
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ public String getColumnTypeName(final Configuration conf) {
} else {
if (columnLength < 0) {
return "LONGTEXT";
} else if (getDisplaySize() <= 65532) {
return "VARCHAR";
} else if (getDisplaySize() <= 255) {
return "TINYTEXT";
} else if (getDisplaySize() <= 65535) {
return "TEXT";
} else if (getDisplaySize() <= 16777215) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2753,7 +2753,7 @@ public void getTypeMetaData() throws SQLException {
"varchar100 12 VARCHAR 100",
"varchar255 12 VARCHAR 255",
"text 12 TEXT 65535",
"tinytext 12 VARCHAR 255",
"tinytext 12 TINYTEXT 255",
"mediumtext 12 MEDIUMTEXT 16777215",
"longtext -1 LONGTEXT 0"
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ public void getNClob(ResultSet rs) throws Exception {
public void getMetaData() throws SQLException {
ResultSet rs = get();
ResultSetMetaData meta = rs.getMetaData();
assertEquals("VARCHAR", meta.getColumnTypeName(1));
assertEquals("TINYTEXT", meta.getColumnTypeName(1));
assertEquals(sharedConn.getCatalog(), meta.getCatalogName(1));
assertEquals("java.lang.String", meta.getColumnClassName(1));
assertEquals("t1alias", meta.getColumnLabel(1));
Expand Down

0 comments on commit 9330b44

Please sign in to comment.