summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* BUG#48048: Deprecated constructs need removal in BetonyLuis Soares2009-11-041-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NOTE: Backport of: bzr log -r revid:sp1r-serg@sergbook.mysql.com-20070505200319-38337 ------------------------------------------------------------ revno: 2469.263.4 committer: serg@sergbook.mysql.com timestamp: Sat 2007-05-05 13:03:19 -0700 message: Removing deprecated features: --master-XXX command-line options log_bin_trust_routine_creators table_type BACKUP TABLE ... RESTORE TABLE ... SHOW PLUGIN LOAD TABLE ... FROM MASTER LOAD DATA FROM MASTER SHOW INNODB STATUS SHOW MUTEX STATUS SHOW TABLE TYPES ... TIMESTAMP(N) ... TYPE=engine RESET SLAVE don't reset connection parameters anymore LOAD DATA: check opt_secure_file_priv before access(filename) improved WARN_DEPRECATED macro
* fixed compilation warningsGeorgi Kodinov2009-09-021-6/+6
|
* Fix for a few assorted compiler warnings.Davi Arnaut2009-08-281-1/+1
| | | | | | | | | | | | | | | | | | | client/mysql.cc: Remove leading whitespace. Remove extra text after #else directive. client/mysqldump.c: Function does not take a parameter. mysys/array.c: buffer is a uchar pointer. sql/item.cc: Assert if it should not happen. storage/myisam/mi_check.c: Cast to expected type. This is probably a bug, but it is casted in a similar way in another part of the code. storage/ndb/include/mgmapi/ndb_logevent.h: Apply fix from cluster team. tests/mysql_client_test.c: Remove extraneous slash.
* Manual merge.Davi Arnaut2009-08-101-0/+29
|\
| * Bug#45010: invalid memory reads during parsing some strange statementsDavi Arnaut2009-08-071-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is that the lexer could inadvertently skip over the end of a query being parsed if it encountered a malformed multibyte character. A specially crated query string could cause the lexer to jump up to six bytes past the end of the query buffer. Another problem was that the laxer could use unfiltered user input as a signed array index for the parser maps (having upper and lower bounds 0 and 256 respectively). The solution is to ensure that the lexer only skips over well-formed multibyte characters and that the index value of the parser maps is always a unsigned value. mysql-test/r/ctype_recoding.result: Update test case result: ending backtick is not skipped over anymore. sql/sql_lex.cc: Characters being analyzed must be unsigned as they can be used as indexes for the parser maps. Only skip over if the string is a valid multi-byte sequence. tests/mysql_client_test.c: Add test case for Bug#45010
| * Merge from mysql-5.0.Davi Arnaut2009-08-041-0/+0
| |\
| | * Merge main 5.0 into 5.0-build.Joerg Bruehe2009-07-091-0/+22
| | |\
* | | \ Merge from mysql-5.1.Davi Arnaut2009-08-041-0/+0
|\ \ \ \
| * \ \ \ Merge main 5.1 into 5.1-build.Joerg Bruehe2009-07-161-1/+1
| |\ \ \ \
| * \ \ \ \ merge fixDaniel Fischer2009-07-031-0/+0
| |\ \ \ \ \ | | | |_|/ / | | |/| | |
| | * | | | Bug#44647 - fix file permissions.Daniel Fischer2009-07-031-0/+0
| | | | | |
* | | | | | Merge from mysql-5.0-bugteam.Davi Arnaut2009-07-271-23/+30
|\ \ \ \ \ \ | | |_|_|/ / | |/| | | |
| * | | | | Bug#20023: mysql_change_user() resets the value of SQL_BIG_SELECTSDavi Arnaut2009-07-271-12/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Post-merge fix: test case could fail due to a conversion of the max_join_size value to a integer. Fixed by preserving the value as a string for comparison purposes. tests/mysql_client_test.c: Preserve max_join_size value as a string instead of converting it to a integer -- value can be larger then the type used.
| * | | | | Bug #45287: phase 2 : 5.0 64 bit compilation warningsGeorgi Kodinov2009-07-161-2/+2
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | Fixed various compilation warnings when compiling on a 64 bit windows.
| * | | | Bug #45790 Potential DoS vector: Writing of user input to logStaale Smedseng2009-07-011-0/+22
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | without proper formatting The problem is that a suitably crafted database identifier supplied to COM_CREATE_DB or COM_DROP_DB can cause a SIGSEGV, and thereby a denial of service. The database name is printed to the log without using a format string, so potential attackers can control the behavior of my_b_vprintf() by supplying their own format string. A CREATE or DROP privilege would be required. This patch supplies a format string to the printing of the database name. A test case is added to mysql_client_test. sql/sql_parse.cc: Added format strings. tests/mysql_client_test.c: Added new test case.
* | | | Bug#44495: Prepared Statement: CALL p(<x>) - `thd->protocol == ↵Davi Arnaut2009-07-151-0/+52
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | &thd->protocol_text' failed Merge Konstantin's patch and add a test case. tests/mysql_client_test.c: Add test case for Bug#44495
* | | Bug #43397 mysql headers redefine pthread_mutex_initStaale Smedseng2009-07-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | unnecessarily The problem is that libmysqlclient.so is built with THREAD undefined, while a client compiling against the same header files will see THREAD as defined and definitions in my_pthread.h will be included, possibly resulting in undefined symbols that cannot be resolved with libmysqlclient.so. The suggested solution is to require that clients wanting to link with libmysqlclient.so should be built with MYSQL_CLIENT_NO_THREADS defined. This requires a documentation change, and more details for this will be supplied if this patch is approved. The MYSQL_CLIENT_NO_THREADS define was renamed from UNDEF_THREADS_HACK, to get a more suitable (less suspicious) name for the define. (The UNDEF_THREADS_HACK is retained for backwards compatibility, though.) This patch is also in anticipation of WL#4958, which will remove this problem altogether by dropping the building of libmysqlclient.
* | | Fix for bug#42364 reverted.Ramil Kalimullin2009-07-061-2/+0
| | |
* | | Bug#42364 SHOW ERRORS returns empty resultset after dropping non existent tableSergey Glukhov2009-07-031-0/+2
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | enabled message storing into error message list for 'drop table' command mysql-test/r/warnings.result: test result mysql-test/t/warnings.test: test case sql/sql_table.cc: We should skip error sending then we should return warnings to client as some functions may send its own errors, so we should set no_warnings_for_error= 0 only in case of warning. The fix is to enable message storing into error message list for 'drop table' command(only for error case). tests/mysql_client_test.c: test fix
* | Workaround a compiler that does not support certain C99 features for C code.Davi Arnaut2009-05-231-2/+2
| | | | | | | | | | tests/mysql_client_test.c: Use a suitable constant for specifying the size of the array.
* | Recommit of bug 43560 after merge with mysql-5.1-bugteamStaale Smedseng2009-05-201-15/+127
| |
* | Bug#23471 prepared for commit in 5.1 gca branchBernt M. Johnsen2009-05-051-1/+51
|\ \ | |/
| * Bug#23471 prepared for commit in 5.0 gca branchBernt M. Johnsen2009-05-051-1/+19
| |
* | mergingAlexey Botchkov2009-04-301-58/+0
|\ \ | |/
| * mysql_client_test fixed.Alexey Botchkov2009-04-301-58/+0
| | | | | | | | | | | | | | | | per-file comments: tests/mysql_client_test.c the test for bug 37956 isn't relevant anymore. The query there 'select point(?,?)' doesn't produce an error.
| * auto-mergeIgnacio Galarza2009-03-191-6/+246
| |\
| | * Manual mergeKristofer Pettersson2009-03-061-6/+272
| | |\
| | * | Bug#40363 Bug 20023 is not fixed on 5.0Kristofer Pettersson2009-03-051-0/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a back port from 5.1 to 5.0. Fix for BUG 20023: mysql_change_user() resets the value of SQL_BIG_SELECTS. The bug was that SQL_BIG_SELECTS was not properly set in COM_CHANGE_USER. The fix is to update SQL_BIG_SELECTS properly. sql/sql_class.cc: Update THD::options with the respect to SQL_BIG_SELECTS in COM_CHANGE_USER. tests/mysql_client_test.c: Add a test case BUG#20023.
* | | | auto-mergeIgnacio Galarza2009-03-171-6/+73
|\ \ \ \
| * \ \ \ Auto-mergeRamil Kalimullin2009-02-261-6/+9
| |\ \ \ \ | | | |_|/ | | |/| |
| | * | | Fix for bug#19829:make test Failed in mysql_client_testRamil Kalimullin2009-02-261-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | *with --with-charset=utf8* Problem: wrong LONG TEXT field length is sent to a client when multibyte server character set used. Fix: always limit field length sent to a client to 2^32, as we store it in 4 byte slot. Note: mysql_client_test changed accordingly. sql/protocol.cc: Fix for bug#19829:make test Failed in mysql_client_test *with --with-charset=utf8* - limit field length sent to client to UINT_MAX32 as it may exceeds 32 bit slot for LONG TEXT fields if thd_charset->mbmaxlen > 1. tests/mysql_client_test.c: Fix for bug#19829:make test Failed in mysql_client_test *with --with-charset=utf8* - checking field members have in mind that field length is limited to UINT_MAX32.
| * | | | Automerge.Alexey Kopytov2009-02-191-0/+64
| |\ \ \ \ | | |/ / /
| | * | | Fix for bug #41078: With CURSOR_TYPE_READ_ONLY mysql_stmt_fetch() ↵Alexey Kopytov2009-02-191-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | returns short string value. Multibyte character sets were not taken into account when calculating max_length in Item_param::convert_str_value(). As a result, string parameters of a prepared statement could be truncated later when calculating string length in characters by dividing length in bytes by the charset's mbmaxlen value (e.g. in Field_varstring::store()). Fixed by taking charset's mbmaxlen into account when calculating max_length in Item_param::convert_str_value(). sql/item.cc: Multiply string's length in characters by charset's mbmaxlen when calculating max_length. tests/mysql_client_test.c: Added a test case for bug #41078.
* | | | | Bug#29125 Windows Server X64: so many compiler warningsIgnacio Galarza2009-02-132-3/+3
|\ \ \ \ \ | |/ / / / |/| | / / | | |/ / | |/| | | | | | | | | | - Remove bothersome warning messages. This change focuses on the warnings that are covered by the ignore file: support-files/compiler_warnings.supp. - Strings are guaranteed to be max uint in length
| * | | Bug#29125 Windows Server X64: so many compiler warningsIgnacio Galarza2009-02-102-176/+176
| |/ / | | | | | | | | | | | | | | | - Remove bothersome warning messages. This change focuses on the warnings that are covered by the ignore file: support-files/compiler_warnings.supp. - Strings are guaranteed to be max uint in length
* | | Merge from 5.0-bugteamDavi Arnaut2009-01-151-0/+60
|\ \ \ | |/ /
| * | Bug#36326: nested transaction and selectDavi Arnaut2009-01-131-0/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is that the query cache stores packets containing the server status of the time when the cached statement was run. This might lead to a wrong transaction status in the client side if a statement is cached during a transaction and is later served outside a transaction context (and vice-versa). The solution is to take into account the transaction status when storing in and serving from the query cache. mysql-test/r/innodb_cache.result: Update test case result. mysql-test/r/query_cache.result: Add test case result for Bug#36326 mysql-test/t/query_cache.test: Add test case for Bug#36326 sql/mysql_priv.h: Add new flags. sql/sql_cache.cc: Remember the transaction and autocommit status stored in the packet. tests/mysql_client_test.c: Add test case for Bug#36326
* | | 5.0-bugteam->5.1-bugteam mergeSergey Glukhov2008-12-111-1/+5
|\ \ \ | |/ /
| * | fix for pushbuild failure on 64 linuxSergey Glukhov2008-12-111-1/+1
| | |
| * | disable bug37956 test if geometry package is not enabledSergey Glukhov2008-12-111-0/+4
| | |
* | | 5.0-bugteam->5.1-bugteam mergeSergey Glukhov2008-12-101-0/+54
|\ \ \ | |/ /
| * | Bug#37956 memory leak and / or crash with geometry and prepared statements!Sergey Glukhov2008-12-101-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug#37671 crash on prepared statement + cursor + geometry + too many open files! if mysql_execute_command() returns error then free materialized_cursor object. is_rnd_inited is added to satisfy rnd_end() assertion (handler may be uninitialized in some cases) sql/sql_cursor.cc: if mysql_execute_command() returns error then free materialized_cursor object. is_rnd_inited is added to satisfy rnd_end() assertion (handler may be uninitialized in some cases) sql/sql_select.cc: added result check tests/mysql_client_test.c: test case
* | | 5.0-bugteam->5.1-bugteam mergeSergey Glukhov2008-11-271-1/+1
|\ \ \ | |/ /
| * | removed unused variableSergey Glukhov2008-11-271-1/+1
| | |
* | | 5.0-bugteam->5.1-bugteam mergeSergey Glukhov2008-11-271-0/+82
|\ \ \ | |/ /
| * | Bug#40365 Prepared statements may insert invalid dates.Sergey Glukhov2008-11-271-0/+81
| |/ | | | | | | | | | | | | | | | | | | set DATE|DATETIME value to 0 if ALLOW_INVALID_DATES sql_mode is not enabled. sql/field.cc: set DATE|DATETIME value to 0 if ALLOW_INVALID_DATES sql_mode is not enabled. tests/mysql_client_test.c: test case
* | Bug #32124: crash if prepared statements refer to variables in the where clauseGeorgi Kodinov2008-10-081-52/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code to get read the value of a system variable was extracting its value on PREPARE stage and was substituting the value (as a constant) into the parse tree. Note that this must be a reversible transformation, i.e. it must be reversed before each re-execution. Unfortunately this cannot be reliably done using the current code, because there are other non-reversible source tree transformations that can interfere with this reversible transformation. Fixed by not resolving the value at PREPARE, but at EXECUTE (as the rest of the functions operate). Added a cache of the value (so that it's constant throughout the execution of the query). Note that the cache also caches NULL values. Updated an obsolete related test suite (variables-big) and the code to test the result type of system variables (as per bug 74). mysql-test/extra/rpl_tests/rpl_insert_id.test: Bug #32124: removed ambiguous testcase mysql-test/r/innodb_data_home_dir_basic.result: Bug #32124: fixed wrong test case mysql-test/r/innodb_flush_method_basic.result: Bug #32124: fixed wrong test case mysql-test/r/ps_11bugs.result: Bug #32124: test case mysql-test/r/ssl_capath_basic.result: Bug #32124: fixed wrong test case mysql-test/r/ssl_cipher_basic.result: Bug #32124: fixed wrong test case mysql-test/r/variables.result: Bug #32124: system vars are shown as such in EXPLAIN EXTENDED, not as constants. mysql-test/suite/rpl/r/rpl_insert_id.result: Bug #32124: removed ambiguous testcase mysql-test/t/ps_11bugs.test: Bug #32124: test case sql/item.cc: Bug #32124: placed the code to convert string to longlong or double to a function (so that it can be reused) sql/item.h: Bug #32124: placed the code to convert string to longlong or double to a function (so that it can be reused) sql/item_func.cc: Bug #32124: moved the evaluation of system variables at runtime (val_xxx). sql/item_func.h: Bug #32124: moved the evaluation of system variables at runtime (val_xxx). sql/set_var.cc: Bug #32124: removed the code that calculated the system variable's value at PREPARE sql/set_var.h: Bug #32124: removed the code that calculated the system variable's value at PREPARE tests/mysql_client_test.c: Bug #32124 : removed the reading of the system variable, because its max length is depended on the system charset and client charset and can't be easily calculated.
* | 5.0-bugteam->5.1-bugteam mergeSergey Glukhov2008-08-201-2/+2
|\ \ | |/
| * Bug#38291 memory corruption and server crash with view/sp/functionSergey Glukhov2008-08-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Send_field.org_col_name has broken value on secondary execution. It happens when result field is created from the field which belongs to view due to forgotten assignment of some Send_field attributes. The fix: set Send_field.org_col_name,org_table_name with correct value during Send_field intialization. mysql-test/r/metadata.result: result fix The result file was changed because now forgotten attributes are properly set. mysql-test/r/sp.result: test result mysql-test/t/sp.test: test case sql/item.cc: Send_field.org_col_name has broken value on secondary execution. It happens when result field is created from the field which belongs to view due to forgotten assignment of some Send_field attributes. The fix: set Send_field.org_col_name,org_table_name with correct value during Send_field intialization. tests/mysql_client_test.c: test case fix The test was changed because now forgotten attributes are properly set.
| * Bug#37301 Length and Max_length differ with no obvious reason(2nd version)Chad MILLER2008-08-151-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Length value is the length of the field, Max_length is the length of the field value. So Max_length can not be more than Length. The fix: fixed calculation of the Item_empty_string item length (Patch applied and queued on demand of Trudy/Davi.) sql/item.h: fixed calculation of the item length sql/sql_show.cc: removed unnecessary code