mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 03:23:03 +01:00
Misc.
This commit is contained in:
parent
82ad6a9689
commit
3f5556edf9
@ -174,13 +174,13 @@ static void modify_privilege(CompiledStatement* statement, NOD_TYPE type, SSHORT
|
||||
const UCHAR* privs, const dsql_nod* table,
|
||||
const dsql_nod* user, const dsql_nod* grantor,
|
||||
const dsql_str* field_name);
|
||||
static SCHAR modify_privileges(CompiledStatement*, NOD_TYPE, SSHORT, const dsql_nod*,
|
||||
static char modify_privileges(CompiledStatement*, NOD_TYPE, SSHORT, const dsql_nod*,
|
||||
const dsql_nod*, const dsql_nod*, const dsql_nod*);
|
||||
static void modify_relation(CompiledStatement*);
|
||||
static void modify_udf(CompiledStatement*);
|
||||
static void modify_map(CompiledStatement*);
|
||||
static dsql_par* parameter_reverse_order(dsql_par* parameter, dsql_par* prev);
|
||||
static void process_role_nm_list(CompiledStatement*, SSHORT, dsql_nod*, dsql_nod*, NOD_TYPE, const dsql_nod*);
|
||||
static void process_role_nm_list(CompiledStatement*, SSHORT, const dsql_nod*, const dsql_nod*, NOD_TYPE, const dsql_nod*);
|
||||
static void put_descriptor(CompiledStatement*, const dsc*);
|
||||
static void put_dtype(CompiledStatement*, const dsql_fld*, bool);
|
||||
static void put_field(CompiledStatement*, dsql_fld*, bool);
|
||||
@ -4707,18 +4707,18 @@ static void grant_revoke(CompiledStatement* statement)
|
||||
*
|
||||
**************************************/
|
||||
|
||||
dsql_nod** uptr;
|
||||
dsql_nod** uend;
|
||||
const dsql_nod* const* uptr;
|
||||
const dsql_nod* const* uend;
|
||||
|
||||
SSHORT option = 0; // no grant/admin option
|
||||
dsql_nod* ddl_node = statement->req_ddl_node;
|
||||
dsql_nod* privs = ddl_node->nod_arg[e_grant_privs];
|
||||
dsql_nod* table = ddl_node->nod_arg[e_grant_table];
|
||||
const dsql_nod* privs = ddl_node->nod_arg[e_grant_privs];
|
||||
const dsql_nod* table = ddl_node->nod_arg[e_grant_table];
|
||||
|
||||
if ((ddl_node->nod_type == nod_revoke) && (!privs) && (!table)) // ALL ON ALL
|
||||
{
|
||||
statement->append_uchar(isc_dyn_begin);
|
||||
dsql_nod* users = ddl_node->nod_arg[e_grant_users];
|
||||
const dsql_nod* users = ddl_node->nod_arg[e_grant_users];
|
||||
uend = users->nod_arg + users->nod_count;
|
||||
for (uptr = users->nod_arg; uptr < uend; ++uptr)
|
||||
{
|
||||
@ -4742,7 +4742,7 @@ static void grant_revoke(CompiledStatement* statement)
|
||||
|
||||
if (!process_grant_role)
|
||||
{
|
||||
dsql_nod* users = ddl_node->nod_arg[e_grant_users];
|
||||
const dsql_nod* users = ddl_node->nod_arg[e_grant_users];
|
||||
if (ddl_node->nod_arg[e_grant_grant]) {
|
||||
option = 1; // with grant option
|
||||
}
|
||||
@ -4756,14 +4756,14 @@ static void grant_revoke(CompiledStatement* statement)
|
||||
}
|
||||
else
|
||||
{
|
||||
dsql_nod* role_list = ddl_node->nod_arg[0];
|
||||
dsql_nod* users = ddl_node->nod_arg[1];
|
||||
const dsql_nod* role_list = ddl_node->nod_arg[0];
|
||||
const dsql_nod* users = ddl_node->nod_arg[1];
|
||||
if (ddl_node->nod_arg[3]) {
|
||||
option = 2; // with admin option
|
||||
}
|
||||
|
||||
dsql_nod** role_end = role_list->nod_arg + role_list->nod_count;
|
||||
for (dsql_nod** role_ptr = role_list->nod_arg; role_ptr < role_end; ++role_ptr)
|
||||
const dsql_nod* const* role_end = role_list->nod_arg + role_list->nod_count;
|
||||
for (const dsql_nod* const* role_ptr = role_list->nod_arg; role_ptr < role_end; ++role_ptr)
|
||||
{
|
||||
uend = users->nod_arg + users->nod_count;
|
||||
for (uptr = users->nod_arg; uptr < uend; ++uptr)
|
||||
@ -5472,7 +5472,7 @@ static void modify_privilege(CompiledStatement* statement,
|
||||
|
||||
|
||||
|
||||
static SCHAR modify_privileges(CompiledStatement* statement,
|
||||
static char modify_privileges(CompiledStatement* statement,
|
||||
NOD_TYPE type,
|
||||
SSHORT option,
|
||||
const dsql_nod* privs,
|
||||
@ -5487,18 +5487,19 @@ static SCHAR modify_privileges(CompiledStatement* statement,
|
||||
**************************************
|
||||
*
|
||||
* Functional description
|
||||
* Return a SCHAR indicating the privilege to be modified
|
||||
* Return a char indicating the privilege to be modified
|
||||
*
|
||||
**************************************/
|
||||
|
||||
SCHAR privileges[10];
|
||||
char privileges[10];
|
||||
const char* p = 0;
|
||||
char* q;
|
||||
const dsql_nod* fields;
|
||||
const dsql_nod* const* ptr;
|
||||
const dsql_nod* const* end;
|
||||
|
||||
switch (privs->nod_type) {
|
||||
switch (privs->nod_type)
|
||||
{
|
||||
case nod_all:
|
||||
p = "A";
|
||||
break;
|
||||
@ -5534,8 +5535,7 @@ static SCHAR modify_privileges(CompiledStatement* statement,
|
||||
|
||||
case nod_list:
|
||||
p = q = privileges;
|
||||
for (ptr = privs->nod_arg, end = ptr + privs->nod_count; ptr < end;
|
||||
ptr++)
|
||||
for (ptr = privs->nod_arg, end = ptr + privs->nod_count; ptr < end; ptr++)
|
||||
{
|
||||
*q = modify_privileges(statement, type, option, *ptr, table, user, grantor);
|
||||
if (*q) {
|
||||
@ -5853,8 +5853,8 @@ static dsql_par* parameter_reverse_order(dsql_par* parameter, dsql_par* prev)
|
||||
|
||||
static void process_role_nm_list(CompiledStatement* statement,
|
||||
SSHORT option,
|
||||
dsql_nod* user_ptr,
|
||||
dsql_nod* role_ptr,
|
||||
const dsql_nod* user_ptr,
|
||||
const dsql_nod* role_ptr,
|
||||
NOD_TYPE type,
|
||||
const dsql_nod* grantor)
|
||||
{
|
||||
|
@ -685,8 +685,8 @@ static void build_other_headers(void)
|
||||
* files.
|
||||
*
|
||||
*********************************************/
|
||||
SCHAR text[128];
|
||||
int last_code, code, i;
|
||||
SCHAR text[256];
|
||||
int i;
|
||||
unsigned long new_code = 0L;
|
||||
|
||||
/* Use the check_open function to open header files in current directory. */
|
||||
@ -789,8 +789,8 @@ static void build_other_headers(void)
|
||||
/* Fetch error codes from SYSTEM_ERRORS relation. Write them
|
||||
out to the pascal, fortran, and rdb header files */
|
||||
|
||||
code = 1;
|
||||
last_code = code - 1;
|
||||
int code = 1;
|
||||
int last_code = code - 1;
|
||||
|
||||
FOR S IN SYSTEM_ERRORS CROSS N IN MESSAGES OVER NUMBER WITH
|
||||
N.FAC_CODE = S.FAC_CODE SORTED BY N.FAC_CODE, S.NUMBER
|
||||
|
Loading…
Reference in New Issue
Block a user