summaryrefslogtreecommitdiff
path: root/client
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '5.5' into 10.0Vicențiu Ciorbaru2017-03-031-2/+3
|\
| * MDEV-11505 wrong databasename in mysqldump commentSergei Golubchik2017-02-271-2/+3
| | | | | | | | | | fix_for_comment() uses a static buffer. cannot have two fix_for_comment() calls as arguments to one printf().
* | Windows : Fix server compile errors when compile with /Zc:strictStrings optionVladislav Vaintroub2017-02-281-1/+1
| |
* | Set sys_errno upon exec commandElena Stepanova2017-02-011-0/+3
| |
* | Merge remote-tracking branch 'origin/5.5' into 10.0vicentiu2017-01-061-2/+4
|\ \ | |/
| * MDEV-10100 main.pool_of_threads fails sporadically in buildbotElena Stepanova2017-01-041-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport the fix to 5.5, because it fails there too The patch fixes two test failures: - on slow builders, sometimes a connection attempt which should fail due to the exceeded number of thread_pool_max_threads actually succeeds; - on even slow builders, MTR sometimes cannot establish the initial connection, and check-testcase fails prior to the test start The problem with check-testcase was caused by connect-timeout=2 which was set for all clients in the test config file. On slow builders it might be not enough. There is no way to override it for the pre-test check, so it needed to be substantially increased or removed. The other problem was caused by a race condition between sleeps that the test performs in existing connections and the connect timeout for the connection attempt which was expected to fail. If sleeps finished before the connect-timeout was exceeded, it would allow the connection to succeed. To solve each problem without making the other one worse, connect-timeout should be configured dynamically during the test. Due to the nature of the test (all connections must be busy at the moment when we need to change the timeout, and cannot execute SET GLOBAL ...), it needs to be done independently from the server. The solution: - recognize 'connect_timeout' as a connection option in mysqltest's "connect" command; - remove connect-timeout from the test configuration file; - use the new connect_timeout option for those connections which are expected to fail; - re-arrange the test flow to allow running a huge SLEEP without affecting the test execution time (because it would be interrupted after the main test flow is finished). The test is still subject to false negatives, e.g. if the connection fails due to timeout rather than due to the exceeded number of allowed threads, or if the connection on extra port succeeds due to a race condition and not because the special logic for the extra port. But those false negatives have always been possible there on slow builders, they should not be critical because faster builders should catch such failures if they appear. Conflicts: client/mysqltest.cc mysql-test/r/pool_of_threads.result mysql-test/t/pool_of_threads.test
| * Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2016-12-221-2/+4
| |\
| | * Bug #24496214: MISLEADING ERROR EXECUTING MYSQLADMIN SHUTDOWN AGAINST A SERVERGeorgi Kodinov2016-09-081-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RUNNING FIREWALL mysqladmin shutdown will try to extract the server's pid file before executing the actual shutdown command. It will do that by executing a SHOW VARIABLES query and processing the result. However if that query fails it print a (somewhat confusing) error mesasage and will still continue to do the shutdown command. If that passes then the mysqladmin user will get an error but the shutdown will still be successful. This is confusing so the error message text is changed to say that this is a non-fatal error and execution continues. No test case added since it'd require a selective query failure device that's not available in 5.5.
| | * Bug#23540182:MYSQLBINLOG DOES NOT FREE THE EXISTING CONNECTION BEFORE ↵Neha Kumari2016-08-051-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OPENING NEW REMOTE ONE It happens when you are trying to read two or more log files from a remote server using mysqlbinlog utility. The reason for this is no matching mysql_close() that concludes the life time of 'mysql' struct describing connection to the server. This happens when mysqlbinlog is invoked with connecting to the server and requesting more than one binlog file. In such case dump_remote_log_entries() keeps calling safe_connect() per eachfile, never caring to invoke mysql_close(). Only the final safe_connect()'s allocation effect are cleaned by the base code. That is with 2 files there's one 'mysql' connection descriptor struct uncleaned/deallocated. We are backporting the bug 21255763 (pushed in mysql-trunk) in the earlier version of MySQL starting from 5.5 to 5.7. which was pushed in mysql-trunk. Fix: Invoke mysql_close() just before mysql_init() in safe_connect() defined in mysqlbinlog.cc. That makes possibly previously used 'mysql' be reclaimed prior a new one is allocated.
* | | MDEV-10100 main.pool_of_threads fails sporadically in buildbotElena Stepanova2017-01-011-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch fixes two test failures: - on slow builders, sometimes a connection attempt which should fail due to the exceeded number of thread_pool_max_threads actually succeeds; - on even slow builders, MTR sometimes cannot establish the initial connection, and check-testcase fails prior to the test start The problem with check-testcase was caused by connect-timeout=2 which was set for all clients in the test config file. On slow builders it might be not enough. There is no way to override it for the pre-test check, so it needed to be substantially increased or removed. The other problem was caused by a race condition between sleeps that the test performs in existing connections and the connect timeout for the connection attempt which was expected to fail. If sleeps finished before the connect-timeout was exceeded, it would allow the connection to succeed. To solve each problem without making the other one worse, connect-timeout should be configured dynamically during the test. Due to the nature of the test (all connections must be busy at the moment when we need to change the timeout, and cannot execute SET GLOBAL ...), it needs to be done independently from the server. The solution: - recognize 'connect_timeout' as a connection option in mysqltest's "connect" command; - remove connect-timeout from the test configuration file; - use the new connect_timeout option for those connections which are expected to fail; - re-arrange the test flow to allow running a huge SLEEP without affecting the test execution time (because it would be interrupted after the main test flow is finished). The test is still subject to false negatives, e.g. if the connection fails due to timeout rather than due to the exceeded number of allowed threads, or if the connection on extra port succeeds due to a race condition and not because the special logic for the extra port. But those false negatives have always been possible there on slow builders, they should not be critical because faster builders should catch such failures if they appear.
* | | Merge branch '5.5' into 10.0Sergei Golubchik2016-12-091-5/+21
|\ \ \ | |/ /
| * | MDEV-9409 Windows - workaround VS2015 CRT bug that makesVladislav Vaintroub2016-10-271-6/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mysqldump/mysql_install_db.exe fail The bug is described in https://connect.microsoft.com/VisualStudio/Feedback/Details/1902345 When reading from a pipe in text mode, using CRT function such as fread(), some newlines may be lost. Workaround is to use binary mode on reading side and if necessary, replace \r\n with \n.
* | | Merge branch '5.5' into 10.0Sergei Golubchik2016-10-253-47/+73
|\ \ \ | |/ /
| * | mysqldump: comments and identifiers with new linesSergei Golubchik2016-10-141-17/+43
| | | | | | | | | | | | don't let identifiers with new lines to break a comment
| * | mysqltest: don't eat new lines in --execSergei Golubchik2016-10-141-4/+0
| | | | | | | | | | | | pass them through as is
| * | mysql cli: fix USE command quotingSergei Golubchik2016-10-131-26/+30
| | | | | | | | | | | | | | | | | | * use proper sql quoting rules for USE, while preserving as much of historical behavior as possible * short commands (\u) behave as before
* | | 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
| |\ \