summaryrefslogtreecommitdiff
path: root/mysql-test
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-14241: Server crash in key_copy / get_matching_chain_by_join_key or ↵Varun Gupta2018-01-192-0/+48
| | | | | | | | | valgrind warnings In this case we were using the optimization derived_with_keys but we could not create a key because the length of the key was greater than the max allowed(MI_MAX_KEY_LENGTH). To do the join we needed to create a hash join key instead, but in the explain output it showed that we were still referring to derived keys which were created but not used.
* Fixed mdev-14960 [ERROR] mysqld got signal 11 with join_buffer and join_cacheIgor Babaev2018-01-182-0/+103
| | | | | | | In the function JOIN::shrink_join_buffers the iteration over joined tables was organized in a wrong way. This could cause a crash if the optimizer chose to materialize a semi-join that used join caches for which the sizes must be adjusted.
* Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2018-01-181-0/+1
|\
| * Bug #26881946: INCORRECT BEHAVIOR WITH "VALUES"Sreeharsha Ramanavarapu2017-11-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue: ------ VALUES doesn't have a type() function and is considered a Item_field. Solution for 5.7: ----------------- Add a new type() function for Item_values_insert. On 8.0 and trunk it was fixed by Mithun's Bug#19601973. Solution for 5.6: ----------------- Additionally Bug#17458914 is backported. This will address the problem of using VALUES() in INSERT ... ON DUPLICATE KEY UPDATE. Create a field object only if it is in the UPDATE clause, else return a NULL item. This will also address the problems mentioned in Bug#14789787 and Bug#16756402. Solution for 5.5: ----------------- As mentioned above Bug#17458914 is backported. Additionally Bug#14786324 is also backported. When VALUES() is detected outside its meaningful place, it should be treated as NULL and is thus replaced with a Field_null object, with the same name as the original field. Fields with type NULL are generally not handled well inside the server (e.g Innodb will not accept them and it is impossible to create them in regular tables). So create a new const NULL item instead.
| * Backport patch for Bug#16877045 5.6-CLUSTER-7.3 WIN32 SQL_YACC.CC BUILD PROBLEMTor Didriksen2017-10-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Building with ninja shows the problem: cmake .. -G Ninja ninja ninja: error: dependency cycle: sql/GenServerSource -> sql/CMakeFiles/GenServerSource -> sql/sql_builtin.cc -> cmake_order_depends_target_sq sql/GenServerSource Bug#16877045 5.6-CLUSTER-7.3 WIN32 SQL_YACC.CC BUILD PROBLEM - Somewhat circular dependency caused by the configured files sql_builtin.cc being included as part of the files to generate in sql/ - Move sql_builtin.cc out of GEN_SOURCES variable. - Create new variable CONF_SOURCES to be used for configured files.
* | crash with too long index commentsSergei Golubchik2018-01-182-0/+281
| |
* | Fixed mdev-14911: zero_date is considered as NULL, depending onIgor Babaev2018-01-152-1/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | optimizer_switch For DATE and DATETIME columns defined as NOT NULL, "date_notnull IS NULL" has to be modified to: "date_notnull IS NULL OR date_notnull == 0" if date_notnull is from an inner table of outer join); "date_notnull == 0" - otherwise. This must hold for such columns of mergeable views and derived tables as well. So far the code did the above re-writing only for columns of base tables and temporary tables.
* | MDEV-14609 XA Transction unable to ROLLBACK TO SAVEPOINTAlexander Barkov2018-01-152-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function trans_rollback_to_savepoint(), unlike trans_savepoint(), did not allow xa_state=XA_ACTIVE, so an attempt to do ROLLBCK TO SAVEPOINT inside an XA transaction incorrectly returned an error "...command cannot be executed ... in the ACTIVE state...". Partially merging a MySQL patch: 7fb5c47390311d9b1b5367f97cb8fedd4102dd05 This is WL#7193 (Decouple THD and st_transactions)... The currently merged part includes these changes: - Introducing st_xid_state::check_has_uncommitted_xa() - Reusing it in both trans_rollback_to_savepoint() and trans_savepoint(), so now both allow XA_ACTIVE.
* | MDEV-14526: MariaDB keeps crashing under load when query_cache_type is changedOleksandr Byelkin2018-01-142-0/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was in such scenario: T1 - starts registering query and locked QC T2 - starts disabling QC and wait for UNLOCK T1 - unlock QC T2 - disable QC and destroy signals without waiting for query unlock T1 a) - not yet unlocked query in qc and crash on attempt to unlock because QC signals are destroyed b) if above was done before destruction, it execute end_of results first time at exit on after try_lock which see QC disables and return TRUE. But it do not reset query_cache_tls->first_query_block which lead to second call of end_of_result when diagnostic arena has already inappropriate status (not is_eof()). Fix is: 1) wait for all queries unlocked before destroying them by locking and unlocking 2) remove query_cache_tls->first_query_block if QC disabled
* | Fixed mdev-6706 Wrong result (missing rows)Igor Babaev2018-01-122-0/+84
| | | | | | | | | | | | | | | | | | with joins, SQ, ORDER BY, semijoin=on A bug in get_sort_by_table() could mislead the function setup_semijoin_dups_elimination(). As a result the optimizer could produce invalid execution plans for queries with ORDER BY and subquery predicates that could be converted to semi-joins.
* | MDEV-14743: Server crashes in Item_func_match::init_searchOleksandr Byelkin2018-01-122-0/+35
| | | | | | | | | | | | Remove non prepared (and so belonging to removed clauses FT functions) from the list. in later version it will be fixed by building the list during preparation.
* | MDEV-14690: Assertion `page_link == &fake_link' failed in pagecache_write_partOleksandr Byelkin2018-01-112-0/+26
| | | | | | | | | | Fix the call to correspond protocoll of pagecache call. Fix of misleading variables names.
* | MDEV-8200 aria bug with insert select and lock tablesMonty2018-01-112-0/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bug happens when locking the same Aria "transactional" table (page format) more then once with LOCK TABLES and inserting into one of them with INSERT ... SELECT when the table is empty. Fixed by ensuring we don't use fast bulk insert if table is opened twice with LOCK TABLES (as this changes table->s->state) Code changes: - Added use_count to MARIA_USED_TABLES to be able to check if table is opened twice for a statement/lock table - Don't clear history or reset info->start_state if we don't have versioning. One reason for the bug was was that info->start_state was set to point to different states for the two tables. If there is no versioning info->start_state should always point to info->s->state.common. Other things: - Fixed also some typos that was noticed while scanning the code - More DBUG_PRINT
* | MDEV-13933: Wrong results in COUNT() query with EXISTS and exists_to_inOleksandr Byelkin2018-01-106-0/+158
| | | | | | | | Roll back to most general duplicate removing strategi in case of different stratagies for one position.
* | MDEV-13814 Extra logging when innodb_log_archive=ONMarko Mäkelä2018-01-101-0/+1
| | | | | | | | | | Backport the fix from 10.0.33 to 5.5, in case someone compiles XtraDB with -DUNIV_LOG_ARCHIVE
* | MDEV-14174 crash on start with innodb-track-changed-pagesMarko Mäkelä2018-01-101-0/+1
| | | | | | | | | | | | | | | | | | The XtraDB option innodb_track_changed_pages causes the function log_group_read_log_seg() to be invoked even when recv_sys==NULL, leading to the SIGSEGV. This regression was caused by MDEV-11027 InnoDB log recovery is too noisy
* | MDEV-14309 MTR tests require perl-Env which is not always in the default ↵Sergei Golubchik2017-12-272-9/+4
| | | | | | | | | | | | | | | | | | | | | | installation * don't use Env module in tests, use $ENV{xxx} instead * collateral changes: ** $file in the error message was unset ** $file in the other error message was unset too :) ** source file arguments are conventionally upper-cased ** abort the test (die) on error, don't just echo/exit
* | MDEV-10657: incorrect result returned with binary protocol (prepared statements)Oleksandr Byelkin2017-12-272-0/+33
| | | | | | | | | | | | | | If translation table present when we materialize the derived table then change it to point to the materialized table. Added debug info to see really what happens with what derived.
* | MDEV-12350: Heap corruption, overrun buffer, ASAN errors, server crash in ↵Varun Gupta2017-12-202-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | my_fill_8bit / filesort In the function make_sortkey a tmp buffer was defined and in the absence of param->tmp_buffer, tmp buffer used the sort_keys buffer. sort_keys buffer has a length defined in sort_field->length, while param->tmp_buffer is stored in param->rec_length. Make sure to use the appropriate length based on which buffer we are using otherwise we'll overflow. Also added a type cast to size_t during the calculation of the sort keys buffer size to avoid an oveflow if the buffer size exceeds 32 bits.
* | MDEV-14619: VIEW and GROUP_CONCATOleksandr Byelkin2017-12-172-0/+26
| | | | | | | | Correctly print separator string in single quotes.
* | MDEV-14596 Crash in INTERVAL(ROW(..),ROW(..))Alexander Barkov2017-12-082-0/+20
| |
* | MDEV-10397: Server crashes in key_copy with join_cache_level > 2 and join on ↵Varun Gupta2017-11-303-0/+40
| | | | | | | | | | | | | | | | BIT fields For BIT field null_bit is not set to 0 even for a field defined as NOT NULL. So now in the function TABLE::create_key_part_by_field, if the bit field is not nullable then the null_bit is explicitly set to 0
* | MDEV-13788 Server crash when issuing bad SQL partition syntaxAlexander Barkov2017-11-207-0/+139
| |
* | MDEV-9663: InnoDB assertion failure: *cursor->index->name == TEMP_INDEX_PREFIXJan Lindström2017-11-162-2/+8
| | | | | | | | MariaDB adjustments to test case innodb-replace-debug.
* | MDEV-9663: InnoDB assertion failure: *cursor->index->name == TEMP_INDEX_PREFIXJan Lindström2017-11-162-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | Imported missing test case from MySQL 5.7 for commit 25781c154396dbbc21023786aa3be070057d6999 Author: Annamalai Gurusami <annamalai.gurusami@oracle.com> Date: Mon Feb 24 14:00:03 2014 +0530 Bug #17604730 ASSERTION: *CURSOR->INDEX->NAME == TEMP_INDEX_PREFIX MariaDB 5.5 does not seem to be affected.
* | Fixed bug MDEV-14368 Improper error for a grouping query thatIgor Babaev2017-11-112-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | uses alias in HAVING when sql_mode = 'ONLY_FULL_GROUP_BY' This patch corrects the patch for bug#18739: non-standard HAVING extension was allowed in strict ANSI sql mode added in 2006 by commit 4b7c4cd27f68b9aac1970b9f21c50d4eee35df7d. As a result of incompleteness of the fix in the above commit if a query with GROUP BY contained an aggregate function with an alias and this alias was used in the HAVING clause of the query the server reported an error when sql_mode was set to 'ONLY_FULL_GROUP_BY'.
* | MDEV-13921 Audit log writes invalid SQL if single-line comments areAlexey Botchkov2017-11-032-4/+10
| | | | | | | | | | | | | | present. thread_pool_server_audit.test fixed. plugin version updated.
* | MDEV-13921 Audit log writes invalid SQL if single-line comments areAlexey Botchkov2017-11-032-4/+10
| | | | | | | | | | | | | | present. Escape special characters (like \r \n \t) instead of replacing them with spaces.
* | MDEV-14051 'Undo log record is too big.' error occurring in very narrow ↵bb-5.5-markoMarko Mäkelä2017-10-244-2/+285
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | range of string lengths InnoDB was writing unnecessary information to the update undo log records. Most notably, if an indexed column is updated, the old value of the column would be logged twice: first as part of the update vector, and then another time because it is an indexed column. Because the InnoDB undo log record must fit in a single page, this would cause unnecessary failure of certain updates. Even after this fix, InnoDB still seems to be unnecessarily logging indexed column values for non-updated columns. It seems that non-updated secondary index columns only need to be logged when a PRIMARY KEY column is updated. To reduce risk, we are not fixing this remaining flaw in GA versions. trx_undo_page_report_modify(): Log updated indexed columns only once.
* | Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), ↵mariadb-5.5.58Sergei Golubchik2017-10-172-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NAME_CONST('NAME', NULL)) based on: commit f7316aa0c9a Author: Ajo Robert <ajo.robert@oracle.com> Date: Thu Aug 24 17:03:21 2017 +0530 Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) Backport of Bug#19143243 fix. NAME_CONST item can return NULL_ITEM type in case of incorrect arguments. NULL_ITEM has special processing in Item_func_in function. In Item_func_in::fix_length_and_dec an array of possible comparators is created. Since NAME_CONST function has NULL_ITEM type, corresponding array element is empty. Then NAME_CONST is wrapped to ITEM_CACHE. ITEM_CACHE can not return proper type(NULL_ITEM) in Item_func_in::val_int(), so the NULL_ITEM is attempted compared with an empty comparator. The fix is to disable the caching of Item_name_const item.
* | Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2017-10-172-0/+28
|\ \ | |/
| * Bug#19875294 ASSERTION `SRC' FAILED IN MY_STRNXFRM_UNICODE (SIG 6 ↵Tor Didriksen2017-08-232-0/+28
| | | | | | | | | | | | | | -STRINGS/CTYPE-UTF8.C:5151) Backport from 5.7 to 5.5 Field_set::val_str() should return String("", 0, cs) rather than String(NULL, 0, cs)
| * Bug#26161247: MTR: --NOREORDER IS SEARCHING FOR TEST SCRIPT ONLY IN MAIN SUITEDeepa Dixit2017-07-251-12/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue: ------ Running MTR with the --no-reorder option by specifying test cases on the command line, without prefixing the suite name results in an error saying the test case was not found in the main suite. This is because MTR looks for the test case only in the main suite, and no other suites. Fix: ---- The fix involves searching for the test in every suite if only the test name is specified. This back-ports two bug fixes: Bug#24967869 and Bug#24365783 Reviewed-by: Pavan Naik <pavan.naik@oracle.com> RB: 16812
* | MDEV-13937 Aria engine: Internal Error 160 after partition handlingSergei Golubchik2017-10-172-0/+36
| | | | | | | | | | | | | | | | Partition wasn't setting HA_OPTION_PACK_RECORD on ALTER TABLE if the row format was PAGE. (so one bit in the null bitmap was reserved for a deleted bit - see make_empty_rec - and all actual null bits were one off)
* | MDEV-14056 DROP TEMPORARY TABLE IF EXISTS causes error 1290 with read_only ↵Sergei Golubchik2017-10-172-0/+8
| | | | | | | | | | | | | | | | option if it's a DROP TABLE, we cannot detect whether a table is temporary by looking in thd->temporary_tables - because the table might simply not exist at all.
* | MDEV-13912 Can't refer the same column twice in one ALTER TABLESergei Golubchik2017-10-172-0/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | backport ce6c0e584e3 MDEV-8960: Can't refer the same column twice in one ALTER TABLE Problem was that if column was created in alter table when it was refered again it was not tried to find from list of current columns. mysql_prepare_alter_table: There is two cases (1) If alter table adds a new column and then later alter changes the field definition, there was no check from list of new columns, instead an incorrect error was given. (2) If alter table adds a new column and then later alter changes the default, there was no check from list of new columns, instead an incorrect error was given.
* | MDEV-9619: Assertion `null_ref_table' failed in virtual table_map ↵Oleksandr Byelkin2017-10-132-0/+216
| | | | | | | | | | | | Item_direct_view_ref::used_tables() const on 2nd execution of PS Refer left expression indirectly in case it changes from execution to execution.
* | Fixed the bug mdev-13135.Igor Babaev2017-10-132-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | For each SELECT the list sj_nests is built by the function simplify_joins() when scanning different join nests. This function may be called several times for the same join nest. That's why before adding a new member to sj_nests it is necessary to check if it's already in the list. The code of simplify_joins() lacked this check and as a result it could cause memory overwright for some queries.
* | MDEV-9208: Function->Function->View = Mysqld segfault (Server crashes in ↵Oleksandr Byelkin2017-10-132-0/+56
| | | | | | | | | | | | Dependency_marker::visit_field on 2nd execution with merged subquery) Prevent crossing name resolution border in finding item tables.
* | MDEV-13530 VARBINARY doesn't convert to to BLOB for sizes 65533, 65534 and 65535Alexander Barkov2017-10-1318-16/+253
| |
* | MDEV-13149 -- show function status now works with PAD_CHAR_TO_FULL_LENGTHVesa Pentti2017-10-102-0/+47
| |
* | MDEV-13972 crash in Item_func_sec_to_time::get_dateAlexander Barkov2017-10-104-0/+50
| |
* | MDEV-11819 NO_ZERO_IN_DATE: Incorrect generated column valueAlexander Barkov2017-10-064-0/+69
| |
* | Do not stop repeating a test even if some executions are skippedElena Stepanova2017-08-181-2/+1
| |
* | MDEV-11240: Server crashes in check_view_single_update or Assertion ↵Oleksandr Byelkin2017-08-162-7/+1
| | | | | | | | | | | | `derived->table' failed in mysql_derived_merge_for_insert Before "merge" view shoud be inited to maintaing transitive attributes like "multitable".
* | MTR's internal check of main.log_tables-big failedElena Stepanova2017-08-152-8/+10
| | | | | | | | | | | | The test wasn't restoring log_output properly. Also added output of query_time in case of wrong result, to investigate the failure described in MDEV-13408
* | MDEV-13458: Wrong result for aggregate function with distinct clause when ↵Varun Gupta2017-08-092-0/+54
| | | | | | | | | | | | | | the value for tmp_table_size is small Fixed by making sure that the sort buffer would have atleast MERGEBUFF2 keys. Also fixed MDEV-13457 by making sure that an empty tree is never dumped to the disk
* | MDEV-13065 rpl.rpl_mdev-11092 fails sporadically in buildbotSachin Setiya2017-07-191-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem rpl.rpl_mdev-11092 fails in buildbot because after starting slave in wait_for_slave_sql_error_and_skip.inc slave is started but there may be chances that we have not skipped the last error and Last_SQL_Errno is still not zero untill the end of rpl_end.inc , which will compare Last_SQL_Errno to 0. So in this this case rpl_mdev-11092 fails. Solution After starting slave in wait_for_slave_sql_error_and_skip.inc we will wait for Last_SQL_Errno to become 0.
* | Bug #24595639: INCORRECT BEHAVIOR IN QUERY WITH UNION AND GROUP BYSergei Golubchik2017-07-182-0/+33
| | | | | | | | test case
* | BUG#25250768: WRITING ON A READ_ONLY=ON SERVER WITHOUT SUPER PRIVILEGESergei Golubchik2017-07-182-0/+5
| | | | | | | | | | simplify. add a test case.