- Removed references to deleted files
- If we link staticly, check for static zlib
- This should fix the problem with 'no -lz found' link error
- Fixed build failure on window (Patch from Wlad)
- Fixed build problem with federatedx when using -Werror
BUILD/Makefile.am:
Remove removed file
config/ac-macros/zlib.m4:
If we compile with --all-static, test that we have a static libz
libmysqld/CMakeLists.txt:
Fix for build error on windows
mysql-test/suite/pbxt/r/key_cache.result:
Updated result
mysql-test/suite/pbxt/t/key_cache.test:
Fixed not updated test case
sql/CMakeLists.txt:
Fix for build error on windows
storage/federatedx/Makefile.am:
Don't use CFLAGS to compile C++ programs
storage/pbxt/src/lock_xt.cc:
Fixed compiler warning about using uninitialized b2
storage/xtradb/buf/buf0buf.c:
Fixed wrong printf
storage/xtradb/srv/srv0srv.c:
Fixed assignment of different width and test with different sign/unsigned
- 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
- Removed files specific to compiling on OS/2
- Removed files specific to SCO Unix packaging
- Removed "libmysqld/copyright", text is included in documentation
- Removed LaTeX headers for NDB Doxygen documentation
- Removed obsolete NDB files
- Removed "mkisofs" binaries
- Removed the "cvs2cl.pl" script
- Changed a few GPL texts to use "program" instead of "library"
Reason: inconsistent compilation, federatedx is compiled without SAFEMALLOC
flag, while anything else is compiled with SAFEMALLOC.
As a consequence, my_hash_init used inside federatedx initialization does not
provide correct caller info parameters (file, line) , so they are initialized with
whatever is on stack. When info about allocated memory is output in
COM_DEBUG command, the server crashes trying to output string starting at
0xcccccccccccccccc.
The fix is to remove SAFEMALLOC preprocessor flags
from every CMakeLists.txt, except the top-level one.
Also, SAFEMALLOC is not defined by default now, instead
there is WITH_DEBUG_FULL CMake option which adds
-DSAFEMALLOC to C and C++ flags in debug compilation.
This option is off by default, because
1) Debug C runtime already has heap debugging builtin with
overwrite and leak detection
2)safemalloc considerably slows down the tests.
Note also that
- SAFEMALLOC is gone in MySQL5.5
- On Windows, heap related overflows can also be found using free pageheap utility
(that is also part of application verifier). This is even more efficient if there are no other layers
on top of Windows heap allocator, e.g it is most efficient with release version.
- Removed SCCS rule from Makefile.am
- Made dummy rule in sql_yacc.yy to get rid of compiler warning about not used label.
Don't use maintainer mode with valgrind (as we don't want to initialize all variables)
config/ac-macros/maintainer.m4:
Don't use maintainer mode with valgrind (as we don't want to initialize all variables)
Force initialization of variables when using -Werror (To get rid of compiler warnings)
configure.in:
Don't use maintainer mode with valgrind (as we don't want to initialize all variables)
sql/sql_yacc.yy:
Made dummy rule in sql_yacc.yy to get rid of compiler warning about not used label.
Switch makefiles to use libtool to build libmysqld.so, as well as all its
dependencies.
The previous MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS() declaration is removed,
as it does not work well with a libtool build. Instead, plugins that need it
can specify an alternate object in MYSQL_PLUGIN_STATIC() that will be used for
embedded library. The plugin must then take care itself of compiling the
special object for embedded, rebuilding the source files previously listed in
MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS() with @plugin_embedded_defs@ in
CFLAGS/CXXFLAGS. The extra target @XXX_embedded_static_target@ is available
for the special object, this will be empty when --without-embedded-server.
All in-tree plugins are changed to build their static targets with libtool.
Additional plugins that want to work with libmysqld.so will need to be
similarly modified to build with libtool (or otherwise provide an -fPIC
object). Dynamically loaded plugins are not affected.
The old libraries like libmysys.a, libmyisam.a and similar libraries, which
were installed by `make install` though this is of little use, are still built
and installed to not break package scripts etc. that expect them. These
libraries are kept static to avoid introducing new .so dependencies.
The patch also fixes a handfull of duplicate symbol linker errors, where we
included some object twice during linking; these for one reason or another did
not produce errors before but caused problems on some platforms with this
patch (eg. Mac OS X linker is more strict for shared objects).
This patch only does what is necessary to build libmysqld.so. There are some
more cleanups that are possible now that we are using libtool more fully,
which could done in subsequent patches (though we may not bother as we are
switching from autotools to CMake anyway):
- In libmysql_r/, we should be able to just link libmysys.la etc, instead of
symlinking and re-compiling sources into the directory.
- In libmysql/, we can similarly avoid symlinking and recompiling sources if
we instead build a libmysys_nothread.la library with appropriate CFLAGS and
link that.
- In sql/, we can build a separate target libmysql_int.la with appropriate
CFLAGS for embedded and use that in libmysqld/ instead of symlinking
sources.
- libmysys.a, libmyisam.a and similar libraries could be installed as .so
also to save on code size; or alternatively could be not installed at all.
client/Makefile.am:
Updated for using libtool
config/ac-macros/plugins.m4:
Replace MUSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS with mechanism for plugins
to specify alternate object for embedded.
configure.in:
Fix linking duplicate objects related to THREAD_LOBJECTS.
dbug/Makefile.am:
Updated for using libtool
extra/Makefile.am:
Fix relative paths.
libmysqld/Makefile.am:
Build libmysqld.la using libtool
libmysqld/examples/Makefile.am:
Updated to use libtool
mysys/Makefile.am:
Updated to use libtool.
Fix linking duplicate objects related to THREAD_LOBJECTS.
mysys/my_uuid.c:
Fix conflicting global mutex name by making it static.
regex/Makefile.am:
Updated to use libtool
sql/Makefile.am:
Updated to use libtool
sql/item_func.cc:
Fix conflicting mutex name.
sql/mysql_priv.h:
Fix conflicting mutex name
sql/mysqld.cc:
Fix conflicting mutex name.
Add missing call of my_uuid_end().
storage/archive/Makefile.am:
Updated to use libtool
storage/archive/plug.in:
Updated to use libtool
storage/blackhole/Makefile.am:
Updated to use libtool
storage/blackhole/plug.in:
Updated to use libtool
storage/csv/Makefile.am:
Updated to use libtool
storage/csv/plug.in:
Updated to use libtool
storage/example/Makefile.am:
Updated to use libtool
storage/federated/Makefile.am:
Updated to use libtool
storage/federated/plug.in:
Updated to use libtool
storage/federatedx/Makefile.am:
Updated to use libtool
storage/federatedx/plug.in:
Updated to use libtool
storage/heap/Makefile.am:
Updated to use libtool
storage/heap/plug.in:
Updated to use libtool
storage/innobase/Makefile.am:
Updated to use libtool
storage/innobase/plug.in.disabled:
Updated to use libtool
storage/innodb_plugin/Makefile.am:
Updated to use libtool
storage/maria/CMakeLists.txt:
Fix linking duplicate object in maria_dump_log, causes failure on Mac OS X
storage/maria/Makefile.am:
Updated to use libtool
Fix linking duplicate object in maria_dump_log, causes link failure on Mac OS X
storage/maria/ma_loghandler.c:
Move maria_dump_log code to separate file to fix duplicate object link failures.
storage/maria/ma_loghandler.h:
Move maria_dump_log code to separate file to fix duplicate object link failures.
storage/maria/maria_dump_log.c:
Move maria_dump_log code to separate file to fix duplicate object link failures.
storage/maria/plug.in:
Updated to use libtool
storage/myisam/Makefile.am:
Updated to use libtool
storage/myisam/plug.in:
Updated to use libtool
storage/myisammrg/Makefile.am:
Updated to use libtool
storage/myisammrg/plug.in:
Updated to use libtool
storage/pbxt/plug.in:
Updated to use libtool
storage/pbxt/src/Makefile.am:
Updated to use libtool
storage/xtradb/Makefile.am:
Updated to use libtool
storage/xtradb/plug.in:
Updated to use libtool
strings/Makefile.am:
Updated to use libtool
unittest/unit.pl:
Don't attempt to run libtool internal files as unit tests.
vio/Makefile.am:
Updated to use libtool
- Changed to still use bcmp() in certain cases becasue
- Faster for short unaligneed strings than memcmp()
- Bettern when using valgrind
- Changed to use my_sprintf() instead of sprintf() to get higher portability for old systems
- Changed code to use MariaDB version of select->skip_record()
- Removed -%::SCCS/s.% from Makefile.am:s to remove automake warnings
of the "embedded" server
Problem: mysqltest_embedded failed to load ha_innodb_plugin library
on some platforms (due to some unresolved references).
Fix: on FreeBSD use -export-dynamic flag building mysqltest_embedded.
That allows to use its global symbols to resolve references in the
dynamically loaded plugin library.
libmysqld/examples/Makefile.am:
Fix for bug #50667: The InnoDB plugin prevents initialization
of the "embedded" server
- use -export-dynamic (on FreeBSD/DragonFly) building
mysqltest_embedded to allow using its global symbols
to resolve references in the dynamically loaded plugin libraries.
- 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
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.
- Moved some code from innodb_plugin to xtradb, to ensure that all tests runs
- Did changes in pbxt and maria storage engines becasue of changes in thd->query
- Reverted wrong code in sql_table.cc for how ROW_FORMAT is used.
This is a re-commit of Monty's merge to eliminate an extra commit from
MySQL-5.1.42 that was accidentally included in the merge.
This is a merge of the MySQL 5.1.41 clone-off (clone-5.1.41-build). In
case there are any extra changes done before final MySQL 5.1.41
release, these will need to be merged later before MariaDB 5.1.41
release.
- Read plug.in to fid the name of the engine to link with, does not have
to be same as engine dir
- Use engine dir when figuring out which libraries to build limbysqld with
"Merge Monty's fixes from main into release branch" .. cset):
- mysql_get_server_name() is a new client API function and so should
be exported from libmysql[d].
libmysql/libmysql.def:
mysql_get_server_name() is a new client API function and so should
be exported from libmysql[d].
libmysqld/libmysqld.def:
mysql_get_server_name() is a new client API function and so should
be exported from libmysql[d].
Backport from 6.0 to 5.1.
Only those sync points are included, which are used in debug_sync.test.
The Debug Sync Facility allows to place synchronization points
in the code:
open_tables(...)
DEBUG_SYNC(thd, "after_open_tables");
lock_tables(...)
When activated, a sync point can
- Send a signal and/or
- Wait for a signal
Nomenclature:
- signal: A value of a global variable that persists
until overwritten by a new signal. The global
variable can also be seen as a "signal post"
or "flag mast". Then the signal is what is
attached to the "signal post" or "flag mast".
- send a signal: Assign the value (the signal) to the global
variable ("set a flag") and broadcast a
global condition to wake those waiting for
a signal.
- wait for a signal: Loop over waiting for the global condition until
the global value matches the wait-for signal.
Please find more information in the top comment in debug_sync.cc
or in the worklog entry.
.bzrignore:
WL#4259 - Debug Sync Facility
Added the symbolic link libmysqld/debug_sync.cc.
CMakeLists.txt:
WL#4259 - Debug Sync Facility
Added definition for ENABLED_DEBUG_SYNC.
configure.in:
WL#4259 - Debug Sync Facility
Added definition for ENABLED_DEBUG_SYNC.
include/my_sys.h:
WL#4259 - Debug Sync Facility
Added definition for the DEBUG_SYNC_C macro.
libmysqld/CMakeLists.txt:
WL#4259 - Debug Sync Facility
Added sql/debug_sync.cc.
libmysqld/Makefile.am:
WL#4259 - Debug Sync Facility
Added sql/debug_sync.cc.
mysql-test/include/have_debug_sync.inc:
WL#4259 - Debug Sync Facility
New include file.
mysql-test/mysql-test-run.pl:
WL#4259 - Debug Sync Facility
Added option --debug_sync_timeout.
mysql-test/r/debug_sync.result:
WL#4259 - Debug Sync Facility
New test result.
mysql-test/r/have_debug_sync.require:
WL#4259 - Debug Sync Facility
New require file.
mysql-test/t/debug_sync.test:
WL#4259 - Debug Sync Facility
New test file.
mysys/my_static.c:
WL#4259 - Debug Sync Facility
Added definition for debug_sync_C_callback_ptr.
mysys/thr_lock.c:
WL#4259 - Debug Sync Facility
Added sync point "wait_for_lock".
sql/CMakeLists.txt:
WL#4259 - Debug Sync Facility
Added debug_sync.cc and debug_sync.h.
sql/Makefile.am:
WL#4259 - Debug Sync Facility
Added debug_sync.cc and debug_sync.h.
sql/debug_sync.cc:
WL#4259 - Debug Sync Facility
New source file.
sql/debug_sync.h:
WL#4259 - Debug Sync Facility
New header file.
sql/mysqld.cc:
WL#4259 - Debug Sync Facility
Added opt_debug_sync_timeout.
Added calls to debug_sync_init() and debug_sync_end().
Fixed a purecov comment (unrelated).
sql/set_var.cc:
WL#4259 - Debug Sync Facility
Added server variable "debug_sync".
sql/set_var.h:
WL#4259 - Debug Sync Facility
Added declaration for server variable "debug_sync".
sql/share/errmsg.txt:
WL#4259 - Debug Sync Facility
Added error messages ER_DEBUG_SYNC_TIMEOUT and ER_DEBUG_SYNC_HIT_LIMIT.
sql/sql_base.cc:
WL#4259 - Debug Sync Facility
Added sync points "after_flush_unlock" and "before_lock_tables_takes_lock".
sql/sql_class.cc:
WL#4259 - Debug Sync Facility
Added initialization for debug_sync_control to THD::THD.
Added calls to debug_sync_init_thread() and debug_sync_end_thread().
sql/sql_class.h:
WL#4259 - Debug Sync Facility
Added element debug_sync_control to THD.
storage/myisam/myisamchk.c:
Fixed a typo in an error message string (unrelated).
Restore a stub of the removed mysql_odbc_escape_string function
to fix a ABI breakage. The function was intended to be private
and used only by Connector/ODBC, but, unfortunately, it was exported
as part of the ABI. Nonetheless, only a stub is restored as the
original function is inherently broken and shouldn't be used.
This restoration only applies to MySQL 5.0. This will be addressed
differently in later versions -- reworked library versioning.
include/mysql.h:
Restore mysql_odbc_escape_string prototype.
include/mysql_h.ic:
Update ABI check.
libmysql/libmysql.c:
Restore a mysql_odbc_escape_string stub.
libmysql/libmysql.def:
Restore mysql_odbc_escape_string.
libmysqld/libmysqld.def:
Restore mysql_odbc_escape_string.
* Finished Monty and Jani's merge
* Some InnoDB tests still fail (because it's old xtradb code run against
newer testsuite). They are expected to go after mergning with the latest
xtradb.
- Define and pass compile time path variables as pre-processor definitions to
mimic the makefile build.
- Set new CMake version and policy requirements explicitly.
- Changed DATADIR to MYSQL_DATADIR to avoid conflicting definition in
Platform SDK header ObjIdl.h which also defines DATADIR.
an assertion in a debug build.
The reason is that the C API doesn't support multiple result sets for prepared
statements and attempting to execute a stored routine which returns multiple result
sets sometimes lead to a network error. The network error sets the diagnostic area
prematurely which later leads to the assert when an attempt is made to set a second
server state.
This patch fixes the issue by changing the scope of the error code returned by
sp_instr_stmt::execute() to include any error which happened during the execution.
To assure that Diagnostic_area::is_sent really mean that the message was sent all
network related functions are checked for return status.
libmysqld/lib_sql.cc:
* Changed prototype to return success/failure status on net_send_error_packet(),
net_send_ok(), net_send_eof(), write_eof_packet().
mysql-test/r/sp_notembedded.result:
* Added test case for bug 44521
mysql-test/t/sp_notembedded.test:
* Added test case for bug 44521
sql/protocol.cc:
* Changed prototype to return success/failure status on net_send_error_packet(),
net_send_ok(), net_send_eof(), write_eof_packet().
sql/protocol.h:
* Changed prototype to return success/failure status on net_send_error_packet(),
net_send_ok(), net_send_eof(), write_eof_packet().
sql/sp_head.cc:
* Changed prototype to return success/failure status on net_send_error_packet(),
net_send_ok(), net_send_eof(), write_eof_packet().
This allows us to skip and speed up some very common character converts that MySQL is doing when sending data to the client
and this gives us a nice speed increase for most queries that uses only characters in the range 0x00-0x7f.
This code is based on Alexander Barkov's code that he has done in MySQL 6.0
include/m_ctype.h:
Added MY_CS_NONASCII marker
libmysqld/lib_sql.cc:
Added function net_store_data(...) that takes to and from CHARSET_INFO * as arguments
mysys/charset.c:
Mark character sets with MY_CS_NONASCII
scripts/mysql_install_db.sh:
Fixed messages to refer to MariaDB instead of MySQL
sql/protocol.cc:
Added function net_store_data(...) that takes to and from CHARSET_INFO * as arguments
sql/protocol.h:
Added function net_store_data(...) that takes to and from CHARSET_INFO * as arguments
sql/sql_string.cc:
Quicker copy of strings with no characters above 0x7f
strings/conf_to_src.c:
Added printing of MY_CS_NONASCII
strings/ctype-extra.c:
Mark incompatible character sets with MY_CS_NONASCII
Removed duplicated character set geostd
strings/ctype-sjis.c:
Mark incompatible character sets with MY_CS_NONASCII
strings/ctype-uca.c:
Mark incompatible character sets with MY_CS_NONASCII
strings/ctype-ucs2.c:
Mark incompatible character sets with MY_CS_NONASCII
strings/ctype-utf8.c:
Mark incompatible character sets with MY_CS_NONASCII
strings/ctype.c:
Added function to check if character set is compatible with latin1 in ranges 0x00-0x7f
Remove custom DLL loader code from innodb plugin code, use
symbols exported from mysqld.
storage/innodb_plugin/handler/ha_innodb.cc:
Remove a Win32 workaround for current_thd.
The original problem that innodb plugin used
value of TLS variable across DLL boundaries is
solved in MySQL server (current_thd is a function
not TLS variable now)
storage/innodb_plugin/handler/handler0alter.cc:
Remove custom delay loader
storage/innodb_plugin/handler/handler0vars.h:
Remove custom delay loader
storage/innodb_plugin/handler/i_s.cc:
Remove custom delay loader
storage/innodb_plugin/handler/win_delay_loader.cc:
Remove custom delay loader
storage/innodb_plugin/plug.in:
Remove commented out MYSQL_PLUGIN_STATIC,
CMake would not parse that correctly
.bzrignore:
XtraDB compiles innodb in storage/xtradb instead of storage/innobase
CMakeLists.txt:
Take InnoDB code from storage/xtradb/ instead of storage/innobase/
libmysqld/CMakeLists.txt:
Take InnoDB code from storage/xtradb/ instead of storage/innobase/
storage/innobase/plug.in.disabled:
Disable building old InnoDB from storage/innobase/ directory.
We will keep the files around to avoid getting merge conflicts for every MySQL upstream
change to InnoDB.
storage/xtradb/CMakeLists.txt:
Take InnoDB code from storage/xtradb/ instead of storage/innobase/
storage/xtradb/COPYING:
Remove not needed file from XtraDB.
storage/xtradb/Makefile.am:
Take InnoDB code from storage/xtradb/ instead of storage/innobase/
storage/xtradb/Makefile.in:
Remove not needed file from XtraDB.
storage/xtradb/handler/ha_innodb.cc:
Take InnoDB code from storage/xtradb/ instead of storage/innobase/
storage/xtradb/plug.in:
Take InnoDB code from storage/xtradb/ instead of storage/innobase/
storage/xtradb/row/row0ins.c:
Take InnoDB code from storage/xtradb/ instead of storage/innobase/
the thread->mysys_var parameter should be empty for the idle
embedded-server threads so that working threads can safely free
this memory.
per-file comments:
libmysqld/lib_sql.cc
Bug#43733 Select on processlist let the embedded server crash (concurrent_innodb_safelog)
set thread->mysys_var= 0 after the query is handled
mysql-test/include/concurrent.inc
Bug#43733 Select on processlist let the embedded server crash (concurrent_innodb_safelog)
enable these for the embedded-server mode
sql/sql_show.cc
Bug#43733 Select on processlist let the embedded server crash (concurrent_innodb_safelog)
show thread lock status in the query result