Changed version string to beta
client/mysql.cc:
Fixed compiler warning
configure.in:
Changed version string to beta
plugin/auth/dialog.c:
Fixed compiler warning (gets() is a not recommended function)
Makefile.am:
add new API files to the check_abi rule,
remove duplicates
client/CMakeLists.txt:
now a client can use dlopen too
client/Makefile.am:
be csh-friendly
include/my_global.h:
add dummy plugs for dlopen and co.
for the code that needs them to work in static builds
mysys/Makefile.am:
be csh-friendly
plugin/auth/dialog.c:
typo fixed
When mysqlbinlog was given the --database=X flag, it always printed
'ROLLBACK TO', but the corresponding 'SAVEPOINT' statement was not
printed. The replicated filter(replicated-do/ignore-db) and binlog
filter (binlog-do/ignore-db) has the same problem. They are solved
in this patch together.
After this patch, We always check whether the query is 'SAVEPOINT'
statement or not. Because this is a literal check, 'SAVEPOINT' and
'ROLLBACK TO' statements are also binlogged in uppercase with no
any comments.
The binlog before this patch can be handled correctly except one case
that any comments are in front of the keywords. for example:
/* bla bla */ SAVEPOINT a;
/* bla bla */ ROLLBACK TO a;
mysql_upgrade was passing an non-initialized non-null tmpdir to create_temp_file() if no
--tmpdir was specified. This prevents create_temp_file() from taking the system
temporary file path and as a result mysql_upgrade was trying to open a file in a
directory that it may not have write access to.
Fixed by making sure mysql_upgrade will pass a zero length temp dir string to
create_temp_file() if no --tmpdir is specified.
The problem was that mysqltest could attempt to execute a
SHOW WARNINGS statement through a connection that was not
properly reaped, thus violating its own rules.
The solution is to skip SHOW WARNINGS if a connection has
not been properly repeaed.
client/mysqltest.cc:
Skip SHOW WARNINGS if connection hasn't been reaped.
I found three issues during the analysis:
1. Memory leak caused by temp_buf not being freed;
2. Memory leak caused when handling argv;
3. Conditional jump that depended on unitialized values.
Issue #1
--------
DESCRIPTION: when mysqlbinlog is reading from a remote location
the event temp_buf references the incoming stream (in NET
object), which is not freed by mysqlbinlog explicitly. On the
other hand, when it is reading local binary log, it points to a
temporary buffer that needs to be explicitly freed. For both
cases, the temp_buf was not freed by mysqlbinlog, instead was
set to 0. This clearly disregards the free required in the
second case, thence creating a memory leak.
FIX: we make temp_buf to be conditionally freed depending on
the value of remote_opt. Found out that similar fix is already
in most recent codebases.
Issue #2
--------
DESCRIPTION: load_defaults is called by parse_args, and it
reads default options from configuration files and put them
BEFORE the arguments that are already in argc and argv. This is
done resorting to MEM_ROOT. However, parse_args calls
handle_options immediately after which changes argv. Later when
freeing the defaults, pointers to MEM_ROOT won't match, causing
the memory not to be freed:
void free_defaults(char **argv)
{
MEM_ROOT ptr
memcpy_fixed((char*) &ptr,(char *) argv - sizeof(ptr), sizeof(ptr));
free_root(&ptr,MYF(0));
}
FIX: we remove load_defaults from parse_args and call it
before. Then we save argv with defaults in defaults_argv BEFORE
calling parse_args (which inside can then call handle_options
at will). Actually, found out that this is in fact kind of a
backport for BUG#38468 into 5.1, so I merged in the test case
as well and added error check for load_defaults call.
Fix based on:
revid:zhenxing.he@sun.com-20091002081840-uv26f0flw4uvo33y
Issue #3
--------
DESCRIPTION: the structure st_print_event_info constructor
would not initialize the sql_mode member, although it did for
sql_mode_inited (set to false). This would later raise the
warning in valgrind when printing the sql_mode in the event
header, as this print out is protected by a check against
sql_mode_inited and sql_mode variables. Given that sql_mode was
not initialized valgrind would output the warning.
FIX: we add initialization of sql_mode to the
st_print_event_info constructor.
client/mysqlbinlog.cc:
- Conditionally free ev->temp_buf.
- save defaults_argv before handle_options is called.
mysql-test/t/mysqlbinlog.test:
Added test case from BUG#38468.
sql/log_event.cc:
Added initialization of sql_mode for st_print_event_info.
Fix for Bug#31173: mysqlslap.exe crashes if called without any parameters
.bzrignore:
Fixed .bzrignore rules. Many were simply not ignoring what they were meant to.
client/mysqlslap.c:
Fixed bug for Bug#31173: mysqlslap.exe crashes if called without any parameters
The original patch could cause memory leaks and odd problems depending on how connection was made.
This code ensures that all mysql_options() are set for each mysql_real_connect().
(This patch by Monty)
mysys/my_thr_init.c:
Fixed multiply-initialized critical section on Windows, due to code incorrectly
checking the wrong field in an attempt to prevent multiple-initialization.
sql-common/client.c:
Don't use shared memory if it's not set (for example after failed mysql_real_connect).
Ensure that mysql_close() resets all resources so that it's safe to call it twice.
(Patch by monty, related to Bug#31173: mysqlslap.exe crashes if called without any parameters)
sql/CMakeLists.txt:
Added page fault counters for SHOW PROFILE on Windows.
sql/mysqld.cc:
Fixed attempt to set a NULL event. The code now only sets the event if appropriate (i.e. shared memory is being used)
sql/sql_profile.cc:
Added page fault counters for SHOW PROFILE on Windows.
sql/sql_profile.h:
Added page fault counters for SHOW PROFILE on Windows.
sql/udf_example.def:
Some cleanup functions were not exported from udf_example.dll, causing them to
never be executed, and as a result multiple-initialization of kernel objects
occurred and resources were not being freed correctly.
storage/maria/ma_close.c:
Condition variable share->key_del_cond was never being destroyed, while its
containing heap block was being freed in maria_close(), leaking kernel
resources.
When compiling with debug, don't clear buffer in 'net_clear()'
- This allows us to easier find bugs in the protocol and also get repeatable test failures in test cases where someone forgot to do --reap
client/mysqltest.cc:
Fixed compiler warning
mysql-test/t/partition_innodb_semi_consistent.test:
Added missing --reap (fixes random failure)
sql/net_serv.cc:
When compiling with debug, don't clear buffer in 'net_clear()'
- This allows us to easier find bugs in the protocol and also get repeatable test failures in test cases where someone forgot to do --reap
storage/myisam/ft_boolean_search.c:
Fixed compiler warnings
storage/myisam/ft_parser.c:
Fixed compiler warnings
storage/myisam/ft_stopwords.c:
Fixed compiler warnings
support-files/compiler_warnings.supp:
Added a lot of new suppression of not relevant warnings and warnings in systems we are not in charge of
unittest/mysys/waiting_threads-t.c:
Fixed compiler warnings
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.
valgrind pointed to a buffer allocated by my_realloc which looked fishy
Replaced size with what was probably intended, added test case.
Now also fixed line after review comment
- Marked a couple of tests with --big
- Fixed xtradb/handler/ha_innodb.cc to call explain_filename()
storage/xtradb/handler/ha_innodb.cc:
Call explain_filename() to get proper names for partitioned tables
Simplify testing of needed characterset
Remove ndb from --with-plugins=max build
mysqlbug now sends email to maria-developers@lists.launchpad.net
client/mysqltest.cc:
SKIP now expands variables (for better error messages)
mysql-test/include/have_big5.inc:
Simplify by using have_collation.inc
mysql-test/include/have_collation.inc:
Test if '$collation' is supported
mysql-test/include/have_cp1250_ch.inc:
Simplify by using have_collation.inc
mysql-test/include/have_cp1251.inc:
Simplify by using have_collation.inc
mysql-test/include/have_cp866.inc:
Simplify by using have_collation.inc
mysql-test/include/have_cp932.inc:
Simplify by using have_collation.inc
mysql-test/include/have_eucjpms.inc:
Simplify by using have_collation.inc
mysql-test/include/have_euckr.inc:
Simplify by using have_collation.inc
mysql-test/include/have_gb2312.inc:
Simplify by using have_collation.inc
mysql-test/include/have_gbk.inc:
Simplify by using have_collation.inc
mysql-test/include/have_koi8r.inc:
Simplify by using have_collation.inc
mysql-test/include/have_latin2_ch.inc:
Simplify by using have_collation.inc
mysql-test/include/have_sjis.inc:
Simplify by using have_collation.inc
mysql-test/include/have_tis620.inc:
Simplify by using have_collation.inc
mysql-test/include/have_ucs2.inc:
Simplify by using have_collation.inc
mysql-test/include/have_ujis.inc:
Simplify by using have_collation.inc
mysql-test/include/have_utf8.inc:
Simplify by using have_collation.inc
mysql-test/r/create-uca.result:
Create tests that uses unicode
mysql-test/r/create.result:
Move test with unicode to create-uca.test
mysql-test/r/have_big5.require:
Not needed anymore
mysql-test/r/have_cp1250_ch.require:
Not needed anymore
mysql-test/r/have_cp1251.require:
Not needed anymore
mysql-test/r/have_cp866.require:
Not needed anymore
mysql-test/r/have_cp932.require:
Not needed anymore
mysql-test/r/have_eucjpms.require:
Not needed anymore
mysql-test/r/have_euckr.require:
Not needed anymore
mysql-test/r/have_gb2312.require:
Not needed anymore
mysql-test/r/have_gbk.require:
Not needed anymore
mysql-test/r/have_koi8r.require:
Not needed anymore
mysql-test/r/have_latin2_ch.require:
Not needed anymore
mysql-test/r/have_sjis.require:
Not needed anymore
mysql-test/r/have_tis620.require:
Not needed anymore
mysql-test/r/have_ucs2.require:
Not needed anymore
mysql-test/r/have_ujis.require:
Not needed anymore
mysql-test/r/have_utf8.require:
Not needed anymore
mysql-test/r/innodb.result:
Move tests that depends on unicode to innodb_utf8.test
mysql-test/r/innodb_utf8.result:
Test moved from innodb.test
mysql-test/suite/rpl/t/rpl_ignore_table.test:
Test for required collations
mysql-test/t/create-uca.test:
Create tests that uses unicode
mysql-test/t/create.test:
Move test with unicode to create-uca.test
mysql-test/t/ctype_utf8.test:
Test that require unicode
mysql-test/t/ddl_i18n_koi8r.test:
Test for required collations
mysql-test/t/ddl_i18n_utf8.test:
Test for required collations
mysql-test/t/fulltext.test:
Test for required collations
mysql-test/t/fulltext2.test:
Test for required collations
mysql-test/t/innodb.test:
Move tests that depends on unicode to innodb_utf8.test
mysql-test/t/innodb_utf8.test:
Tests that uses unicode
mysql-test/t/query_cache_ps_no_prot.test:
Test for required collations
mysql-test/t/query_cache_ps_ps_prot.test:
Test for required collations
scripts/mysqlbug.sh:
Send emails to maria-developers@lists.launchpad.net
storage/ndb/plug.in:
Don't include ndb in 'max' builds
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.
strmov() is not guaranteed to work correctly on overlapping
source and destination buffers. On some OSes it may work,
but Fedora 12 has a stpcpy() that's not working correctly
on overlapping buffers.
Fixed to use the overlap-safe version of strmov instead.
Re-vitalized the overlap-safe version of strmov.
"mysql_upgrade (ver 5.1) add 3 fields to mysql.proc table but does
not set values".
mysql_upgrade (ver 5.1) adds 3 fields (character_set_client,
collation_connection and db_collation) to the mysql.proc table, but
does not set any values. When we run stored procedures, which were
created with mysql 5.0, a warning is logged into the error log.
The solution to this is for mysql_upgrade to set default best guess
values for these fields. A warning is also written during upgrade, to
make the user aware that default values are set.
client/mysql_upgrade.c:
Result lines which start with "WARNING" are passed through to the output.
This way we have a way of triggering WARNING-messages during upgrade
directly from the .sql-script.
mysql-test/r/mysql_upgrade.result:
Expected result of the test.
mysql-test/t/mysql_upgrade.test:
Added a test-case for the bug.
scripts/mysql_system_tables_fix.sql:
The new fields are populated, and warnings are written.