===========
When doing an upgrade, you execute mysql_upgrade. If
mysql_upgrade fails to connect or it connects with a user
without the proper privileges, it will return the error:
FATAL ERROR: Upgrade failed
which is not very informative.
ANALYSIS
========
In main() and check_version_match(), the condition for
errors are clubbed together and throw the same error msg.
The functions need to be splitted up and the corresponding
error msgs have to be displayed.
FIX
===
Splitted the functions and added the specific error msg.
new features:
set event_scheduler=ON|OFF will now try to init event scheduler
if it's not enabled
set event_scheduler=default will try to enable it based on
the value of the event_scheduler when mysqld was started
Change mysqlcheck option to upgrade-views={NO,YES,FROM_MYSQL}
mysql_upgrade now runs upgrade-views=yes to perform a checksum of all
views and add mariadb-version by default. upgrade-views=from_mysql if
MySQL is detected as teh origin version.
Add static vars on phases to make merging consistent.
client/mysql_upgrade --verbose -S /tmp/s.sock
Looking for 'mysql' as: client/mysql
Looking for 'mysqlcheck' as: client/mysqlcheck
Phase 1/4: Fixing views - skipped - not required
Phase 2/4: Fixing table and database names
Processing databases
information_schema
mysql
performance_schema
test
Phase 3/4: Checking and upgrading tables
Processing databases
information_schema
mysql
mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.servers OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
performance_schema
test
Phase 4/4: Running 'mysql_fix_privilege_tables'...
OK
in mysql_upgrade: do FLUSH PRIVILEGES at the end, not together with
mysql_fix_privilege_tables
mysql-test/t/mysql_upgrade-6984.opt:
use a dummy second option to force server restart after the test
Merged lp:maria/maria-10.0-galera up to revision 3879.
Added a new functions to handler API to forcefully abort_transaction,
producing fake_trx_id, get_checkpoint and set_checkpoint for XA. These
were added for future possiblity to add more storage engines that
could use galera replication.
If one uses 4 --verbose to mysql_upgrade it will also write out all mysqlcheck commands invoked.
mysql-test/r/mysql_upgrade.result:
Updated results from changing phases
mysql-test/r/mysql_upgrade_no_innodb.result:
dated results from changing phases
mysql-test/r/mysql_upgrade_ssl.result:
dated results from changing phases
CONFIG FILES CAUSES TEST
Utility as "mysql_upgrade" forks "mysql"/"mysqlcheck". Attaching
"mysql_upgrade" shows following calls after forking "mysql" or
"mysql_check" when configuration file information is passed as
first argument to "mysql_upgrade".
strace -f ./mysql_upgrade --defaults-file=../pdb/my.cnf --socket=../pdb/mysql.sock -f
[pid 6254] stat("/etc/my.cnf", 0x7fff8e772680) = -1 ENOENT (No such file or directory)
[pid 6254] stat("/etc/mysql/my.cnf", 0x7fff8e772680) = -1 ENOENT (No such file or directory)
[pid 6254] stat("/usr/local/mysql/etc/my.cnf", 0x7fff8e772680) = -1 ENOENT (No such file or directory)
[pid 6254] stat("/home/user_name/.my.cnf", {st_mode=S_IFREG|0664, st_size=19, ...}) = 0
[pid 6254] open("/home/user_name/.my.cnf", O_RDONLY) = 3
But when tool forks "mysqlcheck"/"mysql", "--no-defaults" is passed
as first argument. Before forking, in function "find_tool" of
"mysql_upgrade", check is made to verify whether tool can be
executable or not by calling "mysqlcheck --help" and "mysql --help".
But argument "--no-defaults", "--defaults-file" or
"defaults-extra-file" is not passed to "mysql" and "mysqlcheck".
So my.cnf is searched in default paths.
Fix:
------
Modified code to pass "--no-defaults" as first argument to "mysql"
and "mysqlcheck" while checking tool can be executed or not.
CONFIG FILES CAUSES TEST
Utility as "mysql_upgrade" forks "mysql"/"mysqlcheck". Attaching
"mysql_upgrade" shows following calls after forking "mysql" or
"mysql_check" when configuration file information is passed as
first argument to "mysql_upgrade".
strace -f ./mysql_upgrade --defaults-file=../pdb/my.cnf --socket=../pdb/mysql.sock -f
[pid 6254] stat("/etc/my.cnf", 0x7fff8e772680) = -1 ENOENT (No such file or directory)
[pid 6254] stat("/etc/mysql/my.cnf", 0x7fff8e772680) = -1 ENOENT (No such file or directory)
[pid 6254] stat("/usr/local/mysql/etc/my.cnf", 0x7fff8e772680) = -1 ENOENT (No such file or directory)
[pid 6254] stat("/home/user_name/.my.cnf", {st_mode=S_IFREG|0664, st_size=19, ...}) = 0
[pid 6254] open("/home/user_name/.my.cnf", O_RDONLY) = 3
But when tool forks "mysqlcheck"/"mysql", "--no-defaults" is passed
as first argument. Before forking, in function "find_tool" of
"mysql_upgrade", check is made to verify whether tool can be
executable or not by calling "mysqlcheck --help" and "mysql --help".
But argument "--no-defaults", "--defaults-file" or
"defaults-extra-file" is not passed to "mysql" and "mysqlcheck".
So my.cnf is searched in default paths.
Fix:
------
Modified code to pass "--no-defaults" as first argument to "mysql"
and "mysqlcheck" while checking tool can be executed or not.
mysql_upgrade --help now also prints out --default options and variable values.
mysql_upgrade now prints permission errors.
mysql_upgrade doesn't print some non essential info if --silent is used.
Added handler error message about incompatible versions
Fixed that mysqlbug and mysql_install_db have the executable flag set.
Removed executable flag for some non executable files.
Changed in mysql_install_db askmonty.org to mariadb.com.
Ensured that all client executables prints --default options the same way.
Allow REPAIR ... USE_FRM for old .frm files if the are still compatible.
Extended shown error for storage engine messages.
client/mysql.cc:
print_defaults() should be first (as in all other programs)
client/mysql_upgrade.c:
--help now also prints out --default options and variable values
Print out error if wrong permissions
Don't print info if --silent
client/mysqladmin.cc:
print_defaults() should be first (as in all other programs)
client/mysqlbinlog.cc:
Added print_defaults() to --help
client/mysqlcheck.c:
Added empty line in --help
client/mysqlimport.c:
Added empty line in --help
client/mysqlshow.c:
Made --help compatible
client/mysqlslap.c:
Made --help compatible
client/mysqltest.cc:
Added print_defaults() to --help
include/handler_ername.h:
Added handler error message
include/my_base.h:
Added handler error message
mysql-test/r/mysql_upgrade.result:
Updated results
mysql-test/r/repair.result:
Added test case for better error messages
mysql-test/std_data/host_old.MYD:
Added test case for better error messages
mysql-test/std_data/host_old.MYI:
Added test case for better error messages
mysql-test/std_data/host_old.frm:
Added test case for better error messages
mysql-test/t/repair.test:
Added test case for better error messages
mysys/my_handler_errors.h:
Added handler error message
scripts/CMakeLists.txt:
Fixed that mysqlbug and mysql_install_db have the executable flag set
scripts/mysql_install_db.sh:
askmonty.org -> mariadb.com
sql/ha_partition.cc:
Sometimes table_type() can be called for errors even if partition didn't manage to open any files
sql/handler.cc:
Write clear text for not handled, but defined error messages.
sql/share/errmsg-utf8.txt:
Extended shown error for storage engine messages
sql/sql_admin.cc:
Allow REPAIR ... USE_FRM for old .frm files if the are still compatible
storage/myisam/ha_myisam.cc:
Use new error message
includes:
* remove some remnants of "Bug#14521864: MYSQL 5.1 TO 5.5 BUGS PARTITIONING"
* introduce LOCK_share, now LOCK_ha_data is strictly for engines
* rea_create_table() always creates .par file (even in "frm-only" mode)
* fix a 5.6 bug, temp file leak on dummy ALTER TABLE
(Based on Sinisa's patch)
Added a version checking facility to mysql_upgrade.
The versions used for checking is the version of the
server that mysql_upgrade is going to upgrade and the
server version that mysql_upgrade was build/distributed
with.
Also added an option '--version-check' to enable/disable
the version checking.
(Based on Sinisa's patch)
Added a version checking facility to mysql_upgrade.
The versions used for checking is the version of the
server that mysql_upgrade is going to upgrade and the
server version that mysql_upgrade was build/distributed
with.
Also added an option '--version-check' to enable/disable
the version checking.
Moved out creation of performance schema tables from mysql_system_tables.sql as
the performance_tables creation scripts needs a working mysql.proc to work.
client/mysql_upgrade.c:
Added option -V, --version
debian/dist/Debian/mariadb-server-5.5.files:
Added mysql_performance_tables.sql
debian/dist/Ubuntu/mariadb-server-5.5.files:
Added mysql_performance_tables.sql
mysql-test/lib/v1/mysql-test-run.pl:
Added mysql_performance_tables.sql
mysql-test/mysql-test-run.pl:
Added mysql_performance_tables.sql
scripts/CMakeLists.txt:
Moved out creation of performance schema tables from mysql_system_tables.sql
as the performance_tables creation scripts needs a working mysql.proc to work
scripts/mysql_install_db.sh:
Added mysql_performance_tables.sql
scripts/mysql_performance_tables.sql:
Moved out creation of performance schema tables from mysql_system_tables.sql
as the performance_tables creation scripts needs a working mysql.proc to work
scripts/mysql_system_tables.sql:
Move creation of performance schema tables to mysql_performance_tables.sql
Added 'flush tables' to get things to work if someone deletes a table like mysql.proc before run
scripts/mysql_system_tables_fix.sql:
ove performance table things to mysql_performance_tables.sql
storage/perfschema/pfs.cc:
Fixed comment
SHOW 2012 INSTEAD OF 2011
* Added a new macro to hold the current year :
COPYRIGHT_NOTICE_CURRENT_YEAR
* Modified ORACLE_WELCOME_COPYRIGHT_NOTICE macro
to take the initial year as parameter and pick
current year from the above mentioned macro.
SHOW 2012 INSTEAD OF 2011
* Added a new macro to hold the current year :
COPYRIGHT_NOTICE_CURRENT_YEAR
* Modified ORACLE_WELCOME_COPYRIGHT_NOTICE macro
to take the initial year as parameter and pick
current year from the above mentioned macro.
suppress these harmless but confusing warnings.
fix the program name (MY_INIT) in mysqldump
client/mysqldump.c:
for backward compatibility, prefix mysqldump error messages with "mysqldump", not with the full path of the executable
OPTION SKIP-WRITE-BINLOG
System tables were not getting upgraded when
mysql_upgrade was run with --skip-write-binlog
option. (Same for --write-binlog.) Also, with
this option, mysql_upgrade_info file was not
getting created after the upgrade.
mysql_upgrade makes use of mysql client tool in
order to run upgrade scripts, while doing so it
passes some of the command line options (used to
start mysql_upgrade) directly to mysql client.
The reason behind this bug being, some options
like skip-write-binlog and upgrade-system-tables
were being passed to mysql tool along with other
options, and hence mysql execution failed due
presence of these invalid options.
Fixed this issue by filtering out the above mentioned
options from the list of options that will be passed to
mysql and mysqlcheck tools. However, since --write-binlog
is supported by mysqlcheck, this option would be used
explicitly while running mysqlcheck. (not part of patch,
already there)
Checking the contents of general log after the upgrade
is not doable via an mtr test. So performed manual test.
Added a test to verify the creation of mysql_upgrade_info.
client/mysql_upgrade.c:
Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH
OPTION SKIP-WRITE-BINLOG
With this patch, --upgrade-system-tables and
--write-binlog options will not be added to the
list of options, used to start mysql and mysqlcheck
tools.
mysql-test/r/mysql_upgrade.result:
Added a testcase for Bug#11827359.
mysql-test/t/mysql_upgrade.test:
Added a testcase for Bug#11827359.
OPTION SKIP-WRITE-BINLOG
System tables were not getting upgraded when
mysql_upgrade was run with --skip-write-binlog
option. (Same for --write-binlog.) Also, with
this option, mysql_upgrade_info file was not
getting created after the upgrade.
mysql_upgrade makes use of mysql client tool in
order to run upgrade scripts, while doing so it
passes some of the command line options (used to
start mysql_upgrade) directly to mysql client.
The reason behind this bug being, some options
like skip-write-binlog and upgrade-system-tables
were being passed to mysql tool along with other
options, and hence mysql execution failed due
presence of these invalid options.
Fixed this issue by filtering out the above mentioned
options from the list of options that will be passed to
mysql and mysqlcheck tools. However, since --write-binlog
is supported by mysqlcheck, this option would be used
explicitly while running mysqlcheck. (not part of patch,
already there)
Checking the contents of general log after the upgrade
is not doable via an mtr test. So performed manual test.
Added a test to verify the creation of mysql_upgrade_info.
sql/sql_insert.cc:
CREATE ... IF NOT EXISTS may do nothing, but
it is still not a failure. don't forget to my_ok it.
******
CREATE ... IF NOT EXISTS may do nothing, but
it is still not a failure. don't forget to my_ok it.
sql/sql_table.cc:
small cleanup
******
small cleanup
TOOLS
Backport a fix for Bug 57094 from 5.5.
The following revision was backported:
# revision-id: alexander.nozdrin@oracle.com-20101006150613-ls60rb2tq5dpyb5c
# parent: bar@mysql.com-20101006121559-am1e05ykeicwnx48
# committer: Alexander Nozdrin <alexander.nozdrin@oracle.com>
# branch nick: mysql-5.5-bugteam-bug57094
# timestamp: Wed 2010-10-06 19:06:13 +0400
# message:
# Fix for Bug 57094 (Copyright notice incorrect?).
#
# The fix is to:
# - introduce ORACLE_WELCOME_COPYRIGHT_NOTICE define to have a single place
# to specify copyright notice;
# - replace custom copyright notices with ORACLE_WELCOME_COPYRIGHT_NOTICE
# in programs.
TOOLS
Backport a fix for Bug 57094 from 5.5.
The following revision was backported:
# revision-id: alexander.nozdrin@oracle.com-20101006150613-ls60rb2tq5dpyb5c
# parent: bar@mysql.com-20101006121559-am1e05ykeicwnx48
# committer: Alexander Nozdrin <alexander.nozdrin@oracle.com>
# branch nick: mysql-5.5-bugteam-bug57094
# timestamp: Wed 2010-10-06 19:06:13 +0400
# message:
# Fix for Bug 57094 (Copyright notice incorrect?).
#
# The fix is to:
# - introduce ORACLE_WELCOME_COPYRIGHT_NOTICE define to have a single place
# to specify copyright notice;
# - replace custom copyright notices with ORACLE_WELCOME_COPYRIGHT_NOTICE
# in programs.
client/mysql_upgrade.c:
missing DBUG_RETURN
client/mysqladmin.cc:
client plugin memory wasn't freed
client/mysqlcheck.c:
client plugin memory, defaults, a result set, a command-line option value were not freed.
missing DBUG_RETURN.
client/mysqldump.c:
client plugin memory wasn't freed
client/mysqlslap.c:
client plugin memory wasn't freed
client/mysqltest.cc:
hopeless. cannot be fixed.
mysql-test/valgrind.supp:
Bug#56666 is now fixed.
mysys/array.c:
really, don't allocate if the caller didn't ask to.
mysys/my_init.c:
safemalloc checks must be done at the very end
mysys/my_thr_init.c:
not needed anymore
sql-common/client.c:
memory leak
sql/log.cc:
log_file was not closed, memory leak.
sql/mysqld.cc:
fix bug#56666 (causing many P_S related memory leaks).
close_active_mi() not called for --bootstrap, memory leak.
sql/sql_lex.cc:
redo Lex->mi handling
sql/sql_lex.h:
redo Lex->mi handling
sql/sql_plugin.cc:
plugins having PLUGIN_VAR_MEMALLOC string variables have this variables allocated in every THD.
The memory was freed in ~THD but only if plugin was still active. If plugin was unloaded the
variable was not found and the memory was lost. By loading and unloading plugins an arbitrary
amount of memory can be lost.
sql/sql_repl.cc:
redo Lex->mi handling
sql/sql_yacc.yy:
completely wrong handling of Lex->mi - run-time memory leak, by repeating the statement
arbitrary amount of memory can be lost.
Lex->mi.repl_ignore_server_ids_opt was allocated when parsing CHANGE MASTER,
and freed after executing the statement. if parser failed on syntax (or another)
error the statement was never executed. Lex->mi was simply bzero-ed for the next
CHANGE MASTER statement.
sql/table.cc:
didn't compile
storage/perfschema/pfs_lock.h:
Bug#56666 is fixed
The mysqld server and all clients now reads the new client-server section
Fixed that mysqldumpslow supports new slow log formats and new mysqld --slow- options
client/mysql.cc:
Read also client-server and client-mariadb sections.
client/mysql_upgrade.c:
Read also client-server and client-mariadb sections.
client/mysqladmin.cc:
Read also client-server and client-mariadb sections.
client/mysqlbinlog.cc:
Read also client-server and client-mariadb sections.
client/mysqlcheck.c:
Read also client-server and client-mariadb sections.
client/mysqldump.c:
Read also client-server and client-mariadb sections.
client/mysqlimport.c:
Read also client-server and client-mariadb sections.
client/mysqlshow.c:
Read also client-server and client-mariadb sections.
client/mysqltest.cc:
Read also client-server and client-mariadb sections.
extra/my_print_defaults.c:
Updated help text
scripts/mysql_fix_privilege_tables.sh:
Read also sections client client-server client-mariadb
scripts/mysql_install_db.pl.in:
Also allow --data=* option
Read also groups mariadb, server and client-server.
scripts/mysql_install_db.sh:
Also allow --data=* option
Read also groups mariadb, server and client-server.
Added --lose-skip-pbxt to bootstrap
scripts/mysql_secure_installation.sh:
Read also groups client-server and client-mariadb
scripts/mysqld_multi.sh:
Read also group mariadb
scripts/mysqld_safe.sh:
Read also groups mariadb server and client-server
scripts/mysqldumpslow.sh:
Fixed to support new slow log formats
Added sorting on -ae (aggregated number of retreived rows) and e (retrieved rows)
Read also group 'mariadb'
If there is many instances of same option, use last one.
Get slow log file from options log-slow-queries=filename or query-log-file=filename
Added support for future --log-basename option
sql-common/client.c:
Read also groups 'client-server' and 'client-mariadb'
tests/mysql_client_test.c:
Read also groups 'client-server' and 'client-mariadb'
tests/thread_test.c:
Read also groups 'client-server' and 'client-mariadb'
command line clients.
Postfix covering other mysql standard clients like mysql_upgrade,
mysqlbinlog, mysqlcheck, mysqlimport, mysqlshow and mysqlslap.
client/client_priv.h:
Bug#58139 : default-auth option not recognized in MySQL standard
command line clients
Added an entry for 'default-auth' option.
client/mysql.cc:
Bug#58139 : default-auth option not recognized in MySQL standard
command line clients
Updated the id entry for default_auth option.
client/mysql_upgrade.c:
Bug#58139 : default-auth option not recognized in MySQL standard
command line clients.
Introduced two new variables to hold values from default-auth and
plugin-dir options and further pushed them to client's st_mysql
instance.
client/mysqladmin.cc:
Bug#58139 : default-auth option not recognized in MySQL standard
command line clients
Updated the id entry for default_auth option.
client/mysqlbinlog.cc:
Bug#58139 : default-auth option not recognized in MySQL standard
command line clients.
Introduced two new variables to hold values from default-auth and
plugin-dir options and further pushed them to client's st_mysql
instance.
client/mysqlcheck.c:
Bug#58139 : default-auth option not recognized in MySQL standard
command line clients.
Introduced two new variables to hold values from default-auth and
plugin-dir options and further pushed them to client's st_mysql
instance.
client/mysqldump.c:
Bug#58139 : default-auth option not recognized in MySQL standard
command line clients
Updated the id entry for default_auth option.
client/mysqlimport.c:
Bug#58139 : default-auth option not recognized in MySQL standard
command line clients.
Introduced two new variables to hold values from default-auth and
plugin-dir options and further pushed them to client's st_mysql
instance.
client/mysqlshow.c:
Bug#58139 : default-auth option not recognized in MySQL standard
command line clients.
Introduced two new variables to hold values from default-auth and
plugin-dir options and further pushed them to client's st_mysql
instance.
client/mysqlslap.c:
Bug#58139 : default-auth option not recognized in MySQL standard
command line clients.
Introduced two new variables to hold values from default-auth and
plugin-dir options and further pushed them to client's st_mysql
instance.
mysql-test/r/plugin_auth.result:
Added test case for Bug#58139 for mysql_upgrade.
mysql-test/t/plugin_auth.test:
Added test case for Bug#58139 for mysql_upgrade.
The fix is to:
- introduce ORACLE_WELCOME_COPYRIGHT_NOTICE define to have a single place
to specify copyright notice;
- replace custom copyright notices with ORACLE_WELCOME_COPYRIGHT_NOTICE
in programs.
The fix is to:
- introduce ORACLE_WELCOME_COPYRIGHT_NOTICE define to have a single place
to specify copyright notice;
- replace custom copyright notices with ORACLE_WELCOME_COPYRIGHT_NOTICE
in programs.
Cleaned up mysql_upgrade --help and mysqlcheck --help
client/mysql_upgrade.c:
Increased version number.
Marked all options that are not used 'Not used'.
Don't write 'Looking for tool' if not using --verbose
client/mysqlcheck.c:
Cleanup output for --help
Reset not initialzed variable
mysql-test/r/log_tables_upgrade.result:
Updated results
mysql-test/r/mysql_upgrade.result:
Updated results
mysql-test/r/mysqlcheck.result:
Updated results
mysql-test/t/log_tables_upgrade.test:
mysql_upgrade is now run without --skip-verbose
mysql-test/t/mysql_upgrade.test:
mysql_upgrade is now run without --skip-verbose
Added --silent option to mysql_upgrade so that one can only get errors printed
Don't write unnecessary warning about log tables during upgrade
client/mysql_upgrade.c:
Don't print connect arguments if not using --verbose --verbose
Added option --silent to only print errors. This options is passed to mysqlcheck.
Write out phase names
The 'verbose' code is a bit strange as I wanted to keep compatibility with old mysql_upgrade
client/mysqlcheck.c:
Don't upgrade log tables (to avoid confusing warning message that they can't be locked)
Fall back to use ALTER TABLE for engines that doesn't support REPAIR when doing repair for upgrade.
Nicer output from mysql_upgrade and mysql_check
Updated all arrays that used NAME_LEN to use SAFE_NAME_LEN to ensure that we don't break things accidently as names can now have a #mysql50# prefix.
client/mysql_upgrade.c:
If we are using verbose, also run mysqlcheck in verbose mode.
client/mysqlcheck.c:
Add more information if running in verbose mode
Print 'Needs upgrade' instead of complex error if table needs to be upgraded
Don't write connect information if verbose is not 2 or above
mysql-test/r/drop.result:
Updated test and results as we now support full table names
mysql-test/r/grant.result:
Now you get a correct error message if using #mysql with paths
mysql-test/r/show_check.result:
Update results as table names can temporarly be bigger than NAME_LEN (during upgrade)
mysql-test/r/upgrade.result:
Test upgrade for long table names.
mysql-test/suite/funcs_1/r/is_tables_is.result:
Updated old test result (had note been updated in a while)
mysql-test/t/drop.test:
Updated test and results as we now support full table names
mysql-test/t/grant.test:
Now you get a correct error message if using #mysql with paths
mysql-test/t/upgrade.test:
Test upgrade for long table names.
sql/ha_partition.cc:
NAME_LEN -> SAFE_NAME_LEN
sql/item.cc:
NAME_LEN -> SAFE_NAME_LEN
sql/log_event.cc:
NAME_LEN -> SAFE_NAME_LEN
sql/mysql_priv.h:
Added SAFE_NAME_LEN
sql/rpl_filter.cc:
NAME_LEN -> SAFE_NAME_LEN
sql/sp.cc:
NAME_LEN -> SAFE_NAME_LEN
sql/sp_head.cc:
NAME_LEN -> SAFE_NAME_LEN
sql/sql_acl.cc:
NAME_LEN -> SAFE_NAME_LEN
sql/sql_base.cc:
NAME_LEN -> SAFE_NAME_LEN
sql/sql_connect.cc:
NAME_LEN -> SAFE_NAME_LEN
sql/sql_parse.cc:
NAME_LEN -> SAFE_NAME_LEN
sql/sql_prepare.cc:
NAME_LEN -> SAFE_NAME_LEN
sql/sql_select.cc:
NAME_LEN -> SAFE_NAME_LEN
sql/sql_show.cc:
NAME_LEN -> SAFE_NAME_LEN
Enlarge table names for SHOW TABLES to also include optional #mysql50#
sql/sql_table.cc:
Fall back to use ALTER TABLE for engines that doesn't support REPAIR when doing repair for upgrade.
sql/sql_trigger.cc:
NAME_LEN -> SAFE_NAME_LEN
sql/sql_udf.cc:
NAME_LEN -> SAFE_NAME_LEN
sql/sql_view.cc:
NAME_LEN -> SAFE_NAME_LEN
sql/table.cc:
Fixed check_table_name() to not count #mysql50# as part of name
If #mysql50# is part of the name, don't allow path characters in name.
it couldn't parse the --ssl option.
client/mysql_upgrade.c:
mysql_upgrade parses its options and passes some of them to the underlying
tools (mysqlcheck etc). To do this passdown, it reconstructs a
command-line-suitable text from the my_option object (which
contains the option's name and option's value). For options
which expect no parameter, it just had to use the option's name;
for other options, it had to concatenate the option's name,
a "=" symbol, and the option's value; it had code to handle
this latter case, but only for GET_STR options (options taking a
string as value). But since the work on WL 4738, the --ssl
option, a GET_BOOL, which used to have no parameter (NO_ARG), can
now have one (OPT_ARG), so with --ssl we came to the "default"
label, error. Fixed by constructing the command-line-suitable
representation for GET_BOOL too. For --ssl it will produce
--ssl=1 ; for --ssl=0, it will produce --ssl=0.
mysql-test/include/mysql_upgrade_preparation.inc:
handles requirements of tests which use mysql_upgrade
mysql-test/r/mysql_upgrade_ssl.result:
result; without the code fix we would get "internal error".
mysql-test/t/mysql_upgrade.test:
This test has requirements before running; moved them
to an include file in order to share with mysql_upgrade_ssl.
mysql-test/t/mysql_upgrade_ssl.test:
test for bug. Couldn't go into mysql_upgrade.test as this new test requires
SSL support. --force is needed, in case mysql_upgrade.test run before
(in which case mysql_upgrade_ssl would say that upgrade has already been
done); --force forces the upgrade in all cases.
Fix warnings flagged by the new warning option -Wunused-but-set-variable
that was added to GCC 4.6 and that is enabled by -Wunused and -Wall. The
option causes a warning whenever a local variable is assigned to but is
later unused. It also warns about meaningless pointer dereferences.
client/mysql.cc:
Meaningless pointer dereferences.
client/mysql_upgrade.c:
Check whether reading from the file succeeded.
extra/comp_err.c:
Unused.
extra/yassl/src/yassl_imp.cpp:
Skip instead of reading data that is discarded.
include/my_pthread.h:
Variable is only used in debug builds.
include/mysys_err.h:
Add new error messages.
mysys/errors.c:
Add new error message for permission related functions.
mysys/mf_iocache.c:
Variable is only checked under THREAD.
mysys/my_copy.c:
Raise a error if chmod or chown fails.
mysys/my_redel.c:
Raise a error if chmod or chown fails.
regex/engine.c:
Use a equivalent variable for the assert.
server-tools/instance-manager/instance_options.cc:
Unused.
sql/field.cc:
Unused.
sql/item.cc:
Unused.
sql/log.cc:
Do not ignore the return value of freopen: only set buffer if
reopening succeeds.
Adjust doxygen comment to the right function.
Pass message lenght to log function.
sql/mysqld.cc:
Do not ignore the return value of freopen: only set buffer if
reopening succeeds.
sql/partition_info.cc:
Unused.
sql/slave.cc:
No need to set pointer to the address of '\0'.
sql/spatial.cc:
Unused. Left for historical purposes.
sql/sql_acl.cc:
Unused.
sql/sql_base.cc:
Pointers are always set to the same variables.
sql/sql_parse.cc:
End statement if reading fails.
Store the buffer after it has actually been updated.
sql/sql_repl.cc:
No need to set pointer to the address of '\0'.
sql/sql_show.cc:
Put variable under the same ifdef block.
sql/udf_example.c:
Set null pointer flag appropriately.
storage/csv/ha_tina.cc:
Meaningless dereferences.
storage/example/ha_example.cc:
Return the error since it's available.
storage/myisam/mi_locking.c:
Remove unused and dead code.
Fix warnings flagged by the new warning option -Wunused-but-set-variable
that was added to GCC 4.6 and that is enabled by -Wunused and -Wall. The
option causes a warning whenever a local variable is assigned to but is
later unused. It also warns about meaningless pointer dereferences.
strict aliasing violations.
Essentially, the problem is that large parts of the server were
developed in simpler times (last decades, pre C99 standard) when
strict aliasing and compilers supporting such optimizations were
rare to non-existent. Thus, when compiling the server with a modern
compiler that uses strict aliasing rules to perform optimizations,
there are several places in the code that might trigger undefined
behavior.
As evinced by some recent bugs, GCC does a somewhat good of job
misoptimizing such code, but on the other hand also gives warnings
about suspicious code. One problem is that the warnings aren't
always accurate, yet we can't afford to just shut them off as we
might miss real cases. False-positive cases are aggravated mostly
by casts that are likely to trigger undefined behavior.
The solution is to start a cleanup process focused on fixing and
reducing the amount of strict-aliasing related warnings produced
by GCC and others compilers. A good deal of noise reduction can
be achieved by just removing useless casts that are product of
historical cruft and are likely to trigger undefined behavior if
dereferenced.
client/mysql.cc:
Remove now-unnecessary casts.
Break up large strings.
client/mysql_upgrade.c:
Remove now-unnecessary casts.
client/mysqladmin.cc:
Remove now-unnecessary casts.
Break up large strings.
client/mysqlbinlog.cc:
Remove now-unnecessary casts.
client/mysqlcheck.c:
Remove now-unnecessary casts.
client/mysqldump.c:
Remove now-unnecessary casts.
client/mysqlimport.c:
Remove now-unnecessary casts.
client/mysqlshow.c:
Remove now-unnecessary casts.
client/mysqlslap.c:
Remove now-unnecessary casts.
client/mysqltest.cc:
Remove now-unnecessary casts.
extra/comp_err.c:
Remove now-unnecessary casts.
extra/my_print_defaults.c:
Remove now-unnecessary casts.
Break up large strings.
extra/mysql_waitpid.c:
Remove now-unnecessary casts.
extra/perror.c:
Remove now-unnecessary casts.
extra/resolve_stack_dump.c:
Remove now-unnecessary casts.
extra/resolveip.c:
Remove now-unnecessary casts.
include/my_getopt.h:
Use a void pointer type as the opaque type to avoid problems with type
incompatibility -- GCC issues warnings when the type name is not type
compatible with a operand. As a side bonus, a explicit cast won't be
necessary anymore.
include/sslopt-longopts.h:
Remove now-unnecessary casts.
Break up large strings.
mysys/my_getopt.c:
Update opaque type and introduce a type definition for the
argument to my_getopt_register_get_addr.
server-tools/instance-manager/options.cc:
Remove now-unnecessary casts.
sql/mysqld.cc:
Remove now-unnecessary casts.
Break up large strings.
Update mysql_getopt_value prototype (the old prototype
was different from the definition anyway).
sql/sql_plugin.cc:
The type of a pointer to a function must be compatible with the
pointed-to function type, otherwise the behavior is undefined.
sql/table.cc:
The variable buf pointer to pointer to pointer to constant char
could improperly alias a incompatible type in call to fix_type_
pointers. Since this was actually dead code, it is simply removed.
sql/unireg.cc:
Remove call to get_form_pos. The code creates a new FRM file which
is always truncated and writes the form position as 0. Hence, no
need to retrieve it, we now for sure it is 0.
storage/archive/archive_reader.c:
Remove now-unnecessary casts.
storage/myisam/ft_nlq_search.c:
Read weight directly from the buffer.
storage/myisam/fulltext.h:
Add explanation about the type duality of a key buffer.
Add accessor macro to retrieve a FT float value.
storage/myisam/mi_test1.c:
Remove now-unnecessary casts.
storage/myisam/myisam_ftdump.c:
Read weight directly from the buffer.
storage/myisam/myisamchk.c:
Remove now-unnecessary casts.
storage/myisam/myisamlog.c:
A pointer to char was used to alias a pointer to pointer to
unsigned char, thus violating strict aliasing rules.
storage/myisam/myisampack.c:
Remove now-unnecessary casts.
strings/decimal.c:
Remove aliasing violation, printing the value is enough for
debugging purposes.
tests/mysql_client_test.c:
Remove now-unnecessary casts.
strict aliasing violations.
Essentially, the problem is that large parts of the server were
developed in simpler times (last decades, pre C99 standard) when
strict aliasing and compilers supporting such optimizations were
rare to non-existent. Thus, when compiling the server with a modern
compiler that uses strict aliasing rules to perform optimizations,
there are several places in the code that might trigger undefined
behavior.
As evinced by some recent bugs, GCC does a somewhat good of job
misoptimizing such code, but on the other hand also gives warnings
about suspicious code. One problem is that the warnings aren't
always accurate, yet we can't afford to just shut them off as we
might miss real cases. False-positive cases are aggravated mostly
by casts that are likely to trigger undefined behavior.
The solution is to start a cleanup process focused on fixing and
reducing the amount of strict-aliasing related warnings produced
by GCC and others compilers. A good deal of noise reduction can
be achieved by just removing useless casts that are product of
historical cruft and are likely to trigger undefined behavior if
dereferenced.
Conflicts:
Text conflict in client/mysqlbinlog.cc
Text conflict in mysql-test/Makefile.am
Text conflict in mysql-test/collections/default.daily
Text conflict in mysql-test/r/mysqlbinlog_row_innodb.result
Text conflict in mysql-test/suite/rpl/r/rpl_typeconv_innodb.result
Text conflict in mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test
Text conflict in mysql-test/suite/rpl/t/rpl_row_create_table.test
Text conflict in mysql-test/suite/rpl/t/rpl_slave_skip.test
Text conflict in mysql-test/suite/rpl/t/rpl_typeconv_innodb.test
Text conflict in mysys/charset.c
Text conflict in sql/field.cc
Text conflict in sql/field.h
Text conflict in sql/item.h
Text conflict in sql/item_func.cc
Text conflict in sql/log.cc
Text conflict in sql/log_event.cc
Text conflict in sql/log_event_old.cc
Text conflict in sql/mysqld.cc
Text conflict in sql/rpl_utility.cc
Text conflict in sql/rpl_utility.h
Text conflict in sql/set_var.cc
Text conflict in sql/share/Makefile.am
Text conflict in sql/sql_delete.cc
Text conflict in sql/sql_plugin.cc
Text conflict in sql/sql_select.cc
Text conflict in sql/sql_table.cc
Text conflict in storage/example/ha_example.h
Text conflict in storage/federated/ha_federated.cc
Text conflict in storage/myisammrg/ha_myisammrg.cc
Text conflict in storage/myisammrg/myrg_open.c
Conflicts:
Text conflict in client/mysqlbinlog.cc
Text conflict in mysql-test/Makefile.am
Text conflict in mysql-test/collections/default.daily
Text conflict in mysql-test/r/mysqlbinlog_row_innodb.result
Text conflict in mysql-test/suite/rpl/r/rpl_typeconv_innodb.result
Text conflict in mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test
Text conflict in mysql-test/suite/rpl/t/rpl_row_create_table.test
Text conflict in mysql-test/suite/rpl/t/rpl_slave_skip.test
Text conflict in mysql-test/suite/rpl/t/rpl_typeconv_innodb.test
Text conflict in mysys/charset.c
Text conflict in sql/field.cc
Text conflict in sql/field.h
Text conflict in sql/item.h
Text conflict in sql/item_func.cc
Text conflict in sql/log.cc
Text conflict in sql/log_event.cc
Text conflict in sql/log_event_old.cc
Text conflict in sql/mysqld.cc
Text conflict in sql/rpl_utility.cc
Text conflict in sql/rpl_utility.h
Text conflict in sql/set_var.cc
Text conflict in sql/share/Makefile.am
Text conflict in sql/sql_delete.cc
Text conflict in sql/sql_plugin.cc
Text conflict in sql/sql_select.cc
Text conflict in sql/sql_table.cc
Text conflict in storage/example/ha_example.h
Text conflict in storage/federated/ha_federated.cc
Text conflict in storage/myisammrg/ha_myisammrg.cc
Text conflict in storage/myisammrg/myrg_open.c
Conflicts:
Text conflict in client/mysqlbinlog.cc
Text conflict in mysql-test/r/explain.result
Text conflict in mysql-test/r/subselect.result
Text conflict in mysql-test/r/subselect3.result
Text conflict in mysql-test/r/type_datetime.result
Text conflict in sql/share/Makefile.am
Conflicts:
Text conflict in client/mysqlbinlog.cc
Text conflict in mysql-test/r/explain.result
Text conflict in mysql-test/r/subselect.result
Text conflict in mysql-test/r/subselect3.result
Text conflict in mysql-test/r/type_datetime.result
Text conflict in sql/share/Makefile.am
mysql_upgrade was passing an non-initialized non-null tmpdir to create_temp_file() if no
--tmpdir was specified. This prevents create_temp_file() from taking the system
temporary file path and as a result mysql_upgrade was trying to open a file in a
directory that it may not have write access to.
Fixed by making sure mysql_upgrade will pass a zero length temp dir string to
create_temp_file() if no --tmpdir is specified.
mysql_upgrade was passing an non-initialized non-null tmpdir to create_temp_file() if no
--tmpdir was specified. This prevents create_temp_file() from taking the system
temporary file path and as a result mysql_upgrade was trying to open a file in a
directory that it may not have write access to.
Fixed by making sure mysql_upgrade will pass a zero length temp dir string to
create_temp_file() if no --tmpdir is specified.
Conflicts:
Text conflict in .bzr-mysql/default.conf
Text conflict in mysql-test/suite/rpl/r/rpl_slow_query_log.result
Text conflict in mysql-test/suite/rpl/t/rpl_slow_query_log.test
Conflict adding files to server-tools. Created directory.
Conflict because server-tools is not versioned, but has versioned children. Versioned directory.
Conflict adding files to server-tools/instance-manager. Created directory.
Conflict because server-tools/instance-manager is not versioned, but has versioned children. Versioned directory.
Contents conflict in server-tools/instance-manager/options.cc
Text conflict in sql/mysqld.cc
Conflicts:
Text conflict in .bzr-mysql/default.conf
Text conflict in mysql-test/suite/rpl/r/rpl_slow_query_log.result
Text conflict in mysql-test/suite/rpl/t/rpl_slow_query_log.test
Conflict adding files to server-tools. Created directory.
Conflict because server-tools is not versioned, but has versioned children. Versioned directory.
Conflict adding files to server-tools/instance-manager. Created directory.
Conflict because server-tools/instance-manager is not versioned, but has versioned children. Versioned directory.
Contents conflict in server-tools/instance-manager/options.cc
Text conflict in sql/mysqld.cc
"mysql_upgrade (ver 5.1) add 3 fields to mysql.proc table but does
not set values".
mysql_upgrade (ver 5.1) adds 3 fields (character_set_client,
collation_connection and db_collation) to the mysql.proc table, but
does not set any values. When we run stored procedures, which were
created with mysql 5.0, a warning is logged into the error log.
The solution to this is for mysql_upgrade to set default best guess
values for these fields. A warning is also written during upgrade, to
make the user aware that default values are set.
client/mysql_upgrade.c:
Result lines which start with "WARNING" are passed through to the output.
This way we have a way of triggering WARNING-messages during upgrade
directly from the .sql-script.
mysql-test/r/mysql_upgrade.result:
Expected result of the test.
mysql-test/t/mysql_upgrade.test:
Added a test-case for the bug.
scripts/mysql_system_tables_fix.sql:
The new fields are populated, and warnings are written.
"mysql_upgrade (ver 5.1) add 3 fields to mysql.proc table but does
not set values".
mysql_upgrade (ver 5.1) adds 3 fields (character_set_client,
collation_connection and db_collation) to the mysql.proc table, but
does not set any values. When we run stored procedures, which were
created with mysql 5.0, a warning is logged into the error log.
The solution to this is for mysql_upgrade to set default best guess
values for these fields. A warning is also written during upgrade, to
make the user aware that default values are set.
Don't use static link by default (in compile-pentium) as some new systems doesn't have all static libraries available
Change type for functions in plugin.h:str_mysql_ftparser_param() to const unsigned char and string lengths to size_t.
One effect of the above change is that one needs to include mysql_global.h or define size_t before including plugin.h
This fixes a case where mysql_client_test failed with newer gcc that enables strict-aliasing by default
BUILD/compile-pentium:
Don't use static link by default as some new systems doesn't have all static libraries available
client/mysql_upgrade.c:
Remove not used variable
cmd-line-utils/readline/config_readline.h:
Define some constants to get rid of compiler warnings on Linux
cmd-line-utils/readline/display.c:
Get rid of compiler warnings
cmd-line-utils/readline/history.c:
Got rid of compiler warnings:
- Defining some strings as const
- Added cast
cmd-line-utils/readline/rlmbutil.h:
Added cast to get rid of compiler warnings
cmd-line-utils/readline/text.c:
Remove not needed initialization to get rid of compiler warnings
cmd-line-utils/readline/xmalloc.c:
Changed types to 'const char* to get rid of compiler warnings
configure.in:
Ensure that we use MariaDB as suffix
include/mysql/plugin.h:
Changed types to 'const unsigned char* to get rid of compiler warnings (in other parts of the code)
Change length for not \0 terminated string to size_t
include/mysql/plugin.h.pp:
Update related to plugin.h
libmysql/libmysql.c:
Fixed bug that caused core dump with newer gcc when strict aliasing is not turned off
mysql-test/t/information_schema.test:
Test is depending on innodb
mysql-test/t/not_partition.test:
Fixed wrong directory name
(Not noticed before as we don't ususally run this test)
mysys/lf_hash.c:
Got rid of compiler warnings from -Wstrict-aliasing
mysys/my_redel.c:
Removed not used variable
regex/engine.c:
Changed types to 'const char* to get rid of compiler warnings
regex/engine.ih:
Changed types to 'const char* to get rid of compiler warnings
sql/sp_head.cc:
Got rid of compiler warning from -Wstrict-aliasing
sql/sql_base.cc:
Got rid of compiler warnings from -Wstrict-aliasing
(The original code was probably wrong as nj_col->table_field was
sql/sql_builtin.cc.in:
plugin.h needs to have size_t defined
sql/sql_parse.cc:
Remove used variable
sql/sql_select.cc:
Got rid of compiler warnings from -Wstrict-aliasing
sql/sql_show.cc:
Added #ifdef to get rid of compiler warning when not using partition engine
sql/table.cc:
Got rid of compiler warning from -Wstrict-aliasing
storage/maria/ha_maria.cc:
Got rid of compiler warnings from -Wstrict-aliasing:
- Use the thd_killed() API function
storage/maria/lockman.c:
Got rid of compiler warnings from -Wstrict-aliasing
storage/maria/ma_check.c:
Got rid of compiler warnings from -Wstrict-aliasing
Change to use new version of _ma_killed_ptr; Don't call it as often as before
storage/maria/ma_check_standalone.h:
Update to compatible _ma_killed_ptr() from ha_maria.cc
storage/maria/ma_ft_boolean_search.c:
Changed pointers from char -> const char* and length to size_t (to get rid of compiler warnings and casts)
storage/maria/ma_ft_nlq_search.c:
Got rid of compiler warnings from -Wstrict-aliasing
Ensure that 'subkeys' is 32 bit
storage/maria/ma_ft_parser.c:
Changed pointers from char -> const char* and length to size_t (to get rid of compiler warnings and casts)
storage/maria/ma_ftdefs.h:
Changed pointers from char -> const char* and length to size_t (to get rid of compiler warnings and casts)
storage/maria/ma_sort.c:
Change to use new version of _ma_killed_ptr; Don't call it as often as before
storage/maria/ma_state.c:
Got rid of compiler warnings from -Wstrict-aliasing
storage/maria/maria_def.h:
Redefine ma_killed_ptr()
storage/maria/maria_ftdump.c:
Got rid of compiler warnings from -Wstrict-aliasing
storage/maria/trnman.c:
Got rid of compiler warnings from -Wstrict-aliasing
storage/myisam/ft_boolean_search.c:
Changed pointers from char -> const char* and length to size_t (to get rid of compiler warnings and casts)
storage/myisam/ft_nlq_search.c:
Got rid of compiler warnings from -Wstrict-aliasing
storage/myisam/ft_parser.c:
Changed pointers from char -> const char* and length to size_t (to get rid of compiler warnings and casts)
storage/myisam/ft_stopwords.c:
Changed pointers from char -> const char* and length to size_t (to get rid of compiler warnings and casts)
storage/myisam/ftdefs.h:
Changed pointers from char -> const char* and length to size_t (to get rid of compiler warnings and casts)
storage/myisam/ha_myisam.cc:
Got rid of compiler warnings from -Wstrict-aliasing:
- Use the thd_killed() API function
storage/myisam/mi_check.c:
Use new killed_ptr() function
storage/myisam/myisam_ftdump.c:
Got rid of compiler warnings from -Wstrict-aliasing
storage/myisam/myisamchk.c:
Update to compatible killed_ptr() from ha_myisam.cc
storage/myisam/myisamdef.h:
Redefine killed_ptr()
storage/myisam/myisamlog.c:
Got rid of compiler warnings from -Wstrict-aliasing
storage/myisam/sort.c:
Change to use new version of killed_ptr; Don't call it as often as before
storage/xtradb/fil/fil0fil.c:
Fixedc ompiler warning
storage/xtradb/trx/trx0i_s.c:
Include mysql_plugin.h later to ensure that size_t is defined
- Moved some code from innodb_plugin to xtradb, to ensure that all tests runs
- Did changes in pbxt and maria storage engines becasue of changes in thd->query
- Reverted wrong code in sql_table.cc for how ROW_FORMAT is used.
This is a re-commit of Monty's merge to eliminate an extra commit from
MySQL-5.1.42 that was accidentally included in the merge.
This is a merge of the MySQL 5.1.41 clone-off (clone-5.1.41-build). In
case there are any extra changes done before final MySQL 5.1.41
release, these will need to be merged later before MariaDB 5.1.41
release.
(backport)
mysql_upgrade script accepts --upgrade-system-tables option,
fixing only system tables in this case.
per-file comments:
client/mysql_upgrade.c
WL#4991 mysql_upgrade --fix-privilege-tables
--upgrade-system-tables option added.
if it is set, the tool won't look for the mysqlcheck then
run_mysqlcheck_fixnames() and run_mysqlcheck_upgrade won't be called.
mysql-test/r/mysql_upgrade.result
WL#4991 mysql_upgrade --fix-privilege-tables
test result added
mysql-test/t/mysql_upgrade.test
WL#4991 mysql_upgrade --fix-privilege-tables
test case added
(backport)
mysql_upgrade script accepts --upgrade-system-tables option,
fixing only system tables in this case.
per-file comments:
client/mysql_upgrade.c
WL#4991 mysql_upgrade --fix-privilege-tables
--upgrade-system-tables option added.
if it is set, the tool won't look for the mysqlcheck then
run_mysqlcheck_fixnames() and run_mysqlcheck_upgrade won't be called.
mysql-test/r/mysql_upgrade.result
WL#4991 mysql_upgrade --fix-privilege-tables
test result added
mysql-test/t/mysql_upgrade.test
WL#4991 mysql_upgrade --fix-privilege-tables
test case added
- Added checking of return value for system(), freopen(), fgets() and chown()
- Ensure that calls that require a format strings gets a format string
- Other trivial things
Updated test suite results (especially for pbxt and embedded server)
Removed warning for "Invalid (old?) table or database name 'mysqld.1'" from pbxt tests
Speed up some pbxt tests by inserting begin ; commit; around "while loops with inserts"
Added mysqld startup option '--debug-flush'
Create maria_recovery.trace in data directory instead of current directory
client/mysql.cc:
Check return value from system()
client/mysql_upgrade.c:
Check return value from fgets()
client/mysqladmin.cc:
Check return value from fgets()
client/mysqlslap.c:
Check return value from system() (but ignore it, as it's not critical)
extra/yassl/src/crypto_wrapper.cpp:
Check return value from fgets() (but ignore it, as it's internal file)
extra/yassl/taocrypt/src/aes.cpp:
Added extra {} to remove compiler warning
extra/yassl/taocrypt/src/blowfish.cpp:
Added extra {} to remove compiler warning
extra/yassl/taocrypt/src/misc.cpp:
Ifdef not used code
include/mysys_err.h:
Added error message for failing chown()
mysql-test/mysql-test-run.pl:
Don't give warning for skipping ndbcluster (never enabled in MariaDB)
mysql-test/suite/funcs_1/r/is_columns_is_embedded.result:
Update with new information schema information
mysql-test/suite/funcs_1/r/is_tables_is_embedded.result:
New test
mysql-test/suite/funcs_1/r/is_tables_myisam_embedded.result:
Update test results (has not been tested for a long time)
mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result:
Update test results (has not been tested for a long time)
mysql-test/suite/funcs_1/t/is_tables_is.test:
Don't run with embedded server (as results differ)
I added a new test for embedded server
mysql-test/suite/funcs_1/t/is_tables_is_embedded.test:
New test
mysql-test/suite/pbxt/my.cnf:
Allow one to run pbxt tests without having to specify --mysqld=--default-storage-engine=pbxt
mysql-test/suite/pbxt/t/count_distinct3.test:
Speed up test by inserting begin; ... commit;
mysql-test/suite/pbxt/t/subselect.test:
Speed up test by inserting begin; ... commit;
mysys/errors.c:
Added error message for failing chown()
mysys/my_copy.c:
Added error message for failing chown()
mysys/my_redel.c:
Added error message for failing chown()
mysys/safemalloc.c:
Added cast to get rid of compiler warning
sql/ha_partition.cc:
Fixed wrong argument to sql_print_error() (it requires a format string)
sql/log.cc:
Test return value of freopen()
sql/mysqld.cc:
Test return value of freopen()
Added startup option '--debug-flush' to be used when one gets a core dump (easy to explain to people on IRC)
sql/rpl_rli.cc:
Fixed wrong argument to sql_print_error() (it requires a format string)
sql/set_var.cc:
Added {} to get rid of compiler warnings
sql/slave.cc:
Fixed wrong argument to mi->report() and sql_print...() (they require a format string)
sql/sql_cache.cc:
Fixed wrong argument to sql_printinformation() (it requires a format string)
sql/sql_parse.cc:
Test return value of fgets()
sql/sql_plugin.cc:
Fixed wrong argument to sql_print_error() (it requires a format string)
sql/sql_select.cc:
Use unique table name for internal temp tables instead of full path
(Simple speed & space optimization)
sql/udf_example.c:
Removed compiler warning about not used variable
storage/maria/ha_maria.cc:
Fixed wrong argument to sql_print_error() and ma_check_print_error() (they require a format string)
storage/maria/ma_recovery.c:
Create maria_recovery.trace in data directory instead of current directory
storage/maria/unittest/ma_test_loghandler-t.c:
Fixed wrong argument to ok(); Requires a format string
storage/pbxt/src/strutil_xt.cc:
Detect temporary tables by checking if that path for the table is in the mysql data directory.
The database for temporary tables is after this patch, from PBXT point of view, ""
This is needed to stop PBXT from calling filename_to_tablename() with the base directory as an argument, which caused
ERROR: Invalid (old?) table or database name 'mysqld.1'" in the log when running the test suite.
tests/mysql_client_test.c:
Fixed compiler warnings
unittest/mysys/base64-t.c:
Fixed wrong argument to diag() (it requires a format string)
Added a comment that the current 'print' of differing buffers doesn't print the right thing,
but didn't fix this as it's not important (unless we find a bug in the real code)
added code to exit a tool if the forced config file wasn't found
per-file comments:
client/mysql.cc
Bug#47216 programs should quit if the file specified by --defaults-file option isn't found
added code to exit a tool if the forced config file wasn't found
client/mysql_upgrade.c
Bug#47216 programs should quit if the file specified by --defaults-file option isn't found
added code to exit a tool if the forced config file wasn't found
client/mysqladmin.cc
Bug#47216 programs should quit if the file specified by --defaults-file option isn't found
added code to exit a tool if the forced config file wasn't found
client/mysqlcheck.c
Bug#47216 programs should quit if the file specified by --defaults-file option isn't found
added code to exit a tool if the forced config file wasn't found
client/mysqldump.c
Bug#47216 programs should quit if the file specified by --defaults-file option isn't found
added code to exit a tool if the forced config file wasn't found
client/mysqlimport.c
Bug#47216 programs should quit if the file specified by --defaults-file option isn't found
added code to exit a tool if the forced config file wasn't found
client/mysqlshow.c
Bug#47216 programs should quit if the file specified by --defaults-file option isn't found
added code to exit a tool if the forced config file wasn't found
client/mysqlslap.c
Bug#47216 programs should quit if the file specified by --defaults-file option isn't found
added code to exit a tool if the forced config file wasn't found
mysql-test/t/mysql.test
Bug#47216 programs should quit if the file specified by --defaults-file option isn't found
test added
sql/mysqld.cc
Bug#47216 programs should quit if the file specified by --defaults-file option isn't found
added code to exit a tool if the forced config file wasn't found
storage/myisam/myisamchk.c
Bug#47216 programs should quit if the file specified by --defaults-file option isn't found
added code to exit a tool if the forced config file wasn't found
storage/myisam/myisampack.c
Bug#47216 programs should quit if the file specified by --defaults-file option isn't found
added code to exit a tool if the forced config file wasn't found
added code to exit a tool if the forced config file wasn't found
per-file comments:
client/mysql.cc
Bug#47216 programs should quit if the file specified by --defaults-file option isn't found
added code to exit a tool if the forced config file wasn't found
client/mysql_upgrade.c
Bug#47216 programs should quit if the file specified by --defaults-file option isn't found
added code to exit a tool if the forced config file wasn't found
client/mysqladmin.cc
Bug#47216 programs should quit if the file specified by --defaults-file option isn't found
added code to exit a tool if the forced config file wasn't found
client/mysqlcheck.c
Bug#47216 programs should quit if the file specified by --defaults-file option isn't found
added code to exit a tool if the forced config file wasn't found
client/mysqldump.c
Bug#47216 programs should quit if the file specified by --defaults-file option isn't found
added code to exit a tool if the forced config file wasn't found
client/mysqlimport.c
Bug#47216 programs should quit if the file specified by --defaults-file option isn't found
added code to exit a tool if the forced config file wasn't found
client/mysqlshow.c
Bug#47216 programs should quit if the file specified by --defaults-file option isn't found
added code to exit a tool if the forced config file wasn't found
client/mysqlslap.c
Bug#47216 programs should quit if the file specified by --defaults-file option isn't found
added code to exit a tool if the forced config file wasn't found
mysql-test/t/mysql.test
Bug#47216 programs should quit if the file specified by --defaults-file option isn't found
test added
sql/mysqld.cc
Bug#47216 programs should quit if the file specified by --defaults-file option isn't found
added code to exit a tool if the forced config file wasn't found
storage/myisam/myisamchk.c
Bug#47216 programs should quit if the file specified by --defaults-file option isn't found
added code to exit a tool if the forced config file wasn't found
storage/myisam/myisampack.c
Bug#47216 programs should quit if the file specified by --defaults-file option isn't found
added code to exit a tool if the forced config file wasn't found
All statements executed by mysql_upgrade are binlogged and then are replicated to slave.
This will result in some errors. The report of this bug has demonstrated some examples.
Master and slave should be upgraded separately. All statements executed by
mysql_upgrade will not be binlogged.
--write-binlog and --skip-write-binlog options are added into mysql_upgrade.
These options control whether sql statements are binlogged or not.
All statements executed by mysql_upgrade are binlogged and then are replicated to slave.
This will result in some errors. The report of this bug has demonstrated some examples.
Master and slave should be upgraded separately. All statements executed by
mysql_upgrade will not be binlogged.
--write-binlog and --skip-write-binlog options are added into mysql_upgrade.
These options control whether sql statements are binlogged or not.
with gcc 4.3.2
This patch fixes a number of GCC warnings about variables used
before initialized. A new macro UNINIT_VAR() is introduced for
use in the variable declaration, and LINT_INIT() usage will be
gradually deprecated. (A workaround is used for g++, pending a
patch for a g++ bug.)
GCC warnings for unused results (attribute warn_unused_result)
for a number of system calls (present at least in later
Ubuntus, where the usual void cast trick doesn't work) are
also fixed.
client/mysqlmanager-pwgen.c:
A fix for warn_unused_result, adding fallback to use of
srand()/rand() if /dev/random cannot be used. Also actually
adds calls to rand() in the second branch so that it actually
creates a random password.
with gcc 4.3.2
This patch fixes a number of GCC warnings about variables used
before initialized. A new macro UNINIT_VAR() is introduced for
use in the variable declaration, and LINT_INIT() usage will be
gradually deprecated. (A workaround is used for g++, pending a
patch for a g++ bug.)
GCC warnings for unused results (attribute warn_unused_result)
for a number of system calls (present at least in later
Ubuntus, where the usual void cast trick doesn't work) are
also fixed.