summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-27525 Invalid (non-UTF8) characters found for option 'plugin_dir'preview-10.8-MDEV-26713-Windows-i18-supportVladislav Vaintroub2022-01-183-6/+7
| | | | | | | | | | | | | | Two Problems 1. Upgrade wizard failed to retrieve path to service executable, if it contained non-ASCII. Fixed by setlocale(LC_ALL, "en_US.UTF8"), which was missing in upgrade wizard 2.mysql_upgrade_service only updated (converted to UTF8) the server's sections leaving client's as-is Corrected typo. 3. Fixed assertion in my_getopt, turns out to be too strict.
* MDEV-26713 allow users with non-UTF8 passwords to login after upgrade.preview-10.8-MDEV-26713-windows-i18-supportVladislav Vaintroub2021-12-153-0/+67
| | | | | | | | | | | | | Translate username, password and database from UTF8 into desired charset, if non-auto default-character-set was used, on Windows10 1903 This change is implemented only in the command line client, and mainly to allow users with non-UTF8 passwords to login. The user is supposed to use the same charset that was used during setting password (usually, console CP if used in CLI) Add a test to document the behavior.
* MDEV-26713 set console codepage to what user set in --default-character-setVladislav Vaintroub2021-12-157-23/+121
| | | | | | | | | | | | | | | | | | | | If someone on whatever reasons uses --default-character-set=cp850, this will avoid incorrect display, and inserting incorrect data. Adjusting console codepage sometimes also needs to happen with --default-charset=auto, on older Windows. This is because autodetection is not always exact. For example, console codepage on US editions of Windows is 437. Client autodetects it as cp850, a rather loose approximation, given 46 code point differences. We change the console codepage to cp850, so that there is no discrepancy. That fix is currently Windows-only, and serves people who used combination of chcp to achieve WYSIWYG effect (although, this would mostly likely used with utf8 in the past) Now, --default-character-set would be a replacement for that. Fix fs_character_set() detection of current codepage.
* MDEV-26713 Add test for mysql_install_db creating service, with i18Vladislav Vaintroub2021-12-157-0/+117
|
* MDEV-26713 UTF8 support on Windows , add mysql_install_db testsVladislav Vaintroub2021-12-152-0/+49
| | | | Add mysql_install_db test with some i18n, for data dir and root password
* MDEV-27227 mysqltest, Windows - support background execution in 'exec' commandVladislav Vaintroub2021-12-151-1/+52
| | | | | If last character in command is ampersand, do not use my_popen/my_pclose in "exec", instead do CreateProcess() without a window.
* MDEV-26713 UTF8 support on Windows, convert my.ini from ANSI to UTF8Vladislav Vaintroub2021-12-151-1/+59
| | | | | | | | | | | Handle upgrade - on Windows that is capable of UTF8 codepage, convert entries in my.ini from ANSI to UTF8, during upgrade Reason is that for the server, paths such as datadir, innodb directories, location of SSL certificates must now be utf8. For the client programs , user name, database etc should be in UTF8, too, as UTF-8 is now the default charset.
* MDEV-26713 UTF8 support on Windows, mysql_upgrade_service preparationVladislav Vaintroub2021-12-153-57/+123
| | | | | | | | | | | | | - Tolerate situation, when datadir for service seems invalid/non-existing prior to upgrade. It could be that my.ini contains legacy ANSI characters for the data directory. Those can't be read correctly by mysql_upgrade_service, which uses a different ANSI codepage(UTF8) . - schedule upgrade_config_file at later stage, because once we convert it to UTF-8 (followup patch), this will render config file uselss with the older version of mariadbd.exe - Refactor upgrade_conf_file.cc, prepare for UTF-8 conversion.
* MDEV-26713 Treat codepage 65001 as utf8mb4, not utf8mb3Vladislav Vaintroub2021-12-152-2/+2
| | | | | Also, fix the "UTF8" option in MSI, which is responsible for character-set-server setting
* MDEV-26713 Set activeCodePage=UTF8 for windows programsVladislav Vaintroub2021-12-1513-10/+174
| | | | | | | | | | | | - Use corresponding entry in the manifest, as described in https://docs.microsoft.com/en-us/windows/apps/design/globalizing/use-utf8-code-page - If if ANSI codepage is UTF8 (i.e for Windows 1903 and later) Use UTF8 as default client charset Set console codepage(s) to UTF8, in case process is using console - Allow some previously disabled MTR tests, that used Unicode for in "exec", for the recent Windows versions
* MDEV-27093 Do not pass root password in HEX(clear text) from ↵Vladislav Vaintroub2021-12-152-19/+11
| | | | | | | | | | | | | | mariadb-install-db.exe to bootstrap Previously, password was passed as hex(clear_text_password). The hex encoding was used to avoid masking apostrophe and backslash etc. However, bootstrap still manages to misinterpert UTF8 password, so that root would not connect later. So the fix is to compute the native password hash inside mysql_install_db already instead, and create user with that hash, rather than letting bootstrap calculate it by using PASSWORD() function.
* MDEV-27092 Windows - services that have non-ASCII characters do not work ↵Vladislav Vaintroub2021-12-158-12/+201
| | | | | | | | | | | | | | with activeCodePage=UTF8 CreateServiceA, OpenServiceA, and couple of other functions do not work correctly with non-ASCII character, in the special case where application has defined activeCodePage=UTF8. Workaround by redefining affected ANSI functions to own wrapper, which works by converting narrow(ANSI) to wide, then calling wide function. Deprecate original ANSI service functions, via declspec, so that we can catch their use.
* MDEV-27090 Windows client - ReadConsoleA does not work correctly with UTF8 ↵Vladislav Vaintroub2021-12-154-264/+95
| | | | | | | | | | | | | | codepage Corresponding Windows bug https://github.com/microsoft/terminal/issues/4551 Use ReadConsoleW instead and convert to console's input codepage, to workaround. Also, disable VT sequences in the console output, as we do not knows what type of data comes with SELECT, we do not want VT escapes there. Remove my_cgets()
* MDEV-27089 Windows : incorrect handling of non-ASCIIs in get_tty_passwordVladislav Vaintroub2021-12-151-16/+39
| | | | | | | | | | | | | | Prior to patch, get_password would echo multple mask characters '*', for a single multibyte input character. Fixed the behavior by using "wide" version of getch, _getwch. Also take care of possible characters outside of BMP (i.e we do not print '*' for high surrogates). The function will now internally construct the "wide" password string, and conver to the console codepage. Some characters could still be lost in that conversion, unless the codepage is utf8, but this is not any new bug.
* disable galera_3nodes.galera_ipv6_mariabackupSergei Golubchik2021-12-151-0/+2
| | | | | | | and galera_3nodes.galera_ipv6_mariabackup_section until their corresponding MDEV's are fixed. They fail almost everywhere.
* Merge 10.7 into 10.8Marko Mäkelä2021-12-148-29/+109
|\
| * Merge 10.6 into 10.7Marko Mäkelä2021-12-144-28/+79
| |\
| | * MDEV-27014 InnoDB fails to restore page 0 from the doublewrite bufferThirunarayanan Balathandayuthapani2021-12-122-7/+7
| | | | | | | | | | | | | | | - Addressing the format issue in deferred_dblwr() and changed the function comment.
| | * MDEV-27111 atomic.rename_table test case failsThirunarayanan Balathandayuthapani2021-12-121-0/+12
| | | | | | | | | | | | | | | | | | | | | InnoDB fails to identify the deferred tablespace after recovery. Problem is that InnoDB fails to rename the tablespace present in recovered tablespace. Fix is that InnoDB should try to rename the recovered tablespace when tablespace is being deferred
| | * MDEV-27014 InnoDB fails to restore page 0 from the doublewrite bufferThirunarayanan Balathandayuthapani2021-12-124-28/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch reverts the commit cab8f4b552d234c8642f87fae28ecb098392c381. InnoDB fails to restore page0 from doublewrite buffer when the tablespace is being deferred. In that case, InnoDB doesn't find INIT_PAGE redo log record for page0 and it leads to failure. InnoDB should recovery page0 from doublewrite buffer for the deferred tablespace before applying the redo log records. Added deferred_dblwr() to restore page0 of deferred tablespace from doublewrite buffer
| * | MDEV-27001 Galera crashes when converting table to partitionbb-10.7-MDEV-27001mkaruza2021-12-144-1/+30
| | | | | | | | | | | | | | | | | | | | | SQL statments could have table entries added in lexer. This entries should not invalidate `next_global` member. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
* | | MDEV-27206: [ERROR] Duplicated key: cause, Assertion `is_uniq_key' failed ↵Sergei Krivonos2021-12-103-1/+28
| | | | | | | | | | | | with optimizer trace
* | | Merge 10.7 into 10.8Marko Mäkelä2021-12-102-3/+4
|\ \ \ | |/ /
| * | Add forgotten changes to the parent commitMarko Mäkelä2021-12-102-3/+4
| | |
* | | Merge 10.7 into 10.8Marko Mäkelä2021-12-1028-266/+634
|\ \ \ | |/ /
| * | Cleanup: Remove some ib::logger in recovery messagesMarko Mäkelä2021-12-104-179/+214
| | |
| * | Merge 10.6 into 10.7Marko Mäkelä2021-12-101-3/+3
| |\ \ | | |/
| | * MDEV-27219 Some error messages might report table names incorrectly on LLP64Marko Mäkelä2021-12-101-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 49e2c8f0a6fefdeac50925f758090d6bd099768d (MDEV-25743) some more use of the printf-style format "%.*s" was added. The length parameter is of type int, not size_t. On 64-bit platforms that follow the LLP64 convention (such as 64-bit Microsoft Windows), sizeof(int)==4 and sizeof(size_t)==8. Let us explicitly cast the lengths to the correct type in order to avoid any trouble.
| * | SUMMARY/DESCRIPTION for compression provider RPMsSergei Golubchik2021-12-085-0/+15
| | |
| * | Merge branch '10.6' into 10.7Sergei Golubchik2021-12-0818-81/+391
| |\ \ | | |/
| | * Merge branch '10.5' into 10.6Sergei Golubchik2021-12-0718-81/+391
| | |\
| | | * BUG#31761802 STATISTICS ANY QUERIES USING VIEWS ARE SUMMARIZED TOGETHER WITH ↵Sergei Golubchik2021-12-072-0/+220
| | | | | | | | | | | | | | | | | | | | | | | | THE VIEW DEFINITION SELECT test case only
| | | * require system pcre2 in rpmsSergei Golubchik2021-12-071-3/+1
| | | | | | | | | | | | | | | | now when SLES12.3 is gone, we can enforce it
| | | * ColumnStore and S3 SUMMARY/DESCRIPTION for RPMSergei Golubchik2021-12-072-0/+5
| | | |
| | | * Merge branch '10.4' into 10.5Sergei Golubchik2021-12-079-5/+89
| | | |\
| | | | * Merge branch '10.3' into 10.4Sergei Golubchik2021-12-0711-10/+98
| | | | |\
| | | | | * Merge branch '10.2' into 10.3Sergei Golubchik2021-12-069-8/+92
| | | | | |\
| | | | | | * fix srpm builds after fe065f8d90b0Sergei Golubchik2021-12-061-1/+2
| | | | | | |
| | | | | | * fix ./mtr --manual warning after f5441ef4dac9Sergei Golubchik2021-12-061-1/+1
| | | | | | |
| | | | | | * MDEV-27088: lf unit tests - cycles insufficientMartin Beck2021-11-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Per bug report, cycles was woefully insufficient to detect any implementation error.
| | | | | | * MDEV-27088: Server crash on ARM (WMM architecture) due to missing barriers ↵Martin Beck2021-11-302-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in lf-hash MariaDB server crashes on ARM (weak memory model architecture) while concurrently executing l_find to load node->key and add_to_purgatory to store node->key = NULL. l_find then uses key (which is NULL), to pass it to a comparison function. The specific problem is the out-of-order execution that happens on a weak memory model architecture. Two essential reorderings are possible, which need to be prevented. a) As l_find has no barriers in place between the optimistic read of the key field lf_hash.cc#L117 and the verification of link lf_hash.cc#L124, the processor can reorder the load to happen after the while-loop. In that case, a concurrent thread executing add_to_purgatory on the same node can be scheduled to store NULL at the key field lf_alloc-pin.c#L253 before key is loaded in l_find. b) A node is marked as deleted by a CAS in l_delete lf_hash.cc#L247 and taken off the list with an upfollowing CAS lf_hash.cc#L252. Only if both CAS succeed, the key field is written to by add_to_purgatory. However, due to a missing barrier, the relaxed store of key lf_alloc-pin.c#L253 can be moved ahead of the two CAS operations, which makes the value of the local purgatory list stored by add_to_purgatory visible to all threads operating on the list. As the node is not marked as deleted yet, the same error occurs in l_find. This change three accesses to be atomic. * optimistic read of key in l_find lf_hash.cc#L117 * read of link for verification lf_hash.cc#L124 * write of key in add_to_purgatory lf_alloc-pin.c#L253 Reviewers: Sergei Vojtovich, Sergei Golubchik Fixes: MDEV-23510 / d30c1331a18d875e553f3fcf544997e4f33fb943
| | | | | | * MDEV-26553 NOT IN subquery construct crashing 10.1 and upIgor Babaev2021-11-264-1/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bug was introduced by commit be00e279c6061134a33a8099fd69d4304735d02e The commit was applied for the task MDEV-6480 that allowed to remove top level disjuncts from WHERE conditions if the range optimizer evaluated them as always equal to FALSE/NULL. If such disjuncts are removed the WHERE condition may become an AND formula and if this formula contains multiple equalities the field JOIN::item_equal must be updated to refer to these equalities. The above mentioned commit forgot to do this and it could cause crashes for some queries. Approved by Oleksandr Byelkin <sanja@mariadb.com>
| | | | | * | MDEV-21108 Add option for setting install paths of groongabb-10.3-robertLukas Javorsky2021-12-022-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Include gronnga and groonga-normalizer-mysql install path
| | | * | | | MDEV-27190 InnoDB upgrade from 10.2, 10.3, 10.4 is not crash-safeMarko Mäkelä2021-12-071-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During startup, InnoDB must write a FILE_CHECKPOINT record. However, before MDEV-12353 (in MariaDB Server 10.2, 10.3, 10.4) the corresponding record MLOG_CHECKPOINT was encoded in a different way. When we are upgrading from a logically empty 10.2, 10.3, or 10.4 redo log, we must not write anything to the old log file, because if the server were killed during the upgrade, we would end up with a corrupted log file, and both the old and the new server would refuse to start up. On upgrade, we must simply create a new logically empty log file and replace the old ib_logfile0 with that.
| | | * | | | MDEV-27183 optimize std::map lookup in during crash recoverybb-10.5-MDEV-27183-map-lookup-recoveryEugene Kosov2021-12-072-11/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a low hanging fruit. Before this patch std::map::emplace() was a ~50% of the whole recv_sys_t::parse() operation in by test. After the fix it's only ~20%. recv_sys_t::parse() recv_sys_t::pages is a collection of all pages to recovery. Often, there are multiple changes for a single page. Often, they go in a row and for such cases let's avoid lookup in a std::map. cached_pages_it serves as a cache of size 1. recv_sys_t::add(): replace page_id argument with a std::map::iterator
| | | * | | | cleanup: reduce code bloatbb-10.5-kevgsEugene Kosov2021-12-062-61/+60
| | | | | | |
| * | | | | | cmake: detect lz4 version, require >= 1.6Sergei Golubchik2021-12-082-3/+11
| | | | | | |
* | | | | | | MDEV-27204: [ERROR] Json_writer: a member name was expected, Assertion `got_namebb-10.8-MDEV-27204-v2Sergei Petrunia2021-12-093-13/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [Adjusting Sergei Krivonos's patch] "duplicates_removal" may contain multiple elements inside it and so should have a JSON array as a value (and not object).
* | | | | | | Revert "MDEV-27036: re-enable my_json_writer-t unit test"Sergei Golubchik2021-12-0717-199/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2d21917e7db2db0900671aac2e29f49e4ff2acd7. No explainations, lots of code moved, wrong cmake changes
* | | | | | | Revert "Improve LibFMT detection"Sergei Golubchik2021-12-064-45/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9feaa6be07f8eb91736e51830f754bc99f939a51. No, we do NOT support fmt 6.x, it formats values differently. And we MUST use FMT_HEADER_ONLY