-
Tor Didriksen authored
Problem: memory leaks on windows when querying views. The problem was the local 'view_lex' in mysql_make_view() which is allocated in a MEM_ROOT, and never destroyed (it is used later, and cannot be destroyed) Regression source is patch for: Bug#13901905 - CRASH: INSERT ON DUPLICATE KEY UPDATE READS FREED MEMORY Fix: Make LEX::insert_update_values_map private, with accessor functions. Make it a pointer, and initialize the std::map on demand, rather than up-front (it is used in only rare cases anyways). Clear and delete it in lex_end() Also fix broken build on windows with -DWITH_MSCRT_DEBUG=1 - rename Path::getcwd() to Path::path_getcwd() - remove Protocol_local::free(), it was unused
Tor Didriksen authoredProblem: memory leaks on windows when querying views. The problem was the local 'view_lex' in mysql_make_view() which is allocated in a MEM_ROOT, and never destroyed (it is used later, and cannot be destroyed) Regression source is patch for: Bug#13901905 - CRASH: INSERT ON DUPLICATE KEY UPDATE READS FREED MEMORY Fix: Make LEX::insert_update_values_map private, with accessor functions. Make it a pointer, and initialize the std::map on demand, rather than up-front (it is used in only rare cases anyways). Clear and delete it in lex_end() Also fix broken build on windows with -DWITH_MSCRT_DEBUG=1 - rename Path::getcwd() to Path::path_getcwd() - remove Protocol_local::free(), it was unused
Loading