summaryrefslogtreecommitdiff
path: root/sql-common
Commit message (Collapse)AuthorAgeFilesLines
* Updated/added copyright headersKent Boortz2011-06-304-7/+8
|\
| * Updated/added copyright headersKent Boortz2011-06-303-6/+13
| |\
| | * Updated/added copyright headersKent Boortz2011-06-303-6/+8
| | |
* | | Bug#11745920/Bug#21287: "SSL connection error" is not helpful! ↵Tatjana Azundris Nuernberg2011-05-191-11/+24
| | | | | | | | | | | | | | | | | | | | | (ssl-verify-server-cert=true vs localhos) SSL errors on client and now more specific to aid end-user with debugging. Also restructures error handling for compliance with SSL docs.
* | | Bug#11766631 (59780) - Move the client authentication_windows pluginRafal Somla2011-04-281-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into the server repository This patch adds client windows authentication plugin code to the client library libmysql (only on Windows platform). The plugin is compiled into the library and added to the list of built-in plugins. This way clients should be able to connect to a server which uses windows authentication plugin even as an SQL user which uses such authentication. Note: this makes the client library to depend on Secur32 Windows system library. When building clients, they must be linked against Secur32. Command mysql_config --libs correctly lists Secur32 as a required dependency.
* | | Addendum to the fix for bug #12325444Georgi Kodinov2011-04-291-1/+1
| | | | | | | | | | | | Removed STDCALL from the function definition.
* | | 5.1 -> 5.5 mergeSergey Glukhov2011-04-271-1/+2
|\ \ \
| * | | Bug#11889186 60503: CRASH IN MAKE_DATE_TIME WITH DATE_FORMAT / STR_TO_DATE ↵Sergey Glukhov2011-04-271-1/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | COMBINATION calc_daynr() function returns negative result if malformed date with zero year and month is used. Attempt to calculate week day on negative value leads to crash. The fix is return NULL for 'W', 'a', 'w' specifiers if zero year and month is used. Additional fix for calc_daynr(): --added assertion that result can not be negative --return 0 if zero year and month is used
* | | Bug #11766854: 60075: MYSQL_LOAD_CLIENT_PLUGIN DOESN'T CLEAR ERRORGeorgi Kodinov2011-03-171-0/+1
| | | | | | | | | | | | | | | Added the cleanup code. Extended mysql_client_test to take --plugin-dir and --default_auth. Added a C test case.
* | | Fix for BUG#59894Guilhem Bichot2011-02-111-5/+8
| | | | | | | | | | | | | | | | | | | | | "set optimizer_switch to e or d causes invalid memory writes/valgrind warnings": due to prefix support, the argument "e" was overwritten with its full value "engine_condition_pushdown", which caused a buffer overrun. This was wrong usage of find_type(); other wrong usages are fixed here too. Please start reading with the comment of typelib.c.
* | | mergeGeorgi Kodinov2011-02-021-1/+1
|\ \ \ | |/ /
| * | merge to 5.1.Georgi Kodinov2011-02-021-1/+1
| |\ \ | | |/
| | * Fixes for Bug #55755 and Bug #52315 part 2Georgi Kodinov2011-02-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug #55755 : Date STD variable signness breaks server on FreeBSD and OpenBSD * Added a check to configure on the size of time_t * Created a macro to check for a valid time_t that is safe to use with datetime functions and store in TIMESTAMP columns. * Used the macro consistently instead of the ad-hoc checks introduced by 52315 * Fixed compliation warnings on platforms where the size of time_t is smaller than the size of a long (e.g. OpenBSD 4.8 64 amd64). Bug #52315: utc_date() crashes when system time > year 2037 * Added a correct check for the timestamp range instead of just variable size check to SET TIMESTAMP. * Added overflow checking before converting to time_t. * Using a correct localized error message in this case instead of the generic error. * Added a test suite. * fixed the checks so that they check for unsigned time_t as well. Used the checks consistently across the source code. * fixed the original test case to expect the new error code.
* | | Bug #59657: Move the client authentication_pam plugin into the server repositoryGeorgi Kodinov2011-01-311-0/+35
| | | | | | | | | | | | | | | Created a clear text built in client authentication plugin. Test case added. Added a negative test case : a login failure.
* | | BUG#57953 my_load_defaults return junk argument ----args-separator---- to callerHe Zhenxing2011-01-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After fix of bug#25192, load_defaults() will add an args separator to distinguish options loaded from configure files from that provided in the command line. One problem of this is that the args separator would be added no matter the application need it or not. Fixed the problem by adding an option: bool my_getopt_use_args_separator; to control whether the separator will be added or not. And also added functions: bool my_getopt_is_args_separator(const char* arg); to check if the argument is the separator or not.
* | | Remove configuration preprocessor symbols 'THREAD'Magne Mahre2011-01-112-27/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and 'THREAD_SAFE_CLIENT'. As of MySQL 5.5, we no longer support non-threaded builds. This patch removes all references to the obsolete THREAD and THREAD_SAFE_CLIENT preprocessor symbols. These were used to distinguish between threaded and non-threaded builds.
* | | Manual merge from mysql-5.5-bugteam.Ramil Kalimullin2010-11-222-19/+2
|\ \ \
| * | | WL#5665: Removal of the autotools-based build systemDavi Arnaut2010-11-201-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The autotools-based build system has been superseded and is being removed in order to ease the maintenance burden on developers tweaking and maintaining the build system. In order to support tools that need to extract the server version, a new file that (only) contains the server version, called VERSION, is introduced. The file contents are human and machine-readable. The format is: MYSQL_VERSION_MAJOR=5 MYSQL_VERSION_MINOR=5 MYSQL_VERSION_PATCH=8 MYSQL_VERSION_EXTRA=-rc The CMake based version extraction in cmake/mysql_version.cmake is changed to extract the version from this file. The configure to CMake wrapper is retained for backwards compatibility and to support the BUILD/ scripts. Also, a new a makefile target show-dist-name that prints the server version is introduced.
| * | | Bug #57559: Crash in Client plugin apiGeorgi Kodinov2010-11-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | The plugin code was releasing the plugin and only then was reporting an error referencing it. Fixed by first reporting an error and then freeing up the plugin.
* | | | Manual-merge from 5.5-bugfixing.Ramil Kalimullin2010-11-181-14/+14
|\ \ \ \ | |/ / /
| * | | Bug #57744: sql-common/client.c: Missing DBUG_RETURN macroGeorgi Kodinov2010-11-101-14/+14
| | | | | | | | | | | | | | | | - added missing DBUG_RETURN - fixed whitespace according to coding style.
* | | | Bug#57278: Crash on min/max + with date out of range.Evgeny Potemkin2010-11-041-1/+6
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MySQL officially supports DATE values starting from 1000-01-01. This is enforced for int values, but not for string values, thus one could easily insert '0001-01-01' value. Int values are checked by number_to_datetime function and Item_cache_datetime::val_str uses it to fill MYSQL_TIME struct out of cached int value. This leads to the scenario where Item_cache_datetime caches a non-null datetime value and when it tries to convert it from int to string number_to_datetime function treats the value as out-of-range and returns an error and Item_cache_datetime::val_str returns NULL for a non-null value. Due to this inconsistency server crashes. Now number_to_datetime allows DATE values below 1000-01-01 if the TIME_FUZZY_DATE flag is set. Better NULL handling for Item_cache_datetime. Added the Item_cache_datetime::store function to reset str_value_cached flag when an item is stored.
* | | Fix compilation warnings.Alexander Nozdrin2010-10-121-1/+1
| | |
* | | Fix compile error on Windows after WL#1054 push.Vladislav Vaintroub2010-10-041-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The error was introduced by typo in variable name (errormsg instead of correct errmsg) - Also, precache HAVE_PEERCRED to OFF in cmake\os\WindowsCache.cmake (to avoid useless system check). - Also, add missing check for errors from FormatMessage(). - Also, remove annoying CMake debug printout of MALLOC_LIB if this is not set.
* | | Bug #56767: Make sure client plugins in 1054 are compatible with Georgi Kodinov2010-10-042-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | connectors plugins Implemented changes needed to keep the client plugin API compatible with the existing plugins : 1. Provided an options() client plugin API to let the application pass options to the plugin after loading it 2. Added "License" (const char *) to specify the client plugin's license 3. Added "mysql_api" as a placeholder that the client library can use to pass function pointers to the plugin so that the plugin can call the C lib back. 4. Updated the existing client plugins to comply with the API change. 5. Added more detailed error message generation for Windows.
* | | WL#1054: Pluggable authentication supportGeorgi Kodinov2010-08-093-233/+1337
| | | | | | | | | | | | Merged the implementation to a new base tree.
* | | Merge of mysql-trunk-bugfixing into mysql-trunk-merge.Davi Arnaut2010-07-151-63/+61
|\ \ \
| * | | WL#5486: Remove code for unsupported platformsDavi Arnaut2010-07-151-3/+3
| | | | | | | | | | | | Remove MS-DOS specific code.
| * | | WL#5486: Remove code for unsupported platformsDavi Arnaut2010-07-151-4/+4
| | | | | | | | | | | | Remove Netware specific code.
| * | | Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabledDavi Arnaut2010-07-081-56/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Essentially, the problem is that safemalloc is excruciatingly slow as it checks all allocated blocks for overrun at each memory management primitive, yielding a almost exponential slowdown for the memory management functions (malloc, realloc, free). The overrun check basically consists of verifying some bytes of a block for certain magic keys, which catches some simple forms of overrun. Another minor problem is violation of aliasing rules and that its own internal list of blocks is prone to corruption. Another issue with safemalloc is rather the maintenance cost as the tool has a significant impact on the server code. Given the magnitude of memory debuggers available nowadays, especially those that are provided with the platform malloc implementation, maintenance of a in-house and largely obsolete memory debugger becomes a burden that is not worth the effort due to its slowness and lack of support for detecting more common forms of heap corruption. Since there are third-party tools that can provide the same functionality at a lower or comparable performance cost, the solution is to simply remove safemalloc. Third-party tools can provide the same functionality at a lower or comparable performance cost. The removal of safemalloc also allows a simplification of the malloc wrappers, removing quite a bit of kludge: redefinition of my_malloc, my_free and the removal of the unused second argument of my_free. Since free() always check whether the supplied pointer is null, redudant checks are also removed. Also, this patch adds unit testing for my_malloc and moves my_realloc implementation into the same file as the other memory allocation primitives.
* | | | Merge of mysql-5.1-bugteam into mysql-trunk-merge.Davi Arnaut2010-07-091-16/+7
|\ \ \ \ | |/ / / |/| / / | |/ /
| * | Bug#45288: pb2 returns a lot of compilation warnings on linuxDavi Arnaut2010-07-091-16/+7
| | | | | | | | | | | | | | | | | | | | | | | | Although the C standard mandates that sprintf return the number of bytes written, some very ancient systems (i.e. SunOS 4) returned a pointer to the buffer instead. Since these systems are not supported anymore and are hopefully long dead by now, simply remove the portability wrapper that dealt with this discrepancy. The autoconf check was causing trouble with GCC.
* | | Manual merge from mysql-trunk.Alexander Nozdrin2010-05-201-3/+0
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: - mysql-test/r/partition.result - mysql-test/r/variables_debug.result - mysql-test/t/partition.test - mysql-test/t/variables_debug.test
| * | | Another incarnation of the patch for Bug#30708Alexander Nozdrin2010-05-191-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (make relies GNU extentions). The patch was partially backport from 6.0. Original comment: bug#30708: make relies GNU extensions. Now that we no longer use BitKeeper we can safely remove the SCCS handling with no loss of functionality.
* | | | Manual merge from mysql-5.1-bugteam to mysql-trunk-merge.Alexey Kopytov2010-05-111-7/+20
|\ \ \ \ | |/ / / |/| / / | |/ / | | | | | | Conflicts: Text conflict in tests/mysql_client_test.c
| * | Using an initial command with mysql_options(..., MYSQL_INIT_COMMAND, ...)Jim Winstead2010-05-091-7/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | that generated multiple result sets (such as a stored procedure or a multi-statement command) would leave the connection unusable. (Bug #42373) A side-effect of this bug fix is to make MYSQL_INIT_COMMAND settings ignored when connecting from within the server, but none of the existing mechanisms for connecting from within the server use or need to set the initial command.
* | | Merge the changes of the 5.5.3-m3 release buildJoerg Bruehe2010-04-181-1/+1
|\ \ \ | | | | | | | | | | | | back into the development branches.
| * | | Fix a syntax error:Joerg Bruehe2010-03-161-1/+1
| | | | | | | | | | | | A variable declaration was preceded by "DBUG_PRINT()".
* | | | Backport of:Konstantin Osipov2010-04-131-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ChangeSet@1.2703, 2007-12-07 09:35:28-05:00, cmiller@zippy.cornsilk.net +40 -0 Bug#13174: SHA2 function Patch contributed from Bill Karwin, paper unnumbered CLA in Seattle Implement SHA2 functions. Chad added code to make it work with YaSSL. Also, he removed the (probable) bug of embedded server never using SSL-dependent functions. (libmysqld/Makefile.am didn't read ANY autoconf defs.) Function specification: SHA2( string cleartext, integer hash_length ) -> string hash, or NULL where hash_length is one of 224, 256, 384, or 512. If either is NULL or a length is unsupported, then the result is NULL. The resulting string is always the length of the hash_length parameter or is NULL. Include the canonical hash examples from the NIST in the test results. --- Polish and address concerns of reviewers.
* | | | Fix use of uninitialized variable.Alexander Nozdrin2010-03-261-1/+1
|/ / /
* | | Bug#51166 mysql client defaults to charset 'ascii' Alexander Barkov2010-03-041-4/+4
| | | | | | | | | | | | | | | | | | Using latin1 client character set for ASCII locales: - because ascii is not a build-in character set - for better backward compatibility
* | | WL#4738 streamline/simplify @@variable creation processSergei Golubchik2009-12-221-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug#16565 mysqld --help --verbose does not order variablesBug#20413 sql_slave_skip_counter is not shown in show variables Bug#20415 Output of mysqld --help --verbose is incomplete Bug#25430 variable not found in SELECT @@global.ft_max_word_len; Bug#32902 plugin variables don't know their names Bug#34599 MySQLD Option and Variable Reference need to be consistent in formatting! Bug#34829 No default value for variable and setting default does not raise error Bug#34834 ? Is accepted as a valid sql mode Bug#34878 Few variables have default value according to documentation but error occurs Bug#34883 ft_boolean_syntax cant be assigned from user variable to global var. Bug#37187 `INFORMATION_SCHEMA`.`GLOBAL_VARIABLES`: inconsistent status Bug#40988 log_output_basic.test succeeded though syntactically false. Bug#41010 enum-style command-line options are not honoured (maria.maria-recover fails) Bug#42103 Setting key_buffer_size to a negative value may lead to very large allocations Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled Bug#44797 plugins w/o command-line options have no disabling option in --help Bug#46314 string system variables don't support expressions Bug#46470 sys_vars.max_binlog_cache_size_basic_32 is broken Bug#46586 When using the plugin interface the type "set" for options caused a crash. Bug#47212 Crash in DBUG_PRINT in mysqltest.cc when trying to print octal number Bug#48758 mysqltest crashes on sys_vars.collation_server_basic in gcov builds Bug#49417 some complaints about mysqld --help --verbose output Bug#49540 DEFAULT value of binlog_format isn't the default value Bug#49640 ambiguous option '--skip-skip-myisam' (double skip prefix) Bug#49644 init_connect and \0 Bug#49645 init_slave and multi-byte characters Bug#49646 mysql --show-warnings crashes when server dies
* | | Backport of WL#798 (MySQL IPv6 support) from 6.0.Alexander Nozdrin2009-11-251-77/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following 6.0 revisions were analyzed: - sp1r-brian@zim.(none)-20071228102738-21894 - sp1r-brian@zim.(none)-20071228121841-56447 - sp1r-brian@zim.(none)-20071228205403-56423 - sp1r-brian@zim.(none)-20071228221139-55341 - sp1r-brian@zim.(none)-20071228233443-55352 - sp1r-brian@zim.(none)-20071229094527-61763 - sp1r-brian@zim.(none)-20071230203739-61746 - sp1r-brian@zim.(none)-20080102213805-61741 - sp1r-brian@zim.(none)-20080103201041-61746 - sp1r-brian@zim.(none)-20080104234927-59875 - sp1r-brian@zim.(none)-20080105005827-59874 - sp1r-brian@zim.(none)-20080105012020-59865 - sp1r-brian@zim.(none)-20080106003858-59857 - sp1r-brian@zim.(none)-20080123195552-31680 - sp1r-brian@zim.(none)-20080124201848-29999 - sp1r-brian@zim.(none)-20080129075144-36991 - sp1r-cbell/Chuck@mysql_cab_desk.-20080215041806-21954 - sp1r-vvaintroub@wva.-20080212124547-06272 - sp1r-dfischer/mysqldev@mysql.com/production.mysql.com-20071223184258-15140 - sp1r-brian@zim.(none)-20080206122216-35774 - sp1r-baker@bk-internal.mysql.com-20080209005622-35947 - sp1r-baker@bk-internal.mysql.com-20080224215608-24613 - sp1r-baker@bk-internal.mysql.com-20080307170710-63543 - sp1r-baker@bk-internal.mysql.com-20080312233205-13069 - sp1r-Reggie@core.-20080402175211-28643 - kpettersson@mysql.com-20080901101150-4ne74r8v0492vv42 - alik@sun.com-20090805173811-9fzt0ymcp9tsvn7k - alik@sun.com-20090805173937-fcv1fdveodq5x9gb - alik@sun.com-20090805175009-g1od16i3t1xkw2qr - kostja@sun.com-20090805200643-j9i4fy7ii8ijho5c - alik@sun.com-20090807195303-j4fb5m4l1dgdahwo - alik@sun.com-20090808114848-3rkzr9kifrijzaqy - alik@sun.com-20090810041739-ugmx34h34uid8mox - alik@sun.com-20090810105306-rf43rfyzzblsy5e7 - alik@sun.com-20090810123113-ccdjwai68b5woqdm - alik@sun.com-20090811080423-gb7pibec1znaydzy - alik@sun.com-20090811082130-5uckar1vx3kdsw7g - alik@sun.com-20090812202051-uqkfwwxxcjvo5ean The following bugfixes are also backported within this patch: - Bug#34292: netdb.h missing in hostname.cc - Bug#39153: Failing to lookup a host name can lead to crash in current IPv6 implementation - Bug#38247: Server does not resolve connecting ip's - Bug#43006: main.skip_name_resolve fails on Windows in PB2 - Bug#45606: ACL requires IPv4-mapped addresses to be used - Bug#45584: Host name cache does not work as a cache
* | | Auto-merge from mysql-next-mr.Alexander Nozdrin2009-11-101-1/+1
|\ \ \
| * \ \ Auto-merge from mysql-next-mr.Alexander Nozdrin2009-11-051-122/+140
| |\ \ \
| * | | | backport of dbug extensions from 6.0:Sergei Golubchik2009-10-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function/ syntax glob(7) wildcards unit tests
* | | | | Manual merge from mysql-trunk-merge.Alexander Nozdrin2009-11-061-3/+3
|\ \ \ \ \ | |_|/ / / |/| | / / | | |/ / | |/| |
| * | | Bug#47571: idle named pipe connection is unkillableVladislav Vaintroub2009-11-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug#31621: Windows server hanging during shutdown using named pipes and idle connection Problem: when idle pipe connection is forcefully closed with KILL statement or when the server goes down, thread that is closing connection would hang infinitely in CloseHandle(). The reason for the hang is that named pipe operations are performed synchronously. In this mode all IOs on pipe are serialized, that is CloseHandle() will not abort ReadFile() in another thread, but wait for ReadFile() to complete. The fix implements asynchrnous mode for named pipes, where operation of file are not synchronized. Read/Write operation would fire an async IO and wait for either IO completion or timeout. Note, that with this patch timeouts are properly handled for named pipes. Post-review: Win32 timeout code has been fixed for named pipes and shared memory. We do not store pointer to NET in vio structure, only the read and write timeouts.
* | | | Merge from mysql-next-mr.Alexander Nozdrin2009-10-281-37/+285
|\ \ \ \ | | |/ / | |/| |
| * | | Automerge from mysql-next-mr.Alexander Nozdrin2009-10-271-0/+2
| |\ \ \