summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Elkin <andrei.elkin@mariadb.com>2021-06-09 20:17:01 +0300
committerAndrei Elkin <andrei.elkin@mariadb.com>2021-06-09 20:17:01 +0300
commitb91e713ce3933e78c5297a857c5106de221ef727 (patch)
treec89e8cfb5e3c7a4478b73456b63c0a37844490d6
parent2b3d1b977dd9775023ee0017f3863df7e7802883 (diff)
downloadmariadb-git-bb-10.6_MDEV-21117.tar.gz
MDEV-21117 Address if the last review round.bb-10.6_MDEV-21117
-rw-r--r--mysql-test/include/have_rocksdb.inc6
-rw-r--r--sql/log.cc10
2 files changed, 8 insertions, 8 deletions
diff --git a/mysql-test/include/have_rocksdb.inc b/mysql-test/include/have_rocksdb.inc
index d59f76f6cf3..bc6ec648605 100644
--- a/mysql-test/include/have_rocksdb.inc
+++ b/mysql-test/include/have_rocksdb.inc
@@ -1,4 +1,4 @@
-if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME = 'rocksdb'`)
+if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'ROCKSDB' AND support IN ('YES', 'DEFAULT', 'ENABLED')`)
{
- --skip Requires rocksdb
-} \ No newline at end of file
+ --skip Test requires MyRocks engine
+}
diff --git a/sql/log.cc b/sql/log.cc
index cfd40918a4e..047d644e5da 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -10097,9 +10097,10 @@ bool MYSQL_BIN_LOG::truncate_and_remove_binlogs(const char *file_name,
old_size= s.st_size;
clear_inuse_flag_when_closing(file);
/* Change binlog file size to truncate_pos */
- if ((error=
- mysql_file_chsize(file, pos, 0, MYF(MY_WME))) ||
- (error= mysql_file_sync(file, MYF(MY_WME|MY_SYNC_FILESIZE))))
+ error= mysql_file_chsize(file, pos, 0, MYF(MY_WME));
+ if (!error)
+ error= mysql_file_sync(file, MYF(MY_WME|MY_SYNC_FILESIZE));
+ if (error)
{
sql_print_error("Failed to truncate the "
"binlog file:%s to size:%llu. Error:%d",
@@ -10115,8 +10116,7 @@ bool MYSQL_BIN_LOG::truncate_and_remove_binlogs(const char *file_name,
"to pos:%llu to remove transactions starting from "
"GTID %u-%u-%s",
file_name, old_size, pos,
- ptr_gtid->domain_id, ptr_gtid->server_id, buf,
- old_size);
+ ptr_gtid->domain_id, ptr_gtid->server_id, buf);
}
end: