- 27 Jan, 2022 3 commits
-
-
Daniele Sciascia authored
Add test case that reproduces the issue and update wsrep-lib submodule to include the fix. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
-
Alexander Barkov authored
MDEV-26953 Assertion `!str || str != Ptr || !is_alloced()' failed in String::copy upon SELECT with sjis Item::save_str_in_field() passes &Item::str_value as a parameter to val_str(). Item_func::make_empty_result() also fills and returns str_value. As a result, in the reported scenario in Item_func::val_str_from_val_str_ascii() both "str" and "res" pointed to Item::str_value, which made the DBUG_ASSERT inside String::copy() (preventing copying to itself) crash: if ((null_value= str->copy(res->ptr(), res->length(), &my_charset_latin1, collation.collation, &errors))) Fix: - Adding a String* parameter to make_empty_result() - Passing the val_str() parameter to make_empty_string().
-
Daniel Black authored
Because this test uses a unix socket to check if the mysql_tzinfo_to_sql generates suitable SQL it cannot work in embedded mode.
-
- 26 Jan, 2022 3 commits
-
-
Andrei authored
Fixed the assert to restore pre-refactoring condition for calling set_error() equivalent.
-
Marko Mäkelä authored
cmp_data(): Compare different-length CHAR fields with the new strnncollsp_nchars function that will pad spaces if needed. Any InnoDB ROW_FORMAT except the original one that was named ROW_FORMAT=REDUNDANT in MySQL 5.0.3 will internally store CHAR(n) columns as variable-length if the character encoding is variable length. Spaces may be trimmed from the end. For NOT NULL values, the minimum length is always n*mbminlen. In cmp_data() we only know the lengths in bytes and we cannot easily know the ROW_FORMAT. is_strnncoll_compatible(): Refactored from innobase_mysql_cmp(). innobase_mysql_cmp(): Merged to cmp_whole_field(). cmp_whole_field(): Invoke strnncollsp_nchars for the DATA_MYSQL (the CHAR type with any other collation than latin1_swedish_ci). Reviewed by: Alexander Barkov Tested by: Roel Roel Van de Paar
-
Marko Mäkelä authored
Let us always compare DATA_GEOMETRY with cmp_geometry_field().
-
- 25 Jan, 2022 3 commits
-
-
Vladislav Vaintroub authored
- compile wolfcrypt with kdf.c, to avoid undefined symbols in tls13.c - define WOLFSSL_HAVE_ERROR_QUEUE to avoid endless loop SSL_get_error - Do not use SSL_CTX_set_tmp_dh/get_dh2048, this would require additional compilation options in WolfSSL. Disable it for WolfSSL build, it works without it anyway. - fix "macro already defined" Windows warning.
-
Oleksandr Byelkin authored
-
Jan Lindström authored
-
- 24 Jan, 2022 2 commits
-
-
Marko Mäkelä authored
Because commit 24773bf3 made dict_v_col_t encapsulate v_indexes, we must invoke dict_v_col_t::~dict_v_col_t() to destruct the container. This basically is a fixup of the merge commit 5008171b of the 10.2 commit cf2c6b7f (MDEV-24971). I did not debug why no leaks are reported for 10.2 or 10.3.
-
Daniele Sciascia authored
In wsrep_schema code, call ha_index_end() only if the corresponding ha_index_init() call succeeded. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
-
- 21 Jan, 2022 1 commit
-
-
Alexander Barkov authored
-
- 20 Jan, 2022 2 commits
-
-
Monty authored
-
Alexander Barkov authored
-
- 19 Jan, 2022 3 commits
-
-
Monty authored
MDEV-25830 optimizer_use_condition_selectivity=4 sometimes produces worse plan than optimizer_use_condition_selectivity=1 The issue was that calc_cond_selectivity_for_table prefered ranges with many parts and when deciding on which selectivity to use. Fixed by going through ranges according to the number of rows in the range. This ensures that selectivity from ranges with few rows will be prefered over ranges with many rows for indexes that uses the same columns.
-
Daniele Sciascia authored
Remove calls to wsrep_append_fk_parent_table() during REPAIR/OPTIMIZE TABLE processing. It turns out that REPAIR or OPTIMIZE commands on table t, do not acquire MDL locks on parent tables of t (as shown in the included test). Thus making wsrep_append_fk_parent_table() unnecessary for OPTIMIZE and REPAIR. This also fixes MDEV-24446 and reenables test galera.mysql-wsrep#198. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
-
Nayuta Yanagisawa authored
Spider dereferences a freed select_lex and then results in SIGSEGV.
-
- 18 Jan, 2022 3 commits
-
-
Eugene Kosov authored
dict_index_t::reconstruct_fields(): add input validation by replacing some assertions handle_instant_metadata(): fix nullptr dereference
-
Jan Lindström authored
Add missing wsrep_sst_auth_free call.
-
Jan Lindström authored
There is no need to open or process temporary tables at wsrep_append_fk_parent_table.
-
- 17 Jan, 2022 2 commits
-
-
Sergei Golubchik authored
SET PASSWORD = PASSWORD('foo') would fail for pam plugin with ERROR HY000: SET PASSWORD is ignored for users authenticating via pam plugin but SET PASSWORD = 'foo' would not. Now it will.
-
Sergei Golubchik authored
-
- 14 Jan, 2022 3 commits
-
-
Daniel Black authored
Fix wsrep.mysql_tzinfo_to_sql_symlink_skip test result.
-
Nayuta Yanagisawa authored
This reverts commit b9730226.
-
Alexander Barkov authored
Problem: At some point, we made stored rountines fail at CREATE time instead of execution time in case of this syntax: IF unknown_variable ... END IF As a result, a trigger created before this change and contained an unknown variable worked in a bad way after upgrade: - It was displayed with an empty trigger name by SHOW CREATE TRIGGER - It was displayed with an empty trigger name by INFORMATION_SCHEMA.TRIGGERS - An attempt to DROP this trigger returned errors - nothing happened. - DROP TABLE did not remove the .TRN file corresponding to this broken trigger. Underlying code observations: The old code assumed that the trigger name resides in the current lex: if(thd->lex->spname) m_trigger_name= &thd->lex->spname->m_name; This is not always the case. Some SP statements (e.g. IF) do the following in their beginning: - create a separate local LEX - set thd->lex to this new local LEX - push the new local LEX to the stack in sp_head::m_lex and the following at the end of the statement: - pop the previous LEX from the stack sp_head::m_lex - set thd->lex back to the popped value So when the parse error happens inside e.g. IF statement, thd->lex->spname is a NULL pointer, because thd->lex points to the local LEX (without SP name) rather than the top level LEX (with SP name). Fix: - Adding a new method sp_head::find_spname_recursive() which walks inside the LEX stack sp_head::m_lex from the top (the newest, most local) to the bottom (the oldest), and finds the one which contains a non-zero spname pointer. - Using the new method inside Deprecated_trigger_syntax_handler::handle_condition(): First it still tests thd->lex->spname (like before this change), and uses it in case it is not empty. Otherwise (if thd->lex->spname is empty), it calls sp_head::find_spname_recursive() to find the LEX with a non-empty spname inside the LEX stack of the current sphead.
-
- 12 Jan, 2022 1 commit
-
-
Aleksey Midenkov authored
TRT opens statement transaction. Cleanup it in case of error.
-
- 11 Jan, 2022 2 commits
-
-
Daniel Black authored
The --skip-write-binary-log added to mysql_tzinfo_to_sql in MDEV-18778 was only effective if galera was enabled on the server. This is because it tied together three concepts under one option: 1. binary logging 2. wsrep replication, and 3. using innodb as a transitional table type. Change 1: small change in help option to reflect this. To solve the performance problem with Aria tables, LOCK TABLES WRITE is used to eliminate the need to fdatasync until the UNLOCK TABLES. If galera isn't enabled, then we also want to use the LOCK TABLE WRITE mechanism. The START TRANSACTION added in MDEV-23440 needed to be moved to before LOCK TABLES otherwise it would cancel their effect. TRUNCATE TABLE statements also need to be before the LOCK TABLES. When changing back from InnoDB to Aria, include the ORDER BY that was originally there in 6aaccbcb and matching the final ALTER TABLE in the timezonedir branch. Running: mariadb-tzinfo-to-sql --skip-write-binlog /usr/share/zoneinfo now generates 16 Aria_transaction_log_syncs from 7053.
-
Nayuta Yanagisawa authored
The Spider storage engine ignored the implicit grouping when aggregation was converted to constant by the query optimizer. As a result, the Spider SE returned rows more than expected. To fix the problem, we notify the Spider SE of the existence of the implicit grouping via Query::distinct.
-
- 10 Jan, 2022 3 commits
-
-
Jan Lindström authored
MDEV-18848 : Galera: 10.4 node crashed with Assertion `client_state.transaction().active()` after altering SEQUENCE table's engine to myisam and back to innodb We need to start Galera transaction for select NEXT VALUE FOR sequence if it is not yet started. Note that ALTER is handled as TOI and transaction is already started.
-
Jan Lindström authored
Galera replication of new DDL-case was missing
-
Jan Lindström authored
Fix test MDEV-20225.
-
- 08 Jan, 2022 1 commit
-
-
Vladislav Vaintroub authored
-
- 07 Jan, 2022 1 commit
-
-
Igor Babaev authored
If the optimizer decides to rewrites a NOT IN predicand of the form outer_expr IN (SELECT inner_col FROM ... WHERE subquery_where) into the EXISTS subquery EXISTS (SELECT 1 FROM ... WHERE subquery_where AND (outer_expr=inner_col OR inner_col IS NULL)) then the pushed equality predicate outer_expr=inner_col can be used for ref[or_null] access if inner_col is a reference to an indexed column. In this case if there is a selective range condition over this column then a Rowid filter may be employed coupled the with ref[or_null] access. The filter is 'pushed' into the engine and in InnoDB currently it cannot be used with index look-ups by primary key. The ref[or_null] access can be used only when outer_expr is not NULL. Otherwise the original predicand is evaluated to TRUE only if the result set returned by the query SELECT 1 FROM ... WHERE subquery_where is empty. When performing this evaluation the executor switches to the table scan by primary key. Before this patch the pushed filter still remained marked as active and the engine tried to apply the filter. This was incorrect and in InnoDB this attempt to use the filter led to an assertion failure. This patch fixes the problem by disabling usage of the filter when outer_expr is evaluated to NULL.
-
- 05 Jan, 2022 1 commit
-
-
Monty authored
Federated and Federatex cannot be used with ROR scans Federated::position() and Federatex::position() is storing in 'ref' a pointer into a local result set buffer. This means that one cannot compare 'ref' from different handler instances to see if they point to the same physical record. This bug caused federated.federatedx to return wrong results when the optimizer tried to use index_merge to resolve some queries. Fixed by introducing table flag HA_NON_COMPARABLE_ROWID and using this with the above handlers. Todo: - Fix multi_delete(), multi_update and read_records() to use primary key instead of 'ref' if case HA_NON_COMPARABLE_ROWID is set. The current code only works if we have only one range (like table scan) for the tables that will be updated in the second pass. - Enable DBUG_ASSERT() in ha_federated::cmp_ref() and ha_federatedx::cmp_ref().
-
- 28 Dec, 2021 1 commit
-
-
Monty authored
Fixes main.sp-no-valgrind for valgrind builds not done with BUILD scripts
-
- 27 Dec, 2021 1 commit
-
-
Nayuta Yanagisawa authored
MDEV-27184 Assertion `(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed, Assertion `str.alloced_length() >= str.length() + data_len' failed Spider crashes on a query that inserts some rows including float. This is because Spider allocates a string of insufficient length.
-
- 25 Dec, 2021 1 commit
-
-
Julius Goryavsky authored
-
- 24 Dec, 2021 1 commit
-
-
Julius Goryavsky authored
-
- 23 Dec, 2021 2 commits
-
-
Julius Goryavsky authored
This is the first part of the fixes for MDEV-24097. This commit contains the fixes for instability when testing Galera and when restarting nodes quickly: 1) Protection against a "stuck" old SST process during the execution of the new SST (after restarting the node) is now implemented for mariabackup / xtrabackup, which should help to avoid almost all conflicts due to the use of the same ports - both during testing with mtr, so and when restarting nodes quickly in a production environment. 2) Added more protection to scripts against unexpected return of the rc != 0 (in the commands for deleting temporary files, etc). 3) Added protection against unexpected crashes during binlog transfer (in SST scripts for rsync). 4) Spaces and some special characters in binlog filenames shouldn't be a problem now (at the script level). 5) Daemon process termination tracking has been made more robust against crashes due to unexpected termination of the previous SST process while new scripts are running. 6) Reading ssl encryption parameters has been moved from specific SST scripts to a common wsrep_sst_common.sh script, which allows unified error handling, unified diagnostics and simplifies script revisions in the future. 7) Improved diagnostics of errors related to the use of openssl. 8) Corrections have been made for xtrabackup-v2 (both in tests and in the script code) that restore the work of xtrabackup with updated versions of innodb. 9) Fixed some tests for galera_3nodes, although the complete solution for the problem of starting three nodes at the same time on fast machines will be done in a separate commit. No additional tests are required as this commit fixes problems with existing tests.
-
Julius Goryavsky authored
-