LOCK kills the server.
Prohibit FLUSH TABLES WITH READ LOCK application to views or
temporary tables.
Fix a subtle bug in the implementation when we actually
did not remove table share objects from the table cache after
acquiring exclusive locks.
mysql-test/r/flush.result:
Update results (Bug#51710)
mysql-test/t/flush.test:
Add a test case for Bug#51710.
sql/sql_parse.cc:
Fix Bug#51710 "FLUSH TABLES <view> WITH READ LOCK
killes the server.
Ensure we don't open views and temporary tables.
Fix a yet another bug in the implementation which
did not actually remove the tables from cache after acquiring
exclusive locks.
Plugins included into bin release cannot be
installed on debug version of server
IF the build process was split into separate "debug" and
"optimized" builds
AND
the plugin files of the debug build got copied into
"plugin/debug/"
(both is done for MySQL release builds starting from 5.5.3),
THEN these debug plugin files are to be included in the
final binary package.
This change deals with the inclusion only,
the other parts are done in different changesets.
plugin/Makefile.am:
The "install" rule must not assume that "debug" files are
present, this depends on the preceding steps in the build.
If they are present, we cannot copy them by simply using
"libtool install" (as we could do during an ordinary build)
because they are already kept in "plugin/debug/".
When doing the copy to the destination hierarchy, we must
ensure that symlinks are not expanded but rather copied
as symlinks.
"cp -d" is specific to GNU, the portable way would use
"cp -P", but that is not fully specified with recursion.
So we fall back on "tar c | tar x", which is known to
keep symlinks unchanged (and un-expanded).
Using "$(TAR)" is just a precaution in case of weird path
settings or other portability issues.
This is a fix specific for HPUX,
for which the compiler does not resolve properly dependencies
involving unused inline functions.
(See existing comments in mysql_thread.h)
In include/mysql/psi/mysql_thread.h,
the instrumentation helpers for mysql_prlock_*
uses the pr lock apis.
These apis are implemented in mysys/thr_rwlock.c,
which is not linked to client code.
As a result, the code does not link in libmysql_r, on HPUX.
The fix is to cut dependencies explicitely,
by introducing -DDISABLE_MYSQL_RWLOCK_H,
when building client code.
Ensure that we store the correct cached_field_type whenever we cache Field items
(in this case it allows us to compare dates as dates, rather than strings)
mysql-test/r/type_timestamp.result:
Add test case.
mysql-test/t/type_timestamp.test:
Add test case.
sql/item.h:
Initialize cached_field_type from the Field item.
Before this fix, client tools (mysql_upgrade, mysqlcheck, mysqldump)
would try to process performance schema tables, leading to failures.
The fix is to align FIRST_PERFORMANCE_SCHEMA_VERSION to 5.5.3,
which is the version number of mysql-trunk where the
performance schema is first available.
Before this fix, the performance schema instrumentation
in mdl.h / mdl.cc was incomplete, causing:
- build warnings,
- no data collection for the performance schema
This fix:
- added instrumentation helpers for the new preferred
reader read write lock, mysql_prlock_*
- implemented completely the performance schema
instrumentation of mdl.h / mdl.cc
Before this fix, mysql_upgrade would always drop and re create
the performance_schema database.
This in theory could destroy user data created using 5.1 or older versions.
With this fix, mysql_upgrade checks the content of the
performance_schema database before droping it.
had broken the 5.1 behaviour of --log-error: --log-error without argument sent to stderr instead of writing
to a file with an autogenerated name.
mysql-test/suite/sys_vars/t/log_error_func.test:
test that error log is created and shown in SHOW VARIABLES.
Interestingly the error log's path is apparently relative if --log-error=argument is used, but
may be absolute or relative if --log-error(no argument) is used (because then the path is derived from
that of pidfile_name, which can be absolute or relative, depending on if autogenerated or not).
mysql-test/suite/sys_vars/t/log_error_func2.test:
test that error log is created and shown in SHOW VARIABLES
mysql-test/suite/sys_vars/t/log_error_func3.test:
test that error log is empty in SHOW VARIABLES
sql/mysql_priv.h:
id for option --log-error
sql/mysqld.cc:
No --log-error means "write errors to stderr", whereas --log-error
without argument means "write errors to a file". So we cannot use the default logic
of class sys_var_charptr, which treats "option not used" the same as "option used
without argument" and uses the same default for both. We need to catch "option used",
in mysqld_get_one_option(), and then "without argument". Setting to "" makes sure
that init_server_components() will create the log, with an autogenerated name.
sql/sys_vars.cc:
need to give the option a numeric id so that we can catch it in mysqld_get_one_option()
The unit test pfs_instr-t:
- generates a very long (10,000) bytes file name
- calls find_or_create_file.
This leads to a buffer overflow in mysys in my_realpath(),
because my_realpath and mysys file APIs in general do not
test for input parameters: mysys assumes every file name
is less that FN_REFLEN in length.
Calling find_or_create_file with a very long file name is likely
to happen when instrumenting third party code that does not use mysys,
so this test is legitimate.
The fix is to make find_or_create_file in the performance schema
more robust in this case.
The root cause of the failure is that when
Bug#51447 performance schema evil twin files
was fixed, instrumented file names got normalized.
The pfs-t unit test depends on this file normalization,
but it was not updated.
This fix aligns pfs-t.cc lookup_file_by_name()
with the logic in pfs_instr.cc find_or_create_file().
Bug#51676 Server crashes on SELECT, ORDER BY on 'utf8mb4' column
An additional fix. We should use 0xFFFD as a weight for supplementary
characters, not the "weight for character U+FFFD".