Ver Mensaje Individual
  #1 (permalink)  
Antiguo 13/01/2005, 11:07
Avatar de kapachov
kapachov
 
Fecha de Ingreso: diciembre-2002
Ubicación: Loeches
Mensajes: 464
Antigüedad: 21 años, 4 meses
Puntos: 0
tamaño de *MYSQL Mensaje Previo

Holas...

antes que nada decir que he estado buscando en google y no encuentro mucha info para esclarecer el asunto Mr. Green Mr. Green Mr. Green Necesito saber cuanto espacio se reserva cuando crep variables de este tipo *MYSQL.

Si alguien sabe de alguna forma en C para darme cuenta [ de cuanto espacio se reserva ] y/o a visto que alguien a preguntado lo mismo que _YO_ [ y le han respondido ] le rogaria me enviara el link

Me imagino que ya hubo alguien que se puso en la tarea de sumar cada tipo de variable en la struc de :

typedef struct st_mysql {
NET net; /* Communication parameters */
gptr connector_fd; /* ConnectorFd for SSL */
char *host,*user,*passwd,*unix_socket,*server_version,* host_info,
*info,*db;
struct charset_info_st *charset;
MYSQL_FIELD *fields;
MEM_ROOT field_alloc;
my_ulonglong affected_rows;
my_ulonglong insert_id; /* id if insert on table with NEXTNR */
my_ulonglong extra_info; /* Used by mysqlshow */
unsigned long thread_id; /* Id for connection in server */
unsigned long packet_length;
unsigned int port,client_flag,server_capabilities;
unsigned int protocol_version;
unsigned int field_count;
unsigned int server_status;
unsigned int server_language;
struct st_mysql_options options;
enum mysql_status status;
my_bool free_me; /* If free in mysql_close */
my_bool reconnect; /* set to 1 if automatic reconnect */
char scramble_buff[9];

/*
Set if this is the original connection, not a master or a slave we have
added though mysql_rpl_probe() or mysql_set_master()/ mysql_add_slave()
*/
my_bool rpl_pivot;
/*
Pointers to the master, and the next slave connections, points to
itself if lone connection.
*/
struct st_mysql* master, *next_slave;

struct st_mysql* last_used_slave; /* needed for round-robin slave pick */
/* needed for send/read/store/use result to work correctly with replication */
struct st_mysql* last_used_con;
} MYSQL;

O la gente de MySQL previendo que alguien como _YO_ [ que formula preguntas a veces sin sentido ] quisiera saberlo, lo han puesto ya en su pagina pero no lo _VEO_

puede ser esto :

---
mysql: Out of memory at line 42, 'malloc.c'
mysql: needed 8136 byte (8k), memory in use: 12481367 bytes (12189k)
ERROR 2008: MySQL client ran out of memory
---
__________________
Siempre hago lo que quiero...
Aunque no quiera...