mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 10:14:19 +01:00
SCRUM
WL#604 Privileges in embedded library bugs fixed sql/mysql_priv.h: reload_acl_and_cache interface unifdefed sql/sql_parse.cc: ifdefs added/removed
This commit is contained in:
parent
dbb9596727
commit
e1c1aa7aaf
2 changed files with 7 additions and 8 deletions
|
@ -398,9 +398,9 @@ void table_cache_free(void);
|
|||
uint cached_tables(void);
|
||||
void kill_mysql(void);
|
||||
void close_connection(THD *thd, uint errcode, bool lock);
|
||||
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
||||
bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables,
|
||||
bool *write_to_binlog);
|
||||
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
||||
bool check_access(THD *thd, ulong access, const char *db, ulong *save_priv,
|
||||
bool no_grant, bool no_errors);
|
||||
bool check_table_access(THD *thd, ulong want_access, TABLE_LIST *tables,
|
||||
|
|
|
@ -1430,7 +1430,6 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
|||
break;
|
||||
}
|
||||
#endif
|
||||
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
||||
case COM_REFRESH:
|
||||
{
|
||||
statistic_increment(com_stat[SQLCOM_FLUSH],&LOCK_status);
|
||||
|
@ -1444,7 +1443,6 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
|||
send_ok(thd);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
case COM_SHUTDOWN:
|
||||
statistic_increment(com_other,&LOCK_status);
|
||||
|
@ -1649,7 +1647,7 @@ mysql_execute_command(THD *thd)
|
|||
*/
|
||||
thd->old_total_warn_count= thd->total_warn_count;
|
||||
|
||||
#ifdef HAVE_REPLICATON
|
||||
#ifdef HAVE_REPLICATION
|
||||
if (thd->slave_thread)
|
||||
{
|
||||
/*
|
||||
|
@ -3111,6 +3109,7 @@ mysql_execute_command(THD *thd)
|
|||
}
|
||||
break;
|
||||
}
|
||||
#endif /*!NO_EMBEDDED_ACCESS_CHECKS*/
|
||||
case SQLCOM_RESET:
|
||||
/*
|
||||
RESET commands are never written to the binary log, so we have to
|
||||
|
@ -3147,7 +3146,6 @@ mysql_execute_command(THD *thd)
|
|||
}
|
||||
break;
|
||||
}
|
||||
#endif /*!NO_EMBEDDED_ACCESS_CHECKS*/
|
||||
case SQLCOM_KILL:
|
||||
kill_one_thread(thd,lex->thread_id);
|
||||
break;
|
||||
|
@ -4352,7 +4350,6 @@ void add_join_natural(TABLE_LIST *a,TABLE_LIST *b)
|
|||
b->natural_join=a;
|
||||
}
|
||||
|
||||
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
||||
/*
|
||||
Reload/resets privileges and the different caches.
|
||||
|
||||
|
@ -4379,6 +4376,7 @@ bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables,
|
|||
bool result=0;
|
||||
select_errors=0; /* Write if more errors */
|
||||
bool tmp_write_to_binlog= 1;
|
||||
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
||||
if (options & REFRESH_GRANT)
|
||||
{
|
||||
acl_reload(thd);
|
||||
|
@ -4386,6 +4384,7 @@ bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables,
|
|||
if (mqh_used)
|
||||
reset_mqh(thd,(LEX_USER *) NULL,true);
|
||||
}
|
||||
#endif
|
||||
if (options & REFRESH_LOG)
|
||||
{
|
||||
/*
|
||||
|
@ -4476,14 +4475,14 @@ bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables,
|
|||
UNLOCK_ACTIVE_MI;
|
||||
}
|
||||
#endif
|
||||
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
||||
if (options & REFRESH_USER_RESOURCES)
|
||||
reset_mqh(thd,(LEX_USER *) NULL);
|
||||
#endif
|
||||
if (write_to_binlog)
|
||||
*write_to_binlog= tmp_write_to_binlog;
|
||||
return result;
|
||||
}
|
||||
#endif /*!NO_EMBEDDED_ACCESS_CHECKS*/
|
||||
|
||||
|
||||
/*
|
||||
kill on thread
|
||||
|
|
Loading…
Add table
Reference in a new issue