summaryrefslogtreecommitdiff
path: root/libmysql
Commit message (Collapse)AuthorAgeFilesLines
* auto-mergeIgnacio Galarza2009-03-191-2/+2
|\
| * Fix for bug #21205: Different number of digits for float/double/real in ↵Alexey Kopytov2009-01-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | --ps-protocol Various parts of code used different 'precision' arguments for sprintf("%g") when converting floating point numbers to a string. This led to differences in results in some cases depending on whether the text-based or prepared statements protocol is used for a query. Fixed by changing arguments to sprintf("%g") to always be 15 (DBL_DIG) so that results are consistent regardless of the protocol. This patch will be null-merged to 6.0 as the problem does not exists there (fixed by the patch for WL#2934).
* | Bug#29125 Windows Server X64: so many compiler warningsIgnacio Galarza2009-02-102-5/+5
|/ | | | | - Remove bothersome warning messages. This change focuses on the warnings that are covered by the ignore file: support-files/compiler_warnings.supp. - Strings are guaranteed to be max uint in length
* Bug#37226 Explicit call of my_thread_init() on Windows for every new thread.Vladislav Vaintroub2008-09-011-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | Bug#33031 app linked to libmysql.lib crash if run as service in vista under localsystem There are some problems using DllMain hook functions on Windows that automatically do global and per-thread initialization for libmysqld.dll 1)per-thread initialization(DLL_THREAD_ATTACH) MySQL internally counts number of active threads that and causes a delay in in my_end() if not all threads are exited. But,there are threads that can be started either by Windows internally (often in TCP/IP scenarios) or by user himself - those threads are not necessarily using libmysql.dll functionality, but nonetheless the contribute to the count of open threads. 2)process-initialization (DLL_PROCESS_ATTACH) my_init() calls WSAStartup that itself loads DLLs and can lead to a deadlock in Windows loader. Fix is to remove dll initialization code from libmysql.dll in general case. I still leave an environment variable LIBMYSQL_DLLINIT, which if set to any value will cause the old behavior (DLL init hooks will be called). This env.variable exists only to prevent breakage of existing Windows-only applications that don't do mysql_thread_init() and work ok today. Use of LIBMYSQL_DLLINIT is discouraged and it will be removed in 6.0
* fixed warnings and compile errors from the fix for bug 26243gkodinov/kgeorge@macbook.gmz2008-03-291-1/+1
|
* Merge amd64.(none):/src/mysql-5.0-bugteamiggy@amd64.(none)2008-03-281-4/+0
|\ | | | | | | into amd64.(none):/src/bug26243/my50-bug26243
| * Bug#26243 mysql command line crash after control-ciggy@amd64.(none)2008-03-281-4/+0
| | | | | | | | | | - Backported the 5.1 DBUG to 5.0. - Avoid memory cleanup race on Windows client for CTRL-C
* | Merge quad.opbmk:/mnt/raid/alik/MySQL/devel/5.0anozdrin/alik@quad.opbmk2008-03-181-5/+12
|\ \ | |/ |/| | | into quad.opbmk:/mnt/raid/alik/MySQL/devel/5.0-rt-merged
| * Bug#35103 mysql_client_test::test_bug29948 causes sporadic failuresdavi@mysql.com/endora.local2008-03-141-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was that the COM_STMT_SEND_LONG_DATA was sending a response packet if the prepared statement wasn't found in the server (due to reconnection). The commands COM_STMT_SEND_LONG_DATA and COM_STMT_CLOSE should not send any packets, even error packets should not be sent since they are not expected by the client API. The solution is to clear generated during the execution of the aforementioned commands and to skip resend of prepared statement commands. Another fix is that if the connection breaks during the send of prepared statement command, the command is not sent again since the prepared statement is no longer in the server.
* | Bug #25097 mysql_server_init fails silently if no errmsg.sys is present.holyfoot/hf@mysql.com/hfmain.(none)2008-02-271-1/+1
|/ | | | | | | There was no way to return an error from the client library if no MYSQL connections was established. So here i added variables to store that king of errors and made functions like mysql_error(NULL) to return these.
* Merge mysql.com:/home/gluh/MySQL/Merge/5.0gluh@eagle.(none)2007-12-133-179/+1
|\ | | | | | | into mysql.com:/home/gluh/MySQL/Merge/5.0-opt
| * Merge polly.(none):/home/kaa/src/opt/bug32221/my50-bug31445kaa@polly.(none)2007-11-223-179/+1
| |\ | | | | | | | | | into polly.(none):/home/kaa/src/opt/mysql-5.0-opt
| | * Fix for bug #32221: bug25714, mytest, mysql_client_test complaints andkaa@polly.(none)2007-11-193-179/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | crashes. MySQL distributions contain a number of programs that are used only by the MySQL test suite internally, i.e. they are not indended to be invoked directly by a user. As a result, such programs are not documented, do not have any built-in help or proper error reporting, which may confuse users. This patch fixes the problem with the following changes: - mytest, libmysqltest and all references to them were removed from the distribution since they are not used anymore - bug25714 now displays an error message when run with incorrect arguments or with the --help option - mysql_client_test now does not call abort() in case of errors, instead it does a clean exit() with a proper error status.
* | | Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.0tsmith@ramayana.hindu.god2007-12-072-73/+0
|\ \ \ | | | | | | | | | | | | into ramayana.hindu.god:/home/tsmith/m/bk/maint/50
| * | | Bug#29592 SQL Injection issuedavi@mysql.com/endora.local2007-11-262-73/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the mysql_odbc_escape_string() function. The function has multi-byte character escaping issues, doesn't honor the NO_BACKSLASH_ESCAPES mode and is not used anymore by the Connector/ODBC as of 3.51.17.
* | | | Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.0tsmith@ramayana.hindu.god2007-12-043-5/+8
|\ \ \ \ | |/ / / | | | | | | | | into ramayana.hindu.god:/home/tsmith/m/bk/maint/50
| * | | Merge ramayana.hindu.god:/home/tsmith/m/bk/build/50-fixtsmith@ramayana.hindu.god2007-11-091-1/+1
| |\ \ \ | | | | | | | | | | | | | | | into ramayana.hindu.god:/home/tsmith/m/bk/build/50
| | * | | Fix Windows build problems.tsmith@ramayana.hindu.god2007-11-091-1/+1
| | | | |
| * | | | Merge trift2.:/MySQL/M50/mysql-5.0joerg@trift2.2007-11-081-1/+1
| |\ \ \ \ | | |/ / / | | | / / | | |/ / | |/| | into trift2.:/MySQL/M50/push-5.0
| | * | Merge ramayana.hindu.god:/home/tsmith/m/bk/build/50tsmith@ramayana.hindu.god2007-11-071-1/+1
| | |\ \ | | | | | | | | | | | | | | | into ramayana.hindu.god:/home/tsmith/m/bk/build/b20748/50
| | | * | Bug #20748: Configuration files should not be read more than oncetsmith@ramayana.hindu.god2007-11-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A user could not override system-wide settings in their ~/.my.cnf, because the DEFAULT_SYSCONFDIR was being searched last. Also, in some configurations (especially when the --sysconfdir compile-time option is set to /etc or /etc/mysql), the system-wide my.cnf file was read multiple times, causing confusion and potential problems. Rearrange default directories to conform to the manual and logic. Move --sysconfdir=<path> (DEFAULT_SYSCONFDIR) from the last default directory to the middle of the list. $HOME/.my.cnf should be last, so the user is able to override the system-wide settings. Change init_default_directories() to remove duplicates from the list.
| * | | | Merge moksha.local:/Users/davi/mysql/bugs/31669-5.0davi@moksha.com.br2007-10-301-3/+4
| |\ \ \ \ | | |/ / / | |/| | | | | | | | into moksha.local:/Users/davi/mysql/mysql-5.0-runtime
| | * | | Bug#31669 Buffer overflow in mysql_change_user()davi@moksha.local/moksha.com.br2007-10-231-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is that when copying the supplied username and database, no bounds checking is performed on the fixed-length buffer. A sufficiently large (> 512) user string can easily cause stack corruption. Since this API can be used from PHP and other programs, this is a serious problem. The solution is to increase the buffer size to the accepted size in similar functions and perform bounds checking when copying the username and database.
| * | | | Merge mysql.com:/home/gluh/MySQL/Merge/5.0gluh@eagle.(none)2007-10-231-0/+2
| |\ \ \ \ | | |/ / / | |/| | / | | | |/ | | |/| into mysql.com:/home/gluh/MySQL/Merge/5.0-opt
| | * | Merge mysql.com:/home/gluh/MySQL/Merge/5.0gluh@eagle.(none)2007-10-101-0/+2
| | |\ \ | | | |/ | | |/| | | | | into mysql.com:/home/gluh/MySQL/Merge/5.0-opt
| | | * Bug#27216: functions with parameters of different date types may return wrongevgen@sunlight.local2007-09-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | type of the result. There are several functions that accept parameters of different types. The result field type of such functions was determined based on the aggregated result type of its arguments. As the DATE and the DATETIME types are represented by the STRING type, the result field type of the affected functions was always STRING for DATE/DATETIME arguments. The affected functions are COALESCE, IF, IFNULL, CASE, LEAST/GREATEST, CASE. Now the affected functions aggregate the field types of their arguments rather than their result types and return the result of aggregation as their result field type. The cached_field_type member variable is added to the number of classes to hold the aggregated result field type. The str_to_date() function's result field type now defaults to the MYSQL_TYPE_DATETIME. The agg_field_type() function is added. It aggregates field types with help of the Field::field_type_merge() function. The create_table_from_items() function now uses the item->tmp_table_field_from_field_type() function to get the proper field when the item is a function with a STRING result type.
* | | | Fixed the Windows build failures introduced by the patch for bug #31207: ↵kaa@polly.(none)2007-10-221-1/+1
| | | | | | | | | | | | | | | | Test "join_nested" shows different strategy on IA64 CPUs / Intel's ICC compiler.
* | | | Merge polly.(none):/home/kaa/src/maint/bug31207/my50-bug31174kaa@polly.(none)2007-10-181-1/+1
|\ \ \ \ | |/ / / |/| | | | | | | into polly.(none):/home/kaa/src/maint/mysql-5.0-maint
| * | | Fix for bug #31207: Test "join_nested" shows different strategy on IA64kaa@polly.(none)2007-10-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CPUs / Intel's ICC compile The bug is a combination of two problems: 1. IA64/ICC MySQL binaries use glibc's qsort(), not the one in mysys. 2. The order relation implemented by join_tab_cmp() is not transitive, i.e. it is possible to choose such a, b and c that (a < b) && (b < c) but (c < a). This implies that result of a sort using the relation implemented by join_tab_cmp() depends on the order in which elements are compared, i.e. the result is implementation-specific. Since choose_plan() uses qsort() to pre-sort the join tables using join_tab_cmp() as a compare function, the results of the sorting may vary depending on qsort() implementation. It is neither possible nor important to implement a better ordering algorithm in join_tab_cmp(). Therefore the only way to fix it is to force our own qsort() to be used by renaming it to my_qsort(), so we don't depend on linker to decide that. This patch also "fixes" bug #20530: qsort redefinition violates the standard.
* | | | Fix syntax error build problem on Windows (variable was definedtsmith@ramayana.hindu.god2007-10-171-7/+11
| | | | | | | | | | | | | | | | in middle of block)
* | | | Merge pilot.mysql.com:/data/msvensson/mysql/bug11589/my50-test_latestmsvensson@pilot.mysql.com2007-10-151-1/+9
|\ \ \ \ | |/ / / |/| | | | | | | into pilot.mysql.com:/data/msvensson/mysql/mysql-5.0-maint
| * | | Merge neptunus.(none):/home/msvensson/mysql/bug11589/my50-bug11589msvensson@neptunus.(none)2006-06-121-1/+9
| |\ \ \ | | | | | | | | | | | | | | | into neptunus.(none):/home/msvensson/mysql/bug11589/my50-test_latest
| | * | | Bug#11589 mysqltest, --ps-protocol, strange output, float/double/real with ↵msvensson@neptunus.(none)2006-02-211-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | zerofill - Add zerofill in client if real/float/double is bound to string and fetched using binary protocol.
* | | | | Merge ramayana.hindu.god:/home/tsmith/m/bk/50tsmith@ramayana.hindu.god2007-09-281-1/+1
|\ \ \ \ \ | | |_|/ / | |/| | | | | | | | into ramayana.hindu.god:/home/tsmith/m/bk/maint/50
| * | | | libmysql/libmysql.c : Correct a wrong automerge: Don't duplicate ↵joerg@trift2.2007-09-051-1/+0
| | | | | | | | | | | | | | | | | | | | "DBUG_ENTER()".
| * | | | Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0.48df@pippilotta.erinye.com2007-09-041-1/+3
| |\ \ \ \ | | | | | | | | | | | | | | | | | | into pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build-work
| | * | | | build fix for aix and othersdf@pippilotta.erinye.com2007-08-281-3/+3
| | | |_|/ | | |/| |
| * | | | CMakeLists.txt:kent@mysql.com/kent-amd64.(none)2007-08-291-2/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | Link with library "udf_example" depends on, needed for nmake libmysql.c: DBUG_ENTER need to be in declaration section
* | | | Merge bk-internal:/home/bk/mysql-5.0-maintmsvensson@pilot.(none)2007-09-271-4/+17
|\ \ \ \ | | | | | | | | | | | | | | | into pilot.(none):/data/msvensson/mysql/mysql-5.0-maint
| * \ \ \ Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-mainttnurnberg@sin.intern.azundris.com2007-09-151-4/+17
| |\ \ \ \ | | |/ / / | |/| | | | | | | | into mysql.com:/home/tnurnberg/15327/50-15327
| | * | | Bug #15327: configure: --with-tcp-port option being partially ignoredtnurnberg@mysql.com/sin.intern.azundris.com2007-09-131-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | make sure that if builder configured with a non-standard (!= 3306) default TCP port that value actually gets used throughout. if they didn't configure a value, assume "use a sensible default", which will be read from /etc/services or, failing that, from the factory default. That makes the order of preference - command-line option - my.cnf, where applicable - $MYSQL_TCP_PORT environment variable - /etc/services (unless configured --with-tcp-port) - default port (--with-tcp-port=... or factory default)
* | | | | Move DBUG_ENTER to begining of function to avoid build failure with debug on ↵msvensson@pilot.(none)2007-09-271-2/+2
|/ / / / | | | | | | | | | | | | windows
* | | | Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-optevgen@moonbone.local2007-08-141-1/+9
|\ \ \ \ | | | | | | | | | | | | | | | into moonbone.local:/mnt/gentoo64/work/29948-bug-5.0-opt-mysql
| * | | | Bug#29948: Unchecked NULL pointer caused server crash.evgen@moonbone.local2007-08-141-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The cli_read_binary_rows function is used to fetch data from the server after a prepared statement execution. It accepts a statement handler and gets the connection handler from it. But when the auto-reconnect option is set the connection handler is reset to NULL after reconnection because the prepared statement is lost and the handler became useless. This case wasn't checked in the cli_read_binary_rows function and caused server crash. Now the cli_read_binary_rows function checks the connection handler to be not NULL and returns an error if it is.
* | | | | CMakeLists.txt, README, configure.jskent@mysql.com/kent-amd64.(none)2007-08-031-14/+42
| | | | | | | | | | | | | | | | | | | | | | | | | Several adjustments to make client libraries pass the link test on both win32 and winx64, Visual Studio 2003 and 2005 (bug#30118)
* | | | | CMakeLists.txt (several), make_win_bin_dist:kent@mysql.com/kent-amd64.(none)2007-08-021-16/+43
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Aligned client library build and use with the Unix version when it comes to what source to include directly in the builds, and what libraries to link with (bug#30118). Also reviewed, corrected and made more clear when static or dynamic Thread Local Storage is to be used. Some code duplication was removed, and some redundant library usage were removed, reducing the risk of incorrect TLS usage.
* | | | Bug #29687 mysql_stmt_store_result memory leak in libmysqldholyfoot/hf@mysql.com/hfmain.(none)2007-07-161-1/+1
|/ / / | | | | | | | | | | | | | | | In embedded server we use result->alloc to store field data for the result, but we didn't clean the result->alloc if the query returned an empty recordset. Cleaning for the empty recordset enabled
* | | Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.0jani@labbari.dsl.inet.fi2007-07-061-0/+15
|\ \ \ | | | | | | | | | | | | into labbari.dsl.inet.fi:/home/my/bk/mysql-5.0-marvel
| * | | Allow multiple calls to mysql_server_end()monty@mysql.com/narttu.mysql.fi2007-06-201-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | (Part of fix for Bug#25621 Error in my_thread_global_end(): 1 threads didn't exit) Give correct error message if InnoDB table is not found (This allows us to drop a an innodb table that is not in the InnoDB registery)
* | | | Bug #27383: Crash in test "mysql_client_test"gkodinov/kgeorge@magare.gmz2007-06-221-11/+16
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The C optimizer may decide that data access operations through pointer of different type are not related to the original data (strict aliasing). This is what happens in fetch_long_with_conversion(), when called as part of mysql_stmt_fetch() : it tries to check for truncation errors by first storing float (and other types of data) into a char * buffer and then accesses them through a float pointer. This is done to prevent the effects of excess precision when using FPU registers. However the doublestore() macro converts a double pointer to an union pointer. This violates the strict aliasing rule. Fixed by making the intermediary variables volatile ( to not re-introduce the excess precision bug) and using the intermediary value instead of the char * buffer. Note that there can be loss of precision for both signed and unsigned 64 bit integers converted to double and back, so the check must stay there (even for compatibility reasons). Based on the excellent analysis in bug 28400.