summaryrefslogtreecommitdiff
path: root/mysql-test/t/mysql.test
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | Bug#26780: automatic vertical output for wide resultsMagne Mahre2009-11-041-0/+8
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Feature from Eric Bergen, CLA signed 2007-06-27. Adds new mysql client option "--auto-vertical-output", which causes the client to test whether a result table is too wide for the current window (where available) and emit vertical results in that case. Otherwise, it sends normal tabular results. client/client_priv.h: Add another enum value to client options, for automatic vertical output. client/mysql.cc: Add another command-line option, "auto-vertical-output". Add functions to get the terminal width and functions to get the widths of fields. Use them together to emit vertical output when some output table is too wide to fit in the terminal. If the terminal doesn't support reading its width, then assume 80-positions wide. mysql-test/r/mysql.result: Show that various select statements do work as expected. Wide tables become vertical and narrow ones do not. mysql-test/t/mysql.test: Show that various select statements do work as expected. These should be suitable for a wide range of window capabilities and sizes. Under extreme circumstances, the results could be arbitrary.
* | | WL#751 Error message construction, backportSergey Glukhov2009-10-151-0/+5
|/ /
* | Merge bug fix.Jim Winstead2009-07-301-0/+14
|\ \
| * | The handling of NUL bytes in column data in the various output formatsJim Winstead2009-07-141-0/+14
| | | | | | | | | | | | | | | supported by the mysql client was inconsistent. (Bug #28203)
* | | 5.0-bugteam->5.1-bugteam mergeSergey Glukhov2009-05-281-0/+1
|\ \ \ | | |/ | |/|
| * | test case fixSergey Glukhov2009-05-281-0/+1
| | |
* | | 5.0-bugteam->5.1-bugteam mergeSergey Glukhov2009-05-281-0/+7
|\ \ \ | |/ /
| * | Bug#37268 'binary' character set makes CLI-internal commands case sensitiveSergey Glukhov2009-05-281-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fix is to use case insensitive collation for mysql client command search. client/mysql.cc: The fix is to use case insensitive collation for mysql client command search. mysql-test/r/mysql.result: test result mysql-test/t/mysql.test: test case
* | | Fix syntax in test to eliminate failure on Windows.Jim Winstead2009-05-151-1/+1
| | |
* | | Merge from 5.0-bugteamJim Winstead2009-05-131-0/+7
|\ \ \ | |/ / | | / | |/ |/|
| * Fix support for -i (--ignore-spaces) in the mysql command line application,Jim Winstead2009-05-071-0/+7
| | | | | | | | | | which didn't actually do anything. (Bug #39101)
* | Bug #27884: mysql --html does not quote HTML special characters in outputJim Winstead2009-04-281-0/+6
| | | | | | | | | | Fix encoding of field values and names in HTML output from mysql client.
* | Automerge.Alexey Kopytov2009-03-241-33/+0
|\ \
| * \ Manuel merge.Alexey Kopytov2009-03-241-33/+0
| |\ \
| | * | Fix for bug #43801: mysql.test takes too long, fails due to Alexey Kopytov2009-03-241-33/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | expired timeout on debx86-b in PB Moved the resource-intensive test case for bug #41486 into a separate test file to reduce execution time for mysql.test. mysql-test/include/wait_until_disconnected.inc: Used in mysql-bug41486.test. mysql-test/r/mysql-bug41486.result: Moved the resource-intensive test case for bug #41486 into a separate test file to reduce execution time for mysql.test. mysql-test/r/mysql.result: Moved the resource-intensive test case for bug #41486 into a separate test file to reduce execution time for mysql.test. mysql-test/t/mysql-bug41486.test: Moved the resource-intensive test case for bug #41486 into a separate test file to reduce execution time for mysql.test. mysql-test/t/mysql.test: Moved the resource-intensive test case for bug #41486 into a separate test file to reduce execution time for mysql.test.
* | | | Automerge.Alexey Kopytov2009-03-191-4/+10
|\ \ \ \ | |/ / /
| * | | Automerge.Alexey Kopytov2009-03-191-4/+10
| |\ \ \ | | |/ /
| | * | Fixed test failures in 5.1/6.0 introduced by the patchAlexey Kopytov2009-03-191-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | for bug #41486. Session max_allowed_packet is read-only as of MySQL 5.1.31. In addition, the global variable now has no effect on the current session.
* | | | Automerge.Alexey Kopytov2009-03-181-0/+27
|\ \ \ \ | |/ / /
| * | | Manual merge.Alexey Kopytov2009-03-181-0/+27
| |\ \ \ | | |/ /
| | * | Fix for bug#41486: extra character appears in BLOB for every Alexey Kopytov2009-03-181-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ~40Mb after mysqldump/import When the input string exceeds the maximum allowed size for the internal buffer, batch_readline() returns a truncated string. Since there was no way for a caller to determine whether the string was truncated or not, the command line client assumed batch_readline() to always return the whole input string and appended a newline character. This resulted in garbled data when importing dumps containing strings longer than the maximum input buffer size. Fixed by adding a flag to the batch_readline() interface to signal a truncated string to the caller. Other minor problems fixed during patch implementation: - The maximum allowed buffer size for batch_readline() was set up depending on the client's max_allowed_packet value. It does not actully make any sense, as those variables are not related. The input buffer size limit is now always set to 1 MB. - fill_buffer() did not always set the EOF flag. - The input buffer could actually grow twice as the specified limit due to insufficient checks in intern_read_line(). client/my_readline.h: Changed the interface of batch_readline(). client/mysql.cc: Honor the truncated flag returned by batch_readline() and do not append the newline character if it was set. Since we can't change the interfaces for readline()/fgets() used in the interactive mode, always assume the returned string was not truncated. In addition, always set the batch_readline() internal buffer to 1 MB, independently from the client's max_allowed_packet. client/readline.cc: Added the 'truncated' argument do batch_readline() to signal truncated string to a caller. Fixed fill_buffer() to set the EOF flag correctly. Fixed checks in intern_read_line() to not allow the internal buffer grow past the specified limit. mysql-test/r/mysql.result: Added a test case for bug #41486. mysql-test/t/mysql.test: Added a test case for bug #41486.
* | | | Prepared BUG#42711 for push on 5.1Bernt M. Johnsen2009-03-021-23/+33
|\ \ \ \ | |/ / / |/| | / | | |/ | |/|
| * | Prepared BUG#42711 for pushBernt M. Johnsen2009-03-021-23/+33
| |/
| * Bug #31060: MySQL CLI parser bug 2Georgi Kodinov2009-02-241-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a problem when a DELIMITER COMMAND is not the first command on the line. I this case an extra line feed was added to the glob buffer and this was causing subsequent attempts to enter this delimiter to fail. Fixed by not adding a new line to the glob buffer if the command being added is a DELIMITER client/mysql.cc: Bug #31060: Don't add a new line if DELIMTER is added to the glob buffer mysql-test/r/mysql.result: Bug #31060: test case mysql-test/t/mysql.test: Bug #31060: test case
* | merged bug 31060 to 5.1-bugteamGeorgi Kodinov2009-02-251-0/+17
|\ \
| * | Bug #31060: MySQL CLI parser bug 2Georgi Kodinov2009-02-241-0/+17
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a problem when a DELIMITER COMMAND is not the first command on the line. I this case an extra line feed was added to the glob buffer and this was causing subsequent attempts to enter this delimiter to fail. Fixed by not adding a new line to the glob buffer if the command being added is a DELIMITER client/mysql.cc: Bug #31060: Don't add a new line if DELIMTER is added to the glob buffer mysql-test/r/mysql.result: Bug #31060: test case mysql-test/t/mysql.test: Bug #31060: test case
* | merged 41437 to 5.1-bugteamGeorgi Kodinov2009-01-091-0/+5
|\ \ | |/
| * Bug #41437: Value stored in 'case' lacks charset, causes segfaultGeorgi Kodinov2009-01-091-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When substituting system constant functions with a constant result the server was not expecting that the function may return NULL. Fixed by checking for NULL and returning Item_null (in the relevant collation) if the result of the system constant function was NULL. mysql-test/r/mysql.result: Bug #41437: test case mysql-test/t/mysql.test: Bug #41437: test case. Relies on database() returning NULL if no database is selected. sql/item_strfunc.cc: Bug #41437: Check for NULL result on evaluating the system constant function and return a constant NULL item.
* | Merge fix for Bug 33812 from 5.0-bugteam.Chad MILLER2008-12-111-0/+19
|\ \ | |/
| * Bug#33812: mysql client incorrectly parsing DELIMITERChad MILLER2008-12-111-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix parsing of mysql client commands, especially in relation to single-line comments when --comments was specified. This is a little tricky, because we need to allow single-line comments in the middle of statements, but we don't want to allow client commands in the middle of statements. So in comment-preservation mode, we go ahead and send single-line comments to the server immediately when we encounter them on their own. This is still slightly flawed, in that it does not handle a single-line comment with leading spaces, followed by a client-side command when --comment has been enabled. But this isn't a new problem, and it is quite an edge condition. Fixing it would require a more extensive overall of how the mysql client parses commands.
* | Bug#25146 Some warnings/errors not shown when using --show-warningsunknown2007-11-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Additional patch to fix compiler warnings client/mysql.cc: Initialize warnings to 0 to avid compiler warning Call 'print_warnings' also when error occured mysql-test/r/mysql.result: Change test to make is possible to see that second set of warnings are from second invocation of mysql mysql-test/t/mysql.test: Change test to make is possible to see that second set of warnings are from second invocation of mysql
* | Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.1unknown2007-11-211-0/+9
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into dl145h.mysql.com:/data0/mkindahl/mysql-5.1-rpl-merge client/mysql.cc: Auto merged mysql-test/mysql-test-run.pl: Auto merged mysql-test/r/ctype_ucs.result: Auto merged mysql-test/r/mysql.result: Auto merged mysql-test/suite/ndb/r/ndb_dd_basic.result: Auto merged mysql-test/suite/rpl/r/rpl_extraCol_innodb.result: Auto merged mysql-test/suite/rpl/r/rpl_extraCol_myisam.result: Auto merged mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result: Auto merged mysql-test/t/ctype_uca.test: Auto merged mysql-test/t/ctype_ucs.test: Auto merged mysql-test/t/innodb.test: Auto merged mysql-test/t/mysql.test: Auto merged mysql-test/t/partition.test: Auto merged mysql-test/t/subselect.test: Auto merged sql/field.cc: Auto merged sql/ha_ndbcluster.cc: Auto merged sql/handler.cc: Auto merged sql/item_cmpfunc.cc: Auto merged sql/mysqld.cc: Auto merged sql/slave.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_insert.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_show.cc: Auto merged sql/sql_yacc.yy: Auto merged mysql-test/r/innodb.result: Manual merge.
| * \ Merge koti.dsl.inet.fi:/home/elkin/MySQL/TEAM/BARE/5.0unknown2007-10-041-0/+9
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into koti.dsl.inet.fi:/home/elkin/MySQL/TEAM/5.1-merge client/mysql.cc: Auto merged mysql-test/r/mysql.result: Auto merged mysql-test/t/mysql.test: Auto merged sql/sql_parse.cc: Auto merged sql/sql_repl.cc: Auto merged sql/sql_class.h: conflicting hunk is for log.h
| | * Bug#29323 mysql client only accetps ANSI encoded filesunknown2007-10-041-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix: ignore BOM marker in the first line. client/mysql.cc: Skip BOM marker in the very first line. mysql-test/r/mysql.result: Adding test mysql-test/t/mysql.test: Adding test
| | * Merge weblab.(none):/home/marcsql/TREE/mysql-5.0-baseunknown2007-09-041-0/+5
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into weblab.(none):/home/marcsql/TREE/mysql-5.0-rt-merge mysql-test/r/sp.result: Auto merged mysql-test/t/mysql.test: Auto merged mysql-test/t/sp.test: Auto merged
* | | | Bug #25146: Some warnings/errors not shown when using --show-warningsunknown2007-11-201-0/+18
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In several cases, an error when processing the query would cause mysql to return to the top level without printing warnings. Fix is to always print any available warnings before returning to the top level. client/mysql.cc: In com_go(), ensure that warnings are printed even if an error occurred when processing the query. Before this patch, an error in several places would return to the top level without printing associated warnings. Attempt to avoid printing the warning, though, if it's a duplicate of mysql_error() for the connection handle. mysql-test/r/mysql.result: Add test for bug 25146 mysql-test/t/mysql.test: Add test for bug 25146
* | | Merge weblab.(none):/home/marcsql/TREE/mysql-5.1-baseunknown2007-09-041-0/+5
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into weblab.(none):/home/marcsql/TREE/mysql-5.1-rt50-merge mysql-test/r/sp.result: Auto merged mysql-test/t/mysql.test: Auto merged mysql-test/t/query_cache.test: Auto merged mysql-test/t/sp.test: Auto merged sql/item_cmpfunc.h: Auto merged sql/rpl_utility.h: Auto merged sql/sql_base.cc: Auto merged sql/sql_cache.cc: Auto merged sql/sql_lex.cc: Auto merged sql/sql_lex.h: Auto merged
| * \ \ Merge polly.(none):/home/kaa/src/bug30164/my50-bug30164unknown2007-08-301-1/+1
| |\ \ \ | | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | into polly.(none):/home/kaa/src/bug30164/my51-bug30164 mysql-test/t/mysql.test: Auto merged
| | * | Use double quotes instead of single ones which make the test fail on ↵unknown2007-08-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows. This is for bug #30164. mysql-test/t/mysql.test: Use double quotes instead of single ones which make the test fail on Windows.
| * | | Merge polly.(none):/home/kaa/src/bug30164/my50-bug30164unknown2007-08-301-0/+5
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into polly.(none):/home/kaa/src/bug30164/my51-bug30164 client/mysql.cc: Auto merged mysql-test/r/mysql.result: Auto merged mysql-test/t/mysql.test: Auto merged
| | * | Bug #30164: Using client side macro inside server side comments generates ↵unknown2007-08-301-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | broken queries Problem: In cases when a client-side macro appears inside a server-side comment, the add_line() function in mysql.cc discarded all characters until the next delimiter to remove macro arguments from the query string. This resulted in broken queries being sent to the server when the next delimiter character appeared past the comment's boundaries, because the comment closing sequence ('*/') was discarded. Fix: If a client-side macro appears inside a server-side comment, discard all characters in the comment after the macro (that is, until the end of the comment rather than the next delimiter). This is a minimal fix to allow only simple cases used by the mysqlbinlog utility. Limitations that are worth documenting: - Nested server-side and/or client-side comments are not supported by mysql.cc - Using client-side macros in multi-line server-side comments is not supported - All characters after a client-side macro in a server-side comment will be omitted from the query string (and thus, will not be sent to server). client/mysql.cc: If a client-side macro appears inside a server-side comment, discard all characters in the comment after the macro. mysql-test/r/mysql.result: Added a test case for bug #30164. mysql-test/t/mysql.test: Added a test case for bug #30164.
* | | | Merge pilot.(none):/data/msvensson/mysql/mysql-5.0-maintunknown2007-08-071-0/+3
|\ \ \ \ | |/ / / |/| | / | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into pilot.(none):/data/msvensson/mysql/mysql-5.1-new-maint mysql-test/r/mysqltest.result: Auto merged mysql-test/t/mysql.test: Auto merged mysql-test/t/mysqladmin.test: Auto merged mysql-test/t/mysqltest.test: Auto merged mysql-test/t/sp-destruct.test: Auto merged client/mysqltest.c: Manual merge
| * | Bug#20037 mysqltest requires cygwin on windows(part 1, new mysqltest commands)unknown2007-08-071-0/+3
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Update comments - Make "write_file" fail if file already exist - Remove temporary files created by test cases client/mysqltest.c: Improve function comments Make write_file fail if file already exist mysql-test/r/mysqltest.result: Update test result after adding new test and updating description of argumements to chmod mysql-test/t/bootstrap.test: Remove temporary file created by testcase mysql-test/t/mysql.test: Remove temporary file created by testcase mysql-test/t/mysqladmin.test: Remove temporary file created by testcase mysql-test/t/mysqltest.test: Remove temporary file created by testcase Add test to show that "write_file" fails if file already exist mysql-test/t/sp-destruct.test: Remove temporary file created by testcase
* | Bug#29903 The CMake build method does not produce the embedded library.unknown2007-08-031-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | - GCov fix. mysql-test/r/mysql.result: Bug#29903 The CMake build method does not produce the embedded library. -Result mysql-test/t/mysql.test: Bug#29903 The CMake build method does not produce the embedded library. - Test for warning message.
* | Merge bodhi.(none):/opt/local/work/mysql-5.0-runtimeunknown2007-06-011-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | into bodhi.(none):/opt/local/work/mysql-5.1-runtime mysql-test/t/mysql.test: Auto merged mysql-test/t/mysqltest.test: Auto merged mysql-test/t/order_by.test: Auto merged mysql-test/t/sp.test: Auto merged mysql-test/r/sp.result: Use local
| * Fix some mysqltest warnings.unknown2007-06-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mysql-test/r/sp.result: Update results. mysql-test/t/mysql.test: Fix a typo. mysql-test/t/mysqltest.test: Fix a typo. mysql-test/t/order_by.test: Fix a typo. mysql-test/t/row.test: Remove an unsupported command. mysql-test/t/sp.test: Fix a typo. mysql-test/t/subselect3.test: Fix mysqltest warnings - now it warns when sees some suspicious -- comment
* | Merge pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maintunknown2007-04-231-1/+4
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint Makefile.am: Auto merged client/mysql_upgrade.c: Auto merged mysql-test/lib/mtr_process.pl: Auto merged mysql-test/r/mysql.result: Auto merged mysql-test/t/mysql.test: Auto merged sql/mysql_priv.h: Auto merged tests/mysql_client_test.c: Auto merged
| * Update test to work also when --pager does not exist in "mysql"unknown2007-04-231-1/+4
| |
* | Merge mysql.com:/home/ram/work/b26851/b26851.5.0unknown2007-04-191-0/+6
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | into mysql.com:/home/ram/work/b26851/b26851.5.1 client/mysql.cc: Auto merged mysql-test/r/mysql.result: Auto merged mysql-test/t/mysql.test: Auto merged
| * Fix for unknown2007-04-161-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bug #27715: mysqld --character-sets-dir buffer overflow bug ##26851: Mysql Client --pager Buffer Overflow Using strmov() to copy an argument may cause overflow if the argument's length is bigger than the buffer: use strmake instead. Also, we have to encrease the error message buffer size to fit the longest message. client/mysql.cc: Fix for bug #27715: mysqld --character-sets-dir buffer overflow bug ##26851: Mysql Client --pager Buffer Overflow - use strmake() instead of strmov() to avoid buffer overflow. mysql-test/r/mysql.result: Fix for bug #27715: mysqld --character-sets-dir buffer overflow bug ##26851: Mysql Client --pager Buffer Overflow - test result. mysql-test/t/mysql.test: Fix for bug #27715: mysqld --character-sets-dir buffer overflow bug ##26851: Mysql Client --pager Buffer Overflow - test case. mysys/charset.c: Fix for bug #27715: mysqld --character-sets-dir buffer overflow bug ##26851: Mysql Client --pager Buffer Overflow - encrease error message buffer size to fit the (possible) longest message.