summaryrefslogtreecommitdiff
path: root/sql
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-14205 Windows : fix race condition writing into error log and setvbufmariadb-10.1.29Vladislav Vaintroub2017-11-131-3/+0
| | | | | Do not do reopen_fstreams/setbuf twice during server startup on Windows. fprintf(stderr,..) might crash, if setbuf is executed at the same time.
* Merge branch 'github/10.0-galera' into 10.1Sergei Golubchik2017-11-104-5/+30
|\
| * MW-406 Bumped up the wsrep patch version (5.6.37-25.21)Teemu Ollakka2017-11-081-1/+2
| |
| * MW-399 Freeing wsrep_status_vars, before provider is released.sjaakola2017-11-081-1/+8
| | | | | | | | | | This is needed to clear THD::wsrep_status_vars reference, which would otherwise remain to point to status variable array, which is no more effective.
| * MW-402 cascading FK issuessjaakola2017-11-081-0/+3
| | | | | | | | | | | | | | | | * created tests focusing in multi-master conflicts during cascading foreign key processing * in row0upd.cc, calling wsrep_row_ups_check_foreign_constraints only when running in cluster * in row0ins.cc fixed regression from MW-369, which caused crash with MW-402.test
| * MW-394Jan Lindström2017-11-081-2/+2
| | | | | | | | MariaDB adjustments.
| * MW-394sjaakola2017-11-081-4/+6
| | | | | | | | | | | | | | * changed thd_binlog_format to return configured binlog format in wsrep execution, regardless of binlogging setting (i.e. with or without binlogging) * thd_binlog_format is used in innobase::write_row(), and would return confusing result there when log_bin==OFF
| * MW-388 Remove unnecessary conditionsDaniele Sciascia2017-11-081-2/+0
| |
| * MW-388 Fix conflict handling of SPs with DECLARE ... HANDLERJan Lindström2017-11-081-2/+2
| | | | | | | | Adapt to MariaDB case
| * MW-388 Fix conflict handling of SPs with DECLARE ... HANDLERDaniele Sciascia2017-11-081-0/+20
| | | | | | | | | | | | | | | | | | | | | | It is possible for a stored procedure that has an error handler that catches SQLEXCEPTION to call thd->clear_error() on a thd that failed certification. And because the error is cleared, wsrep patch proceeds with the normal path and may try to commit statements that should actually abort. This patch catches the situation where wsrep_conflict_state is still set, but the thd's error has been cleared, and rolls back the statement in such cases.
| * Merge tag 'mariadb-10.0.33' into bb-10.0-galerabb-10.0-sachin-galeraSachin Setiya2017-11-0347-287/+560
| |\
* | \ Merge branch '10.0' into 10.1Sergei Golubchik2017-11-101-1/+1
|\ \ \
| * | | typoSergei Golubchik2017-11-091-1/+1
| | | |
* | | | Merge remote-tracking branch 'origin/10.0' into 10.1Alexander Barkov2017-11-0914-52/+83
|\ \ \ \ | |/ / /
| * | | MDEV-14164: Unknown column error when adding aggregate to function in oracle ↵Oleksandr Byelkin2017-11-0912-45/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | style procedure FOR loop Make differentiation between pullout for merge and pulout of outer field during exists2in transformation. In last case the field was outer and so we can safely start from name resolution context of the SELECT where it was pulled. Old behavior lead to inconsistence between list of tables and outer name resolution context (which skips one SELECT for merge purposes) which creates problem vor name resolution.
| * | | MDEV-14116 INET6_NTOA output is set as null to varchar(39) variableAlexander Barkov2017-11-072-6/+7
| | |/ | |/|
* | | MDEV-12633 Error from valgrind related to dd_frm_typeMonty2017-11-022-3/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "Conditional jump or move depends on uninitialised value in my_scan_weight_utf8_general_ci, main.mysql_client_test fails in biuldbot with valgrind" - Fixed by ensuring that engine_name is set to empty string even in case errors in the .frm file - Added some error checking to ha_table_exists()
* | | MDEV-14221 Assertion `0' failed in Item::field_type_for_temporal_comparisonAlexander Barkov2017-11-021-0/+11
| | |
* | | Merge 10.0 into 10.1Marko Mäkelä2017-10-242-4/+7
|\ \ \ | |/ /
| * | MDEV-13776 mysqld got signal 11 on delete returningIgor Babaev2017-10-231-1/+2
| | | | | | | | | | | | | | | The method Field_iterator_table::create_item() must take into account that it can be called when processing DELETE RETURNING.
| * | MDEV-13607 MariaDB crash in fix_semijoin_strategies_for_picked_join_orderIgor Babaev2017-10-231-3/+5
| | | | | | | | | | | | | | | | | | An overflow of the double variable storing the estimate of the number of rows in a partial join could trigger an assertion failure during the optimization stage.
* | | Various compier warningsSergei Golubchik2017-10-222-6/+2
| | | | | | | | | | | | gcc 5.4 and 7.1, Debug and Release builds
* | | Merge branch '10.0' into 10.1Sergei Golubchik2017-10-2239-206/+346
|\ \ \ | |/ /
| * | Merge branch '5.5' into 10.0Sergei Golubchik2017-10-1836-187/+269
| |\ \
| | * | Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), ↵mariadb-5.5.58Sergei Golubchik2017-10-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-176-34/+31
| | |\ \
| | | * | 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#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-231-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -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.
| | * | | MDEV-13937 Aria engine: Internal Error 160 after partition handlingSergei Golubchik2017-10-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-171-25/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-171-3/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-13459 Warnings, when compiling with gcc-7.xSergei Golubchik2017-10-1721-75/+71
| | | | | | | | | | | | | | | | | | | | mostly caused by -Wimplicit-fallthrough
| | * | | Cleanup usage of DBUG_ASSERTS.Oleksandr Byelkin2017-10-131-2/+1
| | | | |
| | * | | MDEV-9619: Assertion `null_ref_table' failed in virtual table_map ↵Oleksandr Byelkin2017-10-1314-33/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-131-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-10892 - rpl.rpl_semi_sync_uninstall_plugin fails with Assertion `0' failureSergey Vojtovich2017-10-132-36/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in buildbot Removed plugin_array_version: it is being checked without mutex protection and thus is prone to data race and race conditions. In effect plugins are not protected from concurrent destruction. Removed state_mask inversion: doesn't seem to make any sense. When collecting local plugins list, only add plugins that match state_mask. Use plugin ref counting to protect against concurrent plugin destruction.
| | * | | MDEV-9208: Function->Function->View = Mysqld segfault (Server crashes in ↵Oleksandr Byelkin2017-10-131-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-131-1/+12
| | | | |
| | * | | MDEV-13149 -- show function status now works with PAD_CHAR_TO_FULL_LENGTHVesa Pentti2017-10-101-0/+5
| | | | |
| | * | | MDEV-13972 crash in Item_func_sec_to_time::get_dateAlexander Barkov2017-10-101-3/+12
| | | | |
| | * | | MDEV-11819 NO_ZERO_IN_DATE: Incorrect generated column valueAlexander Barkov2017-10-061-1/+9
| | | | |
| * | | | Fix check_role_is_granted for embeddedVicențiu Ciorbaru2017-10-171-35/+39
| | | | |
| * | | | MDEV-13676: Field "create Procedure" is NULL, even if the the user has role ↵Vicențiu Ciorbaru2017-10-113-1/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | which is the definer. (SHOW CREATE PROCEDURE) During show create procedure we ommited to check the current role, if it is the actual definer of the procedure. In addition, we should support indirectly granted roles to the current role. Implemented a recursive lookup to search the tree of grants if the rolename is present. SQL Standard 2016, Part 5 Section 53 View I_S.ROUTINES selects ROUTINE_BODY and its WHERE clause says that the GRANTEE must be either PUBLIC, or CURRENT_USER or in the ENABLED_ROLES.
| * | | | MDEV-9886 Illegal mix of collations with a view comparing a field to a ↵Alexander Barkov2017-10-071-1/+3
| | | | | | | | | | | | | | | | | | | | binary constant
| * | | | Fixed the bug mdev-11574.Igor Babaev2017-10-061-8/+31
| | | | | | | | | | | | | | | | | | | | | | | | | Do not build an index merge of two indexes when one index is an infix of the other index.
* | | | | MDEV-10802 TIMESTAMP NOT NULL field with explicit_defaults_for_timestamp and ↵Alexander Barkov2017-10-141-1/+3
| | | | | | | | | | | | | | | | | | | | NO_ZERO_DATE shouldn't throw error
* | | | | MDEV-13049 Querying INFORMATION_SCHEMA becomes slow in MariaDB 10.1Sergei Golubchik2017-10-092-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Optimizations: * avoid faster ext_table_discovery_simple() *only* when there are engines with discover_table_names() method *and* they look at file names. P_S implements discover_table_names(), but it's not a reason to use slower extension_based_table_discovery(). * don't pre-sort table names if ORDER BY or GROUP BY was specified * starting from 10.3 only sort table names for SHOW commands
* | | | | cleanup: is_show_command(thd)Sergei Golubchik2017-10-091-5/+11
| | | | |