G:/ScriptBasic/source/extensions/mysql/mysql_com.h File Reference

Go to the source code of this file.

Data Structures

struct  st_net
struct  rand_struct
struct  st_udf_args
struct  st_udf_init

Defines

#define NAME_LEN   64
#define LOCAL_HOST   "localhost"
#define MYSQL_PORT   3306
#define MYSQL_UNIX_ADDR   "/tmp/mysql.sock"
#define NOT_NULL_FLAG   1
#define PRI_KEY_FLAG   2
#define UNIQUE_KEY_FLAG   4
#define MULTIPLE_KEY_FLAG   8
#define BLOB_FLAG   16
#define UNSIGNED_FLAG   32
#define ZEROFILL_FLAG   64
#define BINARY_FLAG   128
#define ENUM_FLAG   256
#define AUTO_INCREMENT_FLAG   512
#define TIMESTAMP_FLAG   1024
#define PART_KEY_FLAG   16384
#define GROUP_FLAG   32768
#define REFRESH_GRANT   1
#define REFRESH_LOG   2
#define REFRESH_TABLES   4
#define REFRESH_HOSTS   8
#define REFRESH_FAST   32768
#define CLIENT_LONG_PASSWORD   1
#define CLIENT_FOUND_ROWS   2
#define CLIENT_LONG_FLAG   4
#define CLIENT_CONNECT_WITH_DB   8
#define CLIENT_NO_SCHEMA   16
#define CLIENT_COMPRESS   32
#define CLIENT_ODBC   64
#define MYSQL_ERRMSG_SIZE   200
#define NET_READ_TIMEOUT   30
#define NET_WRITE_TIMEOUT   60
#define NET_WAIT_TIMEOUT   8*60*60
#define packet_error   ((unsigned int) -1)
#define FIELD_TYPE_CHAR   FIELD_TYPE_TINY
#define FIELD_TYPE_INTERVAL   FIELD_TYPE_ENUM
#define net_new_transaction(net)   ((net)->pkt_nr=0)
#define NET_HEADER_SIZE   4
#define COMP_HEADER_SIZE   3
#define NULL_LENGTH   ((unsigned long) ~0)
#define socket_errno   errno

Typedefs

typedef st_net NET
typedef st_udf_args UDF_ARGS
typedef st_udf_init UDF_INIT

Enumerations

enum  enum_server_command {
  COM_SLEEP, COM_QUIT, COM_INIT_DB, COM_QUERY,
  COM_FIELD_LIST, COM_CREATE_DB, COM_DROP_DB, COM_REFRESH,
  COM_SHUTDOWN, COM_STATISTICS, COM_PROCESS_INFO, COM_CONNECT,
  COM_PROCESS_KILL, COM_DEBUG, COM_PING
}
enum  enum_field_types {
  FIELD_TYPE_DECIMAL, FIELD_TYPE_TINY, FIELD_TYPE_SHORT, FIELD_TYPE_LONG,
  FIELD_TYPE_FLOAT, FIELD_TYPE_DOUBLE, FIELD_TYPE_NULL, FIELD_TYPE_TIMESTAMP,
  FIELD_TYPE_LONGLONG, FIELD_TYPE_INT24, FIELD_TYPE_DATE, FIELD_TYPE_TIME,
  FIELD_TYPE_DATETIME, FIELD_TYPE_YEAR, FIELD_TYPE_NEWDATE, FIELD_TYPE_ENUM = 247,
  FIELD_TYPE_SET = 248, FIELD_TYPE_TINY_BLOB = 249, FIELD_TYPE_MEDIUM_BLOB = 250, FIELD_TYPE_LONG_BLOB = 251,
  FIELD_TYPE_BLOB = 252, FIELD_TYPE_VAR_STRING = 253, FIELD_TYPE_STRING = 254
}
enum  Item_result { STRING_RESULT, REAL_RESULT, INT_RESULT }

Functions

int my_net_init (NET *net, Socket fd)
void net_end (NET *net)
void net_clear (NET *net)
int net_flush (NET *net)
int my_net_write (NET *net, char *packet, unsigned long len)
int net_write_command (NET *net, unsigned char command, const char *packet, unsigned long len)
int net_real_write (NET *net, const char *packet, unsigned long len)
unsigned int my_net_read (NET *net)
void randominit (struct rand_struct *rand, unsigned long seed1, unsigned long seed2)
double rnd (struct rand_struct *rand)
void make_scrambled_password (char *to, const char *password)
void get_salt_from_password (unsigned long *res, const char *password)
char * scramble (char *to, const char *message, const char *password, my_bool old_ver)
my_bool check_scramble (const char *scramble, const char *message, unsigned long *salt, my_bool old_ver)
char * get_tty_password (char *opt_message)

Variables

unsigned long max_allowed_packet
unsigned long net_buffer_length


Define Documentation

#define AUTO_INCREMENT_FLAG   512
 

Definition at line 36 of file mysql_com.h.

#define BINARY_FLAG   128
 

Definition at line 33 of file mysql_com.h.

#define BLOB_FLAG   16
 

Definition at line 30 of file mysql_com.h.

#define CLIENT_COMPRESS   32
 

Definition at line 52 of file mysql_com.h.

#define CLIENT_CONNECT_WITH_DB   8
 

Definition at line 50 of file mysql_com.h.

#define CLIENT_FOUND_ROWS   2
 

Definition at line 48 of file mysql_com.h.

#define CLIENT_LONG_FLAG   4
 

Definition at line 49 of file mysql_com.h.

#define CLIENT_LONG_PASSWORD   1
 

Definition at line 47 of file mysql_com.h.

#define CLIENT_NO_SCHEMA   16
 

Definition at line 51 of file mysql_com.h.

#define CLIENT_ODBC   64
 

Definition at line 53 of file mysql_com.h.

#define COMP_HEADER_SIZE   3
 

Definition at line 135 of file mysql_com.h.

#define ENUM_FLAG   256
 

Definition at line 35 of file mysql_com.h.

#define FIELD_TYPE_CHAR   FIELD_TYPE_TINY
 

Definition at line 89 of file mysql_com.h.

#define FIELD_TYPE_INTERVAL   FIELD_TYPE_ENUM
 

Definition at line 90 of file mysql_com.h.

#define GROUP_FLAG   32768
 

Definition at line 39 of file mysql_com.h.

#define LOCAL_HOST   "localhost"
 

Definition at line 15 of file mysql_com.h.

#define MULTIPLE_KEY_FLAG   8
 

Definition at line 29 of file mysql_com.h.

#define MYSQL_ERRMSG_SIZE   200
 

Definition at line 55 of file mysql_com.h.

#define MYSQL_PORT   3306
 

Definition at line 17 of file mysql_com.h.

Referenced by if().

#define MYSQL_UNIX_ADDR   "/tmp/mysql.sock"
 

Definition at line 18 of file mysql_com.h.

#define NAME_LEN   64
 

Definition at line 14 of file mysql_com.h.

#define NET_HEADER_SIZE   4
 

Definition at line 134 of file mysql_com.h.

#define net_new_transaction net   )     ((net)->pkt_nr=0)
 

Definition at line 95 of file mysql_com.h.

#define NET_READ_TIMEOUT   30
 

Definition at line 56 of file mysql_com.h.

#define NET_WAIT_TIMEOUT   8*60*60
 

Definition at line 58 of file mysql_com.h.

#define NET_WRITE_TIMEOUT   60
 

Definition at line 57 of file mysql_com.h.

#define NOT_NULL_FLAG   1
 

Definition at line 26 of file mysql_com.h.

#define NULL_LENGTH   ((unsigned long) ~0)
 

Definition at line 150 of file mysql_com.h.

#define packet_error   ((unsigned int) -1)
 

Definition at line 69 of file mysql_com.h.

#define PART_KEY_FLAG   16384
 

Definition at line 38 of file mysql_com.h.

#define PRI_KEY_FLAG   2
 

Definition at line 27 of file mysql_com.h.

#define REFRESH_FAST   32768
 

Definition at line 45 of file mysql_com.h.

#define REFRESH_GRANT   1
 

Definition at line 41 of file mysql_com.h.

#define REFRESH_HOSTS   8
 

Definition at line 44 of file mysql_com.h.

#define REFRESH_LOG   2
 

Definition at line 42 of file mysql_com.h.

#define REFRESH_TABLES   4
 

Definition at line 43 of file mysql_com.h.

#define socket_errno   errno
 

Definition at line 155 of file mysql_com.h.

#define TIMESTAMP_FLAG   1024
 

Definition at line 37 of file mysql_com.h.

#define UNIQUE_KEY_FLAG   4
 

Definition at line 28 of file mysql_com.h.

#define UNSIGNED_FLAG   32
 

Definition at line 31 of file mysql_com.h.

#define ZEROFILL_FLAG   64
 

Definition at line 32 of file mysql_com.h.


Typedef Documentation

typedef struct st_net NET
 

typedef struct st_udf_args UDF_ARGS
 

typedef struct st_udf_init UDF_INIT
 


Enumeration Type Documentation

enum enum_field_types
 

Enumerator:
FIELD_TYPE_DECIMAL 
FIELD_TYPE_TINY 
FIELD_TYPE_SHORT 
FIELD_TYPE_LONG 
FIELD_TYPE_FLOAT 
FIELD_TYPE_DOUBLE 
FIELD_TYPE_NULL 
FIELD_TYPE_TIMESTAMP 
FIELD_TYPE_LONGLONG 
FIELD_TYPE_INT24 
FIELD_TYPE_DATE 
FIELD_TYPE_TIME 
FIELD_TYPE_DATETIME 
FIELD_TYPE_YEAR 
FIELD_TYPE_NEWDATE 
FIELD_TYPE_ENUM 
FIELD_TYPE_SET 
FIELD_TYPE_TINY_BLOB 
FIELD_TYPE_MEDIUM_BLOB 
FIELD_TYPE_LONG_BLOB 
FIELD_TYPE_BLOB 
FIELD_TYPE_VAR_STRING 
FIELD_TYPE_STRING 

Definition at line 71 of file mysql_com.h.

enum enum_server_command
 

Enumerator:
COM_SLEEP 
COM_QUIT 
COM_INIT_DB 
COM_QUERY 
COM_FIELD_LIST 
COM_CREATE_DB 
COM_DROP_DB 
COM_REFRESH 
COM_SHUTDOWN 
COM_STATISTICS 
COM_PROCESS_INFO 
COM_CONNECT 
COM_PROCESS_KILL 
COM_DEBUG 
COM_PING 

Definition at line 20 of file mysql_com.h.

enum Item_result
 

Enumerator:
STRING_RESULT 
REAL_RESULT 
INT_RESULT 

Definition at line 113 of file mysql_com.h.


Function Documentation

my_bool check_scramble const char *  scramble,
const char *  message,
unsigned long *  salt,
my_bool  old_ver
 

void get_salt_from_password unsigned long *  res,
const char *  password
 

char* get_tty_password char *  opt_message  ) 
 

void make_scrambled_password char *  to,
const char *  password
 

int my_net_init NET net,
Socket  fd
 

unsigned int my_net_read NET net  ) 
 

int my_net_write NET net,
char *  packet,
unsigned long  len
 

void net_clear NET net  ) 
 

void net_end NET net  ) 
 

int net_flush NET net  ) 
 

int net_real_write NET net,
const char *  packet,
unsigned long  len
 

int net_write_command NET net,
unsigned char  command,
const char *  packet,
unsigned long  len
 

void randominit struct rand_struct rand,
unsigned long  seed1,
unsigned long  seed2
 

double rnd struct rand_struct rand  ) 
 

char* scramble char *  to,
const char *  message,
const char *  password,
my_bool  old_ver
 


Variable Documentation

unsigned long max_allowed_packet
 

unsigned long net_buffer_length
 


Generated on Sun Mar 12 23:56:36 2006 for ScriptBasic by  doxygen 1.4.6-NO