summaryrefslogtreecommitdiff
path: root/mysql-test
Commit message (Collapse)AuthorAgeFilesLines
* recreate expired certificates for SSL testsSergei Golubchik2015-01-298-212/+458
| | | | | added a script to regenerate certificates easily in the future (2035!) restored server8k-key.pem to actually be 8K key, as it was supposed to
* MDEV-6128:[PATCH] mysqlcheck wrongly escapes '.' in table namesunknown2015-01-282-4/+21
| | | | Backport from mysql 5.7. The patch reviewed, test added.
* MDEV-7294 MTR does not use /dev/shm with a out-of-source buildSergei Golubchik2015-01-191-0/+1
| | | | | | | | | | | mtr internally does the following: 1. $default_vardir=.... 2. $opt_vardir=$default_vardir unless $opt_vardir; 3. $opt_vardir=realpath $opt_vardir unless IS_WINDOWS 4. if ($opt_vardir eq $default_vardir) { .... use /dev/shm ... } thus we have to realpath $default_datadir too, otherwise the comparison logic might be broken
* MDEV-7448 - mtr may leave stale mysqldSergey Vojtovich2015-01-143-0/+6
| | | | | | Let mtr handle SIGHUP the same way as SIGINT. This solves stale mysqld processes left after broken/closed ssh connection.
* MDEV-7404 REPAIR multiple tables crash in MDL_ticket::has_stronger_or_equal_typeSergei Golubchik2015-01-142-0/+39
| | | | | mysql_alter_table() that is used in mysql_recreate_table() doesn't expect many tables in the TABLE_LIST.
* MDEV-7333 "'show table status like 'table_name'" on tokudb table lead to ↵Sergei Golubchik2015-01-135-0/+28
| | | | | | MariaDB crash adjust enum values when reading them from frm
* MDEV-7410 Temporary table name conflict between sessionsSergei Golubchik2015-01-103-4/+97
| | | | | workaround for missing SP auto-reparse. allow the user to disable stored_program_cache_size, if he wants
* MDEV-7189: main.processlist fails sporadically in buildbotKristian Nielsen2015-01-063-12/+12
| | | | | | | | | | | | | | | | | | The test case tried to trigger a DEBUG_SYNC point at the end of a SELECT SLEEP(5) statement. It did this by using EXECUTE 2, intending to trigger first at the end of SET DEBUG_SYNC, and second at the end of the SELECT SLEEP(5). However, in --ps-protocol mode, this does not work, because the SELECT is executed in two steps (Prepare followed by Execute). Thus, the DEBUG_SYNC got triggered too early, during the Prepare stage rather than Execute, and the test case could race and information_schema.processlist see the thread in the wrong state. This patch fixes by changing the way the DEBUG_SYNC point is triggered. Now we add a DBUG injection inside the code for SLEEP(5). This ensures that the DEBUG_SYNC point is not activated until the SLEEP(5) is running, ensuring that the following wait for completion will be effective.
* Adding mariadb-version on the view creation to view frm. (MDEV-6916 followup)unknown2014-12-212-0/+12
|
* mergemariadb-5.5.41Sergei Golubchik2014-12-1918-24/+1091
|\
| * mysql-5.5.41 mergeSergei Golubchik2014-12-1918-24/+1091
| |\
| | * Bug#19904003 INNODB_LIMIT_OPTIMISTIC_INSERT_DEBUG=1 CAUSES INFINITE PAGE SPLITMarko Makela2014-10-302-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The debug configuration parameter innodb_optimistic_insert_debug which was introduced for testing corner cases in B-tree handling had a bug in it. The value 1 would trigger an infinite sequence of page splits. Fix: When the value 1 is specified, disable this debug feature. Approved by Yasufumi Kinoshita
| | * Bug#19584379 Reporting corruption may corrupt the innodb data dictionaryMarko Makela2014-10-272-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dict_set_corrupted(): Use the canonical way of searching for less-than-equal (PAGE_CUR_LE) and then checking low_match. The code that was introduced in MySQL 5.5.17 in Bug#11830883 SUPPORT "CORRUPTED" BIT FOR INNODB TABLES AND INDEXES could position the cursor on the page supremum, and then attempt to overwrite non-existing 7th field of the 1-field supremum record. Approved by Jimmy Yang
| | * Bug #16581605: REPLACE.EXE UTILITY IS BROKEN IN 5.5Arun Kuruvila2014-10-213-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Description:- Replace, the string replacement utility fails on the windows platform. Analysis:- The utility takes files and multiple string pairs as input. In the windows platform, the utility maps the standard input incorrectly (Considers 0 as the fd for standard input instead of 2048 on windows). Hence when the input file is supplied to the utility due to the incorrect mapping, a bad file descriptor error is generated causing the utility to exit with an error. Fix:- "my_fileno()" is used for getting the correct file despscriptor for standard input.
| | * The test case innodb.foreign-keys is failing in pb2 5.5. This is becauseAnnamalai Gurusami2014-10-202-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | some of the tables are created in InnoDB and some tables are created in MyISAM. We need to create all tables on InnoDB. Fix is to add engine=innodb to the CREATE TABLE statements. approved in IM by Marko and Vasil.
| | * Bug #18964545 - ADD MTR SUPPORT FOR DEBUGGING WITH LLDB revertSayantan Dutta2014-09-261-45/+6
| | |
| | * Bug #15868071 USING SET GLOBAL SQL_LOG_BIN SHOULD NOT BE ALLOWEDBill Qu2014-09-245-15/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Normally, SET SESSION SQL_LOG_BIN is used by DBAs to run a non-conflicting command locally only, ensuring it does not get replicated. Setting GLOBAL SQL_LOG_BIN would not require all sessions to disconnect. When SQL_LOG_BIN is changed globally, it does not immediately take effect for any sessions. It takes effect by becoming the session-level default inherited at the start of each new session, and this setting is kept and cached for the duration of that session. Setting it intentionally is unlikely to have a useful effect under any circumstance; setting it unintentionally, such as while intending to use SET [SESSION] is potentially disastrous. Accidentally using SET GLOBAL SQL_LOG_BIN will not show an immediate effect to the user, instead not having the desired session-level effect, and thus causing other potential problems with local-only maintenance being binlogged and executed on slaves; And transactions from new sessions (after SQL_LOG_BIN is changed globally) are not binlogged and replicated, which would result in irrecoverable or difficult data loss. This is the regular GLOBAL variables way to work, but in replication context it does not look right on a working server (with connected sessions) 'set global sql_log_bin' and none of that connections is affected. Unexperienced DBA after noticing that the command did "nothing" will change the session var and most probably won't unset the global var, causing new sessions to not be binlog. Setting GLOBAL SQL_LOG_BIN allows DBA to stop binlogging on all new sessions, which can be used to make a server "replication read-only" without restarting the server. But this has such big requirements, stop all existing connections, that it is more likely to make a mess, it is too risky to allow the GLOBAL variable. The statement 'SET GLOBAL SQL_LOG_BIN=N' will produce an error in 5.5, 5.6 and 5.7. Reading the GLOBAL SQL_LOG_BIN will produce a deprecation warning in 5.7.
| | * Merge from mysql-5.5.40-releaseunknown2014-09-232-0/+42
| | |\
| | * | Bug #19306524 FAILING ASSERTION WITH TEMP TABLE FOR A PROCEDURE CALLEDAnnamalai Gurusami2014-09-182-0/+356
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FROM A FUNCTION Scenario: In a stored procedure, CREATE TABLE statement is not allowed. But an exception is provided for CREATE TEMPORARY TABLE. We can create a temporary table in a stored procedure. Let there be two stored functions f1 and f2 and two stored procedures p1 and p2. Their properties are as follows: . stored function f1() calls stored procedure p1(). . stored function f2() calls stored procedure p2(). . stored procedure p1() creates temporary table t1. . stored procedure p2() does DML on t1. Consider the following situation: 1. Autocommit mode is on. 2. select f1() 3. select f2() Step 2: In this step, t1 would be created via p1(). A table level transaction lock would have been taken. The ::external_lock() would not have been called on this table. At the end of step 2, because of autocommit mode on, this table level lock will be released. Step 3: When we execute DML on table t1 via p2() we have two problems: Problem 1: The function ha_innobase::external_lock() would have been called but since it is a select query no table level locks would have been taken. Hence the following assert will fail: ut_ad(lock_table_has(thr_get_trx(thr), index->table, LOCK_IX)); Solution: The solution would be to identify this situation and take a table level lock and use the proper lock type prebuilt->select_lock_type = LOCK_X for DML operations. Problem 2: Another problem is that in step 3, ha_innobase::open() is never called on the table t1. Solution: The solution would be to identify this situation and call re-init the handler of table t1. rb#6429 approved by Krunal.
| | * | Bug #17852083 PRINT A WARNING WHEN DDL HAS AN ERROR IN INNODB_STRICT_MODE = 1Annamalai Gurusami2014-09-172-0/+488
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Creation of a table fails when innodb_strict_mode is enabled, but the same table is created without any warning when innodb_strict_mode is enabled. Solution: If creation of a table fails with an error when innodb_strict_mode is enabled, it must issue a warning when innodb_strict_mode is disabled. rb#6723 approved by Krunal.
| | * | Bug#19070633 - POSSIBLE ACCESS TO FREED MEMORY IN IS_FREE_LOCK()Praveenkumar Hulakund2014-09-162-0/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AND IS_USED_LOCK(). Analysis: ----------- In functions Item_func_is_free_lock::val_int() and Item_func_is_used_lock::val_int(), for the specified user lock name, pointer to its "User_level_lock" object is obtained from hash "hash_user_locks". Mutex "LOCK_user_locks" is acquired for this and released immediately. And we are accessing members of User_level_lock after releasing the mutex. If same user lock is deleted(released) from concurrent thread then accessing members results in invalid(freed) memory access issue. Deleting of user lock is also protected from the mutex "LOCK_user_locks". Since this mutex is released in "val_int" functions mentioned above, delete operation proceeds while concurrent thread tries to access its members. With the test case, valgrind reports invalid read issues in val_int functions. Fix: ----------- To fix this issue, in "val_int" function of classes "Item_func_is_free_lock" and "Item_func_is_used_lock", now releasing mutex "LOCK_user_locks" after accessing User_level_lock members.
| | * | Bug #18964545 ADD MTR SUPPORT FOR DEBUGGING WITH LLDBSayantan Dutta2014-09-111-11/+50
| | | |
| | * | Bug #19361317 - --MANUAL-GDB EFFECTIVELY TRUNCATES OPTION FILE ARGS AT FIRST ↵Sayantan Dutta2014-09-031-8/+21
| | | | | | | | | | | | | | | | SEMICOLON
| | * | Bug #19361402 - ADD --MANUAL-LLDB OPTION TO MYSQL-TEST-RUN.PL, contributedSayantan Dutta2014-09-021-3/+39
| | | |
| | * | Bug #19471516 SERVER CRASHES WHEN EXECUTING ALTER TABLE ADD FOREIGN KEYAnnamalai Gurusami2014-08-252-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: We maintain two rb trees in each dict_table_t. The foreign_rbt must be in sync with foreign_list. The referenced_rbt must be in sync with referenced_list. There is one function which checks this consistency and it failed, resulting in an assert failure. The root cause of the problem was identified that the search order was lost in the referenced_rbt. This is because while renaming the table, we didn't not refresh this referenced_rbt. Solution: When a foreign key is renamed, we must delete and re-insert into both foreign_rbt and referenced_rbt. rb#6412 approved by Jimmy.
* | | | Merge 5.3 -> 5.5Sergey Petrunya2014-12-183-0/+113
|\ \ \ \ | |/ / / |/| | |
| * | | MDEV-6830: Server crashes in best_access_path after a sequence of SELECTs ...Sergey Petrunya2014-12-183-0/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | generate_derived_keys_for_table() did not work correctly in the case where - it had a potential index on derived table - however, TABLE::check_tmp_key() would disallow creation of this index after looking at its future key parts (because of the key parts exceeding max. index length) - the code would leave a KEYUSE structure that refers to a non-existant index. Depending on further optimizer calculations, this could cause a crash.
* | | | MDEV-7150 Wrong auto increment values on INSERT .. ON DUPLICATE KEY UPDATE ↵Sergei Golubchik2014-12-182-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when the inserted columns include NULL in an auto-increment column when restoring auto-inc value in INSERT ... ON DUPLICATE KEY UPDATE, take into account that 1. it may be changed in the UPDATE clause (old code did that) 2. it may be changed in the INSERT clause and then cause a dup key (old code missed that)
* | | | MDEV-6985: MariaDB crashes on stored procedure callunknown2014-12-172-0/+77
| | | | | | | | | | | | | | | | Item_ident fixed to allow double cleanup().
* | | | DEV-7221 from_days fails after null valueAlexander Barkov2014-12-162-0/+42
| | | |
* | | | MDEV-6855 Assertion `cond_type == Item::FUNC_ITEM' failed in ↵Michael Widenius2014-12-152-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | check_group_min_max_predicates with GROUP BY, aggregate in WHERE SQ, multi-part key mysql-test/r/group_by.result: Test for MDEV-6855 mysql-test/t/group_by.test: Test for MDEV-6855 sql/item.h: Fixed spelling error sql/opt_range.cc: Added handling of cond_type == Item::CACHE_ITEM in WHERE clauses for MIN/MAX optimization. Fixed indentation
* | | | MDEV-4010 Deadlock on concurrent INSERT .. SELECT into an Aria table with ↵Michael Widenius2014-12-152-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | statement binary logging There was a bug in lock handling when mixing INSERT ... SELECT on the same table. mysql-test/suite/maria/insert_select.result: Test case for MDEV_4010 mysql-test/suite/maria/insert_select.test: Test case for MDEV_4010 mysys/thr_lock.c: We wrongly alldoed TL_WRITE_CONCURRENT_INSERT when there was a TL_READ_NO_INSERT lock
* | | | MDEV-6896 kill user command cause MariaDB crashMichael Widenius2014-12-153-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mysql-test/r/kill-2.result: test case for MDEV-6896 mysql-test/t/kill-2-master.opt: test case for MDEV-6896 mysql-test/t/kill-2.test: test case for MDEV-6896 sql/sql_parse.cc: Use host_or_ip instead of host as host may be 0
* | | | MDEV-6871 Multi-value insert on MyISAM table that makes slaves crash (when ↵Michael Widenius2014-12-153-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | using --skip-external-locking=0) Problem was that repair() did lock and unlock tables, which leaved already locked tables in wrong state include/my_check_opt.h: Added option T_NO_LOCKS to disable locking during repair() Fixed duplicated bit T_NO_CREATE_RENAME_LSN mysql-test/suite/rpl/r/myisam_external_lock.result: Test case for MDEV-6871 mysql-test/suite/rpl/t/myisam_external_lock-slave.opt: Test case for MDEV-6871 mysql-test/suite/rpl/t/myisam_external_lock.test: Test case for MDEV-6871 storage/maria/ha_maria.cc: Don't lock tables during enable_indexes() Removed some calls to current_thd storage/myisam/ha_myisam.cc: Don't lock tables during enable_indexes() Removed some calls to current_thd
* | | | MDEV-7252: Test failure on innodb.innodb_bug12400341 at WindowsJan Lindström2014-12-031-0/+2
| | | | | | | | | | | | | | | | | | | | Problem is that there could be undo slots from previous runs.
* | | | MDEV-7243: innodb-change-buffer-recovery fails on windowsJan Lindström2014-12-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Problem is that on Windows command "perl" failed with error: 255 my_errno: 0 errno: 0. Do not run on Windows.
* | | | MDEV-7169: innodb.innodb_bug14147491 fails in buildbot on WindowsElena Stepanova2014-12-021-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Applied the fix previously pushed into 10.0. Initial Jan's commit comment: Problem is that test could open Microsoft C++ Client Debugger windows with abort exception. Lets not try to test this on windows.
* | | | Better comments and add a test case.Jan Lindström2014-11-252-0/+82
| | | |
* | | | Forgot to add test file.Jan Lindström2014-11-211-7/+7
| | | |
* | | | followup: disable openssl_6975.test as appropriateSergei Golubchik2014-11-201-1/+1
| | | |
* | | | MDEV-6975 Implement TLS protocolSergei Golubchik2014-11-194-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | followup: * explicitly disable SSLv2 and SSLv3, keep other protocols enabled * fix a compiler warning * rename the test and combinations to avoid confusion vio/viossl.c: fix a compiler warning
* | | | MDEV-7084: innodb index stats inadequate using constant Jan Lindström2014-11-194-0/+260
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | innodb_stats_sample_pages Analysis: If you set the number of analyzed pages to very low number compared to actual pages on that table/index it randomly pics those pages (default 8 pages), this leads to fact that query after analyze table returns different results. If the index tree is small, smaller than 10 * n_sample_pages + total_external_size, then the estimate is ok. For bigger index trees it is common that we do not see any borders between key values in the few pages we pick. But still there may be n_sample_pages different key values, or even more. And it just tries to approximate to n_sample_pages (8). Fix: (1) Introduced new dynamic configuration variable innodb_stats_sample_traditional that retains the current design. Default false. (2) If traditional sample is not used we use n_sample_pages = max(min(srv_stats_sample_pages, index->stat_index_size), log2(index->stat_index_size)* srv_stats_sample_pages); (3) Introduced new dynamic configuration variable stat_modified_counter (default = 0) if set sets lower bound for row updates when statistics is re-estimated. If user has provided upper bound for how many rows needs to be updated before we calculate new statistics we use minimum of provided value and 1/16 of table every 16th round. If no upper bound is provided (srv_stats_modified_counter = 0, default) then calculate new statistics if 1 / 16 of table has been modified since the last time a statistics batch was run. We calculate statistics at most every 16th round, since we may have a counter table which is very small and updated very often. @param t table @return true if the table has changed too much and stats need to be recalculated */ #define DICT_TABLE_CHANGED_TOO_MUCH(t) \ ((ib_int64_t) (t)->stat_modified_counter > (srv_stats_modified_counter ? \ ut_min(srv_stats_modified_counter, (16 + (t)->stat_n_rows / 16)) : \ 16 + (t)->stat_n_rows / 16))
* | | | openssl-poodle_6975.test: don't run it for older OpenSSL versionsSergei Golubchik2014-11-191-0/+3
| | | |
* | | | MDEV-6975 Implement TLS protocolSergei Golubchik2014-11-189-1/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | change SSL methods to be SSLv23 (according to openssl manpage: "A TLS/SSL connection established with these methods may understand the SSLv2, SSLv3, TLSv1, TLSv1.1 and TLSv1.2 protocols") from TLSv1 methods, that go back to the initial SSL implementation in MySQL in 2001. OpenSSL default ciphers are different if TLSv1.2 is enabled, so tests need to take this into account.
* | | | new mysqltest connect option SSL-CIPHER=xxxxSergei Golubchik2014-11-182-5/+10
| | | |
* | | | 5.3 mergeSergei Golubchik2014-11-182-0/+11
|\ \ \ \ | |/ / /
| * | | MDEV-6883 ST_WITHIN crashes server if (0,0) is matched to POLYGON((0 0)).Alexey Botchkov2014-11-152-0/+12
| | | | | | | | | | | | | | | | | | | | Fixed the case when a polygon contains a single-point ring.
* | | | MDEV-4513 Valgrind warnings (Conditional jump or move depends on ↵Sergei Golubchik2014-11-182-0/+17
| | | | | | | | | | | | | | | | uninitialised value) in inflate on UNCOMPRESS
* | | | MDEV-7113 difference between check_vcol_func_processor and ↵Sergei Golubchik2014-11-184-0/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | check_partition_func_processor MDEV-6789 segfault in Item_func_from_unixtime::get_date on updating table with virtual columns * prohibit VALUES in partitioning expression * prohibit user and system variables in virtual column expressions * fix Item_func_date_format to cache locale (for %M/%W to return the same as MONTHNAME/DAYNAME) * fix Item_func_from_unixtime to cache time_zone directly, not THD (and not to crash) * added tests for other incorrectly allowed (in vcols) functions to see that they don't crash
* | | | MDEV-3940 Server crash or assertion `item->type() == Item::STRING_ITEM' ↵Sergei Golubchik2014-11-182-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | failure on LOAD DATA through a view with statement binary logging A "field" could be either an Item_field or (if loading into a view) an Item_direct_ref that references Item_field. Also: when iterating fields, use fields of the TABLE_LIST (table or view), not fields of a TABLE (actual underlying table - might have more columns).