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
This fixes a bug that when you use mysqldump --no-create-info to generate a dump that you want to merge with an existing table,
you can get an innodb table with duplicated unique keys.
Patch orignally by Eric Bergen.
client/mysqldump.c:
Only use UNIQUE_CHECKS=0 for tables that are created.
This solves the issue that you can't get duplicate unique keys when merging two dumps.
mysql-test/r/mysqldump.result:
Test for mysqldump --no-create-info
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'
("-") IN DATABASE NAMES IN ALTER DATABASE.
mysqldump did not quote database name in 'ALTER DATABASE'
statements in its output. This can further cause a failure
while loading if database name contains a hyphen '-'.
This happened as, while printing the 'ALTER DATABASE'
statements, the database name was not quoted.
Fixed by quoting the database name.
client/mysqldump.c:
Bug#11766310 : 59398: MYSQLDUMP 5.1 CAN'T HANDLE A DASH
("-") IN DATABASE NAMES IN ALTER DATABASE.
Modified the print statement in order to print the quoted
database name for 'ALTER DATABASE' statements.
mysql-test/r/mysqldump.result:
Added a test case for bug#11766310.
mysql-test/t/mysqldump.test:
Added a test case for bug#11766310.
("-") IN DATABASE NAMES IN ALTER DATABASE.
mysqldump did not quote database name in 'ALTER DATABASE'
statements in its output. This can further cause a failure
while loading if database name contains a hyphen '-'.
This happened as, while printing the 'ALTER DATABASE'
statements, the database name was not quoted.
Fixed by quoting the database name.
"set optimizer_switch to e or d causes invalid memory writes/valgrind warnings":
due to prefix support, the argument "e" was overwritten with its full value
"engine_condition_pushdown", which caused a buffer overrun.
This was wrong usage of find_type(); other wrong usages are fixed here too.
Please start reading with the comment of typelib.c.
client/mysqldump.c:
A bug: find_type() expects a bitmap as 3rd argument
(each bit is a flag controlling a behaviour of the function);
here it was instead passed the length of the string to search!
That could give random behaviour of find_type()
depending on the string.
We rather need to pass a correct flag to find_type().
The correct flag is FIND_TYPE_BASIC (0).
Flag 8 is not needed as buff cannot have a comma (see how buff is filled).
Flag 1 looks like a superfluous restriction.
Flag 4 is not user-friendly (why use
--compatible=2 rather than --compatible=mysql40 ?, and
we probably not commit to "2" always meaning "mysql40"
until the end of times).
include/mysql.h.pp:
This isn't a problematic API change as we go from char* to const char*:
existing code will run unchanged.
include/typelib.h:
named constants. Not an enum to not significantly change
the declaration of find_type() which would be an API change
(typelib.h is included in mysql.h).
mysql-test/r/mysqldump.result:
correct result (see the two requested modes in SQL_MODE)
mysql-test/suite/sys_vars/t/optimizer_switch_basic.test:
test for BUG#59894. The second SET used to crash.
mysql-test/t/mysqldump.test:
we had no test for multiple modes in --compatible, which is
supported according to --help
mysys/typelib.c:
Fix for BUG#59894. parse_name() is asked to match "e" with a row
of the TYPELIB (the TYPELIB lists permitted flags of optimizer_switch;
and comes from optimizer_switch_names[] of sys_vars.cc).
find_type() is capable of supporting prefixes, but if it is not
passed flag 2 in third argument, it will overwrite its first
argument (the string to search for) with the complete name,
here overwriting "e" with "engine_condition_pushdown". But
as this "e" was a buffer allocated in an Item, it was not big
enough to host the longer name, thus the crash.
We don't need to know the complete flag's name; the output used
from find_type() is just the flag's number (== function's return
code). So we can pass flag 2 to find_type() in parse_name().
After doing this fix and the other fixes in this patch, all usages
of find_type() were using flag 2; in most usages the string to search for,
is not guaranteed to be long enough to host the complete name
(it is either directly from argv, or from alloc_root/my_malloc
done in an earlier call).
Thus, flag 2 is here made implicit: callers need not pass it anymore,
it is always automatically turned on.
This allows to eliminate an oddity: parse_name() took a const char**,
and then removed "const" before calling find_type(), which could
theoretically modify the pointed data, thus lying on constness.
Last, constants for find_type() are now named.
sql-common/client.c:
Two bugs:
1) The enum was not in sync with the array (due to a bad porting of WL 1054;
the extra OPT_ values are about options present in 5.1 and deleted in 5.5);
added a compile_time_assert() to make sure this doesn't happen again
2) find_type() was writing past the end of opt_arg; as opt_arg was allocated
with alloc_root() with no extra space, this was an overrun; it could be seen
when
** building with -DWITH_VALGRIND -DHAVE_purify -DEXTRA_DEBUG
** making execution go through the faulty code; this faulty
code is executed only if the client asks to read a configuration
file like this:
mysql_options(mysql, MYSQL_READ_DEFAULT_FILE, "/tmp/cnf.cnf");
so by adding such line to the start of mysql_client_test.c::client_connect(),
we could see the valgrind warning:
==30548== Invalid write of size 1
==30548== at 0x4C2624C: strcpy (mc_replace_strmem.c:303)
==30548== by 0x48DC29: find_type (typelib.c:120)
==30548== by 0x465686: mysql_read_default_options (client.c:1344)
==30548== by 0x46830F: mysql_real_connect (client.c:2971)
==30548== by 0x409339: client_connect (mysql_client_test.c:331)
==30548== by 0x463A7F: main (mysql_client_test.c:19902)
==30548== Address 0x61875ad is 0 bytes after a block of size 29 alloc'd
==30548== at 0x4C25153: malloc (vg_replace_malloc.c:195)
==30548== by 0x49BFF1: my_malloc (my_malloc.c:38)
==30548== by 0x49C65C: alloc_root (my_alloc.c:166)
==30548== by 0x48EF97: handle_default_option (default.c:381)
==30548== by 0x49068C: search_default_file_with_ext (default.c:992)
==30548== by 0x48F929: search_default_file (default.c:670)
==30548== by 0x48EDC4: my_search_option_files (default.c:312)
==30548== by 0x48F4B1: my_load_defaults (default.c:576)
==30548== by 0x46517A: mysql_read_default_options (client.c:1207)
==30548== by 0x46830F: mysql_real_connect (client.c:2971)
==30548== by 0x409339: client_connect (mysql_client_test.c:331)
==30548== by 0x463A7F: main (mysql_client_test.c:19902)
This is fixed by having find_type() not overwrite anymore.
sql/sql_help.cc:
cast not needed anymore.
sql/table.cc:
cast not needed anymore.
"set optimizer_switch to e or d causes invalid memory writes/valgrind warnings":
due to prefix support, the argument "e" was overwritten with its full value
"engine_condition_pushdown", which caused a buffer overrun.
This was wrong usage of find_type(); other wrong usages are fixed here too.
Please start reading with the comment of typelib.c.
When mysqldump tries to dump information in xml format,
the result does not contain field level comments.
In order to retrieve various informations for a field/column,
mysqldump currently uses 'show fields from <tab>' statement.
The attributes returned by the statement lacks the information
regarding field comments.
Fixed by changing the query to one that probes I_S to retrieve
required field informations, including the field comment.
client/mysqldump.c:
Bug#13618 : mysqldump --xml omits comment on table field.
Replaced the 'show fields' command by a statement that
queries I_S, in order to retrieve information on all the
attributes that 'show fields' returns along-with an additional
column_comment information.
mysql-test/r/client_xml.result:
Result modifications for bug#13618.
mysql-test/r/mysqldump.result:
Result modifications for bug#13618.
mysql-test/t/mysqldump.test:
Added a testcase for bug#13618.
When mysqldump tries to dump information in xml format,
the result does not contain field level comments.
In order to retrieve various informations for a field/column,
mysqldump currently uses 'show fields from <tab>' statement.
The attributes returned by the statement lacks the information
regarding field comments.
Fixed by changing the query to one that probes I_S to retrieve
required field informations, including the field comment.
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.
command line clients.
Command line tools like mysqladmin and mysqldump did not recognize
default-auth and plugin-dir options.
Support for these options was found missing in these command line
tools.
Fixed by adding support for the same.
client/mysqladmin.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/mysqldump.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.
mysql-test/t/plugin_auth.test:
Added test case for Bug#58139.
command line clients.
Command line tools like mysqladmin and mysqldump did not recognize
default-auth and plugin-dir options.
Support for these options was found missing in these command line
tools.
Fixed by adding support for the same.
Make the binlog handlerton participate in START TRANSACTION WITH CONSISTENT
SNAPSHOT, recording the binlog position corresponding to the snapshot taken
in other MVCC storage engines.
Expose this consistent binlog position as the new status variables
binlog_trx_file and binlog_trx_position. This enables to get a fully
non-locking snapshot of the database (including binlog position for
slave provisioning), avoiding the need for FLUSH TABLES WITH READ LOCK.
Modify mysqldump to detect if the server supports this new feature, and
if so, avoid FLUSH TABLES WITH READ LOCK for --single-transaction
--master-data snapshot backups.
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.
client/mysqlcheck.c:
Added missing casts
client/mysqldump.c:
Added missing casts
client/mysqlimport.c:
Added missing casts
extra/my_print_defaults.c:
Added missing casts
mysql-test/mysql-test-run.pl:
Added suppression for non-critical warning on windows
storage/maria/maria_pack.c:
Added missing casts
storage/xtradb/buf/buf0lru.c:
Added missing casts
storage/xtradb/fil/fil0fil.c:
Added missing casts
storage/xtradb/handler/i_s.cc:
Added extra argument to call store() function for longlong.
storage/xtradb/srv/srv0srv.c:
Added cast to suppress compiler warning
support-files/compiler_warnings.supp:
Added suppression for some non critical compiler warnings on Windows
unittest/mytap/tap.h:
Fixed prototypes to be same as the actual functions
Essentially, the problem is that safemalloc is excruciatingly
slow as it checks all allocated blocks for overrun at each
memory management primitive, yielding a almost exponential
slowdown for the memory management functions (malloc, realloc,
free). The overrun check basically consists of verifying some
bytes of a block for certain magic keys, which catches some
simple forms of overrun. Another minor problem is violation
of aliasing rules and that its own internal list of blocks
is prone to corruption.
Another issue with safemalloc is rather the maintenance cost
as the tool has a significant impact on the server code.
Given the magnitude of memory debuggers available nowadays,
especially those that are provided with the platform malloc
implementation, maintenance of a in-house and largely obsolete
memory debugger becomes a burden that is not worth the effort
due to its slowness and lack of support for detecting more
common forms of heap corruption.
Since there are third-party tools that can provide the same
functionality at a lower or comparable performance cost, the
solution is to simply remove safemalloc. Third-party tools
can provide the same functionality at a lower or comparable
performance cost.
The removal of safemalloc also allows a simplification of the
malloc wrappers, removing quite a bit of kludge: redefinition
of my_malloc, my_free and the removal of the unused second
argument of my_free. Since free() always check whether the
supplied pointer is null, redudant checks are also removed.
Also, this patch adds unit testing for my_malloc and moves
my_realloc implementation into the same file as the other
memory allocation primitives.
client/mysqldump.c:
Pass my_free directly as its signature is compatible with the
callback type -- which wasn't the case for free_table_ent.
Essentially, the problem is that safemalloc is excruciatingly
slow as it checks all allocated blocks for overrun at each
memory management primitive, yielding a almost exponential
slowdown for the memory management functions (malloc, realloc,
free). The overrun check basically consists of verifying some
bytes of a block for certain magic keys, which catches some
simple forms of overrun. Another minor problem is violation
of aliasing rules and that its own internal list of blocks
is prone to corruption.
Another issue with safemalloc is rather the maintenance cost
as the tool has a significant impact on the server code.
Given the magnitude of memory debuggers available nowadays,
especially those that are provided with the platform malloc
implementation, maintenance of a in-house and largely obsolete
memory debugger becomes a burden that is not worth the effort
due to its slowness and lack of support for detecting more
common forms of heap corruption.
Since there are third-party tools that can provide the same
functionality at a lower or comparable performance cost, the
solution is to simply remove safemalloc. Third-party tools
can provide the same functionality at a lower or comparable
performance cost.
The removal of safemalloc also allows a simplification of the
malloc wrappers, removing quite a bit of kludge: redefinition
of my_malloc, my_free and the removal of the unused second
argument of my_free. Since free() always check whether the
supplied pointer is null, redudant checks are also removed.
Also, this patch adds unit testing for my_malloc and moves
my_realloc implementation into the same file as the other
memory allocation primitives.
- Fixed memory leaks in mysqldump
- Fixed printf of NULL which caused crashes on OpenSolaris when using --debug
- Fixed realloc() problem that caused out of memory when running mysqldump.test on OpenSolaris
client/mysqldump.c:
Fixed memory leaks
Fixed printf of NULL which caused crashes on OpenSolaris when using --debug
client/mysqltest.cc:
Fixed printf of NULL which caused crashes on OpenSolaris when using --debug
include/my_global.h:
Added simple macro val_or_null() to simplify detecting of NULL strings for printf
sql/handler.cc:
Fixed printf of NULL which caused crashes on OpenSolaris when using --debug
sql/sql_db.cc:
Fixed printf of NULL which caused crashes on OpenSolaris when using --debug
Removed testing of 'new_db_name' as this is guranteed never NULL
sql/sql_show.cc:
Fixed printf of NULL which caused crashes on OpenSolaris when using --debug
storage/csv/ha_tina.cc:
Fixed realloc() problem that caused out of memory when running mysqldump.test on OpenSolaris
(OpenSolaris default malloc() can't handle a lot of reallocs() of strings that are growing one byte at a time)
This did speed up logging to cvs with a magnitude for large strings.
- Changed default recovery mode from OFF to NORMAL to get automatic repair of not properly closed tables.
- Fixed a rase condition when two threads calls external_lock and thr_lock() in different order. When this happend the transaction that called external lock first
and thr_lock() last did not see see the rows from the other transaction, even if if it had to wait in thr_lock() for other to complete.
- Fixed that one can run maria_chk on an automatcally recovered tables without warnings about too small transaction id
- Don't give warning that crashed table could not be repaired if repair was disabled (and thus not run)
- Fixed a error result from flush_key_cache() which caused a DBUG_ASSERT() when one was using concurrent reads on non transactional tables that was updated.
client/mysqldump.c:
Add "" around error message to make it more readable
client/mysqltest.cc:
Free environment variables
mysql-test/r/mysqldump.result:
Updated results
mysql-test/r/openssl_1.result:
Updated results
mysql-test/suite/maria/r/maria-recover.result:
Updated results
mysql-test/suite/maria/r/maria3.result:
Updated results
mysql-test/suite/maria/t/maria3.test:
Added more test of temporary tables
storage/maria/ha_maria.cc:
Changed default recovery mode from OFF to NORMAL to get automatic repair of not properly closed tables.
Start transaction in ma_block_get_status() instead of in ha_maria::external_lock().
- This fixes a rase condition when two threads calls external lock and thr_lock() in different order. When this happend the transaction that called external lock first and thr_lock() last did not see see the rows from the other transaction, even if if it had to wait in thr_lock() for other to complete.
Store latest transaction id in controll file if recovery was done.
- This allows one to run maria_chk on an automatcally recovered tables without warnings about too small transaction id
storage/maria/ha_maria.h:
Don't give warning that crashed table could not be repaired if repair was disabled (and thus not run)
storage/maria/ma_blockrec.h:
Added new function "_ma_block_get_status_no_versioning()"
storage/maria/ma_init.c:
Added hook to create trn in ma_block_get_status() if we are using MariaDB
storage/maria/ma_open.c:
Ensure we call _ma_block_get_status_no_versioning() for transactional tables without versioning (like tables with fulltext)
storage/maria/ma_pagecache.c:
Allow one to flush blocks that are pinned for read.
This fixed a error result from flush_key_cache() which caused a DBUG_ASSERT() when one was using concurrent reads on non transactional tables that was updated.
storage/maria/ma_recovery.c:
Set maria_recovery_changed_data to 1 if recover changed something.
Set max_trid_in_control_file to max found trn if we found a bigger trn.
The allows will ensure that the control file is up to date after recovery which allows one to run maria_chk on the tables without warnings about too big trn
storage/maria/ma_state.c:
Call maria_create_trn_hook() in _ma_setup_live_state() instead of ha_maria::external_lock()
This ensures that 'state' and trn are in sync and thus fixes the race condition mentioned for ha_maria.cc
storage/maria/ma_static.c:
Added maria_create_trn_hook() and maria_recovery_changed_data
storage/maria/maria_def.h:
Added MARIA_HANDLER->external_ptr, which is used to hold MariaDB thd.
Added some new external variables
Removed reference to non existing function: maria_concurrent_inserts()
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.
WL#5154 was a task for formally deprecating and removing items that
were mentioned in the manual as having been deprecated since MySQL
4.1 or 5.0, but that had never been removed.
Since WL#5154 was created, examination of mysqld.cc, mysql.cc, and
mysqldump.c reveals additional deprecations not mentioned in the
manual. (In some cases, the items are simply not mentioned in the
5.1+ manuals.)
This is a follow-on task to deprecate and remove these additional
items.
The deprecation happened in MySQL 5.1, and the options/variables
are now removed from the code.
client/mysql.cc:
--no-tee is now removed
client/mysqldump.c:
--all is now removed
-a now points to --create-options
sql/mysqld.cc:
delay-key-write-for-all-tables is removed
--enable-locking is removed
--log-update is removed
--skip-locking is removed
--skip-symlink is removed
--sql-bin-update-same is removed
--warnings is removed
--record-buffer is removed
WL#5154 was a task for formally deprecating and removing items that
were mentioned in the manual as having been deprecated since MySQL
4.1 or 5.0, but that had never been removed.
Since WL#5154 was created, examination of mysqld.cc, mysql.cc, and
mysqldump.c reveals additional deprecations not mentioned in the
manual. (In some cases, the items are simply not mentioned in the
5.1+ manuals.)
This is a follow-on task to deprecate and remove these additional
items.
The deprecation happened in MySQL 5.1, and the options/variables
are now removed from the code.
A set of program options and variables was deprecated in
MySQL 5.1, and is hereby removed.
client/mysql.cc:
--no-auto-rehash (-A) is no longer deprecated
--no-named-commands (-g) is now removed
--skip-line-numbers (-L) is no longer deprecated
--set-variable (-O) is now removed
--no-pager is now removed
client/mysqlbinlog.cc:
--position is now removed (use --start-position)
-j is now equivalent with --start-position
client/mysqldump.c:
--first-slave is now removed
--no-set-names (-N) is now removed
--set-variable (-O) is now removed
mysql-test/include/default_mysqld.cnf:
default-character-set is removed as an option
character-set-server is equivalent.
mysql-test/t/bug47671-master.opt:
default-character-set option is removed
character-set-server is equivalent
mysql-test/t/ctype_latin1_de-master.opt:
default-character-set option is removed
character-set-server is equivalent
mysql-test/t/ctype_ucs2_def-master.opt:
default-collation is removed
collation-server is equicalent
scripts/mysqld_multi.sh:
--config-file has been superseded by
--defaults-extra-file
sql/mysql_priv.h:
Removed the version number in the deprecation
warning text, as decided by ServerPT.
sql/mysqld.cc:
--default-character-set (-C) is removed
--default-collation is removed
--log-long-format (-0) is removed
--safe-show-database is removed
--set-variable (-O) is removed
sql/sql_yacc.yy:
The FRAC_SECOND keyword is removed
sql/sys_vars.cc:
The sql_log_update system variable is removed
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
WL#5182 is a follow-up to WL#5154, deprecating a few more options
and system variables.
client/client_priv.h:
The warning message has been changed to not include
a specific version number in the text.
client/mysql.cc:
--no-tee is deprecated
client/mysqldump.c:
--all is deprecated
-a now points to create-options
mysql-test/r/mysqlbinlog.result:
Warning text changed
mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result:
Warning text changed
sql/mysql_priv.h:
The warning message has been changed to not include
a specific version number in the text.
sql/mysqld.cc:
--use-symbolic-links is deprecated
-s now points to --symbolic-links
--warnings is deprecated
-W now points to --log-warnings
myisam_max_extra_sort_file_size is deprecated
record_buffer is deprecated
--log-update is deprecated
--sql-bin-update-same is deprecated
--skip-locking is deprecated
--skip-symlink is deprecated
--enable-locking is deprecated
--delay-key-write-for-all-tables is deprecated
Several items said to be deprecated in the 4.1 manual
have never been removed. This worklog adds deprecation
warnings when these items are used, and warns the user
that the items will be removed in MySQL 5.6.
A couple of previously deprecation decision have been
reversed (see single file comments)
client/client_priv.h:
Macro similar to the one in the server (mysql_priv.h)
for printing a deprecation warning message
client/mysql.cc:
no-auto-rehash will not be deprecated
skip-line-numbers will not be deprecated
skip-column-names will not be deprecated
no-pager is deprecated
set-variable is deprecated
no-named-commands is deprecated
client/mysqladmin.cc:
set-variable is deprecated
client/mysqlbinlog.cc:
position is deprecated
client/mysqldump.c:
first-slave is deprecated
no-set-names is deprecated
set-variable is deprecated
mysql-test/r/mysqlbinlog.result:
Adding the [Warning] to the test case, just to show that the
deprecation works.
The test case will be changed in Celosia to use --start-position.
mysys/my_getopt.c:
set-variable (include -O) is deprecated
scripts/mysqld_multi.sh:
Warning for mysqld_multi
sql/mysqld.cc:
default-collation is deprecated
log-bin-trust-routine-creators is deprecated
set-variable is deprecated
default-character-set is deprecated
safe-show-database is deprecated
sql/share/errmsg.txt:
Added version number for sql_log_update deprecation message.
Several items said to be deprecated in the 4.1 manual
have never been removed. This worklog adds deprecation
warnings when these items are used, and warns the user
that the items will be removed in MySQL 5.6.
A couple of previously deprecation decision have been
reversed (see single file comments)
Conflicts:
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/instance_map.cc
Contents conflict in server-tools/instance-manager/listener.cc
Contents conflict in server-tools/instance-manager/options.cc
Contents conflict in server-tools/instance-manager/user_map.cc
Conflicts:
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/instance_map.cc
Contents conflict in server-tools/instance-manager/listener.cc
Contents conflict in server-tools/instance-manager/options.cc
Contents conflict in server-tools/instance-manager/user_map.cc
The problem is a somewhat common misusage of the strmake function.
The strmake(dst, src, len) function writes at most /len/ bytes to
the string pointed to by src, not including the trailing null byte.
Hence, if /len/ is the exact length of the destination buffer, a
one byte buffer overflow can occur if the length of the source
string is equal to or greater than /len/.
client/mysqldump.c:
Make room for the trailing null byte.
libmysql/libmysql.c:
Add comment, there is enough room in the buffer.
Increase buffer length, two strings are concatenated.
libmysqld/lib_sql.cc:
Make room for the trailing null byte.
mysys/default.c:
Make room for the trailing null bytes.
mysys/mf_pack.c:
Make room for the trailing null byte.
server-tools/instance-manager/commands.cc:
Copy only if overflow isn't possible in both cases.
server-tools/instance-manager/listener.cc:
Make room for the trailing null byte.
sql/log.cc:
Make room for the trailing null byte.
sql/sp_pcontext.h:
Cosmetic fix.
sql/sql_acl.cc:
MAX_HOSTNAME already specifies space for the trailing null byte.
sql/sql_parse.cc:
Make room for the trailing null byte.
sql/sql_table.cc:
Make room for the trailing null byte.
The problem is a somewhat common misusage of the strmake function.
The strmake(dst, src, len) function writes at most /len/ bytes to
the string pointed to by src, not including the trailing null byte.
Hence, if /len/ is the exact length of the destination buffer, a
one byte buffer overflow can occur if the length of the source
string is equal to or greater than /len/.
----------------------------------------------------------------------
ChangeSet@1.2571, 2008-04-08 12:30:06+02:00, vvaintroub@wva. +122 -0
Bug#32082 : definition of VOID in my_global.h conflicts with Windows
SDK headers
VOID macro is now removed. Its usage is replaced with void cast.
In some cases, where cast does not make much sense (pthread_*, printf,
hash_delete, my_seek), cast is ommited.
Added this option, named as "--dump-slave". The purpose of this option is to be
able to produce a dump from a slave used for making backups of the master. Originally,
dumping from the main master was fine, but as more data accumulated, the dump process
would take over 30 minutes, locking up the master database hence website for 30 minutes.
A slave dedicated to producing backups was the answer, but I needed a dump that could be
used to restore a slave instantly and in order to do that, it has to have three things
contained in the dump:
1. "STOP SLAVE;" at the beginning
2. "CHANGE MASTER TO ...<the master - info from 'show slave status'>"
3. "START SLAVE;" at the end
These options in this changeset contain this.
--stop-slave adds "STOP SLAVE" to the beginning of the dump and "STOP SLAVE"
to the end of the dump.
--include-host gives the user the option to have the host explicitely added
to the "CHANGE MASTER TO ..." line.
--dump-slave adds the "CHANGE MASTER ..." to the dump representing not the slave's
master binlog info, but the slave's master's info from "SHOW SLAVE STATUS"
client/client_priv.h:
Added OPT_SLAVE_DATA to client_priv.h
client/mysqldump.c:
* Added --dump-slave option (name per Brian)
* Added --stop-slave to print "STOP SLAVE;" into the dump
* Added --include-host option to include "MASTER_HOST=..." and "MASTER_PORT=..."
to the dump since unlike --master-data, the host can't be assumed to be
the local host
* Added do_start_slave and do_stop_slave to stop the slave sql thread upon
start of the dump process, and to start the slave sql upon finish of dump process -
to keep the log information frozen during this time.
* Added do_show_slave_status for obtaining slave information needed to compose
"CHANGE MASTER ..." output to the master of this slave.
* Added necessary long options and defines required for new options
Added this option, named as "--dump-slave". The purpose of this option is to be
able to produce a dump from a slave used for making backups of the master. Originally,
dumping from the main master was fine, but as more data accumulated, the dump process
would take over 30 minutes, locking up the master database hence website for 30 minutes.
A slave dedicated to producing backups was the answer, but I needed a dump that could be
used to restore a slave instantly and in order to do that, it has to have three things
contained in the dump:
1. "STOP SLAVE;" at the beginning
2. "CHANGE MASTER TO ...<the master - info from 'show slave status'>"
3. "START SLAVE;" at the end
These options in this changeset contain this.
--stop-slave adds "STOP SLAVE" to the beginning of the dump and "STOP SLAVE"
to the end of the dump.
--include-host gives the user the option to have the host explicitely added
to the "CHANGE MASTER TO ..." line.
--dump-slave adds the "CHANGE MASTER ..." to the dump representing not the slave's
master binlog info, but the slave's master's info from "SHOW SLAVE STATUS"
The presence of "--skip" parameters is obscure, when it should be
obvious from the text.
Now, for boolean options, when they're default to ON and the --skip
is more useful parameter, then tell the user of its existence.
Backported from 6.0-codebase, revid 2572.14.1
The presence of "--skip" parameters is obscure, when it should be
obvious from the text.
Now, for boolean options, when they're default to ON and the --skip
is more useful parameter, then tell the user of its existence.
Backported from 6.0-codebase, revid 2572.14.1
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
Original revision in mysql-6.0-codebase is:
revno: 2617.31.14
committer: Konstantin Osipov <kostja@sun.com>
branch nick: mysql-6.0-runtime
timestamp: Sat 2009-03-28 11:42:55 +0300
message:
Bug#35297 SHOW CREATE EVENT does not show the DEFINER:
update test result after a merge from now.
Original revision in mysql-6.0-codebase is:
revno: 2617.31.14
committer: Konstantin Osipov <kostja@sun.com>
branch nick: mysql-6.0-runtime
timestamp: Sat 2009-03-28 11:42:55 +0300
message:
Bug#35297 SHOW CREATE EVENT does not show the DEFINER:
update test result after a merge from now.
DECIMAL and TIMESTAMP used to have NUM_FLAG, but NEWDECIMAL was forgotten.
It's correct that TIMESTAMP does not have the flag nowadays (manual will be updated, connectors
developers will be notified).
client/mysqldump.c:
IS_NUM_FIELD(f) removed and replaced by its definition (f>flags & NUM_FLAG).
include/mysql.h:
- IS_NUM_FIELD() is removed because name is too close to IS_NUM() and it is not used a lot
- INTERNAL_NUM_FIELD() is removed:
* it forgets to test NEWDECIMAL (when IS_NUM() was updated for NEWDECIMAL we forgot
to update INTERNAL_NUM_FIELD()), that's why client didn't mark NEWDECIMAL with NUM_FLAG (a bug).
* it has an obsolete test for length of the TIMESTAMP field: test became accidentally wrong when length
of TIMESTAMP was changed to always be 19 (when the format was changed from YYYYMMDDhhmmss to
YYYY-MM-DD hh:mm:ss), never 8 or 14 anymore. That obsolete test caused TIMESTAMP to lose NUM_FLAG,
which was an accidental but good change (see below).
* IS_NUM() should be used instead
- IS_NUM(f) is changed: TIMESTAMP used to be parsable as a number without quotes (when it was formatted as
"YYYYMMDDhhmmss"); but it is not anymore (now that it is "YYYY-MM-DD hh:mm:ss"), so it should not have NUM_FLAG
(mysqldump needs to quote TIMESTAMP values), so IS_NUM() should return false for it.
libmysqld/lib_sql.cc:
use IS_NUM() instead of INTERNAL_NUM_FIELD()
mysql-test/r/bigint.result:
result change: NEWDECIMAL fields now have NUM_FLAG (32768)
mysql-test/r/metadata.result:
result change: NEWDECIMAL fields now have NUM_FLAG (32768)
mysql-test/r/mysqldump.result:
DECIMAL columns are not quoted anymore by mysqldump. Which is ok, the parser does not need '' for them
mysql-test/r/ps_2myisam.result:
result change: NEWDECIMAL fields now have NUM_FLAG (32768)
mysql-test/r/ps_3innodb.result:
result change: NEWDECIMAL fields now have NUM_FLAG (32768)
mysql-test/r/ps_4heap.result:
result change: NEWDECIMAL fields now have NUM_FLAG (32768)
mysql-test/r/ps_5merge.result:
result change: NEWDECIMAL fields now have NUM_FLAG (32768)
mysql-test/suite/ndb/r/ps_7ndb.result:
result change: NEWDECIMAL fields now have NUM_FLAG (32768)
mysql-test/t/metadata.test:
test for BUG#42980
sql-common/client.c:
use IS_NUM() instead of INTERNAL_NUM_FIELD()
DECIMAL and TIMESTAMP used to have NUM_FLAG, but NEWDECIMAL was forgotten.
It's correct that TIMESTAMP does not have the flag nowadays (manual will be updated, connectors
developers will be notified).
client/mysql.cc:
Remove leading whitespace.
Remove extra text after #else directive.
client/mysqldump.c:
Function does not take a parameter.
mysys/array.c:
buffer is a uchar pointer.
sql/item.cc:
Assert if it should not happen.
storage/myisam/mi_check.c:
Cast to expected type. This is probably a bug, but it is
casted in a similar way in another part of the code.
storage/ndb/include/mgmapi/ndb_logevent.h:
Apply fix from cluster team.
tests/mysql_client_test.c:
Remove extraneous slash.
when used with --tab
1) New syntax: added CHARACTER SET clause to the
SELECT ... INTO OUTFILE (to complement the same clause in
LOAD DATA INFILE).
mysqldump is updated to use this in --tab mode.
2) ESCAPED BY/ENCLOSED BY field parameters are documented as
accepting CHAR argument, however SELECT .. INTO OUTFILE
silently ignored rests of multisymbol arguments.
For the symmetrical behavior with LOAD DATA INFILE the
server has been modified to fail with the same error:
ERROR 42000: Field separator argument is not what is
expected; check the manual
3) Current LOAD DATA INFILE recognizes field/line separators
"as is" without converting from client charset to data
file charset. So, it is supposed, that input file of
LOAD DATA INFILE consists of data in one charset and
separators in other charset. For the compatibility with
that [buggy] behaviour SELECT INTO OUTFILE implementation
has been saved "as is" too, but the new warning message
has been added:
Non-ASCII separator arguments are not fully supported
This message warns on field/line separators that contain
non-ASCII symbols.
client/mysqldump.c:
mysqldump has been updated to call SELECT ... INTO OUTFILE
statement with a charset from the --default-charset command
line parameter.
mysql-test/r/mysqldump.result:
Added test case for bug #30946.
mysql-test/r/outfile_loaddata.result:
Added test case for bug #30946.
mysql-test/t/mysqldump.test:
Added test case for bug #30946.
mysql-test/t/outfile_loaddata.test:
Added test case for bug #30946.
sql/field.cc:
String conversion code has been moved from check_string_copy_error()
to convert_to_printable() for reuse.
sql/share/errmsg.txt:
New WARN_NON_ASCII_SEPARATOR_NOT_IMPLEMENTED message has been added.
sql/sql_class.cc:
The select_export::prepare() method has been modified to:
1) raise the ER_WRONG_FIELD_TERMINATORS error on multisymbol
ENCLOSED BY/ESCAPED BY field arguments like LOAD DATA INFILE;
2) warn with a new WARN_NON_ASCII_SEPARATOR_NOT_IMPLEMENTED
message on non-ASCII field or line separators.
The select_export::send_data() merhod has been modified to
convert item data to output charset (see new SELECT INTO OUTFILE
syntax). By default the BINARY charset is used for backward
compatibility.
sql/sql_class.h:
The select_export::write_cs field added to keep output
charset.
sql/sql_load.cc:
mysql_load has been modified to warn on non-ASCII field or
line separators with a new WARN_NON_ASCII_SEPARATOR_NOT_IMPLEMENTED
message.
sql/sql_string.cc:
New global function has been added: convert_to_printable()
(common code has been moved from check_string_copy_error()).
sql/sql_string.h:
New String::is_ascii() method and new global convert_to_printable()
function have been added.
sql/sql_yacc.yy:
New syntax: added CHARACTER SET clause to the
SELECT ... INTO OUTFILE (to complement the same clause in
LOAD DATA INFILE). By default the BINARY charset is used for
backward compatibility.
when used with --tab
1) New syntax: added CHARACTER SET clause to the
SELECT ... INTO OUTFILE (to complement the same clause in
LOAD DATA INFILE).
mysqldump is updated to use this in --tab mode.
2) ESCAPED BY/ENCLOSED BY field parameters are documented as
accepting CHAR argument, however SELECT .. INTO OUTFILE
silently ignored rests of multisymbol arguments.
For the symmetrical behavior with LOAD DATA INFILE the
server has been modified to fail with the same error:
ERROR 42000: Field separator argument is not what is
expected; check the manual
3) Current LOAD DATA INFILE recognizes field/line separators
"as is" without converting from client charset to data
file charset. So, it is supposed, that input file of
LOAD DATA INFILE consists of data in one charset and
separators in other charset. For the compatibility with
that [buggy] behaviour SELECT INTO OUTFILE implementation
has been saved "as is" too, but the new warning message
has been added:
Non-ASCII separator arguments are not fully supported
This message warns on field/line separators that contain
non-ASCII symbols.
Fixed the 5.0-bugteam MacOSX warnings.
client/mysqldump.c:
Bug #45286: typecasts
cmd-line-utils/readline/bind.c:
Bug #45286: use variable of right type
cmd-line-utils/readline/display.c:
Bug #45286: use variable of right type
dbug/user.r:
Bug #45286: no warnings in generating man pages
strings/ctype.c:
Bug #45286: typecasts
mysqldump --tab still dumped triggers to stdout rather than to
individual tables.
We now append triggers to the .sql file for the corresponding
table.
--events and --routines correspond to a database rather than a
table and will still go to stdout with --tab unless redirected
with --result-file (-r).
client/mysqldump.c:
Extend open_sql_file_for_table() so we can open-append.
Change dump_triggers_for_table() so it will append its
output to the table's .sql-file when --tab is used.
mysql-test/r/mysqldump.result:
Show that when using --tab, triggers now end up in the .sql
file with the corresponding table (after that table), while
--routines and --events go to stdout or --result-file.
mysql-test/t/mysqldump.test:
Show that when using --tab, triggers now end up in the .sql
file with the corresponding table (after that table), while
--routines and --events go to stdout or --result-file.
mysqldump --tab still dumped triggers to stdout rather than to
individual tables.
We now append triggers to the .sql file for the corresponding
table.
--events and --routines correspond to a database rather than a
table and will still go to stdout with --tab unless redirected
with --result-file (-r).
When loading dump created by mysqldump tool an error is
thrown saying storage engine for the table doesn't have
an option.
mysqldump tries to re-insert the data into the federated
table which causes the error. Since the data is already
available on the remote server, mysqldump shouldn't try
to dump the data again for FEDERATED tables.
As stated in the bug page, it can be considered similar
to the MERGE ENGINE with "view only" nature.
Fixed by adding the "FEDERATED ENGINE" to the exception
list to ignore the data.
client/mysqldump.c:
Fixed check_if_ignore_table() to ignore FEDERATED engine
when dumping the table data.
mysql-test/r/federated.result:
Result file for BUG#21360
mysql-test/t/federated.test:
Testcase for BUG#21360
When loading dump created by mysqldump tool an error is
thrown saying storage engine for the table doesn't have
an option.
mysqldump tries to re-insert the data into the federated
table which causes the error. Since the data is already
available on the remote server, mysqldump shouldn't try
to dump the data again for FEDERATED tables.
As stated in the bug page, it can be considered similar
to the MERGE ENGINE with "view only" nature.
Fixed by adding the "FEDERATED ENGINE" to the exception
list to ignore the data.
--ignore-table option
mysqldump would correctly omit temporary tables for views, but would
incorrectly still emit all CREATE VIEW statements.
Backport a fix from 5.1, where we capture the names we want to emit
views for in one pass (the placeholder tables) and in the pass where
we actually emit the views, we don't emit a view if it wasn't in that
list.
--ignore-table option
mysqldump would correctly omit temporary tables for views, but would
incorrectly still emit all CREATE VIEW statements.
Backport a fix from 5.1, where we capture the names we want to emit
views for in one pass (the placeholder tables) and in the pass where
we actually emit the views, we don't emit a view if it wasn't in that
list.
- Remove bothersome warning messages. This change focuses on the warnings
that are covered by the ignore file: support-files/compiler_warnings.supp.
- Strings are guaranteed to be max uint in length
- Remove bothersome warning messages. This change focuses on the warnings
that are covered by the ignore file: support-files/compiler_warnings.supp.
- Strings are guaranteed to be max uint in length
- Remove bothersome warning messages. This change focuses on the warnings
that are covered by the ignore file: support-files/compiler_warnings.supp.
- Strings are guaranteed to be max uint in length
- Remove bothersome warning messages. This change focuses on the warnings
that are covered by the ignore file: support-files/compiler_warnings.supp.
- Strings are guaranteed to be max uint in length
mysqldump included character_set_client magic
that is unknown before 4.1 even when asked for
an appropriate compatibility mode.
In compatibility (3.23, 4.0) mode, we do not
output charset statements (not even in a
"comment conditional"), nor do we do magic on
the server, even if the server is sufficient
new (4.1+). Table-names will be output converted
to the charset requested by mysqldump; if such
a conversion is not possible (Ivrit -> Latin),
mysqldump will fail.
client/mysqldump.c:
in 3.23/4.0 compat mode, don't do charset magic,
period. not in output, but not on the server,
either!
mysql-test/r/mysqldump-max.result:
character_set_client magic lives in version-conditional
now (except in compat 3.23/4.0 mode, in which case we
don't output any at all!).
mysql-test/r/mysqldump.result:
character_set_client magic lives in version-conditional
now (except in compat 3.23/4.0 mode, in which case we
don't output any at all!).
mysql-test/r/openssl_1.result:
character_set_client magic lives in version-conditional
now (except in compat 3.23/4.0 mode, in which case we
don't output any at all!).
mysql-test/t/mysqldump.test:
character_set_client magic lives in version-conditional
now (except in compat 3.23/4.0 mode, in which case we
don't output any at all!).
mysqldump included character_set_client magic
that is unknown before 4.1 even when asked for
an appropriate compatibility mode.
In compatibility (3.23, 4.0) mode, we do not
output charset statements (not even in a
"comment conditional"), nor do we do magic on
the server, even if the server is sufficient
new (4.1+). Table-names will be output converted
to the charset requested by mysqldump; if such
a conversion is not possible (Ivrit -> Latin),
mysqldump will fail.
mysqldump creates stand-in tables before dumping the actual view.
Those tables were of the default type; if the view had more columns
than that (a pathological case, arguably), loading the dump would
fail. We now make the temporary stand-ins MyISAM tables to prevent
this.
client/mysqldump.c:
When creating a stand-in table, specify its type to
avoid defaulting to a type with a column-number limit
(like Inno). The type is always MyISAM as we know that
to be available.
mysql-test/r/mysqldump-max.result:
add test results for 31434
mysql-test/r/mysqldump.result:
mysqldump sets engine-type (MyISAM) for stand-in tables
for views now. Update test results.
mysql-test/t/mysqldump-max.test:
Show that mysqldump's stand-in tables for views explicitly
set engine-type to MyISAM to avoid falling back on an engine
that might support fewer columns than the final view requires
(here's lookin' at you, inno). Also show that this actually
has the desired effect by dumping and reloading a view that
has more columns than inno supports.
mysqldump creates stand-in tables before dumping the actual view.
Those tables were of the default type; if the view had more columns
than that (a pathological case, arguably), loading the dump would
fail. We now make the temporary stand-ins MyISAM tables to prevent
this.
mysqldump creates stand-in tables before dumping the actual view.
Those tables were of the default type; if the view had more columns
than that (a pathological case, arguably), loading the dump would
fail. We now make the temporary stand-ins MyISAM tables to prevent
this.
client/mysqldump.c:
When creating a stand-in table, specify its type to
avoid defaulting to a type with a column-number limit
(like Inno). The type is always MyISAM as we know that
to be available.
mysql-test/r/mysqldump.result:
mysqldump sets engine-type (MyISAM) for stand-in tables
for views now. Update test results.
mysqldump creates stand-in tables before dumping the actual view.
Those tables were of the default type; if the view had more columns
than that (a pathological case, arguably), loading the dump would
fail. We now make the temporary stand-ins MyISAM tables to prevent
this.
when --master-data is used
When using the --master-data option with mysqldump, mysqldump uses
a FLUSH TABLES command. However, this statement got replicated to
the slave(s), which caused the slave(s) to block unnecessarily while
the FLUSH tables command completed.
Now, if the master-data option is set to one of the two "on" modes,
then use the "LOCAL" qualifier to ensure that it's not replicated.
client/mysqldump.c:
If master_data is set to one of the two modes, then insert "LOCAL"
to the command to FLUSH TABLES so that the slaves aren't told to
flush also.
mysql-test/r/mysqldump.result:
Output of mysqldump changed.
when --master-data is used
When using the --master-data option with mysqldump, mysqldump uses
a FLUSH TABLES command. However, this statement got replicated to
the slave(s), which caused the slave(s) to block unnecessarily while
the FLUSH tables command completed.
Now, if the master-data option is set to one of the two "on" modes,
then use the "LOCAL" qualifier to ensure that it's not replicated.
into a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
client/mysqldump.c:
Auto merged
client/mysqltest.c:
Auto merged
include/my_global.h:
Auto merged
mysql-test/lib/mtr_report.pl:
Auto merged
sql/ha_partition.cc:
Auto merged
sql/handler.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/log.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.cc:
Auto merged
sql/unireg.cc:
Auto merged
storage/myisam/ha_myisam.cc:
Auto merged
storage/myisam/mi_dynrec.c:
Auto merged
storage/myisam/mi_open.c:
Auto merged
storage/myisammrg/ha_myisammrg.cc:
Auto merged
include/config-win.h:
Manual merge between main 5.1 and 5.1 marvel.
mysql-test/r/change_user.result:
Manual merge between main 5.1 and 5.1 marvel.
mysql-test/t/change_user.test:
Manual merge between main 5.1 and 5.1 marvel.
sql/sql_plugin.cc:
Manual merge between main 5.1 and 5.1 marvel.
into trift2.:/MySQL/M51/push-5.1
client/mysqldump.c:
Auto merged
configure.in:
Auto merged
include/my_global.h:
Auto merged
scripts/mysql_config.sh:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/unireg.h:
Auto merged
into a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
client/mysqldump.c:
Auto merged
include/my_global.h:
Auto merged
mysql-test/lib/mtr_report.pl:
Auto merged
sql/handler.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/log.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_plugin.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.h:
Auto merged
mysys/my_create.c:
SCCS merged
databases from 4.0 server
mysqldump treated a failure to set the results charset as a severe
error.
Now, don't try to set the charset for the SHOW CREATE TABLE statement,
if remote server's version is earlier than 4.1, which means it
doesn't support changing charsets.
client/mysqldump.c:
Don't set the charset for receiving results if the server doesn't
support it.
databases from 4.0 server
mysqldump treated a failure to set the results charset as a severe
error.
Now, don't try to set the charset for the SHOW CREATE TABLE statement,
if remote server's version is earlier than 4.1, which means it
doesn't support changing charsets.
into kaamos.(none):/data/src/opt/mysql-5.1-opt
client/mysql.cc:
Auto merged
client/mysqldump.c:
Auto merged
configure.in:
Auto merged
include/my_global.h:
Auto merged
libmysql/libmysql.c:
Auto merged
libmysqld/lib_sql.cc:
Auto merged
mysql-test/include/mix1.inc:
Auto merged
mysql-test/r/create.result:
Auto merged
mysql-test/r/func_str.result:
Auto merged
mysql-test/r/innodb.result:
Auto merged
mysql-test/r/innodb_mysql.result:
Auto merged
mysql-test/r/select.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/t/create.test:
Auto merged
mysql-test/t/disabled.def:
Auto merged
sql/filesort.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_sum.cc:
Auto merged
sql/log.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_plugin.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
storage/ndb/src/kernel/blocks/backup/Backup.hpp:
Auto merged
tests/mysql_client_test.c:
Auto merged
mysql-test/r/func_time.result:
Manual merge.
mysql-test/r/view.result:
Manual merge.
mysql-test/t/view.test:
Manual merge.
scripts/mysql_config.sh:
Manual merge.
sql-common/client.c:
Manual merge.
sql/sql_parse.cc:
Manual merge.
--master-data
No error code was returned by mysqldump if it detects that binary
logging is not enabled on the server.
Fixed by returning error code.
client/mysqldump.c:
Bug #34909: add error code
mysql-test/r/mysqldump-no-binlog.result:
Bug #34909: test case
mysql-test/t/mysqldump-no-binlog-master.opt:
Bug #34909: test case
mysql-test/t/mysqldump-no-binlog.test:
Bug #34909: test case
into hynda.mysql.fi:/home/my/mysql-5.1-marvel
BitKeeper/etc/ignore:
auto-union
client/mysqldump.c:
Auto merged
client/mysqltest.c:
Auto merged
include/my_global.h:
Auto merged
include/my_sys.h:
Auto merged
sql/handler.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_plugin.cc:
Auto merged
storage/myisam/mi_check.c:
Auto merged
storage/myisam/mi_dynrec.c:
Auto merged
storage/myisam/mi_write.c:
Auto merged
storage/myisam/myisamdef.h:
Auto merged
storage/myisam/myisampack.c:
Auto merged
sql/mysqld.cc:
Manual merge with main 5.1 tree.
value" error even though the value was correct): a C function in my_getopt.c
was taking bool* in parameter and was called from C++ sql_plugin.cc,
but on some Mac OS X sizeof(bool) is 1 in C and 4 in C++, giving funny
mismatches. Fixed, all other occurences of bool in C are removed, future
ones are blocked by a "C-bool-catcher" in my_global.h (use my_bool).
client/mysqldump.c:
my_bool for C
client/mysqltest.c:
my_bool for C
extra/replace.c:
my_bool for C
include/my_getopt.h:
my_bool for C
include/my_global.h:
Prevent people from using bool in C, it causes real bugs.
include/my_sys.h:
my_bool for C
include/my_time.h:
my_bool for C
include/thr_lock.h:
my_bool for C
libmysql/libmysql.c:
my_bool for C
mysys/charset.c:
my_bool for C
mysys/my_getopt.c:
my_bool for C
mysys/queues.c:
my_bool for C
mysys/thr_lock.c:
my_bool for C
regex/reginit.c:
my_bool for C
sql/set_var.cc:
C functions use my_bool so we must use my_bool too.
sql/sql_plugin.cc:
C functions use my_bool so we must use my_bool too.
This fixes a real observed bug of Maria, because on some Mac OS X,
sizeof(bool) is 1 in C and 4 in C++, so the bool* does wrong.
Removing useless line.
storage/heap/hp_update.c:
my_bool for C
storage/myisam/mi_check.c:
my_bool for C
storage/myisam/mi_dynrec.c:
my_bool for C
storage/myisam/mi_search.c:
my_bool for C
storage/myisam/mi_update.c:
my_bool for C
storage/myisam/mi_write.c:
my_bool for C
storage/myisam/myisamdef.h:
my_bool for C
storage/myisam/myisamlog.c:
my_bool for C
storage/myisam/myisampack.c:
my_bool for C
tests/mysql_client_test.c:
my_bool for C
unittest/mysys/bitmap-t.c:
my_bool for C
vio/viosslfactories.c:
my_bool for C
value" error even though the value was correct): a C function in my_getopt.c
was taking bool* in parameter and was called from C++ sql_plugin.cc,
but on some Mac OS X sizeof(bool) is 1 in C and 4 in C++, giving funny
mismatches. Fixed, all other occurences of bool in C are removed, future
ones are blocked by a "C-bool-catcher" in my_global.h (use my_bool).
into a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
BitKeeper/etc/ignore:
auto-union
client/mysqlcheck.c:
Auto merged
client/mysqldump.c:
Auto merged
client/mysqltest.c:
Auto merged
include/Makefile.am:
Auto merged
include/m_string.h:
Auto merged
include/my_base.h:
Auto merged
include/my_dbug.h:
Auto merged
include/my_global.h:
Auto merged
include/my_sys.h:
Auto merged
libmysql/CMakeLists.txt:
Auto merged
libmysql/Makefile.shared:
Auto merged
mysql-test/lib/mtr_report.pl:
Auto merged
mysys/mf_keycache.c:
Auto merged
sql/gen_lex_hash.cc:
Auto merged
sql/ha_partition.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/handler.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/lex.h:
Auto merged
sql/log.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/opt_range.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_plugin.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.cc:
Auto merged
sql/table.h:
Auto merged
sql/unireg.cc:
Auto merged
storage/myisam/ft_boolean_search.c:
Auto merged
storage/myisam/ft_nlq_search.c:
Auto merged
storage/myisam/ha_myisam.cc:
Auto merged
storage/myisam/mi_check.c:
Auto merged
storage/myisam/mi_open.c:
Auto merged
storage/myisam/myisampack.c:
Auto merged
storage/myisammrg/ha_myisammrg.cc:
Auto merged
client/mysqlslap.c:
Manual merge with main 5.1 tree.
show version of mysqldump, release of server et al., and version of
current server in mysqldumps.
client/mysqldump.c:
show version of mysqldump, release of server et al., and version of
current server in mysqldumps.
into ramayana.hindu.god:/home/tsmith/m/bk/maint/51-merge
client/mysqldump.c:
Auto merged
include/my_base.h:
Auto merged
include/my_sys.h:
Auto merged
libmysql/CMakeLists.txt:
Auto merged
libmysql/Makefile.shared:
Auto merged
mysql-test/lib/mtr_cases.pl:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/create.result:
Auto merged
mysql-test/r/grant.result:
Auto merged
mysql-test/r/innodb.result:
Auto merged
mysql-test/r/ps.result:
Auto merged
mysql-test/suite/rpl/t/rpl_ssl.test:
Auto merged
mysql-test/t/cast.test:
Auto merged
mysql-test/t/create.test:
Auto merged
mysql-test/t/ps.test:
Auto merged
mysql-test/t/variables.test:
Auto merged
sql/field.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/opt_range.cc:
Auto merged
sql/records.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/set_var.h:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/unireg.cc:
Auto merged
storage/myisam/ft_boolean_search.c:
Auto merged
storage/myisam/ha_myisam.cc:
Auto merged
storage/myisam/sort.c:
Auto merged
mysql-test/t/log_state.test:
Manual merge fix-up
mysql-test/include/mix1.inc:
Manual merge
mysql-test/r/ctype_ucs.result:
Manual merge
mysql-test/r/func_misc.result:
Manual merge
mysql-test/r/innodb_mysql.result:
Manual merge
mysql-test/r/key.result:
Manual merge
mysql-test/r/log_state.result:
Manual merge
mysql-test/suite/binlog/t/binlog_killed.test:
Manual merge
mysql-test/t/ctype_ucs.test:
Manual merge
mysql-test/t/func_misc.test:
Manual merge
mysql-test/t/key.test:
Manual merge
sql/item_strfunc.h:
Manual merge
strings/ctype-simple.c:
Manual merge
into ramayana.hindu.god:/home/tsmith/m/bk/maint/50
client/mysqldump.c:
Auto merged
include/my_sys.h:
Auto merged
libmysql/CMakeLists.txt:
Auto merged
libmysql/Makefile.shared:
Auto merged
myisam/ft_boolean_search.c:
Auto merged
myisam/sort.c:
Auto merged
mysql-test/t/cast.test:
Auto merged
mysql-test/t/variables.test:
Auto merged
sql/field.cc:
Auto merged
sql/ha_myisam.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/opt_range.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/set_var.h:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
mysql-test/mysql-test-run.pl:
Manual merge
mysql-test/r/ctype_ucs.result:
Manual merge
mysql-test/r/func_misc.result:
Manual merge
mysql-test/t/binlog_killed.test:
Manual merge
mysql-test/t/ctype_ucs.test:
Manual merge
mysql-test/t/func_misc.test:
Manual merge
sql/item_strfunc.h:
Manual merge
strings/ctype-simple.c:
Manual merge
into hynda.mysql.fi:/home/my/mysql-5.1-marvel
BitKeeper/etc/ignore:
auto-union
client/mysqldump.c:
Auto merged
include/my_sys.h:
Auto merged
libmysql/CMakeLists.txt:
Auto merged
libmysql/Makefile.shared:
Auto merged
mysql-test/lib/mtr_report.pl:
Auto merged
sql/ha_partition.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/opt_range.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
storage/myisam/mi_dynrec.c:
Auto merged
this has already been closed by a note in the manual, now we
complete this by a note in "mysqldump --help"
client/mysqldump.c:
mention, in "mysqldump --help", of limitations reported as BUG#27850
"mysqldump --single-transaction does not work if TRUNCATE/DROP/RENAME/ALTER"
The new text is inspired from what the "mysqldump" section of the
manual now says about --single-transaction:
http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html
into hynda.mysql.fi:/home/my/mysql-5.1-marvel
BitKeeper/etc/ignore:
auto-union
client/mysql_upgrade.c:
Auto merged
client/mysqlcheck.c:
Auto merged
client/mysqldump.c:
Auto merged
client/mysqlimport.c:
Auto merged
client/mysqlshow.c:
Auto merged
client/mysqlslap.c:
Auto merged
client/mysqltest.c:
Auto merged
include/my_global.h:
Auto merged
include/my_sys.h:
Auto merged
mysys/mf_keycache.c:
Auto merged
mysys/my_init.c:
Auto merged
mysys/safemalloc.c:
Auto merged
sql/ha_partition.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/log.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/opt_range.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/table.cc:
Auto merged
sql/table.h:
Auto merged
sql/unireg.cc:
Auto merged
storage/myisam/ha_myisam.cc:
Auto merged
storage/myisam/mi_write.c:
Auto merged
sql/sql_yacc.yy:
Merged with 5.1 main tree.
db name should be quoted. this code does communication with the server.
it's always ok to quote names in this case.
client/mysqldump.c:
db name should be quoted. this code does communication with the server.
it's always ok to quote names in this case.
mysql-test/r/mysqldump.result:
test result
mysql-test/t/mysqldump.test:
test case
into mysql.com:/home/gluh/MySQL/Merge/5.1-opt
client/client_priv.h:
Auto merged
client/mysqldump.c:
Auto merged
include/config-win.h:
Auto merged
libmysql/libmysql.c:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/create.result:
Auto merged
mysql-test/r/func_sapdb.result:
Auto merged
mysql-test/r/information_schema.result:
Auto merged
mysql-test/r/variables.result:
Auto merged
mysql-test/t/information_schema.test:
Auto merged
mysql-test/t/variables.test:
Auto merged
sql/field.cc:
Auto merged
sql/ha_partition.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_sum.cc:
Auto merged
sql/item_timefunc.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/protocol.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.cc:
Auto merged
storage/innobase/handler/ha_innodb.cc:
Auto merged
storage/myisam/sort.c:
Auto merged
tests/mysql_client_test.c:
Auto merged
mysql-test/r/query_cache.result:
manual merge
mysql-test/include/mix1.inc:
manual merge
mysql-test/r/innodb_mysql.result:
manual merge
mysql-test/r/type_datetime.result:
manual merge
mysql-test/r/type_decimal.result:
manual merge
mysql-test/t/query_cache.test:
manual merge
mysql-test/t/type_datetime.test:
manual merge
mysql-test/t/type_decimal.test:
manual merge
sql/item.cc:
manual merge
into mysql.com:/home/gluh/MySQL/Merge/5.0-opt
client/mysqldump.c:
Auto merged
include/config-win.h:
Auto merged
libmysql/libmysql.c:
Auto merged
myisam/sort.c:
Auto merged
mysql-test/r/func_sapdb.result:
Auto merged
mysql-test/r/variables.result:
Auto merged
mysql-test/t/variables.test:
Auto merged
sql/field.cc:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/item_timefunc.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
tests/mysql_client_test.c:
Auto merged
mysql-test/r/type_datetime.result:
manual merge
mysql-test/r/type_decimal.result:
manual merge
mysql-test/t/type_datetime.test:
manual merge
mysql-test/t/type_decimal.test:
manual merge
sql/item.cc:
manual merge
The combination of --single-transaction and --master-data requires
START TRANSACTION WITH CONSISTENT SNAPSHOT which is available from
mysqld 4.1 on. When trying this against an older server, print
diagnostic, then, if --force is not given, abort.
No test-case given since it would require a mysqld < 4.1.
client/mysqldump.c:
Bug #30444: 5.0 mysqldump silently allows wrong backup to be taken against a 4.0 database
The combination of --single-transaction and --master-data requires
START TRANSACTION WITH CONSISTENT SNAPSHOT which is available from
mysqld 4.1 on. When trying this against an older server, print
diagnostic, then, if --force is not given, abort.
The combination of --single-transaction and --master-data requires
START TRANSACTION WITH CONSISTENT SNAPSHOT which is available from
mysqld 4.1 on. When trying this against an older server, print
diagnostic, then, if --force is not given, abort.
No test-case given since it would require a mysqld < 4.1.
into gleb.loc:/home/uchum/work/bk/5.1-opt
client/mysqldump.c:
Auto merged
mysql-test/t/mysqldump.test:
Auto merged
client/client_priv.h:
Merge with 5.0-opt.
mysql-test/r/mysqldump.result:
Merge with 5.0-opt.
mysqldump adds the "-- Dump completed on YYYY-MM-DD hh:mm:ss" string
to the end of output if the --comments switch is on.
The only way to suppress this line is to use --skip-comments/--compact
switch.
New switch has been added to the mysqldump client command line:
--dump-date.
For the compatibility with previous releases, by default the --dump-date
is on.
The --dump-date switch forces mysqldump to add date to the
"-- Dump completed on ..." string at the end of output.
The --skip-dump-date switch supresses the output of date string
and uses short form of that commentary: "-- Dump completed".
--skip-comments or --compact switches disable the whole commentary
as usual.
client/client_priv.h:
Fixed bug #31077.
New OPT_DUMP_DATE option has been added to implement
the mysqldump client --dump-date switch.
client/mysqldump.c:
Fixed bug #31077.
The opt_dump_date variable has been added to imlements
the mysqldump cliemt --dump-date switch.
By default this switch is on (for compatibility with previous
releases).
The --dump-date switch forces mysqldump to add date to the
"-- Dump completed on ..." string at the end of output.
The --skip-dump-date switch supresses the output of date string
and uses short form of that commentary: "-- Dump completed".
--skip-comments or --compact switches disable the whole commentary
as usual.
mysql-test/t/mysqldump.test:
Added test case for bug #31077.
mysql-test/r/mysqldump.result:
Added test case for bug #31077.
mysqldump adds the "-- Dump completed on YYYY-MM-DD hh:mm:ss" string
to the end of output if the --comments switch is on.
The only way to suppress this line is to use --skip-comments/--compact
switch.
New switch has been added to the mysqldump client command line:
--dump-date.
For the compatibility with previous releases, by default the --dump-date
is on.
The --dump-date switch forces mysqldump to add date to the
"-- Dump completed on ..." string at the end of output.
The --skip-dump-date switch supresses the output of date string
and uses short form of that commentary: "-- Dump completed".
--skip-comments or --compact switches disable the whole commentary
as usual.
into mysql.com:/home/my/mysql-5.1
client/mysql_upgrade.c:
Auto merged
client/mysqldump.c:
Auto merged
client/mysqlslap.c:
Auto merged
client/mysqltest.c:
Auto merged
sql/handler.cc:
Auto merged
Added extra debug
client/mysql_upgrade.c:
Removed extra space
client/mysqlcheck.c:
Removed extra space
client/mysqldump.c:
Removed extra space
client/mysqlimport.c:
Removed extra space
client/mysqlshow.c:
Removed extra space
client/mysqlslap.c:
Removed extra space
client/mysqltest.c:
Removed extra space
sql/handler.cc:
Added extra debug
into sita.local:/Users/tsmith/m/bk/maint/50
client/mysql.cc:
Auto merged
client/mysqldump.c:
Auto merged
mysql-test/Makefile.am:
Auto merged
sql/sql_select.cc:
Auto merged
into mysql.com:/home/tnurnberg/15327/50-15327
client/mysql.cc:
Auto merged
client/mysql_upgrade.c:
Auto merged
client/mysqldump.c:
Auto merged
client/mysqltest.c:
Auto merged
configure.in:
Auto merged
libmysql/libmysql.c:
Auto merged
mysql-test/Makefile.am:
Auto merged
scripts/Makefile.am:
Auto merged
sql/mysqld.cc:
Auto merged
tests/mysql_client_test.c:
Auto merged
make sure that if builder configured with a non-standard (!= 3306)
default TCP port that value actually gets used throughout. if they
didn't configure a value, assume "use a sensible default", which
will be read from /etc/services or, failing that, from the factory
default. That makes the order of preference
- command-line option
- my.cnf, where applicable
- $MYSQL_TCP_PORT environment variable
- /etc/services (unless configured --with-tcp-port)
- default port (--with-tcp-port=... or factory default)
client/mysql.cc:
Bug #15327: configure: --with-tcp-port option being partially ignored
make help on --port a little more clear
client/mysql_upgrade.c:
Bug #15327: configure: --with-tcp-port option being partially ignored
make help on --port a little more clear
client/mysqladmin.cc:
Bug #15327: configure: --with-tcp-port option being partially ignored
make help on --port a little more clear
client/mysqlbinlog.cc:
Bug #15327: configure: --with-tcp-port option being partially ignored
make help on --port a little more clear
client/mysqlcheck.c:
Bug #15327: configure: --with-tcp-port option being partially ignored
make help on --port a little more clear
client/mysqldump.c:
Bug #15327: configure: --with-tcp-port option being partially ignored
make help on --port a little more clear
client/mysqlimport.c:
Bug #15327: configure: --with-tcp-port option being partially ignored
make help on --port a little more clear
client/mysqlmanagerc.c:
Bug #15327: configure: --with-tcp-port option being partially ignored
make help on --port a little more clear
configure.in:
Bug #15327: configure: --with-tcp-port option being partially ignored
If MYSQL_TCP_PORT defaulted in configure (factory default 3306
at the time of this writing), set MYSQL_TCP_PORT to factory
default, then clear factory default after. That way, we lose no
information, and we can distinguish between "defaulted" and the
pathological case "builder specifically configured a port that
coincides with factory default." This can in theory happen if
builder configures and builds several servers from a script
(--with-tcp-port=3306, --with-tcp-port=3316, --with-tcp-port=3326).
Not all that probable, but much preferable to having more "magic"
happen in the server when we can solve this without any guesswork.
client/mysqlshow.c:
Bug #15327: configure: --with-tcp-port option being partially ignored
make help on --port a little more clear
client/mysqltest.c:
Bug #15327: configure: --with-tcp-port option being partially ignored
make help on --port a little more clear
include/mysql_version.h.in:
Bug #15327: configure: --with-tcp-port option being partially ignored
make factory default for TCP port available as MYSQL_PORT_DEFAULT
if build-time configured with a different default. (0 if unchanged)
libmysql/libmysql.c:
Bug #15327: configure: --with-tcp-port option being partially ignored
initialize default tcp port for client, like so:
- if user configured --with-tcp-port, use that value as default
- otherwise assume "use a good default": search mysqld/tcp in
/etc/services; if that doesn't exist, use factory default (3306)
- environment variable MYSQL_TCP_PORT overrides this default
- command-line option overrides all of the above
mysql-test/Makefile.am:
Bug #15327: configure: --with-tcp-port option being partially ignored
make factory default for TCP port available as MYSQL_TCP_PORT_DEFAULT
if build-time configured with a different default. (0 if unchanged)
mysql-test/mysql-test-run-shell.sh:
Bug #15327: configure: --with-tcp-port option being partially ignored
set up MYSQL_TCP_PORT if not already set in environment:
- if user configured --with-tcp-port, use that value as default
- otherwise assume "use a good default": search mysqld/tcp in
/etc/services; if that doesn't exist, use factory default (3306)
netware/mysql_test_run.c:
Bug #15327: configure: --with-tcp-port option being partially ignored
account for non-standard default port-no. configured at build-time
netware/mysqld_safe.c:
Bug #15327: configure: --with-tcp-port option being partially ignored
account for non-standard default port-no. configured at build-time
scripts/Makefile.am:
Bug #15327: configure: --with-tcp-port option being partially ignored
make factory default for TCP port available as MYSQL_TCP_PORT_DEFAULT
if build-time configured with a different default. (0 if unchanged)
scripts/mysql_config.sh:
Bug #15327: configure: --with-tcp-port option being partially ignored
set up MYSQL_TCP_PORT if not already set in environment:
- if user configured --with-tcp-port, use that value as default
- otherwise assume "use a good default": search mysqld/tcp in
/etc/services; if that doesn't exist, use factory default (3306)
scripts/mysql_fix_privilege_tables.sh:
Bug #15327: configure: --with-tcp-port option being partially ignored
clarifying notice only
scripts/mysqld_safe-watch.sh:
Bug #15327: configure: --with-tcp-port option being partially ignored
account for non-standard default port-no. configured at build-time
server-tools/instance-manager/priv.h:
Bug #15327: configure: --with-tcp-port option being partially ignored
account for non-standard default port-no. configured at build-time
sql/mysqld.cc:
Bug #15327: configure: --with-tcp-port option being partially ignored
if builder specifically requested a default port, use that
(even if it coincides with our factory default).
only if they didn't do we check /etc/services (and, failing
on that, fall back to the factory default of 3306).
either default can be overridden by the environment variable
MYSQL_TCP_PORT, which in turn can be overridden with command
line options.
tests/mysql_client_test.c:
Bug #15327: configure: --with-tcp-port option being partially ignored
make help on --port a little more clear
tests/ssl_test.c:
Bug #15327: configure: --with-tcp-port option being partially ignored
account for non-standard default port-no. configured at build-time
tests/thread_test.c:
Bug #15327: configure: --with-tcp-port option being partially ignored
make help on --port a little more clear
make sure that if builder configured with a non-standard (!= 3306)
default TCP port that value actually gets used throughout. if they
didn't configure a value, assume "use a sensible default", which
will be read from /etc/services or, failing that, from the factory
default. That makes the order of preference
- command-line option
- my.cnf, where applicable
- $MYSQL_TCP_PORT environment variable
- /etc/services (unless configured --with-tcp-port)
- default port (--with-tcp-port=... or factory default)
mysqldump --skip-events --all-databases dumped data of the mysqld.event table,
and during the restoration from this dump events were created in spite
of the --skip-events option.
The mysqldump client has been modified to ignore mysql.event table data
in case of --skip-events options.
client/mysqldump.c:
Fixed bug #29938.
The dump_table function has been modified to skip dumping of
the mysql.event table data in case of the --skip-event mysqldump
client option.
mysql-test/t/mysqldump.test:
Updated test case for bug #29938.
mysql-test/r/mysqldump.result:
Updated test case for bug #29938.
mysqldump --skip-events --all-databases dumped data of the mysqld.event table,
and during the restoration from this dump events were created in spite
of the --skip-events option.
The mysqldump client has been modified to ignore mysql.event table data
in case of --skip-events options.
When dumping database from a 4.x server, the mysqldump client
inserted a delimiter sign inside special commentaries of the form:
/*!... CREATE DATABASE IF NOT EXISTS ... ;*/
During restoration that dump file was splitten by delimiter signs on
the client side, and the rest of some commentary strings was prepended
to following statements.
The 4x_server_emul test case option has been added for use with the
DBUG_EXECUTE_IF debugging macro. This option affects debug server
builds only to emulate particular behavior of a 4.x server for
the mysqldump client testing. Non-debugging builds are not affected.
mysql-test/r/mysqldump-compat.result:
Added test case for bug #30126.
mysql-test/t/mysqldump-compat.opt:
Added test case for bug #30126.
mysql-test/t/mysqldump-compat.test:
Added test case for bug #30126.
sql/sql_parse.cc:
Fixed bug #30126.
The mysqldump client uses the "SHOW CREATE DATABASE" query to
obtain the "CREATE DATABASE" statement from that database.
The 4.x server doesn't recognise that query, and mysqldump
forms the "CREATE DATABASE" statement from scratch.
That statement was formed incorrectly.
To enforce the mysqldump client to create that statement from
scratch, debugging code has been added to the mysql_execute_command
function: in tcase of the --loose-debug=d,4x_server_emul option,
the server returns parse error to client to emulate old behaviour.
The 4x_server_emul test case option has been added for use with the
DBUG_EXECUTE_IF debugging macro. This option affects debug server
builds only to emulate particular behavior of a 4.x server for
the mysqldump client testing. Non-debugging builds are not affected.
client/mysqldump.c:
Fixed bug #30126.
The init_dumping_tables function has been modified to output semicolon
outside of commentaries.
When dumping database from a 4.x server, the mysqldump client
inserted a delimiter sign inside special commentaries of the form:
/*!... CREATE DATABASE IF NOT EXISTS ... ;*/
During restoration that dump file was splitten by delimiter signs on
the client side, and the rest of some commentary strings was prepended
to following statements.
The 4x_server_emul test case option has been added for use with the
DBUG_EXECUTE_IF debugging macro. This option affects debug server
builds only to emulate particular behavior of a 4.x server for
the mysqldump client testing. Non-debugging builds are not affected.
into hynda.mysql.fi:/home/my/mysql-5.1-marvel
client/mysqldump.c:
Auto merged
sql/event_db_repository.cc:
Auto merged
sql/event_queue.cc:
Auto merged
sql/field.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/log_event.h:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_db.cc:
Auto merged
sql/sql_handler.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_plugin.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/table.h:
Auto merged
sql/sql_yacc.yy:
Manual merge with 5.1 main tree.
into mysql.com:/home/my/mysql-5.1
configure.in:
Auto merged
client/mysql.cc:
Auto merged
include/m_ctype.h:
Auto merged
sql/field.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/handler.h:
Auto merged
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_strfunc.h:
Auto merged
sql/log.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_string.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.cc:
Auto merged
sql/table.h:
Auto merged
storage/myisam/mi_rkey.c:
Auto merged
client/mysqldump.c:
Manual merge (trivial)
scripts/mysql_install_db.sh:
Complex merge (parital rewrite of new code)
sql/sql_show.cc:
Manual merge
tests/mysql_client_test.c:
then
if ! test -x "$print_defaults"
then
missing_in_basedir my_print_defaults
exit 1
fi
else
Faster thr_alarm()
Added 'Opened_files' status variable to track calls to my_open()
Don't give warnings when running mysql_install_db
Added option --source-install to mysql_install_db
I had to do the following renames() as used polymorphism didn't work with Forte compiler on 64 bit systems
index_read() -> index_read_map()
index_read_idx() -> index_read_idx_map()
index_read_last() -> index_read_last_map()
BUILD/compile-solaris-sparc-forte:
Updated script to current Solaris installations
Now we compile by default for 64 bits
client/mysql.cc:
Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte)
client/mysql_upgrade.c:
Fixed compiler warning (on Forte)
client/mysqladmin.cc:
Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte)
client/mysqlcheck.c:
Fixed compiler warning (on Forte)
client/mysqldump.c:
Fixed compiler warning (on Forte)
client/mysqlslap.c:
Fixed compiler warning (on Forte)
client/mysqltest.c:
Fixed compiler warning (on Forte)
client/sql_string.cc:
Avoid compiler warnings when using C function pointers in C++
configure.in:
Added detection of mtmalloc and ieeefp.h
extra/replace.c:
Fixed compiler warning (on Forte)
include/m_ctype.h:
Added some typedef's to make it easy to use C function pointers in C++
include/my_sys.h:
Added my_file_total_opened (counter for calls to my_open())
include/myisam.h:
Fixed compiler warning (on Forte)
libmysql/libmysql.c:
Fixed compiler warning (on Forte) by adding casts and change types
libmysql/manager.c:
Fixed compiler warning (on Forte) by adding casts and change types
mysql-test/r/ctype_cp932_binlog_stm.result:
Updated positions
(Needed because we didn't before correctly restore collation_database after running stored procedure
mysys/my_fopen.c:
Count number of opened files
mysys/my_open.c:
Count number of opened files
mysys/my_static.c:
Count number of opened files
mysys/thr_alarm.c:
Optimization to do less alarm() and pthread_sigmask() calls.
Idea is to remember time for next pending alarm and not reschedule a new alarm if it's after the current one.
Before we only did this if there was other pending alarms.
We don't have to use pthread_sigmask() in case of 'USE_ONE_SIGNAL_HAND' as the alarm()
signal will be blocked for the calling thread anyway and no other thread will have the alarm() signal enabled to call process_alarm()
regex/regcomp.c:
Fixed compiler warning (on Forte) by adding casts and change types
scripts/mysql_install_db.sh:
Added option --source-install to allow one to create a mysql database from the source tree without installing MySQL
Don't give (unnecessary) warnings
server-tools/instance-manager/angel.cc:
Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte)
server-tools/instance-manager/thread_registry.cc:
Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte)
sql/event_db_repository.cc:
index_read() -> index_read_map()
sql/event_queue.cc:
Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte)
sql/field.cc:
Fixed compiler warnings about hidden fields
sql/ha_partition.cc:
Fixed compiler warnings about hidden fields
index_read() -> index_read_map()
sql/ha_partition.h:
index_read() -> index_read_map()
sql/handler.cc:
Added PAGE option to row types (to prepare for future)
index_read() -> index_read_map()
sql/handler.h:
Added ROW_TYPE_PAGE (for future)
Added flag to signal if table was to be created transactionally
I had to do the following renames() as used polymorphism didn't work with Forte compiler on 64 bit systems
index_read() -> index_read_map()
index_read_idx() -> index_read_idx_map()
index_read_last() -> index_read_last_map()
sql/item.cc:
Fixed indentation
Renamed local variable to avoid hiding class variable
sql/item_cmpfunc.cc:
Renamed local variable to avoid hiding class variable
sql/item_cmpfunc.h:
Removed not used variable
sql/item_func.cc:
Renamed local variable to avoid hiding class variable
sql/item_strfunc.cc:
Moved functions from Item_strfunc.cc
sql/item_strfunc.h:
Move functions to item_strfunc.cc
Use C function pointer type to avoid compiler warnings (with Forte)
sql/item_subselect.cc:
index_read() -> index_read_map()
sql/item_xmlfunc.cc:
Renamed local variable to avoid hiding class variable
Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte)
sql/key.cc:
Fixed indentation
sql/log.cc:
Renamed local variable to avoid hiding class variable
sql/log_event.cc:
Removed call to my_time() when creating class instance of Log_event() as this may have static instances.
(One can't call my_time() before my_init())
index_read() -> index_read_map()
Renamed local variable to avoid hiding class variable
sql/log_event_old.cc:
Renamed local variable to avoid hiding class variable
sql/mysql_priv.h:
Made all create_backup_ctx() declarations identical.
This lifted up a bug where wrong create_backup_ctx() was called in some cases.
Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte)
sql/mysqld.cc:
Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte)
Fixed indentation
Don't call end_thr_alarm() when calling unireg_abort() as unireg_abort() already calls end_thr_alarm()
Added variable 'Opened_files' (number of calls to my_open() or my_fopen())
Don't print 'loose' warnings when using --bootstrap (to avoid warnings when running mysql_install_db)
Fixed compiler warnings
sql/opt_range.cc:
index_read() -> index_read_map()
sql/opt_sum.cc:
index_read() -> index_read_map()
sql/partition_info.cc:
Renamed local variable to avoid hiding class variable
sql/rpl_filter.cc:
Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte)
sql/set_var.cc:
Renamed local variable to avoid hiding class variable
Added 'process_key_cache_t' type to avoid compiler warning (on Forte)
sql/set_var.h:
Added 'process_key_cache_t' type to avoid compiler warning (on Forte)
sql/sp.cc:
More debugging
index_read() -> index_read_map()
sql/sp_cache.cc:
Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte)
sql/sp_head.cc:
Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte)
Moved 'saved_creation_ctx' higher up to be able to free objects allocated by create_backup_ctx()
sql/sql_acl.cc:
index_read() -> index_read_map()
sql/sql_class.cc:
Renamed local variable to avoid hiding class variable
Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte)
sql/sql_class.h:
Renamed local variable to avoid hiding class variable
sql/sql_db.cc:
Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte)
sql/sql_delete.cc:
Renamed local variable to avoid hiding class variable
sql/sql_handler.cc:
index_read() -> index_read_map()
sql/sql_help.cc:
index_read() -> index_read_map()
sql/sql_insert.cc:
index_read() -> index_read_map()
Renamed local variable to avoid hiding class variable
sql/sql_lex.cc:
Renamed local variable to avoid hiding class variable
sql/sql_plugin.cc:
Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte)
index_read() -> index_read_map()
Don't give warnings about not used plugins if we are using --warnings=0
sql/sql_select.cc:
index_read() -> index_read_map()
sql-common/client.c:
Fixed compiler warning (on Forte)
sql-common/my_time.c:
Removed never accessed code
Fixed compiler warning (on Forte)
sql/sql_servers.cc:
index_read() -> index_read_map()
sql/sql_show.cc:
Added TRANSACTIONAL to SHOW CREATE
Fixed ROW_TYPE_PAGE
sql/sql_string.cc:
Avoid compiler warnings when using C function pointers in C++
sql/sql_table.cc:
Set create_info->transactional if we used TRANSACTIONAL=1
sql/sql_udf.cc:
index_read() -> index_read_map()
sql/sql_yacc.yy:
Added TRANSACTIONAL=0|1 to CREATE (for future)
Added row type PAGE (was only partionally handled before)
sql/strfunc.cc:
Avoid compiler warnings when using C function pointers in C++
sql/table.cc:
More DBUG statements
Declare all create_backup_ctx() functions identically
Remember if table was created with TRANSACTIONAL flag or not (future safe)
Renamed local variable to avoid hiding class variable
sql/table.h:
Remember if table was created with TRANSACTIONAL=1
sql/tztime.cc:
index_read() -> index_read_map()
sql-common/pack.c:
Fixed compiler warning (on Forte)
storage/archive/archive_reader.c:
Fixed compiler warning (on Forte)
storage/archive/azio.c:
Fixed compiler warning (on Forte)
storage/blackhole/ha_blackhole.cc:
index_read() -> index_read_map()
storage/blackhole/ha_blackhole.h:
index_read() -> index_read_map()
storage/csv/ha_tina.cc:
Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte)
storage/example/ha_example.cc:
index_read() -> index_read_map()
storage/example/ha_example.h:
index_read() -> index_read_map()
storage/heap/ha_heap.cc:
index_read() -> index_read_map()
storage/heap/ha_heap.h:
index_read() -> index_read_map()
storage/heap/hp_test1.c:
Fixed compiler warning (on Forte)
storage/heap/hp_test2.c:
Fixed compiler warning (on Forte)
storage/myisam/ft_boolean_search.c:
Fixed compiler warning (on Forte)
storage/myisam/ft_nlq_search.c:
Fixed compiler warning (on Forte)
storage/myisam/ft_parser.c:
Fixed compiler warning (on Forte)
storage/myisam/ft_stopwords.c:
Fixed compiler warning (on Forte)
storage/myisam/ha_myisam.cc:
index_read() -> index_read_map()
storage/myisam/ha_myisam.h:
index_read() -> index_read_map()
storage/myisam/mi_check.c:
Fixed compiler warning (on Forte)
storage/myisam/mi_delete.c:
Fixed compiler warning (on Forte)
storage/myisam/mi_dynrec.c:
Fixed compiler warning (on Forte)
storage/myisam/mi_extra.c:
Fixed compiler warning (on Forte)
storage/myisam/mi_key.c:
Fixed compiler warning (on Forte)
storage/myisam/mi_keycache.c:
Fixed compiler warning (on Forte)
storage/myisam/mi_locking.c:
Fixed compiler warning (on Forte)
storage/myisam/mi_log.c:
Fixed compiler warning (on Forte)
storage/myisam/mi_open.c:
Fixed compiler warning (on Forte)
storage/myisam/mi_packrec.c:
Fixed compiler warning (on Forte)
storage/myisam/mi_page.c:
Fixed compiler warning (on Forte)
storage/myisam/mi_rkey.c:
Added comment
storage/myisam/mi_search.c:
Fixed compiler warning (on Forte)
storage/myisam/mi_statrec.c:
Fixed compiler warning (on Forte)
storage/myisam/mi_test1.c:
Fixed compiler warning (on Forte)
storage/myisam/mi_test2.c:
Fixed compiler warning (on Forte)
storage/myisam/mi_test3.c:
Fixed compiler warning (on Forte)
storage/myisam/mi_update.c:
Fixed compiler warning (on Forte)
storage/myisam/mi_write.c:
Fixed compiler warning (on Forte)
storage/myisam/myisamdef.h:
Fixed that file_read/file_write returns type size_t
Changed some functions to use uchar * as argument/return value instead of char*
This fixed some compiler warnings on Forte
storage/myisam/myisamlog.c:
Fixed compiler warning (on Forte)
storage/myisam/myisampack.c:
Fixed compiler warning (on Forte)
storage/myisam/rt_test.c:
Fixed compiler warning (on Forte)
storage/myisam/sort.c:
Fixed compiler warning (on Forte) by adding casts or changing variables to uchar*
storage/myisam/sp_test.c:
Fixed compiler warning (on Forte) by adding casts or changing variables to uchar*
storage/myisammrg/ha_myisammrg.cc:
index_read() -> index_read_map()
storage/myisammrg/ha_myisammrg.h:
index_read() -> index_read_map()
storage/myisammrg/myrg_create.c:
Fixed compiler warning (on Forte) by adding casts or changing variable types
storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp:
Tdummy -> align (as in other part of cluster code)
storage/ndb/src/kernel/vm/DynArr256.cpp:
Removed not used variable
storage/ndb/src/ndbapi/Ndb.cpp:
Removed not used variable
strings/strtod.c:
Include ieeefp.h to avoid compiler warning
tests/bug25714.c:
Fixed compiler warning
tests/mysql_client_test.c:
Remove not used variable
Fixed indentation
Removed never reached code
Fixed compiler warning (on Forte) by adding casts or changing variable types
vio/viosocket.c:
Fixed compiler warning (on Forte) by adding casts or changing variable types
Faster thr_alarm()
Added 'Opened_files' status variable to track calls to my_open()
Don't give warnings when running mysql_install_db
Added option --source-install to mysql_install_db
I had to do the following renames() as used polymorphism didn't work with Forte compiler on 64 bit systems
index_read() -> index_read_map()
index_read_idx() -> index_read_idx_map()
index_read_last() -> index_read_last_map()
into bodhi.(none):/opt/local/work/mysql-5.1-runtime
client/mysqldump.c:
Auto merged
mysql-test/r/federated.result:
Auto merged
mysql-test/t/federated.test:
Auto merged
into pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.1-build-marvel-engines
BitKeeper/etc/ignore:
auto-union
configure.in:
Auto merged
BitKeeper/deleted/.del-CMakeLists.txt~99a50df6:
Auto merged
client/mysqlbinlog.cc:
Auto merged
client/mysqldump.c:
Auto merged
include/mysql.h:
Auto merged
mysql-test/t/disabled.def:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/ha_ndbcluster_binlog.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/item.h:
Auto merged
sql/log.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/table.cc:
Auto merged
sql/sql_parse.cc:
merge fix
sql/sql_select.cc:
merge fix
New server (as of 5.1.21) provides new features:
- SHOW CREATE TRIGGER;
- character set information for SHOW TRIGGERS and SHOW CREATE
EVENT | FUNCTION | PROCEDURE statements.
Mysqldump uses these features to generate proper dump.
The bug happened when new mysqldump was used to dump older servers.
The problem was that 5.1.21 new features are not available, so
mysqldump exited with error code or just crashed.
The fix is to detect if mysqldump has ben run against older server
and don't use new 5.1.21 functionality in this case. Certainly,
the dump generated for the older server suffers from the character
set problems fixed by BUG#16291 and the like.
client/mysqldump.c:
Don't use new server features if they are not available.
New server (as of 5.1.21) provides new features:
- SHOW CREATE TRIGGER;
- character set information for SHOW TRIGGERS and SHOW CREATE
EVENT | FUNCTION | PROCEDURE statements.
Mysqldump uses these features to generate proper dump.
The bug happened when new mysqldump was used to dump older servers.
The problem was that 5.1.21 new features are not available, so
mysqldump exited with error code or just crashed.
The fix is to detect if mysqldump has ben run against older server
and don't use new 5.1.21 functionality in this case. Certainly,
the dump generated for the older server suffers from the character
set problems fixed by BUG#16291 and the like.
client/mysqldump.c:
table type compare is changed to case insensitive
mysql-test/r/information_schema.result:
test result
mysql-test/r/information_schema_db.result:
result fix
mysql-test/suite/ndb/r/ndb_alter_table.result:
result fix
mysql-test/suite/ndb/r/ndb_temporary.result:
result fix
mysql-test/t/information_schema.test:
test case
sql/ha_ndbcluster.cc:
char* variables are changed to LEX_STRING
sql/ha_ndbcluster.h:
char* variables are changed to LEX_STRING
sql/ha_ndbcluster_binlog.cc:
char* variables are changed to LEX_STRING
sql/handler.cc:
char* variables are changed to LEX_STRING
sql/handler.h:
char* variables are changed to LEX_STRING
sql/sql_base.cc:
Modified functions which are used during open table process
according to table opening method and requested_object.
sql/sql_select.cc:
Add support for I_S tables into select_describe() function
sql/sql_show.cc:
1. Added initialization of 'open_method' to 'st_field_info' structs.
2. Added initialization of 'i_s_requested_object' to 'ST_SCHEMA_TABLE' structs.
3. New function which calculates database name and table name values
from 'where' condition if it's possible
void get_lookup_field_values(THD *thd, COND *cond, TABLE_LIST *table,
LOOKUP_FIELD_VALUES *lookup_field_vals);
4. New function which set table open method
setup_table_open_method(TABLE_LIST *tables,
ST_SCHEMA_TABLE *schema_table,
enum enum_schema_tables schema_table_idx)
5. New function
int make_db_list(THD *thd, List<LEX_STRING> *files,
LOOKUP_FIELD_VALUES *lookup_field_vals,
bool *with_i_schema)
6. New function
int make_table_name_list(THD *thd, List<LEX_STRING> *files, LEX *lex,
LOOKUP_FIELD_VALUES *lookup_field_vals,
bool with_i_schema, LEX_STRING *db_name)
7. Modified 'get_all_tables' function according to new schema(see wl#3732).
sql/sql_show.h:
char* variables are changed to LEX_STRING
sql/table.cc:
Modified functions which are used during open table process
according to table opening method and requested_object.
sql/table.h:
1. added new constants(open_method)
#define SKIP_OPEN_TABLE 0
#define OPEN_FRM_ONLY 1
#define OPEN_FULL_TABLE 2
2. Added new field 'open_method' into struct st_field_info;
uint open_method;
3. Added new field into ST_SCHEMA_TABLE struct
uint i_s_requested_object; /* the object we need to open(TABLE | VIEW) */.
4. Added new field to TABLE_LIST struct.
uint i_s_requested_object;
This field is set from ST_SCHEMA_TABLE.i_s_requested_object
for processed table before opening.
5. Added new fields to TABLE_LIST struct, used for 'explain select' for I_S table
bool has_db_lookup_value;
bool has_table_lookup_value;
uint table_open_method;
sql/unireg.h:
added new constants
into mysql.com:/home/my/mysql-5.1
client/client_priv.h:
Auto merged
client/mysqldump.c:
Auto merged
client/mysqlslap.c:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/lib/mtr_report.pl:
Auto merged
mysql-test/t/disabled.def:
Auto merged
sql/event_data_objects.cc:
Auto merged
sql/event_queue.cc:
Auto merged
sql/ha_partition.cc:
Auto merged
sql/lock.cc:
Auto merged
sql/log.cc:
Auto merged
sql/log.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/set_var.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_plugin.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql-common/client.c:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_cache.cc:
Manual merge
Removed comment about bug in old code (not relevant)
Fixed bug in query cache that made it impossible to run mysqld with --debug
Fixed memory leaks in mysqldump and mysqltest
Memory leaks associated with wrong usage of mysqltest is not fixed. To find these, run
mysql-test-run --debug mysqltest
client/mysql_upgrade.c:
Set --debug-check if one uses DBUG_PUSH
client/mysqlcheck.c:
Set --debug-check if one uses DBUG_PUSH
client/mysqldump.c:
Set --debug-check if one uses DBUG_PUSH
Fixed several memory leaks
client/mysqlimport.c:
Set --debug-check if one uses DBUG_PUSH
client/mysqlshow.c:
Set --debug-check if one uses DBUG_PUSH
client/mysqlslap.c:
Set --debug-check if one uses DBUG_PUSH
client/mysqltest.c:
Set --debug-check if one uses DBUG_PUSH
Fixed some memory leaks
Removed MY_CHECK_ERROR argument to my_end() as mysqltest.test otherwise shows MANY memory leaks
dbug/dbug.c:
Fixed compiler warning
Force flush of out_file on end
Removed some wrong dbug_flush(0) commands that could cause crashes
mysys/my_init.c:
Don't write memory usage if MY_GIVE_INFO is not given
sql/sql_cache.cc:
Fixed bug in query cache that made it impossible to run mysqld with --debug
Fixed bug in query cache that made it impossible to run mysqld with --debug
Fixed memory leaks in mysqldump and mysqltest
Memory leaks associated with wrong usage of mysqltest is not fixed. To find these, run
mysql-test-run --debug mysqltest
Fixed compiler warnings, errors and link errors
Fixed new bug on Solaris with gethrtime()
Added --debug-check option to all mysql clients to print errors and memory leaks
Added --debug-info to all clients. This now works as --debug-check but also prints memory and cpu usage
BUILD/compile-solaris-sparc-debug:
Remove old cpu options
client/client_priv.h:
Added OPT_DBUG_CHECK
client/mysql.cc:
--debug-info now prints memory usage
Added --debug-check
client/mysql_upgrade.c:
--debug-info now prints memory usage
Added --debug-check
client/mysqladmin.cc:
--debug-info now prints memory usage
Added --debug-check
client/mysqlbinlog.cc:
--debug-info now prints memory usage
Added --debug-check
client/mysqlcheck.c:
--debug-info now prints memory usage
Added --debug-check
client/mysqldump.c:
--debug-info now prints memory usage
Added --debug-check
client/mysqlimport.c:
--debug-info now prints memory usage
Added --debug-check
client/mysqlshow.c:
--debug-info now prints memory usage
Added --debug-check
client/mysqlslap.c:
--debug-info now prints memory usage
Added --debug-check
client/mysqltest.c:
--debug-info now prints memory usage
Added --debug-check
include/my_sys.h:
Added extra option to TERMINATE to not print statistics
libmysql/libmysql.c:
Fixed compiler warning
mysql-test/mysql-test-run.pl:
--debug-info -> --debug-check to not print memory usage
mysys/my_getsystime.c:
Moved fast time calculation to my_micro_time_and_time()
Fixed bug in previous push related to HAVE_GETHRTIME
mysys/my_init.c:
Print not freed memory in my_end() if MY_CHECK_ERROR is given
mysys/my_static.c:
Cleanup
mysys/safemalloc.c:
Added extra option to TERMINATE to not print statistics
sql/item_xmlfunc.cc:
Fixed compiler warning
sql/sql_test.cc:
Fixed TERMINATE() call
unittest/mysys/base64-t.c:
Fixed link error
unittest/mysys/bitmap-t.c:
Fixed link error
unittest/mysys/my_atomic-t.c:
Fixed link error
Fixed compiler warnings, errors and link errors
Fixed new bug on Solaris with gethrtime()
Added --debug-check option to all mysql clients to print errors and memory leaks
Added --debug-info to all clients. This now works as --debug-check but also prints memory and cpu usage
into bodhi.(none):/opt/local/work/mysql-5.0-runtime
client/mysqldump.c:
Auto merged
mysql-test/r/mysqldump.result:
Auto merged
sql/sql_base.cc:
Auto merged
sql/table.cc:
Auto merged
mysql-test/r/innodb_mysql.result:
Manual merge.
mysql-test/t/innodb_mysql.test:
Manual merge.
sql/sql_table.cc:
Manual merge.
into weblab.(none):/home/marcsql/TREE/mysql-5.1-25422-d
client/mysqldump.c:
Auto merged
mysql-test/r/log_state.result:
Auto merged
mysql-test/r/show_check.result:
Auto merged
mysql-test/t/show_check.test:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/share/errmsg.txt:
Auto merged
sql/sp.cc:
Auto merged
into ibm.:/home/alik/Documents/MySQL/devel/5.1-rt-merge
mysql-test/r/mysqldump-max.result:
Auto merged
mysql-test/r/openssl_1.result:
Auto merged
mysql-test/t/show_check.test:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
client/mysqldump.c:
Manual merge.
mysql-test/r/mysqldump.result:
Manual merge + use local.
mysqldump generates view defitions in two stages:
- dump CREATE TABLE statements for the temporary tables. For each view a
temporary table, that has the same structure as the view is created.
- dump DROP TABLE statements for the temporary tables and CREATE VIEW
statements for the view.
This approach is required because views can have dependencies on each other
(a view can use other views). So, they should be created in the particular
order. mysqldump however is not smart enough, so in order to resolve
dependencies it creates temporary tables first of all.
The problem was that mysqldump might have generated incorrect dump for the
temporary table when a view has non-ASCII column name. That happened when
default-character-set is not utf8.
The fix is to:
1. Switch character_set_client for the mysqldump's connection to binary
before issuing SHOW FIELDS statement in order to avoid conversion.
2. Dump switch character_set_client statements to UTF8 and back for
CREATE TABLE statement that is issued to create temporary table.
client/mysqldump.c:
1. Switch character_set_results for mysqldump's connection to
binary before SHOW FIELDS in order to avoid conversion to client
character set.
2. Dump switch character_set_client statements to UTF8 and back
for CREATE TABLE statement.
mysql-test/r/mysqldump.result:
Update result file.
mysql-test/t/mysqldump.test:
Test case for BUG#30027.
mysqldump generates view defitions in two stages:
- dump CREATE TABLE statements for the temporary tables. For each view a
temporary table, that has the same structure as the view is created.
- dump DROP TABLE statements for the temporary tables and CREATE VIEW
statements for the view.
This approach is required because views can have dependencies on each other
(a view can use other views). So, they should be created in the particular
order. mysqldump however is not smart enough, so in order to resolve
dependencies it creates temporary tables first of all.
The problem was that mysqldump might have generated incorrect dump for the
temporary table when a view has non-ASCII column name. That happened when
default-character-set is not utf8.
The fix is to:
1. Switch character_set_client for the mysqldump's connection to binary
before issuing SHOW FIELDS statement in order to avoid conversion.
2. Dump switch character_set_client statements to UTF8 and back for
CREATE TABLE statement that is issued to create temporary table.
Bug#25422 (Hang with log tables)
Bug 17876 (Truncating mysql.slow_log in a SP after using cursor locks the
thread)
Bug 23044 (Warnings on flush of a log table)
Bug 29129 (Resetting general_log while the GLOBAL READ LOCK is set causes
a deadlock)
Prior to this fix, the server would hang when performing concurrent
ALTER TABLE or TRUNCATE TABLE statements against the LOG TABLES,
which are mysql.general_log and mysql.slow_log.
The root cause traces to the following code:
in sql_base.cc, open_table()
if (table->in_use != thd)
{
/* wait_for_condition will unlock LOCK_open for us */
wait_for_condition(thd, &LOCK_open, &COND_refresh);
}
The problem with this code is that the current implementation of the
LOGGER creates 'fake' THD objects, like
- Log_to_csv_event_handler::general_log_thd
- Log_to_csv_event_handler::slow_log_thd
which are not associated to a real thread running in the server,
so that waiting for these non-existing threads to release table locks
cause the dead lock.
In general, the design of Log_to_csv_event_handler does not fit into the
general architecture of the server, so that the concept of general_log_thd
and slow_log_thd has to be abandoned:
- this implementation does not work with table locking
- it will not work with commands like SHOW PROCESSLIST
- having the log tables always opened does not integrate well with DDL
operations / FLUSH TABLES / SET GLOBAL READ_ONLY
With this patch, the fundamental design of the LOGGER has been changed to:
- always open and close a log table when writing a log
- remove totally the usage of fake THD objects
- clarify how locking of log tables is implemented in general.
See WL#3984 for details related to the new locking design.
Additional changes (misc bugs exposed and fixed):
1)
mysqldump which would ignore some tables in dump_all_tables_in_db(),
but forget to ignore the same in dump_all_views_in_db().
2)
mysqldump would also issue an empty "LOCK TABLE" command when all the tables
to lock are to be ignored (numrows == 0), instead of not issuing the query.
3)
Internal errors handlers could intercept errors but not warnings
(see sql_error.cc).
4)
Implementing a nested call to open tables, for the performance schema tables,
exposed an existing bug in remove_table_from_cache(), which would perform:
in_use->some_tables_deleted=1;
against another thread, without any consideration about thread locking.
This call inside remove_table_from_cache() was not required anyway,
since calling mysql_lock_abort() takes care of aborting -- cleanly -- threads
that might hold a lock on a table.
This line (in_use->some_tables_deleted=1) has been removed.
sql/handler.cc:
Moved logic for system / log tables in the SQL layer.
sql/handler.h:
Moved logic for system / log tables in the SQL layer.
sql/lock.cc:
Revised locking of log tables
sql/log.cc:
Major cleanup: changed how log tables are locked / written to.
sql/log.h:
Major cleanup: changed how log tables are locked / written to.
sql/mysql_priv.h:
performance schema helpers
sql/slave.cc:
open_ltable() lock flags
sql/sp.cc:
open_ltable() lock flags
sql/sql_acl.cc:
open_ltable() lock flags
sql/sql_class.h:
performance schema helpers
sql/sql_delete.cc:
log tables cleanup in TRUNCATE
sql/sql_error.cc:
Internal handlers can also intercept warnings
sql/sql_insert.cc:
open_ltable() lock flags
sql/sql_parse.cc:
performance schema helpers
sql/sql_plugin.cc:
open_ltable() lock flags
sql/sql_rename.cc:
log tables cleanup in RENAME
sql/sql_servers.cc:
open_ltable() lock flags
sql/sql_show.cc:
Move INFORMATION_SCHEMA_NAME to table.cc
sql/sql_table.cc:
log tables cleanup (admin operations, ALTER TABLE)
sql/sql_udf.cc:
open_ltable() lock flags
sql/table.cc:
Implemented TABLE_CATEGORY.
sql/share/errmsg.txt:
Changed the wording and name of ER_CANT_READ_LOCK_LOG_TABLE
sql/table.h:
Implemented TABLE_CATEGORY.
storage/csv/ha_tina.cc:
Moved logic for system / log tables in the SQL layer.
storage/csv/ha_tina.h:
Moved logic for system / log tables in the SQL layer.
storage/myisam/ha_myisam.cc:
Moved logic for system / log tables in the SQL layer.
storage/myisam/ha_myisam.h:
Moved logic for system / log tables in the SQL layer.
client/mysqldump.c:
Don't lock tables in the ignore list.
Don't issue empty LOCK TABLES queries.
sql/sql_base.cc:
log tables cleanup
performance schema helpers
mysql-test/r/ps.result:
Adjust test results
mysql-test/r/show_check.result:
Adjust test results
mysql-test/r/status.result:
Adjust test results
mysql-test/t/log_state.test:
Added tests for Bug#29129
mysql-test/t/ps.test:
Make the test output deterministic
mysql-test/t/show_check.test:
Make the test output deterministic
mysql-test/r/log_state.result:
Changed the default location of the log output to LOG_FILE,
for backward compatibility with MySQL 5.0
---
Adjust test results
mysql-test/r/log_tables.result:
cleanup for -ps-protocol
mysql-test/t/log_tables.test:
cleanup for -ps-protocol
sql/set_var.cc:
Changed the default location of the log output to LOG_FILE,
for backward compatibility with MySQL 5.0
---
log tables cleanup
Bug#25422 (Hang with log tables)
Bug 17876 (Truncating mysql.slow_log in a SP after using cursor locks the
thread)
Bug 23044 (Warnings on flush of a log table)
Bug 29129 (Resetting general_log while the GLOBAL READ LOCK is set causes
a deadlock)
Prior to this fix, the server would hang when performing concurrent
ALTER TABLE or TRUNCATE TABLE statements against the LOG TABLES,
which are mysql.general_log and mysql.slow_log.
The root cause traces to the following code:
in sql_base.cc, open_table()
if (table->in_use != thd)
{
/* wait_for_condition will unlock LOCK_open for us */
wait_for_condition(thd, &LOCK_open, &COND_refresh);
}
The problem with this code is that the current implementation of the
LOGGER creates 'fake' THD objects, like
- Log_to_csv_event_handler::general_log_thd
- Log_to_csv_event_handler::slow_log_thd
which are not associated to a real thread running in the server,
so that waiting for these non-existing threads to release table locks
cause the dead lock.
In general, the design of Log_to_csv_event_handler does not fit into the
general architecture of the server, so that the concept of general_log_thd
and slow_log_thd has to be abandoned:
- this implementation does not work with table locking
- it will not work with commands like SHOW PROCESSLIST
- having the log tables always opened does not integrate well with DDL
operations / FLUSH TABLES / SET GLOBAL READ_ONLY
With this patch, the fundamental design of the LOGGER has been changed to:
- always open and close a log table when writing a log
- remove totally the usage of fake THD objects
- clarify how locking of log tables is implemented in general.
See WL#3984 for details related to the new locking design.
Additional changes (misc bugs exposed and fixed):
1)
mysqldump which would ignore some tables in dump_all_tables_in_db(),
but forget to ignore the same in dump_all_views_in_db().
2)
mysqldump would also issue an empty "LOCK TABLE" command when all the tables
to lock are to be ignored (numrows == 0), instead of not issuing the query.
3)
Internal errors handlers could intercept errors but not warnings
(see sql_error.cc).
4)
Implementing a nested call to open tables, for the performance schema tables,
exposed an existing bug in remove_table_from_cache(), which would perform:
in_use->some_tables_deleted=1;
against another thread, without any consideration about thread locking.
This call inside remove_table_from_cache() was not required anyway,
since calling mysql_lock_abort() takes care of aborting -- cleanly -- threads
that might hold a lock on a table.
This line (in_use->some_tables_deleted=1) has been removed.
binary SHOW CREATE TABLE or SELECT FROM I_S.
The problem is that mysqldump generates incorrect dump for a table
with non-ASCII column name if the mysqldump's character set is
ASCII.
The fix is to:
1. Switch character_set_client for the mysqldump's connection
to binary before issuing SHOW CREATE TABLE statement in order
to avoid conversion.
2. Dump switch character_set_client statements to UTF8 and back
for CREATE TABLE statement.
client/mysqldump.c:
1. Switch character_set_client for the mysqldump's connection
to binary before issuing SHOW CREATE TABLE statement in order
to avoid conversion.
2. Dump switch character_set_client statements to UTF8 and back
for CREATE TABLE statement.
mysql-test/r/mysqldump-max.result:
Update result file.
mysql-test/r/mysqldump.result:
Update result file.
mysql-test/r/openssl_1.result:
Update result file.
mysql-test/r/show_check.result:
Update result file.
mysql-test/t/show_check.test:
Test case:
- create a table with non-ASCII column name;
- dump the database by mysqldump using ASCII character set;
- drop the database;
- load the dump;
- check that the table has been re-created properly.
binary SHOW CREATE TABLE or SELECT FROM I_S.
The problem is that mysqldump generates incorrect dump for a table
with non-ASCII column name if the mysqldump's character set is
ASCII.
The fix is to:
1. Switch character_set_client for the mysqldump's connection
to binary before issuing SHOW CREATE TABLE statement in order
to avoid conversion.
2. Dump switch character_set_client statements to UTF8 and back
for CREATE TABLE statement.
After dumping triggers mysqldump copied
the value of the OLD_SQL_MODE variable to the SQL_MODE
variable. If the --compact option of the mysqldump was
not set the OLD_SQL_MODE variable had the value
of the uninitialized SQL_MODE variable. So
usually the NO_AUTO_VALUE_ON_ZERO option of the
SQL_MODE variable was discarded.
This fix is for non-"--compact" mode of the mysqldump,
because mysqldump --compact never set SQL_MODE to the
value of NO_AUTO_VALUE_ON_ZERO.
The dump_triggers_for_table function has been modified
to restore previous value of the SQL_MODE variable after
dumping triggers using the SAVE_SQL_MODE temporary
variable.
client/mysqldump.c:
Fixed bug #29788.
The dump_triggers_for_table function has been modified
to restore previous value of the SQL_MODE variable after
dumping triggers using the SAVE_SQL_MODE temporary
variable.
mysql-test/r/mysqldump.result:
Updated test case for bug #29788.
mysql-test/t/mysqldump.test:
Updated test case for bug #29788.
After dumping triggers mysqldump copied
the value of the OLD_SQL_MODE variable to the SQL_MODE
variable. If the --compact option of the mysqldump was
not set the OLD_SQL_MODE variable had the value
of the uninitialized SQL_MODE variable. So
usually the NO_AUTO_VALUE_ON_ZERO option of the
SQL_MODE variable was discarded.
This fix is for non-"--compact" mode of the mysqldump,
because mysqldump --compact never set SQL_MODE to the
value of NO_AUTO_VALUE_ON_ZERO.
The dump_triggers_for_table function has been modified
to restore previous value of the SQL_MODE variable after
dumping triggers using the SAVE_SQL_MODE temporary
variable.
into gleb.loc:/home/uchum/work/bk/5.1-opt
client/mysqldump.c:
Auto merged
include/my_base.h:
Auto merged
mysql-test/include/mix1.inc:
Auto merged
mysql-test/r/innodb_mysql.result:
Auto merged
mysql-test/t/disabled.def:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_update.cc:
Auto merged
storage/myisam/ha_myisam.cc:
Auto merged
into gleb.loc:/home/uchum/work/bk/5.1-opt
client/mysqldump.c:
Auto merged
mysql-test/t/mysqldump.test:
Auto merged
mysql-test/r/mysqldump.result:
Merge with 5.0-opt.
For each view the mysqldump utility creates a temporary table
with the same name and the same columns as the view
in order to satisfy views that depend on this view.
After the creation of all tables, mysqldump drops all
temporary tables and creates actual views.
However, --skip-add-drop-table and --compact flags disable
DROP TABLE statements for those temporary tables. Thus, it was
impossible to create the views because of existence of the
temporary tables with the same names.
client/mysqldump.c:
Fixed bug #28524.
The mysqldump utility has been modified to unconditionally drop
temporary tables before the creation of views.
mysql-test/t/mysqldump.test:
Updated test case for bug #28524 and updated result of previous tests.
mysql-test/r/mysqldump.result:
Updated test case for bug #28524 and updated result of previous tests.
For each view the mysqldump utility creates a temporary table
with the same name and the same columns as the view
in order to satisfy views that depend on this view.
After the creation of all tables, mysqldump drops all
temporary tables and creates actual views.
However, --skip-add-drop-table and --compact flags disable
DROP TABLE statements for those temporary tables. Thus, it was
impossible to create the views because of existence of the
temporary tables with the same names.
into bodhi.(none):/opt/local/work/mysql-5.1-runtime
client/mysqldump.c:
Auto merged
mysql-test/r/show_check.result:
Auto merged
mysql-test/t/show_check.test:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_cache.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/share/errmsg.txt:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_show.cc:
Auto merged
mysql-test/r/events_bugs.result:
Manual merge.
SHOW CREATE TABLE or SELECT FROM I_S.
This is the last patch for this bug, which depends on the big
CS patch and was pending.
The problem was that SHOW CREATE statements returned original
queries in the binary character set. That could cause the query
to be unreadable.
The fix is to use original character_set_client when sending
the original query to the client. In order to preserve the query
in mysqldump, 'binary' character set results should be set when
issuing SHOW CREATE statement. If either source or destination
character set is 'binary' , no conversion is performed.
The idea is that since the source character set is no longer
'binary', we fix the destination character set to still produce
valid dumps.
client/mysqldump.c:
Switch character_set_results of mysqldump-connection before
calling SHOW CREATE statements for the objects.
mysql-test/r/show_check.result:
Result file.
mysql-test/t/show_check.test:
Add test case for the part of BUG#10491.
sql/events.cc:
Send original query in the original character set.
sql/sp_head.cc:
Send original query in the original character set.
sql/sql_show.cc:
Send original query in the original character set.
SHOW CREATE TABLE or SELECT FROM I_S.
This is the last patch for this bug, which depends on the big
CS patch and was pending.
The problem was that SHOW CREATE statements returned original
queries in the binary character set. That could cause the query
to be unreadable.
The fix is to use original character_set_client when sending
the original query to the client. In order to preserve the query
in mysqldump, 'binary' character set results should be set when
issuing SHOW CREATE statement. If either source or destination
character set is 'binary' , no conversion is performed.
The idea is that since the source character set is no longer
'binary', we fix the destination character set to still produce
valid dumps.
into maint1.mysql.com:/data/localhome/tsmith/bk/maint/51
client/mysqldump.c:
Auto merged
mysql-test/lib/mtr_cases.pl:
Auto merged
mysql-test/lib/mtr_report.pl:
Auto merged
mysql-test/r/mysqldump.result:
Auto merged
mysql-test/suite/binlog/r/binlog_multi_engine.result:
Auto merged
mysql-test/suite/binlog/t/binlog_multi_engine.test:
Auto merged
mysql-test/suite/ndb/r/ndb_read_multi_range.result:
Auto merged
mysql-test/suite/ndb/r/ndb_sp.result:
Auto merged
mysql-test/suite/ndb/r/ndb_trigger.result:
Auto merged
mysql-test/suite/ndb/r/ps_7ndb.result:
Auto merged
mysql-test/suite/ndb/t/loaddata_autocom_ndb.test:
Auto merged
mysql-test/suite/ndb/t/ndb_alter_table.test:
Auto merged
mysql-test/suite/ndb/t/ndb_alter_table2.test:
Auto merged
mysql-test/suite/ndb/t/ndb_alter_table3.test:
Auto merged
mysql-test/suite/ndb/t/ndb_autodiscover.test:
Auto merged
mysql-test/suite/ndb/t/ndb_autodiscover2.test:
Auto merged
mysql-test/suite/ndb/t/ndb_autodiscover3.test:
Auto merged
mysql-test/suite/ndb/t/ndb_basic.test:
Auto merged
mysql-test/suite/ndb/t/ndb_binlog_ddl_multi.test:
Auto merged
mysql-test/suite/ndb/t/ndb_binlog_log_bin.test:
Auto merged
mysql-test/suite/ndb/t/ndb_binlog_multi.test:
Auto merged
mysql-test/suite/ndb/t/ndb_bitfield.test:
Auto merged
mysql-test/suite/ndb/t/ndb_blob.test:
Auto merged
mysql-test/suite/ndb/t/ndb_blob_partition.test:
Auto merged
mysql-test/suite/ndb/t/ndb_cache.test:
Auto merged
mysql-test/suite/ndb/t/ndb_cache2.test:
Auto merged
mysql-test/suite/ndb/t/ndb_cache_multi.test:
Auto merged
mysql-test/suite/ndb/t/ndb_cache_multi2.test:
Auto merged
mysql-test/suite/ndb/t/ndb_charset.test:
Auto merged
mysql-test/suite/ndb/t/ndb_condition_pushdown.test:
Auto merged
mysql-test/suite/ndb/t/ndb_config.test:
Auto merged
mysql-test/suite/ndb/t/ndb_config2.test:
Auto merged
mysql-test/suite/ndb/t/ndb_cursor.test:
Auto merged
mysql-test/suite/ndb/t/ndb_database.test:
Auto merged
mysql-test/suite/ndb/t/ndb_dd_alter.test:
Auto merged
mysql-test/suite/ndb/t/ndb_dd_backuprestore.test:
Auto merged
mysql-test/suite/ndb/t/ndb_dd_basic.test:
Auto merged
mysql-test/suite/ndb/t/ndb_dd_ddl.test:
Auto merged
mysql-test/suite/ndb/t/ndb_dd_disk2memory.test:
Auto merged
mysql-test/suite/ndb/t/ndb_dd_dump.test:
Auto merged
mysql-test/suite/ndb/t/ndb_dd_sql_features.test:
Auto merged
mysql-test/suite/ndb/t/ndb_gis.test:
Auto merged
mysql-test/suite/ndb/t/ndb_index.test:
Auto merged
mysql-test/suite/ndb/t/ndb_index_ordered.test:
Auto merged
mysql-test/suite/ndb/t/ndb_index_unique.test:
Auto merged
mysql-test/suite/ndb/t/ndb_insert.test:
Auto merged
mysql-test/suite/ndb/t/ndb_limit.test:
Auto merged
mysql-test/suite/ndb/t/ndb_loaddatalocal.test:
Auto merged
mysql-test/suite/ndb/t/ndb_lock.test:
Auto merged
mysql-test/suite/ndb/t/ndb_minmax.test:
Auto merged
mysql-test/suite/ndb/t/ndb_multi.test:
Auto merged
mysql-test/suite/ndb/t/ndb_partition_error.test:
Auto merged
mysql-test/suite/ndb/t/ndb_partition_key.test:
Auto merged
mysql-test/suite/ndb/t/ndb_partition_list.test:
Auto merged
mysql-test/suite/ndb/t/ndb_partition_range.test:
Auto merged
mysql-test/suite/ndb/t/ndb_read_multi_range.test:
Auto merged
mysql-test/suite/ndb/t/ndb_rename.test:
Auto merged
mysql-test/suite/ndb/t/ndb_replace.test:
Auto merged
mysql-test/suite/ndb/t/ndb_restore.test:
Auto merged
mysql-test/suite/ndb/t/ndb_restore_partition.test:
Auto merged
mysql-test/suite/ndb/t/ndb_restore_print.test:
Auto merged
mysql-test/suite/ndb/t/ndb_row_format.test:
Auto merged
mysql-test/suite/ndb/t/ndb_single_user.test:
Auto merged
mysql-test/suite/ndb/t/ndb_sp.test:
Auto merged
mysql-test/suite/ndb/t/ndb_subquery.test:
Auto merged
mysql-test/suite/ndb/t/ndb_temporary.test:
Auto merged
mysql-test/suite/ndb/t/ndb_transaction.test:
Auto merged
mysql-test/suite/ndb/t/ndb_trigger.test:
Auto merged
mysql-test/suite/ndb/t/ndb_truncate.test:
Auto merged
mysql-test/suite/ndb/t/ndb_types.test:
Auto merged
mysql-test/suite/ndb/t/ndb_update.test:
Auto merged
mysql-test/suite/ndb/t/ndb_view.test:
Auto merged
mysql-test/suite/ndb/t/ndbapi.test:
Auto merged
mysql-test/suite/ndb/t/ps_7ndb.test:
Auto merged
mysql-test/suite/ndb/t/strict_autoinc_5ndb.test:
Auto merged
mysql-test/suite/rpl/r/rpl_events.result:
Auto merged
mysql-test/suite/rpl/r/rpl_replicate_do.result:
Auto merged
mysql-test/suite/rpl/r/rpl_row_UUID.result:
Auto merged
mysql-test/suite/rpl/r/rpl_sp.result:
Auto merged
mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result:
Auto merged
mysql-test/suite/rpl/r/rpl_trigger.result:
Auto merged
mysql-test/suite/rpl/r/rpl_view.result:
Auto merged
mysql-test/suite/rpl_ndb/r/rpl_ndb_UUID.result:
Auto merged
mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_advance.result:
Auto merged
mysql-test/suite/rpl_ndb/r/rpl_ndb_stm_innodb.result:
Auto merged
mysql-test/suite/rpl_ndb/t/rpl_ndb_commit_afterflush.test:
Auto merged
mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_advance.test:
Auto merged
mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans.test:
Auto merged
mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb-master.opt:
Auto merged
mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/Makefile.am:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_class.h:
Auto merged
mysql-test/t/disabled.def:
manual merge
(Will need to follow up with moving a few test cases around post-merge)
1. Fix ddl_i18n_koi8r, ddl_i18n_utf8: explicitly specify character-sets
directory for mysqldump;
2. Fix crash in mysqldump if collation is not found;
3. Use proper way to compare character set names.
client/mysqldump.c:
Prevent crash if collation does not exist.
mysql-test/t/ddl_i18n_koi8r.test:
Explicitly specify character-sets-directory for mysqldump.
mysql-test/t/ddl_i18n_utf8.test:
Explicitly specify character-sets-directory for mysqldump.
sql/sql_lex.cc:
Use my_charset_same() function to check if the charset names are equal.
1. Fix ddl_i18n_koi8r, ddl_i18n_utf8: explicitly specify character-sets
directory for mysqldump;
2. Fix crash in mysqldump if collation is not found;
3. Use proper way to compare character set names.
- BUG#11986: Stored routines and triggers can fail if the code
has a non-ascii symbol
- BUG#16291: mysqldump corrupts string-constants with non-ascii-chars
- BUG#19443: INFORMATION_SCHEMA does not support charsets properly
- BUG#21249: Character set of SP-var can be ignored
- BUG#25212: Character set of string constant is ignored (stored routines)
- BUG#25221: Character set of string constant is ignored (triggers)
There were a few general problems that caused these bugs:
1. Character set information of the original (definition) query for views,
triggers, stored routines and events was lost.
2. mysqldump output query in client character set, which can be
inappropriate to encode definition-query.
3. INFORMATION_SCHEMA used strings with mixed encodings to display object
definition;
1. No query-definition-character set.
In order to compile query into execution code, some extra data (such as
environment variables or the database character set) is used. The problem
here was that this context was not preserved. So, on the next load it can
differ from the original one, thus the result will be different.
The context contains the following data:
- client character set;
- connection collation (character set and collation);
- collation of the owner database;
The fix is to store this context and use it each time we parse (compile)
and execute the object (stored routine, trigger, ...).
2. Wrong mysqldump-output.
The original query can contain several encodings (by means of character set
introducers). The problem here was that we tried to convert original query
to the mysqldump-client character set.
Moreover, we stored queries in different character sets for different
objects (views, for one, used UTF8, triggers used original character set).
The solution is
- to store definition queries in the original character set;
- to change SHOW CREATE statement to output definition query in the
binary character set (i.e. without any conversion);
- introduce SHOW CREATE TRIGGER statement;
- to dump special statements to switch the context to the original one
before dumping and restore it afterwards.
Note, in order to preserve the database collation at the creation time,
additional ALTER DATABASE might be used (to temporary switch the database
collation back to the original value). In this case, ALTER DATABASE
privilege will be required. This is a backward-incompatible change.
3. INFORMATION_SCHEMA showed non-UTF8 strings
The fix is to generate UTF8-query during the parsing, store it in the object
and show it in the INFORMATION_SCHEMA.
Basically, the idea is to create a copy of the original query convert it to
UTF8. Character set introducers are removed and all text literals are
converted to UTF8.
This UTF8 query is intended to provide user-readable output. It must not be
used to recreate the object. Specialized SHOW CREATE statements should be
used for this.
The reason for this limitation is the following: the original query can
contain symbols from several character sets (by means of character set
introducers).
Example:
- original query:
CREATE VIEW v1 AS SELECT _cp1251 'Hello' AS c1;
- UTF8 query (for INFORMATION_SCHEMA):
CREATE VIEW v1 AS SELECT 'Hello' AS c1;
client/mysqldump.c:
Set original character set and collation before dumping definition query.
include/my_sys.h:
Move out-parameter to the end of list.
mysql-test/lib/mtr_report.pl:
Ignore server-warnings during the test case.
mysql-test/r/create.result:
Update result file.
mysql-test/r/ctype_cp932_binlog_stm.result:
Update result file.
mysql-test/r/events.result:
Update result file.
mysql-test/r/events_bugs.result:
Update result file.
mysql-test/r/events_grant.result:
Update result file.
mysql-test/r/func_in.result:
Update result file.
mysql-test/r/gis.result:
Update result file.
mysql-test/r/grant.result:
Update result file.
mysql-test/r/information_schema.result:
Update result file.
mysql-test/r/information_schema_db.result:
Update result file.
mysql-test/r/lowercase_view.result:
Update result file.
mysql-test/r/mysqldump.result:
Update result file.
mysql-test/r/ndb_sp.result:
Update result file.
mysql-test/r/ps.result:
Update result file.
mysql-test/r/rpl_replicate_do.result:
Update result file.
mysql-test/r/rpl_sp.result:
Update result file.
mysql-test/r/rpl_trigger.result:
Update result file.
mysql-test/r/rpl_view.result:
Update result file.
mysql-test/r/show_check.result:
Update result file.
mysql-test/r/skip_grants.result:
Update result file.
mysql-test/r/sp-destruct.result:
Update result file.
mysql-test/r/sp-error.result:
Update result file.
mysql-test/r/sp-security.result:
Update result file.
mysql-test/r/sp.result:
Update result file.
mysql-test/r/sql_mode.result:
Update result file.
mysql-test/r/system_mysql_db.result:
Update result file.
mysql-test/r/temp_table.result:
Update result file.
mysql-test/r/trigger-compat.result:
Update result file.
mysql-test/r/trigger-grant.result:
Update result file.
mysql-test/r/trigger.result:
Update result file.
mysql-test/r/view.result:
Update result file.
mysql-test/r/view_grant.result:
Update result file.
mysql-test/t/events.test:
Update test case (new columns added).
mysql-test/t/information_schema.test:
Update test case (new columns added).
mysql-test/t/show_check.test:
Test case for SHOW CREATE TRIGGER in prepared statements and
stored routines.
mysql-test/t/sp-destruct.test:
Update test case (new columns added).
mysql-test/t/sp.test:
Update test case (new columns added).
mysql-test/t/view.test:
Update test.
mysys/charset.c:
Move out-parameter to the end of list.
scripts/mysql_system_tables.sql:
Add new columns to mysql.proc and mysql.event.
scripts/mysql_system_tables_fix.sql:
Add new columns to mysql.proc and mysql.event.
sql/event_data_objects.cc:
Support new attributes for events.
sql/event_data_objects.h:
Support new attributes for events.
sql/event_db_repository.cc:
Support new attributes for events.
sql/event_db_repository.h:
Support new attributes for events.
sql/events.cc:
Add new columns to SHOW CREATE event resultset.
sql/mysql_priv.h:
1. Introduce Object_creation_ctx;
2. Introduce SHOW CREATE TRIGGER;
3. Introduce auxilary functions.
sql/sp.cc:
Add support for new store routines attributes.
sql/sp_head.cc:
Add support for new store routines attributes.
sql/sp_head.h:
Add support for new store routines attributes.
sql/sql_lex.cc:
Generate UTF8-body on parsing/lexing.
sql/sql_lex.h:
1. Generate UTF8-body on parsing/lexing.
2. Introduce SHOW CREATE TRIGGER.
sql/sql_parse.cc:
Introduce SHOW CREATE TRIGGER.
sql/sql_partition.cc:
Update parse_sql().
sql/sql_prepare.cc:
Update parse_sql().
sql/sql_show.cc:
Support new attributes for views
sql/sql_trigger.cc:
Support new attributes for views
sql/sql_trigger.h:
Support new attributes for views
sql/sql_view.cc:
Support new attributes for views
sql/sql_yacc.yy:
1. Add SHOW CREATE TRIGGER statement.
2. Generate UTF8-body for views, stored routines, triggers and events.
sql/table.cc:
Introduce Object_creation_ctx.
sql/table.h:
Introduce Object_creation_ctx.
sql/share/errmsg.txt:
Add new errors.
mysql-test/include/ddl_i18n.check_events.inc:
Aux file for test suite.
mysql-test/include/ddl_i18n.check_sp.inc:
Aux file for test suite.
mysql-test/include/ddl_i18n.check_triggers.inc:
Aux file for test suite.
mysql-test/include/ddl_i18n.check_views.inc:
Aux file for test suite.
mysql-test/include/have_cp1251.inc:
Aux file for test suite.
mysql-test/include/have_cp866.inc:
Aux file for test suite.
mysql-test/include/have_koi8r.inc:
Aux file for test suite.
mysql-test/include/have_utf8.inc:
Aux file for test suite.
mysql-test/r/ddl_i18n_koi8r.result:
Result file.
mysql-test/r/ddl_i18n_utf8.result:
Result file.
mysql-test/r/have_cp1251.require:
Aux file for test suite.
mysql-test/r/have_cp866.require:
Aux file for test suite.
mysql-test/r/have_koi8r.require:
Aux file for test suite.
mysql-test/r/have_utf8.require:
Aux file for test suite.
mysql-test/t/ddl_i18n_koi8r.test:
Complete koi8r test case for the CS patch.
mysql-test/t/ddl_i18n_utf8.test:
Complete utf8 test case for the CS patch.
- BUG#11986: Stored routines and triggers can fail if the code
has a non-ascii symbol
- BUG#16291: mysqldump corrupts string-constants with non-ascii-chars
- BUG#19443: INFORMATION_SCHEMA does not support charsets properly
- BUG#21249: Character set of SP-var can be ignored
- BUG#25212: Character set of string constant is ignored (stored routines)
- BUG#25221: Character set of string constant is ignored (triggers)
There were a few general problems that caused these bugs:
1. Character set information of the original (definition) query for views,
triggers, stored routines and events was lost.
2. mysqldump output query in client character set, which can be
inappropriate to encode definition-query.
3. INFORMATION_SCHEMA used strings with mixed encodings to display object
definition;
1. No query-definition-character set.
In order to compile query into execution code, some extra data (such as
environment variables or the database character set) is used. The problem
here was that this context was not preserved. So, on the next load it can
differ from the original one, thus the result will be different.
The context contains the following data:
- client character set;
- connection collation (character set and collation);
- collation of the owner database;
The fix is to store this context and use it each time we parse (compile)
and execute the object (stored routine, trigger, ...).
2. Wrong mysqldump-output.
The original query can contain several encodings (by means of character set
introducers). The problem here was that we tried to convert original query
to the mysqldump-client character set.
Moreover, we stored queries in different character sets for different
objects (views, for one, used UTF8, triggers used original character set).
The solution is
- to store definition queries in the original character set;
- to change SHOW CREATE statement to output definition query in the
binary character set (i.e. without any conversion);
- introduce SHOW CREATE TRIGGER statement;
- to dump special statements to switch the context to the original one
before dumping and restore it afterwards.
Note, in order to preserve the database collation at the creation time,
additional ALTER DATABASE might be used (to temporary switch the database
collation back to the original value). In this case, ALTER DATABASE
privilege will be required. This is a backward-incompatible change.
3. INFORMATION_SCHEMA showed non-UTF8 strings
The fix is to generate UTF8-query during the parsing, store it in the object
and show it in the INFORMATION_SCHEMA.
Basically, the idea is to create a copy of the original query convert it to
UTF8. Character set introducers are removed and all text literals are
converted to UTF8.
This UTF8 query is intended to provide user-readable output. It must not be
used to recreate the object. Specialized SHOW CREATE statements should be
used for this.
The reason for this limitation is the following: the original query can
contain symbols from several character sets (by means of character set
introducers).
Example:
- original query:
CREATE VIEW v1 AS SELECT _cp1251 'Hello' AS c1;
- UTF8 query (for INFORMATION_SCHEMA):
CREATE VIEW v1 AS SELECT 'Hello' AS c1;