You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SqlSession sqlSession = sqlSessionFactory.openSession();
BasicMapper mapper = sqlSession.getMapper(BasicMapper.class);
for (int i = 0; i < 2000000; i++) {
System.out.println(mapper.queryName(i));
}
sqlSession.commit();
====
@CacheNamespace(blocking = true)
public interface BasicMapper { @select("select value from demo where id = #{id}")
String queryName(@param("id") int id);
}
Steps to reproduce
Running test case. Set jvm options -Xms20m -Xmx20m(this option just make result more easy to appear)
To make a compare.we can set blocking = flase then see whether OutOfMemoryErro happen.
Expected result
no error.
Actual result
Programe has been OutOfMemoryError.
The text was updated successfully, but these errors were encountered:
MyBatis version
3.5.5
Database vendor and version
Mysql
Test case or example project
====
SqlSession sqlSession = sqlSessionFactory.openSession();
BasicMapper mapper = sqlSession.getMapper(BasicMapper.class);
for (int i = 0; i < 2000000; i++) {
System.out.println(mapper.queryName(i));
}
sqlSession.commit();
====
@CacheNamespace(blocking = true)
public interface BasicMapper {
@select("select
value
fromdemo
where id = #{id}")String queryName(@param("id") int id);
}
Steps to reproduce
Running test case. Set jvm options -Xms20m -Xmx20m(this option just make result more easy to appear)
To make a compare.we can set blocking = flase then see whether OutOfMemoryErro happen.
Expected result
no error.
Actual result
Programe has been OutOfMemoryError.
The text was updated successfully, but these errors were encountered: