• unknown's avatar
    Bug #33796 Memory leak for prepared statements in embedded server. · 075e0220
    unknown authored
    Field data for a query was stored to the stmt->alloc that is emptied
    with mysql_stmt_close statement only. That means a lot of memory can
    be occupied without a reason if used doesn't call mysql_stmt_close often.
    
    
    libmysql/libmysql.c:
      Bug #33796 Memory leak for prepared statements in embedded server.
      
      Clean up result->alloc even if there's no 'data' created
    libmysqld/lib_sql.cc:
      Bug #33796 Memory leak for prepared statements in embedded server.
      
      alloc 'fields' in the 'result.alloc' as the 'mem_root' is only cleaned with
      mysql_stmt_close'
    075e0220
libmysql.c 128 KB