1
/* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* Copyright (C) 2008 MySQL
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.
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.
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
1
/* Copyright (C) 2000-2008 MySQL AB
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; version 2 of the License.
7
This program is distributed in the hope that it will be useful,
8
but WITHOUT ANY WARRANTY; without even the implied warranty of
9
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
GNU General Public License for more details.
12
You should have received a copy of the GNU General Public License
13
along with this program; if not, write to the Free Software
14
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
21
16
/* mysql command tool
22
17
* Commands compatible with mSQL by David J. Hughes
987
982
static int embedded_server_arg_count= 0;
988
983
static char *embedded_server_args[MAX_SERVER_ARGS];
989
984
static const char *embedded_server_groups[]=
990
{ "server", "embedded", "mysql_SERVER", 0 };
993
HIST_ENTRY is defined for libedit, but not for the real readline
994
Need to redefine it for real readline to find it
996
#if !defined(HAVE_HIST_ENTRY)
997
typedef struct _hist_entry {
1003
extern int add_history(const char *command); /* From readline directory */
1004
extern int read_history(const char *command);
1005
extern int write_history(const char *command);
1006
extern HIST_ENTRY *history_get(int num);
1007
extern int history_length;
985
{ "server", "mysql_SERVER", 0 };
987
extern "C" int history_length;
1008
988
static int not_in_history(const char *line);
1009
989
static void initialize_readline (const char *name);
1010
990
static void fix_history(GString *final_command);