summaryrefslogtreecommitdiff
path: root/libmysql
Commit message (Collapse)AuthorAgeFilesLines
* mysql-5.5.31 mergeSergei Golubchik2013-05-071-1/+8
|\
| * Bug #14553380 MYSQL C API LIBRARY EXITS AT NET_CLEAR AT NET_SERV.CC:223Venkata Sidagam2013-01-101-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem description: When client loses the connection to the MySQL server or if the server gets shutdown after mysql_stmt_prepare() then the next mysql_stmt_prepare() will return an error(as expected) but consecutive call mysql_stmt_execute(), will crash the client program. The expected behavior would be, it should through an error. Analysis: The mysql_stmt_prepare() interns calls the function end_server() and net->vio and net->buff are freed and set to NULL. Then the next call mysql_stmt_execute() will interns call net_clear() where we are "net->vio" with out validating it. Fix: we are validating the net->vio, before calling net_clear().
| * merge 5.1 => 5.5Tor Didriksen2012-11-011-1/+1
| |\
| | * Bug#14840488 VALGRIND ERRORS IN MYSQL_CLIENT_TESTTor Didriksen2012-11-011-1/+1
| | | | | | | | | | | | | | | | | | Add missing DBUG_RETURNs, otherwise the debug-stack gets messed up, and _db_enter_ and _db_exit_ will access data outside the current stack frame.
* | | Fixes for Windows XPVladislav Vaintroub2013-03-261-7/+8
| | |
* | | MDEV-4330 - get_tty_password() does not work if input redirection is used.Vladislav Vaintroub2013-03-261-2/+3
| | | | | | | | | | | | | | | | | | The reason is the limitation of ReadConsole() API, it returns error if handle to redirected input is used. The fix is to use a handle returned by CreateFile("CONIN$",...), rather than GetStdHandle(STD_HANDLE_INPUT) to get the true console handle.
* | | MDEV-4216 : export additional functions ↵Vladislav Vaintroub2013-03-011-2/+3
| | | | | | | | | | | | | | | | | | mysql_get_timeout_value(),mysql_get_timeout_value_ms(), mysql_get_socket() from shared client library. They are documented as part of async API. Also, remove functions mysql_close_slow_part_start() and mysql_close_slow_part_cont() from exports - they are not documented anywhere.
* | | MDEV-4021 : Enable Ctrl-C handler when reading password, on Windows.Vladislav Vaintroub2013-02-211-4/+27
| | | | | | | | | | | | | | | Prior to this patch, _getch() was used to read password input from console. getch() has a property that it reads Ctrl-C as character with ASCII code 0x03, and disregards Ctrl-C handler for current process. The fix is to use ReadConsole() API instead of getch() , after setting console mode to ENABLE_PROCESSED_INPUT - this mode allows current process to handle Ctrl-C events.
* | | fix typoVladislav Vaintroub2013-02-181-1/+1
| | |
* | | MDEV-4183: Export additional symbols from RPMs , compatibly to distribution ↵Vladislav Vaintroub2013-02-182-3/+7
| | | | | | | | | | | | | | | | | | | | | RPMs. -Ensure that symbols listed in CLIENT_API_EXTRA are not thrown away by the linker. -Add THR_KEY_mysys to this list, because Fedora18 exports it.
* | | MDEV-4127 : Export additional symbols when building RPM,Vladislav Vaintroub2013-02-042-4/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to enable both recompiling mysqli or odbc from sources in addition to drop-in replacement functionality. The case in question is compiling mysqli from sources, that needs client_errors via ER() macro. Previously, we exported it as mysql_client_errors (compatibly to Fedora's style symbol renaming, see MDEV-3842). However, if MariaDB header files are used when compiling mysqli, client_errors needs to be exported with its original name.
* | | MDEV-4091: Dynamic columns C functions should be included in libmysqlclientunknown2013-01-281-0/+10
| | |
* | | MDEV-3842, MDEV-3923 :Vladislav Vaintroub2013-01-253-5/+248
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | MDEV-546 : error when compiling client library - incorrect client_settings.hVladislav Vaintroub2012-09-251-1/+0
| | | | | | | | | | | | Remove sql directory from the include path to workaround the problem. This removes the ambiguity , since then only one client_settings.h will be in the include paths
* | | merge with MySQL 5.5.27Sergei Golubchik2012-08-091-4/+5
|\ \ \ | |/ / | | | | | | manually checked every change, reverted incorrect or stupid changes.
| * | merge bug#13708485 5.1->5.5Georgi Kodinov2012-06-291-4/+4
| |\ \ | | |/
| | * Bug #13708485: malformed resultset packet crashes clientGeorgi Kodinov2012-06-281-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several fixes : * sql-common/client.c Added a validity check of the fields metadata packet sent by the server. Now libmysql will check if the length of the data sent by the server matches what's expected by the protocol before using the data. * client/mysqltest.cc Fixed the error handling code in mysqltest to avoid sending new commands when the reading the result set failed (and there are unread data in the pipe). * sql_common.h + libmysql/libmysql.c + sql-common/client.c unpack_fields() now generates a proper error when it fails. Added a new argument to this function to support the error generation. * sql/protocol.cc Added a debug trigger to cause the server to send a NULL insted of the packet expected by the client for testing purposes.
* | | MDEV-419 ensure that all HAVE_XXX constants can be set by cmakeSergei Golubchik2012-07-311-4/+0
| | | | | | | | | | | | | | | add missing checks to configure.cmake remove dead code and unused HAVE_xxx constants from the sources
* | | mysql-5.5.22 mergeSergei Golubchik2012-03-281-1/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-161-1/+1
| |\ \ | | |/
* | | merge with mysql-5.5.21Sergei Golubchik2012-03-091-0/+2
|\ \ \ | |/ /
| * | Bug#13604121 - LIBMYSQLCIENT.SO MISSING SOME FUNCTIONS PRESENT IN ↵Tor Didriksen2012-01-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LIBMYSQLCLIENT.A +get_tty_password this is the only external symbol in get_password.c, which is explicitly listed in CLIENT_SOURCES +handle_options this is in mysys/my_getopt.c adding this sysmbol pulls in the other externals: T getopt_compare_strings T getopt_double_limit_value T getopt_ll_limit_value T getopt_ull_limit_value T handle_options T my_cleanup_options T my_getopt_register_get_addr T my_print_help T my_print_variables
| * | Bug#13101974 SLAVE CAN'T CONNECT AS REPLICATION USER USING WINDOWS AUTH PLUGINRafal Somla2011-11-171-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | Problem was that built-in client-side support for Windows Native Authentication (WNA) was included only in the client library, but not into the server code (which also uses some of the sources from the client library). This is fixed by modyfying sql/CMakeLists.txt to include the client-side WNA plugin library and enable WNA related code by defining AUTHENTICATION_WIN macro. Also, the logic of libmysql/CMakeLists.txt is simplified a bit.
* | | Merge latest MariaDB 5.5 into MWL#192: Non-blocking client library.unknown2012-02-221-8/+4
|\ \ \
| * \ \ 5.3.4 mergeSergei Golubchik2012-02-151-8/+4
| |\ \ \
| | * \ \ Merge 5.2->5.3 in preparation for the release of mariadb-5.3.4-rc.Igor Babaev2012-02-011-8/+4
| | |\ \ \
| | | * | | fixes for get_password():Sergei Golubchik2012-01-121-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. on windows: don't hang when there's no console, that is, _getch() returns -1. 2. on windows: _getch() returns an int, not char. to distinguish between (char)255 and (int)-1 3. everywhere. isspace(pos[-1]) == ' ' never worked, isspace() returns a boolean, not a char. the never-worked loop was removed to preserve the existing behavior.
* | | | | | Merge MWL#192: Non-blocking client library, into MariaDB 5.5.unknown2012-02-211-0/+1
|\ \ \ \ \ \ | |/ / / / / |/| | | | |
| * | | | | MWL#192: Non-blocking client API for libmysqlclient.unknown2011-09-202-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | fixes for non-debug builds (CMAKE_BUILD_TYPE=Release or RelWithDebInfo)Sergei Golubchik2012-01-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | client/CMakeLists.txt: 1. -rdynamic is a linker flag. 2. it should be used in all builds, not debug only libmysql/get_password.c: prefer a standard function, when possible (otherwise a plugin will need to load it from the client)
* | | | | | 5.3 mergeSergei Golubchik2012-01-133-17/+18
|\ \ \ \ \ \ | | |/ / / / | |/| | | |
| * | | | | 5.2->5.3 mergeSergei Golubchik2011-12-122-16/+16
| |\ \ \ \ \ | | | |/ / / | | |/| | |
| | * | | | 1. add --plugin-dir and --default-auth to mysqltest.Sergei Golubchik2011-12-022-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-115-11/+13
| |\ \ \ \ \ | | |/ / / / | | | | | | | | | | | | 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-245-11/+13
| | |\ \ \ \ | | | |/ / / | | |/| | |
| | | * | | Initail merge with MySQL 5.1 (XtraDB still needs to be merged)Michael Widenius2011-11-215-11/+13
| | | |\ \ \ | | | | | |/ | | | | |/| | | | | | | Fixed up copyright messages.
| | | | * | Updated/added copyright headersKent Boortz2011-07-032-4/+4
| | | | |\ \
* | | | | | | few cmake/compiler warningsSergei Golubchik2011-11-031-1/+0
| | | | | | |
* | | | | | | mergeSergei Golubchik2011-11-031-1/+1
|\ \ \ \ \ \ \
| * | | | | | | build on windowsSergei Golubchik2011-11-021-1/+1
| | | | | | | |
* | | | | | | | mysql-5.5.18 mergeSergei Golubchik2011-11-034-8/+13
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | / | | |_|_|_|_|/ | |/| | | | |
| * | | | | | Bug#12982926 CLIENT CAN OVERRIDE ZERO-LENGTH-ALLOCATE BUFFERRafal Somla2011-09-291-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes in client plugin needed for testing the issue (test instrumentation).
| * | | | | | merge from 5.5.16Daniel Fischer2011-09-214-33/+61
| |\ \ \ \ \ \
| | * | | | | | Bug#12873214 WINDOWS AUTHENTICATION PLUGIN PRODUCES EXCESSIVE RECORDS IN ↵Rafal Somla2011-09-074-33/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SERVER ERROR LOG Changed semantics of AUTHENTICATION_WIN_LOG environment variable recognized by client library to accept the following values which are levels of logging done during Windows authentication handshake: 0 - no logging 1 - log only error messages 2 - additionally log warnings 3 - additionally log info notes 4 - also log debug messages Setting it to 'on', 'yes' or 'true' will request log level 2 and setting it to 'debug' or 'dbug' will request log level 4.
| * | | | | | | Bug#12897501 REPLICATION DOES NOT SUPPORT WINDOWS AUTH PLUG-IN Rafal Somla2011-09-141-0/+5
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Connection of slave to master using a replication account which authenticates with an external plugin was not possible. Fixed by making sure that the CLIENT_PLUGIN_AUTH capability is set when client connects using mysql_real_connect(). Also, a plugin-dir path used by client library to locate authentication plugins is set based on the analogous server setting. This is done in connect_to_master() function before a call to mysql_real_connect().
| * | | | | | Updated/added copyright headersKent Boortz2011-06-304-8/+8
| |\ \ \ \ \ \ | | | |_|_|/ / | | |/| | | |
| | * | | | | Updated/added copyright headersKent Boortz2011-06-304-10/+12
| | |\ \ \ \ \
| | | * | | | | Updated/added copyright headersKent Boortz2011-06-303-7/+10
| | | | | | | |
* | | | | | | | merge with 5.3Sergei Golubchik2011-10-191-5/+15
|\ \ \ \ \ \ \ \ | | |_|_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sql/sql_insert.cc: CREATE ... IF NOT EXISTS may do nothing, but it is still not a failure. don't forget to my_ok it. ****** CREATE ... IF NOT EXISTS may do nothing, but it is still not a failure. don't forget to my_ok it. sql/sql_table.cc: small cleanup ****** small cleanup
| * | | | | | | merge Windows performance patches into 5.3Vladislav Vaintroub2011-07-051-0/+1
| |\ \ \ \ \ \ \