summaryrefslogtreecommitdiff
path: root/libmysqld
Commit message (Collapse)AuthorAgeFilesLines
* merge with MySQL 5.5.27Sergei Golubchik2012-08-091-2/+2
|\ | | | | | | manually checked every change, reverted incorrect or stupid changes.
| * mysql_client_test did not build within limbysqld/examplesBjorn Munch2012-07-101-0/+1
| |\
| | * mysql_client_test did not build within limbysqld/examplesBjorn Munch2012-07-102-2/+4
| | |
* | | Building RPMs with CPackSergei Golubchik2012-05-222-3/+3
| | | | | | | | | | | | configure with cmake -DRPM=distro
* | | cSergei Golubchik2012-05-211-0/+2
|\ \ \ | |/ /
| * | BUG#13738989 : 62136 : FAILED TO FETCH SELECT RESULT USING EMBEDDED MYSQLDMayank Prasad2012-04-061-0/+2
| |\ \ | | |/ | | | | | | Merge : 5.1->5.5
| | * BUG#13738989 : 62136 : FAILED TO FETCH SELECT RESULT USING EMBEDDED MYSQLDMayank Prasad2012-04-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-5.5.22 mergeSergei Golubchik2012-03-282-2/+2
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | Updated/added copyright headersMySQL Build Team2012-02-162-2/+2
| |\ \ | | |/
| | * Updated/added copyright headersKent Boortz2012-02-151-2/+1
| | |\
| | * | Bug#11761576 54082: HANDLE_SEGFAULT MAKES USE OF UNSAFE FUNCTIONSTor Didriksen2011-11-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | MDEV-15 Log all sql errors.Alexey Botchkov2012-03-241-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Reduce size of windows MSI by approx. 50%Vladislav Vaintroub2012-03-161-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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.
* | | | Fix compile error - linker does not find extern variables, in sql_logger.cVladislav Vaintroub2012-03-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | MDEV-15 Log SQL errors.Alexey Botchkov2012-03-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge MWL#192: Non-blocking client library, into MariaDB 5.5.unknown2012-02-211-1/+1
|\ \ \ \
| * | | | MWL#192: Non-blocking client API for libmysqlclient.unknown2011-09-202-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | mysql-5.5 mergeSergei Golubchik2012-01-161-0/+1
|\ \ \ \ \ | | |/ / / | |/| | |
| * | | | Bug#11761576 54082: HANDLE_SEGFAULT MAKES USE OF UNSAFE FUNCTIONSTor Didriksen2011-12-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | 5.3 mergeSergei Golubchik2012-01-131-1/+1
|\ \ \ \ \
| * \ \ \ \ 5.2->5.3 mergeSergei Golubchik2011-12-121-1/+1
| |\ \ \ \ \
| | * | | | | 1. add --plugin-dir and --default-auth to mysqltest.Sergei Golubchik2011-12-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | | | Merge with 5.2.Michael Widenius2011-12-1111-13/+110
| |\ \ \ \ \ \ | | |/ / / / / | | | | | | | | | | | | | | no_error handling for select (used by INSERT ... SELECT) still needs to be fixed, but I will do that in a separate commit
| | * | | | | Merge with MariaDB 5.1Michael Widenius2011-11-2411-13/+110
| | |\ \ \ \ \
| | | * \ \ \ \ Initail merge with MySQL 5.1 (XtraDB still needs to be merged)Michael Widenius2011-11-2111-13/+110
| | | |\ \ \ \ \ | | | | | |_|/ / | | | | |/| | | | | | | | | | | Fixed up copyright messages.
| | | | * | | | Updated/added copyright headersKent Boortz2011-07-031-2/+26
| | | | |\ \ \ \
| | | | | * | | | Bug#11764633 : 57491: THD->MAIN_DA.IS_OK() ASSERT IN EMBEDDEDMayank Prasad2011-05-181-2/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue: While running embedded server, if client issues TEE command (\T foo/bar) and "foo/bar" directory doesn't exist, it is suppose to give error. But it was aborting. This was happening because wrong error handler was being called. Solution: Modified calls to correct error handler. In embedded server case, there are two error handler (client and server) which are supposed to be called based on which context code is in. If it is in client context, client error handler should be called otherwise server. Test case: Test case automation is not possible as current (following) code doesn't allow '\T' to be executed from command line (OR command read from a file): [client/mysql.cc] ... static int com_tee(String *buffer __attribute__((unused)), char *line __attribute__((unused))) { char file_name[FN_REFLEN], *end, *param; if (status.batch) << THIS IS TRUE WHILE EXECUTING FROM COMMAND LINE. return 0; ... So, not adding test case in GA. WIll add a test case in mysql-trunk after removing above code so that this could be properly tested before GA. libmysqld/lib_sql.cc: Added code to call client/server error handler based on in control is in client/server code respectively. sql/mysql_priv.h: Added comments for THR_THD, THR_MALLOC keys. sql/sql_class.cc: Function definition of new function restore_global to removes thread specific data from stack (which was stored in store global). sql/sql_class.h: Function declaration of new function restore_global.
* | | | | | | | | always use sql/sql_string.* files, never - client/sql_string.*Sergei Golubchik2011-12-151-0/+1
| | | | | | | | |
* | | | | | | | | new configure option: NOT_FOR_DISTRIBUTIONSergei Golubchik2011-12-141-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix safemalloc to compile w/o libbfd. CMakeLists.txt: NOT_FOR_DISTRIBUTION option cmake/readline.cmake: simplify libedit/readline detection. never use bundled libedit. use system readline v6 only if NOT_FOR_DISTRIBUTION=1 configure.cmake: use libbfd only if NOT_FOR_DISTRIBUTION=1 include/my_stacktrace.h: link with libbfd even w/o safemalloc.
* | | | | | | | | mergedSergei Golubchik2011-11-271-0/+3
|\ \ \ \ \ \ \ \ \
| * | | | | | | | | Avoid mysqld dependency on libaio.so by linking xtradb statically to libaio. Vladislav Vaintroub2011-11-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A variable XTRADB_PREFER_STATIC_LIBAIO should be set to 1 (or TRUE or ON) for static linking. Even if mysqld can avoid dependency on shared libaio, shared libraries libmysqld.so or ha_innodb.so cannot link without it. Given that the patch primarily addresses building tar.gz package, and shared libraries mentioned above deemed less important than mysqld executable, we accept shared lib dependency on libaio.so
* | | | | | | | | | 5.3->5.5 mergeSergei Golubchik2011-11-271-0/+1
|\ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / |/| / / / / / / / / | |/ / / / / / / /
| * | | | | | | | merging.Alexey Botchkov2011-11-121-15/+12
| |\ \ \ \ \ \ \ \
| | * \ \ \ \ \ \ \ mergeSergei Golubchik2011-10-111-15/+12
| | |\ \ \ \ \ \ \ \ | | | |/ / / / / / /
| | | * | | | | | | merge with 5.1Sergei Golubchik2011-10-071-15/+12
| | | |\ \ \ \ \ \ \ | | | | |/ / / / / / | | | | | | | | / / | | | | |_|_|_|/ / | | | |/| | | | |
| | | | * | | | | support for plugins on windowsSergei Golubchik2011-10-041-15/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CMakeLists.txt: 1. add -DSAFEMALLOC -DSAFE_MUTEX in the top-level CMakeLists.txt don't force plugins to copy-paste these lines in their CMakeLists.txt 2.1 search plugin/* for plugins (not only storage/*), 2.2 recognize MYSQL_PLUGIN (not only MYSQL_STORAGE_ENGINE), 2.3 extract library names from the plug.in (don't force library names to be ha_<engine>.dll and <engine>.lib) include/mysql/plugin.h: define MYSQL_PLUGIN_EXPORT appropriately (backport from 5.5) libmysqld/CMakeLists.txt: remove unnecessary workaround plugin/fulltext/CMakeLists.txt: build fulltext example plugin on windows storage/maria/CMakeLists.txt: The library is called libmaria_s.lib, not maria.lib storage/maria/unittest/CMakeLists.txt: The library is called libmaria_s.lib, not maria.lib storage/myisam/CMakeLists.txt: The library is called libmyisam_s.lib, not myisam.lib storage/mysql_storage_engine.cmake: introduce MYSQL_PLUGIN macro. don't force library names to be ha_<engine>.dll and <engine>.lib storage/xtradb/CMakeLists.txt: remove a condition from include win/README: don't use deprecated syntax win/configure-mariadb.sh: don't use deprecated syntax win/configure.js: 1. support MYSQL_PLUGIN in addition to MYSQL_STORAGE_ENGINE. 2. support plugin/* in addition to storage/*
| * | | | | | | | gis-related tests fixes.Alexey Botchkov2011-06-204-3/+5
| |\ \ \ \ \ \ \ \ | | |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | merging.
| * | | | | | | | Precise GIS functions added.Alexey Botchkov2011-05-042-0/+2
| | | | | | | | |
* | | | | | | | | mergedSergei Golubchik2011-11-2211-21/+81
|\ \ \ \ \ \ \ \ \
| * | | | | | | | | few cmake/compiler warningsSergei Golubchik2011-11-031-2/+1
| | | | | | | | | |
| * | | | | | | | | mergeSergei Golubchik2011-11-031-2/+3
| |\ \ \ \ \ \ \ \ \
| * \ \ \ \ \ \ \ \ \ mysql-5.5.18 mergeSergei Golubchik2011-11-0310-19/+80
| |\ \ \ \ \ \ \ \ \ \ | | | |_|_|_|_|_|_|/ / | | |/| | | | | | | |
| | * | | | | | | | | #41836: Eventum Request to enable the mysql_embedded binarySunanda Menon2011-07-191-3/+1
| | | | | | | | | | |
| | * | | | | | | | | Bug#12727287: Maintainer mode compilation fails with gcc 4.6Davi Arnaut2011-07-071-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC 4.6 has new -Wunused-but-set-variable flag, which is enabled by -Wall, that causes GCC to emit a warning whenever a local variable is assigned to, but otherwise unused (aside from its declaration). Since the maintainer mode uses -Wall and -Werror, source code which triggers these warnings will be rejected. That is, these warnings become hard errors. The solution is to fix the code which triggers these specific warnings. In most of the cases, this is a welcome cleanup as code which triggers this warning is probably dead anyway. dbug/dbug.c: Unused but set. libmysqld/lib_sql.cc: Length is not necessary as the converted error message is always null-terminated. sql/item_func.cc: Make get_var_with_binlog private to this compilation unit. If a error was raised, do not attempt to evaluate the user variable as the statement execution will be interrupted anyway. sql/mysqld.cc: Use a void expression to silence the warning. Avoids the use of macros that would make the code more unreadable than it already is. sql/protocol.cc: Length is not necessary as the converted error message is always null-terminated. Remove unnecessary casts and assignment. sql/sql_class.h: Function is only used in a single compilation unit. sql/sql_load.cc: Only use the variable outside of EMBEDDED_LIBRARY. storage/innobase/btr/btr0cur.c: Do not retrieve field, only the record length is being used. storage/perfschema/pfs.cc: Use a void expression to silence the warning. tests/mysql_client_test.c: Unused but set. unittest/mysys/lf-t.c: Unused but set.
| | * | | | | | | | | Updated/added copyright headersKent Boortz2011-07-041-2/+2
| | |\ \ \ \ \ \ \ \ \
| | * \ \ \ \ \ \ \ \ \ Updated/added copyright headersKent Boortz2011-06-308-8/+72
| | |\ \ \ \ \ \ \ \ \ \ | | | | |_|_|_|_|_|/ / / | | | |/| | | | | | | |
| | | * | | | | | | | | Updated/added copyright headersKent Boortz2011-06-3010-11/+84
| | | |\ \ \ \ \ \ \ \ \ | | | | |_|_|_|_|_|_|/ / | | | |/| | | | | | | / | | | | | |_|_|_|_|_|/ | | | | |/| | | | | |
| | | | * | | | | | | Updated/added copyright headersKent Boortz2011-06-302-5/+7
| | | | | | | | | | |
* | | | | | | | | | | For libmysqld.so, apply patch to the MySQL Bug#39288 found hereVladislav Vaintroub2011-11-081-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | http://lists.mysql.com/commits/102373 It is better than previous attempts to build the libmysqld, as it also takes care of 1) -Wl,--no-undefined for shared libraries and 2) CLEAN_DIRECT_OUTPUT since there are now 2 libraries with the same base output name
* | | | | | | | | | | add version to the libmysqld.soVladislav Vaintroub2011-11-071-1/+1
| | | | | | | | | | |