~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle/client_settings.h

  • Committer: Mats Kindahl
  • Date: 2008-08-26 07:32:59 UTC
  • mto: (489.1.2 codestyle)
  • mto: This revision was merged to the branch mainline in revision 491.
  • Revision ID: mats@mysql.com-20080826073259-9k4evtajgldgolli
Replaced use of thd_proc_info() macro with calls to
set_proc_info() and get_proc_info() internally.  Introduced
functions set_thd_proc_info() and get_thd_proc_info() for
external users, i.e., plug-ins.

The set_thd_proc_info() accepted callers info that can be used to
print debug output, but the information was not used. The return
value was changed to void and the old value is not fetched any
more. To be able to get the value of proc_info for external
users, the function get_thd_proc_info() was introduced.

The thd_proc_info() macro called set_thd_proc_info() but almost
never used the return value of set_thd_proc_info() so the macro
was replaced with a call of THD::set_proc_info().

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
 
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
 
3
 *
 
4
 *  Copyright (C) 2008 MySQL
 
5
 *
 
6
 *  This program is free software; you can redistribute it and/or modify
 
7
 *  it under the terms of the GNU General Public License as published by
 
8
 *  the Free Software Foundation; either version 2 of the License, or
 
9
 *  (at your option) any later version.
 
10
 *
 
11
 *  This program is distributed in the hope that it will be useful,
 
12
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 *  GNU General Public License for more details.
 
15
 *
 
16
 *  You should have received a copy of the GNU General Public License
 
17
 *  along with this program; if not, write to the Free Software
 
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
19
 */
 
20
 
 
21
#ifndef _libdrizzle_client_settings_h
 
22
#define _libdrizzle_client_settings_h
 
23
 
 
24
#define CLIENT_CAPABILITIES (CLIENT_LONG_PASSWORD | CLIENT_LONG_FLAG |    \
 
25
                             CLIENT_TRANSACTIONS | \
 
26
                                                 CLIENT_SECURE_CONNECTION)
 
27
 
 
28
sig_handler my_pipe_sig_handler(int sig);
 
29
bool handle_local_infile(DRIZZLE *drizzle, const char *net_filename);
 
30
 
 
31
 
 
32
/* TODO: Do we still need these now that there's not non-threaded stuff? */
 
33
#define init_sigpipe_variables
 
34
#define set_sigpipe(drizzle)
 
35
#define reset_sigpipe(drizzle)
 
36
 
 
37
DRIZZLE *
 
38
cli_drizzle_connect(DRIZZLE *drizzle,const char *host, const char *user,
 
39
                       const char *passwd, const char *db,
 
40
                       uint port, const char *unix_socket,uint32_t client_flag);
 
41
 
 
42
void cli_drizzle_close(DRIZZLE *drizzle);
 
43
 
 
44
DRIZZLE_FIELD * cli_list_fields(DRIZZLE *drizzle);
 
45
DRIZZLE_DATA * cli_read_rows(DRIZZLE *drizzle,DRIZZLE_FIELD *drizzle_fields,
 
46
                                   uint fields);
 
47
int cli_unbuffered_fetch(DRIZZLE *drizzle, char **row);
 
48
const char * cli_read_statistics(DRIZZLE *drizzle);
 
49
int cli_read_change_user_result(DRIZZLE *drizzle);
 
50
 
 
51
C_MODE_START
 
52
extern int drizzle_init_character_set(DRIZZLE *drizzle);
 
53
C_MODE_END
 
54
 
 
55
#endif