Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[CONJ-412] database DECIMAL_DIGITS must have int datatype
  • Loading branch information
rusher committed Jan 31, 2017
1 parent cb7b705 commit 585adeb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/mariadb/jdbc/MariaDbDatabaseMetaData.java
Expand Up @@ -641,10 +641,10 @@ public ResultSet getColumns(String catalog, String schemaPattern, String tableNa
+ " END"
+ " COLUMN_SIZE, 65535 BUFFER_LENGTH, "

+ " CASE DATA_TYPE"
+ " CONVERT (CASE DATA_TYPE"
+ " WHEN 'year' THEN " + (((dataType & MariaSelectResultSet.YEAR_IS_DATE_TYPE) == 0) ? "0":"NUMERIC_SCALE")
+ " WHEN 'tinyint' THEN " + (((dataType & MariaSelectResultSet.TINYINT1_IS_BIT) > 0) ? "0":"NUMERIC_SCALE")
+ " ELSE NUMERIC_SCALE END DECIMAL_DIGITS,"
+ " ELSE NUMERIC_SCALE END, INTEGER) DECIMAL_DIGITS,"

+ " 10 NUM_PREC_RADIX, IF(IS_NULLABLE = 'yes',1,0) NULLABLE,COLUMN_COMMENT REMARKS,"
+ " COLUMN_DEFAULT COLUMN_DEF, 0 SQL_DATA_TYPE, 0 SQL_DATETIME_SUB, "
Expand Down

0 comments on commit 585adeb

Please sign in to comment.