sql/item.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
This commit is contained in:
unknown 2002-06-05 21:32:22 +03:00
commit 954a0583f8
1077 changed files with 13517 additions and 98980 deletions

View file

@ -236,7 +236,7 @@ static bool check_user(THD *thd,enum_server_command command, const char *user,
const char *passwd, const char *db, bool check_count)
{
NET *net= &thd->net;
uint max=0;
USER_RESOURCES ur;
thd->db=0;
if (!(thd->user = my_strdup(user, MYF(0))))
@ -248,22 +248,22 @@ static bool check_user(THD *thd,enum_server_command command, const char *user,
passwd, thd->scramble, &thd->priv_user,
protocol_version == 9 ||
!(thd->client_capabilities &
CLIENT_LONG_PASSWORD),&max);
DBUG_PRINT("general",
CLIENT_LONG_PASSWORD),&ur);
DBUG_PRINT("info",
("Capabilities: %d packet_length: %d Host: '%s' User: '%s' Using password: %s Access: %u db: '%s'",
thd->client_capabilities, thd->max_packet_length,
thd->host ? thd->host : thd->ip, thd->priv_user,
thd->host_or_ip, thd->priv_user,
passwd[0] ? "yes": "no",
thd->master_access, thd->db ? thd->db : "*none*"));
if (thd->master_access & NO_ACCESS)
{
net_printf(net, ER_ACCESS_DENIED_ERROR,
thd->user,
thd->host ? thd->host : thd->ip,
thd->host_or_ip,
passwd[0] ? ER(ER_YES) : ER(ER_NO));
mysql_log.write(thd,COM_CONNECT,ER(ER_ACCESS_DENIED_ERROR),
thd->user,
thd->host ? thd->host : thd->ip ? thd->ip : "unknown ip",
thd->host_or_ip,
passwd[0] ? ER(ER_YES) : ER(ER_NO));
return(1); // Error already given
}
@ -284,7 +284,7 @@ static bool check_user(THD *thd,enum_server_command command, const char *user,
(char*) "%s@%s on %s" :
(char*) "%s@%s as anonymous on %s"),
user,
thd->host ? thd->host : thd->ip ? thd->ip : "unknown ip",
thd->host_or_ip,
db ? db : (char*) "");
thd->db_access=0;
if (db && db[0])
@ -568,6 +568,9 @@ void STDCALL mysql_server_end()
if (!org_my_init_done)
my_thread_end();
#endif
/* If library called my_init(), free memory allocated by it */
if (!org_my_init_done)
my_end(0);
}
my_bool STDCALL mysql_thread_init()

View file

@ -61,15 +61,16 @@ struct st_vio
Vio *vio_new(my_socket sd, enum enum_vio_type type, my_bool localhost)
{
Vio * vio = NULL;
vio = (Vio *) my_malloc (sizeof(*vio),MYF(MY_WME|MY_ZEROFILL));
if (vio)
DBUG_ENTER("vio_new");
Vio * vio;
if ((vio= (Vio *) my_malloc(sizeof(*vio),MYF(MY_WME|MY_ZEROFILL))))
{
init_alloc_root(&vio->root, 8192, 8192);
vio->root.min_malloc = sizeof(char *) + 4;
vio->last_packet = &vio->packets;
}
return (vio);
DBUG_RETURN(vio);
}
@ -84,19 +85,24 @@ Vio *vio_new_win32pipe(HANDLE hPipe)
void vio_delete(Vio * vio)
{
DBUG_ENTER("vio_delete");
if (vio)
{
if (vio->type != VIO_CLOSED) vio_close(vio);
if (vio->type != VIO_CLOSED)
vio_close(vio);
free_root(&vio->root, MYF(0));
my_free((gptr)vio, MYF(0));
my_free((gptr) vio, MYF(0));
}
DBUG_VOID_RETURN;
}
void vio_reset(Vio *vio)
{
DBUG_ENTER("vio_reset");
free_root(&vio->root, MYF(MY_KEEP_PREALLOC));
vio->packets = vio->where_in_packet = vio->end_of_packet = 0;
vio->last_packet = &vio->packets;
DBUG_VOID_RETURN;
}
int vio_errno(Vio *vio __attribute__((unused)))
@ -124,6 +130,7 @@ int vio_read(Vio * vio, gptr buf, int size)
int vio_write(Vio * vio, const gptr buf, int size)
{
DBUG_ENTER("vio_write");
char *packet;
if (vio->reading)
{
@ -141,7 +148,7 @@ int vio_write(Vio * vio, const gptr buf, int size)
}
else
size= -1;
return (size);
DBUG_RETURN(size);
}
int vio_blocking(Vio * vio, my_bool set_blocking_mode)