Console View
|
Categories: connectors experimental galera main |
|
| connectors | experimental | galera | main | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Oleg Smirnov
olernov@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-38574 Rename cloning functions of class Item and descendants Rename cloning methods of class Item and its descendants in the following way: (from) (to) do_build_clone -> deep_copy build_clone -> deep_copy_with_checks do_get_copy -> shallow_copy get_copy -> shallow_copy_with_checks to better reflect their functionality. Also make Item::deep_copy() and shallow_copy() protected. Outside users should call deep_copy_with_checks() and shallow_copy_with_checks(). |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
bsrikanth-mariadb
srikanth.bondalapati@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-37510: crash when tracing with max_sel_arg_weight equal to 1 When the optimizer_max_sel_arg_weight is set to 1, a nested query crashed while tracing. SEL_ARG object has a field named 'field', that is not set when the type is other than KEY_RANGE. But, the field was accessed to store its name, and weight to the trace. This resulted in a crash due to NULL pointer. Added a check to access field if the type is KEY_RANGE, and if not, just trace the type. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Brandon Nesterenko
brandon.nesterenko@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MDEV-38615: Assertion skip_res == EVENT_SKIP_NOT failed. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Jan Lindström
jan.lindstrom@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-38598 : Galera test failure on MW-86-wait8 Test failure is caused by regression introduced by commit 4de773e90 that changed error code when function does not exists. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
bsrikanth-mariadb
srikanth.bondalapati@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-36353: Crash with explain for connection SHOW EXPLAIN FOR, and EXPLAIN/DESC FOR CONNECTION should behave identically. However, for a query with an addition expression containing INTERVAL and NOT IN sub-select SHOW EXPLAIN FOR was correctly throwing parse error, where as EXPLAIN/DESC FOR CONNECTION was crashing. The reason for the crash is that select block was not initialized and was being accessed inside the NOT IN sub-select in the EXPLAIN/DESC FOR CONNECTION case. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Oleg Smirnov
olernov@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-38574 Rename cloning functions of class Item and descendants Rename `Item::clone_item()` to `clone_constant()`, and do the same for any overloads in descendant items. The function returns non-NULL only for items that represent constant literals. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
bsrikanth-mariadb
srikanth.bondalapati@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-37510: crash when tracing with max_sel_arg_weight equal to 1 When the optimizer_max_sel_arg_weight is set to 1, a nested query crashed while tracing. SEL_ARG object has a field named 'field', that is not set when the type is other than KEY_RANGE. But, the field was accessed to store its name, and weight to the trace. This resulted in a crash due to NULL pointer. Added a check to access field if the type is KEY_RANGE, and if not, just trace the type. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Alexander Barkov
bar@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-38359 Assertion `!thd->free_list' failed in bool MYSQL_QUERY_LOG::write(THD *, time_t, const char *, size_t, ulonglong, ulonglong, bool, const char *, size_t) The patch for "MDEV-33830 Support for cursors on prepared statements" tried to enable slow log for cursor OPEN statements. However it introduced a crash reported in MDEV-38359. After checking the slog log implementation for sp_instr_stmt, it appeared to be buggy: - MDEV-38611 Procedure statements do not write Explain entries to the slow log - MDEV-38614 Procedure statements write wrong Query_time into slow log It was decided to wait untile these bugs are cloded and enable slow log for OPEN under terms of a separate task: MDEV-38612 Cursor OPEN statements do not write to the slow log This patch reverts the change which enabled slow log for OPEN. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Oleg Smirnov
olernov@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-38574 Rename cloning functions of class Item and descendants Rename `Item::clone_item()` to `clone_constant()`, and do the same for any overloads in descendant items. The function returns non-NULL only for items that represent constant literals. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
bsrikanth-mariadb
srikanth.bondalapati@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-37510: crash when tracing with max_sel_arg_weight equal to 1 When the optimizer_max_sel_arg_weight is set to 1, a nested query crashed while tracing. SEL_ARG object has a field named 'field', that is not set when the type is other than KEY_RANGE. But, the field was accessed to store its name, and weight to the trace. This resulted in a crash due to NULL pointer. Added a check to access field if the type is KEY_RANGE, and if not, just trace the type. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Alexander Barkov
bar@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-33830 Support for cursors on prepared statements Adding support for cursors on prepared statements. - SQL Standard way: DECLARE c CURSOR FOR stmt; PREPARE stmt FROM 'SELECT ?'; OPEN c USING 1; - Oracle-style way with SYS_REFCURSOR variables: DECLARE c SYS_REFCURSOR; BEGIN OPEN c FOR 'SELECT ?' USING 1; |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
bsrikanth-mariadb
srikanth.bondalapati@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-36353: Crash with explain for connection SHOW EXPLAIN FOR, and EXPLAIN/DESC FOR CONNECTION should behave identically. However, for a query with an addition expression containing INTERVAL and NOT IN sub-select SHOW EXPLAIN FOR was correctly throwing parse error, where as EXPLAIN/DESC FOR CONNECTION was crashing. The reason for the crash is that select block was not initialized and was being accessed inside the NOT IN sub-select in the EXPLAIN/DESC FOR CONNECTION case. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Oleg Smirnov
olernov@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-38574 Rename cloning functions of class Item and descendants Rename cloning methods of class Item and its descendants in the following way: (from) (to) do_build_clone -> deep_copy build_clone -> deep_copy_with_checks do_get_copy -> shallow_copy get_copy -> shallow_copy_with_checks to better reflect their functionality. Also make Item::deep_copy() and shallow_copy() protected. Outside users should call deep_copy_with_checks() and shallow_copy_with_checks(). |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thirunarayanan Balathandayuthapani
thiru@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-38629 Deprecate innodb_ft_enable_diag_print variable The innodb_ft_enable_diag_print is now deprecated and ignored. This will be removed in a future version. This was used to enable additional diagnostic output during FTS operations. - Added PLUGIN_VAR_DEPRECATED flag to innodb_ft_enable_diag_print - Removed fts_enable_diag_print global variable declaration - Removed fts_ast_node_print() function declaration and usage - Removed start_time field from fts_sync_t structure |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thirunarayanan Balathandayuthapani
thiru@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-38629 Deprecate innodb_ft_enable_diag_print variable The innodb_ft_enable_diag_print is now deprecated and ignored. This will be removed in a future version. This was used to enable additional diagnostic output during FTS operations. - Added PLUGIN_VAR_DEPRECATED flag to innodb_ft_enable_diag_print - Removed fts_enable_diag_print global variable declaration - Removed fts_ast_node_print() function declaration and usage - Removed start_time field from fts_sync_t structure |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Alexander Barkov
bar@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-38626 Unexpected `Data too long` error on subselect as a multiplication argument Item_singerow_subselect::fix_length_and_dec() incorrectly calculated its Item::max_length when the underlying expression was Item_int. The reason of the problem: Item_int has an optimized max_length to make CONCAT(1) create a VARCHAR(1) column rather than a VARCHAR(2) column. Its max_length does not include one extra character for the sign in case the value is positive but the value is not marked as Item::unsigned==true. So copying max_length from the underlying Item_int (with value==9) in cases like this: SELECT CONCAT((SELECT 9 FROM t0)); was not correct. Implementing a new virtual method Type_handler::Item_type_std_attributes_generic(const Item *item) - The default implementation just copies attributes from "item" as is. - In case of Type_handler_int_result it evaluates max_length using item->decimal_precision() rather than item->max_length. This works correctly for both "optimized" items like Item_int and non-"optimized" Items whose max_length includes +1 for the sign in case of signed expressions. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Marko Mäkelä
marko.makela@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
WIP race condition between checkpoint and file creation log_t::write_checkpoint(): Try to fix a race condition with log_t::archived_mmap_switch_prepare(). FIXME: We occasionally write a checkpoint to the new log instead of the old one. FIXME: broken innodb_log_archive recovery with pread/pwrite I/O |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Brandon Nesterenko
brandon.nesterenko@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-38621: Position mismatch in binlog for partial_row_log_events Partial_rows_log_event types would incorrectly write their end_log_pos. I.e., they would start at 0 and work their way up to larger end_log_pos values. However, events that first write to a cache and then are moved to the binlog _should_ always write 0 for their end_log_pos. The problem is that the Log_event() base constructor call was missed when constructing a Partial_rows_log_event, which failed to correctly set the cache_type. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
ParadoxV5
paradox.ver5@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-4698 snapshot 4 * Implement SQL thread seeking by * moving `Relay_log_info::restart_gtid_pos` loading from parallel replication STOP REPLICA to either case START REPLICA to cover both STOP+START REPLICA and server reboot (including from a crash). * partially porting the processing of this `restart_gtid_pos` from parallel replication to serial replication * reusing the ~~`@@gtid_ignore_duplicates`~~ _`@@slave_skip_counter`_ component to minimize changes * Fix oversights of `Gtid_IO_Pos` reloading * Multiple GTID lists (typically those sent from the primary) overwrote instead of merged. * Trailing events were counted towards a download-paused GTID group even if they are not part of one. * Lift the limitation * Improve `rpl.rpl_gtid_restart_slave` * Fix even more tests |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thirunarayanan Balathandayuthapani
thiru@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-38629 Depreciate innodb_ft_enable_diag_print variable The innodb_ft_enable_diag_print system variable is now deprecated and will be removed in a future version. This variable was used to enable additional diagnostic output during FTS operations. - Added PLUGIN_VAR_DEPRECATED flag to innodb_ft_enable_diag_print - Removed fts_enable_diag_print global variable declaration - Removed fts_ast_node_print() function declaration and usage - Removed start_time field from fts_sync_t structure |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Raghunandan Bhat
raghunandan.bhat96@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-37474: Privilege check of information_schema.TRIGGERS does not correspond to the standards According to SQL standard, rows from `INFORMATION_SCHEMA.TRIGGERS` table should be visible to users with non-SELECT privileges on the columns. `ACTION_CONDITION`, `ACTION_STATEMENT` and `DEFINER` columns should be visible only if the user is the owner of the schema. MariaDB uses `TRIGGER` privilege instead of owner, which controls the visibilty of all columns, including those which only need non-SELECT privileges. This fix - Allows users with non-SELECT privileges- INSERT, DELETE or UPDATE, to see rows in `INFORMATION_SCHEMA.TRIGGERS` table. - Ensure `ACTION_CONDITION`, `ACTION_STATEMENT` and `DEFINER` columns are `NULL` unless the user is the owner of the schema or has `TRIGGER` privilege. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
ParadoxV5
paradox.ver5@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Merge branch '10.11' into MDEV-4698 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Alexander Barkov
bar@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-38249 Refactoring: Change Item_save_in_value() not to return SQL NULL Fixing the return type of Type_handler::Item_save_in_value() from bool to void. Adding a new method st_value::is_null(). This makes the code less confusing. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Rex Johnston
rex.johnston@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-35168 subselects with outer references to derived tables may be incorrectly evaluated as constant Subselects being with outer references to derived tables may be incorrectly evaluated as having no table references. This can lead to these subselects being marked as constant, leading to an incorrect result. TBC |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Rex Johnston
rex.johnston@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-38473 Incorrect Empty Set with HAVING clause when SELECT and GROUP BY use different aliases for the same column MDEV-29300 fix causes a wrong result by incorrectly removing a wrapper to an item that needed to be wrapped for the correct result. Direct access to the item causes an incorrect table reference to be used during join evaluation. We revert that fix. Our original problem query is this SELECT (SELECT 0 GROUP BY c1 HAVING (SELECT c1)) FROM t1 group by c1; JOIN::prepare on /* select#2 */ select 0 group by t1.c1 having (subquery#3) fixing t1.c1 in group by clause, calls fix_outer_field() this item is resolved in an outer select (#1) and it is a grouping select, so we wrap it in Item_outer_ref and set this item to unfixed for later fixing in fix_inner_refs(). JOIN::prepare continues onto the having clause and fixes (subquery#3) which calls initiates the prepare series of calls, leading to setup_fields on the fields in this JOIN, one of which is an outer reference c1. This is resolved to the item in the next most outer select in the group by clause. This item has been wrapped with an unfixed Item_outer_ref. It is found in resolve_ref_in_select_and_group() is it expected that this item will have already been fixed, hence this call in Item_field::fix_outer_field() DBUG_ASSERT(*ref && (*ref)->fixed()); but as explained above, it isn't fixed and debug builds assert here. Because this wrapper cannot be resolved here for reasons detailed in fix_inner_refs, and we cannot remove this wrapper without potentially returning an incorrect result, we have to relax this assertion. Approved by: Oleksandr "Sanja" Byelkin ([email protected]) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Rex Johnston
rex.johnston@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-35168 subselects with outer references to derived tables may be incorrectly evaluated as constant Subselects with outer references to derived tables may be incorrectly evaluated as having no table references. This can lead to these subselects being marked as constant, leading to an incorrect result. During the calculation of the tables used in a subselect, we construct a table map of outer references in our new parent select. This is currently done purely by finding Item_fields in our tree and using the attached table to update our bitmap. It can be that a reference to a derived table also needs to have it's table added to this map. If the derived table can be null, this is the case. We add a new processor to our item walk system, enumerate_table_refs_processor which is defined at this stage only for Item_direct_view_ref items. This called alongside enumerate_field_refs_processor in Item_subselect::recalc_used_tables(). |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Alexander Barkov
bar@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-38597 Server crashes with a subselect in parameter The patch for "MDEV-38626 Unexpected `Data too long`..." earlier fixed this problem. Adding a test case only. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Alexander Barkov
bar@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-38626 Unexpected `Data too long` error on subselect as a multiplication argument CHERRY-PICKING FROM 10.11 Item_singerow_subselect::fix_length_and_dec() incorrectly calculated its Item::max_length when the underlying expression was Item_int. The reason of the problem: Item_int has an optimized max_length to make CONCAT(1) create a VARCHAR(1) column rather than a VARCHAR(2) column. Its max_length does not include one extra character for the sign in case the value is positive but the value is not marked as Item::unsigned==true. So copying max_length from the underlying Item_int (with value==9) in cases like this: SELECT CONCAT((SELECT 9 FROM t0)); was not correct. Implementing a new virtual method Type_handler::Item_type_std_attributes_generic(const Item *item) - The default implementation just copies attributes from "item" as is. - In case of Type_handler_int_result it evaluates max_length using item->decimal_precision() rather than item->max_length. This works correctly for both "optimized" items like Item_int and non-"optimized" Items whose max_length includes +1 for the sign in case of signed expressions. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Jan Lindström
jan.lindstrom@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-37984 : Test failure on galera.MDEV-34647 Make sure that both nodes uses intended auto_increment configuration, all tables and rows are replicated and ordered correctly. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Brandon Nesterenko
brandon.nesterenko@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-38609: Master should not fragment replication events based on slave_max_allowed_packet This commit adds a new variable, binlog_row_event_fragment_threshold, to define the threshold at which Partial_row_log_events are used (rather than re-using slave_max_allowed_packet). TODO: Re-write main git commit message to convey this |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Yuchen Pei
ycp@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MDEV-36230 [to-squash] Address review comments | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
bsrikanth-mariadb
srikanth.bondalapati@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-36353: Crash with explain for connection SHOW EXPLAIN FOR, and EXPLAIN/DESC FOR CONNECTION should behave identically. However, for a query with an addition expression containing INTERVAL and NOT IN sub-select SHOW EXPLAIN FOR was correctly throwing parse error, where as EXPLAIN/DESC FOR CONNECTION was crashing. The reason for the crash is that select block was not initialized and was being accessed inside the NOT IN sub-select in the EXPLAIN/DESC FOR CONNECTION case. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
bsrikanth-mariadb
srikanth.bondalapati@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-36353: Crash with explain for connection SHOW EXPLAIN FOR, and EXPLAIN/DESC FOR CONNECTION should behave identically. However, for a query with an addition expression containing INTERVAL and NOT IN sub-select SHOW EXPLAIN FOR was correctly throwing parse error, where as EXPLAIN/DESC FOR CONNECTION was crashing. The reason for the crash is that select block was not initialized and was being accessed inside the NOT IN sub-select in the EXPLAIN/DESC FOR CONNECTION case. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Raghunandan Bhat
raghunandan.bhat96@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-37474: Privilege check of information_schema.TRIGGERS does not correspond to the standards According to SQL standard, rows from `INFORMATION_SCHEMA.TRIGGERS` table should be visible to users with non-SELECT privileges on the columns. `ACTION_CONDITION`, `ACTION_STATEMENT` and `DEFINER` columns should be visible only if the user is the owner of the schema. MariaDB uses `TRIGGER` privilege instead of owner, which controls the visibilty of all columns, including those which only need non-SELECT privileges. This fix - Allows users with non-SELECT privileges- INSERT, DELETE or UPDATE, to see rows in `INFORMATION_SCHEMA.TRIGGERS` table. - Ensure `ACTION_CONDITION`, `ACTION_STATEMENT` and `DEFINER` columns are `NULL` unless the user is the owner of the schema or has `TRIGGER` privilege. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Brandon Nesterenko
brandon.nesterenko@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-38506: Failed GRANT on a procedure breaks replication When GRANT EXECUTE ON PROCEDURE fails on the master, it will erroneously be replicated and executed successfully on the slave. This both breaks replication and is a security violation. The underlying issue is that a failed GRANT EXECUTE ON PROCEDURE will still be replicated when sql_mode does not have NO_AUTO_CREATE_USER. This is because the function mysql_routine_grant() does not check if an error occured while performing the GRANT before binlogging, it simply always binlogs. This patch fixes this problem by checking if an error happened previously before binlogging, and if so, then skip binlogging. Note there is still a broader issue in this area leading to replication divergence. Reported in MDEV-29848, a partially-completed GRANT statment (where some earlier GRANTS succeed and a later fails) will not binlog. Note this affects all grant types, whereas the issue addressed in this patch is limited to GRANT EXECUTE ON PROCEDURE. This patch makes GRANT EXECUTE ON PROCEDURE binlogging behavior consistent with the other grant types. A separate follow-up patch will address the broader MDEV-29848 issue. Also note that a test case in rpl_do_grant.test took advantage of MDEV-38506 so a partially-failing REVOKE EXECUTE ON PROCEDURE would still replicate. This test case is disabled with a TODO note to re-enable it once MDEV-29848 is fixed Reviewed-by: Sergei Golubchik <[email protected]> Signed-off-by: Brandon Nesterenko <[email protected]> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Alexander Barkov
bar@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MDEV-38370 SIGSEGV in sp_instr_set_ps_placeholder::get_expr_query | sp_lex_instr::get_query, UBSAN member access within null pointer of type 'const sp_assignment_lex' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thirunarayanan Balathandayuthapani
thiru@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-38629 Deprecate innodb_ft_enable_diag_print variable The innodb_ft_enable_diag_print system variable is now deprecated and ignored. It will be removed in a future version. This variable was used to enable additional diagnostic output during FTS operations. - Added PLUGIN_VAR_DEPRECATED flag to innodb_ft_enable_diag_print - Removed fts_enable_diag_print global variable declaration - Removed fts_ast_node_print() function declaration and usage - Removed start_time field from fts_sync_t structure |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||