diff options
| author | MySQL Team <mysql@php.net> | 2000-08-22 09:02:46 +0000 | 
|---|---|---|
| committer | MySQL Team <mysql@php.net> | 2000-08-22 09:02:46 +0000 | 
| commit | 4b1380e31c0f6e76c629611c7ba8c4e2e961a2fd (patch) | |
| tree | 853d1881366287956bbfa7edf2f4edc0ae62637e /ext/mysql/libmysql/mysql_com.h | |
| parent | bac08af4cb97ea7e9db18a4267fb070264792f2f (diff) | |
| download | php-git-4b1380e31c0f6e76c629611c7ba8c4e2e961a2fd.tar.gz | |
New files for MySQL 3.23.23 client library. New files are for qouting
using different character sets.
Diffstat (limited to 'ext/mysql/libmysql/mysql_com.h')
| -rw-r--r-- | ext/mysql/libmysql/mysql_com.h | 64 | 
1 files changed, 48 insertions, 16 deletions
diff --git a/ext/mysql/libmysql/mysql_com.h b/ext/mysql/libmysql/mysql_com.h index c4c0ecfdd7..2a1471f735 100644 --- a/ext/mysql/libmysql/mysql_com.h +++ b/ext/mysql/libmysql/mysql_com.h @@ -1,5 +1,19 @@ -/* 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 (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 */  /*  ** Common definition between mysql server & client @@ -8,9 +22,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 +30,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 +70,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 +93,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 +120,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 +205,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 +221,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 +233,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  | 
