summaryrefslogtreecommitdiff
path: root/client
Commit message (Collapse)AuthorAgeFilesLines
* 5.2 mergeSergei Golubchik2013-05-201-1/+1
|\
| * 5.1 mergeSergei Golubchik2013-05-201-1/+1
| |\
| | * Fixed compiler warningMichael Widenius2013-05-111-1/+1
| | |
* | | 5.2 mergeSergei Golubchik2013-04-111-71/+96
|\ \ \ | |/ /
| * | 5.1 mergeSergei Golubchik2013-04-111-64/+89
| |\ \ | | |/
| | * MDEV-4244 [PATCH] Buffer overruns and use-after-free errorsSergei Golubchik2013-04-061-64/+89
| | | | | | | | | | | | fixes for gcc 4.8 - compilation warnings and -fsanitize=address
* | | 5.2 mergeSergei Golubchik2013-01-252-3/+6
|\ \ \ | |/ /
| * | MDEV-4040 Replace deprecated SET OPTION syntax in mysqldumpSergei Golubchik2013-01-251-2/+2
| | | | | | | | | | | | | | | | | | mysqldump.c: s/SET OPTION/SET/ (OPTION was, hm, optional since 3.21, so there's no need to use SET OPTION even in the old compatibility modes)
| * | MDEV-3915 COM_CHANGE_USER allows fast password brute-forcingSergei Golubchik2013-01-251-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | allow only three failed change_user per connection. successful change_user do NOT reset the counter tests/mysql_client_test.c: make --error to work for --change_user errors
* | | Merge MariaDB 5.1.66 -> 5.2 -> 5.3unknown2012-11-0911-49/+67
|\ \ \ | |/ /
| * | Merge MariaDB 5.1.66 -> 5.2.12unknown2012-11-0811-49/+67
| |\ \ | | |/
| | * Merge MySQL 5.1.66 -> MariaDB 5.1.65unknown2012-11-0611-47/+67
| | |\
| | | * BUG#11757312: MYSQLBINLOG DOES NOT ACCEPT INPUT FROM STDINRohit Kalhans2012-08-081-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WHEN STDIN IS A PIPE Problem: Mysqlbinlog does not accept the input from STDIN when STDIN is a pipe. This prevents the users from passing the input file through a shell pipe. Background: The my_seek() function does not check if the file descriptor passed to it is regular (seekable) file. The check_header() function in mysqlbinlog calls the my_b_seek() unconditionally and it fails when the underlying file is a PIPE. Resolution: We resolve this problem by checking if the underlying file is a regular file by using my_fstat() before calling my_b_seek(). If the underlying file is not seekable we skip the call to my_b_seek() in check_header(). client/mysqlbinlog.cc: Added a check to avoid the my_b_seek() call if the underlying file is a PIPE.
| | | * Bug#13928675 MYSQL CLIENT COPYRIGHT NOTICE MUSTNirbhay Choubey2012-08-0710-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SHOW 2012 INSTEAD OF 2011 * Added a new macro to hold the current year : COPYRIGHT_NOTICE_CURRENT_YEAR * Modified ORACLE_WELCOME_COPYRIGHT_NOTICE macro to take the initial year as parameter and pick current year from the above mentioned macro.
| | | * Backport of Bug#14171740 65562: STRING::SHRINK SHOULD BE A NO-OP WHEN ALLOCED=0Tor Didriksen2012-07-261-3/+7
| | | |
| | | * Bug #12615411 - server side help doesn't work as first statementVenkata Sidagam2012-07-191-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem description: Giving "help 'contents'" in the mysql client as a first statement gives error Analysis: In com_server_help() function the "server_cmd" variable was initialised with buffer->ptr(). And the "server_cmd" variable is not updated since we are passing "'contents'"(with single quote) so the buffer->ptr() consists of the previous buffer values and it was sent to the mysql_real_query() hence we are getting error. Fix: We are not initialising the "server_cmd" variable and we are updating the variable with "server_cmd= cmd_buf" in any of the case i.e with single quote or without single quote for the contents. As part of error message improvement, added new error message in case of "help 'contents'". client/mysql.cc: com_server_help(): Properly updated the server_cmd variable and improved the error message.
| * | | Merge into latest 5.2.unknown2012-08-241-1/+1
| |\ \ \
* | \ \ \ Merge into latest 5.3unknown2012-08-241-1/+1
|\ \ \ \ \
| * \ \ \ \ merge from 5.2unknown2012-08-241-1/+1
| |\ \ \ \ \ | | | |/ / / | | |/| | |
| | * | | | Merge from 5.1.unknown2012-08-241-1/+1
| | |\ \ \ \
* | | \ \ \ \ 5.2 merge.Sergei Golubchik2012-08-223-14/+88
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | / / / | | |_|/ / / | |/| | | | | | | | | | | | | | | | two tests still fail: main.innodb_icp and main.range_vs_index_merge_innodb call records_in_range() with both range ends being open (which triggers an assert)
| * | | | | 5.1 mergeSergei Golubchik2012-08-223-14/+88
| |\ \ \ \ \ | | |/ / / / | |/| | / / | | | |/ / | | |/| | increase xtradb verson from 13.0 to 13.01
| | * | | merge with MySQL 5.1.65Sergei Golubchik2012-08-223-14/+88
| | |\ \ \ | | | |/ / | | |/| / | | | |/
| | | * BUG#11762670:MY_B_WRITE RETURN VALUE IGNOREDSujatha Sivakumar2012-07-101-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: ======= The return value from my_b_write is ignored by: `my_b_write_quoted', `my_b_write_bit',`Query_log_event::print_query_header' Most callers of `my_b_printf' ignore the return value. `log_event.cc' has many calls to it. Analysis: ======== `my_b_write' is used to write data into a file. If the write fails it sets appropriate error number and error message through my_error() function call and sets the IO_CACHE::error == -1. `my_b_printf' function is also used to write data into a file, it internally invokes my_b_write to do the write operation. Upon success it returns number of characters written to file and on error it returns -1 and sets the error through my_error() and also sets IO_CACHE::error == -1. Most of the event specific print functions for example `Create_file_log_event::print', `Execute_load_log_event::print' etc are the ones which make several calls to the above two functions and they do not check for the return value after the 'print' call. All the above mentioned abuse cases deal with the client side. Fix: === As part of bug fix a check for IO_CACHE::error == -1 has been added at a very high level after the call to the 'print' function. There are few more places where the return value of "my_b_write" is ignored those are mentioned below. +++ mysys/mf_iocache2.c 2012-06-04 07:03:15 +0000 @@ -430,7 +430,8 @@ memset(buffz, '0', minimum_width - length2); else memset(buffz, ' ', minimum_width - length2); - my_b_write(info, buffz, minimum_width - length2); +++ sql/log.cc 2012-06-08 09:04:46 +0000 @@ -2388,7 +2388,12 @@ { end= strxmov(buff, "# administrator command: ", NullS); buff_len= (ulong) (end - buff); - my_b_write(&log_file, (uchar*) buff, buff_len); At these places appropriate return value handlers have been added. client/mysqlbinlog.cc: check for IO_CACHE::error == -1 has been added after the call to the event specific print functions mysys/mf_iocache2.c: Added handler to check the written value of `my_b_write' sql/log.cc: Added handler to check the written value of `my_b_write' sql/log_event.cc: Added error simulation statements in `Create_file_log_event::print` and `Execute_load_query_log_event::print' sql/rpl_utility.h: Removed the extra ';'
| | | * Bug #13708485: malformed resultset packet crashes clientGeorgi Kodinov2012-06-281-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several fixes : * sql-common/client.c Added a validity check of the fields metadata packet sent by the server. Now libmysql will check if the length of the data sent by the server matches what's expected by the protocol before using the data. * client/mysqltest.cc Fixed the error handling code in mysqltest to avoid sending new commands when the reading the result set failed (and there are unread data in the pipe). * sql_common.h + libmysql/libmysql.c + sql-common/client.c unpack_fields() now generates a proper error when it fails. Added a new argument to this function to support the error generation. * sql/protocol.cc Added a debug trigger to cause the server to send a NULL insted of the packet expected by the client for testing purposes.
| | | * Bug#14238406 NEW COMPILATION WARNINGS WITH GCC 4.7 (-WERROR=NARROWING)Jon Olav Hauglid2012-06-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | This patch fixes various compilation warnings of the type "error: narrowing conversion of 'x' from 'datatype1' to 'datatype2'
| | | * Bug#11762667: MYSQLBINLOG IGNORES ERRORS WHILE WRITING OUTPUTRohit Kalhans2012-05-291-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: mysqlbinlog exits without any error code in case of file write error. It is because of the fact that the calls to Log_event::print() method does not return a value and the thus any error were being ignored. Resolution: We resolve this problem by checking for the IO_CACHE::error == -1 after every call to Log_event:: print() and terminating the further execution. client/mysqlbinlog.cc: - handled error conditions during event->print() calls - added check for error in end_io_cache() mysys/my_write.c: Added debug code to simulate file write error. error returned will be ENOSPC=> error no space on the disk sql/log_event.cc: Added debug code to simulate file write error, by reducing the size of io cache.
| | | * Bug #11754178 45740: MYSQLDUMP DOESN'T DUMP GENERAL_LOG AND SLOW_QUERY Venkata Sidagam2012-05-071-8/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CAUSES RESTORE PROBLEM Problem Statement: ------------------ mysqldump is not having the dump stmts for general_log and slow_log tables. That is because of the fix for Bug#26121. Hence, after dropping the mysql database, and applying the dump by enabling the logging, "'general_log' table not found" errors are logged into the server log file. Analysis: --------- As part of the fix for Bug#26121, we skipped the dumping of tables for general_log and slow_log, because the data dump of those tables are taking LOCKS, which is not allowed for log tables. Fix: ---- We came up with an approach that instead of taking both meta data and data dump information for those tables, take only the meta data dump which doesn't need LOCKS. As part of fixing the issue we came up with below algorithm. Design before fix: 1) mysql database is having tables like db, event,... general_log, ... slow_log... 2) Skip general_log and slow_log while preparing the tables list 3) Take the TL_READ lock on tables which are present in the table list and do 'show create table'. 4) Release the lock. Design with the fix: 1) mysql database is having tables like db, event,... general_log, ... slow_log... 2) Skip general_log and slow_log while preparing the tables list 3) Explicitly call the 'show create table' for general_log and slow_log 3) Take the TL_READ lock on tables which are present in the table list and do 'show create table'. 4) Release the lock. While taking the meta data dump for general_log and slow_log the "CREATE TABLE" is replaced with "CREATE TABLE IF NOT EXISTS". This is because we skipped "DROP TABLE" for those tables, "DROP TABLE" fails for these tables if logging is enabled. Customer is applying the dump by enabling logging so, if the dump has "DROP TABLE" it will fail. Hence, removed the "DROP TABLE" stmts for those tables. After the fix we could observe "Table 'mysql.general_log' doesn't exist" errors initially that is because in the customer scenario they are dropping the mysql database by enabling the logging, Hence, those errors are expected. Once we apply the dump which is taken before the "drop database mysql", the errors will not be there. client/mysqldump.c: In get_table_structure() added code to skip the DROP TABLE stmts for general_log and slow_log tables, because when logging is enabled those stmts will fail. And replaced CREATE TABLE with CREATE IF NOT EXISTS for those tables, just to make sure CREATE stmt for those tables doesn't fail since we removed DROP stmts for those tables. In dump_all_tables_in_db() added code to call get_table_structure() for general_log and slow_log tables. mysql-test/r/mysqldump.result: Added a test as part of fix for Bug #11754178 mysql-test/t/mysqldump.test: Added a test as part of fix for Bug #11754178
* | | | Merge 5.2->5.3Sergey Petrunya2012-06-181-4/+7
|\ \ \ \ | |/ / /
| * | | 5.1 mergeSergei Golubchik2012-06-011-4/+7
| |\ \ \ | | |/ /
| | * | MDEV-256 lp:995501 - mysqltest attempts to parse Perl code inside a blockSergei Golubchik2012-06-011-4/+7
| | | | | | | | | | | | | | | | with false condition, gets confused and throws wrong errors
* | | | 5.2 mergeSergei Golubchik2012-05-201-1/+2
|\ \ \ \ | |/ / /
| * | | 5.1 mergeSergei Golubchik2012-05-181-1/+2
| |\ \ \ | | |/ /
| | * | merge with mysql-5.1.63Sergei Golubchik2012-05-171-1/+2
| | |\ \ | | | |/
| | | * Bug #11766072 59107: MYSQLSLAP CRASHES IF STARTED WITH NO ARGUMENTS ON WINDOWSVenkata Sidagam2012-04-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bug is a duplicate of Bug #31173, which was pushed to the mysql-trunk 5.6 on 4th Aug, 2010. This is just a back-port of the fix mysql-test/r/mysqlslap.result: A test added as part of the fix for Bug #59107 mysql-test/t/mysqlslap.test: A test added as part of the fix for Bug #59107
* | | | Merge 5.2->5.3unknown2012-05-111-5/+40
|\ \ \ \ | |/ / /
| * | | Fixed typounknown2012-05-101-1/+1
| | | |
| * | | MDEV-261 : mysqtest crashes when assigning variable to result of select , like Vladislav Vaintroub2012-05-081-5/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | let x = `SELECT <something>` The fix is to detect the condition "no active connection", to report error and die. Note, that the check for no active connection was already in place for ordinary commands, and was missing only for assign-variable command.
* | | | 5.2 mergeSergei Golubchik2012-05-021-1/+0
|\ \ \ \ | |/ / /
| * | | 5.1 mergeSergei Golubchik2012-05-021-1/+0
| |\ \ \ | | |/ /
| | * | lp:986120 Problem installing mariadb 5 on solaris 10Sergei Golubchik2012-04-241-1/+0
| | | | | | | | | | | | | | | | remove a redundant line in Makefile.am
* | | | mergeSergei Golubchik2012-04-052-127/+333
|\ \ \ \ | |/ / /
| * | | mergeSergei Golubchik2012-04-052-130/+335
| |\ \ \ | | |/ /
| | * | mysql-5.1.62 mergeSergei Golubchik2012-04-052-130/+335
| | |\ \ | | | |/
| | | * AIX builds fail for comments using //Karen Langford2012-02-281-2/+2
| | | |
| | | * Updated/added copyright headersKent Boortz2012-02-152-2/+2
| | | |\
| | | | * Updated/added copyright headersMySQL Build Team2012-02-151-2/+1
| | | | |
| | | | * auto-merge mysql-5.0->mysql-5.0-securityGeorgi Kodinov2011-10-129-60/+39
| | | | |\
| | | * | | Bug #11760384 52792: MYSQLDUMP IN XML MODE DOES NOTNirbhay Choubey2012-01-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DUMP ROUTINES Minor post-fix to avoid build failure when built with Werror.
| | | * | | BUG#11760384 - 52792: mysqldump in XML mode does not dumpNirbhay Choubey2012-01-101-128/+333
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | routines. mysqldump in xml mode did not dump routines, events or triggers. This patch fixes this issue by fixing the if conditions that disallowed the dump of above mentioned objects in xml mode, and added the required code to enable dump in xml format. client/mysqldump.c: BUG#11760384 - 52792: mysqldump in XML mode does not dump routines. Fixed some if conditions to allow execution of dump methods for xml and further added the relevant code at places to produce the dump in xml format. mysql-test/r/mysqldump.result: Added a test case for Bug#11760384. mysql-test/t/mysqldump.test: Added a test case for Bug#11760384.