summaryrefslogtreecommitdiff
path: root/client
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch '5.5' into 10.0Vicențiu Ciorbaru2018-01-241-2/+5
|\
| * MDEV-13187 incorrect backslash parsing in clientsSergei Golubchik2018-01-241-2/+5
| | | | | | | | also cover USE and other built-in commands
* | mysql_uprade --help and man page fixesIan Gilfillan2017-11-221-2/+2
| |
* | MDEV-12372 mysqlbinlog --version output is the same on 10.x as on 5.5.x, and ↵Sergei Golubchik2017-11-091-2/+3
| | | | | | | | | | | | contains not only version don't print usage() for --version
* | Merge branch '5.5' into 10.0Sergei Golubchik2017-10-181-3/+2
|\ \ | |/
| * Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2017-10-171-2/+1
| |\
| | * Bug#26372491 - RCE THROUGH THE MISHANDLE OF BACKSLASHAnushree Prakash B2017-09-131-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DESCRIPTION: =========== The bug is related to incorrect parsing of SQL queries when typed in on the CLI. The incorrect parsing can result in unexpected results. ANALYSIS: ======== The scenarios mainly happens for identifier names with a typical combination of backslashes and backticks. The incorrect parsing can either result in executing additional queries or can result in query truncation. This can impact mysqldump as well. FIX: === The fix makes sure that such identifier names are correctly parsed and a proper query is sent to the server for execution. (cherry picked from commit 31a372aa1c2b93dc75267d1f05a7f7fca6080dc0)
| * | MDEV-13459 Warnings, when compiling with gcc-7.xSergei Golubchik2017-10-172-1/+2
| | | | | | | | | | | | mostly caused by -Wimplicit-fallthrough
* | | Merge remote-tracking branch 'origin/5.5' into 10.0Vicențiu Ciorbaru2017-07-251-14/+76
|\ \ \ | |/ /
| * | Merge remote-tracking branch 'mysql/5.5' into 5.5Sergei Golubchik2017-07-181-14/+76
| |\ \ | | |/
| | * Bug# 25998635: Client does not escape the USE statementIvo Roylev2017-05-221-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When there are quotes in the USE statement, the mysql client does not correctly escape them. The USE statement is processed line by line from the client's parser, and cannot handle multi-line commands as the server. The fix is to escape the USE parameters whenever quotes are used.
| | * Bug#25340722 - PRINT BINARY DATA AS HEX IN THE MYSQLAnushree Prakash B2017-05-031-13/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CLIENT (CONTRIBUTION) DESCRIPTION: ============ Binary data should be printed as hex in the mysql client when the option binary-as-hex is enabled. ANALYSIS: ========= The fix deals only with mysql command line client. It does not change, at all, the data sent to the applications. Printing binary data as hex also allows to use the output in the where clause of the query. FIX: ==== A new option 'binary-as-hex' is introduced to print the binary contents as hex in the mysql client. The option is disabled by default. When the option is enabled, we convert the binary data to hex before printing the contents irrespective of whether it is in tabular, xml or html format.
| | * Bug #25717383: MYSQLDUMP MAY EXECUTE ANY ARBITRARY QUERYBharathy Satish2017-03-171-12/+42
| | | | | | | | | | | | | | | | | | | | | While writing comments if database object names has a new line character, then next line is considered a command, rather than a comment. This patch fixes the way comments are constructed in mysqldump.
| | * BUG#25575605: SETTING --SSL-MODE=REQUIRED SENDS CREDENTIALS BEFORE VERIFYING ↵Ramil Kalimullin2017-03-1010-30/+49
| | | | | | | | | | | | | | | | | | | | | SSL CONNECTION MYSQL_OPT_SSL_MODE option introduced. It is set in case of --ssl-mode=REQUIRED and permits only SSL connection.
| * | client: mysql - fix typeDaniel Black2017-07-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | field_names[x][y] is a pointer client/mysql.cc: In function 'void build_completion_hash(bool, bool)': client/mysql.cc:2855:37: error: invalid conversion from 'char' to 'char*' [-fpermissive] field_names[i][num_fields*2]= '\0'; Signed-off-by: Daniel Black <daniel.black@au.ibm.com>
* | | coverity medium warningsSergei Golubchik2017-07-065-11/+13
| | |
* | | Merge branch '5.5' into 10.0Sergei Golubchik2017-06-291-1/+1
|\ \ \ | |/ /
| * | uninitialized variableSergei Golubchik2017-06-291-1/+1
| | |
* | | Merge branch '5.5' into 10.0Sergei Golubchik2017-06-282-4/+16
|\ \ \ | |/ /
| * | MDEV-13187 incorrect backslash parsing in clientsSergei Golubchik2017-06-272-2/+14
| | | | | | | | | | | | cover ANSI_QUOTES and NO_BACKSLASH_ESCAPES in mysqltest
| * | MDEV-13187 incorrect backslash parsing in clientsSergei Golubchik2017-06-272-4/+4
| | | | | | | | | | | | don't do backslash escapes inside backticks
* | | Merge remote-tracking branch '5.5' into 10.0Vicențiu Ciorbaru2017-06-201-4/+15
|\ \ \ | |/ /
| * | MDEV-13002 mysqltest regex replace results in incorrect resultSergei Golubchik2017-06-181-4/+14
| | | | | | | | | | | | regex didn't replace lines that were split by 16K chunk reads.
* | | MDEV-6262 analyze the coverity report on mariadbSergei Golubchik2017-05-196-16/+20
| | | | | | | | | | | | | | | uploaded 10.0, analyzed everything with the Impact=High (and a couple of Medium)
* | | Silence bogus GCC 7 warnings -Wimplicit-fallthroughMarko Mäkelä2017-05-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Do not silence uncertain cases, or fix any bugs. The only functional change should be that ha_federated::extra() is not calling DBUG_PRINT to report an unhandled case for HA_EXTRA_PREPARE_FOR_DROP.
* | | Merge branch '5.5' into 10.0Sergei Golubchik2017-04-2110-23/+20
|\ \ \ | |/ /
| * | MDEV-12276 Missing DBUG_RETURN or DBUG_VOID_RETURN macro in function "do_exec"Sergei Golubchik2017-04-201-10/+10
| | |
| * | Merge remote-tracking branch 'mysql/5.5' into 5.5mariadb-5.5.55Sergei Golubchik2017-04-1110-13/+10
| |\ \
| | * | Bug #25717383: MYSQLDUMP MAY EXECUTE ANY ARBITRARY QUERYmysql-5.5.55Bharathy Satish2017-03-181-12/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While writing comments if database object names has a new line character, then next line is considered a command, rather than a comment. This patch fixes the way comments are constructed in mysqldump. (cherry picked from commit 1099f9d17b1c697c2760f86556f5bae7d202b444)
| | * | BUG#25575605: SETTING --SSL-MODE=REQUIRED SENDS CREDENTIALS BEFORE VERIFYING ↵Ramil Kalimullin2017-03-1010-30/+49
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | SSL CONNECTION MYSQL_OPT_SSL_MODE option introduced. It is set in case of --ssl-mode=REQUIRED and permits only SSL connection. (cherry picked from commit 3b2d28578c526f347f5cfe763681eff365731f99)
* | | Merge branch 'bb-10.0-vicentiu' into 10.0mariadb-10.0.30Vicențiu Ciorbaru2017-03-061-2/+3
|\ \ \
| * \ \ 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().
* | | | MDEV-11610: mysqladmin flush-X-log optionsDaniel Black2017-03-021-4/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the following options to mysqladmin + flush-binary-log Flush binary log + flush-engine-log Flush engine log(s) + flush-error-log Flush error log + flush-general-log Flush general log + flush-relay-log Flush relay log + flush-user-resources Flush user resources
* | | | MDEV-11610: Add --local to mysqladminDaniel Black2017-03-021-3/+17
|/ / /
* | | 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.