summaryrefslogtreecommitdiff
path: root/mysql-test
Commit message (Collapse)AuthorAgeFilesLines
* bug#58525 postfixSerge Kozlov2011-03-161-1/+1
|
* BUG#11872422: rpl_slave_load_remove_tmpfile fails sporadically in pb2Sven Sandberg2011-03-153-12/+25
| | | | | | | | | | | | | | | | | | | | | | | Problem: the test failed because errors were found in the error log. The test case contains suppressions for an old version of the error message, but the format of the error message has changed without updating the suppression. Fix: Update the suppression. Also small fixes to improve the test. mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result: update result file mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile-slave.opt: Use variables instead of .opt files to avoid server restarts. mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test: 1. To fix the bug, we update the regular expression in mtr.add_suppression so that it matches the real error text. 2. Use wait_for_slave_sql_error.inc when we wait for an error. This makes the test easier to understand and will produce better debug info if the test fails. 3. Use server variables instead of command line options to set the @@GLOBAL.DEBUG variable. This avoids server restarts when running the test suite. 4. Clarify the comment at the top of the file and add bug reference.
* Manual merge from mysql-5.1 for Bug#11764168 (56976: Severe denialDmitry Shulga2011-03-156-0/+49
|\ | | | | | | | | | | | | | | | | of service in prepared statements). sql/sql_prepare.cc: At mysql_stmt_get_longdata(): instead of pushing an internal error handler (as done in 5.1-tree) we save, set and restore the statement's diagnostics area and warning info.
| * Fixed Bug#11764168 "56976: SEVERE DENIAL OF SERVICE IN PREPARED STATEMENTS".Dmitry Shulga2011-03-152-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was that server didn't check resulting size of prepared statement argument which was set using mysql_send_long_data() API. By calling mysql_send_long_data() several times it was possible to create overly big string and thus force server to allocate memory for it. There was no way to limit this allocation. The solution is to add check for size of result string against value of max_long_data_size start-up parameter. When intermediate string exceeds max_long_data_size value an appropriate error message is emitted. We can't use existing max_allowed_packet parameter for this purpose since its value is limited by 1GB and therefore using it as a limit for data set through mysql_send_long_data() API would have been an incompatible change. Newly introduced max_long_data_size parameter gets value from max_allowed_packet parameter unless its value is specified explicitly. This new parameter is marked as deprecated and will be eventually replaced by max_allowed_packet parameter. Value of max_long_data_size parameter can be set only at server startup. mysql-test/t/variables.test: Added checking for new start-up parameter max_long_data_size. sql/item.cc: Added call to my_message() when accumulated string exceeds max_long_data_size value. my_message() calls error handler that was installed in mysql_stmt_get_longdata before call to Item_param::set_longdata. The error handler then sets state, last_error and last_errno fields for current statement to values which correspond to error which was caught. sql/mysql_priv.h: Added max_long_data_size variable declaration. sql/mysqld.cc: Added support for start-up parameter 'max_long_data_size'. This parameter limits size of data which can be sent from client to server using mysql_send_long_data() API. sql/set_var.cc: Added variable 'max_long_data_size' into list of variables displayed by command 'show variables'. sql/sql_prepare.cc: Added error handler class Set_longdata_error_handler. This handler is used to catch any errors that can be generated during execution of Item_param::set_longdata(). Source code snippet that makes checking for statement's state during statement execution is moved from Prepared_statement::execute() to Prepared_statement::execute_loop() in order not to call set_parameters() when statement has failed during set_long_data() execution. If this hadn't been done the call to set_parameters() would have failed. tests/mysql_client_test.c: A testcase for the bug #56976 was added.
* | Bug #11765416 (former 58381)Jon Olav Hauglid2011-03-152-0/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FAILED DROP DATABASE CAN BREAK STATEMENT BASED REPLICATION The first phase of DROP DATABASE is to delete the tables in the database. If deletion of one or more of the tables fail (e.g. due to a FOREIGN KEY constraint), DROP DATABASE will be aborted. However, some tables could still have been deleted. The problem was that nothing would be written to the binary log in this case, so any slaves would not delete these tables. Therefore the master and the slaves would get out of sync. This patch fixes the problem by making sure that DROP TABLE is written to the binary log for the tables that were in fact deleted by the failed DROP DATABASE statement. Test case added to binlog.binlog_database.test.
* | Add warning suppression to test rpl.rpl_slave_load_remove_tmpfileBjorn Munch2011-03-152-0/+2
| |
* | Local merger for BUG#59752Chuck Bell2011-03-147-4/+63
|\ \
| * \ Merge of mysql-5.1 into mysql-5.5.Davi Arnaut2011-03-142-0/+25
| |\ \ | | |/
| | * Bug#11765202: Dbug_violation_helper::~Dbug_violation_helper(): Assertion ↵Davi Arnaut2011-03-142-0/+25
| | | | | | | | | | | | | | | | | | `!_entered' failed. Add a missing DBUG_RETURN function test_if_number().
| | * merge from 5.1-mtrBjorn Munch2011-03-1167-11/+124
| | |\
| | | * merge from 5.1 mainBjorn Munch2011-03-118-14/+451
| | | |\
| | | * \ merge from 5.1 mainBjorn Munch2011-03-089-4/+79
| | | |\ \
| * | | | | A patch for Bug#11765297 (58251 - archive_plugin and blackhole_pluginAlexander Nozdrin2011-03-144-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fails when running with ps-protocol). The problem was that when running in --ps-protocol mode mysqltest.cc didn't close created prepared statements. So, the plugins could not be unistalled because there was a prepared statement using them. A fix is to add a dummy statement that forces mysqltest.cc to close the last prepared statement (which uses a plugin-defined table).
| * | | | | Fight a problem in internal test builds:Joerg Bruehe2011-03-111-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a RPM test build in a non-release branch is done, the $MYSQL_BINDIR variable ends in "/usr" (rather than in "/usr/lib" as in a RPM release build), this made test "file_contents" fail. A branch for this case is added to the test. The test result is unchanged. mysql-test/t/file_contents.test: Fight a problem in internal test builds: When a RPM test build in a non-release branch is done, the $MYSQL_BINDIR variable ends in "/usr" (rather than in "/usr/lib" as in a RPM release build), this made test "file_contents" fail. Because of this, the old logic did not recognize that a RPM build is done (trailing '/' missing!) and took the tar.gz branch. Just removing the trailing '/' from the "/usr" is not enough, as the logic for RPMs used to replace "/lib" which is not present at all; rather, a new branch was added. To help in case of future problems, the error messages for a failing "open()" now also report "$MYSQL_BINDIR".
* | | | | | BUG#59752 : mysql.user.plugin length (60) vs. mysql.plugin.name length (64)Chuck Bell2011-03-112-3/+3
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch corrects the problem by fixing the definition and alterations of the mysql.user table in the .sql files. Also included are new result files for tests that examine the name column of the mysql.user table.
* | | | | merge from 5.5-mtrBjorn Munch2011-03-1189-23/+260
|\ \ \ \ \
| * \ \ \ \ merge from 5.5 mainBjorn Munch2011-03-1117-39/+863
| |\ \ \ \ \
| * | | | | | Add extra line after unit test report in MTRBjorn Munch2011-03-081-2/+5
| | | | | | |
| * | | | | | merge from 5.5 mainBjorn Munch2011-03-0831-57/+518
| |\ \ \ \ \ \
| * \ \ \ \ \ \ Attempt at solving missing end of mtr output on WindowsBjorn Munch2011-02-281-0/+2
| |\ \ \ \ \ \ \ | | | |_|_|/ / / | | |/| | | | |
| | * | | | | | Attempt at solving missing end of mtr output on WindowsBjorn Munch2011-02-281-0/+2
| | | | | | | |
| | * | | | | | merge from 5.1 mainBjorn Munch2011-02-2425-55/+414
| | |\ \ \ \ \ \
| * | | | | | | | mtr: ignore not finding ctest if in PB2Bjorn Munch2011-02-251-1/+2
| | | | | | | | |
| * | | | | | | | vs-config option to ctest made not dependent on WindowsBjorn Munch2011-02-241-2/+2
| | | | | | | | |
| * | | | | | | | 11762407 follow-up fixes to a few testsBjorn Munch2011-02-244-0/+4
| | | | | | | | |
| * | | | | | | | merge from 5.5 mainBjorn Munch2011-02-2468-119/+1512
| |\ \ \ \ \ \ \ \
| * | | | | | | | | 11766640 follow-up: fix for VS_CONFIG on WindowsBjorn Munch2011-02-242-4/+7
| | | | | | | | | |
| * | | | | | | | | Upmerge 11762407 (54999) with additionsBjorn Munch2011-02-2380-17/+152
| |\ \ \ \ \ \ \ \ \ | | | |/ / / / / / / | | |/| | | | | | |
| | * | | | | | | | Bug #11762407 54999: MTR GLOBAL SUPPRESSION HIDES SQL THREAD EXECUTION ↵Bjorn Munch2011-02-2366-11/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | UNEXPECTED ERRORS Removed the global suppression, added lots of local ones to affected tests Re-commit, now kept "Slave SQL" at start of patterns.
| * | | | | | | | | Bug #11766640 (59789) Hook the invocation of unit tests in MTR.Bjorn Munch2011-02-217-6/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added code to call 'ctest' if the needed cmake file is present Will do so unless tests/suited named on mtr command line Also add option to turn on/off Will be made to look like a test 'unit-test' which counts towards total Extracts summary report and any test failures from ctest output Addendum: added override to turn off in PB, add back in selected invocations
* | | | | | | | | | merge from mysql5.1 for bug#11760210Mayank Prasad2011-03-113-0/+33
|\ \ \ \ \ \ \ \ \ \ | | |_|_|_|_|_|/ / / | |/| | | | | | | |
| * | | | | | | | | BUG #11760210: 52596: SSL_CIPHER_LIST NOT SET OR RETURNED FOR "SHOW STATUS ↵Mayank Prasad2011-03-113-0/+33
| | |_|_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LIKE 'SSL_CIPHER_LIST'" Issue: SSL_CIPHER set to a specific CIPHER name was not getting picked up by SHOW STATUS Command. Solution: If specific cipher name is specified, avoid overwriting of Cipher List with default Cipher names. extra/yassl/src/yassl_int.cpp: If user specified Cipher name is there, avoid populating default cipher names' list. mysql-test/r/ssl_cipher.result: Expected file for ssl_cipher.test test case mysql-test/t/ssl_cipher-master.opt: Server option file for ssl_cipher.test test case. mysql-test/t/ssl_cipher.test: Test case to verify that user specified SSL cipher name is shown in SHOW STATUS Command.
* | | | | | | | | Test cleanupMarc Alff2011-03-112-4/+32
| |_|_|_|_|_|/ / |/| | | | | | |
* | | | | | | | Reworked the test case to be more robust.Marc Alff2011-03-102-67/+173
| | | | | | | |
* | | | | | | | Local mergeMarc Alff2011-03-104-5/+71
|\ \ \ \ \ \ \ \
| * | | | | | | | Patch for Bug#11765684 (58674: SP-cache does not detect changes inAlexander Nozdrin2011-03-104-5/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pre-locking list caused by triggers). The thing is that CREATE TRIGGER / DROP TRIGGER may actually change pre-locking list of (some) stored routines. The SP-cache does not detect such changes. Thus if sp_head-instance is cached in SP-cache, subsequent executions of the cached sp_head will use inaccurate pre-locking list. The patch is to invalidate SP-cache on CREATE TRIGGER / DROP TRIGGER.
* | | | | | | | | Local mergeMarc Alff2011-03-1042-91/+990
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / /
| * | | | | | | | Skip tests in disabled-daily.listAnitha Gopi2011-03-101-13/+13
| | | | | | | | |
| * | | | | | | | Skip the tests listed in disabled-weekly.listAnitha Gopi2011-03-101-7/+7
| | | | | | | | |
| * | | | | | | | Bug11817185# : Disabled MAIN.ARCHIVE-BIG.TESTAnitha Gopi2011-03-101-0/+1
| | | | | | | | |
| * | | | | | | | mergeMattias Jonsson2011-03-092-0/+81
| |\ \ \ \ \ \ \ \ | | |/ / / / / / /
| | * | | | | | | Merge of Bug#11766232 - bug#59297Mattias Jonsson2011-03-092-0/+81
| | |\ \ \ \ \ \ \
| | | * | | | | | | Bug#59297: Can't find record in 'tablename' on update inner joinMattias Jonsson2011-01-242-0/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Regression introduced in bug#52455. Problem was that the fixed function did not set the last used partition variable, resulting in wrong partition used when storing the position of the newly retrieved row. Fixed by setting the last used partition in ha_partition::index_read_idx_map.
| * | | | | | | | | merge mysql-5.1->mysql-5.5Georgi Kodinov2011-03-096-14/+370
| |\ \ \ \ \ \ \ \ \ | | |/ / / / / / / / | | | | | | | | / / | | |_|_|_|_|_|/ / | |/| | | | | | |
| | * | | | | | | Merge from mysql-5.1.56-releaseunknown2011-03-036-14/+370
| | |\ \ \ \ \ \ \ | | | |_|_|_|_|_|/ | | |/| | | | | |
| | | * | | | | | weave merge mysql-5.1->mysql-5.1-securityGeorgi Kodinov2011-02-0952-128/+1419
| | | |\ \ \ \ \ \ | | | | | |_|/ / / | | | | |/| | | |
| | | * | | | | | Merged fix for bug #36544 "DROP USER does not remove storedDmitry Lenev2011-02-076-14/+370
| | | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function privileges" into 5.5 tree. Did after-merge fixes.
| | | | * | | | | | Fix for bug#36544 "DROP USER does not remove stored function Dmitry Lenev2011-02-075-12/+370
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | privileges". The first problem was that DROP USER didn't properly remove privileges on stored functions from in-memory structures. So the dropped user could have called stored functions on which he had privileges before being dropped while his connection was still around. Even worse if a new user with the same name was created he would inherit privileges on stored functions from the dropped user. Similar thing happened with old user name and function privileges during RENAME USER. This problem stemmed from the fact that the handle_grant_data() function which handled DROP/RENAME USER didn't take any measures to update in-memory hash with information about function privileges after updating them on disk. This patch solves this problem by adding code doing just that. The second problem was that RENAME USER didn't properly update in-memory structures describing table-level privileges and privileges on stored procedures. As result such privileges could have been lost after a rename (i.e. not associated with the new name of user) and inherited by a new user with the same name as the old name of the original user. This problem was caused by code handling RENAME USER in handle_grant_struct() which [sic!]: a) tried to update wrong (tables) hash when updating stored procedure privileges for new user name. b) passed wrong arguments to function performing the hash update and didn't take into account the way in which such update could have changed the order of the hash elements. This patch solves this problem by ensuring that a) the correct hash is updated, b) correct arguments are used for the hash_update() function and c) we take into account possible changes in the order of hash elements. mysql-test/r/grant.result: Added test coverage for bug#36544 "DROP USER does not remove stored function privileges". mysql-test/suite/funcs_1/r/innodb_storedproc_06.result: Since after fixing bug#36544 "DROP USER does not remove stored function privileges" in-memory structures are correctly updated by DROP USER, DROP FUNCTION performed after DROP USER for its definer no longer produces unwarranted warning/error messages. mysql-test/suite/funcs_1/r/memory_storedproc_06.result: Since after fixing bug#36544 "DROP USER does not remove stored function privileges" in-memory structures are correctly updated by DROP USER, DROP FUNCTION performed after DROP USER for its definer no longer produces unwarranted warning/error messages. mysql-test/suite/funcs_1/r/myisam_storedproc_06.result: Since after fixing bug#36544 "DROP USER does not remove stored function privileges" in-memory structures are correctly updated by DROP USER, DROP FUNCTION performed after DROP USER for its definer no longer produces unwarranted warning/error messages. mysql-test/t/grant.test: Added test coverage for bug#36544 "DROP USER does not remove stored function privileges". sql/sql_acl.cc: Changed handle_grant_data() to also update hash with function privileges. This allows DROP/RENAME USER correctly keep this in-memory structure up-to-date. To do this extended handle_grant_struct() to support updating of this hash. In addition fixed code in this function which is responsible for handling of column and routine hashes during RENAME USER, ensured that we correctly update these hashes after changing user name and that we don't skip elements while iterating through the hash and doing updates.
| | | | * | | | | | Merge.Sergey Vojtovich2011-01-284-2/+131
| | | | |\ \ \ \ \ \
| | | | * \ \ \ \ \ \ automergeGeorgi Kodinov2011-01-0717-4/+243
| | | | |\ \ \ \ \ \ \