#include <commands.h>
Inheritance diagram for Abstract_instance_cmd:


Public Member Functions | |
| Abstract_instance_cmd (Instance_map *instance_map_arg, const LEX_STRING *instance_name_arg) | |
| virtual int | execute (st_net *net, ulong connection_id) |
Protected Member Functions | |
| virtual int | execute_impl (st_net *net, Instance *instance)=0 |
| virtual int | send_ok_response (st_net *net, ulong connection_id)=0 |
| const LEX_STRING * | get_instance_name () const |
Private Attributes | |
| Instance_name | instance_name |
Definition at line 71 of file commands.h.
| Abstract_instance_cmd::Abstract_instance_cmd | ( | Instance_map * | instance_map_arg, | |
| const LEX_STRING * | instance_name_arg | |||
| ) |
Definition at line 245 of file commands.cc.
00247 :Command(instance_map_arg), 00248 instance_name(instance_name_arg) 00249 { 00250 /* 00251 MT-NOTE: we can not make a search for Instance object here, 00252 because it can dissappear after releasing the lock. 00253 */ 00254 }
Implements Command.
Definition at line 257 of file commands.cc.
References ER_BAD_INSTANCE_NAME, execute_impl(), Instance_map::find(), get_instance_name(), Command::instance_map, Instance_map::lock(), send_ok_response(), and Instance_map::unlock().
00258 { 00259 int err_code; 00260 00261 instance_map->lock(); 00262 00263 { 00264 Instance *instance= instance_map->find(get_instance_name()); 00265 00266 if (!instance) 00267 { 00268 instance_map->unlock(); 00269 return ER_BAD_INSTANCE_NAME; 00270 } 00271 00272 err_code= execute_impl(net, instance); 00273 } 00274 00275 instance_map->unlock(); 00276 00277 if (!err_code) 00278 err_code= send_ok_response(net, connection_id); 00279 00280 return err_code; 00281 }
Here is the call graph for this function:

| virtual int Abstract_instance_cmd::execute_impl | ( | st_net * | net, | |
| Instance * | instance | |||
| ) | [protected, pure virtual] |
Implemented in Show_instance_status, Show_instance_options, Start_instance, Stop_instance, Drop_instance, Show_instance_log, and Show_instance_log_files.
Referenced by execute().
Here is the caller graph for this function:

| const LEX_STRING* Abstract_instance_cmd::get_instance_name | ( | ) | const [inline, protected] |
Definition at line 93 of file commands.h.
References Instance_name::get_str(), and instance_name.
Referenced by execute(), Drop_instance::execute_impl(), Show_instance_options::write_data(), and Show_instance_status::write_data().
00094 { 00095 return instance_name.get_str(); 00096 }
Here is the call graph for this function:

Here is the caller graph for this function:

| virtual int Abstract_instance_cmd::send_ok_response | ( | st_net * | net, | |
| ulong | connection_id | |||
| ) | [protected, pure virtual] |
Implemented in Show_instance_status, Show_instance_options, Start_instance, Stop_instance, Drop_instance, Show_instance_log, and Show_instance_log_files.
Referenced by execute().
Here is the caller graph for this function:

1.4.7

