You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Myrna van Lunteren (JIRA)" <ji...@apache.org> on 2007/11/18 00:03:44 UTC

[jira] Resolved: (DERBY-3212) isNullable columns in ResultSet from DatabaseMetaData.getColumnPrivileges() and getTablePrivileges() are off

     [ https://issues.apache.org/jira/browse/DERBY-3212?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Myrna van Lunteren resolved DERBY-3212.
---------------------------------------

    Resolution: Invalid

I'm rethinking how the isNullable column is supposed to work. I now think it needs to be correct for Derby - and in Derby, TABLE_SCHEM cannot be null. 
Marking as invalid.

> isNullable columns in ResultSet from DatabaseMetaData.getColumnPrivileges() and getTablePrivileges() are off
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3212
>                 URL: https://issues.apache.org/jira/browse/DERBY-3212
>             Project: Derby
>          Issue Type: Bug
>            Reporter: Myrna van Lunteren
>
> Consider code like the following:
>            DatabaseMetaData dmd = conn.getMetaData();
>            ResultSet rs = dmd.getTablePrivileges(null,null,null);
>           // or :
>           // ResultSet rs = dmd.getColumnPrivileges(null, null, "", null);
>            ResultSetMetaData rsmd = rs.getMetaData();
>            int actualCols = rsmd.getColumnCount();
>            for (int i = 0; i < actualCols; i++)
>            {
>                 System.out.print("getColumnName: " + rsmd.getColumnName(i+1) + ", isNullable: ");
>                 System.out.println(rsmd.isNullable(i+1));
>            }
> With Derby versions before 10.2.1.6, this would return true for all columns, presumably, because  lacking support for grant/revoke.
> As of Derby 10.2.1.6, the following is returned:
> getTablePrivileges:
> TABLE_CAT: true, TABLE_SCHEM: false,TABLE_NAME: false,
> GRANTOR: true, GRANTEE: true,PRIVILEGE: true,IS_GRANTABLE: true
> getColumnPrivileges:
> TABLE_CAT: true, TABLE_SCHEM: false,TABLE_NAME: false,COLUMN_NAME:false,
> GRANTOR: true, GRANTEE: true,PRIVILEGE: true,IS_GRANTABLE: true
> However, the API suggests that TABLE_NAME is allowed to be null.
> Also, it suggests by not mentioning null, that GRANTEE and PRIVILEGE may not be null.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.