1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-21 06:21:35 +03:00
Files
mariadb/heap
unknown 4fe1561f98 BUG#23443: user-defined variables can consume too much memory in the
server

The problem was that when memory was exhausted HEAP engine could crash
(GROUP BY uses HEAP TABLE).  Alternatively, if SET was used, it could
report an error "You may only use constant expressions with SET" instead
of "Out of memory (Needed NNNNNN bytes)".

The solution is:
 - pass MY_WME to (some) calls to my_malloc() to get correct message.
 - fix heap_write() so that the first key is skipped during cleanup
   on ENOMEM because it wasn't inserted and doesn't have to be
   deleted.

No test case is provided because we can't test out-of-memory behaviour
in our current test framework.


heap/hp_block.c:
  If allocation fails, write an error message.
heap/hp_write.c:
  On ENOMEM, skip the first key in cleanup, as it wasn't inserted yet.
sql/item_func.cc:
  Add MY_WME so that OOM error will be reported.
2007-01-09 12:24:25 +03:00
..
2002-11-29 16:40:18 +02:00
2001-12-06 14:10:51 +02:00
2000-07-31 21:29:14 +02:00
2000-07-31 21:29:14 +02:00
2002-10-16 13:11:25 +03:00
2001-12-06 14:10:51 +02:00
2001-12-06 14:10:51 +02:00
2001-12-06 14:10:51 +02:00
2002-11-29 16:40:18 +02:00
2001-12-06 14:10:51 +02:00
2001-12-06 14:10:51 +02:00
2001-12-06 14:10:51 +02:00
2001-12-06 14:10:51 +02:00
2001-12-06 14:10:51 +02:00
2001-12-06 14:10:51 +02:00
2001-12-06 14:10:51 +02:00
2002-11-29 16:40:18 +02:00
2001-12-06 14:10:51 +02:00
2001-12-06 14:10:51 +02:00
2002-11-29 16:40:18 +02:00
2000-07-31 21:29:14 +02:00