Bug #52014 Don't use System.out.println() to alert to incomplete functionality
Submitted: 12 Mar 2010 19:54 Modified: 5 May 2010 16:25
Reporter: Todd Farmer (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster/J Severity:S2 (Serious)
Version:7.1.1 OS:Windows (XP)
Assigned to: Craig Russell CPU Architecture:Any

[12 Mar 2010 19:54] Todd Farmer
Description:
The code for DbImpl.enlist(TableConst table, List<KeyPart> keyParts) apparently alerts people to an incomplete implementation by writing to STDOUT:

        } else if (keyParts.size() > 1) {
            // TODO enable this code once startTransaction with multiple key parts supported
... more comments ...
            System.out.println("DbImpl.enlist(): Multiple key parts are not supported... yet.");
            NdbTransaction result = ndb.startTransaction(null, null, 0);
            handleError (result, ndb);
            return result;

I don't know whether this will also always generate an Exception or not, or how to exercise this to test, but perhaps a a java.lang.UnsupportedOperationException error would be appropriate, here?  I hate to imagine that we're actually doing something different, and just writing to STDOUT that it isn't implemented.

How to repeat:
Not sure, see above.

Suggested fix:
Don't use System.out.println() to alert users to incomplete feature implementations.
[23 Mar 2010 18:52] Craig Russell
Changed System.out.println to logger.debug for multiple partition keys

Using saved parent location: bzr+ssh://crussell@bk-internal.mysql.com/bzrroot/clusterj/
 M  clusterj-tie/src/main/java/com/mysql/clusterj/tie/DbImpl.java                                                                                                                                                                   
All changes applied successfully.
Now on revision 233.
[5 May 2010 16:25] Craig Russell
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html