summaryrefslogtreecommitdiff
path: root/client
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-10630 rpl.rpl_mdev6020 fails in buildbot with timeoutMonty2016-08-221-1/+6
| | | | | | | | | | The issue was that when running with valgrind the wait for master_pos_Wait() was not long enough. This patch also fixes two other failures that could affect rpl_mdev6020: - check_if_conflicting_replication_locks() didn't properly check domains - 'did_mark_start_commit' was after signals to other threads was sent which could get the variable read too early.
* Merge branch '5.5' into 10.0Sergei Golubchik2016-08-102-50/+75
|\
| * MDEV-6128:[PATCH] mysqlcheck wrongly escapes '.' in table namesSergei Golubchik2016-08-081-40/+27
| | | | | | | | | | | | | | a correct fix: * store properly quoted table names in tables4repair/etc lists * tell handle_request_for_tables whether the name is aalready properly quoted * test cases for all uses of fix_table_name()
| * Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2016-08-031-10/+48
| |\ | | | | | | | | | without a fix for Bug#12818255 (MDEV-6581)
| | * Bug#23035296: MAIN.MYSQLDUMP FAILS BECUASE OF UNEXPECTEDArun Kuruvila2016-06-031-4/+10
| | | | | | | | | | | | | | | | | | ERROR MESSAGE Post push patch to fix test case failure.
| | * Bug#23035296: MAIN.MYSQLDUMP FAILS BECUASE OF UNEXPECTEDArun Kuruvila2016-06-021-0/+8
| | | | | | | | | | | | | | | | | | ERROR MESSAGE Post push patch to fix test case failure.
| | * Bug#23035296: MAIN.MYSQLDUMP FAILS BECUASE OF UNEXPECTEDArun Kuruvila2016-05-301-8/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ERROR MESSAGE Description:- Mtr test, "main.mysqldump" is failing with an assert when "mysqlimport" client utility is executed with the option "--use_threads". Analysis:- "mysqlimport" uses the option, "--use_threads", to spawn worker threads to complete its job in parallel. But currently the main thread is not waiting for the worker threads to complete its cleanup, rather just wait for the worker threads to say its done doing its job. So the cleanup is done in a race between the worker threads and the main thread. This lead to an assertion failure. Fix:- "my_thread_join()" is introduced in the main thread to join all the worker threads it have spawned. This will let the main thread to wait for all the worker threads to complete its cleanup before calling "my_end()".
| | * Bug#21977380 - POSSIBLE BUFFER OVERFLOW ISSUESShishir Jaiswal2016-05-163-55/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DESCRIPTION =========== Buffer overflow is reported in a lot of code sections spanning across server, client programs, Regex libraries etc. If not handled appropriately, they can cause abnormal behaviour. ANALYSIS ======== The reported casea are the ones which are likely to result in SEGFAULT, MEMORY LEAK etc. FIX === - sprintf() has been replaced by my_snprintf() to avoid buffer overflow. - my_free() is done after checking if the pointer isn't NULL already and setting it to NULL thereafter at few places. - Buffer is ensured to be large enough to hold the data. - 'unsigned int' (aka 'uint') is replaced with 'size_t' to avoid wraparound. - Memory is freed (if not done so) after its alloced and used. - Inserted assert() for size check in InnoDb memcached code (from 5.6 onwards) - Other minor changes
* | | Merge branch '5.5' into bb-10.0Sergei Golubchik2016-06-214-64/+63
|\ \ \ | |/ /
| * | fix a mysql-5.5.50 merge: mysqlcheckSergei Golubchik2016-06-201-2/+2
| | | | | | | | | | | | quote identifiers correctly
| * | Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2016-06-143-55/+66
| |\ \
| | * | Bug#21977380 - POSSIBLE BUFFER OVERFLOW ISSUESShishir Jaiswal2016-05-163-55/+72
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DESCRIPTION =========== Buffer overflow is reported in a lot of code sections spanning across server, client programs, Regex libraries etc. If not handled appropriately, they can cause abnormal behaviour. ANALYSIS ======== The reported casea are the ones which are likely to result in SEGFAULT, MEMORY LEAK etc. FIX === - sprintf() has been replaced by my_snprintf() to avoid buffer overflow. - my_free() is done after checking if the pointer isn't NULL already and setting it to NULL thereafter at few places. - Buffer is ensured to be large enough to hold the data. - 'unsigned int' (aka 'uint') is replaced with 'size_t' to avoid wraparound. - Memory is freed (if not done so) after its alloced and used. - Inserted assert() for size check in InnoDb memcached code (from 5.6 onwards) - Other minor changes (cherry picked from commit 3487e20959c940cbd24429afa795ebfc8a01e94f)
| | * Bug#21973610Harin Vadodaria2016-04-291-3/+3
| | | | | | | | | | | | Post push fix : Fixing i_main.mysqlshow failure.
| * | MDEV-8012: Wrong exit code when asking for helpDan Ungureanu2016-06-121-9/+2
| | | | | | | | | | | | | | | | | | | | | `--help` is a perfectly valid parameter and both `mysqladmin` and `mysql_waitpid` should exit with success (zero errror code). Signed-off-by: Vicențiu Ciorbaru <vicentiu@mariadb.org>
| * | MDEV-9366 : do_shutdown_server fails to detect server shutdown on Windows.Vladislav Vaintroub2016-06-081-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix test whether process is alive in mysqltest. Also fix SHUT_RD definition on Windows to be SD_RECEIVE. SD_BOTH was used instead prior to this patch, and this would occasionally make mysql_shutdown() fail - when the socket for the current connection is not able send the COM_SHUTDOWN response anymore.
* | | Merge branch '5.5' into 10.0Sergei Golubchik2016-04-2610-22/+30
|\ \ \ | |/ /
| * | Fixed compilation failure due to unused var.Sergey Vojtovich2016-04-231-2/+2
| | |
| * | Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2016-04-2010-9/+10
| |\ \ | | |/
| | * WL#9072: Backport WL#8785 to 5.5Ramil Kalimullin2016-02-1910-36/+83
| | |
| * | MDEV-9885 Client doesn't start if 'TERM' unknownSergei Golubchik2016-04-191-11/+19
| | | | | | | | | | | | | | | 1. don't exit if setupterm() failed 2. don't use vidattr() if setupterm() failed
* | | MDEV-9605 mysqlbinlog does not accept ssl-ca option as expected.Alexey Botchkov2016-04-261-0/+15
| | | | | | | | | | | | Added SSL support to the mysqlbinlog.
* | | Merge branch '5.5' into 10.0Sergei Golubchik2016-03-211-1/+0
|\ \ \ | |/ /
| * | MDEV-9568 mysqlcheck crashes with nonexistent table nameSergei Golubchik2016-03-171-1/+0
| | | | | | | | | | | | remove erroneous free() call
* | | Update AskMonty and Atlassian references to MariaDBiangilfillan2016-03-081-2/+2
| | |
* | | Fix spelling: occurred, execute, which etcOtto Kekäläinen2016-03-043-5/+5
| | |
* | | Merge branch '5.5' into 10.0Sergei Golubchik2016-02-151-2/+2
|\ \ \ | |/ /
| * | MDEV-9225 mysql_upgrade segfault due to missing /etc/my.cnf.dVicențiu Ciorbaru2016-02-141-1/+2
| | | | | | | | | | | | | | | In case of missing includedir file, we would attempt to free a NULL pointer. Make sure to guard against that.
| * | MDEV-9024 Build fails with VS2015Sergei Golubchik2016-02-062-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-9453 mysql_upgrade.exe error when mysql is migrated to mariadbSergei Golubchik2016-02-061-10/+5
| | | | | | | | | | | | | | | mysqlcheck tool can be used even if opt_systables_only is true (to upgrade views from mysql - that overrides opt_systables_only)
* | | MDEV-9149 Ctrl-C in MySQL client does not interrupt query, but interrupts ↵Sergei Golubchik2016-02-151-36/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the session instead mysql.cc: Unlike the main MYSQL structure, kill_mysql did not have MYSQL_OPT_PROTOCOL set. Move all connection-related settings to a separate function and use it both for the main MYSQL and for kill_mysql.
* | | MDEV-9366 : do_shutdown_server fails to detect server shutdown on Windows.Vladislav Vaintroub2016-01-071-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix test whether process is alive in mysqltest. Also fix SHUT_RD definition on Windows to be SD_RECEIVE. SD_BOTH was used instead prior to this patch, and this would occasionally make mysql_shutdown() fail - when the socket for the current connection is not able send the COM_SHUTDOWN response anymore.
* | | MDEV-7384: Add --persistent option for mysqlcheckDaniel Black2015-12-181-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | 10.0 has an "analyze table .. persistent for all" syntax. This adds --persistent to mysqlcheck(mysqlanalyize) to perform this extended analyze table option. Signed-off-by: Vicențiu Ciorbaru <vicentiu@mariadb.org>
* | | Merge branch '5.5' into 10.0Sergei Golubchik2015-12-134-71/+91
|\ \ \ | |/ /
| * | Merge branch 'bb-5.5-serg' into 5.5Sergei Golubchik2015-12-095-21/+34
| |\ \
| | * \ Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2015-12-095-21/+34
| | |\ \ | | | |/
| | | * Bug#21973610: BUFFER OVERFLOW ISSUESHarin Vadodaria2015-11-062-16/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | | * DESCRIPTIONShishir Jaiswal2015-10-291-12/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | =========== When doing an upgrade, you execute mysql_upgrade. If mysql_upgrade fails to connect or it connects with a user without the proper privileges, it will return the error: FATAL ERROR: Upgrade failed which is not very informative. ANALYSIS ======== In main() and check_version_match(), the condition for errors are clubbed together and throw the same error msg. The functions need to be splitted up and the corresponding error msgs have to be displayed. FIX === Splitted the functions and added the specific error msg.
| | | * Bug #21235226 : THE --ENABLE-CLEARTEXT-PLUGIN IS NOTArun Kuruvila2015-10-144-3/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IMPLEMENTED IN ALL CLIENT PROGRAMS Description: Option "enable-cleartext-plugin" is not available for the following client utilities:- mysqldump mysqlimport mysqlshow mysqlcheck Analysis: The unavailability of this option limits the features like PAM authentication from using the above mentioned utilities. Fix: Option "enable-cleartext-plugin" is implemented in the above mentioned client utilities.
| * | | MDEV-9001 - [PATCH] Fix DB name quoting in mysqldump --routineSergey Vojtovich2015-12-081-1/+0
| |/ / | | | | | | | | | Removed unused variable.
| * | MDEV-8825 mysql_upgrade leaks the admin password when it spawns a shell ↵Sergei Golubchik2015-12-081-15/+36
| | | | | | | | | | | | | | | | | | | | | process to execute mysqlcheck don't put common arguments on the command-line, use a config file instead
| * | mysql_upgrade cleanupSergei Golubchik2015-12-081-28/+17
| | |
| * | MDEV-9001 - [PATCH] Fix DB name quoting in mysqldump --routineSergey Vojtovich2015-12-031-9/+8
| | | | | | | | | | | | | | | | | | | | | mysqldump --routine fails to dump databases containing backslash ("\") character. This happened because escaped database name was being used as an identifier while changing current database. Such identifers are not supposed to be escaped, they must be properly quoted instead.
* | | Fixes to get all test to run on MacosX Lion 10.7Monty2015-11-294-86/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This includes fixing all utilities to not have any memory leaks, as safemalloc warnings stopped tests from passing on MacOSX. - Ensure that all clients takes character-set-dir, as the libmysqlclient library will use it. - mysql-test-run now passes character-set-dir to all external clients. - Changed dynstr_free() so that it can be called twice (made freeing code easier) - Changed rpl_global_gtid_slave_state to be allocated dynamicly as it includes a mutex that needs to be initizlied/destroyed before my_end() is called. - Removed rpl_slave_state::init() and rpl_slave_stage::deinit() as their job are better handling by constructor and delete. - Print alias instead of table_name in check_duplicate_key as table_name may have been converted to lower case. Other things: - Fixed a case in time_to_datetime_with_warn() where we where using && instead of & in tests
* | | MDEV-9024 Build fails with VS2015Vladislav Vaintroub2015-11-062-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* | | Allow mysql_upgrade to enable event after table is correctedMichael Widenius2015-10-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | new features: set event_scheduler=ON|OFF will now try to init event scheduler if it's not enabled set event_scheduler=default will try to enable it based on the value of the event_scheduler when mysqld was started
* | | Merge branch '5.5' into 10.0Sergei Golubchik2015-10-092-4/+4
|\ \ \ | |/ /
| * | fixes for buildbot:mariadb-5.5.46Sergei Golubchik2015-10-091-1/+6
| | | | | | | | | | | | | | | | | | * OSX (mysqlimport freeing unallocated memory) * Windows (didn't compile MSI) * fulltest2 (innodb crashes in --embedded --big)
| * | Merge remote-tracking branch 'mysql/5.5' into 5.5Sergei Golubchik2015-10-082-11/+4
| |\ \ | | |/
| | * Bug #20802751 - SEGMENTATION FAILURE WHEN RUNNINGShishir Jaiswal2015-07-081-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MYSQLADMIN -U ROOT -P DESCRIPTION =========== Crash occurs when no command is given while executing mysqladmin utility. ANALYSIS ======== In mask_password() the final write to array 'temp_argv' is done without checking if corresponding index 'argc' is valid (non-negative) or not. In case its negative (would happen when this function is called with 'argc'=0), it may cause a SEGFAULT. Logically in such a case, mask_password() should not have been called as it would do no valid thing. FIX === mask_password() is now called after checking 'argc'. This function is now called only when 'argc' is positive otherwise the process terminates
| | * Bug #20772273 : MYSQLIMPORT --USE-THREADS DOESN'T USEArun Kuruvila2015-06-302-11/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MULTIPLE THREADS Description:- The utility "mysqlimport" does not use multiple threads for the execution with option "--use-threads". "mysqlimport" while importing multiple files and multiple tables, uses a single thread even if the number of threads are specified with "--use-threads" option. Analysis:- This utility uses ifdef HAVE_LIBPTHREAD to check for libpthread library and if defined uses libpthread library for mutlithreaing. Since HAVE_LIBPTHREAD is not defined anywhere in the source, "--use-threads" option is silently ignored. Fix:- "-DTHREADS" is set to the COMPILE_FLAGS which will enable pthreads. HAVE_LIBPTHREAD macro is removed.