Recommited with post-review fixes
server-tools/instance-manager/instance.cc:
fix behaviour of monitoring routines: they should not rely on the fact that instance object
which was used when the instances started exists at stop(). Instead routines should save the
name of the instance and look for it in the instance_map when needed.
server-tools/instance-manager/instance.h:
new functions declared. functions, which were converted to static removed from the class.
server-tools/instance-manager/instance_options.cc:
fix valgrind warning
server-tools/instance-manager/IMService.cpp:
syntax change requested by Petr
server-tools/instance-manager/options.cc:
return 1 instead of -1
server-tools/instance-manager/options.h:
changed return value of setup_windows_defaults to int from void
server-tools/instance-manager/IMService.cpp:
make sure HandleServiceOptions returns 0 on success and 1 on failure
server-tools/instance-manager/mysqlmanager.cc:
default return value is 1.
simplify some code bits by just jumping to err on error.
move options.cleanup inside the err block. In this case, the err block
is more than just an error block. It is the terminating block
for both error and success. You set return_value to 0 for success
or leave it as 1 for failure. This simplies this function a bit.
server-tools/instance-manager/options.cc:
remove the malloc for default password filename on Windows and replace
with statically allocated memory.
default Options:saved_argv to NULL so that we will know if we need
to free it in cleanup()
setup the default config file location for Windows inside the
setup_windows_defaults function and remove this code from load()
rework setup_windows_defaults so that it properly returns 0 on success
and 1 on error and so it fills in the default location for the
log file, password file, and config file.
server-tools/instance-manager/IMService.cpp:
removed \n from log_info calls as these will be added automatically
server-tools/instance-manager/user_map.cc:
added back in support for password files using \r\n, this time
without breaking the const contract.
Rename "port.h" to "portability.h" to avoid conflict with system header file name,
and include the file in "Makefile.am".
server-tools/instance-manager/Makefile.am:
Ensure that the (recently added) header "portability.h" (renamed from "port.h") gets included in the source packages.
server-tools/instance-manager/guardian.cc:
Rename "port.h" to "portability.h" to avoid conflict with system header file name.
server-tools/instance-manager/instance.cc:
Rename "port.h" to "portability.h" to avoid conflict with system header file name.
server-tools/instance-manager/instance_options.h:
Rename "port.h" to "portability.h" to avoid conflict with system header file name.
server-tools/instance-manager/listener.cc:
Rename "port.h" to "portability.h" to avoid conflict with system header file name.
server-tools/instance-manager/log.cc:
Rename "port.h" to "portability.h" to avoid conflict with system header file name.
server-tools/instance-manager/mysqlmanager.vcproj:
Rename "port.h" to "portability.h" to avoid conflict with system header file name.
server-tools/instance-manager/options.cc:
Rename "port.h" to "portability.h" to avoid conflict with system header file name.
server-tools/instance-manager/parse_output.cc:
Rename "port.h" to "portability.h" to avoid conflict with system header file name.
server-tools/instance-manager/portability.h:
Adapt the protective CPP symbol to the changed file name.
server-tools/instance-manager/priv.cc:
Rename "port.h" to "portability.h" to avoid conflict with system header file name.
server-tools/instance-manager/priv.h:
Rename "port.h" to "portability.h" to avoid conflict with system header file name.
server-tools/instance-manager/WindowsService.cpp:
Change mode to -rw-rw-r--
server-tools/instance-manager/WindowsService.h:
Change mode to -rw-rw-r--
server-tools/instance-manager/port.h:
Change mode to -rw-rw-r--
server-tools/instance-manager/mysqlmanager.vcproj:
Change mode to -rw-rw-r--
server-tools/instance-manager/IMService.cpp:
Change mode to -rw-rw-r--
server-tools/instance-manager/IMService.h:
Change mode to -rw-rw-r--
server-tools/instance-manager/commands.cc:
fix memory leak
server-tools/instance-manager/guardian.cc:
don't check pthread_mutex_lock/unlock return value, as it never returns error if properly
used (no self deadlocks) and initialized
server-tools/instance-manager/guardian.h:
prototype fixed
server-tools/instance-manager/instance_map.cc:
don't check pthread_mutex_lock/unlock status, as it never returns error if
properly used (no self deadlocks) and initialized
server-tools/instance-manager/instance_map.h:
prototype fixed
server-tools/instance-manager/listener.cc:
initialize highest-numbered descriptor to 0 for select before setting it with max(n, sockets[i]),
ifdef unix-specific code
server-tools/instance-manager/manager.cc:
remove commented stuff
server-tools/instance-manager/options.cc:
fix crash in load_defaults, which happened on all Unix systems due to
const char *Options::config_file= NULL. Check return value for GetModuleFileName.
Get rid of obscure default_config_file[FN_REFLEN]= "/etc/my.cnf"; which was never used
into fedora.(none):/home/reggie/bk/im_patch
server-tools/instance-manager/manager.cc:
Auto merged
server-tools/instance-manager/mysqlmanager.cc:
Auto merged
server-tools/instance-manager/options.h:
Auto merged
server-tools/instance-manager/commands.cc:
final merge of IM port code for Windows
server-tools/instance-manager/instance_map.cc:
final merge of IM port code for Windows
server-tools/instance-manager/options.cc:
final merge of IM port code for Windows
server-tools/instance-manager/IMService.cpp:
fixed tabs and spacing per JimW's review
server-tools/instance-manager/WindowsService.cpp:
fixed tabs and spacing per JimW's review
server-tools/instance-manager/WindowsService.h:
fixed tabs and spacing per JimW's review
server-tools/instance-manager/commands.cc:
fixed tabs and spacing per JimW's review
server-tools/instance-manager/instance.cc:
fixed tabs and spacing per JimW's review
server-tools/instance-manager/instance_map.cc:
fixed tabs and spacing per JimW's review
server-tools/instance-manager/listener.cc:
fixed tabs and spacing per JimW's review
server-tools/instance-manager/manager.cc:
fixed tabs and spacing per JimW's review
server-tools/instance-manager/options.cc:
fixed tabs and spacing per JimW's review
server-tools/instance-manager/user_map.cc:
fixed tabs and spacing per JimW's review
server-tools/instance-manager/commands.cc:
get rid of single_defaults_file_option and use Options::config_file instead
server-tools/instance-manager/commands.h:
get rid of single_defaults_file_option and use Options::config_file instead
server-tools/instance-manager/instance_map.cc:
get rid of single_defaults_file_option and use Options::config_file instead
server-tools/instance-manager/instance_map.h:
get rid of single_defaults_file_option and use Options::config_file instead
server-tools/instance-manager/manager.cc:
get rid of single_defaults_file_option and use Options::config_file instead
server-tools/instance-manager/options.cc:
Disable --defaults-extra-file and --no-defaults options for the IM as they have no sence.
Don't use print_defaults as it prints out wrong "first option" information for IM. Use only
Options::config_file to process options
server-tools/instance-manager/options.h:
get rid of single_defaults_file_option and use Options::config_file instead
Implemented on brian's request.
server-tools/instance-manager/Makefile.am:
define default config file
server-tools/instance-manager/commands.cc:
Use specified or default file to edit with SET commands instead of hardcoded file
server-tools/instance-manager/commands.h:
add member to SET commands
server-tools/instance-manager/instance_map.cc:
rename first_option -> single_defaults_option, made logging a bit more verbose
server-tools/instance-manager/instance_map.h:
rename first_option -> single_defaults_file + made it public
server-tools/instance-manager/manager.cc:
rename first_option -> single_defaults_file
server-tools/instance-manager/mysqlmanager.cc:
goto generic error label instead of simple return
server-tools/instance-manager/options.cc:
skip --defaults-extra file and give a message if it was specified, made IM
to read one config file only
server-tools/instance-manager/options.h:
added new members to the option structure
server-tools/instance-manager/commands.cc:
type cleanups for compiling on Windows
now using Options::config_file for the location of the single
my.cnf file we are using
server-tools/instance-manager/guardian.cc:
pthread_mutex_lock and unlock do not return a value on Windows
so we return 0 in all cases
server-tools/instance-manager/instance.cc:
big changes here.
Had to implement Windows versions of launch_and_wait and kill()
server-tools/instance-manager/instance.h:
added some function defs
server-tools/instance-manager/instance_map.cc:
pthread_mutex_lock and unlock do not return a value on Windows
Also, now using only the file named as Options::config_file
server-tools/instance-manager/instance_options.h:
added reference to port.h
server-tools/instance-manager/listener.cc:
reworked and simplified the socket handling code.
Added windows versions of the code that sets the sockets to be
non-blocking and non-inheritable
server-tools/instance-manager/listener.h:
change Options to always be a struct. Really surprised GCC was
letting this go. Options was declared to be struct in some places
and class in other places.
server-tools/instance-manager/log.cc:
added reference to port.h
server-tools/instance-manager/manager.cc:
moved all the signal code inside some #ifndef __WIN__ blocks
server-tools/instance-manager/manager.h:
change Options to always be a struct. Really surprised GCC was
letting this go. Options was declared to be struct in some places
and class in other places.
server-tools/instance-manager/mysqlmanager.cc:
added in the Windows service code.
server-tools/instance-manager/options.cc:
Added in the windows options for running as a service and the code
for loading settings only from a single file
server-tools/instance-manager/options.h:
added definitions for the new Windows service vars and routines
server-tools/instance-manager/parse_output.cc:
added reference to port.h
server-tools/instance-manager/priv.cc:
added reference to port.h
server-tools/instance-manager/priv.h:
linuxthreads should not be visible on Windows
server-tools/instance-manager/thread_registry.cc:
more __WIN__ blocking
server-tools/instance-manager/user_map.cc:
fixed passwd file code to handle files with \r\n line endings
server-tools/instance-manager/IMService.cpp:
New BitKeeper file ``server-tools/instance-manager/IMService.cpp''
server-tools/instance-manager/IMService.h:
New BitKeeper file ``server-tools/instance-manager/IMService.h''
server-tools/instance-manager/WindowsService.cpp:
New BitKeeper file ``server-tools/instance-manager/WindowsService.cpp''
server-tools/instance-manager/WindowsService.h:
New BitKeeper file ``server-tools/instance-manager/WindowsService.h''
server-tools/instance-manager/mysqlmanager.vcproj:
New BitKeeper file ``server-tools/instance-manager/mysqlmanager.vcproj''
server-tools/instance-manager/port.h:
New BitKeeper file ``server-tools/instance-manager/port.h''
server-tools/instance-manager/commands.cc:
remove commented out code
server-tools/instance-manager/instance.cc:
use flag instead of int variable
server-tools/instance-manager/instance.h:
no more default values
server-tools/instance-manager/instance_map.cc:
use flag to be more verbose
server-tools/instance-manager/instance_options.cc:
don't read options when looking for an option, use strmake instead of strchr
server-tools/instance-manager/instance_options.h:
fix comment, use flag instead of int value
server-tools/instance-manager/listener.cc:
don't like c++ comments
server-tools/instance-manager/log.cc:
safety: strmake adds trailing zero to the string
server-tools/instance-manager/parse_output.cc:
use strmake instead of strncpy, renamed varianles to make code more readable
server-tools/instance-manager/parse_output.h:
get rid of default value
server-tools/instance-manager/buffer.h:
fix for the valgring error
server-tools/instance-manager/commands.cc:
sent the version string
server-tools/instance-manager/instance_options.cc:
compute and store the version string
server-tools/instance-manager/instance_options.h:
add a version string option, and added caching of the mysqld_path length
server-tools/instance-manager/options.cc:
fix valgrind error
server-tools/instance-manager/parse_output.cc:
Add an option to parse_output_and_get_value in order to be
able to get the rest of the string after the found word in
the output of popen() (E.g. a version string).
server-tools/instance-manager/parse_output.h:
prototype changed
Changed name of function my_correct_default_file to
modify_defaults_file. Improved function and fixed some
bugs in it.
include/my_sys.h:
Changed function name.
include/mysql_com.h:
New function, modify_defaults_file()
libmysql/Makefile.shared:
New file, default_modify.lo
libmysql/libmysql.def:
New function, modify_defaults_file() and fixed version number.
libmysqld/libmysqld.def:
New function, modify_defaults_file()
mysys/Makefile.am:
New file, default_modify.c
mysys/default.c:
Removed function from default.c. New, corresponding one is in default_modify.c,
name is modify_defaults_file.
server-tools/instance-manager/commands.cc:
Changed function name.
sql/mysqld.cc:
Fixed typo.
Prefix enum symbols LOG_* with IM_, not to clash with system headers
server-tools/instance-manager/instance_options.cc:
Prefix enum symbols LOG_* with IM_, not to clash with system headers
server-tools/instance-manager/parse.cc:
Prefix enum symbols LOG_* with IM_, not to clash with system headers
server-tools/instance-manager/parse.h:
Prefix enum symbols LOG_* with IM_, not to clash with system headers
server-tools/instance-manager/commands.cc:
Prefix enum symbols LOG_* with IM_, not to clash with system headers
include/my_sys.h:
added prototype for the defaults correction function
libmysql/Makefile.shared:
my_chsize added to libmysql to let my_correct_defaults_file be used from libmysql
mysys/default.c:
New defaults function added we use it to correct defaults file. Currently the function doesn't lock defaults
file. This is because of the linking and backwards-compatibility issues. This needs to be fixed later.
mysys/my_chsize.c:
comment added
server-tools/instance-manager/buffer.cc:
cleanup
server-tools/instance-manager/commands.cc:
refactoring: removed do_command method from most of the classes
server-tools/instance-manager/commands.h:
cleanup
server-tools/instance-manager/guardian.cc:
cleanup
server-tools/instance-manager/instance.cc:
cleanup
server-tools/instance-manager/instance_map.cc:
cleanup
server-tools/instance-manager/instance_options.cc:
cleanup
server-tools/instance-manager/instance_options.h:
cleanup
server-tools/instance-manager/listener.cc:
cleanup
server-tools/instance-manager/log.cc:
cleanup
server-tools/instance-manager/manager.cc:
cleanup
server-tools/instance-manager/messages.cc:
new errors added
server-tools/instance-manager/mysql_connection.cc:
cleanup
server-tools/instance-manager/mysql_manager_error.h:
new error codes added
server-tools/instance-manager/mysqlmanager.cc:
clenup
server-tools/instance-manager/options.cc:
cleanup
server-tools/instance-manager/parse.cc:
removed unused function
server-tools/instance-manager/parse.h:
removed prototype
server-tools/instance-manager/protocol.cc:
cleanup
server-tools/instance-manager/protocol.h:
added enum to be used in protocol.cc instead of the constants
remove FIX_GCC_LINKING_PROBLEM and -DDEFINE_CXA_PURE_VIRTUAL
replace echo in configure.in with AC_MSG_WARN/AC_MSG_ERROR
don't set -DUSE_MYSYS_NEW for gcc 2.95
set $USE_MYSYS_NEW even if CXX is g++
yassl bugfixes
instantiate all yassl templates explicitly
client/Makefile.am:
mysqlbinlog as a c++ program may need my_new.cc (if CXX=gcc)
no FIX_GCC_LINKING_PROBLEM anymore - it's in my_new.cc
client/mysqladmin.cc:
no FIX_GCC_LINKING_PROBLEM anymore - it's in my_new.cc
client/mysqlbinlog.cc:
no FIX_GCC_LINKING_PROBLEM anymore - it's in my_new.cc
configure.in:
echo should be AC_MSG_WARN or AC_MSG_ERROR
don't set -DUSE_MYSYS_NEW for gcc 2.95 (to restore old behaviour)
set $USE_MYSYS_NEW even if CXX is g++ (for yassl, as it can be linked with C programs)
remove -DDEFINE_CXA_PURE_VIRTUAL - -DUSE_MYSYS_NEW is enough
extra/yassl/mySTL/list.hpp:
bugfixes
extra/yassl/src/Makefile.am:
no need to mess with CXXFLAGS anymore. Instantiate all templates explicitly
extra/yassl/src/crypto_wrapper.cpp:
instantiate templates explicitly
extra/yassl/src/yassl_imp.cpp:
instantiate templates explicitly
extra/yassl/src/yassl_int.cpp:
instantiate templates explicitly
extra/yassl/taocrypt/include/runtime.hpp:
use -DUSE_MYSYS_NEW not -DDEFINE_CXA_PURE_VIRTUAL
assert in __cxa_pure_virtual
remove dummy (and thus dangerous) __cxa_guard_acquire/__cxa_guard_release
extra/yassl/taocrypt/src/Makefile.am:
no need to mess with CXXFLAGS anymore. Instantiate all templates explicitly
extra/yassl/taocrypt/src/integer.cpp:
instantiate templates explicitly
extra/yassl/taocrypt/src/rsa.cpp:
instantiate templates explicitly
include/my_global.h:
no FIX_GCC_LINKING_PROBLEM anymore - it's in my_new.cc
mysys/my_new.cc:
no FIX_GCC_LINKING_PROBLEM anymore - it's in my_new.cc
server-tools/instance-manager/command.cc:
no FIX_GCC_LINKING_PROBLEM anymore - it's in my_new.cc
sql/ha_blackhole.cc:
typo fixed
sql/ha_innodb.cc:
warning fixed
sql/item_func.cc:
use LL()
sql/mysqld.cc:
no FIX_GCC_LINKING_PROBLEM anymore - it's in my_new.cc
server-tools/instance-manager/options.cc:
remove [mysql] group from the list of the groups read by the mysqlmanager (resulted from wrong merge long ago)
current version of the IM
server-tools/instance-manager/commands.cc:
Log and set options commands added
server-tools/instance-manager/commands.h:
Log and set options commands added
server-tools/instance-manager/factory.cc:
Log and set options factory entries added
server-tools/instance-manager/factory.h:
prototypes added
server-tools/instance-manager/instance_options.cc:
fill_log_options() added
server-tools/instance-manager/instance_options.h:
log processing options and funcctions added
server-tools/instance-manager/messages.cc:
new error messages added (log and option processing-related)
server-tools/instance-manager/mysql_connection.cc:
minor fixes
server-tools/instance-manager/mysql_manager_error.h:
new error codes added
server-tools/instance-manager/parse.cc:
parser fixed to recognize new commands. function to parse command-line options added
server-tools/instance-manager/parse.h:
header fixed in line with .cc changes
server-tools/instance-manager/parse_output.cc:
cleanup
server-tools/instance-manager/parse_output.h:
header guards added
server-tools/instance-manager/protocol.cc:
Protocol support extended to provide messages in ok packet
server-tools/instance-manager/protocol.h:
protocol support extended: ok packet could contain messages
doesn't work out of the box)
client/Makefile.am:
old mysqlmanager, mysqlmanagerc and mysqlmanager-pwgen renamed into mysqltestmanager, mysqltestmanagerc and
mysqltestmanager-pwgen respectively
mysql-test/mysql-test-run.sh:
Old mysqlmanager, mysqlmanagerc and mysqlmanager-pwgen renamed into
mysqltestmanager, mysqltestmanagerc and mysqltestmanager-pwgen respectively
scripts/make_binary_distribution.sh:
Fix the script to include IM and process mysql.server correctly
server-tools/instance-manager/Makefile.am:
change default socket name to follow mysqld style (and thus, fix the ptoblem with non-existant localstatedir
in the binary distribution)
support-files/mysql.spec.sh:
Fix mysql.spec template to reflect the name change
tools/Makefile.am:
old mysqlmanager renamed into mysqltestmanager
server-tools/instance-manager/buffer.cc:
coding style fixes
server-tools/instance-manager/buffer.h:
wrong constructor initialisation fixed
server-tools/instance-manager/commands.cc:
cleanup
server-tools/instance-manager/guardian.cc:
cleanup + added lock/unlock routines
server-tools/instance-manager/guardian.h:
GUARD_NODE moved to the header
server-tools/instance-manager/instance.cc:
Fix for the linuxthreads/POSIX signal handling problem (see comments in the code)
server-tools/instance-manager/instance.h:
condition variable renamed and commented
server-tools/instance-manager/instance_map.cc:
We need to refresh guardian during flush_instances
server-tools/instance-manager/instance_map.h:
removed obsolete function declaration
server-tools/instance-manager/instance_options.cc:
added caching of computed values
server-tools/instance-manager/instance_options.h:
added vars to cache some option values
server-tools/instance-manager/listener.cc:
check whether we are running on the linux threads
server-tools/instance-manager/manager.cc:
lock guardian before init()
server-tools/instance-manager/parse_output.cc:
cleanup
server-tools/instance-manager/priv.cc:
added global variables to detect whether we are running on the LinuxThreads
server-tools/instance-manager/priv.h:
added global variables to detect whether we are running on the LinuxThreads
server-tools/instance-manager.
server-tools/instance-manager/Makefile.am:
The famous CPPFLAGS (aka "upgrade automake") thing was removed. Upon Brian's request.
server-tools/instance-manager/Makefile.am:
link get_password() to the IM
server-tools/instance-manager/options.cc:
make passwd() function to read password in mysqladmin way
BitKeeper/deleted/.del-my.cnf~9322f78f12eb2f3c:
Delete: support-files/my.cnf
include/my_sys.h:
fixed prototype to reflect changes in default.c
mysys/default.c:
use my_search_option_files instead of process_default_option_files. This is used from the IM.
server-tools/instance-manager/instance.cc:
added parameter to complete_initialization(). this ine marks whether we are creating the only instance
(for instance, when no config file given)
server-tools/instance-manager/instance.h:
prototype changed
server-tools/instance-manager/instance_map.cc:
Now call my_search_option_files to work smootly with --defaults-file
server-tools/instance-manager/instance_map.h:
added first_option member. This is set of mysqlmanager was started with --defaults-file or with
--extra-defaults-file to be passed to the my_search_option_files
server-tools/instance-manager/instance_options.cc:
if we have only one instance, name the pidfile `hostname`.pid for compatibility reasons.
server-tools/instance-manager/instance_options.h:
header fixed according to .cc
server-tools/instance-manager/manager.cc:
prototype fixed
server-tools/instance-manager/options.cc:
save --defaults-file of --defaults-extra-file to pass it to my_search_option_files
server-tools/instance-manager/options.h:
added an optin to save --default-file options
support-files/Makefile.am:
revert changes
into mysql.com:/home/cps/mysql/devel/im-fix-review
server-tools/instance-manager/Makefile.am:
Auto merged
support-files/Makefile.am:
Auto merged
support-files/mysql.spec.sh:
Auto merged
server-tools/instance-manager/commands.cc:
typo fixed
server-tools/instance-manager/instance.cc:
moved options.complete_initialization to the instance::complete_initialization
server-tools/instance-manager/instance.h:
moved options.complete_initialization to the Instance::complete_initialization
server-tools/instance-manager/instance_map.cc:
moved options.complete_initialization to the Instance::complete_initialization, added code to create
default instance if none is given iin config. file
server-tools/instance-manager/instance_map.h:
complete_initialization now returns an error in case of a problem
server-tools/instance-manager/instance_options.cc:
some error handling added
server-tools/instance-manager/instance_options.h:
error handling added
server-tools/instance-manager/manager.cc:
error handling added
server-tools/instance-manager/mysqlmanager.cc:
stop mysqlmanager if options were not loaded correctly
server-tools/instance-manager/options.cc:
return-value added
server-tools/instance-manager/options.h:
return-value added to the OPtions::load()
server-tools/instance-manager/parse_output.cc:
no need to examine mysqld --help -v termination status
server-tools/instance-manager/buffer.cc:
use my_realloc instead of realloc
server-tools/instance-manager/buffer.h:
use my_malloc instead of malloc
server-tools/instance-manager/commands.cc:
No need to send a buffer if there were some error while writing to it
server-tools/instance-manager/instance_options.cc:
cleanup
server-tools/instance-manager/manager.cc:
check sigwait return value
server-tools/instance-manager/parse_output.cc:
fixed a bug, found with valgrind