2004-10-23 11:32:52 +04:00
|
|
|
#ifndef INCLUDES_MYSQL_INSTANCE_MANAGER_COMMANDS_H
|
|
|
|
#define INCLUDES_MYSQL_INSTANCE_MANAGER_COMMANDS_H
|
|
|
|
/* Copyright (C) 2004 MySQL AB
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program 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 General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
|
|
|
|
2006-05-18 18:57:50 +04:00
|
|
|
#include <my_global.h>
|
|
|
|
#include <my_sys.h>
|
2006-05-19 04:51:23 +04:00
|
|
|
#include <m_string.h>
|
2006-05-18 18:57:50 +04:00
|
|
|
#include <hash.h>
|
|
|
|
|
2005-03-22 02:04:14 +03:00
|
|
|
#include "command.h"
|
2004-10-23 11:32:52 +04:00
|
|
|
#include "instance.h"
|
2005-04-09 14:28:39 +04:00
|
|
|
#include "parse.h"
|
2004-10-23 11:32:52 +04:00
|
|
|
|
2006-05-18 18:57:50 +04:00
|
|
|
#if defined(__GNUC__) && defined(USE_PRAGMA_INTERFACE)
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2004-10-23 11:32:52 +04:00
|
|
|
/*
|
|
|
|
Print all instances of this instance manager.
|
Port cleanups, trivial refactoring and code rearrangements from
Alik's patch for BUG#22306: STOP INSTANCE can not be applied for
instances in Crashed, Failed and Abandoned" to ease review process.
Evaluate global variable linuxthreads before starting threads to avoid
a race.
server-tools/instance-manager/buffer.cc:
Fix spelling.
server-tools/instance-manager/command.h:
Fix spelling.
server-tools/instance-manager/commands.cc:
Fix spelling.
server-tools/instance-manager/commands.h:
Fix spelling, tidy up.
server-tools/instance-manager/guardian.cc:
Cleanup logging, options.get_shutdown_delay() is a method, tidy up.
server-tools/instance-manager/instance.cc:
Rearrange methods to be the same as in Alik's patch, fix spelling errors,
clean up logging texts, port comments from Alik's patch,
implement some basic renames from his patch.
No real changes.
server-tools/instance-manager/instance.h:
Tidy up, renames.
server-tools/instance-manager/instance_map.cc:
Fix spellings, port some refactoring from Alik's patch.
server-tools/instance-manager/instance_map.h:
Cleanup.
server-tools/instance-manager/instance_options.cc:
Cleanup. Implement Instance_options::get_shutdown_delay() and
Instance_options::get_mysqld_port().
server-tools/instance-manager/instance_options.h:
Cleanup.
server-tools/instance-manager/listener.cc:
Cleanup.
server-tools/instance-manager/log.cc:
Fix spelling.
server-tools/instance-manager/manager.cc:
Cleanup.
server-tools/instance-manager/manager.h:
Add getters for Manager members.
server-tools/instance-manager/mysqlmanager.cc:
Evaluate linuxthreads before starting threads to avoid a race.
server-tools/instance-manager/parse_output.cc:
Fix spelling.
server-tools/instance-manager/priv.cc:
Cleanup.
server-tools/instance-manager/priv.h:
Cleanup.
server-tools/instance-manager/user_management_commands.cc:
Fix spelling.
server-tools/instance-manager/user_management_commands.h:
Fix spelling.
server-tools/instance-manager/user_map.cc:
Fix spelling.
2006-11-18 01:34:44 +03:00
|
|
|
Grammar: SHOW INSTANCES
|
2004-10-23 11:32:52 +04:00
|
|
|
*/
|
|
|
|
|
Port cleanups, trivial refactoring and code rearrangements from
Alik's patch for BUG#22306: STOP INSTANCE can not be applied for
instances in Crashed, Failed and Abandoned" to ease review process.
Evaluate global variable linuxthreads before starting threads to avoid
a race.
server-tools/instance-manager/buffer.cc:
Fix spelling.
server-tools/instance-manager/command.h:
Fix spelling.
server-tools/instance-manager/commands.cc:
Fix spelling.
server-tools/instance-manager/commands.h:
Fix spelling, tidy up.
server-tools/instance-manager/guardian.cc:
Cleanup logging, options.get_shutdown_delay() is a method, tidy up.
server-tools/instance-manager/instance.cc:
Rearrange methods to be the same as in Alik's patch, fix spelling errors,
clean up logging texts, port comments from Alik's patch,
implement some basic renames from his patch.
No real changes.
server-tools/instance-manager/instance.h:
Tidy up, renames.
server-tools/instance-manager/instance_map.cc:
Fix spellings, port some refactoring from Alik's patch.
server-tools/instance-manager/instance_map.h:
Cleanup.
server-tools/instance-manager/instance_options.cc:
Cleanup. Implement Instance_options::get_shutdown_delay() and
Instance_options::get_mysqld_port().
server-tools/instance-manager/instance_options.h:
Cleanup.
server-tools/instance-manager/listener.cc:
Cleanup.
server-tools/instance-manager/log.cc:
Fix spelling.
server-tools/instance-manager/manager.cc:
Cleanup.
server-tools/instance-manager/manager.h:
Add getters for Manager members.
server-tools/instance-manager/mysqlmanager.cc:
Evaluate linuxthreads before starting threads to avoid a race.
server-tools/instance-manager/parse_output.cc:
Fix spelling.
server-tools/instance-manager/priv.cc:
Cleanup.
server-tools/instance-manager/priv.h:
Cleanup.
server-tools/instance-manager/user_management_commands.cc:
Fix spelling.
server-tools/instance-manager/user_management_commands.h:
Fix spelling.
server-tools/instance-manager/user_map.cc:
Fix spelling.
2006-11-18 01:34:44 +03:00
|
|
|
class Show_instances: public Command
|
2004-10-23 11:32:52 +04:00
|
|
|
{
|
2006-11-21 17:47:14 +03:00
|
|
|
public:
|
|
|
|
Show_instances()
|
|
|
|
{ }
|
|
|
|
|
2004-10-23 11:32:52 +04:00
|
|
|
public:
|
2006-05-18 18:57:50 +04:00
|
|
|
int execute(st_net *net, ulong connection_id);
|
|
|
|
|
|
|
|
private:
|
|
|
|
int write_header(st_net *net);
|
|
|
|
int write_data(st_net *net);
|
2004-10-23 11:32:52 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
2006-05-18 18:57:50 +04:00
|
|
|
Reread configuration file and refresh internal cache.
|
2004-10-23 11:32:52 +04:00
|
|
|
Grammar: FLUSH INSTANCES
|
|
|
|
*/
|
|
|
|
|
2006-11-21 17:01:11 +03:00
|
|
|
class Flush_instances: public Command
|
2004-10-23 11:32:52 +04:00
|
|
|
{
|
2006-11-21 17:47:14 +03:00
|
|
|
public:
|
|
|
|
Flush_instances()
|
|
|
|
{ }
|
|
|
|
|
2004-10-23 11:32:52 +04:00
|
|
|
public:
|
2006-05-18 18:57:50 +04:00
|
|
|
int execute(st_net *net, ulong connection_id);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
Abstract class for Instance-specific commands.
|
|
|
|
*/
|
|
|
|
|
2006-11-21 17:01:11 +03:00
|
|
|
class Abstract_instance_cmd: public Command
|
2006-05-18 18:57:50 +04:00
|
|
|
{
|
|
|
|
public:
|
2006-11-16 23:36:20 +03:00
|
|
|
Abstract_instance_cmd(const LEX_STRING *instance_name_arg);
|
2006-05-18 18:57:50 +04:00
|
|
|
|
|
|
|
public:
|
|
|
|
virtual int execute(st_net *net, ulong connection_id);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
/* MT-NOTE: this operation is called under acquired Instance_map's lock. */
|
|
|
|
virtual int execute_impl(st_net *net, Instance *instance) = 0;
|
|
|
|
|
|
|
|
/*
|
|
|
|
This operation is invoked on successful return of execute_impl() and is
|
|
|
|
intended to send closing data.
|
|
|
|
|
|
|
|
MT-NOTE: this operation is called under released Instance_map's lock.
|
|
|
|
*/
|
|
|
|
virtual int send_ok_response(st_net *net, ulong connection_id) = 0;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
inline const LEX_STRING *get_instance_name() const
|
|
|
|
{
|
|
|
|
return instance_name.get_str();
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
Instance_name instance_name;
|
2004-10-23 11:32:52 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
Print status of an instance.
|
Port cleanups, trivial refactoring and code rearrangements from
Alik's patch for BUG#22306: STOP INSTANCE can not be applied for
instances in Crashed, Failed and Abandoned" to ease review process.
Evaluate global variable linuxthreads before starting threads to avoid
a race.
server-tools/instance-manager/buffer.cc:
Fix spelling.
server-tools/instance-manager/command.h:
Fix spelling.
server-tools/instance-manager/commands.cc:
Fix spelling.
server-tools/instance-manager/commands.h:
Fix spelling, tidy up.
server-tools/instance-manager/guardian.cc:
Cleanup logging, options.get_shutdown_delay() is a method, tidy up.
server-tools/instance-manager/instance.cc:
Rearrange methods to be the same as in Alik's patch, fix spelling errors,
clean up logging texts, port comments from Alik's patch,
implement some basic renames from his patch.
No real changes.
server-tools/instance-manager/instance.h:
Tidy up, renames.
server-tools/instance-manager/instance_map.cc:
Fix spellings, port some refactoring from Alik's patch.
server-tools/instance-manager/instance_map.h:
Cleanup.
server-tools/instance-manager/instance_options.cc:
Cleanup. Implement Instance_options::get_shutdown_delay() and
Instance_options::get_mysqld_port().
server-tools/instance-manager/instance_options.h:
Cleanup.
server-tools/instance-manager/listener.cc:
Cleanup.
server-tools/instance-manager/log.cc:
Fix spelling.
server-tools/instance-manager/manager.cc:
Cleanup.
server-tools/instance-manager/manager.h:
Add getters for Manager members.
server-tools/instance-manager/mysqlmanager.cc:
Evaluate linuxthreads before starting threads to avoid a race.
server-tools/instance-manager/parse_output.cc:
Fix spelling.
server-tools/instance-manager/priv.cc:
Cleanup.
server-tools/instance-manager/priv.h:
Cleanup.
server-tools/instance-manager/user_management_commands.cc:
Fix spelling.
server-tools/instance-manager/user_management_commands.h:
Fix spelling.
server-tools/instance-manager/user_map.cc:
Fix spelling.
2006-11-18 01:34:44 +03:00
|
|
|
Grammar: SHOW INSTANCE STATUS <instance_name>
|
2004-10-23 11:32:52 +04:00
|
|
|
*/
|
|
|
|
|
2006-11-21 17:01:11 +03:00
|
|
|
class Show_instance_status: public Abstract_instance_cmd
|
2004-10-23 11:32:52 +04:00
|
|
|
{
|
|
|
|
public:
|
2006-11-16 23:36:20 +03:00
|
|
|
Show_instance_status(const LEX_STRING *instance_name_arg);
|
2006-05-18 18:57:50 +04:00
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual int execute_impl(st_net *net, Instance *instance);
|
|
|
|
virtual int send_ok_response(st_net *net, ulong connection_id);
|
|
|
|
|
|
|
|
private:
|
|
|
|
int write_header(st_net *net);
|
|
|
|
int write_data(st_net *net, Instance *instance);
|
2004-10-23 11:32:52 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
2006-05-18 18:57:50 +04:00
|
|
|
Print options of chosen instance.
|
2004-10-23 11:32:52 +04:00
|
|
|
Grammar: SHOW INSTANCE OPTIONS <instance_name>
|
|
|
|
*/
|
|
|
|
|
2006-11-21 17:01:11 +03:00
|
|
|
class Show_instance_options: public Abstract_instance_cmd
|
2004-10-23 11:32:52 +04:00
|
|
|
{
|
|
|
|
public:
|
2006-11-16 23:36:20 +03:00
|
|
|
Show_instance_options(const LEX_STRING *instance_name_arg);
|
2004-10-23 11:32:52 +04:00
|
|
|
|
2006-05-18 18:57:50 +04:00
|
|
|
protected:
|
|
|
|
virtual int execute_impl(st_net *net, Instance *instance);
|
|
|
|
virtual int send_ok_response(st_net *net, ulong connection_id);
|
|
|
|
|
|
|
|
private:
|
|
|
|
int write_header(st_net *net);
|
|
|
|
int write_data(st_net *net, Instance *instance);
|
2004-10-23 11:32:52 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
Start an instance.
|
|
|
|
Grammar: START INSTANCE <instance_name>
|
|
|
|
*/
|
|
|
|
|
2006-11-21 17:01:11 +03:00
|
|
|
class Start_instance: public Abstract_instance_cmd
|
2004-10-23 11:32:52 +04:00
|
|
|
{
|
|
|
|
public:
|
2006-11-16 23:36:20 +03:00
|
|
|
Start_instance(const LEX_STRING *instance_name_arg);
|
2004-10-23 11:32:52 +04:00
|
|
|
|
2006-05-18 18:57:50 +04:00
|
|
|
protected:
|
|
|
|
virtual int execute_impl(st_net *net, Instance *instance);
|
|
|
|
virtual int send_ok_response(st_net *net, ulong connection_id);
|
2004-10-23 11:32:52 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
Stop an instance.
|
|
|
|
Grammar: STOP INSTANCE <instance_name>
|
|
|
|
*/
|
|
|
|
|
2006-11-21 17:01:11 +03:00
|
|
|
class Stop_instance: public Abstract_instance_cmd
|
2004-10-23 11:32:52 +04:00
|
|
|
{
|
|
|
|
public:
|
2006-11-16 23:36:20 +03:00
|
|
|
Stop_instance(const LEX_STRING *instance_name_arg);
|
2004-10-23 11:32:52 +04:00
|
|
|
|
2006-05-18 18:57:50 +04:00
|
|
|
protected:
|
|
|
|
virtual int execute_impl(st_net *net, Instance *instance);
|
|
|
|
virtual int send_ok_response(st_net *net, ulong connection_id);
|
2004-10-23 11:32:52 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2005-04-09 14:28:39 +04:00
|
|
|
/*
|
2006-05-18 18:57:50 +04:00
|
|
|
Create an instance.
|
|
|
|
Grammar: CREATE INSTANCE <instance_name> [<options>]
|
|
|
|
*/
|
|
|
|
|
2006-11-21 17:01:11 +03:00
|
|
|
class Create_instance: public Command
|
2006-05-18 18:57:50 +04:00
|
|
|
{
|
|
|
|
public:
|
2006-11-16 23:36:20 +03:00
|
|
|
Create_instance(const LEX_STRING *instance_name_arg);
|
2006-05-18 18:57:50 +04:00
|
|
|
|
|
|
|
public:
|
|
|
|
bool init(const char **text);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual int execute(st_net *net, ulong connection_id);
|
|
|
|
|
|
|
|
inline const LEX_STRING *get_instance_name() const
|
|
|
|
{
|
|
|
|
return instance_name.get_str();
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
bool parse_args(const char **text);
|
|
|
|
|
|
|
|
private:
|
|
|
|
Instance_name instance_name;
|
|
|
|
|
|
|
|
Named_value_arr options;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
Drop an instance.
|
|
|
|
Grammar: DROP INSTANCE <instance_name>
|
|
|
|
|
|
|
|
Operation is permitted only if the instance is stopped. On successful
|
|
|
|
completion the instance section is removed from config file and the instance
|
|
|
|
is removed from the instance map.
|
|
|
|
*/
|
|
|
|
|
2006-11-21 17:01:11 +03:00
|
|
|
class Drop_instance: public Abstract_instance_cmd
|
2006-05-18 18:57:50 +04:00
|
|
|
{
|
|
|
|
public:
|
2006-11-16 23:36:20 +03:00
|
|
|
Drop_instance(const LEX_STRING *instance_name_arg);
|
2006-05-18 18:57:50 +04:00
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual int execute_impl(st_net *net, Instance *instance);
|
|
|
|
virtual int send_ok_response(st_net *net, ulong connection_id);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
Print requested part of the log.
|
2005-04-09 14:28:39 +04:00
|
|
|
Grammar:
|
2006-05-18 18:57:50 +04:00
|
|
|
SHOW <instance_name> LOG {ERROR | SLOW | GENERAL} size[, offset_from_end]
|
2005-04-09 14:28:39 +04:00
|
|
|
*/
|
|
|
|
|
2006-11-21 17:01:11 +03:00
|
|
|
class Show_instance_log: public Abstract_instance_cmd
|
2005-04-09 14:28:39 +04:00
|
|
|
{
|
|
|
|
public:
|
2006-11-16 23:36:20 +03:00
|
|
|
Show_instance_log(const LEX_STRING *instance_name_arg,
|
2006-05-18 18:57:50 +04:00
|
|
|
Log_type log_type_arg, uint size_arg, uint offset_arg);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual int execute_impl(st_net *net, Instance *instance);
|
|
|
|
virtual int send_ok_response(st_net *net, ulong connection_id);
|
|
|
|
|
|
|
|
private:
|
|
|
|
int check_params(Instance *instance);
|
|
|
|
int write_header(st_net *net);
|
|
|
|
int write_data(st_net *net, Instance *instance);
|
2005-04-09 14:28:39 +04:00
|
|
|
|
2006-05-18 18:57:50 +04:00
|
|
|
private:
|
2005-04-09 14:28:39 +04:00
|
|
|
Log_type log_type;
|
|
|
|
uint size;
|
|
|
|
uint offset;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
Shows the list of the log files, used by an instance.
|
|
|
|
Grammar: SHOW <instance_name> LOG FILES
|
|
|
|
*/
|
|
|
|
|
2006-11-21 17:01:11 +03:00
|
|
|
class Show_instance_log_files: public Abstract_instance_cmd
|
2005-04-09 14:28:39 +04:00
|
|
|
{
|
|
|
|
public:
|
2006-11-16 23:36:20 +03:00
|
|
|
Show_instance_log_files(const LEX_STRING *instance_name_arg);
|
2006-05-18 18:57:50 +04:00
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual int execute_impl(st_net *net, Instance *instance);
|
|
|
|
virtual int send_ok_response(st_net *net, ulong connection_id);
|
|
|
|
|
|
|
|
private:
|
|
|
|
int write_header(st_net *net);
|
|
|
|
int write_data(st_net *net, Instance *instance);
|
2005-04-09 14:28:39 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2004-10-23 11:32:52 +04:00
|
|
|
/*
|
2006-05-18 18:57:50 +04:00
|
|
|
Abstract class for option-management commands.
|
2004-10-23 11:32:52 +04:00
|
|
|
*/
|
|
|
|
|
2006-05-18 18:57:50 +04:00
|
|
|
class Instance_options_list;
|
|
|
|
|
2006-11-21 17:01:11 +03:00
|
|
|
class Abstract_option_cmd: public Command
|
2004-10-23 11:32:52 +04:00
|
|
|
{
|
|
|
|
public:
|
2006-05-18 18:57:50 +04:00
|
|
|
~Abstract_option_cmd();
|
|
|
|
|
|
|
|
public:
|
|
|
|
bool add_option(const LEX_STRING *instance_name, Named_value *option);
|
|
|
|
|
|
|
|
public:
|
|
|
|
bool init(const char **text);
|
|
|
|
|
|
|
|
virtual int execute(st_net *net, ulong connection_id);
|
|
|
|
|
|
|
|
protected:
|
2006-11-16 23:36:20 +03:00
|
|
|
Abstract_option_cmd();
|
2006-05-18 18:57:50 +04:00
|
|
|
|
|
|
|
int correct_file(Instance *instance, Named_value *option, bool skip);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual bool parse_args(const char **text) = 0;
|
|
|
|
virtual int process_option(Instance *instance, Named_value *option) = 0;
|
|
|
|
|
|
|
|
private:
|
|
|
|
Instance_options_list *
|
|
|
|
get_instance_options_list(const LEX_STRING *instance_name);
|
|
|
|
|
|
|
|
int execute_impl(st_net *net, ulong connection_id);
|
|
|
|
|
|
|
|
private:
|
|
|
|
HASH instance_options_map;
|
|
|
|
bool initialized;
|
2004-10-23 11:32:52 +04:00
|
|
|
};
|
|
|
|
|
2006-05-18 18:57:50 +04:00
|
|
|
|
2005-04-09 14:28:39 +04:00
|
|
|
/*
|
|
|
|
Set an option for the instance.
|
2006-05-18 18:57:50 +04:00
|
|
|
Grammar: SET instance_name.option[=option_value][, ...]
|
2005-04-09 14:28:39 +04:00
|
|
|
*/
|
|
|
|
|
2006-11-21 17:01:11 +03:00
|
|
|
class Set_option: public Abstract_option_cmd
|
2005-04-09 14:28:39 +04:00
|
|
|
{
|
2006-11-21 17:47:14 +03:00
|
|
|
public:
|
|
|
|
Set_option()
|
|
|
|
{ }
|
|
|
|
|
2005-04-09 14:28:39 +04:00
|
|
|
protected:
|
2006-05-18 18:57:50 +04:00
|
|
|
virtual bool parse_args(const char **text);
|
|
|
|
virtual int process_option(Instance *instance, Named_value *option);
|
2005-04-09 14:28:39 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
2006-05-18 18:57:50 +04:00
|
|
|
Remove option of the instance.
|
|
|
|
Grammar: UNSET instance_name.option[, ...]
|
2005-04-09 14:28:39 +04:00
|
|
|
*/
|
|
|
|
|
2006-05-18 18:57:50 +04:00
|
|
|
class Unset_option: public Abstract_option_cmd
|
2005-04-09 14:28:39 +04:00
|
|
|
{
|
2006-11-21 17:47:14 +03:00
|
|
|
public:
|
|
|
|
Unset_option()
|
|
|
|
{ }
|
|
|
|
|
2006-05-18 18:57:50 +04:00
|
|
|
protected:
|
|
|
|
virtual bool parse_args(const char **text);
|
|
|
|
virtual int process_option(Instance *instance, Named_value *option);
|
2005-04-09 14:28:39 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2006-05-18 18:57:50 +04:00
|
|
|
/*
|
|
|
|
Syntax error command.
|
|
|
|
|
|
|
|
This command is issued if parser reported a syntax error. We need it to
|
|
|
|
distinguish between syntax error and internal parser error. E.g. parsing
|
|
|
|
failed because we hadn't had enought memory. In the latter case the parser
|
|
|
|
just returns NULL.
|
|
|
|
*/
|
|
|
|
|
2006-11-21 17:01:11 +03:00
|
|
|
class Syntax_error: public Command
|
2006-05-18 18:57:50 +04:00
|
|
|
{
|
2006-11-21 17:47:14 +03:00
|
|
|
public:
|
|
|
|
Syntax_error()
|
|
|
|
{ }
|
|
|
|
|
2006-05-18 18:57:50 +04:00
|
|
|
public:
|
|
|
|
int execute(st_net *net, ulong connection_id);
|
|
|
|
};
|
|
|
|
|
2004-10-23 11:32:52 +04:00
|
|
|
#endif /* INCLUDES_MYSQL_INSTANCE_MANAGER_COMMANDS_H */
|