summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-27149: Add rocksdb_ignore_datadic_errorsbb-10.2-psergeySergei Petrunia2022-01-216-4/+68
| | | | | | | | | | Add a --rocksdb_ignore_datadic_errors plugin option for MyRocks. The default is 0, and this means MyRocks will call abort() if it detects a DDL mismatch. Setting rocksdb_ignore_datadic_errors=1 makes MyRocks to try to ignore the errors and allow to start the server for repairs.
* Avoid a crash on MyRocks data inconsistency.Sergei Petrunia2022-01-201-0/+11
| | | | | | | | | In ha_rocksdb::open(), check if the number of indexes seen from the SQL layer matches the number of indexes in the internal MyRocks data dictionary. Produce an error if there is a mismatch. (If we don't produce this error, we are likely to crash as soon as we attempt to use an index)
* Improve --help and remove not-free warnings for mysql_tzinfo_to_sqlMonty2022-01-201-9/+29
|
* Fixed compiler error in auth_pam pluginMonty2022-01-201-2/+6
| | | | Code copied from 10.6
* MDEV-27068 running mariadb-upgrade in parallel make it hangs foreverMonty2022-01-209-101/+372
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MDEV-27107 prevent two mariadb-upgrade running in parallel MDEV-27279 mariadb_upgrade add --check-if-upgrade-is-needed / restrict tests to major version Code is based of pull request from Daniel Black, but with a several extensions. - mysql_upgrade now locks the mysql_upgrade file with my_lock() (Advisory record locking). This ensures that two mysql_upgrades cannot be run in parallel. - Added --check-if-upgrade-is-needed to mysql_upgrade. This will return 0 if one has to run mysql_upgrade. Other changes: - mysql_upgrade will now immediately exit if the major version and minor version (two first numbers in the version string) is same as last run. Before this change mysql_upgrade was run if the version string was different from last run. - Better messages when there is no need to run mysql_upgrade. - mysql_upgrade --verbose now prints out a lot more information about the version checking. - mysql_upgrade --debug now uses default debug arguments if there is no option to --debug - "MySQL" is renamed to MariaDB in the messages - mysql_upgrade version increased to 2.0 Notes Verifying "prevent two mariadb-upgrade running in parallel" was done in a debugger as it would be a bit complex to do that in mtr. Reviewer: Danial Black <daniel@mariadb.org>
* MDEV-24827: Follow-up patch to fix the test main.mysql_client_test_nonblockbb-10.2-MDEV-24827-1Dmitry Shulga2022-01-201-1/+1
|
* MDEV-27417 InnoDB spatial index updates change buffer bitmap pageThirunarayanan Balathandayuthapani2022-01-203-9/+15
| | | | | | - InnoDB change buffer doesn't support spatial index. Spatial index should avoid change the buffer bitmap page when the page split happens.
* MDEV-24827: Follow-up patch to fix compilation warningDmitry Shulga2022-01-202-4/+9
| | | | | Mixed declarations and code is not allowed for C90 so fix it to avoid compilation break on some platforms.
* MDEV-27544 database() function should return 64 charactersDaniel Black2022-01-203-2/+40
| | | | | | | | | | | | | | | | | | | Database names are 64 utf8 characters per the system tables that refer to them. The current database() function is returning 34 characters. The result of limiting this function results to max length of 34 became apparent when used in a UNION ALL where the results are truncated to 34 characters. For (uninvestigated) reasons, SELECT DATABASE() on its own would always return the right number of characters. Thanks Alexander Barkov for the review. Thanks dave for noticing the bug in the stackexchange post https://dba.stackexchange.com/questions/306183/why-is-my-database-name-truncated
* MDEV-24827: MariaDB 10.5.5 crash (sig 11) during a SELECTDmitry Shulga2022-01-196-2/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Running a query using cursor could lead to a server crash on building a temporary table used for handling the query. For example, the following cursor DECLARE cur1 CURSOR FOR SELECT t2.c1 AS c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE EXISTS (SELECT 1 FROM t1 WHERE c2 = -1) ORDER BY c1; declared and executed inside a stored routine could result in server crash on creating a temporary table used for handling the ORDER BY clause. Crash occurred on attempt to create the temporary table's fields based on fields whose data located in a memory root that already freed. It happens inside the function return_zero_rows() where the method Select_materialize::send_result_set_metadata() is invoked for cursor case. This method calls the st_select_lex_unit::get_column_types() in order to get a list of items with types of columns for the temporary table being created. The method st_select_lex_unit::get_column_types() returns first_select()->join->fields in case it is invoked for a cursor. Unfortunately, this memory has been already deallocated bit earlier by calling join->join_free(); inside the function return_zero_rows(). In case the query listed in the example is run in conventional way (without using cursor) the method st_select_lex_unit::get_column_types() returns first_select()->item_list that is not touched by invocation of the method join->join_free() so everything is fine for that. So, to fix the issue the resources allocated for the JOIN class should be released after any activities with the JOIN class has been completed, that is as the last statement before returning from the function return_zero_rows(). This patch includes tests both for the case when a cursor is run explicitly from within a stored routine and for the case when a cursor is opened implicitly as prescribed by the STMT_ATTR_CURSOR_TYPE attribute of binary protocol (the case of prepared statement).
* MDEV-18284: JSON casting using JSON_COMPACT doesn't always work with values ↵Anel Husakovic2022-01-193-0/+34
| | | | | | | | from subqueries - Cherry-pick 2fcff310d024cc2201586c568391ba8b039f0bf3 (MDEV-21902) - Closed PR #1145 Reviewed by: holyfoot@mariadb.com
* MDEV-27467: innodb to enforce the minimum innodb_buffer_pool_size in SET GLOBALDaniel Black2022-01-1918-76/+220
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | .. to be the same as startup. In resolving MDEV-27461, BUF_LRU_MIN_LEN (256) is the minimum number of pages for the innodb buffer pool size. Obviously we need more than just flushing pages. Taking the 16k page size and its default minimum, an extra 25% is needed on top of the flushing pages to make a workable buffer pool. The minimum innodb_buffer_pool_chunk_size (1M) restricts the minimum otherwise we'd have a pool made up of different chunk sizes. The resulting minimum innodb buffer pool sizes are: Page Size, Previously minimum (startup), with change. 4k 5M 2M 8k 5M 3M 16k 5M 5M 32k 24M 10M 64k 24M 20M With this patch, SET GLOBAL innodb_buffer_pool_size minimums are enforced. The evident minimum system variable size for innodb_buffer_pool_size is 2M, however this is only setable if using 4k page size. As the order of the page_size and buffer_pool_size aren't fixed, we can't hide this change. Subsequent changes: * innodb_buffer_pool_resize_with_chunks.test - raised of pool resize due to new minimums. Chunk size also needed increase as the test was for pool_size < chunk_size to generate a warning. * Removed srv_buf_pool_min_size and replaced use with MYSQL_SYSVAR_NAME(buffer_pool_size).min_val * Removed srv_buf_pool_def_size and replaced constant defination in MYSQL_SYSVAR_LONGLONG(buffer_pool_size) * Reordered ha_innodb to allow for direct use of MYSQL_SYSVAR_NAME(buffer_pool_size).min_val * Moved buf_pool_size_align into ha_innodb to access to MYSQL_SYSVAR_NAME(buffer_pool_size).min_val * loose-innodb_disable_resize_buffer_pool_debug is needed in the innodb.restart.opt test so that under debug mode, resizing of the innodb buffer pool can occur.
* MDEV-27539 Merge new release of InnoDB 5.7.37 to 10.2Marko Mäkelä2022-01-181-2/+2
| | | | | | There were no InnoDB changes in the MySQL 5.7.37 release that would be relevant to MariaDB Server. We will merely update the reported InnoDB version number.
* MDEV-26129 Bad results with join comparing case insensitive VARCHAR/ENUM/SET ↵bb-10.2-MDEV-26129Alexander Barkov2022-01-184-3/+55
| | | | | | | | | | expression to a _bin ENUM column Range optimizer incorrectly was used for ENUM columns when the operation collation did not match the column collation. Adding a virtual implementation of Field_enum::can_optimize_range() which tests if the column and the operation collation match.
* MDEV-27494 Rename .ic files to .inlVladislav Vaintroub2022-01-17160-152/+152
|
* MDEV-27109 mysql_config mariadb_config lists non existant -lmariadbAlexey Bychko2022-01-142-1/+3
| | | | | added dependency devel->shared and conflict with previous versions update C/C 3.1 with the corresponding C/C part of the fix
* /usr/lib64/pkgconfig is not owned by MariaDB-develSergei Golubchik2022-01-141-0/+1
|
* MDEV-4621 select returns null for information_schema.statistics.collation fieldSergei Golubchik2022-01-143-1/+20
| | | | | information_schema.statistics.collation column needs OPEN_FULL_TABLE, because it checks index_flags() for HA_READ_ORDER capability.
* mtr failed to detect when a combination is forcedSergei Golubchik2022-01-141-2/+2
| | | | | | | | | | | | | mtr detects a forced combination if the command line for a test already includes all options from this combination. options are stored in a perl hash as (key,value) pairs. this breaks if the command line has two options with the same name, like --plugin-load-add=foo --plugin-load-add=bar, and the combination forces plugin foo. In particular, this resulted in warnings when running federated.federatedx_versioning test
* MDEV-8851 innodb.innodb_information_schema fails sporadicallyMarko Mäkelä2022-01-142-14/+16
| | | | | | | | | | | | | | The column INFORMATION_SCHEMA.INNODB_LOCKS.LOCK_DATA would report NULL when the page that contains the locked record does not reside in the buffer pool. Pages may be evicted from the buffer pool due to some background activity, such as the purge of transaction history loading undo log pages to the buffer pool. The regression tests intentionally run with a small buffer pool size setting. To prevent the intermittent test failures, we will filter out the contents of the LOCK_DATA column from the output.
* MDEV-21252 ER_HOST_IS_BLOCKED returns packet sequence 1 instead of 0Vladislav Vaintroub2022-01-111-2/+6
| | | | | | | | | | | Fix regression introduced in MDEV-19893 Some errors must be sent with seqno = 0, e.g those that are detected before server sends its first "welcome" packet (e.g too many connections) This was not taken into account originally in MDEV-19893 fix. We need to check sql_errno, before fixing sequence number, to see if the error we send is really an out-of-bound, e.g a KILL.
* MDEV-25201 : Assertion `thd->wsrep_trx_meta.gtid.seqno == (-1)' failed in ↵bb-10.2-galera-janJan Lindström2022-01-114-0/+24
| | | | | | | int wsrep_to_isolation_begin(THD*, const char*, const char*, const TABLE_LIST*, Alter_info*) Test case does not assert anymore but works incorrectly. We should not replicate PREPARE using TOI.
* Changing wsrep_slave_threads parameter requires that clusterJan Lindström2022-01-112-1/+1
| | | | is connected so moved test here.
* MDEV-25549 : Assertion `*new_engine' failed in bool check_engine(THD*, const ↵Jan Lindström2022-01-111-7/+16
| | | | | | | | | char*, const char*, HA_CREATE_INFO*) In Galera case we call check_engine that could set create_info->db_type to NULL e.g. if TEMPORARY is not supported by storage engine. Thus, we need to restore it after that call because it is needed later on mysql_create_table that will also call check_engine.
* MDEV-25856 : SIGSEGV in ha_myisammrg::append_create_infoJan Lindström2022-01-113-13/+26
| | | | | | For MERGE-tables we need to init children list before calling show_create_table and then detach children before we continue normal mysql_create_like_table execution.
* MDEV-25472 : Server crashes when wsrep_cluster_address set to unkown address ↵Jan Lindström2022-01-111-2/+1
| | | | | | and wsrep_slave_threads to 0 Return failure if we are not connected when slave threads are set
* MDEV-20325: Assertion `outer_context || !*from_field || *from_field == ↵bb-10.2-MDEV-20325Dmitry Shulga2022-01-114-3/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | not_found_field' failed in Item_field::fix_outer_field | `!derived->is_excluded()' failed in TABLE_LIST::set_check_materialized | SIGEGV in st_select_lex::mark_as_dependent (optimized builds) Re-execution of a query containing subquery in the FROM clause results in assert failure in case the query is run as part of a stored routine or as a prepared statement AND derived table merge optimization is off. As an example, the following test case CREATE TABLE t1 (a INT) ; CREATE PROCEDURE sp() SELECT * FROM (SELECT a FROM t1) tb; CALL sp(); SET optimizer_switch='derived_merge=off'; CALL sp(); results in assert failure on the second invocation of the 'sp' stored routine. The reason for assertion failure is that the expression derived->is_excluded() returns the value true where the value false expected. The method is_excluded() returns the value true for a derived table that has been merged to a parent select. Such transformation happens as part of Derived Table Merge Optimization that is performed on first invocation of a stored routine or a prepared statement containing a query with subquery in the FROM clause of the main SELECT. When the same routine or prepared statement is run the second time and Derived Table Merge Optimization is OFF the MariaDB server tries to materialize a derived table specified by the subquery that fails since this subquery has already been merged to the top-most SELECT. This transformation is permanent and can't be reverted. That is the reason why the assert DBUG_ASSERT(!derived->is_excluded()); fails inside the function TABLE_LIST::set_check_materialized(). Similar behaviour can be observed in case a stored routine or prepared statement containing a SELECT statement with subquery in the FROM clause, first is run with the optimizer_switch option set to derived_merge=off and re-run after this option has been switched to derived_merge=on. In this case a derived table for subquery is materialized on the first execution and marked as merged derived table on the second execution that results in error with misleading error message: MariaDB [test]> CALL sp1(); ERROR 1030 (HY000): Got error 1 "Operation not permitted" from storage engine MEMORY To fix the issue, a derived table that has been already optimized shouldn't be re-marked for one more round of optimization. One significant consequence following from suggested change is that the data member TABLE_LIST::derived_type is not updated once the table optimization has been done. This fact should be taken into account when Prepared Statement being handled since once a table listed in a query has been optimized on execution of the statement PREPARE FROM it won't be touched anymore on handling the statement EXECUTE. One side effect caused by this change could be observed for the following test case: CREATE TABLE t1 (s1 INT); CREATE VIEW v1 AS SELECT s1,s2 FROM (SELECT s1 as s2 FROM t1 WHERE s1 <100) x, t1 WHERE t1.s1=x.s2; INSERT INTO v1 (s1) VALUES (-300); PREPARE stmt FROM "INSERT INTO v1 (s1) VALUES (-300)"; EXECUTE stmt; Execution of the above EXECUTE statement results in issuing the error ER_COLUMNACCESS_DENIED_ERROR since table_ref->is_merged_derived() is false and check_column_grant_in_table_ref() called for a temporary table that shouldn't be. To fix this issue the function find_field_in_tables has been modified in such a way that the function check_column_grant_in_table_ref() is not called for a temporary table.
* MDEV-25631 Crash executing query with VIEW, aggregate and subqueryIgor Babaev2022-01-103-0/+43
| | | | | | | | | | This bug could cause a crash of the server for queries with a derived table whose specification contained the set function using a subquery over a view as its only argument. The crash could happen if the specification of the view contained an outer reference. In this case the aggregation select could be determined incorrectly. The crash also could be observed if a CTE is used instead of the view, but only for queries having at least two references to the CTE.
* MDEV-25086 Stored Procedure Crashes ServerIgor Babaev2022-01-103-1/+243
| | | | | | | | | | | The cause of this bug is the same as of the bug MDEV-24454. This bug manifested itself at the second execution of the queries that contained a set function whose only argument was outer reference to a column of a mergeable view or derived table or CTE. The first execution of such query worked fine, but the second execution of the query caused a crash of the server because the aggregation select for the used set function was determined incorrectly at the name resolution phase of the second execution.
* Revert "MDEV-24454 Crash at change_item_tree"Igor Babaev2022-01-108-173/+39
| | | | | | | | | This patch reverts the fixes of the bugs MDEV-24454 and MDEV-25631 from the commit 3690c549c6e72646ba74f6b4c83813ee4ac3aea4. It leaves the changes in plugin/feedback/feedback.cc and corresponding test files introduced in this commit intact. Proper fixes for the bug MDEV-24454 and MDEV-25631 will follow immediately.
* Windows, appveyor - use VS2022st-10.2-wladVladislav Vaintroub2022-01-091-2/+2
|
* Windows : fix broken build with OpenSSLVladislav Vaintroub2022-01-091-2/+2
|
* Windows, appveyor - use Cygwin's bison againVladislav Vaintroub2022-01-091-11/+1
| | | | | The bug that made build stuck in bison call seems to have disappeared with image update
* Windows, CI - workaround hardcoded limits for mtr --parallel=autoVladislav Vaintroub2022-01-081-1/+2
|
* MDEV-14938 make buildbot to include galera into bintarsSergei Golubchik2022-01-072-0/+11
| | | | allow injecting extra files into the bintar
* Windows, CI : run mtr in buildbot_suites.bat with --parallel=autoVladislav Vaintroub2022-01-071-1/+1
|
* MDEV-16091: Seconds_Behind_Master spikes to millions of secondsbb-10.2-MDEV-16091Brandon Nesterenko2022-01-044-0/+137
| | | | | | | | | | | | | | | | | | | Problem: ======== A slave’s relay log format description event is used when calculating Seconds_Behind_Master (SBM). This forces the SBM value to spike when processing these events, as their creation date is set to the timestamp that the IO thread begins. Solution: ======== When the slave generates a format description event, mark the event as a relay log event so it does not update the rli->last_master_timestamp variable. Reviewed By: ============ Andrei Elkin <andrei.elkin@mariadb.com>
* MDEV-26698: Incorrect row number upon INSERT .. SELECT from the samebb-10.2-MDEV-26698Rucha Deodhar2022-01-0310-316/+365
| | | | | | | | | | | table: rows are counted twice Analysis: When the table we are trying to insert into and the SELECT table are same for INSERT ... SELECT, rows from the SELECT table are copied into internal temporary table and then to the INSERT table. We only want to count the rows when we start inserting into the table. Fix: Reset the counter to 1 before starting to copy from internal temporary table to select table and then increment the counter.
* MDEV-27386: cpack rpm libsepol installed detects verison incorrectlybb-10.2-danielblack-MDEV-27386-libsepol-detectionDaniel Black2021-12-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | ... when two packages are installed. (fc35 with i686 and x86_64 packages of libsepol installed). $ rpm -q --qf "%{VERSION}" libsepol 3.33.3 Restricting the version to the current achitecture generates a much more obtainable version dependency. $ rpm -q --qf "%{VERSION}" libsepol.x86_64 3.3 This make dependency resolution easier preventing: $ sudo dnf localinstall MariaDB-server-10.8.0-1.fc35.x86_64.rpm ... Last metadata expiration check: 2:06:49 ago on Thu 30 Dec 2021 14:02:32. Error: Problem 1: conflicting requests - nothing provides libsepol >= 3.33.3 needed by MariaDB-server-10.8.0-1.fc35.x86_64 The CMAKE_SYSTEM_PROCESSOR is used in the generation of architecture filenames so its preduent to just use the same version.
* MDEV-22256 Assertion `length == pack_length()' failed in ↵bb-10.2-bar-MDEV-22256Alexander Barkov2021-12-292-0/+46
| | | | | | | | Field_timestamp_with_dec::sort_string Adding 10.2 specific tests only. No code changes. The problem was earlier fixed by MDEV-21580 and MDEV-22715.
* MDEV-21639 DEFAULT(col) evaluates to a bad value in WHERE clausebb-10.2-bar-MDEV-21639Alexander Barkov2021-12-294-3/+272
| | | | | | | | | The problem happened because Item_default_value did not overload properly the val_xxx_result() family methods. This change backports the patch for: MDEV-24958 Server crashes in my_strtod / Value_source::Converter_strntod::Converter_strntod with DEFAULT(blob) which earlier fixed the problem in 10.3.
* MDEV-25460: Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())'Rucha Deodhar2021-12-286-5/+77
| | | | | | | | | | | | | | failed in Diagnostics_area::set_ok_status in my_ok from mysql_sql_stmt_prepare Analysis: Before PREPARE is executed, binlog_format is STATEMENT. This PREPARE had SET STATEMENT which sets binlog_format to ROW. Now after PREPARE is done we reset the binlog_format (back to STATEMENT). But we have temporary table, it doesn't let changing binlog_format=ROW to binlog_format=STATEMENT and gives error which goes unreported. This unreported error eventually causes assertion failure. Fix: Change return type for LEX::restore_set_statement_var() to bool and make it return error state.
* MDEV-27364 Build from 10.2-10.4 srpm fails on RHEL8 family due to ↵Sergei Golubchik2021-12-271-0/+1
| | | | | | discrepancy in jemalloc requirements pass jemalloc requirement down to srpm build
* MDEV-27262 Unexpected index intersection with full index scan for an indexIgor Babaev2021-12-235-6/+243
| | | | | | | | | | | | | | | | | | | | | | | | | | | If when extracting a range condition for an index from the WHERE condition Range Optimizer sees that the range condition covers the whole index then such condition should be discarded because it cannot be used in any range scan. In some cases Range Optimizer really does it, but there remained some conditions for which it was not done. As a result the optimizer could produce index merge plans with the full index scan for one of the indexes participating in the index merge. This could be observed in one of the test cases from index_merge1.inc where a plan with index_merge_sort_union was produced and in the test case reported for this bug where a plan with index_merge_sort_intersect was produced. In both cases one of two index scans participating in index merge ran over the whole index. The patch slightly changes the original above mentioned test case from index_merge1.inc to be able to produce an intended plan employing index_merge_sort_union. The original query was left to show that index merge is not used for it anymore. It should be noted that for the plan with index_merge_sort_intersect could be chosen for execution only due to a defect in the InnoDB code that returns wrong estimates for the cardinality of big ranges. This bug led to serious problems in 10.4+ where the optimization using Rowid filters is employed (see mdev-26446). Approved by Sergey Petrunia <sergey@mariadb.com>
* MDEV-24097: galera[_3nodes] suite tests in MTR sporadically failsbb-10.2-MDEV-24097-galeraJulius Goryavsky2021-12-2314-285/+292
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* MDEV-23175: my_timer_milliseconds clock_gettime for multiple platfomrsbb-10.2-MDEV-23175-backportDaniel Black2021-12-221-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Small postfix to MDEV-23175 to ensure faster option on FreeBSD and compatibility to Solaris that isn't high resolution. ftime is left as a backup in case an implementation doesn't contain any of these clocks. FreeBSD $ ./unittest/mysys/my_rdtsc-t 1..11 # ----- Routine --------------- # myt.cycles.routine : 5 # myt.nanoseconds.routine : 11 # myt.microseconds.routine : 13 # myt.milliseconds.routine : 11 # myt.ticks.routine : 17 # ----- Frequency ------------- # myt.cycles.frequency : 3610295566 # myt.nanoseconds.frequency : 1000000000 # myt.microseconds.frequency : 1000000 # myt.milliseconds.frequency : 899 # myt.ticks.frequency : 136 # ----- Resolution ------------ # myt.cycles.resolution : 1 # myt.nanoseconds.resolution : 1 # myt.microseconds.resolution : 1 # myt.milliseconds.resolution : 7 # myt.ticks.resolution : 1 # ----- Overhead -------------- # myt.cycles.overhead : 26 # myt.nanoseconds.overhead : 19140 # myt.microseconds.overhead : 19036 # myt.milliseconds.overhead : 578 # myt.ticks.overhead : 21544 ok 1 - my_timer_init() did not crash ok 2 - The cycle timer is strictly increasing ok 3 - The cycle timer is implemented ok 4 - The nanosecond timer is increasing ok 5 - The nanosecond timer is implemented ok 6 - The microsecond timer is increasing ok 7 - The microsecond timer is implemented ok 8 - The millisecond timer is increasing ok 9 - The millisecond timer is implemented ok 10 - The tick timer is increasing ok 11 - The tick timer is implemented
* MDEV-27181 fixup: compatibility with Windows + small correctionsbb-10.2-MDEV-27181-fixJulius Goryavsky2021-12-176-95/+229
| | | | | | | 1) Removed symlinks that are not very well supported in tar under Windows. 2) Added comment + changed code formatting in viosslfactories.c 3) Fixed a small bug in the yassl code. 4) Fixed a typo in the script code.
* MDEV-21866: Assertion `!result' failed in convert_const_to_int upon 2nd ↵bb-10.2-MDEV-21866Dmitry Shulga2021-12-163-1/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | execution of PS Consider the following use case: MariaDB [test]> CREATE TABLE t1 (field1 BIGINT DEFAULT -1); MariaDB [test]> CREATE VIEW v1 AS SELECT DISTINCT field1 FROM t1; Repeated execution of the following query as a Prepared Statement MariaDB [test]> PREPARE stmt FROM 'SELECT * FROM v1 WHERE field1 <=> NULL'; MariaDB [test]> EXECUTE stmt; results in a crash for a server built with DEBUG. MariaDB [test]> EXECUTE stmt; ERROR 2013 (HY000): Lost connection to MySQL server during query Assertion failed: (!result), function convert_const_to_int, file item_cmpfunc.cc, line 476. Abort trap: 6 (core dumped) The crash inside the function convert_const_to_int() happens by the reason that the value -1 is stored in an instance of the class Field_longlong on restoring its original value in the statement result= field->store(orig_field_val, TRUE); that leads to assigning the value 1 to the variable 'result' with subsequent crash in the DBUG_ASSERT statement following it DBUG_ASSERT(!result); The main matter here is why this assertion failure happens on the second execution of the prepared statement and doens't on the first one. On first handling of the statement 'EXECUTE stmt;' a temporary table is created for serving the query involving the view 'v1'. The table is created by the function create_tmp_table() in the following calls trace: (trace #1) JOIN::prepare (at sql_select.cc:725) st_select_lex::handle_derived LEX::handle_list_of_derived TABLE_LIST::handle_derived mysql_handle_single_derived mysql_derived_prepare select_union::create_result_table create_tmp_table Note, that the data member TABLE::status of a TABLE instance returned by the function create_tmp_table() has the value 0. Later the function setup_table_map() is called on the TABLE instance just created for the sake of the temporary table (calls trace #2 is below): JOIN::prepare (at sql_select.cc:737) setup_tables_and_check_access setup_tables setup_table_map where the data member TABLE::status is set to the value STATUS_NO_RECORD. After that when execution of the method JOIN::prepare reaches calling of the function setup_without_group() the following calls trace is invoked JOIN::prepare setup_without_group setup_conds Item_func::fix_fields Item_func_equal::fix_length_and_dec Item_bool_rowready_func2::fix_length_and_dec Item_func::setup_args_and_comparator Item_func::convert_const_compared_to_int_field convert_const_to_int There is the following code snippet in the function convert_const_to_int() at the line item_cmpfunc.cc:448 bool save_field_value= (field_item->const_item() || !(field->table->status & STATUS_NO_RECORD)); Since field->table->status has bits STATUS_NO_RECORD set the variable save_field_value is false and therefore neither the method Field_longlong::val_int() nor the method Field_longlong::store is called on the Field instance that has the numeric value -1. That is the reason why first execution of the Prepared Statement for the query 'SELECT * FROM v1 WHERE field1 <=> NULL' is successful. On second running of the statement 'EXECUTE stmt' a new temporary tables is also created by running the calls trace #1 but the trace #2 is not executed by the reason that data member SELECT_LEX::first_cond_optimization has been set to false on first execution of the prepared statemet (in the method JOIN::optimize_inner()). As a consequence, the data member TABLE::status for a temporary table just created doesn't have the flags STATUS_NO_RECORD set and therefore on re-execution of the prepared statement the methods Field_longlong::val_int() and Field_longlong::store() are called for the field having the value -1 and the DBUG_ASSERT(!result) is fired. To fix the issue the data member TABLE::status has to be assigned the value STATUS_NO_RECORD in every place where the macros empty_record() is called to emptify a record for just instantiated TABLE object created on behalf the new temporary table.
* MDEV-27270: Wrong query plan with Range Checked for Each Record and ORDER BY ↵bb-10.2-mdev2720Sergei Petrunia2021-12-153-0/+53
| | | | | | | | | | ... LIMIT Followup to fix for MDEV-25858: When test_if_skip_sort_order() decides to use an index to satisfy ORDER BY ... LIMIT clause, it should disable "Range Checked for Each Record" optimization. Do this in all cases.
* Disable following tests from galera_3nodes suitebb-10.2-janJan Lindström2021-12-151-0/+8
| | | | | | | | | | | | | * galera_pc_bootstrap * galera_ipv6_mariabackup * galera_ipv6_mariabackup_section * galera_ipv6_rsync * galera_ipv6_rsync_section * galera_ssl_reload * galera_toi_vote * galera_wsrep_schema_init because MTR sporadaically fails: Failed to start mysqld or mysql_shutdown failed