diff options
author | MySQL Team <mysql@php.net> | 2000-10-20 22:26:48 +0000 |
---|---|---|
committer | MySQL Team <mysql@php.net> | 2000-10-20 22:26:48 +0000 |
commit | a2dbb10eb14801370522ec248e1d819eb38a83a2 (patch) | |
tree | c3888dc986fa7baa6937b38d485af20d8ee81d9d /ext/mysql/libmysql/mysql_com.h | |
parent | ebaf484830ab5c7a0e14a9b43a174916330cd031 (diff) | |
download | php-git-a2dbb10eb14801370522ec248e1d819eb38a83a2.tar.gz |
Update libmysql to 3.23 version. No major changes visible to the user - mostly
bug fixes and other maintenance-oriented changes.
Diffstat (limited to 'ext/mysql/libmysql/mysql_com.h')
-rw-r--r-- | ext/mysql/libmysql/mysql_com.h | 50 |
1 files changed, 34 insertions, 16 deletions
diff --git a/ext/mysql/libmysql/mysql_com.h b/ext/mysql/libmysql/mysql_com.h index c4c0ecfdd7..f443a351e1 100644 --- a/ext/mysql/libmysql/mysql_com.h +++ b/ext/mysql/libmysql/mysql_com.h @@ -1,5 +1,5 @@ -/* Copyright Abandoned 1996 TCX DataKonsult AB & Monty Program KB & Detron HB - This file is public domain and comes with NO WARRANTY of any kind */ +/* Copyright Abandoned 1996 TCX DataKonsult AB & Monty Program KB & Detron HB +This file is public domain and comes with NO WARRANTY of any kind */ /* ** Common definition between mysql server & client @@ -8,9 +8,6 @@ #ifndef _mysql_com_h #define _mysql_com_h -#ifdef __cplusplus -extern "C" { -#endif #define NAME_LEN 64 /* Field/table name length */ #define HOSTNAME_LENGTH 60 @@ -19,23 +16,23 @@ extern "C" { #define LOCAL_HOST "localhost" #define LOCAL_HOST_NAMEDPIPE "." -#define MYSQL_PORT 3306 /* Alloced by ISI for MySQL */ #if defined(__EMX__) || defined(__OS2__) #undef MYSQL_UNIX_ADDR #define MYSQL_OS2_ADDR "\\socket\\MySQL" #define MYSQL_UNIX_ADDR MYSQL_OS2_ADDR #endif -#ifdef WIN32 +#if defined(__WIN__) && !defined( _CUSTOMCONFIG_) #define MYSQL_NAMEDPIPE "MySQL" #define MYSQL_SERVICENAME "MySql" -#endif +#endif /* __WIN__ */ 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,COM_TIME,COM_DELAYED_INSERT, - COM_CHANGE_USER}; + COM_CHANGE_USER, COM_BINLOG_DUMP, + COM_TABLE_DUMP}; #define NOT_NULL_FLAG 1 /* Field can't be NULL */ #define PRI_KEY_FLAG 2 /* Field is part of a primary key */ @@ -59,6 +56,14 @@ enum enum_server_command {COM_SLEEP,COM_QUIT,COM_INIT_DB,COM_QUERY, #define REFRESH_TABLES 4 /* close all tables */ #define REFRESH_HOSTS 8 /* Flush host cache */ #define REFRESH_STATUS 16 /* Flush status variables */ +#define REFRESH_THREADS 32 /* Flush status variables */ +#define REFRESH_SLAVE 64 /* Reset master info and restart slave + thread */ +#define REFRESH_MASTER 128 /* Remove all bin logs in the index + and truncate the index */ + +/* The following can't be set with mysql_refresh() */ +#define REFRESH_READ_LOCK 16384 /* Lock tables for read */ #define REFRESH_FAST 32768 /* Intern flag */ #define CLIENT_LONG_PASSWORD 1 /* new more secure passwords */ @@ -74,6 +79,10 @@ enum enum_server_command {COM_SLEEP,COM_QUIT,COM_INIT_DB,COM_QUERY, #define CLIENT_INTERACTIVE 1024 /* This is an interactive client */ #define CLIENT_SSL 2048 /* Switch to SSL after handshake */ #define CLIENT_IGNORE_SIGPIPE 4096 /* IGNORE sigpipes */ +#define CLIENT_TRANSACTIONS 8196 /* Client knows about transactions */ + +#define SERVER_STATUS_IN_TRANS 1 /* Transaction has started */ +#define SERVER_STATUS_AUTOCOMMIT 2 /* Server in auto_commit mode */ #define MYSQL_ERRMSG_SIZE 200 #define NET_READ_TIMEOUT 30 /* Timeout on read */ @@ -97,10 +106,15 @@ typedef struct st_net { unsigned char *buff,*buff_end,*write_pos,*read_pos; char last_error[MYSQL_ERRMSG_SIZE]; unsigned int last_errno,max_packet,timeout,pkt_nr; - my_bool error,return_errno,compress; - + unsigned char error; + my_bool return_errno,compress; + my_bool no_send_ok; /* needed if we are doing several + queries in one command ( as in LOAD TABLE ... FROM MASTER ), + and do not want to confuse the client with OK at the wrong time + */ unsigned long remain_in_buf,length, buf_length, where_b; - my_bool more; + unsigned int *return_status; + unsigned char reading_or_writing; char save_char; } NET; @@ -177,6 +191,10 @@ typedef struct st_udf_init /* Prototypes to password functions */ +#ifdef __cplusplus +extern "C" { +#endif + void randominit(struct rand_struct *,unsigned long seed1, unsigned long seed2); double rnd(struct rand_struct *); @@ -189,6 +207,9 @@ my_bool check_scramble(const char *, const char *message, unsigned long *salt,my_bool old_ver); char *get_tty_password(char *opt_message); void hash_password(unsigned long *result, const char *password); +#ifdef __cplusplus +} +#endif /* Some other useful functions */ @@ -198,13 +219,10 @@ void load_defaults(const char *conf_file, const char **groups, #define NULL_LENGTH ((unsigned long) ~0) /* For net_store_length */ -#ifdef WIN32 +#ifdef __WIN__ #define socket_errno WSAGetLastError() #else #define socket_errno errno #endif -#ifdef __cplusplus -} -#endif #endif |