Bug #81105 nullNamePatternMatchesAll default value changed
Submitted: 16 Apr 2016 0:37 Modified: 30 Sep 2016 18:37
Reporter: Michael Hixson Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / J Severity:S3 (Non-critical)
Version:6.0.2 OS:Any
Assigned to: CPU Architecture:Any
Tags: compatibility, documentation

[16 Apr 2016 0:37] Michael Hixson
Description:
The default value of the "nullNamePatternMatchesAll" connection property changed between versions 5.1.38 and 6.0.2 of mysql-connector-java.  It is "true" in 5.1.38, it is "false" in 6.0.2.

5.1 properties documentation:
https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-reference-configuration-propertie...

6.0 properties documentation:
https://dev.mysql.com/doc/connector-j/6.0/en/connector-j-reference-configuration-propertie...

The fact that this property changed was not called out in the "Changes in Connection Properties" document:
https://dev.mysql.com/doc/connector-j/6.0/en/connector-j-properties-changed.html

This change causes a compatibility issue with Liquibase.  The latest version of Liquibase (at the time of this writing), which is 3.4.2, assumes that the DatabaseMetaData implementation will accept null as the columnNamePattern for its getColumns(String,String,String,String) method.

I think that is a bug in Liquibase so I filed this issue:
https://liquibase.jira.com/browse/CORE-2723

...but I figured you all would want to be aware that this is happening.  Maybe you didn't intend to change the default value of this property or assumed there would be no compatibility issues.

Reading through the connector's changelogs, it looks like the property and its default value were introduced in response to a different bug report:
https://github.com/mysql/mysql-connector-j/blob/c6da0fe501ad43d4ed6483b60ea796dc9fbe2d7b/C...

The other report was also related to compatability:
https://bugs.mysql.com/bug.php?id=9769

How to repeat:
1. Look for "nullNamePatternMatchesAll" here:
https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-reference-configuration-propertie...

2. Look for "nullNamePatternMatchesAll" here:
https://dev.mysql.com/doc/connector-j/6.0/en/connector-j-reference-configuration-propertie...

3. Look for "nullNamePatternMatchesAll" here:
https://dev.mysql.com/doc/connector-j/6.0/en/connector-j-properties-changed.html

4. Look for "nullNamePatternMatchesAll" here:
https://github.com/mysql/mysql-connector-j/blob/c6da0fe501ad43d4ed6483b60ea796dc9fbe2d7b/C...

4. Notice the default value changed between (1) and (2), but that is not called out in (3) or (4).

Suggested fix:
I suggest one of the following:

a) Amend the changelog and/or the "Changes in Connection Properties" document to include this change.

...or...

b) Change the default value of "nullNamePatternMatchesAll" back to "true".
[18 Apr 2016 4:26] MySQL Verification Team
Hello Michael Hixson,

Thank you for the report and feedback!

Thanks,
Umesh
[30 Sep 2016 18:37] Daniel So
Posted by developer:
 
The change of the default value for nullNamePatternMatchesAll (and for nullCatalogMeansCurrent too) has now been noted in the manual (https://dev.mysql.com/doc/connector-j/6.0/en/connector-j-properties-changed.html).

The changes will be visible in the manual's next build.