mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge chilla.local:/home/mydev/mysql-5.0-ateam
into chilla.local:/home/mydev/mysql-5.1-ateam
This commit is contained in:
@ -37,6 +37,8 @@ extern "C"
|
||||
int check_user(THD *thd, enum enum_server_command command,
|
||||
const char *passwd, uint passwd_len, const char *db,
|
||||
bool check_count);
|
||||
void thd_init_client_charset(THD *thd, uint cs_number);
|
||||
|
||||
C_MODE_START
|
||||
|
||||
#include <mysql.h>
|
||||
@ -604,11 +606,14 @@ err:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
#ifdef NO_EMBEDDED_ACCESS_CHECKS
|
||||
int check_embedded_connection(MYSQL *mysql)
|
||||
{
|
||||
int result;
|
||||
THD *thd= (THD*)mysql->thd;
|
||||
thd_init_client_charset(thd, mysql->charset->number);
|
||||
thd->update_charset();
|
||||
Security_context *sctx= thd->security_ctx;
|
||||
sctx->host_or_ip= sctx->host= (char*) my_localhost;
|
||||
strmake(sctx->priv_host, (char*) my_localhost, MAX_HOSTNAME-1);
|
||||
@ -627,6 +632,8 @@ int check_embedded_connection(MYSQL *mysql)
|
||||
char scramble_buff[SCRAMBLE_LENGTH];
|
||||
int passwd_len;
|
||||
|
||||
thd_init_client_charset(thd, mysql->charset->number);
|
||||
thd->update_charset();
|
||||
if (mysql->options.client_ip)
|
||||
{
|
||||
sctx->host= my_strdup(mysql->options.client_ip, MYF(0));
|
||||
|
Reference in New Issue
Block a user