Skip to content

Commit fdd2749

Browse files
committed
cleanup: remove redundant code
reinit_io_cache() resets and restores MY_TRACK_WITH_LIMIT internally
1 parent ce5b8e5 commit fdd2749

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

sql/log.cc

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7924,14 +7924,7 @@ int Event_log::write_cache(THD *thd, binlog_cache_data *cache_data)
79247924
DBUG_RETURN(res ? ER_ERROR_ON_WRITE : 0);
79257925
}
79267926

7927-
/*
7928-
Allow flush of transaction logs to temporary go over the tmp space limit
7929-
as we do not want the commit to fail
7930-
*/
7931-
cache->myflags&= ~MY_TRACK_WITH_LIMIT;
7932-
res= reinit_io_cache(cache, READ_CACHE, 0, 0, 0);
7933-
cache->myflags|= MY_TRACK_WITH_LIMIT;
7934-
if (res)
7927+
if ((res= reinit_io_cache(cache, READ_CACHE, 0, 0, 0)))
79357928
DBUG_RETURN(ER_ERROR_ON_WRITE);
79367929

79377930
/* Amount of remaining bytes in the IO_CACHE read buffer. */

0 commit comments

Comments
 (0)