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

Myrna van Lunteren closed DERBY-3212.
-------------------------------------


> 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.

Reply via email to