diff options
author | unknown <anozdrin@mysql.com> | 2006-05-18 18:57:50 +0400 |
---|---|---|
committer | unknown <anozdrin@mysql.com> | 2006-05-18 18:57:50 +0400 |
commit | 8b4fcf6e3bbd5aab9c8027a5218013f17d408e00 (patch) | |
tree | 5a01e6e1e922c0816a9df2c5c09c95719d269269 /sql | |
parent | 24c005cf2b41bcec881162bc3ea6f73ef8958896 (diff) | |
download | mariadb-git-8b4fcf6e3bbd5aab9c8027a5218013f17d408e00.tar.gz |
This is an implementation of two WL items:
- WL#3158: IM: Instance configuration extensions;
- WL#3159: IM: --bootstrap and --start-default-instance modes
The following new statements have been added:
- CREATE INSTANCE;
- DROP INSTANCE;
The behaviour of the following statements have been changed:
- SET;
- UNSET;
- FLUSH INSTANCES;
- SHOW INSTANCES;
- SHOW INSTANCE OPTIONS;
BitKeeper/deleted/.del-im_options_set.imtest~b53d9d60e5684833:
Delete: mysql-test/t/im_options_set.imtest
BitKeeper/deleted/.del-im_options_set.result~59278f56be61d921:
Delete: mysql-test/r/im_options_set.result
BitKeeper/deleted/.del-im_options_unset.imtest~768eb186b51d0048:
Delete: mysql-test/t/im_options_unset.imtest
BitKeeper/deleted/.del-im_options_unset.result~20a4790cd3c70a4f:
Delete: mysql-test/r/im_options_unset.result
client/get_password.c:
Change prototype to avoid casting when using C-strings (char *).
include/m_string.h:
Moved LEX_STRING to global header from sql/ to be accessible
from all components (IM for one).
include/my_sys.h:
Added constants for modify_defaults_file().
include/mysql_com.h:
Removed duplicated declarations. my_sys.h should be used instead.
libmysql/get_password.c:
Change prototype to avoid casting when using C-strings (char *).
mysql-test/mysql-test-run.pl:
Added environment variables to be used from tests.
mysql-test/r/im_daemon_life_cycle.result:
Column name has been changed in SHOW INSTANCES.
mysql-test/r/im_life_cycle.result:
1. Column name has been changed in SHOW INSTANCES.
2. Removed redundant SHOW INSTANCE STATUS statements.
mysql-test/r/im_utils.result:
Updated the result file.
mysql-test/t/im_daemon_life_cycle-im.opt:
Set minimal monitoring interval for Instance Manager to speed up testing.
mysql-test/t/im_daemon_life_cycle.imtest:
Get Instance Manager and managed mysqld-instances enough time to start.
mysql-test/t/im_life_cycle.imtest:
1. Polishing;
2. Fixed a test error in 1.1.2.
mysql-test/t/im_utils.imtest:
Get Instance Manager and managed mysqld-instances enough time to start.
mysys/default.c:
Pass the name of the section to the handler function as well.
mysys/default_modify.c:
Added REMOVE_SECTION functionality.
server-tools/instance-manager/IMService.cpp:
Polishing: be more verbose.
server-tools/instance-manager/IMService.h:
Polishing: added copyright.
server-tools/instance-manager/Makefile.am:
Added new files.
server-tools/instance-manager/WindowsService.cpp:
Polishing: according to The Coding Style, TRUE/FALSE must be
used instead of true/false.
server-tools/instance-manager/WindowsService.h:
Polishing: added copyright.
server-tools/instance-manager/command.h:
Polishing: provide a comment for the main operation of "Command" class.
server-tools/instance-manager/commands.cc:
1. Added support for CREATE INSTANCE, DROP INSTANCE statements;
2. Added "deprecated" column in output of SHOW INSTANCE OPTIONS;
3. Modified the behaviour of SET/UNSET, FLUSH INSTANCES statements;
server-tools/instance-manager/commands.h:
1. Added support for CREATE INSTANCE, DROP INSTANCE statements;
2. Added "deprecated" column in output of SHOW INSTANCE OPTIONS;
3. Modified the behaviour of SET/UNSET, FLUSH INSTANCES statements;
server-tools/instance-manager/guardian.cc:
Added operations to retrieve state of managed instances.
server-tools/instance-manager/guardian.h:
Added operations to retrieve state of managed instances.
server-tools/instance-manager/instance.cc:
1. Provided an operation to check validity of instance name.
2. Added an attribute to distiguish mysqld-instances,
whose configuration should be kept backward-compatible.
server-tools/instance-manager/instance.h:
1. Provided an operation to check validity of instance name.
2. Added an attribute to distiguish mysqld-instances,
whose configuration should be kept backward-compatible.
server-tools/instance-manager/instance_map.cc:
1. Used the operation to check validity of instance name;
2. Added operations to manage instances.
server-tools/instance-manager/instance_map.h:
Added operations to manage instances.
server-tools/instance-manager/instance_options.cc:
Changed Instance_options so that it will be possible to manage
options on the fly.
server-tools/instance-manager/instance_options.h:
Changed Instance_options so that it will be possible to manage
options on the fly.
server-tools/instance-manager/listener.cc:
1. Remove reference to the instance of Options;
2. Use new Options naming scheme.
server-tools/instance-manager/listener.h:
Remove reference to the instance of Options;
server-tools/instance-manager/log.cc:
Polishing: use TRUE/FALSE instead of true/false.
server-tools/instance-manager/manager.cc:
Added a common for IM operation to work with configuration file.
server-tools/instance-manager/manager.h:
Added a common for IM operation to work with configuration file.
server-tools/instance-manager/messages.cc:
Added messages for new errors.
server-tools/instance-manager/mysql_connection.cc:
1. Move a constant to common place.
2. Polishing.
server-tools/instance-manager/mysql_manager_error.h:
Added new errors.
server-tools/instance-manager/mysqlmanager.cc:
1. Use error code from Options::load();
2. Eliminate type-casting warning on Windows.
server-tools/instance-manager/options.cc:
Added support for user-management command-line options.
server-tools/instance-manager/options.h:
Added support for user-management command-line options.
server-tools/instance-manager/parse.cc:
1. Added support of new statements:
- CREATE INSTANCE;
- DROP INSTANCE.
2. Modified SET/UNSET.
server-tools/instance-manager/parse.h:
1. Added support of new statements:
- CREATE INSTANCE;
- DROP INSTANCE.
2. Modified SET/UNSET.
server-tools/instance-manager/parse_output.cc:
Sorted out header files.
server-tools/instance-manager/parse_output.h:
Sorted out header files.
server-tools/instance-manager/portability.h:
1. Added constants for Windows.
2. Moved system-dependent defines from instance_options.cc.
server-tools/instance-manager/priv.cc:
Updated version.
server-tools/instance-manager/priv.h:
Added some global constants.
server-tools/instance-manager/protocol.cc:
Replaced NAME_WITH_LENGTH by LEX_STRING.
server-tools/instance-manager/protocol.h:
Replaced NAME_WITH_LENGTH by LEX_STRING.
server-tools/instance-manager/thread_registry.cc:
Polishing: use TRUE/FALSE instead of true/false.
server-tools/instance-manager/user_map.cc:
Added support for managing password database.
server-tools/instance-manager/user_map.h:
Added support for managing password database.
sql/sp.cc:
Replaced LEX_STRING_WITH_INIT by LEX_STRING + struct initialization.
sql/sp_head.cc:
Replaced LEX_STRING_WITH_INIT by LEX_STRING + struct initialization.
sql/spatial.cc:
Removed LEX_STRING_WITH_INIT.
sql/spatial.h:
Removed LEX_STRING_WITH_INIT.
sql/sql_string.h:
Moved STRING_WITH_LEN() macro out from sql (to m_string.h).
sql/sql_trigger.cc:
Moved STRING_WITH_LEN() macro out from sql (to m_string.h).
sql/structs.h:
Removed LEX_STRING_WITH_INIT.
support-files/mysql.server.sh:
Instruct Instance Manager to work in mysqld-safe compatible mode
for backward compatibility.
mysql-test/r/im_cmd_line.result:
Added result file.
mysql-test/r/im_instance_conf.result:
Added result file.
mysql-test/r/im_options.result:
Added result file.
mysql-test/t/im_cmd_line.imtest:
IM command-line options test.
mysql-test/t/im_instance_conf-im.opt:
Set minimal monitoring interval for Instance Manager to speed up testing.
mysql-test/t/im_instance_conf.imtest:
Added a new test case for checking instance-management.
mysql-test/t/im_life_cycle-im.opt:
Set minimal monitoring interval for Instance Manager to speed up testing.
mysql-test/t/im_options.imtest:
Join im_options_set and im_options_unset and add new tests.
mysql-test/t/im_utils-im.opt:
Set minimal monitoring interval for Instance Manager to speed up testing.
server-tools/instance-manager/exit_codes.h:
New file for defining exit codes for user-management mode.
server-tools/instance-manager/user_management_commands.cc:
User-management commands implementation.
server-tools/instance-manager/user_management_commands.h:
User-management command declarations.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sp.cc | 10 | ||||
-rw-r--r-- | sql/sp_head.cc | 4 | ||||
-rw-r--r-- | sql/spatial.cc | 5 | ||||
-rw-r--r-- | sql/spatial.h | 2 | ||||
-rw-r--r-- | sql/sql_string.h | 2 | ||||
-rw-r--r-- | sql/sql_trigger.cc | 4 | ||||
-rw-r--r-- | sql/structs.h | 16 |
7 files changed, 13 insertions, 30 deletions
diff --git a/sql/sp.cc b/sql/sp.cc index 7fc388860d1..77d91be28b9 100644 --- a/sql/sp.cc +++ b/sql/sp.cc @@ -409,15 +409,13 @@ db_load_routine(THD *thd, int type, sp_name *name, sp_head **sphp, ulong old_sql_mode= thd->variables.sql_mode; ha_rows old_select_limit= thd->variables.select_limit; sp_rcontext *old_spcont= thd->spcont; - + char definer_user_name_holder[USERNAME_LENGTH + 1]; - LEX_STRING_WITH_INIT definer_user_name(definer_user_name_holder, - USERNAME_LENGTH); + LEX_STRING definer_user_name= { definer_user_name_holder, USERNAME_LENGTH }; char definer_host_name_holder[HOSTNAME_LENGTH + 1]; - LEX_STRING_WITH_INIT definer_host_name(definer_host_name_holder, - HOSTNAME_LENGTH); - + LEX_STRING definer_host_name= { definer_host_name_holder, HOSTNAME_LENGTH }; + int ret; thd->variables.sql_mode= sql_mode; diff --git a/sql/sp_head.cc b/sql/sp_head.cc index 47d4326d780..2707cb76281 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -1850,10 +1850,10 @@ void sp_head::set_definer(const char *definer, uint definerlen) { char user_name_holder[USERNAME_LENGTH + 1]; - LEX_STRING_WITH_INIT user_name(user_name_holder, USERNAME_LENGTH); + LEX_STRING user_name= { user_name_holder, USERNAME_LENGTH }; char host_name_holder[HOSTNAME_LENGTH + 1]; - LEX_STRING_WITH_INIT host_name(host_name_holder, HOSTNAME_LENGTH); + LEX_STRING host_name= { host_name_holder, HOSTNAME_LENGTH }; parse_user(definer, definerlen, user_name.str, &user_name.length, host_name.str, &host_name.length); diff --git a/sql/spatial.cc b/sql/spatial.cc index e91653f79d5..9f1f05aa18f 100644 --- a/sql/spatial.cc +++ b/sql/spatial.cc @@ -34,8 +34,11 @@ static Geometry::Class_info **ci_collection_end= Geometry::Class_info::Class_info(const char *name, int type_id, void(*create_func)(void *)): - m_name(name, strlen(name)), m_type_id(type_id), m_create_func(create_func) + m_type_id(type_id), m_create_func(create_func) { + m_name.str= (char *) name; + m_name.length= strlen(name); + ci_collection[type_id]= this; } diff --git a/sql/spatial.h b/sql/spatial.h index a6f74a1ada0..36949ff5014 100644 --- a/sql/spatial.h +++ b/sql/spatial.h @@ -200,7 +200,7 @@ public: class Class_info { public: - LEX_STRING_WITH_INIT m_name; + LEX_STRING m_name; int m_type_id; void (*m_create_func)(void *); Class_info(const char *name, int type_id, void(*create_func)(void *)); diff --git a/sql/sql_string.h b/sql/sql_string.h index 0659f684afe..ddae6368228 100644 --- a/sql/sql_string.h +++ b/sql/sql_string.h @@ -24,8 +24,6 @@ #define NOT_FIXED_DEC 31 #endif -#define STRING_WITH_LEN(X) ((const char*) X), ((uint) (sizeof(X) - 1)) - class String; int sortcmp(const String *a,const String *b, CHARSET_INFO *cs); String *copy_if_not_alloced(String *a,String *b,uint32 arg_length); diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc index b2b6b115f7d..60a64f9fc1f 100644 --- a/sql/sql_trigger.cc +++ b/sql/sql_trigger.cc @@ -1412,8 +1412,8 @@ bool Table_triggers_list::change_table_name(THD *thd, const char *db, } if (table.triggers) { - LEX_STRING_WITH_INIT old_table_name(old_table, strlen(old_table)); - LEX_STRING_WITH_INIT new_table_name(new_table, strlen(new_table)); + LEX_STRING old_table_name= { (char *) STRING_WITH_LEN(old_table) }; + LEX_STRING new_table_name= { (char *) STRING_WITH_LEN(new_table) }; /* Since triggers should be in the same schema as their subject tables moving table with them between two schemas raises too many questions. diff --git a/sql/structs.h b/sql/structs.h index e369d8ed7e8..dc835db1e99 100644 --- a/sql/structs.h +++ b/sql/structs.h @@ -20,22 +20,6 @@ struct st_table; class Field; -typedef struct st_lex_string -{ - char *str; - uint length; -} LEX_STRING; - -typedef struct st_lex_string_with_init :public st_lex_string -{ - st_lex_string_with_init(const char *str_arg, uint length_arg) - { - str= (char*) str_arg; - length= length_arg; - } -} LEX_STRING_WITH_INIT; - - typedef struct st_date_time_format { uchar positions[8]; char time_separator; /* Separator between hour and minute */ |