- add version info for the client library, dynamic plugins and some utilities
- do not recompile client library sources 3 times (for mysqlclient , mysqlclient_notls and libmysql)
One time is sufficient, so get rid of mysqlclient_notls, and link static client library to the shared.
- remove incremental linking flag
Store decimal 0.0 in zero bytes in dynamic strings.
mysqltest: Don't ignore error from mysql_stmt_fetch; This could cause rows to be missing from log when running with --ps-protocol
Fixed wrong result length for CAST(... as TIME)
client/mysqltest.cc:
Don't ignore error from mysql_stmt_fetch; This could cause rows to be missing from log when running with --ps-protocol
libmysql/libmysql.c:
The max length for a TIME column is 17, not 15.
mysql-test/r/dyncol.result:
More tests
mysql-test/t/dyncol.test:
More tests
mysys/ma_dyncol.c:
Check content of decimal value on read and store to not get assert in decimal_bin_size().
Store decimal 0.0 in zero bytes in dynamic strings. This also solves a problem where decimal 0 had different internal representations.
sql-common/my_time.c:
Fixed DBUG_PRINT
sql/item_timefunc.h:
Fixed wrong result length for CAST(... as TIME). This was the cause of failures in buildbot when doing cast(... as time);
sql/protocol.cc:
More DBUG_PRINT
Fixed race condition in event that could cause hang when stopping event scheduler with SET GLOBAL event_scheduler=OFF
client/mysqltest.cc:
Write command to be executed to the log BEFORE executing the command.
This makes it easier to debug crashes as the log will contain the fatal command.
mysql-test/r/mysqltest.result:
Updated results (we now get more things logged)
sql/event_queue.cc:
Fixed race condition in event that could cause hang when stopping event scheduler with SET GLOBAL event_scheduler=OFF.
The reason was that a kill signal could be sent between last check of thd->killed and before thd->enter_cond() in which case the signal
would be missed and we would be stuck in Event_scheduler::stop() forever.
Fixed compiler warnings
client/readline.cc:
Fixed compiler warning
mysql-test/t/mysqldump.test:
Only run test if utf8 is used
sql/log.cc:
Fixed compiler warning
sql/mysql_priv.h:
Fixed compiler warnings
tests/mysql_client_test.c:
Don't abort test if ucs2 is not in use.
create_schema if auto-generate-sql also set.
mysqlslap uses a schema to run its tests on and later
drops it if auto-generate-sql is used. This can be a
problem, if the schema is an already existing one.
If create-schema is used with auto-generate-sql option,
mysqlslap while performing the cleanup, drops the specified
database.
Fixed by introducing an option --no-drop, which, if used,
will prevent the dropping of schema at the end of the test.
client/client_priv.h:
Bug#11765157 - 58090: mysqlslap drops schema specified in
create_schema if auto-generate-sql also set.
Added an option.
client/mysqlslap.c:
Bug#11765157 - 58090: mysqlslap drops schema specified in
create_schema if auto-generate-sql also set.
Introduced an option 'no-drop' to forbid the removal of schema
even if 'create' or 'auto-generate-sql' options are used.
mysql-test/r/mysqlslap.result:
Added a testcase for Bug#11765157.
mysql-test/t/mysqlslap.test:
Added a testcase for Bug#11765157.
Problem: mysqlbinlog --server-id may filter out Format_description_log_events.
If mysqlbinlog does not process the Format_description_log_event,
then mysqlbinlog cannot read the rest of the binary log correctly.
This can have the effect that mysqlbinlog crashes, generates an error,
or generates output that causes mysqld to crash, generate an error,
or corrupt data.
Fix: Never filter out Format_description_log_events. Also, never filter
out Rotate_log_events.
client/mysqlbinlog.cc:
Process Format_description_log_events even when the
server_id does not match the number given by --server-id.
mysql-test/t/mysqlbinlog.test:
Add test case.
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'
client/readline.cc:
Initialize not used variable (to kill wrong compiler warning)
mysql-test/suite/handler/aria.result:
Updated test result
mysql-test/suite/handler/handler.inc:
Changed index to ensure rows are in a fixed order
mysql-test/suite/handler/heap.result:
Updated test result
mysql-test/suite/handler/innodb.result:
Updated test result
mysql-test/suite/handler/myisam.result:
Updated test result
plugin/handler_socket/handlersocket/Makefile.am:
Use CXX flags to compile
sql/filesort.cc:
Initialize variable that may be used
sql/log.cc:
Initialize not used variable (to kill wrong compiler warning)
sql/opt_range_mrr.cc:
Fixed cast to avoid compiler warning
storage/xtradb/fil/fil0fil.c:
Added cast to avoid compiler warning
- Reduced memory usage from safe_mutex.
- Fixed problem with failing tests that could not restart mysqld becasue the port was reserved
- More DBUG information
- Fixed bug where bitmap_set_prefix() wrote over buffer area.
- Initialize n_pages_flushed in xtradb which was used uninitialized.
client/mysqltest.cc:
Reduced memory usage (400K -> 80 for simple test; 400M -> 70M for some other tests)
- Smaller dynamic arrays at start
- Made 'st_connection' significantly smaller by allocation 'mysql' on demand in mysql_init() and storing require_file in a mem_root.
- Fixed that when one does --debug we get information from safemalloc in the trace
(Most of changes are changing &connect->mysql to connect->mysql
libmysql/libmysql.c:
Don't call mysql_thread_end() if my_init() was called outside of mysql_server_init()
This is needed to get information from my_end() into the DBUG log
mysql-test/README:
Fixed wrong comment
mysql-test/mysql-test-run.pl:
Reserv 20 ports / mysql-test-run thread.
(Needed as some tests uses 9 mysqld servers)
mysys/hash.c:
More DBUG information
mysys/my_bitmap.c:
Fixed bug where bitmap_set_prefix() wrote over buffer area.
mysys/safemalloc.c:
More DBUG information
mysys/thr_mutex.c:
Initialize smaller arrays be default.
sql-common/client.c:
More DBUG_PRINT
storage/xtradb/srv/srv0srv.c:
Initialize n_pages_flushed which was used uninitialized.
("-") 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.
- Fixed some issues with partitions and connection_string, which also fixed lp:716890 "Pre- and post-recovery crash in Aria"
- Fixed wrong assert in Aria
Now need to merge with latest xtradb before pushing
sql/ha_partition.cc:
Ensure that m_ordered_rec_buffer is not freed before close.
sql/mysqld.cc:
Changed to use opt_stack_trace instead of opt_pstack.
Removed references to pstack
sql/partition_element.h:
Ensure that connect_string is initialized
storage/maria/ma_key_recover.c:
Fixed wrong assert
batch_readline_init() was modified - make check for
type of file for input stream unless target platform
is WINDOWS since on this platform S_IFBLK is undefined.
batch_readline_init() was modified - return an error
if the input source is a directory or a block device.
This follow-up is necessary because on some platforms,
such as Solaris, call to read() from directory may be
successful.
if the standard input is a directory.
The problem is that mysql monitor try to read from stdin without
checking input source type.
The solution is to stop reading data from standard input if a call
to read(2) failed.
A new test case was added into mysql.test.
client/my_readline.h:
Data members error and truncated was added to LINE_BUFFER structure.
These data members used instead of out parameters in functions
batch_readline, intern_read_line.
client/mysql.cc:
read_and_execute() was modified: set status.exit_status to 1
when the error occured while reading the next command line in
non-interactive mode. Also the value of the truncated attribute
of structure LINE_BUFF is taken into account only for non-iteractive mode.
client/readline.cc:
intern_read_line() was modified: cancel reading from input if
fill_buffer() returns -1, e.g. if call to read failed.
batch_readline was modified: set the error data member of LINE_BUFFER
structure to value of my_errno when system error happened during call
to my_read/my_realloc.
mysql-test/t/mysql.test:
Test for bug#57450 was added.
- MWL#47, allowing to annotate row-based binlog events with the SQL test of
the originating query (eg. in mysqlbinlog output).
- row_based_replication_without_primary_key.patch, providing more intelligent
selection of index to use on slave when applying row-based binlog events
for tables with no primary key.
- Make mysqlbinlog omit redundant `use` around BEGIN/SAVEPOINT/COMMIT/
ROLLBACK in 5.0 binlogs.
- Use -Wno-uninitialized if -DFORCE_INIT_OF_VARS is not used, to avoid warnings about not initialized variables.
- Fixed compiler warnings
- Added a name for each thr_lock to get better error messages (This is needed to find out why 'archive.test' sometimes fails)
BUILD/SETUP.sh:
Use -Wno-uninitialized if -DFORCE_INIT_OF_VARS is not used, to avoid warnings about not initialized variables.
BUILD/build_mccge.sh:
Use -Wno-uninitialized if -DFORCE_INIT_OF_VARS is not used, to avoid warnings about not initialized variables.
client/mysqltest.cc:
Fixed bug in remove_files_wildcards (the orignal code never removed anything)
extra/libevent/devpoll.c:
Fixed compiler warning
include/thr_lock.h:
Added a name for each thr_lock to get better error messages.
mysql-test/suite/maria/t/maria3.test:
Speed up test.
mysys/thr_lock.c:
Added a name for each thr_lock to get better error messages.
Added a second 'check_locks' to find if something goes wrong in 'wake_up_waiters'.
sql/lock.cc:
Added a name for each thr_lock to get better error messages.
storage/xtradb/fil/fil0fil.c:
Fixed compiler warning
When mysqldadmin is run with sleep and count options,
it goes into an infinite loop and keeps executing the
specified command.
This happened because the statement, responsible for
decrementing the count value, was missing.
Fixed by adding a statement which will decrement the
count value for each iteration.
client/mysqladmin.cc:
Bug#58221 : mysqladmin --sleep=x --count=x keeps looping
Added a condition to check and decrement the count
value stored in nr_iterations per iteration.
mysql-test/r/mysqladmin.result:
Added a testcase for Bug#58221.
mysql-test/t/mysqladmin.test:
Added a testcase for Bug#58221.
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.
This is a merge of percona patch mysqlbinlog_fix.patch.
Apparently, MySQL 5.0 does not flag BEGIN/SAVEPOINT/COMMIT/ROLLBACK statements
in its binlogs with LOG_EVENT_SUPPRESS_USE_F like 5.1+ does. This causes
unnecessary `use` statements around such statements when the binlog is dumped
by mysqlbinlog.
Fix by always suppressing the output of `use` for these statements.
null from mysql_store_result.
mysqlslap segfaults at a point when it tries to fetch rows from
the result set.
Under some circumstances, mysql_store_result can return 'NULL',
even after query execution (mysql_query) succeeds, and eventually
a segfault might occur if same unchecked return value is passed
to mysql_fetch_row.
Fixed by adding a check on mysql_store_result's return value.
client/mysqlslap.c:
Bug#59109 : mysqlslap crashes on mysql_fetch_row after ignoring
null from mysql_store_result.
Added a check on mysql_store_result's return value. A 'NULL' return
value here shows an erroneous situation as mysql_field_count has already
reported a non-zero value.
The problem was that the warnings was never written out
when running with --ps-protocol. This was because the
warnings only appeared during the prepare phase, not
the execute phase.
Solved by not clearing the warnings from the prepare phase
if there was no other warnings.
If there are warnings from the execute phase, it is very
likely to be the same as from the prepare phase. My tests
show that if not clearing the warnings from the prepare
phase when there are warnings from the execute phase, there
will be duplicated warnings in the result.
client/mysqltest.cc:
Only reset the prepare warnings if there are warnings from
the execute phase. Otherwise these warnings will never be
returned.