summaryrefslogtreecommitdiff
path: root/client/mysqltest.cc
Commit message (Collapse)AuthorAgeFilesLines
* Bug#16027468 ADDRESSSANITIZER BUG IN MYSQLTESTTor Didriksen2012-12-201-2/+1
| | | | | | DBUG_ENTER and DBUG_LEAVE must *always* match, otherwise all subsequent DBUG_ENTER calls will be poking into undefined stack frames.
* Bug#13928675 MYSQL CLIENT COPYRIGHT NOTICE MUSTNirbhay Choubey2012-08-071-1/+1
| | | | | | | | | | 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.
* 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 #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
* Manual merge from mysql-5.0.Alexander Nozdrin2011-07-221-9/+3
|
* Updated/added copyright headersKent Boortz2011-07-031-10/+14
|\
| * 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.
| * Bug #11766513 - 59641: Prepared XA transaction in system after hard crashMarko Mäkelä2011-04-071-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | causes future shutdown hang InnoDB would hang on shutdown if any XA transactions exist in the system in the PREPARED state. This has been masked by the fact that MySQL would roll back any PREPARED transaction on shutdown, in the spirit of Bug #12161 Xa recovery and client disconnection. [mysql-test-run] do_shutdown_server: Interpret --shutdown_server 0 as a request to kill the server immediately without initiating a shutdown procedure. xid_cache_insert(): Initialize XID_STATE::rm_error in order to avoid a bogus error message on XA ROLLBACK of a recovered PREPARED transaction. innobase_commit_by_xid(), innobase_rollback_by_xid(): Free the InnoDB transaction object after rolling back a PREPARED transaction. trx_get_trx_by_xid(): Only consider transactions whose trx->is_prepared flag is set. The MySQL layer seems to prevent attempts to roll back connected transactions that are in the PREPARED state from another connection, but it is better to play it safe. The is_prepared flag was introduced in the InnoDB Plugin. trx_n_prepared: A new counter, counting the number of InnoDB transactions in the PREPARED state. logs_empty_and_mark_files_at_shutdown(): On shutdown, allow trx_n_prepared transactions to exist in the system. trx_undo_free_prepared(), trx_free_prepared(): New functions, to free the memory objects of PREPARED transactions on shutdown. This is not needed in the built-in InnoDB, because it would collect all allocated memory on shutdown. The InnoDB Plugin needs this because of innodb_use_sys_malloc. trx_sys_close(): Invoke trx_free_prepared() on all remaining transactions.
| * Bug #11885854 MYSQLTEST: PS-PROTOCOL IMPLIED BY CURSOR-PROTOCOL LOST AFTER ↵Bjorn Munch2011-03-181-3/+5
| | | | | | | | | | | | | | ENABLE_PS_PROTOCOL The condition cursor-protocol => ps-protocol was done at "current setting" level" Moved it to "set by command line" level
* | Updated/added copyright headersKent Boortz2011-06-301-2/+4
|/
* mergeMattias Jonsson2011-01-261-2/+6
|\
| * Bug#47902: partition_recover_myisam fails with --ps-protocolMattias Jonsson2011-01-101-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was that the warnings was never written out when running with --ps-protocol. This was because the warnings only appeared during the prepare phase, not the execute phase. Solved by not clearing the warnings from the prepare phase if there was no other warnings. If there are warnings from the execute phase, it is very likely to be the same as from the prepare phase. My tests show that if not clearing the warnings from the prepare phase when there are warnings from the execute phase, there will be duplicated warnings in the result.
* | Fixed copyright headers in mtr src filesBjorn Munch2011-01-181-2/+2
| |
* | Bug #58900 query_get_value crashes when result begins with dollar signBjorn Munch2011-01-111-4/+9
| | | | | | | | | | Generalized fix for recursive backtick Optional arg to eval_expr telling it not to interpret
* | Bug #59002 Please make mtr print correct file and line number when tests failBjorn Munch2011-01-111-9/+18
|/ | | | | This patchs adds printing of a file stack (with line numbers) It does not fix the problem of a failure in the non-first iteration of a loop
* BUG#49978: Replication tests don't clean up replication state at the endSven Sandberg2010-12-191-14/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Major replication test framework cleanup. This does the following: - Ensure that all tests clean up the replication state when they finish, by making check-testcase check the output of SHOW SLAVE STATUS. This implies: - Slave must not be running after test finished. This is good because it removes the risk for sporadic errors in subsequent tests when a test forgets to sync correctly. - Slave SQL and IO errors must be cleared when test ends. This is good because we will notice if a test gets an unexpected error in the slave threads near the end. - We no longer have to clean up before a test starts. - Ensure that all tests that wait for an error in one of the slave threads waits for a specific error. It is no longer possible to source wait_for_slave_[sql|io]_to_stop.inc when there is an error in one of the slave threads. This is good because: - If a test expects an error but there is a bug that causes another error to happen, or if it stops the slave thread without an error, then we will notice. - When developing tests, wait_for_*_to_[start|stop].inc will fail immediately if there is an error in the relevant slave thread. Before this patch, we had to wait for the timeout. - Remove duplicated and repeated code for setting up unusual replication topologies. Now, there is a single file that is capable of setting up arbitrary topologies (include/rpl_init.inc, but include/master-slave.inc is still available for the most common topology). Tests can now end with include/rpl_end.inc, which will clean up correctly no matter what topology is used. The topology can be changed with include/rpl_change_topology.inc. - Improved debug information when tests fail. This includes: - debug info is printed on all servers configured by include/rpl_init.inc - User can set $rpl_debug=1, which makes auxiliary replication files print relevant debug info. - Improved documentation for all auxiliary replication files. Now they describe purpose, usage, parameters, and side effects. - Many small code cleanups: - Made have_innodb.inc output a sensible error message. - Moved contents of rpl000017-slave.sh into rpl000017.test - Added mysqltest variables that expose the current state of disable_warnings/enable_warnings and friends. - Too many to list here: see per-file comments for details.
* mergeGeorgi Kodinov2010-12-161-3/+5
|\
| * Manual-merge from mysql-5.1-bugteam.Ramil Kalimullin2010-11-221-5/+8
| |\
| * | post-push fix, backported --replace_result patchMattias Jonsson2010-11-171-3/+5
| | | | | | | | | for --list_files in mysqltest.
* | | merge from 5.1-mtrBjorn Munch2010-12-091-16/+43
|\ \ \
| * | | Bug #58511 mysqltest doesn't always run statements in ps modeBjorn Munch2010-12-091-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | mysqltest checks if the stmt is one that should be run in ps mode, but regexp doesn't match if preceeded by /* */ comment. Fix: match function will jump over /*..*/ if found at start
| * | | Bug #58522 mtr --debug leaks memory when test failsBjorn Munch2010-12-091-12/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Backported use of setenv() from 5.5 This will remove the leak on systems that have setenv() I have not fixed the string.c leak, it's a local variable that the cleanup function cannot access.
| * | | Bug #58092 Test "rpl_cross_version" has "copy_file" failingBjorn Munch2010-12-011-4/+4
| | | | | | | | | | | | | | | | | | | | I am not fixing the test failure Adds printing of my_errno when commands fail, could hopefully help
* | | | Bug#51817: incorrect assumption: thd->query at 0x2ab2a8360360 is an invalid ↵Davi Arnaut2010-11-261-4/+7
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pointer The problem is that the logic which checks if a pointer is valid relies on a poor heuristic based on the start and end addresses of the data segment and heap. Apart from miscalculating the heap bounds, this approach also suffers from the fact that memory can come from places other than the heap. See Bug#58528 for a more detailed explanation. On Linux, the solution is to access the process's memory through /proc/self/task/<tid>/mem, which allows for retrieving the contents of pages within the virtual address space of the calling process. If a address range is not mapped, a input/output error is returned.
* | | merge from 5.1-mtrBjorn Munch2010-11-191-5/+8
|\ \ \ | |/ / | | / | |/ |/|
| * Bug #58257 mysqltest: in if(), ! $var with space is always falseBjorn Munch2010-11-171-1/+3
| | | | | | | | | | Evaluation would start with the space and thus ignore the $ Added while() to skip past white space
| * Bug #58087 mysqltest re-evaluates 'let' expressions infinitelyBjorn Munch2010-11-151-4/+5
| | | | | | | | | | Results from query is sent for evaluation Break recursion by asking for ` to be ignored
| * merge from 5.1 up to rev 3471Bjorn Munch2010-11-141-4/+0
| |\
* | \ merge from 5.1-mtrBjorn Munch2010-10-251-4/+4
|\ \ \ | |/ /
| * | Fixed wrong feof check in read_line, see 52019Bjorn Munch2010-10-201-1/+1
| | |
| * | Fixed missing cast of arg to my_mbcharlenBjorn Munch2010-10-201-1/+1
| | |
| * | 48863 followup: move an array declaration out from within if blockBjorn Munch2010-10-201-1/+1
| | |
| * | Bug #52019 main.mysqltest fails on new tests for lowercase_resultBjorn Munch2010-10-201-1/+1
| | | | | | | | | | | | | | | Limited to actual bug fix, fixing a while condition Again confirmed on Linux PPC and on AIX 5.3
* | | Bug#45288: pb2 returns a lot of compilation warningsDavi Arnaut2010-10-201-8/+14
| | | | | | | | | | | | | | | | | | | | | | | | Fix assorted warnings that are generated in optimized builds. Most of it is silencing variables that are set but unused. This patch also introduces the MY_ASSERT_UNREACHABLE macro which helps the compiler to deduce that a certain piece of code is unreachable.
* | | merge from 5.1-mtrBjorn Munch2010-10-031-6/+68
|\ \ \ | |/ /
| * | Bug #20304 mysqltest: reap with no preceding statement hangs foreverBjorn Munch2010-10-011-0/+3
| | | | | | | | | | | | Added sanity check, similar to the one preventing send without reap
| * | Bug #52828 Tests that use perl fail when perl is not in pathBjorn Munch2010-09-301-1/+12
| | | | | | | | | | | | | | | | | | | | | Trying to run perl fails, just like it does when perl is started but fails Trap the case that perl was not found/could not be started, and skip test Also force a restart of servers since test may already have done something mtr now also appends path of current perl to PATH to aid mysqltest
| * | merge from 5.1Bjorn Munch2010-09-291-12/+9
| |\ \
| * | | Bug #56921 It should be possible to log connection statements in mysqltestBjorn Munch2010-09-221-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | Added --enable-connect-log, somewhet similar to --enable-query-log If query log is disabled, disable connect log too Also some related cleanup in mysqltest.test: removing duplicate test loop
| * | | Bug #55426 mysqltest crashes when trying to unlock not acquired mutexBjorn Munch2010-09-201-0/+3
| | | | | | | | | | | | | | | | | | | | Follow-up: don't call pthread_join() on Windows This change only valid for 5.1
| * | | Bug #56753 mtr silently ignores junk after backticksBjorn Munch2010-09-151-0/+6
| | | | | | | | | | | | | | | | When stepping backward to end of `` expression, check for illegal chars
| * | | Bug #55426 mysqltest crashes when trying to unlock not acquired mutexBjorn Munch2010-09-141-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug #55546 mysqltest fails to create a new thread on HPUX Missing call to pthread_join(), in embedded mode This independently solves both problems, see 55426 for details. Addendum: cannot test against a pthread_t, adds boolean flag instead
| * | | Bug #56647 Valgrind warnings for memory leak in mysqltest.ccBjorn Munch2010-09-101-2/+1
| | | | | | | | | | | | | | | | Moved an init_dynamic_string() from before to after potential die()
* | | | merge 55178,55413,56383Bjorn Munch2010-09-101-2/+8
|\ \ \ \ | |/ / / | | | / | |_|/ |/| |
| * | merge 55413Bjorn Munch2010-08-301-2/+8
| |\ \
| | * | Bug #55413 mysqltest gives parse error for lines matching "^let.*\\.*;$"Bjorn Munch2010-08-101-2/+8
| | | | | | | | | | | | | | | | | | | | Allow escaped quotes also in statements not starting with -- But will not support single unescaped ' or `
* | | | Reduced #ifndef for 52301, caused compile warningBjorn Munch2010-08-261-4/+0
| | | |
* | | | merge followup fix for 52301Bjorn Munch2010-08-251-0/+6
|\ \ \ \ | |/ / /
| * | | Bug #52301 Add --protocol to mysqltestBjorn Munch2010-08-251-0/+6
| |/ / | | | | | | | | | | | | | | | Added code resulted in strange linking problem for embedded on Windows Avoided by not doing this for embedded mode It's irrelevant for embedded server anyway, --protocol will be ignored
* | | merge from 5.1-mtrBjorn Munch2010-08-061-30/+99
|\ \ \ | |/ / | | / | |/ |/|