summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-15113: Hang in Aria loghandlerbb-5.5-MDEV-15113Oleksandr Byelkin2018-06-111-32/+187
| | | | | Added unregistering writers in case of log error. Added more debugging control about adding/removing writers to the buffers.
* MDEV-15729 Server crashes in Field::make_field upon HANDLER READ executed ↵Sergei Golubchik2018-06-113-0/+21
| | | | | | | | | with PS protocol update table->pos_in_table_list during prepare, just like it's done in normal execution. otherwise it'll be a dangling pointer
* mysqltest: Allow HANDLER READ in --ps-protocol testsSergei Golubchik2018-06-116-4/+7
| | | | adjust tests
* MDEV-16342 SHOW ENGINES: MyISAM description is uselessSergei Golubchik2018-06-1111-11/+11
| | | | rewrite tautological engine descriptions
* MDEV-15021: mysqldump --tables --routines generates non importable dump fileRutuja Surve2018-06-103-6/+43
| | | | | | The order of outputting stored procedures is important. Stored procedures must be available on view creation, for views which make use of them. Make sure to print them before outputting tables.
* MDEV-15778: Remove packed attr from omt_ and subtree_ classesTeodor Mircea Ionita2018-06-101-4/+4
| | | | Undo the revert that happened by mystake in commit 7fca4b50ffbe750532cfcdb95bcd425ec1b8e22b.
* Make TokuDB compile with GCC-8Vicențiu Ciorbaru2018-06-104-4/+10
| | | | | | | | | | | | GCC-8 introduced multiple warnings and increased the level of strictness. * -Wshadow will warn if a local variable shadows a typedef. * GCC will also warn when memsetting a non-trivial type. In this case a non-trivial type can not have a custom constructor. For all intents and purposes, the class is trivially-copyable. * GCC will also warn if you use too many paranthesses which are not necessary
* Revert "MDEV-15778: Remove packed attr from omt_ and subtree_ classes"Vicențiu Ciorbaru2018-06-101-4/+4
| | | | This reverts commit 1735fa340a9d7ca8683f18fe2ecc148423e78ba7.
* MDEV-16075: Workaround to run MTR test suite for make testTeodor Mircea Ionita2018-06-104-3/+7
| | | | | | | | | | | Assign all tests added via MY_ADD_TEST to a bogus default_ignore target, so that they are not ran by default when doing bare make test. Add default test named MTR that calls mysql-test-run suite, which is now the single test run by make test. In consequence, modified unit/suite.pm to exclude the MTR test and run the real ctests flagged for default_ignore target, thus no circular loop.
* Also ignore macOS .DS_Store Finder junk.Teodor Mircea Ionita2018-06-101-0/+3
|
* Ignore .cbp QtCreator && CodeBlocks project filesTeodor Mircea Ionita2018-06-101-0/+3
|
* MDEV-15778: Remove packed attr from omt_ and subtree_ classesTeodor Mircea Ionita2018-06-101-4/+4
| | | | | | | | This is happening because they are declared as packed and clang has -Waddress-of-packed-member when passing the address of a packed member, a legit concern on different architectures. The easiest way to get rid of the errors is to remove the packed attribute from said structs.
* MDEV-15778: Manually backport TokuDB macOS fixes from 10.0Teodor Mircea Ionita2018-06-104-3/+20
| | | | | | | | | | | | | | Fix build on macOS 10.13: 39dceaae607 MDEV-10983: TokuDB does not compile on OS X 10.12 Make use of a different function to get the current tid. Additionally, librt doesn't exist on OS X. Use System library instead. storage/tokudb/PerconaFT/cmake_modules/TokuFeatureDetection.cmake | 4 +++- storage/tokudb/PerconaFT/portability/portability.cc | 9 ++++++++- storage/tokudb/PerconaFT/portability/tests/test-xid.cc | 9 ++++++++- storage/tokudb/PerconaFT/portability/toku_config.h.in | 1 + 4 files changed, 20 insertions(+), 3 deletions(-)
* MDEV-15789 - mysqlslap use incorrect table defChris Calender2018-06-073-2/+13
| | | | | | | | | | | | | | | The bug arises when one uses --auto-generate-sql-guid-primary (and --auto-generate-sql-secondary-indexes) with mysqlslap and also have sql_mode=STRICT_TRANS_TABLE. When using this option, mysqlslap should create a column with varchar(36), but it appears to create it as a varchar(32) only. Then if one has sql_mode=STRICT_TRANS_TABLES, it throws an error, like: mysqlslap: Cannot run query INSERT INTO t1 VALUES (...) ERROR : Data too long for column 'id' at row 1 Upstream bug report: BUG#80329.
* Catch of OOM situation.Oleksandr Byelkin2018-06-062-0/+5
|
* MDEV-10246 ssl-* config file options have no effect without mysql_ssl_set()Vladislav Vaintroub2018-06-051-0/+4
| | | | | | | | Partially revert 4ef74979969ac9339d0d42c11a6f26632e6776f1 that caused regression. Any ssl- option must imply use_ssl=1, even if mysql_set_ssl() was not used.
* MDEV-16225: wrong resultset from query with semijoin=onVarun Gupta2018-06-023-26/+119
| | | | | | | | | | For non-semi-join subquery optimization we do a cost based decision between Materialisation and IN -> EXIST transformation. The issue in this case is that for IN->EXIST transformation we run JOIN::reoptimize with the IN->EXISt conditions and we come up with a new query plan. But when we compare the cost with Materialization, we make the decision to chose Materialization so we need to restore the query plan for Materilization. The saving and restoring for keyuse array and join_tab keyuse is only done when we have atleast one element in the keyuse_array , we are now changing to do it even for 0 elements to main the generality.
* mtr: use process launch -- args to start mysqld in lldbTeodor Mircea Ionita2018-05-231-1/+1
| | | | | gdb's "set args" equivalent for lldb would be "settings set target.run-args", however it doesn't play well with double dashed args (--).
* MDEV-16235 Server crashes in my_utf8_uni or in my_strtod_intIgor Babaev2018-05-226-7/+46
| | | | | | | | | upon SELECT .. LIMIT 0 The code must differentiate between a SELECT with contradictory WHERE/HAVING and one with LIMIT 0. Also for the latter printed 'Zero limit' instead of 'Impossible where' in the EXPLAIN output.
* MDEV-16220 MTR - do not pass UTF8 on the command line for mysql client.Vladislav Vaintroub2018-05-186-23/+68
| | | | | | | It should work ok on all Unixes, but on Windows ,only worked by accident in the past, with client not being Unicode safe. It stopped working with Visual Studio 2017 15.7 update now.
* MDEV-15318 CREATE .. SELECT VALUES produces invalid table structureSergei Golubchik2018-05-173-4/+23
| | | | | | When Item_insert_value needs a dummy field, use zero-length Field_string, not Field_null. The latter isn't compatible with CREATE ... SELECT.
* (almost) sane core handling in mtrSergey Vojtovich2018-05-161-36/+45
| | | | | | | | | | Analyze core independently of max-save-datadir and max-save-core setting. Increment $num_saved_cores only if core was actually saved. "Move any core files from e.g. mysqltest" independently of max-save-datadir setting. Note: it may overwrite core from mysqld, which might not be desired (it did work this way even before).
* MDEV-654 Assertion `share->now_transactional' failed in flush_log_for_bitmap ↵Monty2018-05-152-0/+9
| | | | | | | | on concurrent workload with Aria tables Problem was that we the bitmap needs to be flushed before disabling logging of redo entires, as writing the bitmap to disk by background checkpoint may cause redo entries.
* MDEV-15480 Audit plugin does not respect QUERY_DML for audit plugin.Alexey Botchkov2018-05-103-4/+44
| | | | QUERY_DML_NO_SELECT flag added.
* protocol: verify that number of rows is correctSergei Golubchik2018-05-041-7/+15
|
* Use after free in authenticationSergei Golubchik2018-05-014-2/+20
|
* Bug#25471090: MYSQL USE AFTER FREESergei Golubchik2018-04-301-2/+2
| | | | a better fix
* Bug#25471090: MYSQL USE AFTER FREESergei Golubchik2018-04-271-1/+1
| | | | | | fix another similar line followup for 7828ba0df488
* MDEV-15035 Wrong results when calling a stored procedureIgor Babaev2018-04-2510-15/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | multiple times with different arguments. If the ON expression of an outer join is an OR formula with one of the disjunct being a constant formula then the expression cannot be null-rejected if the constant formula is true. Otherwise it can be null-rejected and if so the outer join can be converted into inner join. This optimization was added in the patch for mdev-4817. Yet the code had a defect: if the query was used in a stored procedure with parameters and the constant item contained some of them then the value of this constant item depended on the values of the parameters. With some parameters it may be true, for others not. The validity of conversion to inner join is checked only once and it happens only for the first call of procedure. So if the parameters in the first call allowed the conversion it was done and next calls used the transformed query though there could be calls whose parameters made the conversion invalid. Fixed by cheking whether the constant disjunct in the ON expression originally contained an SP parameter. If so the expression is not considered as null-rejected. For this check a new item's attribute was intruduced: Item::with_param. It is calculated for each item by fix fields() functions. Also moved the call of optimize_constant_subqueries() in JOIN::optimize after the call of simplify_joins(). The reason for this is that after the optimization introduced by the patch for mdev-4817 simplify_joins() can use the results of execution of non-expensive constant subqueries and this is not valid.
* MDEV-13699: Assertion `!new_field->field_name.str || ↵Oleksandr Byelkin2018-04-254-8/+98
| | | | | | | | strlen(new_field->field_name.str) == new_field->field_name.length' failed in create_tmp_table on 2nd execution of PS with semijoin The problem was that SJ (semi-join) used secondary list (array) of subquery select list. The items there was prepared once then cleaned up (but not really freed from memory because it was made in statement memory). Original list was not prepared after first execution because select was removed by conversion to SJ. The solution is to use original list but prepare it first.
* bump the VERSIONDaniel Bartholomew2018-04-231-1/+1
|
* Merge branch 'merge/merge-xtradb-5.5' into 5.5mariadb-5.5.60Sergei Golubchik2018-04-202-3/+3
|\
| * 5.5.59-38.11Sergei Golubchik2018-04-202-8/+11
| |
* | Bug#25471090: MYSQL USE AFTER FREESergei Golubchik2018-04-191-1/+1
| | | | | | | | in a specially crafted invalid packet, one can get end_pos < pos here
* | BUG#27216817: INNODB: FAILING ASSERTION: ↵Sergei Golubchik2018-04-196-0/+76
| | | | | | | | | | | | | | | | | | PREBUILT->TABLE->N_MYSQL_HANDLES_OPENED == 1 disable online alter add primary key for innodb, if the table is opened/locked more than once in the current connection (see assert in ha_innobase::add_index())
* | BUG#26881798: SERVER EXITS WHEN PRIMARY KEY IN MYSQL.PROC IS DROPPEDSergei Golubchik2018-04-192-0/+16
| | | | | | | | test case
* | Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2018-04-1921-34/+190
|\ \
| * | BUG#27216817: INNODB: FAILING ASSERTION:mysql-5.5.60Nisha Gopalakrishnan2018-02-267-20/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PREBUILT->TABLE->N_MYSQL_HANDLES_OPENED == 1 ANALYSIS: ========= Adding unique index to a InnoDB table which is locked as mutliple instances may trigger an InnoDB assert. When we add a primary key or an unique index, we need to drop the original table and rebuild all indexes. InnoDB expects that only the instance of the table that is being rebuilt, is open during the process. In the current scenario we have opened multiple instances of the table. This triggers an assert during table rebuild. 'Locked_tables_list' encapsulates a list of all instances of tables locked by LOCK TABLES statement. FIX: === We are now temporarily closing all the instances of the table except the one which is being altered and later reopen them via Locked_tables_list::reopen_tables().
| * | Bug#27538614 DROP EXTRA CHANGELOG FILE FROM DEB/RPM PACKAGESLars Tangvald2018-02-231-0/+2
| | | | | | | | | | | | Change the file to refer to published git repository directly
| * | (no commit message)Karthik Kamath2018-02-141-1/+3
| | |
| * | Bug#25471090: MYSQL USE AFTER FREEArun Kuruvila2018-02-123-10/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Description:- Mysql client crashes when trying to connect to a fake server which is sending incorrect packets. Analysis:- Mysql client crashes when it tries to read server version details. Fix:- A check is added in "red_one_row()".
| * | BUG#27448061: MYSQLD--DEFAULTS-FILE TEST FAILS FOR NDB RELEASESPavan Naik2018-02-092-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PREVIOUS TO MYSQL 8.0 Description : ------------- The mysqld--defaults-file test fails when the test suite is run from a non-canonical path, which happens when the current working directory when mysql-test-run.pl is started contains a symbolic link. The problem is that this test case uses --replace-result with $MYSQL_TEST_DIR. This variable is a potentially non-canonical path based on the current working directory when mtr is started. However, the path in the expected error message from mysqld contains a canonical path. This means it does not contain $MYSQL_TEST_DIR if mtr's working directory is not the canonical path of the working directory. Because other tests produce output that may contain non-canonical paths, making $MYSQL_TEST_DIR always canonical is not a fix. Fix : ----- Introduced a new environment variable '$ABS_MYSQL_TEST_DIR' which will contin the canonical path to the test directory and replaced $MYSQL_TEST_DIR with the new variable in main.mysqld--defaults-file test file. This is a back-port of BUG#24579973. Change-Id: I3b8df6f2d7ce2b04e188a896d76250cc1addbbc1
| * | BUG#24365972 BINLOG DECODING ISN'T RESILIENT TO CORRUPT BINLOG FILESJoao Gramacho2018-02-023-8/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem ======= When facing decoding of corrupt binary log files, server may misbehave without detecting the events corruption. This patch makes MySQL server more resilient to binary log decoding. Fixes for events de-serialization and apply =========================================== @sql/log_event.cc Query_log_event::Query_log_event: added a check to ensure query length is respecting event buffer limits. Query_log_event::do_apply_event: extended a debug print, added a check to character set to determine if it is "parseable" or not, verified if database name is valid for system collation. Start_log_event_v3::do_apply_event: report an error on applying a non-supported binary log version. Load_log_event::copy_log_event: added a check to table_name length. User_var_log_event::User_var_log_event: added checks to avoid reading out of buffer limits. User_var_log_event::do_apply_event: reported an sanity check error properly and added individual sanity checks for variable types that expect fixed (or minimum) amount of bytes to be read. Rows_log_event::Rows_log_event: added checks to avoid reading out of buffer limits. @sql/log_event_old.cc Old_rows_log_event::Old_rows_log_event: added a sanity check to avoid reading out of buffer limits. @sql/sql_priv.h Added a sanity check to available_buffer() function.
| * | BUG#27160888: MISSING FILE PRIVILEDGE CHECKS ON SOMEKarthik Kamath2018-01-111-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | STATEMENTS ANALYSIS: ========= A user not having FILE privilege is not allowed to create custom data/index directories for a table or for its partitions via CREATE TABLE but is allowed to do so via ALTER TABLE statement. ALTER TABLE ignores DATA DIRECTORY and INDEX DIRECTORY when given as table options. The issue occurs during the creation of partitions for a table via ALTER TABLE statement with the DATA DIRECTORY and/or INDEX DIRECTORY options. The issue exists because of the absence of FILE privilege check for the user. FIX: ==== A FILE privilege check has been introduced for resolving the above scenario.
| * | Bug #27021754 MYSQLTEST MAN PAGES WILL BE REMOVED, PACKAGING MUST BE PREPAREDBjorn Munch2018-01-113-25/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | Followup: now that the man pages have actually been removed, we no longer need to take deliberate action to ignore them. Thus we can remove that part of the original change. RPM: drop the conditional removal DEB: remove from the exclude list
| * | (no commit message)mysql-builder@oracle.com2017-12-210-0/+0
| | |
| * | (no commit message)mysql-builder@oracle.com2017-12-210-0/+0
| | |
| * | BUG#26881798: SERVER EXITS WHEN PRIMARY KEY IN MYSQL.PROCKarthik Kamath2017-12-056-9/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IS DROPPED ANALYSIS: ========= It is advised not to tamper with the system tables. When primary key is dropped from a system table, certain operations on the table which tries to access the table key information may lead to server exit. FIX: ==== An appropriate error is now reported in such a case.
| * | Bug#26585560 - MYSQL DAEMON SHOULD CREATE ITS PID FILE ASShishir Jaiswal2017-12-025-3/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ROOT DESCRIPTION =========== If the .pid file is created at a world-writable location, it can be compromised by replacing the server's pid with another running server's (or some other non-mysql process) PID causing abnormal behaviour. ANALYSIS ======== In such a case, user should be warned that .pid file is being created at a world-writable location. FIX === A new function is_file_or_dir_world_writable() is defined and it is called in create_pid_file() before .pid file creation. If the location is world-writable, a relevant warning is thrown. NOTE ==== 1. PID file is always created with permission bit 0664, so for outside world its read-only. 2. Ignoring the case when permission is denied to get the dir stats since the .pid file creation would fail anyway in such a case.
| * | BUG#26502135: MYSQLD SEGFAULTS INKarthik Kamath2017-11-271-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MDL_CONTEXT::TRY_ACQUIRE_LOCK_IMPL ANALYSIS: ========= Server sometimes exited when multiple threads tried to acquire and release metadata locks simultaneously (for example, necessary to access a table). The same problem could have occurred when new objects were registered/ deregistered in Performance Schema. The problem was caused by a bug in LF_HASH - our lock free hash implementation which is used by metadata locking subsystem in 5.7 branch. In 5.5 and 5.6 we only use LF_HASH in Performance Schema Instrumentation implementation. So for these versions, the problem was limited to P_S. The problem was in my_lfind() function, which searches for the specific hash element by going through the elements list. During this search it loads information about element checked such as key pointer and hash value into local variables. Then it confirms that they are not corrupted by concurrent delete operation (which will set pointer to 0) by checking if element is still in the list. The latter check did not take into account that compiler (and processor) can reorder reads in such a way that load of key pointer will happen after it, making result of the check invalid. FIX: ==== This patch fixes the problem by ensuring that no such reordering can take place. This is achieved by using my_atomic_loadptr() which contains compiler and processor memory barriers for the check mentioned above and other similar places. The default (for non-Windows systems) implementation of my_atomic*() relies on old __sync intrisics and implements my_atomic_loadptr() as read-modify operation. To avoid scalability/performance penalty associated with addition of my_atomic_loadptr()'s we change the my_atomic*() to use newer __atomic intrisics when available. This new default implementation doesn't have such a drawback.