summaryrefslogtreecommitdiff
path: root/client
Commit message (Collapse)AuthorAgeFilesLines
* Merge into latest 5.2.unknown2012-08-241-1/+1
|\
| * Merge from 5.1.unknown2012-08-241-1/+1
| |\
* | \ 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
* | | 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.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
* | | 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.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-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.
| | * | | Build broken for gcc 4.5.1 in optimized mode.Tor Didriksen2011-11-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | readline.cc: In function char* batch_readline(LINE_BUFFER*): readline.cc:60:9: error: out_length may be used uninitialized in this function log.cc: In function int find_uniq_filename(char*): log.cc:1857:8: error: number may be used uninitialized in this function
| * | | | Fix main.merge testcase on WindowsVladislav Vaintroub2011-12-011-1/+1
| | | | |
* | | | | 1. add --plugin-dir and --default-auth to mysqltest.Sergei Golubchik2011-12-022-3/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2. dialog plugin now always returns mysql->password if non-empty and the first question is of password type 3. split get_tty_password into get_tty_password_buff and strdup. 4. dialog plugin now uses get_tty_password by default 5. dialog.test 6. moved small tests of individual plugins into a dedicated suite
* | | | | Merge with 5.1Michael Widenius2011-11-301-3/+18
|\ \ \ \ \ | |/ / / /
| * | | | Fixed compiler warnings and other bugs found by buildbot.Michael Widenius2011-11-301-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | client/mysqltest.cc: Free mutex after usage (fixes valgrind warnings in embedded server) mysql-test/include/gis_keys.inc: Fixed failure in innodb.gis_test mysql-test/r/gis.result: Updated result mysql-test/suite/innodb/r/innodb_gis.result: Updated results mysql-test/suite/innodb/t/innodb_bug38231.test: Added handling of timeouts (happend on some servers in buildbot) mysql-test/suite/innodb_plugin/r/innodb_gis.result: Updated results mysql-test/suite/innodb_plugin/t/innodb.test: Use error names instead of numbers mysql-test/suite/innodb_plugin/t/innodb_misc1.test: This test requires utf8 mysql-test/suite/innodb_plugin/t/innodb_mysql.test: This test requires Xtradb sql/sql_base.cc: Don't print table names for placeholders. sql/sql_show.cc: Temporary fix: Save and restore db and table_name in mysqld_show_create (to get rid of valgrind warning) A better solution that needs to be investgated is to not change these fields in mysql_derived_prepare() sql/sql_view.cc: Fixed valgrind warning storage/xtradb/handler/ha_innodb.cc: Don't access THD directly
* | | | | Fix testcases:Vladislav Vaintroub2011-11-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. main.merge fails with errno 13 in copy_file(). The reason for the error is that copy_file tries to create a file with the same name as recently deleted one, and there is still an open handle for the deleted file. To fix, use my_delete_allow_opened() for MTR's delete_file. On Windows, this renames file to unique name prior to deletion, and prevents EACCES errors for files opened with FILE_SHARE_DELETE. 2. innodb_bug59641 generates warnings, after server was killed and restarted in the test case. The warnings are about test_suppression table (needs to be repaired, as it that was written just prior to the crash) Fixed by using FLUSH TABLES after populating warning suppression table.
* | | | | Merge with MariaDB 5.1Michael Widenius2011-11-2417-58/+110
|\ \ \ \ \ | |/ / / /
| * | | | Merge with MySQL 5.1.60Michael Widenius2011-11-233-8/+28
| |\ \ \ \ | | |/ / /
| | * | | Bug#12406055 post-push fix: unused variable 'num_chars' in optimized build.Tor Didriksen2011-11-011-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Also fixed possibly uninitialized use of need_copy_table_res.
| | * | | BUG#11758062 - 50206: ER_TOO_BIG_SELECT REFERS TO OUTMODED Raghav Kapoor2011-09-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SYSTEM VARIABLE NAME SQL_MAX_JOIN_SI BACKGROUND: ER_TOO_BIG_SELECT refers to SQL_MAX_JOIN_SIZE, which is the old name for MAX_JOIN_SIZE. FIX: Support for old name SQL_MAX_JOIN_SIZE is removed in MySQL 5.6 and is renamed as MAX_JOIN_SIZE.So the errmsg.txt and mysql.cc files have been updated and the corresponding result files have also been updated.
| | * | | merge from 5.1 mainBjorn Munch2011-09-261-2/+4
| | |\ \ \
| | | * \ \ Manual merge from mysql-5.1.Ramil Kalimullin2011-08-099-46/+29
| | | |\ \ \
| | | * \ \ \ merge 5.0-security => 5.1-securityTor Didriksen2011-07-151-2/+4
| | | |\ \ \ \ | | | | | |/ / | | | | |/| |
| | | | * | | Bug#12406055 BUFFER OVERFLOW OF VARIABLE 'BUFF' IN STRING::SET_REALTor Didriksen2011-07-151-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The buffer was simply too small. In 5.5 and trunk, the size is 311 + 31, in 5.1 and below, the size is 331 client/sql_string.cc: Increase buffer size in String::set(double, ...) include/m_string.h: Increase FLOATING_POINT_BUFFER mysql-test/r/type_float.result: New test cases. mysql-test/t/type_float.test: New test cases. sql/sql_string.cc: Increase buffer size in String::set(double, ...) sql/unireg.h: Move definition of FLOATING_POINT_BUFFER
| | * | | | | Bug #12793118 MYSQLTEST: --ERROR AND --DISABLE_ABORT_ON_ERROR DO NOT WORK ↵Bjorn Munch2011-09-141-5/+22
| | | |_|/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FOR SQL IN COMMANDS Call handle_error() instead of die() when evaluating these Must remember "current command" with link to errors to ignore Added test cases to mysqltest.test
| * | | | | Initail merge with MySQL 5.1 (XtraDB still needs to be merged)Michael Widenius2011-11-2117-49/+80
| |\ \ \ \ \ | | |/ / / / | | | | | | | | | | | | Fixed up copyright messages.
| | * | | | Manual merge from mysql-5.0.Alexander Nozdrin2011-07-228-42/+27
| | |\ \ \ \ | | | | |_|/ | | | |/| |
| | | * | | For for Bug#12696072: FIX OUTDATED COPYRIGHT NOTICES IN RUNTIME RELATED CLIENTAlexander Nozdrin2011-07-228-53/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TOOLS Backport a fix for Bug 57094 from 5.5. The following revision was backported: # revision-id: alexander.nozdrin@oracle.com-20101006150613-ls60rb2tq5dpyb5c # parent: bar@mysql.com-20101006121559-am1e05ykeicwnx48 # committer: Alexander Nozdrin <alexander.nozdrin@oracle.com> # branch nick: mysql-5.5-bugteam-bug57094 # timestamp: Wed 2010-10-06 19:06:13 +0400 # message: # Fix for Bug 57094 (Copyright notice incorrect?). # # The fix is to: # - introduce ORACLE_WELCOME_COPYRIGHT_NOTICE define to have a single place # to specify copyright notice; # - replace custom copyright notices with ORACLE_WELCOME_COPYRIGHT_NOTICE # in programs.
| | * | | | BUG#12695969Luis Soares2011-07-111-4/+2
| | |\ \ \ \ | | | |/ / / | | | | / / | | | |/ / | | |/| | | | | | | | | | | | | | | | | Manually merged mysql-5.0 into mysql-5.1. conflicts ========= client/mysqlibinlog.cc
| | | * | BUG#12695969: FIX OUTDATED COPYRIGHT NOTICES IN REPLACTIONLuis Soares2011-07-111-7/+3
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CLIENT TOOLS The fix is to backport part of revision: - alexander.nozdrin@oracle.com-20101006150613-ls60rb2tq5dpyb5c from mysql-5.5. In detail, we add the oracle welcome notice header file proposed in the original patch and include/use it in client/mysqlbinlog.cc, replacing the existing and obsolete notice.
| | * | Updated/added copyright headersKent Boortz2011-07-036-26/+49
| | |\ \
| | | * \ BUG#12354268Luis Soares2011-05-061-1/+2
| | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | Automerged bzr bundle from bug report: luis.soares@oracle.com-20110505224815-6ob90n7suxsoizvs.bundle
| | | | * | BUG#12354268: MYSQLBINLOG --BASE64-OUTPUT=DECODE-ROWS DOES NOTLuis Soares2011-05-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WORK WITH --START-POSITION If setting --start-position to start after the FD event, mysqlbinlog will output an error stating that it has not found an FD event. However, its not that mysqlbinlog does not find it but rather that it does not processes it in the regular way (i.e., it does not print it). Given that one is using --base64-output=DECODE-ROWS then not printing it is actually fine. To fix this, we make mysqlbinlog not to complain when it has not printed the FD event, is outputing in base64, but is decoding the rows.
| | | * | | BUG#11762616: BUG#55229: 'POSTION' Luis Soares2011-05-061-2/+2
| | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | Fix for all "postion" in Oracle files (s/postion/position). Updated the copyright notices where needed.