summaryrefslogtreecommitdiff
path: root/client/mysql_upgrade.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.11 into 11.0Sergei Petrunia2023-04-171-6/+11
|\
| * Merge 10.6 into 10.8Marko Mäkelä2023-04-121-6/+11
| |\
| | * Merge 10.5 into 10.6Marko Mäkelä2023-04-111-6/+11
| | |\
| | | * Merge remote-tracking branch '10.4' into 10.5Oleksandr Byelkin2023-03-311-6/+11
| | | |\
| | | | * MDEV-24453 Added support for a 5th --verbose parameter in mariadb-upgrade to ↵Debjyoti2023-03-271-4/+10
| | | | | | | | | | | | | | | | | | | | show mysql results for mysql_fix_privilege_tables
| | | | * MDBF-534: Coverity scan: fix client folderAnel Husakovic2023-02-171-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --------------------------------- File: `mysqladmin` --------------------------------- - Coverity (PRINTF_ARGS): https://scan5.scan.coverity.com/reports.htm#v58936/p10357/fileInstanceId=231728412&defectInstanceId=53073308&mergedDefectId=1520228&eventId=53073308-0 `mysql_upgrade` - extra argument to printf format specifiera - Coverity (TAINTED_SCALAR) - FAlSE POSITIVE: https://scan5.scan.coverity.com/reports.htm#v58936/p10357/fileInstanceId=231728412&defectInstanceId=53072897&mergedDefectId=1519349
* | | | | MDEV-30498 Rename mysql_upgrade state file to mariadb_upgradeChristian Gonzalez2023-02-071-8/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Renames the upgrade state file, and ensures the old file is properly removed when `mariadb-upgrade` tool is executed. All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.
* | | | | unify client/tool version stringSergei Golubchik2023-01-191-4/+2
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | it should now always be /path/to/exe Ver <tool version> Distrib <server version> for <OS> (<ARCH>) in all tools and clients
* | | | Merge branch '10.6' into 10.7Oleksandr Byelkin2022-10-041-3/+3
|\ \ \ \ | |/ / /
| * | | Merge branch '10.5' into 10.6Sergei Golubchik2022-09-301-3/+3
| |\ \ \ | | |/ /
| | * | MDEV-29614 mariadb-upgrade calls mysql and mysql-check (#2279)Daniel Black2022-09-281-3/+3
| | | | | | | | | | | | rather than mariadb/mariadb-check
* | | | Merge branch '10.6' into 10.7Oleksandr Byelkin2022-08-101-3/+3
|\ \ \ \ | |/ / /
| * | | Merge branch '10.5' into 10.6Oleksandr Byelkin2022-08-101-3/+3
| |\ \ \ | | |/ /
| | * | Merge branch '10.4' into 10.5mariadb-10.5.17Oleksandr Byelkin2022-08-101-3/+3
| | |\ \ | | | |/
| | | * Merge branch '10.3' into bb-10.4-releasemariadb-10.4.26Oleksandr Byelkin2022-08-101-3/+3
| | | |\
| | | | * Fix typos in the codebase.fluesvamp2022-08-091-3/+3
| | | | |
* | | | | Merge 10.6 into 10.7Marko Mäkelä2022-04-061-0/+1
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.5 into 10.6Marko Mäkelä2022-04-061-0/+1
| |\ \ \ \ | | |/ / /
| | * | | Merge 10.4 into 10.5Marko Mäkelä2022-04-061-0/+1
| | |\ \ \ | | | |/ /
| | | * | Fixed that mysql_upgrade doesn't give errors about mariadb.sysMonty2022-04-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | Merge branch '10.6' into 10.7mariadb-10.7.3Sergei Golubchik2022-02-101-15/+11
|\ \ \ \ \ | |/ / / /
| * | | | Merge branch '10.5 into 10.6mariadb-10.6.7Sergei Golubchik2022-02-101-15/+11
| |\ \ \ \ | | |/ / /
| | * | | Merge branch '10.4' into 10.5mariadb-10.5.15Sergei Golubchik2022-02-101-15/+11
| | |\ \ \ | | | |/ /
| | | * | Merge branch '10.3' into 10.4mariadb-10.4.24Sergei Golubchik2022-02-101-15/+11
| | | |\ \ | | | | |/
| | | | * Merge branch '10.2' into 10.3mariadb-10.3.34Sergei Golubchik2022-02-101-15/+11
| | | | |\
| | | | | * MDEV-27789 mysql_upgrade / mariadb-upgrade in 10.6.6 is putting password in ↵Monty2022-02-101-15/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | host argument Removed all dependencies of command line arguments based on positions in an array (this kind of code should never have been written). Instead use option names, which are stable. Reviewer: Sergei Golubchik
* | | | | | Merge branch '10.6' into 10.7Oleksandr Byelkin2022-02-041-95/+221
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Merge branch '10.5' into 10.6Oleksandr Byelkin2022-02-031-96/+222
| |\ \ \ \ \ | | |/ / / /
| | * | | | Merge branch '10.4' into 10.5Oleksandr Byelkin2022-02-011-96/+222
| | |\ \ \ \ | | | |/ / /
| | | * | | Merge branch '10.3' into 10.4Oleksandr Byelkin2022-01-301-96/+222
| | | |\ \ \ | | | | |/ /
| | | | * | Merge branch '10.2' into 10.3mariadb-10.3.33Oleksandr Byelkin2022-01-291-98/+224
| | | | |\ \ | | | | | |/
| | | | | * MDEV-27068 running mariadb-upgrade in parallel make it hangs foreverMonty2022-01-201-90/+223
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | | * | | Merge 10.3 into 10.4Marko Mäkelä2020-11-031-1/+1
| | | |\ \ \ | | | | |/ /
* | | | | | increase the version string buffer in mariadb-upgradeSergei Golubchik2021-09-071-1/+1
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | there's no point in keeping it small. this fixes numerous test failures in preview branches with versions like 10.7.0-MDEV-xxxx-short-feature-description-MariaDB
* | | | | MDEV-25602 get rid of __WIN__ in favor of standard _WIN32Vladislav Vaintroub2021-06-061-4/+4
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixed the MySQL bug# 20338 about misuse of double underscore prefix __WIN__, which was old MySQL's idea of identifying Windows Replace it by _WIN32 standard symbol for targeting Windows OS (both 32 and 64 bit) Not that connect storage engine is not fixed in this patch (must be fixed in "upstream" branch)
* | | | Added 'const' to arguments in get_one_option and find_typeset()Monty2021-02-081-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One should not change the program arguments! This change also reduces warnings from the icc compiler. Almost all changes are just syntax changes (adding const to 'get_one_option function' declarations). Other changes: - Added a few cast of 'argument' from 'const char*' to 'char *'. This was mainly in calls to 'external' functions we don't have control of. - Ensure that all reset of 'password command line argument' are similar. (In almost all cases it was just adding a comment and a cast) - In mysqlbinlog.cc and mysqld.cc there was a few cases that changed the command line argument. These places where changed to instead allocate the option in a MEM_ROOT to avoid changing the argument. Some of this code was changed to ensure that different programs did parsing the same way. Added a test case for the changes in mysqlbinlog.cc - Changed a few variables that took their value from command line options from 'char *' to 'const char *'.
* | | | MDEV-24093: Detect during mysql_upgrade if type_mysql_json.so is needed and ↵Anel Husakovic2021-01-281-1/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | load it a. The change makes `mariadb-upgrade` detect if `MYSQL_JSON` data type is needed. b. Install the data type if it's not installed. c. Uninstalls the data type once finished. d. Create `.opt` and `.inc` files `have_type_mysql_json` and adapt the tests Reviewed by: vicentiu@mariadb.org
* | | | Merge branch '10.4' into 10.5Oleksandr Byelkin2020-11-011-1/+1
|\ \ \ \
| * \ \ \ Merge branch '10.3' into 10.4Oleksandr Byelkin2020-10-311-1/+1
| |\ \ \ \ | | |/ / / | |/| / / | | |/ /
| | * | Merge branch '10.2' into 10.3Oleksandr Byelkin2020-10-301-1/+1
| | |\ \ | | | |/
| | | * Merge branch '10.1' into 10.2Oleksandr Byelkin2020-10-281-1/+1
| | | |\
| | | | * MDEV-23358 main.upgrade_MDEV-19650 fails with result differenceSergei Golubchik2020-10-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When including a generated file, always use <...>. We need the compiler to find it in the BINDIR, not in the SRCDIR. But when including as "..." SRCDIR is always searched first. The bug can only happen in out-of-source builds, if there was an in-source build before.
| | * | | Merge branch '10.2' into 10.3Sujatha2020-09-281-1/+1
| | |\ \ \ | | | |/ /
| | | * | Merge branch '10.1' into 10.2Sujatha2020-09-281-1/+1
| | | |\ \ | | | | |/
| | | | * Reverted wrong patch for mysql_upgradebb-10.1-danielblack-mysqlupgrade-revertMonty2020-09-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | The original code was correct. mysql_upgrade calls the mysql client to talk with MariaDB. It doesn't call itself!
* | | | | Merge branch '10.4' into 10.5Sujatha2020-09-291-1/+1
|\ \ \ \ \ | |/ / / /
| * | | | Reverted wrong patch for mysql_upgradeMonty2020-09-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | The original code was correct. mysql_upgrade calls the mysql client to talk with MariaDB. It doesn't call itself!
* | | | | Merge 10.4 into 10.5Marko Mäkelä2020-09-231-1/+1
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.3 into 10.4Marko Mäkelä2020-09-221-1/+1
| |\ \ \ \ | | |/ / /
| | * | | Merge 10.2 into 10.3Marko Mäkelä2020-09-221-1/+1
| | |\ \ \ | | | |/ /