mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 04:43:03 +01:00
Improved the ISQL output for the SHOW GRANT command.
This commit is contained in:
parent
89d2d8bbd3
commit
92d2f6aa09
@ -207,8 +207,7 @@ const int NO_CHECKS_ON_REL = 92; // There are no check constraints on table @
|
||||
const int NO_COMMENTS = 115; // There are no comments for objects in this database.
|
||||
const int BUFFER_OVERFLOW = 94; // An isql command exceeded maximum buffer size
|
||||
const int NO_ROLES = 95; // There are no roles in this database
|
||||
const int NO_REL_OR_PROC_OR_ROLE = 96; // There is no table, stored procedure, or
|
||||
// role @1 in this database
|
||||
const int NO_OBJECT = 96; // There is no metadata object @1 in this database
|
||||
const int NO_GRANT_ON_ROL = 97; // There is no membership privilege granted
|
||||
// on @1 in this database
|
||||
const int UNEXPECTED_EOF = 98; // Expected end of statement, encountered EOF
|
||||
@ -259,6 +258,13 @@ const int MAXROWS_INVALID = 170; // Unable to convert @1 to a number for MAXW
|
||||
const int MAXROWS_OUTOF_RANGE = 171; // Value @1 for MAXROWS is out of range. Max value is @2
|
||||
const int MAXROWS_NEGATIVE = 172; // The value (@1) for MAXROWS must be zero or greater
|
||||
const int HLP_SETEXPLAIN = 173; // Toggle display of query access plan in the explained form
|
||||
const int NO_GRANT_ON_GEN = 174; // There is no privilege granted on generator @1 in this database
|
||||
const int NO_GRANT_ON_XCP = 175; // There is no privilege granted on exception @1 in this database
|
||||
const int NO_GRANT_ON_FLD = 176; // There is no privilege granted on domain @1 in this database
|
||||
const int NO_GRANT_ON_CS = 177; // There is no privilege granted on character set @1 in this database
|
||||
const int NO_GRANT_ON_COLL = 178; // There is no privilege granted on collation @1 in this database
|
||||
const int NO_GRANT_ON_PKG = 179; // There is no privilege granted on package @1 in this database
|
||||
const int NO_GRANT_ON_FUN = 180; // There is no privilege granted on function @1 in this database
|
||||
|
||||
|
||||
// Initialize types
|
||||
|
@ -1854,7 +1854,84 @@ processing_state SHOW_metadata(const SCHAR* const* cmd, SCHAR** lcmd)
|
||||
END_ERROR;
|
||||
}
|
||||
if (!key)
|
||||
key = NO_REL_OR_PROC_OR_ROLE;
|
||||
{
|
||||
FOR FIRST 1 F IN RDB$FUNCTIONS
|
||||
WITH F.RDB$FUNCTION_NAME EQ SQL_id_for_grant
|
||||
|
||||
key = NO_GRANT_ON_FUN;
|
||||
END_FOR
|
||||
ON_ERROR
|
||||
// Ignore any error
|
||||
END_ERROR;
|
||||
}
|
||||
if (!key)
|
||||
{
|
||||
FOR FIRST 1 G IN RDB$GENERATORS
|
||||
WITH G.RDB$GENERATOR_NAME EQ SQL_id_for_grant
|
||||
|
||||
key = NO_GRANT_ON_GEN;
|
||||
END_FOR
|
||||
ON_ERROR
|
||||
// Ignore any error
|
||||
END_ERROR;
|
||||
}
|
||||
if (!key)
|
||||
{
|
||||
FOR FIRST 1 E IN RDB$EXCEPTIONS
|
||||
WITH E.RDB$EXCEPTION_NAME EQ SQL_id_for_grant
|
||||
|
||||
key = NO_GRANT_ON_XCP;
|
||||
END_FOR
|
||||
ON_ERROR
|
||||
// Ignore any error
|
||||
END_ERROR;
|
||||
}
|
||||
if (!key)
|
||||
{
|
||||
FOR FIRST 1 F IN RDB$FIELDS
|
||||
WITH F.RDB$FIELD_NAME EQ SQL_id_for_grant
|
||||
|
||||
key = NO_GRANT_ON_FLD;
|
||||
END_FOR
|
||||
ON_ERROR
|
||||
// Ignore any error
|
||||
END_ERROR;
|
||||
}
|
||||
if (!key)
|
||||
{
|
||||
FOR FIRST 1 CS IN RDB$CHARACTER_SETS
|
||||
WITH CS.RDB$CHARACTER_SET_NAME EQ SQL_id_for_grant
|
||||
|
||||
key = NO_GRANT_ON_CS;
|
||||
END_FOR
|
||||
ON_ERROR
|
||||
// Ignore any error
|
||||
END_ERROR;
|
||||
}
|
||||
if (!key)
|
||||
{
|
||||
FOR FIRST 1 C IN RDB$COLLATIONS
|
||||
WITH C.RDB$COLLATION_NAME EQ SQL_id_for_grant
|
||||
|
||||
key = NO_GRANT_ON_COLL;
|
||||
END_FOR
|
||||
ON_ERROR
|
||||
// Ignore any error
|
||||
END_ERROR;
|
||||
}
|
||||
if (!key && isqlGlob.major_ods >= ODS_VERSION12)
|
||||
{
|
||||
FOR FIRST 1 P IN RDB$PACKAGES
|
||||
WITH P.RDB$PACKAGE_NAME EQ SQL_id_for_grant
|
||||
|
||||
key = NO_GRANT_ON_PKG;
|
||||
END_FOR
|
||||
ON_ERROR
|
||||
// Ignore any error
|
||||
END_ERROR;
|
||||
}
|
||||
if (!key)
|
||||
key = NO_OBJECT;
|
||||
}
|
||||
else {
|
||||
key = NO_GRANT_ON_ANY;
|
||||
|
@ -13,7 +13,7 @@ set bulk_insert INSERT INTO FACILITIES (LAST_CHANGE, FACILITY, FAC_CODE, MAX_NUM
|
||||
('2012-02-18 20:00:00', 'SQLERR', 13, 1033)
|
||||
('1996-11-07 13:38:42', 'SQLWARN', 14, 613)
|
||||
('2006-09-10 03:04:31', 'JRD_BUGCHK', 15, 307)
|
||||
('2013-06-27 23:00:00', 'ISQL', 17, 174)
|
||||
('2013-08-21 23:00:00', 'ISQL', 17, 181)
|
||||
('2010-07-10 10:50:30', 'GSEC', 18, 105)
|
||||
('2012-05-25 19:59:42', 'GSTAT', 21, 56)
|
||||
('2009-12-18 19:33:34', 'FBSVCMGR', 22, 57)
|
||||
|
@ -2835,7 +2835,7 @@ Writes !w
|
||||
Fetches = !f', NULL, NULL);
|
||||
('BUFFER_OVERFLOW', 'get_statement', 'isql.e', NULL, 17, 94, NULL, 'Single isql command exceeded maximum buffer size', NULL, NULL);
|
||||
('NO_ROLES', 'SHOW_metadata', 'show.e', NULL, 17, 95, NULL, 'There are no roles in this database', NULL, NULL);
|
||||
('NO_REL_OR_PROC_OR_ROLE', 'SHOW_metadata', 'show.e', NULL, 17, 96, NULL, 'There is no table, stored procedure, or role @1 in this database', NULL, NULL);
|
||||
('NO_OBJECT', 'SHOW_metadata', 'show.e', NULL, 17, 96, NULL, 'There is no metadata object @1 in this database', NULL, NULL);
|
||||
('NO_GRANT_ON_ROL', 'SHOW_metadata', 'show.e', NULL, 17, 97, NULL, 'There is no membership privilege granted on @1 in this database', NULL, NULL);
|
||||
('UNEXPECTED_EOF', 'do_isql', 'isql.e', NULL, 17, 98, NULL, 'Expected end of statement, encountered EOF', NULL, NULL);
|
||||
('TIME_ERR', 'add_row()', 'isql.e', NULL, 17, 101, NULL, 'Bad TIME: @1', NULL, NULL);
|
||||
@ -2913,6 +2913,13 @@ Fetches = !f', NULL, NULL);
|
||||
('MAXROWS_OUTOF_RANGE', 'newRowCount', 'isql.epp', NULL, 17, 171, NULL, 'Value @1 for MAXROWS is out of range. Max value is @2', NULL, NULL)
|
||||
('MAXROWS_NEGATIVE', 'newRowCount', 'isql.epp', NULL, 17, 172, NULL, 'The value (@1) for MAXROWS must be zero or greater', NULL, NULL)
|
||||
('HLP_SETEXPLAIN', 'help', 'isql.epp', NULL, 17, 173, NULL, ' SET EXPLAIN -- toggle display of query access plan in the explained form', NULL, NULL)
|
||||
('NO_GRANT_ON_GEN', 'SHOW_metadata', 'show.e', NULL, 17, 174, NULL, 'There is no privilege granted on generator @1 in this database', NULL, NULL);
|
||||
('NO_GRANT_ON_XCP', 'SHOW_metadata', 'show.e', NULL, 17, 175, NULL, 'There is no privilege granted on exception @1 in this database', NULL, NULL);
|
||||
('NO_GRANT_ON_FLD', 'SHOW_metadata', 'show.e', NULL, 17, 176, NULL, 'There is no privilege granted on domain @1 in this database', NULL, NULL);
|
||||
('NO_GRANT_ON_CS', 'SHOW_metadata', 'show.e', NULL, 17, 177, NULL, 'There is no privilege granted on character set @1 in this database', NULL, NULL);
|
||||
('NO_GRANT_ON_COLL', 'SHOW_metadata', 'show.e', NULL, 17, 178, NULL, 'There is no privilege granted on collation @1 in this database', NULL, NULL);
|
||||
('NO_GRANT_ON_PKG', 'SHOW_metadata', 'show.e', NULL, 17, 179, NULL, 'There is no privilege granted on package @1 in this database', NULL, NULL);
|
||||
('NO_GRANT_ON_FUN', 'SHOW_metadata', 'show.e', NULL, 17, 180, NULL, 'There is no privilege granted on function @1 in this database', NULL, NULL);
|
||||
-- GSEC
|
||||
('GsecMsg1', 'get_line', 'gsec.e', NULL, 18, 1, NULL, 'GSEC>', NULL, NULL);
|
||||
('GsecMsg2', 'printhelp', 'gsec.e', 'This message is used in the Help display. It should be the same as number 1 (but in lower case).', 18, 2, NULL, 'gsec', NULL, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user