- 10 Aug, 2020 2 commits
-
-
Marko Mäkelä authored
-
Daniel Bartholomew authored
-
- 08 Aug, 2020 1 commit
-
-
Alexander Barkov authored
MDEV-23415 Server crash or Assertion `dec_length <= str_length' failed in Item_func_format::val_str_ascii Problem: The crash happened in FORMAT(double, dec>=31, 'de_DE'). The patch for MDEV-23118 (commit 0041dacc) did not take into account that String::set_real() has a limit of 31 (FLOATING_POINT_DECIMALS) fractional digits. So for the range of 31..38 digits, set_real() switches to use: - my_fcvt() - decimal point notation, e.g. 1.9999999999 - my_gcvt() - scientific notation, e.g. 1e22 my_gcvt() returned a shorter string than Item_func_format::val_str_ascii() expected to get after the my_fcvt() call, so it crashed on assert. Solution: We cannot extend set_real() to use the my_fcvt() mode for the range of 31..38 fractional digits, because set_real() is used in a lot of places and such a change will break everything. Introducing String::set_fcvt() which always prints using my_fcvt() for the whole range of decimals 0..38, supported by the FORMAT() function.
-
- 06 Aug, 2020 4 commits
-
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Sergei Golubchik authored
depending on build config the error might be hidded, in particular liblz4.so and libjemalloc.so make it to disappear, but with -DWITH_INNODB_LZ4=NO -DWITH_JEMALLOC=NO it reappears.
-
- 05 Aug, 2020 1 commit
-
-
Alexander Barkov authored
FORMAT() can print more integer digits (than the argument has) if rounding happens: FORMAT(9.9,0) -> '10' The old code did not take this into account. Fix: 1. One extra digit is needed in case of rounding - If args[1] is a not-NULL constant, then reserve space for one extra integer digit if the requested number of decimals is less than args[0]->decimals. - Otherwise, reserve space for one extra integer digit if args[0]->decimals is not 0, because rounding can potentially happen (depending on the exact data in arguments). 2. One extra digit is also needed if the argument has no integer digits, e.g. in a data type like DECIMAL(38,38). The conditions 1 and 2 are ORed. 3. Fixing FORMAT_MAX_DECIMALS from 30 to 38. This was forgotten in 10.2.1 (when the limit for the number of fractional digits in DECIMAL was extended).
-
- 04 Aug, 2020 9 commits
-
-
Sergei Golubchik authored
no it doesn't
-
Sergei Golubchik authored
-
Elena Stepanova authored
-
Jan Lindström authored
-
Sergei Golubchik authored
-
Marko Mäkelä authored
In commit fd9ca2a7 (MDEV-23295) we added a debug assertion, which caught a similar bug. prepare_inplace_alter_table_dict(): If we had promised that ALGORITHM=INPLACE or ALGORITHM=NOCOPY is supported, we must preserve the ROW_FORMAT.
-
Sachin authored
Problem:- rpl_parallel2 was failing non-deterministically Analysis:- When FLUSH TABLES WITH READ LOCK is executed, it will allow all worker threads to complete their ongoing transactions and then it will pause them. At this state FTWRL will proceed to acquire global read lock. FTWRL first blocks threads from starting new commits, then upgrades the lock to block commit of existing transactions. Step1: FLUSH TABLES WITH READ LOCK - Blocks new commits Step2: * STOP SLAVE command enables 'force_abort=1' which unblocks workers, they continue to execute events. * T1: Waits in 'record_gtid' call to update 'gtid_slave_pos' table with its current GTID, but it is blocked becuase of Step1. * T2: Holds COMMIT lock and waits for T1 to commit. Step3: FLUSH TABLES WITH READ LOCK - Waiting to get BLOCK_COMMIT. This results in deadlock. When STOP SLAVE command allows paused workers to proceed, workers should skip the execution of all further events, similar to 'conservative' parallel mode. Solution:- We will assign 1 to skip_event_group when we are aborted in do_ftwrl_wait. rpl_parallel_entry->pause_sub_id is only reset when force_abort is off in rpl_pause_after_ftwrl.
-
Alexander Barkov authored
Type_handler_temporal_result::Item_func_min_max_fix_attributes() in an expression GREATEST(string,date), e.g: SELECT GREATEST('1', CAST('2020-12-12' AS DATE)); incorrectly evaluated decimals as 6 (like for DATETIME). Adding a separate virtual implementation: Type_handler_date_common::Item_func_min_max_fix_attributes() This makes the code simpler.
-
Alexander Barkov authored
The code in Item_func_int_val::fix_length_and_dec_int_or_decimal() calculated badly the result data type for FLOOR()/CEIL(), so for example the decimal(38,10) input created a decimal(28,0) result. That was not correct, because one extra integer digit is needed. floor(-9.9) -> -10 ceil(9.9) -> 10 Rewritting the code in a more straightforward way. Additional changes: - FLOOR() now takes into account the presence of the UNSIGNED flag of the argument: FLOOR(unsigned decimal) does not need an extra digits. - FLOOR()/CEILING() now preserve the unsigned flag in the result data type is decimal. These changes give nicer data types.
-
- 03 Aug, 2020 11 commits
-
-
Elena Stepanova authored
-
Oleksandr Byelkin authored
-
Oleksandr Byelkin authored
-
Sachin authored
Problem:- rpl_parallel2 was failing non-deterministically Analysis:- When FLUSH TABLES WITH READ LOCK is executed, it will allow all worker threads to complete their ongoing transactions and then it will pause them. At this state FTWRL will proceed to acquire global read lock. FTWRL first blocks threads from starting new commits, then upgrades the lock to block commit of existing transactions. Step1: FLUSH TABLES WITH READ LOCK - Blocks new commits Step2: * STOP SLAVE command enables 'force_abort=1' which unblocks workers, they continue to execute events. * T1: Waits in 'record_gtid' call to update 'gtid_slave_pos' table with its current GTID, but it is blocked becuase of Step1. * T2: Holds COMMIT lock and waits for T1 to commit. Step3: FLUSH TABLES WITH READ LOCK - Waiting to get BLOCK_COMMIT. This results in deadlock. When STOP SLAVE command allows paused workers to proceed, workers should skip the execution of all further events, similar to 'conservative' parallel mode. Solution:- We will assign 1 to skip_event_group when we are aborted in do_ftwrl_wait. rpl_parallel_entry->pause_sub_id is only reset when force_abort is off in rpl_pause_after_ftwrl.
-
Oleksandr Byelkin authored
-
Sergei Petrunia authored
-
Sergei Golubchik authored
/home/buildbot/buildbot/build/storage/xtradb/mtr/mtr0mtr.cc:97:37: error: invalid access to non-static data member ‘fil_space_t::latch’ of NULL object [-Werror=invalid-offsetof]
-
Alexander Barkov authored
Changing that in case of *INT and hex hybrid input: - ROUND(x,NULL) creates a column with the same type as x. The old code created a DOUBLE column, which was not relevant at all. This change simplifies the code a lot. - ROUND(x,non_constant) creates a column of the INT, BIGINT or DECIMAL data type (depending on the exact type of x). The old code created a column of the DOUBLE data type, which lead to precision loss. Hence MDEV-23366. - ROUND(bigint_30,negative_constant) creates a column of the DECIMAL(30,0) data type. The old code created DECIMAL(29,0), which looked strange: the data type promoted to a higher one, but max length reduced. Now the length attribute is preserved.
-
Rucha Deodhar authored
failed or late ER_PERIOD_FIELD_WRONG_ATTRIBUTES upon attempt to create existing table Analysis: Error state is not stored when field is checked in Table_period_info::check_field() Fix: Store error state by setting res to true.
-
Alexander Barkov authored
This problem was fixed by MDEV-23368. Adding tests only.
-
Elena Stepanova authored
-
- 02 Aug, 2020 10 commits
-
-
Elena Stepanova authored
-
Elena Stepanova authored
Make sure system tables aren't open, as the test kills the server
-
Alexander Barkov authored
Item_func_round::fix_arg_int() did not take into account cases when the result of ROUND(bigint_subject,negative_precision) could go outside of the BIGINT range. The old code only incremented max_length, but did not extend change the data type. Fixing to extend the data type (together with max_length increment).
-
Sergei Golubchik authored
-
Elena Stepanova authored
-
Oleksandr Byelkin authored
-
Alexander Barkov authored
The condition in Item_func_round::fix_arg_int() to decide whether: - we can preserve the data type of args[0] versus - the result can go outside of the args[0] data type was wrong. The data type of the first argument can be preserved in these cases: - TRUNCATE(x, n) - ROUND(x, n>=0) Fixing the condition accordingly.
-
Oleksandr Byelkin authored
-
Oleksandr Byelkin authored
-
Oleksandr Byelkin authored
-
- 01 Aug, 2020 2 commits
-
-
Marko Mäkelä authored
Sorry, this should have been pushed instead of 7f4c749d to 10.3. (The push of d63631c3 prevented required an extra merge of that fix. And that commit was merged to 10.4 da78e952.)
-
Marko Mäkelä authored
On MariaDB 10.4 (commit 4db4b773), the query results would not be sorted, which creates random result differences. Let us explicitly sort the results already in 10.3 in order to avoid future merge trouble.
-