summaryrefslogtreecommitdiff
path: root/client
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '5.5' into 5.5-galeraNirbhay Choubey2015-02-182-14/+22
|\ | | | | | | | | | | | | | | | | | | | | | | Merge banch 5.5 till revision : fdd6c11 - MDEV-7419 Function cli_safe_read not exported Conflicts: .bzrignore debian/dist/Debian/mariadb-galera-server-5.5.files.in debian/dist/Ubuntu/mariadb-galera-server-5.5.files.in storage/tokudb/CMakeLists.txt support-files/build-tags
| * MDEV-6128:[PATCH] mysqlcheck wrongly escapes '.' in table namesunknown2015-01-281-13/+21
| | | | | | | | Backport from mysql 5.7. The patch reviewed, test added.
| * Fixed yet another compiler warning.Sergey Vojtovich2014-12-191-1/+1
| |
* | Merge revisions from maria/5.5 (5.5.41)Nirbhay Choubey2014-12-221-2/+3
|\ \ | |/ | | | | | | bzr merge -r4393 lp:maria/5.5
| * mysql-5.5.41 mergeSergei Golubchik2014-12-191-2/+3
| |\
| | * Bug#17633291: SET PROPER COMPILE OPTIONS FOR CLANGJon Olav Hauglid2014-10-131-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | Bug#17959689: MAKE GCC AND CLANG GIVE CONSISTENT COMPILATION WARNINGS Bug#18313717: ENABLE -WERROR IN MAINTANER MODE WHEN COMPILING WITH CLANG Bug#18510941: REMOVE CMAKE WORKAROUNDS FOR OLDER VERSIONS OF OS X/XCODE Backport from mysql-5.6 to mysql-5.5
| | * Bug #18808072 MYSQLBINLOG USES LOCALTIME() TO PRINT EVENTS, CAUSES KERNEL ↵Venkatesh Duggirala2014-10-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MUTEX CONTENTION Problem: For every event read, mysqlbinlog calls localtime() which in turn calls stat(/etc/localtime) which is causing kernel mutex contention. Analysis and Fix: localtime() calls stat(/etc/localtime) for every instance of the call where as localtime_r() the reentrant version was optimized to store the read only tz internal structure. Hence it will not call stat(/etc/localtime). It will call only once at the beginning. The mysql server is calling localtime_r() and mysqlbinlog tool is one place where we are still using localtime(). Once the process (mysqlbinlog) is started if timezone is changed it will be not picked up the the process and it will continue with the same values as the beginning of the process. This behavior is in-lined with mysql server. Also adding localtime_r() and gmtime_r() support for windows.
* | | Merge revisions from maria/5.5Nirbhay Choubey2014-12-161-1/+7
|\ \ \ | |/ / | | | | | | | | | bzr merge -r4388 lp:maria/5.5
| * | new mysqltest connect option SSL-CIPHER=xxxxSergei Golubchik2014-11-181-1/+7
| | |
* | | bzr merge -rtag:mariadb-5.5.40 maria/5.5Nirbhay Choubey2014-10-091-1/+11
|\ \ \ | |/ /
| * | mysql-5.5.40Sergei Golubchik2014-10-061-0/+10
| |\ \ | | |/
| | * Bug #17297324 GLIBC DOUBLE FREE OR CORRUPTION WHEN KILLING CLIENT; CTRL+C Venkata Sidagam2014-07-211-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Description: Sometimes when killing the mysql command line client with KILL -2(SIGINT), mysql client core dumps as a result of a double free or corruption. Analysis: When we run the mysql client in command line mode it will goes to mysql_end() and frees many data structures. At the same time (i.e after some data structures are freed), if we give "KILL -2" signal then the signal will be handled with function handle_kill_signal() and as part of it will again calls mysql_end() and goes with free() to the already freed data structure for batch_readline_end() function, which causes core dump. Fix: Ignoring SIGQUIT and SIGINT signals when cleanup process starts. This will help in resolving the double free issues, which occurs in case the signal handler function is started in between of the clean up function. For 5.6 we need to ignore SIGHUP also.
| | * BUG#18779944: MYSQLDUMP BUFFER OVERFLOWMarcin Babij2014-07-021-11/+28
| | | | | | | | | | | | | | | | | | | | | Mysqldump overflows stack buffer when copying table name from commandline arguments resulting in stack corruption and ability to execute arbitrary code. Fix: Check length of all positional arguments passed to mysqldump is smaller than NAME_LEN. Note: Mysqldump heavily depends on that database objects (databases, tablespaces, tables, etc) are limited to small size (now it is 64).
| * | MDEV-6561 libedit detection is brokenSergei Golubchik2014-09-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | fix readline/libedit detection: * search in readline/, editline/ and edit/readline/ * fix typos CMAKE_REQUIRES_LIBRARIES -> CMAKE_REQUIRED_LIBRARIES * use correct libedit API * use different cmake variables for libedit and readline
* | | Local merge of mariadb-5.5.39Nirbhay Choubey2014-08-062-17/+87
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bzr merge -r4264 maria/5.5 Text conflict in sql/mysqld.cc Text conflict in storage/xtradb/btr/btr0cur.c Text conflict in storage/xtradb/buf/buf0buf.c Text conflict in storage/xtradb/buf/buf0lru.c Text conflict in storage/xtradb/handler/ha_innodb.cc 5 conflicts encountered.
| * | mysql-5.5.39 mergeSergei Golubchik2014-08-022-16/+86
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | ~40% bugfixed(*) applied ~40$ bugfixed reverted (incorrect or we're not buggy) ~20% bugfixed applied, despite us being not buggy (*) only changes in the server code, e.g. not cmakefiles
| | * | Applying patch for bug 18779944Murthy Narkedimilli2014-07-081-11/+28
| | |/
| | * BUG#18779944: MYSQLDUMP BUFFER OVERFLOWMarcin Babij2014-06-301-28/+11
| | | | | | | | | | | | Reverted change due to mtr test failure.
| | * BUG#18779944: MYSQLDUMP BUFFER OVERFLOWMarcin Babij2014-06-271-11/+28
| | | | | | | | | | | | | | | | | | | | | Mysqldump overflows stack buffer when copying table name from commandline arguments resulting in stack corruption and ability to execute arbitrary code. Fix: Check length of all positional arguments passed to mysqldump is smaller than NAME_LEN. Note: Mysqldump heavily depends on that database objects (databases, tablespaces, tables, etc) are limited to small size (now it is 64).
| | * Bug #18163964 PASSWORD IS VISIBLE WHILE CHANGING IT FROMArun Kuruvila2014-05-161-4/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MYSQLADMIN IN PROCESSES LIST Description: Checking the process status (with ps -ef) while executing "mysqladmin" with old password and new password via command-line will show the new password in the process list sporadically. Analysis: The old password is being masked by "mysqladmin". So masking the new password in the similar manner would reduce hitting the bug. But this would not completely fix the bug, because if "ps -ef " command hits the mysqladmin before it masks the passwords it will show both the old and new passwords in the process list. But the chances of hitting this is very less. Fix: The new password also masked in the similar manner that of the --password argument.
| * | MDEV-6343: Incorrect error handling in mysqldumpunknown2014-06-171-1/+1
| | | | | | | | | | | | | | | Fix an error case where success was returned instead of error.
* | | MDEV-5786: mysql_upgrade on galera replicates "alter table" onNirbhay Choubey2014-07-102-0/+11
|/ / | | | | | | | | | | | | | | | | system tables With wsrep patch, binary logging is implicitly enabled. This fix makes sure that it is turned off for --skip-write-binlog by swithcing off wsrep_on.
* | MDEV-6216 sys_vars.completion_type_func fails in --embedded.Alexey Botchkov2014-05-281-0/+4
| | | | | | | | | | | | | | | | The bug was in the mysqltest.c. It didn't check the send_query result properly, so when that fails and the thread gets disconnected, it goes unnoticed, so the consequitive read_result call crashes. Fixed by checking the sernd_query return.
* | MDEV-6056 [PATCH] mysqldump writes usage to stdout even when not explicitly ↵Sergei Golubchik2014-05-051-11/+11
| | | | | | | | requested
* | MDEV-6091 mysqldump goes in a loop and segfaults if --dump-slave is ↵Sergei Golubchik2014-05-011-4/+5
| | | | | | | | | | | | | | | | specified and it cannot connect to the server do_start_slave_sql() is called from maybe_exit(). We should not recurse when maybe_exit() is called for an error during do_start_slave_sql(). Also remove a meaningless (but safe) "goto err".
* | MDEV-5138 Numerous test failures in "mtr --ps --embedded".Alexey Botchkov2014-04-151-8/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | mysqltest in the 'embedded-server' mode runs queries in a separate thread, but it didn't do so for the prepared statements - they were run in the main thread. That leads to inconsistencies. When a test sets SESSION 'dbug' variable like SET SESSION debug_dbug="+d,warn_during_ha_commit_trans"; it is run as a plain query in that separate thread, so the main thread remains unaffected. After that the prepared statement run in the main thread doesn't produce expected 'dbug' errors, so the test fails. To fix that I made prepared statement to be run in that special thread along with the plain queries. That makes the environment consistent.
* | mysql-5.5.37 selective mergeSergei Golubchik2014-03-272-2/+3
|\ \ | |/
| * Bug #18186103 BUFFER OVERFLOW IN CLIENTVamsikrishna Bhagi2014-02-121-4/+4
| | | | | | | | | | | | | | | | | | Problem: While printing the Server version, mysql client doesn't check for the buffer overflow in a String variable. Solution: Used a different print function which checks the allocated length before writing into the string.
| * Bug#14117012 - CHILD PROCESS MYSQL UTILITIES PICKING UP LOCALPraveenkumar Hulakund2014-01-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CONFIG FILES CAUSES TEST Utility as "mysql_upgrade" forks "mysql"/"mysqlcheck". Attaching "mysql_upgrade" shows following calls after forking "mysql" or "mysql_check" when configuration file information is passed as first argument to "mysql_upgrade". strace -f ./mysql_upgrade --defaults-file=../pdb/my.cnf --socket=../pdb/mysql.sock -f [pid 6254] stat("/etc/my.cnf", 0x7fff8e772680) = -1 ENOENT (No such file or directory) [pid 6254] stat("/etc/mysql/my.cnf", 0x7fff8e772680) = -1 ENOENT (No such file or directory) [pid 6254] stat("/usr/local/mysql/etc/my.cnf", 0x7fff8e772680) = -1 ENOENT (No such file or directory) [pid 6254] stat("/home/user_name/.my.cnf", {st_mode=S_IFREG|0664, st_size=19, ...}) = 0 [pid 6254] open("/home/user_name/.my.cnf", O_RDONLY) = 3 But when tool forks "mysqlcheck"/"mysql", "--no-defaults" is passed as first argument. Before forking, in function "find_tool" of "mysql_upgrade", check is made to verify whether tool can be executable or not by calling "mysqlcheck --help" and "mysql --help". But argument "--no-defaults", "--defaults-file" or "defaults-extra-file" is not passed to "mysql" and "mysqlcheck". So my.cnf is searched in default paths. Fix: ------ Modified code to pass "--no-defaults" as first argument to "mysql" and "mysqlcheck" while checking tool can be executed or not.
* | mysqltest bug: reset --replace command after everySergei Golubchik2014-03-241-0/+1
| | | | | | | | error message (because error messages use replacements)
* | MDEV-5723: mysqldump -uroot unusable for multi-database operations, checks ↵Sergey Petrunya2014-03-041-1/+9
| | | | | | | | | | | | | | | | all databases - MariaDB-5.5 part of the fix: since we can't easily fix query optimization for I_S tables, run the affected-tablespaces query with semijoin=off. It happens to have a good query plan with that setting.
* | 5.3 mergeSergei Golubchik2014-02-221-1/+2
|\ \
| * | MDEV-5481 mysqldump fails to dump geometry types properly.Alexey Botchkov2014-02-181-1/+2
| | | | | | | | | | | | | | | Fixed so the MYSQL_TYPE_GEOMETRY is treated as BLOB.
* | | MDEV-5624 mysqldump --dump-slave option does not restart the replication if ↵Sergei Golubchik2014-02-211-7/+12
| | | | | | | | | | | | the dump has failed
* | | send_eval may free evaluated query buffer before connection threadSergey Vojtovich2014-02-181-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | actually consumed it. With this patch evaluated query buffer is freed along with query buffer. The problem was uncovered by udf_debug_sync.test when it was run with --embedded.
* | | MySQL-5.5.36 mergeSergei Golubchik2014-02-172-3/+3
|\ \ \ | | |/ | |/| | | | (without few incorrect bugfixes and with 1250 files where only a copyright year was changed)
| * | Updated/added copyright headersMurthy Narkedimilli2014-01-062-2/+2
| | |
| * | Bug #17168602 MYSQL_PLUGIN REMOVES NON-DIRECTORY TYPE FILES Arun Kuruvila2013-11-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SPECIFIED WITH THE BASEDIR OPTION Description: The mysql_plugin client attempts to remove any filename specified to the --basedir option. The problem is that if the filename does not end with a slash, it will attempt to unlink it, which succeeds for files, but not for directories. Analysis: When we are starting mysql_plugin with basedir option and if we are giving path of a file as basedir, it deletes that file. It was because it uses a function my_delete which unlinks the file path given. Fix: As a fix we replace that line using another function my_free, which will only free the pointer which is having that file path.
| * | Bug #17168602 MYSQL_PLUGIN REMOVES NON-DIRECTORY TYPE Venkata Sidagam2013-09-051-1/+1
| | | | | | | | | | | | | | | | | | FILES SPECIFIED WITH THE BASEDIR OPTION Reverting the patch. Because asked for second review.
| * | Bug #17168602 MYSQL_PLUGIN REMOVES NON-DIRECTORY TYPE FILES Arun Kuruvila2013-09-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SPECIFIED WITH THE BASEDIR OPTION Description: The mysql_plugin client attempts to remove any filename specified to the --basedir option. The problem is that if the filename does not end with a slash, it will attempt to unlink it, which succeeds for files, but not for directories. Analysis: When we are starting mysql_plugin with basedir option and if we are giving path of a file as basedir, it deletes that file. It was because it uses a function my_delete which unlinks the file path given. Fix: As a fix we replace that line using another function my_free, which will only free the pointer which is having that file path.
* | | 5.3 mergeSergei Golubchik2014-01-281-1/+1
|\ \ \ | | |/ | |/|
| * | 5.2 mergeSergei Golubchik2014-01-281-1/+1
| |\ \
| | * \ 5.1 mergeSergei Golubchik2014-01-281-1/+1
| | |\ \
| | | * | fixed a client-side overflow in mysql cliSergei Golubchik2014-01-281-1/+1
| | | | |
* | | | | workaround test failures in buildbot:Sergei Golubchik2014-01-261-1/+2
| | | | | | | | | | | | | | | | | | | | in some VMs readline thinks that the window size is zero. ignore it.
* | | | | Fix for MDEV-5547: Bad error message when moving very old .frm files to ↵Michael Widenius2014-01-2210-15/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MariaDB 5.5. mysql_upgrade --help now also prints out --default options and variable values. mysql_upgrade now prints permission errors. mysql_upgrade doesn't print some non essential info if --silent is used. Added handler error message about incompatible versions Fixed that mysqlbug and mysql_install_db have the executable flag set. Removed executable flag for some non executable files. Changed in mysql_install_db askmonty.org to mariadb.com. Ensured that all client executables prints --default options the same way. Allow REPAIR ... USE_FRM for old .frm files if the are still compatible. Extended shown error for storage engine messages. client/mysql.cc: print_defaults() should be first (as in all other programs) client/mysql_upgrade.c: --help now also prints out --default options and variable values Print out error if wrong permissions Don't print info if --silent client/mysqladmin.cc: print_defaults() should be first (as in all other programs) client/mysqlbinlog.cc: Added print_defaults() to --help client/mysqlcheck.c: Added empty line in --help client/mysqlimport.c: Added empty line in --help client/mysqlshow.c: Made --help compatible client/mysqlslap.c: Made --help compatible client/mysqltest.cc: Added print_defaults() to --help include/handler_ername.h: Added handler error message include/my_base.h: Added handler error message mysql-test/r/mysql_upgrade.result: Updated results mysql-test/r/repair.result: Added test case for better error messages mysql-test/std_data/host_old.MYD: Added test case for better error messages mysql-test/std_data/host_old.MYI: Added test case for better error messages mysql-test/std_data/host_old.frm: Added test case for better error messages mysql-test/t/repair.test: Added test case for better error messages mysys/my_handler_errors.h: Added handler error message scripts/CMakeLists.txt: Fixed that mysqlbug and mysql_install_db have the executable flag set scripts/mysql_install_db.sh: askmonty.org -> mariadb.com sql/ha_partition.cc: Sometimes table_type() can be called for errors even if partition didn't manage to open any files sql/handler.cc: Write clear text for not handled, but defined error messages. sql/share/errmsg-utf8.txt: Extended shown error for storage engine messages sql/sql_admin.cc: Allow REPAIR ... USE_FRM for old .frm files if the are still compatible storage/myisam/ha_myisam.cc: Use new error message
* | | | | MDEV-5323 Ctrl-C not working under UbuntuSergei Golubchik2013-12-111-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | don't reset interrupted_query after sending the KILL signal, otherwise the client won't know it has to stop fetching and printing the data.
* | | | | mysql-5.5.34 mergeSergei Golubchik2013-11-191-1/+1
|\ \ \ \ \ | | |_|_|/ | |/| | | | | | | | (some patches reverted, test case added)
| * | | | BUG#15844882: MYSQLDUMP FROM 5.5 FAILS WITH AN ERROR WHEN TRYINGNisha Gopalakrishnan2013-07-181-2/+2
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TO DUMP DATA FROM MYSQL-5.6 Merge from mysql-5.1 to mysql-5.5.
| | * | | | BUG#15844882: MYSQLDUMP FROM 5.5 FAILS WITH AN ERROR WHEN TRYINGNisha Gopalakrishnan2013-07-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TO DUMP DATA FROM MYSQL-5.6 Analysis -------- Dumping mysql-5.6 data using mysql-5.1/mysql-5.5 'myqldump' utility fails with a syntax error. Server system variable 'sql_quote_show_create' which quotes the identifiers is set in the mysqldump utility. The mysldump utility of mysql-5.1/mysql-5.5 uses deprecated syntax 'SET OPTION' to set the 'sql_quote_show_create' option. The support for the syntax is removed in mysql-5.6. Hence syntax error is reported while taking the dump. Fix: --- Changed the 'mysqldump' code to use the syntax 'SET SQL_QUOTE_SHOW_CREATE' to set the 'sql_quote_show_create' option. That syntax is supported on mysql-5.1, mysql-5.5 and mysql-5.6. NOTE: I have not added an mtr test case since it is difficult to simulate the condition. Also the syntax may not be further simplified in the future.