summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-14526: MariaDB keeps crashing under load when query_cache_type is changedbb-5.5-MDEV-14526Oleksandr Byelkin2018-01-123-0/+97
| | | | | | | | | | | | | | | | | The problem was in such scenatio: T1 - starts geristering query and locked QC T2 - starts disabling QC and wait for UNLOCK T1 - unlock QC T2 - disable QC and destroy sugnals without waitiung for query unlock T1 a) - not yet unlocked query in qc and crach on attempt to unlock because QC signals are destroyed b) if above was done before distruction, it execute end_of results first time it 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 inapropriate staus (not is_eof()). Fix is: 1) wait for all queries unlocked before destroing them by locking and unlockin 2) remove query_cache_tls->first_query_block if QC disabled
* mysql_install_db: Use --defaults-group-suffix if specifiedDaniel Black2018-01-121-2/+5
| | | | Signed-off-by: Daniel Black <daniel@linux.vnet.ibm.com>
* Fixed misleading voariable names.Oleksandr Byelkin2018-01-111-9/+9
|
* MDEV-14690: Assertion `page_link == &fake_link' failed in pagecache_write_partOleksandr Byelkin2018-01-113-11/+55
| | | | | 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-117-9/+150
| | | | | | | | | | | | | | | | | | | | | | 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-14916 InnoDB reports warning for "Purge reached the head of the history ↵Marko Mäkelä2018-01-112-52/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | list" The warning was originally added in commit c67663054a7db1c77dd1dbc85b63595667a53500 (MySQL 4.1.12, 5.0.3) to trace claimed undo log corruption that was analyzed in https://lists.mysql.com/mysql/176250 on November 9, 2004. Originally, the limit was 20,000 undo log headers or transactions, but in commit 9d6d1902e091c868bb288e0ccf9f975ccb474db9 in MySQL 5.5.11 it was increased to 2,000,000. The message can be triggered when the progress of purge is prevented by a long-running transaction (or just an idle transaction whose read view was started a long time ago), by running many transactions that UPDATE or DELETE some records, then starting another transaction with a read view, and finally by executing more than 2,000,000 transactions that UPDATE or DELETE records in InnoDB tables. Finally, when the oldest long-running transaction is completed, purge would run up to the next-oldest transaction, and there would still be more than 2,000,000 transactions to purge. Because the message can be triggered when the database is obviously not corrupted, it should be removed. Heavy users of InnoDB should be monitoring the "History list length" in SHOW ENGINE INNODB STATUS; there is no need to spam the error log.
* MDEV-13933: Wrong results in COUNT() query with EXISTS and exists_to_inOleksandr Byelkin2018-01-107-16/+206
| | | | 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-102-1/+2
| | | | | 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-102-7/+10
| | | | | | | | | 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
* Silence some -Wimplicit-fallthrough by proper spellingMarko Mäkelä2018-01-033-15/+15
|
* Follow-up to MDEV-14799: Remove bogus debug assertionsMarko Mäkelä2018-01-022-6/+0
| | | | | | | | trx_undo_rec_get_partial_row(): When the PRIMARY KEY includes a column prefix of an externally stored column, the already parsed part of the undo log record may contain a reference to an off-page column. This is the case in the bug58912 test in innodb.innodb.
* MDEV-14799 After UPDATE of indexed columns, old values will not be purged ↵Marko Mäkelä2018-01-026-4/+34
| | | | | | | | | | | | | | from secondary indexes This is a regression caused by MDEV-14051 'Undo log record is too big.' Purge in the secondary index is wrongly skipped in row_purge_upd_exist_or_extern() because node->row only does not contain all indexed columns. trx_undo_rec_get_partial_row(): Add the parameter for node->update so that the updated columns will be copied from the initial part of the undo log record.
* 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-276-3/+96
| | | | | | | 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-203-2/+56
| | | | | | | | | | | | | 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-14639: Fix unexpected end of line at 'Normal shutdown'Simon J Mudd2017-12-191-22/+22
|
* MDEV-14619: VIEW and GROUP_CONCATOleksandr Byelkin2017-12-173-1/+27
| | | | Correctly print separator string in single quotes.
* MDEV-14596 Crash in INTERVAL(ROW(..),ROW(..))Alexander Barkov2017-12-084-0/+34
|
* Revert "Remove use of volatile in stored_field_cmp_to_item"Vicențiu Ciorbaru2017-12-061-2/+7
| | | | | | | | This reverts commit 7603463a46b288c1b5630348e36c622e4c2abb09. The commit itself is fine, however when disabling volatile, compiler optimizations mess up our double results due to precision differences. Revert the patch till a proper solution is found.
* Remove use of volatile in stored_field_cmp_to_itemDaniel Black2017-12-051-7/+2
| | | | | | | This was added in c79641594348 but would hurt all other compilers because of Visual Studio. Hopefully this has been fixed now. Signed-off-by: Daniel Black <daniel@linux.vnet.ibm.com>
* MDEV-10397: Server crashes in key_copy with join_cache_level > 2 and join on ↵Varun Gupta2017-11-304-0/+48
| | | | | | | | 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-2011-20/+165
|
* 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-113-1/+34
| | | | | | | | | | | | | 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-14337 mysqld_safe may suppress error messages with --log-output=fileSergei Golubchik2017-11-101-2/+2
| | | | | don't close stdout/stderr, redirect them to /dev/null instead. otherwise redirections like >&2 fail with "invalid file descriptor"
* MDEV-13921 Audit log writes invalid SQL if single-line comments areAlexey Botchkov2017-11-033-5/+11
| | | | | | | present. thread_pool_server_audit.test fixed. plugin version updated.
* MDEV-13921 Audit log writes invalid SQL if single-line comments areAlexey Botchkov2017-11-033-22/+31
| | | | | | | present. Escape special characters (like \r \n \t) instead of replacing them with spaces.
* MDEV-12569 InnoDB suggests filing bugs at MySQL bug trackerMarko Mäkelä2017-10-2626-42/+42
| | | | | Replace all references in InnoDB and XtraDB error log messages to bugs.mysql.com with references to https://jira.mariadb.org/.
* MDEV-14051 'Undo log record is too big.' error occurring in very narrow ↵bb-5.5-markoMarko Mäkelä2017-10-246-4/+331
| | | | | | | | | | | | | | | | | | | | 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.
* bump the VERSIONDaniel Bartholomew2017-10-181-1/+1
|
* Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), ↵mariadb-5.5.58Sergei Golubchik2017-10-173-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | 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-1713-44/+84
|\
| * (no commit message)mysql-5.5.58mysql-builder@oracle.com2017-09-130-0/+0
| |
| * Bug#26372491 - RCE THROUGH THE MISHANDLE OF BACKSLASHAnushree Prakash B2017-09-131-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DESCRIPTION: =========== The bug is related to incorrect parsing of SQL queries when typed in on the CLI. The incorrect parsing can result in unexpected results. ANALYSIS: ======== The scenarios mainly happens for identifier names with a typical combination of backslashes and backticks. The incorrect parsing can either result in executing additional queries or can result in query truncation. This can impact mysqldump as well. FIX: === The fix makes sure that such identifier names are correctly parsed and a proper query is sent to the server for execution. (cherry picked from commit 31a372aa1c2b93dc75267d1f05a7f7fca6080dc0)
| * Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,Ajo Robert2017-08-241-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Bug#26482173: TLS CIPHER NEGOTIATION INCORRECTLY MATCHES ONArun Kuruvila2017-08-247-164/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LAST BYTE ONLY (YASSL) Description:- TLS cipher negociation happens incorrectly leading to the use of a different Analysis:- YaSSL based MySQL server will compare only the last byte of each cipher sent in the Client Hello message. This can cause TLS connections to fail, due to the server picking a cipher which the client doesn't actually support. Fix:- A fix for detecting cipher suites with non leading zeros is included as YaSSL only supports cipher suites with leading zeros.
| * Bug#26390632: CREATE TABLE CAN CAUSE MYSQL TO EXIT.Nisha Gopalakrishnan2017-08-233-129/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Analysis ======== CREATE TABLE of InnoDB table with a partition name which exceeds the path limit can cause the server to exit. During the preparation of the partition name, there was no check to identify whether the complete path name for partition exceeds the max supported path length, causing the server to exit during subsequent processing. Fix === During the preparation of partition name, check and report an error if the partition path name exceeds the maximum path name limit. This is a 5.5 patch.
| * Bug#19875294 ASSERTION `SRC' FAILED IN MY_STRNXFRM_UNICODE (SIG 6 ↵Tor Didriksen2017-08-233-6/+34
| | | | | | | | | | | | | | -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#24763131 LOCAL-INFILE DEFAULT SHOULD BE DISABLEDVenkatesh Duggirala2017-08-231-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem & Analysis: Slave's Receiver thread, Applier thread and worker threads are created with LOCAL-INFILE option enabled. As the document says https://dev.mysql.com/doc/refman/5.7/en/load-data-local.html, there are some issues if a thread enables local infile. This flag should be enabled with care. But for the above mentioned internal threads, server is enabling it at the time of creation. Fix: Further analysis on the code shows that none of threads really need this flag to be enabled at any time as Slave never executes "LOAD DATA LOCAL INFILE" after reading it from Relay log. Applier thread removes "LOCAL" before start executing the query.
| * 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
| * Merge branch 'mysql-5.5.57-release' into mysql-5.5Gipson Pulla2017-07-170-0/+0
| |\
| * | Bug#26400146 - 5.5 AND 5.6 DOCKER PACKAGES MISSING MYSQLCHECK UPGRADE NOT ↵Balasubramanian Kandasamy2017-07-071-1/+2
| | | | | | | | | | | | | | | | | | POSSIBLE - Add mysqlcheck tool to docker rpms for upgrade
| * | Bug#26171638 MYSQL 5.5.57 - MSI COMMUNITY PACKAGES NOT GETTING INSTALLEDPiotr Obrzut2017-06-052-26/+31
| | | | | | | | | | | | Corrected the revert.
| * | Bug#26171638 MYSQL 5.5.57 - MSI COMMUNITY PACKAGES NOT GETTING INSTALLEDPiotr Obrzut2017-06-021-31/+0
| | | | | | | | | | | | Temporary revert of the VS2008 redist check.
| * | Bug#26181622 MSI BUILD FAIL DUE TO DUPLICATED FILE IDPiotr Obrzut2017-06-011-7/+22
| | | | | | | | | | | | Fixed generated mysql_server.wxs not to contain duplicates, or too long ids
| * | Raise version number after cloning 5.5.57Balasubramanian Kandasamy2017-05-291-1/+1
| | |
* | | MDEV-13937 Aria engine: Internal Error 160 after partition handlingSergei Golubchik2017-10-173-1/+38
| | | | | | | | | | | | | | | | | | | | | | | | 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-173-25/+24
| | | | | | | | | | | | | | | | | | | | | | | | 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-173-3/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.