summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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: