summaryrefslogtreecommitdiff
path: root/client
Commit message (Collapse)AuthorAgeFilesLines
* Fix renamed constant.bb-10.2-mysqltestOleksandr Byelkin2020-09-161-2/+2
|
* 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
|\ \ \ | |/ /
| * | imporve clang buildEugene Kosov2019-06-252-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Debug Maintainer mode makes all warnings errors. This patch fix warnings. Mostly about deprecated `register` keyword. Too much warnings came from Mroonga and I gave up on it.
* | | MDEV-19821 "perl;" snippet must run the same perl executable that runs mtr.Vladislav Vaintroub2019-06-211-1/+9
| | |
* | | MDEV-19750 mysql command wrong encodingVladislav Vaintroub2019-06-175-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | Restore the detection of default charset in command line utilities. It worked up to 10.1, but was broken by Connector/C. Moved code for detection of default charset from sql-common/client.c to mysys, and make command line utilities to use this code if charset was not specified on the command line.
* | | Ensure that tests and programs can restore variablesMonty2019-06-031-0/+4
| | | | | | | | | | | | | | | | | | | | | - --default-character-set can now be disabled in mysqldump - --skip-resolve can be be disabled in mysqld - mysql_client_test now resets global variables it changes - mtr couldn't handle [mysqldump] in config files (wrong regexp used)
* | | Only link mysys_ssl when required.Vladislav Vaintroub2019-06-031-2/+2
| | | | | | | | | | | | | | | Do not use TARGET_LINK_LIBRARIES(mysys mysys_ssl), this means that mysys_ssl is linked to practically everything.
* | | Merge 10.1 into 10.2Marko Mäkelä2019-05-161-2/+9
|\ \ \ | |/ /
| * | MDEV-788 mysqlimport should support the ability to disable foreign keysRobert Bindar2019-05-151-2/+9
| | |
* | | Merge 10.1 into 10.2Marko Mäkelä2019-05-1320-20/+20
|\ \ \ | |/ /
| * | Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-1120-20/+20
| |\ \ | | |/
| | * Update FSF AddressVicențiu Ciorbaru2019-05-1120-20/+20
| | | | | | | | | | | | * Update wrong zip-code
| * | Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-111-1/+1
| |\ \ | | |/
| | * Update FSF addressMichal Schorm2019-05-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit is based on the work of Michal Schorm, rebased on the earliest MariaDB version. Th command line used to generate this diff was: find ./ -type f \ -exec sed -i -e 's/Foundation, Inc., 59 Temple Place, Suite 330, Boston, /Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, /g' {} \; \ -exec sed -i -e 's/Foundation, Inc. 59 Temple Place.* Suite 330, Boston, /Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, /g' {} \; \ -exec sed -i -e 's/MA.*.....-1307.*USA/MA 02110-1335 USA/g' {} \; \ -exec sed -i -e 's/Foundation, Inc., 59 Temple/Foundation, Inc., 51 Franklin/g' {} \; \ -exec sed -i -e 's/Place, Suite 330, Boston, MA.*02111-1307.*USA/Street, Fifth Floor, Boston, MA 02110-1335 USA/g' {} \; \ -exec sed -i -e 's/MA.*.....-1307/MA 02110-1335/g' {} \;
* | | Let us close library and only then free defaults.Oleksandr Byelkin2019-05-061-1/+1
| | |
* | | Merge branch '10.1' into 10.2Oleksandr Byelkin2019-05-042-36/+35
|\ \ \ | |/ /
| * | MDEV-19015: mysql_plugin doesn't read all server option groupsAnel Husakovic2019-04-241-4/+4
| | | | | | | | | | | | Closes #1262
| * | MDEV-19182 mysqldump not always handling SHOW CREATE TRIGGER failures correctlySergei Golubchik2019-04-241-32/+31
| | | | | | | | | | | | | | | only use SHOW TRIGGERS on old (< 5.1.21) servers, otherwise always use SHOW CREATE TRIGGER and don't fallback.
* | | MDEV-17260: Memory leaks in mysqlbinlogSujatha Sivakumar2019-04-261-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: ======== The mysqlbinlog tool is leaking memory, causing failures in various tests when compiling and testing with AddressSanitizer or LeakSanitizer like this: cmake -DCMAKE_BUILD_TYPE=Debug -DWITH_ASAN:BOOL=ON /path/to/source make -j$(nproc) cd mysql-test ASAN_OPTIONS=abort_on_error=1 ./mtr --parallel=auto Analysis: ========= Two types of leaks were observed during above execution. 1) Leak in Log_event::read_log_event(char const*, unsigned int, char const**, Format_description_log_event const*, char) File: sql/log_event.cc:2150 For all row based replication events the memory which is allocated during read_log_event is not freed after the event is processed. The event specific memory has to be retained only when flashback option is enabled with mysqlbinlog tool. In this case all the events are retained till the end statement is received and they are processed in reverse order and they are destroyed. But in the existing code all events are retained irrespective of flashback mode. Hence the memory leaks are observed. 2) read_remote_annotate_event(unsigned char*, unsigned long, char const**) File: client/mysqlbinlog.cc:194 In general the Annotate event is not printed immediately because all subsequent rbr-events can be filtered away. Instead it will be printed together with the first not filtered away Table map or the last rbr will be processed. While reading remote annotate events memory is allocated for event buffer and event's temp_buf is made to point to the allocated buffer as shown below. The TRUE flag is used for doing proper cleanup using free_temp_buf(). i.e at the time of deletion of annotate event its destructor takes care of clearing the temp_buf. /* Ensure the event->temp_buf is pointing to the allocated buffer. (TRUE = free temp_buf on the event deletion) */ event->register_temp_buf((char*)event_buf, TRUE); But existing code does the following when it receives a remote annotate_event. if (remote_opt) ev->temp_buf= 0; That is code immediately sets temp_buf=0, because of which free_temp_buf() call will return empty handed as it has lost the reference to the allocated temporary buffer. This results in memory leak Fix: ==== 1) If not in flashback mode, destroy the memory for events once they are processed. 2) Remove the ev->temp_buf=0 code for remote option. Let the proper cleanup to be done as part of free_temp_buf().