Commit graph

118 commits

Author SHA1 Message Date
Michael Widenius
7b368e3810 Merge with MySQL 5.1.60 2011-11-23 19:32:14 +02:00
Bjorn Munch
52960624d3 Bug #12793118 MYSQLTEST: --ERROR AND --DISABLE_ABORT_ON_ERROR DO NOT WORK 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
2011-09-14 15:19:24 +02:00
unknown
e55fb3bbe8 Fix mysqltest printing of include stack.
The printing of include stack in the error case in mysqltest omitted the
bottom of the stack (the line number in original test case file), and instead
printed the top of the stack twice. Fix to print each element on the stack
once and only once.
2011-05-18 15:15:36 +02:00
Michael Widenius
e415ba0fb2 Merge with MySQL 5.1.57/58
Moved some BSD string functions from Unireg
2011-05-02 20:58:45 +03:00
Michael Widenius
58bb0769bd Merge with MySQL 5.1.55
- Fixed some issues with partitions and connection_string, which also fixed lp:716890 "Pre- and post-recovery crash in Aria"
- Fixed wrong assert in Aria

Now need to merge with latest xtradb before pushing 

sql/ha_partition.cc:
  Ensure that m_ordered_rec_buffer is not freed before close.
sql/mysqld.cc:
  Changed to use opt_stack_trace instead of opt_pstack.
  Removed references to pstack
sql/partition_element.h:
  Ensure that connect_string is initialized
storage/maria/ma_key_recover.c:
  Fixed wrong assert
2011-02-20 18:51:43 +02:00
Bjorn Munch
e2b73747df Bug #59002 Please make mtr print correct file and line number when tests fail
Followup: had forgotten to update mysqltest.test due to changed output - duh!
2011-01-11 15:00:21 +01:00
Bjorn Munch
5376a76dea Bug #58900 query_get_value crashes when result begins with dollar sign
Generalized fix for recursive backtick
Optional arg to eval_expr telling it not to interpret
2011-01-11 10:54:42 +01:00
Georgi Kodinov
b908a74bc9 merge 2010-12-16 16:40:52 +02:00
Bjorn Munch
cc21483fcf Bug #58092 Test "rpl_cross_version" has "copy_file" failing
I am not fixing the test failure
Adds printing of my_errno when commands fail, could hopefully help
2010-12-01 11:11:16 +01:00
Ramil Kalimullin
65116d3408 Manual-merge from mysql-5.1-bugteam. 2010-11-22 12:21:10 +03:00
Michael Widenius
b52020221e Merge with MySQL 5.1.52 2010-11-23 23:39:59 +02:00
Bjorn Munch
32ea070845 Bug #58257 mysqltest: in if(), ! $var with space is always false
Evaluation would start with the space and thus ignore the $
Added while() to skip past white space
2010-11-17 16:05:52 +01:00
Mattias Jonsson
21bc09c26b post-push fix, backported --replace_result patch
for --list_files in mysqltest.

client/mysqltest.cc:
  Backported --replace_result for --list_files.
mysql-test/r/mysqltest.result:
  updated test.
mysql-test/t/mysqltest.test:
  added test for replace_result on list_files.
2010-11-17 10:13:57 +01:00
Bjorn Munch
92a1a11203 Bug #58087 mysqltest re-evaluates 'let' expressions infinitely
Results from query is sent for evaluation
Break recursion by asking for ` to be ignored
2010-11-15 14:23:02 +01:00
Sergei Golubchik
745cc74c33 5.1.51 merge 2010-10-19 15:58:35 +02:00
Bjorn Munch
7b216d7625 Bug #56921 It should be possible to log connection statements in mysqltest
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
2010-09-22 10:57:10 +02:00
Bjorn Munch
6ff48a61f2 Bug #56753 mtr silently ignores junk after backticks
When stepping backward to end of `` expression, check for illegal chars
2010-09-15 14:56:22 +02:00
Bjorn Munch
788b4e404b Bug #55413 mysqltest gives parse error for lines matching "^let.*\\.*;$"
Allow escaped quotes also in statements not starting with --
But will not support single unescaped ' or `
2010-08-10 12:13:58 +02:00
Bjorn Munch
2d2da6e793 Bug #55582 mtr root detection (and if-expression execution) broken
Follow-up patch: added test cases for -0 and while
2010-08-04 10:52:45 +02:00
Bjorn Munch
5e92df6e0e Bug #55582 mtr root detection (and if-expression execution) broken
if() treated any non-numeric string as false
Fixed to treat those as true instead
Added some test cases
Fixed missing $ in variable name in include/mix2.inc
2010-08-03 16:11:23 +02:00
unknown
b1e00b6be8 Merge MySQL 5.1.46 into MariaDB.
Still two test failures to be solved: main.myisam and main.subselect.
2010-04-28 14:52:24 +02:00
Bjorn Munch
7f20e9fd06 Bug #43603 mysqltest command disable_abort_on_error does not affect all built-in commands
After disable_abort_on_error, behaved as if --error was in effect
Add condition before die, as after queries
2010-03-22 11:28:57 +01:00
Bjorn Munch
ddb6a95abd Bug #43588 mysqltest command disable_abort_on_error logs connect commands
Only log connects after --error
A few small test adjustments needed/possible
2010-03-17 15:25:55 +01:00
Bjorn Munch
4760adbf3f Bug #51590 mysqltest: --disable_abort_on_error does not work inside while/if
abort_on_error flag for stmt was set at initial parse
(Re)-set flag before execution instead, also added to test
2010-03-02 12:39:32 +01:00
Bjorn Munch
0ad9a5992d Bug #50618 Please allow 'sleep $variable' in mtr
Made mtr's sleep function understand $variables
A few fixes since previous patch, added tests
2010-02-09 18:13:57 +01:00
Bjorn Munch
01c0d46af8 Bug #39774 mysql-test-run's remove_file can't use wildcards, this should be documented
Added remove_files_wildcard that allows to remove multiple files at once.
This is a port of original patch to Windows.
2010-02-04 13:15:42 +01:00
Bjorn Munch
84616df3ff merge 49837 2010-01-20 14:23:57 +01:00
Bjorn Munch
87ff57cb7e merge 48888 2010-01-20 14:22:34 +01:00
Bjorn Munch
94ccc34537 Bug #49878 delimiter under false 'if' makes mysqltest test fail with 'Missing end of block'
delimiter not executed so does not recognize end of block
Always execute delimiter command, revert after false if() block.
2010-01-20 14:18:27 +01:00
Bjorn Munch
b554f4c52d Bug #48888 mysqltest crashes on --replace_result if 'from' is longer than ~1024 symbols
valgrind pointed to a buffer allocated by my_realloc which looked fishy
Replaced size with what was probably intended, added test case.
Now also fixed line after review comment
2010-01-20 12:52:35 +01:00
Bjorn Munch
5ae2eda776 Bug #49837 mysqltest exec cannot handle multi-line command correctly
Since the exec command line is passed on externally, it cannot take newlines
Simply replace \n with space
Now also added test case
2010-01-20 12:51:18 +01:00
unknown
0855019e3a Fix multiple test suite failures in Buildbot due to races in the test cases or missing server features not properly checked
mysql-test/r/func_misc.result:
  Move test that requires query cache from main.func_misc to main.query_cache.
mysql-test/r/mysqltest.result:
  Fix test failure due to race.
  This test case creates > 300 connections in a tight loop, and depending on thread
  scheduling and load, even though each connection is immediately disconnected
  before connecting the next one, the server max connections may still be exceeded
  due to server not being able to free old connections as fast as new ones are made.
mysql-test/r/query_cache.result:
  Move test that requires query cache from main.func_misc to main.query_cache.
  Move test that requires query cache from main.variables to main.query_cache.
mysql-test/r/query_cache_notembedded.result:
  Move test that requires query cache from main.sp_notembedded to main.query_cache_notembedded.
mysql-test/r/sp_notembedded.result:
  Move test that requires query cache from main.sp_notembedded to main.query_cache_notembedded.
mysql-test/r/udf.result:
  Move test in main.udf that requires query cache to separate file.
mysql-test/r/udf_query_cache.result:
  Move test in main.udf that requires query cache to separate file.
mysql-test/r/variables.result:
  Move test that requires query cache from main.variables to main.query_cache.
mysql-test/suite/funcs_1/datadict/processlist_val.inc:
  Fix race where result file may show state "cleaning up" in the small window
  between setting COMMAND to 'Sleep' and clearing STATE.
mysql-test/suite/rpl/r/rpl_temporary.result:
  Fix race with suppression of warning message by fixing the test to not generate the
  warning message in the first place.
  
  Problem was a race between creating an anonymous account and resetting the slave.
  If the slave reset happens before replicating the account, the subsequest deletion
  of the account will fail to replicate correctly due to missing row.
mysql-test/suite/rpl/t/rpl_temporary.test:
  Fix race with suppression of warning message by fixing the test to not generate the
  warning message in the first place.
  
  Problem was a race between creating an anonymous account and resetting the slave.
  If the slave reset happens before replicating the account, the subsequest deletion
  of the account will fail to replicate correctly due to missing row.
mysql-test/t/func_misc.test:
  Move test that requires query cache from main.func_misc to main.query_cache.
  Move test that requires query cache from main.variables to main.query_cache.
mysql-test/t/mysqltest.test:
  Fix test failure due to race.
  This test case creates > 300 connections in a tight loop, and depending on thread
  scheduling and load, even though each connection is immediately disconnected
  before connecting the next one, the server max connections may still be exceeded
  due to server not being able to free old connections as fast as new ones are made.
mysql-test/t/query_cache.test:
  Move test that requires query cache to main.query_cache.
mysql-test/t/query_cache_notembedded.test:
  Move test that requires query cache from main.sp_notembedded to main.query_cache_notembedded.
mysql-test/t/sp_notembedded.test:
  Move test that requires query cache from main.sp_notembedded to main.query_cache_notembedded.
mysql-test/t/udf.test:
  Move test in main.udf that requires query cache to separate file.
mysql-test/t/udf_query_cache-master.opt:
  Move test in main.udf that requires query cache to separate file.
mysql-test/t/udf_query_cache.test:
  Move test in main.udf that requires query cache to separate file.
mysql-test/t/variables.test:
  Move test that requires query cache from main.variables to main.query_cache.
tests/mysql_client_test.c:
  In tests that require query cache, skip the test if query cache not available.
  Do this dynamically rather than using HAVE_QUERY_CACHE, as there is no guarantee
  that the server we run against was compiled with same preprocessor #define as
  the mysql_client_test program (and since it is trivial to check dynamically).
2010-01-11 14:15:28 +01:00
Bjorn Munch
e1b42965a5 Bug #49269 mysqltest crashes on 'reap' if query executed after 'send'
Undid amendment allowing pending reap after switching connections
Moved check for pending reap earlier; failed if running with ps-protocol
2010-01-07 11:22:45 +01:00
Bjorn Munch
ed64190b23 Bug #49269 mysqltest crashes on 'reap' if query executed after 'send'
Small amendment: ignore pending reap when switching connection, add test
2010-01-06 12:56:22 +01:00
Bjorn Munch
04a5dcb136 Bug #49761 mysqltest.test does not have any tests for send/reap
Added them
NB the 6th case is adapted to Bug no. 49269, gives wrong output without it
2010-01-06 09:47:25 +01:00
Bjorn Munch
5b66dab00f Bug #48863 mysql test: enable and disable case insensitive compare mode
Implemented --lowercase_result which lower cases next result
2010-01-06 09:42:21 +01:00
Bjorn Munch
b229781c2d Bug #48671 mysqltest fails on 'perl' in file sourced inside 'while'
Actually, fails on 'perl' in any while
Fixed essentially the same way as for append_file
2009-11-11 12:46:19 +01:00
Bjorn Munch
9edd40c87e Bug #47218 mysqltest ignores "error" command inside if inside loop
This was affected by same problem as append_file etc.
Added Q_ERROR to special handling, and added small test
2009-10-08 11:30:03 +02:00
Bjorn Munch
fe3ea31d93 Bug #32296 mysqltest fails to parse "append_file" inside a "while", it works inside
a "if"
Bug #41913 mysqltest cannot source files from if inside while
Some commands require additional processing which only works first time
Keep content for write_file or append_file with the st_command struct
Add tests for those cases to mysqltest.test
2009-09-02 11:17:33 +02:00
Bjorn Munch
444bbe56f5 cherry picking fix for Bug #39542 from 6.0-runtime 2009-05-27 22:54:40 +02:00
Bjorn Munch
b12bb225d1 Bug #44922 mysqltest's query_get_value function can't work with queries containing ','
check_command_args() always looks for the first , (or whatever)
Extended check_command_args() to let arguments be quoted
Added test in mysqltest.test
2009-05-25 17:19:20 +02:00
Matthias Leich
2417d31045 Merge 5.0 -> 5.1 of fix for Bug#42003 and Bug#43114 2009-03-06 15:56:17 +01:00
Patrick Crews
e9b4b536f3 merge 5.0 -> 5.1
These are only 5.0's fixes being merged.
5.1 and 6.0 Unix-removals will occur in different patches.
2009-02-19 18:24:25 -05:00
Patrick Crews
79300d6f7f Bug#38831: 11 test cases fail on Windows due to missing commands
Replaced Unix calls with mysql-test-run's built-in functions / SQL manipulation where possible.
Replaced error codes with error names as well.
Disabled two tests on Windows due to more complex Unix command usage
See Bug#41307, Bug#41308
2009-02-19 15:37:40 -05:00
Magnus Svensson
bb42e1ab05 Bug#35701 please allow test language variables in connection and
sync_slave_with_master
 - Additional patch for "disconnect $variable"
2009-01-15 09:05:51 +01:00
Sven Sandberg
c7f8ffe7a7 BUG#35701: please allow test language variables in connection and sync_slave_with_master
Problem: In the mysqltest language, it was not possible to set the current
connection from a variable, and it was not possible to read the current
connection.
Fix: Allow setting the connection from a variable, like:
connection $variable;
and introduce the mysqltest language variable $CURRENT_CONNECTION, which
holds the name of the current connection.


client/mysqltest.cc:
  - Made select_connection use the common argument parser instead of its own
  home-rolled version. That allows variable expansion, for instance.
  - Made select_connection_name set the variable $CURRENT_CONNECTION, so that
  test scripts can use that.
  - Refactored a bit so that stuff that needs to be done when changing connection
  is located to one place.
mysql-test/t/mysqltest.test:
  Added test case for $CURRENT_CONNECTION and "connection $variable"
2008-10-23 16:23:13 +02:00
Magnus Svensson
d7f846be94 Merge 2008-08-08 20:10:43 +02:00
Magnus Svensson
31c7b018bd Merge 2008-08-04 22:25:45 +02:00
Magnus Svensson
27e8584271 Bug #38181 Please print more debug info when tests fail 2008-08-04 21:54:44 +02:00
Magnus Svensson
c7de7ff0bd Bug #32307 mysqltest - does not detect illegal if syntax 2008-08-04 12:38:50 +02:00