summaryrefslogtreecommitdiff
path: root/libmysql
Commit message (Collapse)AuthorAgeFilesLines
* remove libmysql/Sergei Golubchik2016-09-128-6061/+0
| | | | also disable server's client plugins when C/C has the same
* MDEV-9293 - Use MariaDB's Connector/C in serverVladislav Vaintroub2016-08-251-97/+0
|
* Revert "MDEV-9293 Connector/C integration"Vladislav Vaintroub2016-08-191-0/+97
| | | | This reverts commit 7b89b9f5108c80f4f270da922d7e6c182a663719.
* MDEV-9293 Connector/C integrationVladislav Vaintroub2016-08-191-97/+0
|
* MDEV-9872 - Add common optimized CRC32 function interfaceSergey Vojtovich2016-08-041-1/+1
| | | | | | | | Move crc32-vpmsum to extra. Compile static crc32-vpmsum instead of adding sources directly. Make use of crc32-vpmsum via my_checksum(). Based on contribution by Daniel Black.
* Merge branch '10.1' into 10.2Sergei Golubchik2016-06-303-27/+48
|\
| * MDEV-10034 Embedded server crashes on CREATE TABLE in PS protocolSergei Golubchik2016-05-071-9/+4
| | | | | | | | | | | | | | | | | | don't use MY_THREAD_SPECIFIC on the client side in embedded: 1. server memory accounting does not track client side memory 2. in not embedded builds, this still *might* be useful for plugins (handlersocket, connect, etc)
| * Merge branch '10.0' into 10.1Sergei Golubchik2016-05-042-18/+44
| |\
| | * Merge branch '5.5' into 10.0Sergei Golubchik2016-04-262-18/+44
| | |\
| | | * MDEV-5982 `make` fail @ ".../libmysql_versions.ld:155:9: invalid use of ↵Sergei Golubchik2016-04-192-18/+44
| | | | | | | | | | | | | | | | | | | | | | | | VERSION in input file" add a workaround for gold
| | | * MDEV-9024 Build fails with VS2015Sergei Golubchik2016-02-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cherry-pick f1daf9ce from 10.0 branch ------------------------------------- Fix build failures caused by new C runtime library - isnan, snprintf, struct timespec are now defined, attempt to redefine them leads - P_tmpdir, tzname are no more defined - lfind() and lsearch() in lf_hash.c had to be renamed, declaration conflicts with some C runtime functions with the same name declared in a header included by stdlib.h Also fix couple of annoying warnings : - remove #define NOMINMAX from config.h to avoid "redefined" compiler warnings(NOMINMAX is already in compile flags) - disable incremental linker in Debug as well (feature not used much and compiler crashes often) Also simplify package building with Wix, require Wix 3.9 or later (VS2015 is not compatible with old Wix 3.5/3.6)
* | | | MDEV-10138 Support for decimals up to 38 digitsMonty2016-06-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Decimals with float, double and decimal now works the following way: - DECIMAL_NOT_SPECIFIED is used when declaring DECIMALS without a firm number of decimals. It's only used in asserts and my_decimal_int_part. - FLOATING_POINT_DECIMALS (31) is used to mark that a FLOAT or DOUBLE was defined without decimals. This is regarded as a floating point value. - Max decimals allowed for FLOAT and DOUBLE is FLOATING_POINT_DECIMALS-1 - Clients assumes that float and double with decimals >= NOT_FIXED_DEC are floating point values (no decimals) - In the .frm decimals=FLOATING_POINT_DECIMALS are used to define floating point for float and double (31, like before) To ensure compatibility with old clients we do: - When storing float and double, we change NOT_FIXED_DEC to FLOATING_POINT_DECIMALS. - When creating fields from .frm we change for float and double FLOATING_POINT_DEC to NOT_FIXED_DEC - When sending definition for a float/decimal field without decimals to the client as part of a result set we convert NOT_FIXED_DEC to FLOATING_POINT_DECIMALS. - variance() and std() has changed to limit the decimals to FLOATING_POINT_DECIMALS -1 to not get the double converted floating point. (This was to preserve compatiblity) - FLOAT and DOUBLE still have 30 as max number of decimals. Bugs fixed: variance() printed more decimals than we support for double values. New behaviour: - Strings now have 38 decimals instead of 30 when converted to decimal - CREATE ... SELECT with a decimal with > 30 decimals will create a column with a smaller range than before as we are trying to preserve the number of decimals. Other changes - We are now using the obsolete bit FIELDFLAG_LEFT_FULLSCREEN to specify decimals > 31 - NOT_FIXED_DEC is now declared in one place - For clients, NOT_FIXED_DEC is always 31 (to ensure compatibility). On the server NOT_FIXED_DEC is DECIMAL_NOT_SPECIFIED (39) - AUTO_SEC_PART_DIGITS is taken from DECIMAL_NOT_SPECIFIED - DOUBLE conversion functions are now using DECIMAL_NOT_SPECIFIED instead of NOT_FIXED_DEC
* | | | General spell fixing in comments and stringsOtto Kekäläinen2016-06-081-1/+1
| | | |
* | | | Fix a typo: use __attribute__(...) not __attribute(...)Sergei Petrunia2016-04-061-1/+1
| | | |
* | | | Cleanups:Monty2016-04-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Removed some QQ markers - Removed some rows not compatible with valgrind 3.9.0 - Made mysql_install_db.sh more silent by default. --verbose now gives more information - Added assert that auto-increment doesn't generate 0 (safety) - Removed thd->set_time() in some places as it's set in init_for_queries() - Fixed some --big tests in tokudb - Fixed a bug in mysql_client_test.cc where sql_mode was not properly reset
* | | | Added new range of MariaDB error messages, starting from 3000Monty2016-04-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is done by splitting variables.errmsg and locale.errmsg to variables.errmsg_extra and locale.errmsg_extra The ER() macros in unireg.h now looks more complex than before, but this isn't critical as most usage of them are with constants and the compiler will remove most of the test code.
* | | | Merge branch '10.1' into 10.2Sergei Golubchik2016-03-231-1/+1
|\ \ \ \ | |/ / /
| * | | Merge branch '10.0' into 10.1Sergei Golubchik2016-03-211-1/+1
| |\ \ \ | | |/ /
| | * | Fix spelling: occurred, execute, which etcOtto Kekäläinen2016-03-041-1/+1
| | | |
* | | | Merge branch '10.1' into 10.2Sergei Golubchik2016-02-251-2/+4
|\ \ \ \ | |/ / /
| * | | Fixes needed to compile with musl C libraryMonty2016-02-071-2/+4
| | | | | | | | | | | | | | | | Patch originally by Codarren Velvindron
* | | | MDEV-9117: Client Server capability negotiation for MariaDB specific ↵Oleksandr Byelkin2016-02-021-1/+1
|/ / / | | | | | | | | | | | | | | | | | | functionality New capability flags space. Removed old progress flag, added new one.
* | | Merge branch '10.0' into 10.1Sergei Golubchik2015-12-211-2/+2
|\ \ \ | |/ /
| * | Merge branch '5.5' into 10.0Sergei Golubchik2015-12-131-2/+2
| |\ \ | | |/
| | * Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2015-12-091-2/+2
| | |\
| | | * Bug#21973610: BUFFER OVERFLOW ISSUESHarin Vadodaria2015-11-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Description : Incorrect usage of sprintf/strcpy caused possible buffer overflow issues at various places. Solution : - Fixed mysql_plugin and mysqlshow - Fixed regex library issues Reviewed-By : Georgi Kodinov <georgi.kodinov@oracle.com> Reviewed-By : Venkata S Murthy Sidagam <venkata.sidagam@oracle.com>
| | | * Backport from trunk:Tor Didriksen2014-05-072-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug#18187290 ISSUE WITH BUILDING MYSQL USING CMAKE 2.8.12 We want to upgrade to VS2013 on Windows. In order to do this, we need to upgrade to cmake 2.8.12 This has introduced some incompatibilities for .pdb files, and "make install" no longer works. To reproduce: cmake --build . --target package --config debug The fix: Rather than installing .pdb files for static libraries, we use the /Z7 flag to store symbolic debugging information in the .obj files.
| | | * BUG#18080920: CRASH; MY_REALLOC_STR DEREFERENCES NEGATIVE VALUE Nisha Gopalakrishnan2014-04-242-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | INTO CLIENT_ERRORS ARRAY Analysis: -------- The client may crash while executing a statement due to the missing mapping of the server error to it's equivalent client error. When trying to reallocate memory for the packet buffer, if the system is out of memory or the packet buffer is large, the server errors 'ER_OUT_OF_RESOURCES' or 'ER_PACKET_TOO_LARGE' is returned respectively. The client error number calculated is negative and when trying to dereference the array of client error messages with the calculated error number, the client crashes. Fix: ---- Map the server error returned to it's equivalent client error prior to dereferencing the array of client error messages. Note: Test case is not added since it is difficult to simulate the error condition.
| | | * Backport of Bug#16809055 MYSQL 5.6 AND 5.7 STILL USE LIBMYSQLCLIENT.SO.18Tor Didriksen2014-01-231-7/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backported only the softlink part of the patch, *not* the bumping of library version. With this patch, the libmysql/ directory contains: libmysqlclient.a libmysqlclient_r.a -> libmysqlclient.a libmysqlclient_r.so -> libmysqlclient.so* libmysqlclient_r.so.18 -> libmysqlclient.so.18* libmysqlclient_r.so.18.0.0 -> libmysqlclient.so.18.0.0* libmysqlclient.so -> libmysqlclient.so.18* libmysqlclient.so.18 -> libmysqlclient.so.18.0.0* libmysqlclient.so.18.0.0*
| | | * Updated/added copyright headersMurthy Narkedimilli2014-01-064-4/+4
| | | |
| | | * Bug 13878021 - WINDOWS PACKAGE THAT INCLUDES .PDB FILES FOR INTERMEDIATE ↵Sreedhar.S2013-10-092-0/+7
| | | | | | | | | | | | | | | | LIBRARIES USED
| | | * Fix for Bug 16395495 - OLD FSF ADDRESS IN GPL HEADERMurthy Narkedimilli2013-03-198-8/+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.
| | | * | 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.
| | | * | Updated/added copyright headersMySQL Build Team2012-02-161-1/+1
| | | |\ \ | | | | |/
| | | | * Updated/added copyright headersKent Boortz2011-07-032-4/+4
| | | | |\
| | | | | * Bug#11900714 REMOVE LGPL LICENSED FILES IN MYSQL 5.1Magne Mahre2011-03-282-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The LGPL license is used in some legacy code, and to adhere to current licensing polity, we remove those files that are no longer used, and reorganize the remaining LGPL code so it will be GPL licensed from now on. Note: This patch only removed LGPL licensed files in MySQL 5.1, and is the second of a set of patches to remove LGPL from all trees. (See Bug# 11840513 for details)
| | | * | | 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.
| | | * | | 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
| | | | | |
| | | * | | Bug#12612143 - LIBMYSQL 5.5.13 BREAKS USER APPLICATION BUILDRafal Somla2011-06-031-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the Windows authentication support has been added to libmysql, this library depends on the system Secur32 library. Consequently, clients which are linked against libmysql should be also linked with Secur32 (in addition to ws2_32). In MS VC++ it is possible to embed information about required libraries into object file using #pragma directive. This patch adds such directive when the Windows authentiaction support is compiled. This is similar to analogous #pragma for ws2_32 library in my_init.c