| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Bug#17959689: MAKE GCC AND CLANG GIVE CONSISTENT COMPILATION WARNINGS
Bug#18313717: ENABLE -WERROR IN MAINTANER MODE WHEN COMPILING WITH CLANG
Bug#18510941: REMOVE CMAKE WORKAROUNDS FOR OLDER VERSIONS OF OS X/XCODE
Backport from mysql-5.6 to mysql-5.5
|
| | |
|
| |
| |
| |
| |
| |
| | |
Thread can be disconnected internally for example after COMMIT statements.
So we should check this for the statement execution.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
As Davi added code like
sav_protocol= thd->protocol
thd->protocol= &thd->protocol_binary
...
thd->protocol= sav_protocol
the fucntions like emb_store_querycache_result() cannot determine
the used protocol testing thd->protocol == &thd->protocol_binary.
Fixed by additional check thd->command == COM_STMT_EXECUTE.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The function Protocol::net_store_data(a, b, CHARSET_A, CHARSET_B) should
be adapted to be working in the embedded server as it's done
with the Protocol::net_store_data(a, b).
That new function renamed as net_store_data_cs, so we can make it
virtual.
|
|\ \
| |/ |
|
| |
| |
| |
| |
| | |
to copyright header.
|
| |
| |
| |
| |
| | |
Added a new option: WITH_EMBEDDED_SHARED_LIBRARY
|
|\ \
| |/
| |
| | |
(without few incorrect bugfixes and with 1250 files where only a copyright year was changed)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Bug#68338 RFE: make tmpdir a build-time configurable option
Background: Some distributions use tmpfs for mounting /tmp by
default, which has some advantages, but brings also new
issues. Fedora started using tmpfs on /tmp in version 18 for
example. If not configured otherwise in my.cnf, MySQL uses
system's constant P_tmpdir expanded to /tmp on Linux. This can
introduce some problems with limited space in /tmp and also some
data loss in case of replication slave [1].
In case distributions would like to use /var/tmp, which should be
better for MySQL purposes, then we have to patch the source or
change tmpdir option in my.cnf, which is however not updated in
case it has already existed.
Thus, it would be useful to be able to specify default tmpdir
path using a configure option, while using P_tmpdir in case it is
not defined explicitly.
Based on a contribution from Honza Horak
|
| |\
| | |
| | |
| | | |
in 5.5, 5.6, 5.7.
|
| |/
| |
| |
| | |
Backporting wl6715 to mysql-5.5
|
| | |
|
| |
| |
| |
| |
| |
| | |
The emb_free_embedded_thd() has the thread-unsafe code
so should be 'mutexed' also.
|
| |
| |
| |
| |
| | |
LOCK_thread_count locked when we do threads.append().
|
| |
| |
| |
| |
| |
| | |
support -DTMPDIR=/path in CMakeLists.txt
Patch by Honza Horak.
|
|\ \
| |/ |
|
| | |
|
| | |
|
| |
| |
| |
| | |
with a bit of lame protection against abuse.
|
| | |
|
| |
| |
| |
| | |
MATCHES)
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Miscellaneous workarounds for drop-in compatibility problems with Linux distributions, arounf versioning of the
MySQL 5.5 client shared library. There seems to be 3 different ways major distributions handle versioning
1. Fedora (also Mageia, and likely other Redhat descendants) way
old, 5.1 API functions are given version libmysqlclient_16
new API functions (client plugins, mysql_stmt_next ) are given version libmysqlclient_18
some extra functions beyond API are exported.
some functions are renamed.
2.Debian Wheezy way
all functions are given libmysqlclient_18 version
3. Ubuntu way (or MySQL/MariaDB download packages)
no versioning
UIp to this fix, MariaDB distributions did not have any versioning in the libraries, this rendered client library incompatible to distributions
thus exchanging distribution's libmysqlclient.so.18.0.0 with MariaDB's did not work nicely (anywhere but on Ubuntu)
THE FIX
is to build libraries the same way as distributions do it
- when building RPMs, use same version script as Fedora does, Make sure to export extra-symbols, the same as Fedora exports.
- when building DEBs, use the same version script as Debian Wheezy
- do not use version scripts otherwise
Also, makes sure that extensions of MySQL APIs (asynchronous client functionality) is exported by the shared libraries.
|
|\ \
| |/
| |
| | |
manually checked every change, reverted incorrect or stupid changes.
|
| |\ |
|
| | | |
|
| | |
| | |
| | |
| | | |
configure with cmake -DRPM=distro
|
|\ \ \
| |/ / |
|
| |\ \
| | |/
| | |
| | | |
Merge : 5.1->5.5
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Background :
In mysql-5.1, in a fix for bug#47485, code has been changed for
mysql client (libmysql/libmysql.c) but corresponding code was not
changed for embedded mysql. In that code change, after execution
of a statement, mysql_stmt_store_result() checks for mysql->state
to be MYSQL_STATUS_STATEMENT_GET_RESULT, instead of
MYSQL_STATUS_GET_RESULT (earlier).
Reason:
In embedded mysql code, after execution, mysql->state was not
set to MYSQL_STATUS_STATEMENT_GET_RESULT, so it was throwing
OUT_OF_SYNC error.
Fix:
Fixed the code in libmysqld/lib_sql.cc to have mysql->state
to be set to MYSQL_STATUS_STATEMENT_GET_RESULT after execution.
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
mysql-test/suite/innodb/t/group_commit_crash.test:
remove autoincrement to avoid rbr being used for insert ... select
mysql-test/suite/innodb/t/group_commit_crash_no_optimize_thread.test:
remove autoincrement to avoid rbr being used for insert ... select
mysys/my_addr_resolve.c:
a pointer to a buffer is returned to the caller -> the buffer cannot be on the stack
mysys/stacktrace.c:
my_vsnprintf() is ok here, in 5.5
|
| |\ \
| | |/ |
|
| | |\ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
handle_segfault is the signal handler code of mysqld. however, it makes
calls to potentially unsafe functions localtime_r, fprintf, fflush.
include/my_stacktrace.h:
Add safe versions of itoa() write() and snprintf().
libmysqld/CMakeLists.txt:
Move signal handler to separate file.
mysys/stacktrace.c:
Remove unsafe function calls.
sql/CMakeLists.txt:
Move signal handler to separate file.
sql/Makefile.am:
Move signal handler to separate file.
sql/mysqld.cc:
Move signal handler to separate file.
sql/signal_handler.cc:
Remove unsafe function calls.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
modified for MySQL 5.5. Logger service moved to the
plugin/sql_errlog directory to be properly used later.
plugin/sql_errlog/sql_errlog.c:
Fixes for bugs #956427 (SQL_ERROR_LOG plugin produces bogus warnings about sql-error-log-size-limit value) and #956463 (Server crashes if SQL_ERROR_LOG fails to initialize) they're also MDEV-184 and MDEV-183
The sql_error_log_deinit() should be prepared for the logger_file to be NULL.
The logger_file_size_limit upper limit wasn't properly set.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
- Mark test components, plugins etc with COMPONENT Test, to get them excluded from the MSI
- Only include debug symbols for client and embedded libs and also
mysqld.exe and server plugins (so we can still can get a callstack in case of crash)
The rest (all *.pdbs, test components, MTR) can be obtained from the big ZIP distribution, if required.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The file uses external variables defined in another (C++) source file. Since MSVC mangles variables and not only functions, either variables in question should be extern "C", or sql_logger should be made C++ for link to succeed.
Fixed by renaming sql_logger.c to sql_logger.cc
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
mysys/my_logger.c was moved to sql/sql_logger.c
Logger service was rewritten with file functions instead of stream, so it
can handle huge files.
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
All client functions that can block on I/O have alternate _start() and
_cont() versions that do not block but return control back to the
application, which can then issue I/O wait in its own fashion and later
call back into the library to continue the operation.
Works behind the scenes by spawning a co-routine/fiber to run the
blocking operation and suspend it while waiting for I/O. This
co-routine/fiber use is invisible to applications.
For i368/x86_64 on GCC, uses very fast assembler co-routine support. On
Windows uses native Win32 Fibers. Falls back to POSIX ucontext on other
platforms. Assembler routines for more platforms are relatively easy to
add by extending mysys/my_context.c, eg. similar to the Lua lcoco
library.
For testing, mysqltest and mysql_client_test are extended with the
option --non-blocking-api. This causes the programs to use the
non-blocking API for database access. mysql-test-run.pl has a similar
option --non-blocking-api that uses this, as well as additional
testcases.
An example program tests/async_queries.c is included that uses the new
non-blocking API with libevent to show how, in a single-threaded
program, to issue many queries in parallel against a database.
client/async_example.c:
Fix const warning
******
Fix bug with wrong timeout value for poll().
include/Makefile.am:
Fix missing include for `make dist`
include/mysql.h:
Add prototypes for all non-blocking API calls.
include/mysql.h.pp:
Add prototypes for all non-blocking API calls.
mysys/my_context.c:
Fix type warning for makecontext() function pointer argument.
sql-common/mysql_async.c:
Fix crashes in the non-blocking API for functions that can take MYSQL argument
that is NULL.
tests/Makefile.am:
Add header file to `make dist`
tests/mysql_client_test.c:
Replace blocking calls with wrappers around the non-blocking calls, used in
mysql_client_test to test the new non-blocking API.
tests/nonblock-wrappers.h:
Replace blocking calls with wrappers around the non-blocking calls, used in
mysql_client_test to test the new non-blocking API.
|
|\ \ \ \ \
| | |/ / /
| |/| | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
handle_segfault is the signal handler code of mysqld. however, it makes
calls to potentially unsafe functions localtime_r, fprintf, fflush.
include/my_stacktrace.h:
Add safe versions of itoa() write() and snprintf().
libmysqld/CMakeLists.txt:
Move signal handler to separate file.
mysys/stacktrace.c:
Remove unsafe function calls.
sql/CMakeLists.txt:
Move signal handler to separate file.
sql/mysqld.cc:
Move signal handler to separate file.
sql/set_var.h:
Add missing #include dependency.
sql/sys_vars.cc:
Cleanup .h and .cc files.
sql/sys_vars.h:
Cleanup .h and .cc files.
|
|\ \ \ \ \ |
|
| |\ \ \ \ \ |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
2. dialog plugin now always returns mysql->password if non-empty and the first question is of password type
3. split get_tty_password into get_tty_password_buff and strdup.
4. dialog plugin now uses get_tty_password by default
5. dialog.test
6. moved small tests of individual plugins into a dedicated suite
|
| |\ \ \ \ \ \
| | |/ / / / /
| | | | | | |
| | | | | | | |
no_error handling for select (used by INSERT ... SELECT) still needs to be fixed, but I will do that in a separate commit
|
| | |\ \ \ \ \ |
|