summaryrefslogtreecommitdiff
path: root/client
Commit message (Collapse)AuthorAgeFilesLines
* Bug #11754178 45740: MYSQLDUMP DOESN'T DUMP GENERAL_LOG AND SLOW_QUERYVenkata Sidagam2012-05-071-8/+50
|\ | | | | | | | | | | | | | | | | | | | | | | CAUSES RESTORE PROBLEM Merging the fix from mysql-5.1 to mysql-5.5 mysql-test/t/mysqldump.test: There is a difference in the testcase which is added as part of this fix, when compared with mysql-5.1. In mysql-5.5 and mysql-5.6, "DROP mysql database" fails by enabling logging, hence removed those lines.
| * Bug #11754178 45740: MYSQLDUMP DOESN'T DUMP GENERAL_LOG AND SLOW_QUERY Venkata Sidagam2012-05-041-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
* | Merged from 5.1 to 5.5Venkata Sidagam2012-04-091-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
* | Further upmerge the yaSSL upgrade (to 2.2.0) from MySQL 5.1 to 5.5.Joerg Bruehe2012-03-021-2/+2
|\ \ | |/ | | | | | | Also, take a syntax fix (C++ style comment in C file) in client/mysqldump.c.
| * AIX builds fail for comments using //Karen Langford2012-02-281-2/+2
| |
* | Updated/added copyright headersMySQL Build Team2012-02-164-4/+4
|\ \ | |/
| * 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.
* | | | Merge with main for BUG#12969301unknown2012-01-302-142/+369
|\ \ \ \
| * | | | fix compile warning: may be used uninitializedTor Didriksen2012-01-121-1/+1
| | | | |
| * | | | Merge of fix for bug#11760384 from mysql-5.1.Nirbhay Choubey2012-01-101-131/+335
| |\ \ \ \ | | |/ / /
| | * | | 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
| | * | | 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#12809202 61854: MYSQLDUMP --SINGLE-TRANSACTIONNirbhay Choubey2011-12-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --FLUSH-LOG BREAKS CONSISTENCY Post-fix for some failing tests.
| * | | | Bug#12809202 61854: MYSQLDUMP --SINGLE-TRANSACTIONNirbhay Choubey2011-12-231-10/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --FLUSH-LOG BREAKS CONSISTENCY The transaction started by mysqldump gets committed implicitly when flush-log is specified along with single-transaction option, and hence can break consistency. This is because, COM_REFRESH is executed in order to flush logs and starting from 5.5 this command performs an implicit commit. Fixed by making sure that COM_REFRESH is executed before the transaction has started and not after it. Note : This patch triggers following behavioral changes in mysqldump : 1) After this patch we no longer flush logs before dumping each database if --single-transaction option is given like it was done before (in the absence of --lock-all-tables and --master-data options). 2) Also, after this patch, we start acquiring FTWRL before flushing logs in cases when only --single-transaction and --flush-logs are given. It becomes safe to use mysqldump with these two options and without --master-data parameter for backups. client/mysqldump.c: Bug#12809202 61854: MYSQLDUMP --SINGLE-TRANSACTION --FLUSH-LOG BREAKS CONSISTENCY Added logic to make sure that, if flush-log option is specified, mysql_refresh() is never executed after the transaction has started. Added verbose messages for all the executions of mysql_refresh() in order to track its invocation. mysql-test/r/mysqldump.result: Added test case for Bug#12809202. mysql-test/t/mysqldump.test: Added test case for Bug#12809202.
| * | | | A patch for Bug#13023858 - MYSQL_UPGRADE PRINTSAlexander Nozdrin2011-12-211-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | THE ORACLE_WELCOME_COPYRIGHT_NOTICE TWICE. Fix of a merge error.
* | | | | BUG#12969301 : mysql_plugin: enable is ignored if plugin existsunknown2012-01-241-3/+7
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the mechanism by which the client enables a plugin. Instead of using INSERT IGNORE to reload a plugin library, it now uses REPLACE INTO. This allows users to load a library multiple times replacing the existing values in the mysql.plugin table. This allows users to replace the symbol reference to a different dl name in the table. Thus permitting enabling of multiple versions of the same library without first disabling the old version. A regression test was added to ensure this feature works.
* | | | Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITHNirbhay Choubey2011-11-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OPTION SKIP-WRITE-BINLOG System tables were not getting upgraded when mysql_upgrade was run with --skip-write-binlog option. (Same for --write-binlog.) Also, with this option, mysql_upgrade_info file was not getting created after the upgrade. mysql_upgrade makes use of mysql client tool in order to run upgrade scripts, while doing so it passes some of the command line options (used to start mysql_upgrade) directly to mysql client. The reason behind this bug being, some options like skip-write-binlog and upgrade-system-tables were being passed to mysql tool along with other options, and hence mysql execution failed due presence of these invalid options. Fixed this issue by filtering out the above mentioned options from the list of options that will be passed to mysql and mysqlcheck tools. However, since --write-binlog is supported by mysqlcheck, this option would be used explicitly while running mysqlcheck. (not part of patch, already there) Checking the contents of general log after the upgrade is not doable via an mtr test. So performed manual test. Added a test to verify the creation of mysql_upgrade_info. client/mysql_upgrade.c: Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH OPTION SKIP-WRITE-BINLOG With this patch, --upgrade-system-tables and --write-binlog options will not be added to the list of options, used to start mysql and mysqlcheck tools. mysql-test/r/mysql_upgrade.result: Added a testcase for Bug#11827359. mysql-test/t/mysql_upgrade.test: Added a testcase for Bug#11827359.
* | | | BUG#12929028: mysql_plugin : the --mysqld option is required, but not usedunknown2011-11-111-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch corrects a defect whereby the --mysqld, --my-print-defaults, and --plugin-ini were required. These options are not required and the code has been fixed accordingly.
* | | | Bug #13055685 NO WAY TO REPLACE NON-DETERMINISTIC FRAGMENTS IN OUTPUT OF ↵Bjorn Munch2011-11-081-27/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MTR'S ECHO Don't do this for echo, instead: 1) Enable replacements also for assignment from backquoted SQL 2) Allow replace_regex to take a variable for the *entire* argument list With this, the test can be amended, but only in its version in trunk
* | | | Bug #13096353 62712: RPM-BASED INSTALL OF THE TEST SUITE IS USELESS FOR ↵Bjorn Munch2011-11-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NON-ROOT USERS Simplified fix avoiding changes to mysys: Use the MY_HOLD_ORIGINAL_MODES flag when calling my_copy(), this also stops it from attempting to chown() the file. Yes this behavior is a bit confusing.... The only case this might change the behavior is if the destination file exists, but since we also use MY_DONT_OVERWRITE_FILE, it would fail in those cases anyway.
* | | | Bug #11754855 46528: NEED A WAY TO PASS A VARIABLE TO MTR COMMANDSunknown2011-10-191-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | modified function do_get_error in mysqltest.cc to handle multiple variable passed added test case to mysqltest.test to verify handling to multiple errors passed
* | | | BUG#12968567: mysql_plugin : incorrect return from bootstrap failureunknown2011-10-171-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch corrects a defect whereby the bootstrap_server() method was returning 0 instead of the error code generated. The code has been changed to return the correct value returned from the bootstrap command.
* | | | BUG#12968815: mysql_plugin : disable requires plugin name but doesn't use itunknown2011-10-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch corrects a defect in the building of the DELETE commands for disabling a plugin whereby only the original plugin data was deleted. If there were other plugins, the delete did not remove the rows. The code has been changed to remove all rows from the mysql.plugin table that were inserted when the plugin was loaded. The test has also been changed to correctly identify if all rows have been deleted.
* | | | 12956584 followup fix for mysqltestBjorn Munch2011-09-301-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | run_query_stmt() might use disable_xxx vars after calling handle_no_error But handle_no_error() hes reverted any ONCE settings Fix is to take revert_properties() out of handle_no_error()
* | | | Merge of fix for bug#11758062 from mysql-5.1.Raghav Kapoor2011-09-281-1/+1
|\ \ \ \ | |/ / /
| * | | 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
* | | | | | merge from 5.5 mainBjorn Munch2011-09-261-5/+15
|\ \ \ \ \ \
| * \ \ \ \ \ merge from 5.5.16Daniel Fischer2011-09-211-5/+15
| |\ \ \ \ \ \
| | * | | | | | BUG#12929631 : Execute crashes with --verbose output (Windows) Chuck Bell2011-09-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch corrects an error encountered in PB where Windows machines are built in release mode have an extraneous parameter added in place of the --console option. This is caused by the insert of '(null' instead of an empty string. In non-debug mode, the string is explicitly set to an empty string. Patch also fixes a result mismatch on Windows machines.
| | * | | | | | BUG#12929345 : Execution aborts without any messages (Windows only)Chuck Bell2011-09-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the length of the buffer in the strncat operation to prevent buffer overrun.
| | * | | | | | BUG#12929345 : Execution aborts without any messages (Windows only)Chuck Bell2011-09-071-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch corrects an unsafe string concatenation for a Windows-specific code segment. The symptoms were, under certain conditions like specifying the location of my-print-defaults and the basedir, and run on a release build, the client would exit without printing any messages.
| | * | | | | | BUG#12929631 : Execute crashes with --verbose output (Windows) Chuck Bell2011-09-071-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch corrects an unsafe string concatenation in the Windows specific code for building the bootstrap command to enable or disable the plugin.
| | * | | | | | Cherry-picking WL#5710 from mysql-5.5 to mysql-5.5.16-release.Alexander Nozdrin2011-08-152-1/+1196
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original revision id: # revno: 3489 [merge] # revision-id: tatjana.nuernberg@oracle.com-20110811120945-c6x9a5d2du8s9oj2 # parent: tatjana.nuernberg@oracle.com-20110811112736-so8r813hs8dmf7nr # parent: chuck.bell@oracle.com-20110810183949-2s9uxcuoux2p668e # committer: Tatjana Azundris Nuernberg <tatjana.nuernberg@oracle.com> # branch nick: 55-9 # timestamp: Thu 2011-08-11 13:09:45 +0100 # message: # auto-merge This merge revision also has a patch for Bug 12664445, which has been also taken to 5.5.16.
* | | | | | | | upmerge 12793118,12912120Bjorn Munch2011-09-151-5/+22
|\ \ \ \ \ \ \ \ | | |_|/ / / / / | |/| | | | | |
| * | | | | | | 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
* | | | | | | Bug #12956584 - MYSQLTEST: --ENABLE_X OR --DISABLE_X APPLYING ONLY TO NEXT ↵Bjorn Munch2011-09-151-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | COMMAND/STMT Followup fixes for --ps-protocol: 1) Incorrectly set ps_protocol variable instead of ps_protocol_enabled 2) disable_result_log was tested after calling handle_no_error() which would revert a temporary setting.
* | | | | | | Bug #12956584 MYSQLTEST: --ENABLE_X OR --DISABLE_X APPLYING ONLY TO NEXT ↵Bjorn Munch2011-09-141-30/+102
| |/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | COMMAND/STMT Added a keyword ONCE to add to those commands Some internal tables to keep track of which properties are temporarily overriden Added tests in mysqltest.test Updates to other tests will be done later
* | | | | | Bug #12793170 MYSQLTEST: PROVIDE ACCESS TO ERROR NAMES THROUGH NUMERICBjorn Munch2011-08-221-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CODES AND VICE VERSA Followup: Some statement may give errors not in the list, map these to "<Unknown>" rather than failing.
* | | | | | Bug #12793170 MYSQLTEST: PROVIDE ACCESS TO ERROR NAMES THROUGH NUMERIC CODES ↵Bjorn Munch2011-08-221-9/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AND VICE VERSA Added a second internal variable $mysql_errname This is set the same way as $mysql_errno Can be used like "if ($mysql_errname == ER_NO_SUCH_TABLE)...."
* | | | | | WL#5710 : enable and disable pluginsChuck Bell2011-08-108-23/+15
|\ \ \ \ \ \ | | |/ / / / | |/| | | | | | | | | | | | | | | | Merge with main prior to pushing to mysql-5.5.
| * | | | | Manual merge from mysql-5.1.Alexander Nozdrin2011-07-228-23/+15
| |\ \ \ \ \ | | |/ / / /