|
| 1 | +/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB |
| 2 | + |
| 3 | + This program is free software; you can redistribute it and/or modify |
| 4 | + it under the terms of the GNU General Public License as published by |
| 5 | + the Free Software Foundation; either version 2 of the License, or |
| 6 | + (at your option) any later version. |
| 7 | + |
| 8 | + This program is distributed in the hope that it will be useful, |
| 9 | + but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | + GNU General Public License for more details. |
| 12 | + |
| 13 | + You should have received a copy of the GNU General Public License |
| 14 | + along with this program; if not, write to the Free Software |
| 15 | + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ |
| 16 | + |
| 17 | + |
| 18 | +#ifndef _client_settings_h |
| 19 | +#define _client_settings_h |
| 20 | +static my_bool mysql_client_init=0; |
| 21 | +extern uint mysql_port; |
| 22 | +extern my_string mysql_unix_port; |
| 23 | + |
| 24 | +#define CLIENT_CAPABILITIES (CLIENT_LONG_PASSWORD | CLIENT_LONG_FLAG \ |
| 25 | + | CLIENT_LOCAL_FILES | CLIENT_TRANSACTIONS \ |
| 26 | + | CLIENT_PROTOCOL_41 | CLIENT_SECURE_CONNECTION) |
| 27 | + |
| 28 | + |
| 29 | +#ifdef __WIN__ |
| 30 | +#define CONNECT_TIMEOUT 20 |
| 31 | +#else |
| 32 | +#define CONNECT_TIMEOUT 0 |
| 33 | +#endif |
| 34 | + |
| 35 | +#ifdef HAVE_SMEM |
| 36 | +char *shared_memory_base_name=0; |
| 37 | +const char *def_shared_memory_base_name=default_shared_memory_base_name; |
| 38 | +#endif |
| 39 | + |
| 40 | +static my_bool org_my_init_done=0; |
| 41 | + |
| 42 | +sig_handler pipe_sig_handler(int sig __attribute__((unused))); |
| 43 | +my_bool stmt_close(MYSQL_STMT *stmt, my_bool skip_list); |
| 44 | +void read_user_name(char *name); |
| 45 | +my_bool send_file_to_server(MYSQL *mysql, const char *filename); |
| 46 | + |
| 47 | +/* |
| 48 | + Let the user specify that we don't want SIGPIPE; This doesn't however work |
| 49 | + with threaded applications as we can have multiple read in progress. |
| 50 | +*/ |
| 51 | + |
| 52 | +#if !defined(__WIN__) && defined(SIGPIPE) && !defined(THREAD) |
| 53 | +#define init_sigpipe_variables sig_return old_signal_handler=(sig_return) 0; |
| 54 | +#define set_sigpipe(mysql) if ((mysql)->client_flag & CLIENT_IGNORE_SIGPIPE) old_signal_handler=signal(SIGPIPE,pipe_sig_handler) |
| 55 | +#define reset_sigpipe(mysql) if ((mysql)->client_flag & CLIENT_IGNORE_SIGPIPE) signal(SIGPIPE,old_signal_handler); |
| 56 | +#else |
| 57 | +#define init_sigpipe_variables |
| 58 | +#define set_sigpipe(mysql) |
| 59 | +#define reset_sigpipe(mysql) |
| 60 | +#endif |
| 61 | +#endif /* _client_settings_h */ |
0 commit comments