summaryrefslogtreecommitdiff
path: root/client
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-25444: mysql --binary-mode is not able to replay some mysqlbinlog outputsbb-10.2-MDEV-25444Brandon Nesterenko2021-10-061-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note: This patch backports commits 10cd281 and 1755ea4 from 10.3. 10cd281: Problem:- Some binary data is inserted into the table using Jconnector. When binlog dump of the data is applied using mysql client it gives syntax error. Reason:- After investigating it turns out to be a issue of mysql client not able to properly handle \\0 <0 in binary>. In all binary files where mysql client fails to insert these 2 bytes are common (0x5c00) Solution:- I have changed mysql.cc to include for the possibility that binary string can have \\0 in it 1755ea4: Changes on top of Sachin’s patch. Specifically: 1) Refined the parsing break condition to only change the parser’s behavior for parsing strings in binary mode (behavior of \0 outside of strings is unchanged). 2) Prefixed binary_zero_insert.test with ‘mysql_’ to more clearly associate the purpose of the test. 3) As the input of the test contains binary zeros (0x5c00), different text editors can visualize this sequence differently, and Github would not display it at all. Therefore, the input itself was consolidated into the test and created out of hex sequences to make it easier to understand what is happening. 4) Extended test to validate that the rows which correspond to the INSERTS with 0x5c00 have the correct binary zero data. Reviewed By: ============ Andrei Elkin <andrei.elkin@mariadb.com>
* MDEV-19227: mysql_plugin doesn't run bootstrap from sourceAnel Husakovic2021-09-071-11/+52
| | | | | Reviewed by: serg@mariadb.com daniel@mariadb.org
* Cleanup - remove confusing comment.Vladislav Vaintroub2021-09-011-1/+0
|
* MDEV-26514 Option to build a separate test zip package on WindowsElena Stepanova2021-09-011-1/+1
| | | | echo is needed for the tests
* fix mysqlest crash on ./mtr --sp innodb_fts.innodb-fts-stopwordSergei Golubchik2021-06-121-2/+2
|
* fix mysqltest crash report outputSergei Golubchik2021-06-121-4/+7
| | | | | | | | | * read_command_buf is a pointer now, sizeof() no longer reflects its length, read_command_buflen is. * my_safe_print_str() prints multiple screens of '\0' bytes after the query end and up to read_command_buflen. Use fprintf() instead. * when setting connection->name to "-closed_connection-" update connection->name_len to match.
* MDEV-24879 Client crash on undefined charsetsdirSergei Golubchik2021-03-231-1/+5
|
* 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-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 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.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 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.
* | MDEV-23511 shutdown_server 10 times out, causing server kill at shutdownAndrei Elkin2020-08-211-2/+4
| | | | | | | | | | | | | | | | | | | | | | Shutdown of mtr tests may be too impatient, esp on CI environment where 10 seconds of `arg` of `shutdown_server arg` may not be enough for the clean shutdown to complete. This is fixed to remove explicit non-zero timeout argument to `shutdown_server` from all mtr tests. mysqltest computes 60 seconds default value for the timeout for the argless `shutdown_server` command. This policy is additionally ensured with a compile time assert.
* | Merge 10.1 into 10.2Marko Mäkelä2020-08-201-4/+0
|\ \ | |/
* | Merge branch '10.1' into 10.2Vicențiu Ciorbaru2020-06-117-30/+30
|\ \ | |/
| * Client spelling mistakesIan Gilfillan2020-06-087-32/+32
| |
* | Fix GCC -WnonnullMarko Mäkelä2020-05-141-4/+5
| |
* | MDEV-22483 mysql_upgrade does not use current user as default for connecting ↵Sergei Golubchik2020-05-081-1/+1
| | | | | | | | | | | | to server correct the help text
* | Merge branch '10.1' into 10.2Oleksandr Byelkin2020-05-021-1/+1
|\ \ | |/
| * Merge branch '5.5' into 10.1Oleksandr Byelkin2020-04-301-1/+1
| |\
| | * Correct the name of a contributorMarko Mäkelä2020-04-251-1/+1
| | | | | | | | | | | | | | | The name was correctly encoded in UTF-8 before commit 0ce12f70ed2eee1b92e2af27e7dda30db544f492.
* | | Fixed compiler warning in mysqltest.ccMonty2020-04-181-1/+1
| | |
* | | MDEV-20604: Duplicate key value is silently truncated to 64 characters in ↵Oleksandr Byelkin2020-04-012-21/+21
| | | | | | | | | | | | | | | | | | print_keydup_error Added indication of truncated string for "s" and "M" formats
* | | MDEV-22035 Memory leak in main.mysqltestMarko Mäkelä2020-04-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test main.mysqltest could crash or hang with cmake -DWITH_ASAN=ON builds. The reason appears to be a memory leak, which was found out by manually invoking echo --replace_regex a > file ASAN_OPTIONS=log_path=/dev/shm/asan mysqltest ... < file and then examining the /dev/shm/asan.* file.
* | | Merge 10.1 into 10.2Marko Mäkelä2020-04-013-74/+37
|\ \ \ | |/ /
| * | MDEV-22037: Add ability to skip content of some tables (work around for ↵Oleksandr Byelkin2020-03-252-6/+37
| | | | | | | | | | | | | | | | | | MDEV-20939) --ignore-table-data parameter added.
| * | remove redundant info on rpl test failureSergei Golubchik2020-03-231-68/+0
| | | | | | | | | | | | | | | | | | these three SHOW statements (and more) are issued from include/analyze-sync_with_master.test too. no need to do it twice.
* | | MDEV-10047: table-based master info repositorySujatha2020-03-131-1/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: ======= When we upgrade from "mysql" to "mariadb" if slave is using repositories as tables their data is completely ignored and no warning is issued in error log. Fix: === "mysql_upgrade" test should check for the presence of data in "mysql.slave_master_info" and "mysql.slave_relay_log_info" tables. When tables have some data the upgrade script should report a warning which hints users that the data in repository tables will be ignored.
* | | Merge 10.1 into 10.2Marko Mäkelä2020-03-131-7/+7
|\ \ \ | |/ /
| * | Merge 5.5 into 10.1Marko Mäkelä2020-03-131-7/+7
| |\ \ | | |/
| | * Cleanup: clang-10 -Wmisleading-indentationMarko Mäkelä2020-03-111-7/+7
| | | | | | | | | | | | | | | Also, remove some trailing white space and add missing static qualifier to free_annotate_event().
* | | Merge branch '10.1' into 10.2Oleksandr Byelkin2019-12-031-3/+3
|\ \ \ | |/ /
| * | Merge branch '5.5' into 10.1Oleksandr Byelkin2019-12-031-3/+3
| |\ \ | | |/
| | * Fixed some typos in mysql.ccHashir Sarwar2019-11-221-3/+3
| | | | | | | | | | | | Closes #1403
| * | Merge branch '5.5' into 10.1Oleksandr Byelkin2019-10-301-11/+2
| |\ \ | | |/
| | * Revert "MDEV-14448: Ctrl-C should not exit the client"mariadb-5.5.66Sergei Golubchik2019-10-301-13/+2
| | | | | | | | | | | | This reverts commit 396313d301b3567aeadd04ae6a9322da2adc0a8b.
| | * compilation fix for Windowsbb-5.5-releaseSergei Golubchik2019-10-301-0/+2
| | |
| * | Merge 5.5 into 10.1Eugene Kosov2019-10-291-2/+11
| |\ \ | | |/
| | * MDEV-14448: Ctrl-C should not exit the clientAnel Husakovic2019-10-281-2/+11
| | |
* | | Enable the auto parameter of the flag `default-character-set`Anel Husakovic2019-09-131-1/+4
| | | | | | | | | | | | | | | | | | | | | Closes #739 When invoking option `--default-character-set=auto` character set from underlying OS settings should be detected for mysqldump.
* | | MDEV-20377: Fix uninitialized memory in mysqltestMarko Mäkelä2019-08-191-1/+2
| | |
* | | Fixed issues found by valgrindMonty2019-08-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | - mysqltest didn't free read_command_buf - wait_for_slave_param did write different things to the log if valgrind was used. - Table open cache should not write the initial variable value as it can depend on the configuration or if valgrind is used - A variable in GetResult was used uninitalized
* | | Merge 10.1 into 10.2Marko Mäkelä2019-07-181-0/+1
|\ \ \ | |/ /