- 06 Apr, 2022 2 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
- 05 Apr, 2022 4 commits
-
-
Dmitry Shulga authored
Some SQL statements that involves subqueries or stored routines could fail since execution of subqueries or stored routines is not supported for theses statements. Unfortunately, parsing error could result in abnormal termination by firing the following assert DBUG_ASSERT(m_thd == NULL); in a destructor of the class sp_head. The reason of the assert firing is that the method sp_head::restore_thd_mem_root() is not called on semantic action code to clean up resources allocated during parsing. This happens since the macros YYABORT is called instead of MYSQL_YYABORT by semantic action code for some grammar rules. So, to fix the bug YYABORT was just replaced with MYSQL_YYABORT.
-
Sergei Golubchik authored
after moving fields in optimize_schema_tables_memory_usage() store default values into their new, moved, locations.
-
Sergei Golubchik authored
This reverts commit 0812d0de. But keeps the test case.
-
Sergei Golubchik authored
followup for 58cd2a8d
-
- 04 Apr, 2022 5 commits
-
-
Monty authored
The reason for this fix was that when I tried to run mysql_upgrade at home to update an old 10.5 installation, mysql_upgrade failed with warnings about mariadb.sys user not existing. If the server was started with --skip-grants, there would be no warnings from mysql_upgrade, but in some cases running mysql_upgrade again could produce new warnings. The reason for the warnings was that any access of the mysql.user view will produce a warning if the mariadb.sys user does not exists. Fixed with the following changes: - Disable warnings about mariadb.sys user not existing - Don't overwrite old mariadb.sys entries in tables_priv and global_priv - Ensure that tables_priv has an entry for mariadb.sys if the user exists. This fixes an issue that tables_priv would not be updated if there was a failure directly after global_priv was updated.
-
Monty authored
Server crashed during shutdown with: "corrupted double-linked list" when running mysql_upgrade multiple times against the server. Reason was that db_repostitory could be freed twice.
-
Julius Goryavsky authored
This commit contains a fix to use modern syntax for selecting character classes in the tr utility options. Also one of the tests for SST via rsync (galera_sst_rysnc2) is made more reliable (to avoid rare failures during automatic testing).
-
Alexander Barkov authored
The "const" qualifier was obviously forgotten. This change will also simpily fixing of MDEV-27744.
-
Alexander Barkov authored
Fixing a typo in the fix for MDEV-19804, wrong return value in a bool function: < return NULL; > return true; The problem was found because it did not compile on some platforms. Strangley, it did not have visible problems on other platforms, which did not fail to compile, although "return NULL" should compile to "return false" rather than "return true".
-
- 03 Apr, 2022 1 commit
-
-
Daniel Black authored
tv_usec is a (suseconds_t) so we cast to it. Prevents the AIX(gcc-10) warning: include/my_time.h: In function 'void my_timeval_trunc(timeval*, uint)': include/my_time.h:249:65: warning: conversion from 'long int' to 'suseconds_t' {aka 'int'} may change value [-Wconversion] 249 | tv->tv_usec-= my_time_fraction_remainder(tv->tv_usec, decimals); | macOS is: conversion from 'long int' to '__darwin_suseconds_t' {aka 'int'} may change value On Windows suseconds_t isn't defined so we use the existing long return type of my_time_fraction_remainder. Reviewed by Marko Mäkelä Closes: #2079
-
- 02 Apr, 2022 1 commit
-
-
Dmitry Shulga authored
MDEV-28220: Assert failure in sp_head::~sp_head on parsing a syntax incorrect statement CREATE SEQUENCE ... RESTART inside CREATE PROCEDURE/CREATE FUNCTION This bug report is about the same issue as MDEV-28129 and MDEV-21173. The issue is that the macros YYABORT is called instead of MYSQL_YYABORT on parse error. In result the method LEX::cleanup_lex_after_parse_error is not called to clean up data structures created on parsing of the statement.
-
- 01 Apr, 2022 2 commits
-
-
Anel Husakovic authored
- Before the patch UPDATE error message for VIR tables was different from TRUNCATE,UPDATE,DELETE Reviewed by: <Olivier Bertrand>, vicentiu@mariadb.org
-
Jan Lindström authored
We should make sure that wsrep exists before calling wsrep->post_rollback
-
- 31 Mar, 2022 2 commits
-
-
Brandon Nesterenko authored
rpl.rpl_semi_sync_slave_compressed_protocol.test was manually re-enabled only in 10.3 but left disabled in 10.4+. The fix went into 10.3+, but the test was left disabled in later versions. This commit re-enables the test in 10.4+.
-
Monty authored
This was noticed as part of verifying MDEV-28186 "crash on startup after crash while regular use" but is probably not related to the users issue. Still good to have it fixed
-
- 30 Mar, 2022 9 commits
-
-
Vlad Lesin authored
MDEV-27343 Useless warning "InnoDB: Allocated tablespace ID <id> for <tablename>, old maximum was 0" during backup stage mariabackup does not load dictionary during backup, but it loads tablespaces, that is why fil_system.max_assigned_id is not set with dict_check_tablespaces_and_store_max_id(). There is no sense to issue the warning during backup.
-
Marko Mäkelä authored
-
Rucha Deodhar authored
Task 6: We can find the .frm type of file. If it is sequence then is_sequence passed to dd_frm_type() will be true. Since there is already a check to give error message if we trigger is on temporary table or view, an additional condition is added to check if .frm is sequence (is_sequence==true) and error message is changed to show "Trigger's '%-.192s' is view, temporary table or sequence" instead of "Trigger's '%-.192s' is view or temporary table".
-
Rucha Deodhar authored
Task 4 and 5: Already fixed when I started working on bug. Task 4 correctly gives syntax error ('(' and ')' are not part of create sequence syntax). Task 5 also gives correct error because s1 is table not sequence. Fails with ER_NOT_SEQUENCE2
-
Rucha Deodhar authored
Task 3: Added an additional condition for SEQUENCE option to check if cache < 0.
-
Rucha Deodhar authored
Task 2: changed the error message and made it more reusable.
-
Rucha Deodhar authored
Task 1: If table is added to list using option TL_OPTION_SEQUENCE (done when we have sequence functions) then then we are dealing with sequence instead of table. So global table list will have sequence set to true. This is used to check and give correct error message about unknown sequence instead of table doesn't exist.
-
Dmitry Shulga authored
MDEV-19631: Assertion `0' failed in st_select_lex_unit::optimize or different plan upon 2nd execution of PS with EXPLAIN Second execution of a prepared statement for a query containing a constant subquery with union that can be optimized away, could result in server abnormal termination for debug build or incorrect result set output for release build. For example, the following test case crashes a server built with debug on second run of the statement EXECUTE stmt CREATE TABLE t1 (a INT); PREPARE stmt FROM 'EXPLAIN SELECT * FROM t1 HAVING 6 IN ( SELECT 6 UNION SELECT 5 )'; EXECUTE stmt; EXECUTE stmt; The reason for incorrect result set output or abnormal server termination is careless working with the data member fake_select_lex->options inside the function mysql_explain_union(). Once the flag SELECT_DESCRIBE is set in the data member fake_select_lex->option before calling the methods SELECT_LEX_UNIT::prepare/SELECT_LEX_UNIT::execute the original value of the option is no longer restored. As a consequence, next time the prepared statement is re-executed we have the fake_select_lex with the flag SELECT_DESCRIBE set in the data member fake_select_lex->option, that is incorrect. In result, the method Item_subselect::assigned() is not invoked during evaluation of a constant condition (constant subquery with union) that being performed on OPTIMIZE phase of query handling. This leads to the fact that records in the temporary table are not deleted before calling table->file->ha_enable_indexes(HA_KEY_SWITCH_ALL) in the method st_select_lex_unit::optimize(). In result table->file->ha_enable_indexes(HA_KEY_SWITCH_ALL) returns error and DBUG_ASSERT(0) is fired. Stack trace to the line where the error generated on re-enabling indexes for next subselect iteration is below: st_select_lex_unit::optimize (at sql_union.cc:954) handler::ha_enable_indexes (at handler.cc:4338) ha_heap::enable_indexes (at ha_heap.cc:519) heap_enable_indexes (at hp_clear.c:164) The code snippet to clarify raising the error is also listed: int heap_enable_indexes(HP_INFO *info) { int error= 0; HP_SHARE *share= info->s; if (share->data_length || share->index_length) error= HA_ERR_CRASHED; <<== set error the value HA_ERR_CRASHED since share->data_length != 0 To fix this issue the original value of unit->fake_select_lex->options has to be saved before setting the flag SELECT_DESCRIBE and restored on return from invocation of SELECT_LEX_UNIT::prepare/SELECT_LEX_UNIT::execute
-
Daniele Sciascia authored
Fix a possible crash on my_free() due to the use of strdup() versus my_strdup(), and a memory leak. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
-
- 29 Mar, 2022 6 commits
-
-
Vlad Lesin authored
As main() invokes parse_page() when -S or -D are set, it can be a case when parse_page() is invoked when -D filename is not set, that is why any attempt to write to page dump file must be done only if the file name is set with -D. The bug is caused by 2ef7a5a1 (MDEV-13443).
-
Aleksey Midenkov authored
records_are_comparable() requires this condition: bitmap_is_subset(table->write_set, table->read_set) On first iteration vers_update_fields() changes write_set and read_set. On second iteration the above condition fails. Added missing read bit for ROW_START. Also reorganized bitmap_set_bit() so it is called only when needed.
-
Aleksey Midenkov authored
Throw ER_NOT_FORM_FILE if this is wrong FRM data (warning with ER_VERS_FIELD_WRONG_TYPE is still printed for deeper knowledge of what was happened). Keep ER_VERS_FIELD_WRONG_TYPE for creating partitioned table with trx-versioning. Tested by MDEV-15951 in trx_id.test
-
Jan Lindström authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
- 28 Mar, 2022 4 commits
-
-
mkaruza authored
For GTID consistenty, GTID events was artificialy added before replication happned. This event should not contain CHECKSUM calculated. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
-
Vladislav Vaintroub authored
On affected machine, the error happens sporadically in innodb.instant_alter_limit. Procmon shows SetRenameInformationFile failing with ERROR_ACCESS_DENIED. In this case, the destination file was previously opened rsp oplocked by Windows defender antivirus. The fix is to retry MoveFileEx on ERROR_ACCESS_DENIED.
-
Marko Mäkelä authored
In commit 437da7bc (MDEV-19534), the default value of the global variable srv_checksum_algorithm in innochecksum was changed from SRV_CHECKSUM_ALGORITHM_INNODB to implied 0 (innodb_checksum_algorithm=crc32). As a result, the function buf_page_is_corrupted() would by default invoke buf_calc_page_crc32() in innochecksum, and crc32_inited would hold. This would cause "innochecksum" to fail on a particular page. The actual problem is older, introduced in 2011 in mysql/mysql-server@17e497bdb793bc6b8360aa1c626dcd8bb5cfad1b (MySQL 5.6.3). It should affect the validation of pages of old data files that were written with innodb_checksum_algorithm=innodb. When using innodb_checksum_algorithm=crc32 (the default setting since MariaDB Server 10.2), some valid pages would be rejected only because exactly one of the two checksum fields accidentally matches the innodb_checksum_algorithm=crc32 value. buf_page_is_corrupted(): Simplify the logic of non-strict checksum validation, by always invoking buf_calc_page_crc32(). Remove a bogus condition that if only one of the checksum fields contains the value returned by buf_calc_page_crc32(), the page is corrupted.
-
hongdongjian authored
On the aarch64 platform, MySQL 5.7.33 cannot install this version of the audit plugin, but X86_64 can run well。
-
- 25 Mar, 2022 4 commits
-
-
Igor Babaev authored
This bug affected queries with IN predicates that contain parameter markers in the value list. Such queries are executed via prepared statements. The problem appeared only if the number of elements in the value list was greater than the set value of the system variable in_predicate_conversion_threshold. The patch unconditionally prohibits conversion of an IN predicate to the equivalent IN predicand if the value list of the IN predicate contains parameters markers. Approved by Oleksandr Byelkin <sanja@mariadb.com>
-
Rucha Deodhar authored
from mysql.plugin table Fix: Since mysql_upgrade runs commands from mysql_system_tables.fix, added sql commands to check for semisync plugins in INFORMATION_SCHEMA.PLUGINS and if they aren't there then delete them from mysql.plugin.
-
Alexander Barkov authored
Adding support for the fully qualified package procedure calls: BEGIN CALL db.pkg.proc(args); -- SQL/PSM call style db.pkg.proc(args); -- PL/SQL call style END;
-
Sachin Kumar authored
Problem: In regular replication, when master binlogged using statement format slave might not have written an event to its binary log when the Query event aimed at a temporary table. Specifically this was observed with LOAD DATA INFILE. This effect was possible because unlike master slave holds temporary tables in its pool and the master side check of existence of a temporary table at the format bin-logging decision did not apply. Solution: replace THD::has_thd_temporary_tables() with THD::has_temporary_tables which allows to identify temporary table presence on either side. -- Reviewed by Andrei Elkin.
-