1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-29 00:08:14 +03:00
Files
mariadb/sql
Sergey Glukhov 3f3318c34e Bug#11756242 48137: PROCEDURE ANALYSE() LEAKS MEMORY WHEN RETURNING NULL
There are two problems with ANALYSE():

1. Memory leak 
   it happens because do_select() can overwrite
   JOIN::procedure field(with zero value in our case) and
   JOIN destructor don't free the memory allocated for
   JOIN::procedure. The fix is to save original JOIN::procedure
   before do_select() call and restore it after do_select
   execution.

2. Wrong result
   If ANALYSE() procedure is used for the statement with LIMIT clause
   it could retrun empty result set. It happens because of missing 
   analyse::end_of_records() call. First end_send() function call
   returns NESTED_LOOP_QUERY_LIMIT and second call of end_send() with
   end_of_records flag enabled does not happen. The fix is to return
   NESTED_LOOP_OK from end_send() if procedure is active.
2011-04-14 12:11:57 +04:00
..
2010-12-29 00:47:05 +01:00
2010-12-29 00:47:05 +01:00
2010-10-01 13:39:49 +02:00
2010-12-29 00:47:05 +01:00
2010-12-14 12:33:03 +03:00
2010-12-29 00:47:05 +01:00
2010-12-14 12:33:03 +03:00
2010-11-09 12:45:13 -02:00
2010-12-28 19:57:23 +01:00
2008-11-22 01:10:38 +01:00
2008-11-22 01:10:38 +01:00
2010-12-29 00:47:05 +01:00
2009-06-01 16:00:38 +04:00
2010-07-23 18:15:56 +07:00
2010-03-17 19:15:41 +01:00
2010-12-29 00:47:05 +01:00
2011-01-24 11:48:54 +08:00
2008-07-03 23:41:22 +04:00
2009-04-29 07:59:10 +05:00
2009-12-18 16:44:24 -02:00
2008-01-23 13:26:41 -07:00
2010-06-11 16:52:06 +04:00
2011-03-29 10:09:05 +02:00
2011-02-02 19:05:28 +02:00
2010-12-14 12:33:03 +03:00
2011-01-26 15:30:06 +08:00
2011-01-26 15:30:06 +08:00
2010-12-17 15:05:50 +02:00
2011-03-03 11:25:37 +03:00
2011-01-07 15:28:36 +02:00
2010-01-24 15:03:23 +08:00
2009-01-14 18:50:51 +04:00
2010-12-29 00:47:05 +01:00
2009-11-03 20:45:52 +03:00
2010-12-29 00:47:05 +01:00
2009-06-17 16:56:44 +02:00