summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Json_writer_object add integersbb-10.4-MDEV-27036Sergei Krivonos2021-11-193-16/+16
| | |
* | | MDEV-27036: allow Json_writer_[array|object] from Json_writerSergei Krivonos2021-11-191-10/+31
| | |
* | | Merge 10.3 into 10.4Marko Mäkelä2021-11-1712-105/+244
|\ \ \ | |/ /
| * | Merge 10.2 into 10.3Marko Mäkelä2021-11-1712-77/+223
| |\ \ | | |/
| | * MDEV-26747 improve corruption check for encrypted tables on ALTER IMPORTbb-10.2-MDEV-26747-corruption-checkEugene Kosov2021-11-177-45/+90
| | | | | | | | | | | | | | | | | | fil_space_decrypt(): change signature to return status via dberr_t only. Also replace impossible condition with an assertion and prove it via test cases.
| | * MDEV-26825 Bogus error for query with two usage of CTE referring another CTEIgor Babaev2021-11-163-23/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bug affected queries with two or more references to a CTE referring another CTE if the definition of the latter contained an invocation of a stored function that used a base table. The bug could lead to a bogus error message or to an assertion failure. For any non-first reference to CTE cte1 With_element::clone_parsed_spec() is called that parses the specification of cte1 to construct the unit structure for this usage of cte1. If cte1 refers to another CTE cte2 outside of the specification of cte1 then With_element::clone_parsed_spec() has to be called for cte2 as well. This call is made by the function LEX::resolve_references_to_cte() within the invocation of the function With_element::clone_parsed_spec() for cte1. When the specification of a CTE is parsed all table references encountered in it must be added to the global list of table references for the query. As the specification for the non-first usage of a CTE is parsed at a recursive call of the parser the function With_element::clone_parsed_spec() invoked at this recursive call should takes care of appending the list of table references encountered in the specification of this CTE cte1 to the list of table references created for the query. And it should do it after the call of LEX::resolve_references_to_cte() that resolves references to CTEs defined outside of the specification of cte1 because this call may invoke the parser again for specifications of other CTEs and the table references from their specifications must ultimately appear in the global list of table references of the query. The code of With_element::clone_parsed_spec() misplaced the call of LEX::resolve_references_to_cte(). As a result LEX::query_tables_last used for the query that was supposed to point to the field 'next_global' of the last element in the global list of table references actually pointed to 'next_global' of the previous element. The above inconsistency certainly caused serious problems when table references used in the stored functions invoked in cloned specifications of CTEs were added to the global list of table references.
| | * MDEV-27056 Windows upgrade_wizard - CloseHandle() on invalid (already ↵Vladislav Vaintroub2021-11-161-1/+1
| | | | | | | | | | | | closed) pipe handle
| | * Windows build - fix signtool search path to take modern SDKs into accountVladislav Vaintroub2021-11-161-8/+12
| | |
* | | MDEV-23805 fixup: Adjsut the MDEV-16131 and MDEV-24730 testsMarko Mäkelä2021-11-172-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MDEV-23805 simplified the treatment of empty tables during ALTER TABLE, which could prevent the scenarios that were previously reported and fixed as MDEV-16131 and MDEV-24730. With the MDEV-23805 fix, the statement SET DEBUG_SYNC = 'now WAIT_FOR copied'; could occasionally time out, depending on timing. Apparently, there was a race condition where purge could resume (and empty the table) before ALTER TABLE got the chance to execute. We must prevent the purge of history from running before ALTER TABLE has started executing.
* | | MDEV-23805 Make Online DDL to Instant DDL when table is emptybb-10.4-MDEV-23805Thirunarayanan Balathandayuthapani2021-11-1223-13/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - In ha_innobase::prepare_inplace_alter_table(), InnoDB should check whether the table is empty. If the table is empty then server should avoid downgrading the MDL after prepare phase. It is more like instant alter, does change only in dicationary and metadata. - Changed few debug test case to make non-empty DDL table
* | | Merge branch '10.3' into 10.4Vladislav Vaintroub2021-11-123-5/+13
|\ \ \ | |/ /
| * | Merge branch '10.2' into 10.3Vladislav Vaintroub2021-11-123-5/+13
| |\ \ | | |/
| | * MDEV-27030 vcol.vcol_keys_myisam fails on Windows x64, with Visual Studio 2022Vladislav Vaintroub2021-11-111-0/+8
| | | | | | | | | | | | | | | | | | | | | Upon investigation, decided this to be a compiler bug (happens with new compiler, on code that did not change for the last 15 years) Fixed by de-optimizing single function remove_key(), using MSVC pragma
| | * MDEV-26991: CURRENT_TEST: main.mysql_binary_zero_insert 'grep' is not ↵bb-10.2-MDEV-26991Brandon Nesterenko2021-11-112-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | recognized as an internal or external command, operable program or batch file. Removed grep from mysqldump command stream and instead, extend the search_file pattern to search for rows containing binary zeros instead of any occurance of '00' in the input
* | | MDEV-23766: fix by assert (Windows)Sergei Krivonos2021-11-102-14/+13
| | |
* | | MDEV-23766: Re-add Json_writer unit test.Sergei Petrunia2021-11-092-2/+4
| | |
* | | In case WITH_WSREP is enabled, build wsrep as pluginVladislav Vaintroub2021-11-093-13/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | If it is not enabled, build wsrep as static "stub" library from wsrep_dummy.cc ´ Allow static plugins to export symbols (on Unix) wsrep_info relies on wsrep defined symbols (e.g LOCK_wsrep_config_state) exported from mysqld
* | | improve build, allow sql library to be built in parallel with builtinsVladislav Vaintroub2021-11-094-8/+49
| | |
* | | Add new option NOT_EMBEDDED, for pluginsVladislav Vaintroub2021-11-093-8/+20
| | | | | | | | | | | | Means, plugin will not be available in embedded, even if compiled-in
* | | Revert "improve build, allow sql library to be built in parallel with builtins"Sergei Krivonos2021-11-094-49/+8
| | | | | | | | | | | | This reverts commit 1a3570dec35733e725cc6000a06ec666facf4235.
* | | Revert "In case WITH_WSREP is enabled, build wsrep as plugin"Sergei Krivonos2021-11-093-8/+13
| | | | | | | | | | | | This reverts commit e45f7f485a4c8133962a4082636412745ed07093.
* | | MDEV-23766: buildfix: postpone new unittest until its dependency resolutionSergei Krivonos2021-11-091-4/+0
| | |
* | | MDEV-23766: fix by my_json_writer testSergei Krivonos2021-11-093-21/+19
| | |
* | | MDEV-23766: Make Json_writer assert when one tries to author invalid JSONSergei Petrunia2021-11-094-8/+163
| | | | | | | | | | | | - Add unit test.
* | | MDEV-23766: Make Json_writer assert when one tries to author invalid JSONSergei Petrunia2021-11-092-27/+17
| | | | | | | | | | | | | | | Code cleanup: Remove Json_writer::is_on_fmt_helper_call. We already maintain this state in fmt_helper.
* | | In case WITH_WSREP is enabled, build wsrep as pluginVladislav Vaintroub2021-11-093-13/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | If it is not enabled, build wsrep as static "stub" library from wsrep_dummy.cc ´ Allow static plugins to export symbols (on Unix) wsrep_info relies on wsrep defined symbols (e.g LOCK_wsrep_config_state) exported from mysqld
* | | improve build, allow sql library to be built in parallel with builtinsVladislav Vaintroub2021-11-094-8/+49
| | |
* | | MDEV-23766: add Json_writer consistency asserts to check array/object sequenceSergei Krivonos2021-11-092-42/+116
| | |
* | | MDEV-23766: Fix get_best_disjunct_quick by assert:Sergei Krivonos2021-11-091-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in test main.range_vs_index_merge one path requires named JSON object: assert.c:0(.annobin_assert.c_end)[0x7fe9d2270a76] sql/my_json_writer.cc:43(Json_writer::on_start_object())[0x555e284f048a] sql/my_json_writer.cc:59(Json_writer::start_object())[0x555e284ee6e8] sql/my_json_writer.h:377(Json_writer_object::Json_writer_object(THD*))[0x555e281dce11] sql/opt_range.cc:5137(get_best_disjunct_quick(PARAM*, SEL_IMERGE*, double))[0x555e287c576b] sql/opt_range.cc:5492(merge_same_index_scans(PARAM*, SEL_IMERGE*, TRP_INDEX_MERGE*, double))[0x555e287c6cf6] sql/opt_range.cc:5287(get_best_disjunct_quick(PARAM*, SEL_IMERGE*, double))[0x555e287c607a] sql/opt_range.cc:3000(SQL_SELECT::test_quick_select another one requires unnamed JSON: mariadbd: /home/name/server/sql/my_json_writer.cc:379: bool Single_line_formatting_helper::on_add_member(const char*, size_t): Assertion `state== INACTIVE || state == assert.c:0(.annobin_assert.c_end)[0x7f33d8df8a76] sql/my_json_writer.cc:380(Single_line_formatting_helper::on_add_member(char const*, unsigned long))[0x558362f6a717] sql/my_json_writer.cc:150(Json_writer::add_member(char const*, unsigned long))[0x558362f69a91] sql/my_json_writer.cc:146(Json_writer::add_member(char const*))[0x558362f69a5f] sql/my_json_writer.h:383(Json_writer_object::Json_writer_object(THD*, char const*))[0x558362ceccaa] sql/opt_range.cc:5139(get_best_disjunct_quick(PARAM*, SEL_IMERGE*, double))[0x5583632407d0] sql/opt_range.cc:3000(SQL_SELECT::test_quick_select
* | | MDEV-23766: Fix fix_semijoin_strategies_for_picked_join_order by assertSergei Krivonos2021-11-091-3/+3
| | |
* | | Merge 10.3 into 10.4Marko Mäkelä2021-11-0946-65/+1534
|\ \ \ | |/ /
| * | Merge 10.2 into 10.3Marko Mäkelä2021-11-0929-35/+1362
| |\ \ | | |/
| | * Remove a warning for clang 11 or earlierMarko Mäkelä2021-11-092-2/+2
| | | | | | | | | | | | This fixes up commit d22c8cae00f7a7517c9b8228efbb543037c23c97
| | * Remove restarts from encrypt_and_grep testst-10.2-mergeMarko Mäkelä2021-11-092-10/+12
| | |
| | * Merge mariadb-10.2.41 into 10.2Marko Mäkelä2021-11-0923-277/+477
| | |\
| | * | MDEV-26561 mariabackup release locksDaniel Black2021-11-091-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous threads locked need to be released too. This occurs if the initialization of any of the non-first mutex/conditition variables errors occurs.
| | * | MDEV-26561 Fix a bug due to unreleased lockryancaicse2021-11-091-0/+1
| | | | | | | | | | | | | | | | Fix a bug of unreleased lock ctrl_mutex in the method create_worker_threads
| | * | bump the VERSIONbb-10.2-bumpversionDaniel Bartholomew2021-11-081-1/+1
| | | |
| | * | MDEV-22522 RPM packages have meaningless summary/descriptionAlexey Bychko2021-11-081-6/+67
| | | | | | | | | | | | | | | | added summary/description per package.
| | * | MDEV-25610 Assertion `escape != -1' failed in Item_func_like::val_intbb-10.2-bar-MDEV-25610Alexander Barkov2021-11-086-2/+1123
| | | |
| | * | appveyor - do not use buggy cygwin bison.Vladislav Vaintroub2021-11-041-1/+7
| | | |
| | * | Revert "MDEV-19129: Xcode compatibility update: deprecated vfork -> fork"Sergei Krivonos2021-11-031-1/+1
| | | | | | | | | | | | | | | | This reverts commit 5d6f3cebca77ee650e6cde3bd738d1fac0a8110c.
| | * | MDEV-22284 Aria table key read crash because wrong index usedbb-10.2-midenok2Aleksey Midenkov2021-11-023-1/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When restoring lastinx last_key.keyinfo must be updated as well. The good example is in _ma_check_index(). The point of failure is extra(HA_EXTRA_NO_KEYREAD) in ha_maria::get_auto_increment(): 1. extra(HA_EXTRA_KEYREAD) saves lastinx; 2. maria_rkey() changes index, so the lastinx and last_key.keyinfo; 3. extra(HA_EXTRA_NO_KEYREAD) restores lastinx but not last_key.keyinfo. So we have discrepancy between lastinx and last_key.keyinfo after 3.
| | * | MDEV-24335 Unexpected question mark in the end of a TINYTEXT columnAlexander Barkov2021-11-023-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | my_copy_fix_mb() passed MIN(src_length,dst_length) to my_append_fix_badly_formed_tail(). It could break a multi-byte character in the middle, which put the question mark to the destination. Fixing the code to pass the true src_length to my_append_fix_badly_formed_tail().
| | * | MDEV-26949 --debug-gdb installs redundant signal handlersMarko Mäkelä2021-11-012-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a server startup option --gdb a.k.a. --debug-gdb that requests signals to be set for more convenient debugging. Most notably, SIGINT (ctrl-c) will not be ignored, and you will be able to interrupt the execution of the server while GDB is attached to it. When we are debugging, the signal handlers that would normally display a terse stack trace are useless. When we are debugging with rr, the signal handlers may interfere with a SIGKILL that could be sent to the process by the environment, and ruin the rr replay trace, due to a Linux kernel bug https://lkml.org/lkml/2021/10/31/311 To be able to diagnose bugs in kill+restart tests, we may really need both a trace before the SIGKILL and a trace of the failure after a subsequent server startup. So, we had better avoid hitting the problem by simply not installing those signal handlers.
| | * | MDEV-19129: Xcode compatibility update: #include <editline/readline.h> pathSergei Krivonos2021-10-311-1/+5
| | | |
| | * | MDEV-19129: Xcode compatibility update: deprecated vfork -> forkSergei Krivonos2021-10-311-1/+1
| | | |
| | * | MDEV-24901 SIGSEGV in fts_get_table_name, SIGSEGV in ib_vector_size, SIGSEGV ↵bb-10.2-bar-MDEV-24901Alexander Barkov2021-10-295-4/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in row_merge_fts_doc_tokenize, stack smashing strmake() puts one extra 0x00 byte at the end of the string. The code in my_strnxfrm_tis620[_nopad] did not take this into account, so in the reported scenario the 0x00 byte was put outside of a stack variable, which made ASAN crash. This problem is already fixed in in MySQL: commit 19bd66fe43c41f0bde5f36bc6b455a46693069fb Author: bin.x.su@oracle.com <> Date: Fri Apr 4 11:35:27 2014 +0800 But the fix does not seem to be correct, as it breaks when finds a zero byte in the source string. Using memcpy() instead of strmake(). - Unlike strmake(), memcpy() it does not write beyond the destination size passed. - Unlike the MySQL fix, memcpy() does not break on the first 0x00 byte found in the source string.
| | * | MDEV-26833 Missed statement rollback in case transaction drops or create ↵bb-10.2-andreiAndrei Elkin2021-10-289-51/+1211
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | temporary table When transaction creates or drops temporary tables and afterward its statement faces an error even the transactional table statement's cached ROW format events get involved into binlog and are visible after the transaction's commit. Fixed with proper analysis of whether the errored-out statement needs to be rolled back in binlog. For instance a fact of already cached CREATE or DROP for temporary tables by previous statements alone does not cause to retain the being errored-out statement events in the cache. Conversely, if the statement creates or drops a temporary table itself it can't be rolled back - this rule remains.
| | * | rpl_get_master_version_and_clock and rpl_row_big_table_id tests are slow, so ↵Alice Sherepa2021-10-282-0/+2
| | | | | | | | | | | | | | | | let's not run them under valgrind