You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2019/11/10 10:16:05 UTC

[GitHub] [incubator-shardingsphere] dongzl commented on a change in pull request #3488: Fix three mistakes

dongzl commented on a change in pull request #3488: Fix three mistakes
URL: https://github.com/apache/incubator-shardingsphere/pull/3488#discussion_r344483406
 
 

 ##########
 File path: sharding-core/sharding-core-execute/src/main/java/org/apache/shardingsphere/core/execute/metadata/TableMetaDataLoader.java
 ##########
 @@ -165,8 +174,9 @@ private boolean isTableExist(final Connection connection, final String catalog,
                 String columnName = resultSet.getString(COLUMN_NAME);
                 String columnType = resultSet.getString(TYPE_NAME);
                 boolean isPrimaryKey = primaryKeys.contains(columnName);
-                boolean isNotNull = isPrimaryKey || !resultSet.getBoolean(IS_NULLABLE);
-                boolean isAutoIncrement = resultSet.getBoolean(IS_AUTOINCREMENT);
+                boolean isNotNull = isPrimaryKey || !resultSet.getString(IS_NULLABLE).equalsIgnoreCase("YES");
+                String autoIncrement = resultSet.getString(IS_AUTOINCREMENT);
+                boolean isAutoIncrement = autoIncrement.equalsIgnoreCase("YES");
 
 Review comment:
   Hi @beijing-penguin ,
   
   Why `IS_NULLABLE ` and `IS_AUTOINCREMENT ` use `getString()` method?
   
   Does The `getBoolean ` method get mistake value in some database?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services