summaryrefslogtreecommitdiff
path: root/client
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'bb-10.5-release' into bb-10.6-release10.6-halfmergeOleksandr Byelkin2021-02-161-19/+86
|\
| * Merge branch 'bb-10.4-release' into bb-10.5-releaseSergei Golubchik2021-02-151-19/+86
| |\
| | * Merge branch 'bb-10.3-release' into bb-10.4-releaseSergei Golubchik2021-02-121-19/+84
| | |\ | | | | | | | | | | | | | | | | Note, the fix for "MDEV-23328 Server hang due to Galera lock conflict resolution" was null-merged. 10.4 version of the fix is coming up separately
| | | * Merge branch '10.2' into 10.3Sergei Golubchik2021-02-011-2/+22
| | | |\
| | | | * MDEV-20939: Race condition between mysqldump import and InnoDB persistentRucha Deodhar2021-01-271-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | statistics calculation Analysis: When --replace or --insert-ignore is not given, dumping of mysql.innodb_index_stats and mysql.innodb_table_stats will result into race condition. Fix: Check if these options are present with --system=stats (because dumping under --system=stats is safe). Otherwise, dump only structure, ignoring data because innodb will recalculate data anyway.
| | | | * MDEV-20939: Race condition between mysqldump import and InnoDB persistentDaniel Black2021-01-251-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | statistics calculation mysqldump --system=stats and --system=timezones by default used ordinary INSERT statements populate EITS, innodb stats, and timezone tables. As these all have primary keys it could result in conflict. The behavior desired with --system= is to replace the tables. As such we assume --replace for the purposes of stats and timezone tables there if --insert-ignore isn't specified.
| | | * | MDEV-21785: sequences used as default by other table not dumped in right ↵bb-10.3-MDEV-21785Oleksandr Byelkin2021-01-261-17/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | order by mysqldump Dump sequences first. This atch made to keep it small and to keep number of queries to the server the same. Order of tables in a dump can not be changed (except sequences first) because mysql_list_tables uses SHOW TABLES and I used SHOW FULL TABLES.
* | | | | Merge 10.5 into 10.6Marko Mäkelä2021-02-1112-71/+141
|\ \ \ \ \ | |/ / / /
| * | | | Added 'const' to arguments in get_one_option and find_typeset()Monty2021-02-0812-57/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 *'.
| * | | | Ensure that mysqlbinlog frees all memory at exitMonty2021-02-081-14/+23
| | | | |
* | | | | Merge 10.5 into 10.6Marko Mäkelä2021-02-021-1/+73
|\ \ \ \ \ | |/ / / /
| * | | | 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 10.5 into 10.6Marko Mäkelä2021-01-071-3/+0
|\ \ \ \ \ | |/ / / /
| * | | | Merge commit '10.4' into 10.5Oleksandr Byelkin2021-01-061-3/+0
| |\ \ \ \ | | |/ / /
| | * | | Merge 10.3 into 10.4Marko Mäkelä2020-12-231-3/+0
| | |\ \ \ | | | |/ /
| | | * | mdev-22485 mysqlslap does not use current user as defaultDan Solodko2020-12-071-3/+0
| | | | |
* | | | | Merge 10.5 into 10.6mariadb-10.5.7bb-10.6-georg10.6-vatuMarko Mäkelä2020-11-032-11/+585
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.4 into 10.5Marko Mäkelä2020-11-032-11/+585
| |\ \ \ \ | | |/ / /
| | * | | Merge 10.3 into 10.4Marko Mäkelä2020-11-033-12/+562
| | |\ \ \ | | | |/ /
| | | * | Merge 10.2 into 10.3Marko Mäkelä2020-11-022-11/+561
| | | |\ \ | | | | |/
| | | | * MDEV-22387: Do not violate __attribute__((nonnull))Marko Mäkelä2020-11-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This follows up commit commit 94a520ddbe39ae97de1135d98699cf2674e6b77e and commit 7c5519c12d46ead947d341cbdcbb6fbbe4d4fe1b. After these changes, the default test suites on a cmake -DWITH_UBSAN=ON build no longer fail due to passing null pointers as parameters that are declared to never be null, but plenty of other runtime errors remain.
| | | | * MDEV-23630: mysqldump logically dump system table informationDaniel Black2020-11-011-10/+559
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add --system={all, users, plugins, udfs, servers, stats, timezones} This will dump system information from the server in a logical form like: * CREATE USER * GRANT * SET DEFAULT ROLE * CREATE ROLE * CREATE SERVER * INSTALL PLUGIN * CREATE FUNCTION "stats" is the innodb statistics tables or EITS and these are dumped as INSERT/REPLACE INTO statements without recreating the table. "timezones" is the collection of timezone tables which are important to transfer to generate identical results on restoration. Two other options have an effect on the SQL generated by --system=all. These are mutually exclusive of each other. * --replace * --insert-ignore --replace will include "OR REPLACE" into the logical form like: * CREATE OR REPLACE USER ... * DROP ROLE IF EXISTS (MySQL-8.0+) * CREATE OR REPLACE ROLE ... * UNINSTALL PLUGIN IF EXISTS (10.4+) ... (before INSTALL PLUGIN) * DROP FUNCTION IF EXISTS (MySQL-5.7+) * CREATE OR REPLACE [AGGREGATE] FUNCTION * CREATE OR REPLACE SERVER --insert-ignore uses the construct " IF NOT EXISTS" where supported in the logical syntax. 'CREATE OR REPLACE USER' includes protection against being run as the same user that is importing the mysqldump. Includes experimental support for dumping mysql-5.7/8.0 system tables and exporting logical SQL compatible with MySQL. Updates mysqldump man page, including this information and (removing obsolute bug reference) Reviewed-by: anel@mariadb.org
* | | | | Merge 10.5 into 10.6Marko Mäkelä2020-11-022-5/+77
|\ \ \ \ \ | |/ / / /
| * | | | 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 10.4 into 10.5Marko Mäkelä2020-10-301-3/+75
| |\ \ \ \ \ | | |/ / / /
| | * | | | Merge 10.3 into 10.4Marko Mäkelä2020-10-291-3/+74
| | |\ \ \ \ | | | |/ / /
| | | * | | MDEV-21786 mysqldump will forget sequence definition details on --no-data dumpAnel Husakovic2020-10-231-3/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Original patch was contributed by Jani Tolonen <jani.k.tolonen@gmail.com> https://github.com/an3l/server/commits/bb-10.3-anel-MDEV-21786-dump-sequence which distinguishes data structure (linked list) of sequences from tables. - Added standard sql output to prevent future changes of sequences and disabled locks for sequences. - Added test case for `MDEV-20070: mysqldump won't work correct on sequences` where table column depends on sequence value. - Restore sequence last value in the following way: - Find `next_not_cached_value` and use it to `setval()` - We just need for logical restore, so don't execute `setval()` - `setval()` should be showed also in case of `--no-data` option. Reviewed-by: daniel@mariadb.org
| | | * | | 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.5 into 10.6Marko Mäkelä2020-09-242-3/+7
|\ \ \ \ \ \ | |/ / / / /
| * | | | | 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
| | | |\ \ \ | | | | |/ /
| | | | * | Merge 10.1 into 10.2Marko Mäkelä2020-09-221-1/+1
| | | | |\ \ | | | | | |/
| | | | | * mysql_upgrade: fix error textDaniel Black2020-09-121-1/+1
| | | | | |
| | | | | * MDEV-16372 ER_BASE64_DECODE_ERROR upon replaying binary log via mysqlbinlog ↵Andrei Elkin2020-08-311-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --verbose (This commit is exclusively for 10.1 branch, do not merge it to upper ones) In case of a pattern of non-STMT_END-marked Rows-log-event (A) followed by a STMT_END marked one (B) mysqlbinlog mixes up the base64 encoded rows events with their pseudo sql representation produced by the verbose option: BINLOG ' base64 encoded data for A ### verbose section for A base64 encoded data for B ### verbose section for B '/*!*/; In effect the produced BINLOG '...' query is not valid and is rejected with the error. Examples of this way malformed BINLOG could have been found in binlog_row_annotate.result that gets corrected with the patch. The issue is fixed with introduction an auxiliary IO_CACHE to hold on the verbose comments until the terminal STMT_END event is found. The new cache is emptied out after two pre-existing ones are done at that time. The correctly produced output now for the above case is as the following: BINLOG ' base64 encoded data for A base64 encoded data for B '/*!*/; ### verbose section for A ### verbose section for B Thanks to Alexey Midenkov for the problem recognition and attempt to tackle, Venkatesh Duggirala who produced a patch for the upstream whose idea is exploited here, as well as to MDEV-23077 reporter LukeXwang who also contributed a piece of a patch aiming at this issue. Extra: mysqlbinlog_row_minimal refined to not produce mutable numeric values into the result file.
| | | | * | MDEV-16372 ER_BASE64_DECODE_ERROR upon replaying binary log via mysqlbinlog ↵Andrei Elkin2020-08-311-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --verbose (This commit is exclusively for 10.2 branch. Do not merge it to 10.3) In case of a pattern of non-STMT_END-marked Rows-log-event (A) followed by a STMT_END marked one (B) mysqlbinlog mixes up the base64 encoded rows events with their pseudo sql representation produced by the verbose option: BINLOG ' base64 encoded data for A ### verbose section for A base64 encoded data for B ### verbose section for B '/*!*/; In effect the produced BINLOG '...' query is not valid and is rejected with the error. Examples of this way malformed BINLOG could have been found in binlog_row_annotate.result that gets corrected with the patch. The issue is fixed with introduction an auxiliary IO_CACHE to hold on the verbose comments until the terminal STMT_END event is found. The new cache is emptied out after two pre-existing ones are done at that time. The correctly produced output now for the above case is as the following: BINLOG ' base64 encoded data for A base64 encoded data for B '/*!*/; ### verbose section for A ### verbose section for B Thanks to Alexey Midenkov for the problem recognition and attempt to tackle, and to Venkatesh Duggirala who produced a patch for the upstream whose idea is exploited here, as well as to MDEV-23077 reporter LukeXwang who also contributed a piece of a patch aiming at this issue.
| * | | | | Merge 10.4 into 10.5Marko Mäkelä2020-09-041-2/+6
| |\ \ \ \ \ | | |/ / / /
| | * | | | Merge 10.3 into 10.4Marko Mäkelä2020-09-031-2/+6
| | |\ \ \ \ | | | |/ / /
| | | * | | MDEV-16372 ER_BASE64_DECODE_ERROR upon replaying binary log via mysqlbinlog ↵Andrei Elkin2020-08-311-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --verbose (This commit is for 10.3 and upper branches) In case of a pattern of non-STMT_END-marked Rows-log-event (A) followed by a STMT_END marked one (B) mysqlbinlog mixes up the base64 encoded rows events with their pseudo sql representation produced by the verbose option: BINLOG ' base64 encoded data for A ### verbose section for A base64 encoded data for B ### verbose section for B '/*!*/; In effect the produced BINLOG '...' query is not valid and is rejected with the error. Examples of this way malformed BINLOG could have been found in binlog_row_annotate.result that gets corrected with the patch. The issue is fixed with introduction an auxiliary IO_CACHE to hold on the verbose comments until the terminal STMT_END event is found. The new cache is emptied out after two pre-existing ones are done at that time. The correctly produced output now for the above case is as the following: BINLOG ' base64 encoded data for A base64 encoded data for B '/*!*/; ### verbose section for A ### verbose section for B Thanks to Alexey Midenkov for the problem recognition and attempt to tackle, and to Venkatesh Duggirala who produced a patch for the upstream whose idea is exploited here, as well as to MDEV-23077 reporter LukeXwang who also contributed a piece of a patch aiming at this issue.
* | | | | | Merge branch '10.5' into 10.6Oleksandr Byelkin2020-09-021-6/+4
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Merge 10.4 into 10.5Marko Mäkelä2020-08-211-2/+4
| |\ \ \ \ \ | | |/ / / /
| | * | | | Merge 10.3 into 10.4Marko Mäkelä2020-08-211-2/+4
| | |\ \ \ \ | | | |/ / /