Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
11.4.8
-
Not for Release Notes
Description
We noticed metadata request behaviour change after upgrading from 11.4.7 to 11.4.8
When a column has no default value:
11.4.7 resultSet.getString("COLUMN_DEF") returns null
11.4.8 resultSet.getString("COLUMN_DEF") returns "NULL" (string)
JDBC driver version - 3.5.5
@Test
|
public void testDefault() throws SQLException { |
var dataSource = DATA_SOURCE;
|
var connection = dataSource.getConnection();
|
var metadata = connection.getMetaData();
|
var catalog = connection.getCatalog();
|
var schema = connection.getSchema();
|
 |
try (var resultSet = metadata.getColumns(catalog, schema, TABLE, COLUMN)) { |
resultSet.next();
|
var defaultValue = resultSet.getString("COLUMN_DEF"); |
assertNull(defaultValue);
|
// Passed on 11.4.7 |
// |
// FAILED on 11.4.8 because instead of null it returns 'NULL' (string): |
// org.opentest4j.AssertionFailedError: |
// Expected :null |
// Actual :NULL |
} finally { |
close(connection, dataSource);
|
}
|
}
|
|
Attachments
Issue Links
- is caused by
-
MDEV-29001 DROP DEFAULT makes SHOW CREATE non-idempotent
-
- Closed
-