diff options
Diffstat (limited to 'ext/mysql/libmysql/mysql_com.h')
| -rw-r--r-- | ext/mysql/libmysql/mysql_com.h | 64 | 
1 files changed, 16 insertions, 48 deletions
diff --git a/ext/mysql/libmysql/mysql_com.h b/ext/mysql/libmysql/mysql_com.h index 2a1471f735..c4c0ecfdd7 100644 --- a/ext/mysql/libmysql/mysql_com.h +++ b/ext/mysql/libmysql/mysql_com.h @@ -1,19 +1,5 @@ -/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB -    -   This library is free software; you can redistribute it and/or -   modify it under the terms of the GNU Library General Public -   License as published by the Free Software Foundation; either -   version 2 of the License, or (at your option) any later version. -    -   This library is distributed in the hope that it will be useful, -   but WITHOUT ANY WARRANTY; without even the implied warranty of -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU -   Library General Public License for more details. -    -   You should have received a copy of the GNU Library General Public -   License along with this library; if not, write to the Free -   Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -   MA 02111-1307, USA */ +/* 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 @@ -22,6 +8,9 @@  #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 @@ -30,23 +19,23 @@  #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 -#if defined(__WIN__) && !defined( _CUSTOMCONFIG_) +#ifdef WIN32  #define MYSQL_NAMEDPIPE "MySQL"  #define MYSQL_SERVICENAME "MySql" -#endif /* __WIN__ */ +#endif  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_BINLOG_DUMP, -                          COM_TABLE_DUMP}; +			  COM_CHANGE_USER};  #define NOT_NULL_FLAG	1		/* Field can't be NULL */  #define PRI_KEY_FLAG	2		/* Field is part of a primary key */ @@ -70,14 +59,6 @@ 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 */ @@ -93,10 +74,6 @@ 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 */ @@ -120,15 +97,10 @@ 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; -  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 -		      */ +  my_bool error,return_errno,compress; +    unsigned long remain_in_buf,length, buf_length, where_b; -  unsigned int *return_status; -  unsigned char reading_or_writing; +  my_bool more;    char save_char;  } NET; @@ -205,10 +177,6 @@ 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 *); @@ -221,9 +189,6 @@ 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 */ @@ -233,10 +198,13 @@ void load_defaults(const char *conf_file, const char **groups,  #define NULL_LENGTH ((unsigned long) ~0) /* For net_store_length */ -#ifdef __WIN__ +#ifdef WIN32  #define socket_errno WSAGetLastError()  #else  #define socket_errno errno  #endif +#ifdef	__cplusplus +} +#endif  #endif  | 
