1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-29 00:08:14 +03:00
Files
mariadb/mysql-test/t
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
..
2009-02-09 22:00:15 +01:00
2010-02-25 23:13:11 +04:00
2009-02-09 22:00:15 +01:00
2011-01-25 12:14:28 +05:30
2010-03-09 16:09:32 +01:00
2009-09-29 17:38:40 +02:00
2010-12-14 12:33:03 +03:00
2009-02-06 18:25:08 +01:00
2009-05-06 15:00:14 +05:30
2009-10-20 11:00:07 -07:00
2011-03-29 10:09:05 +02:00
2010-12-14 12:33:03 +03:00
2011-03-17 16:28:16 +05:30
2010-01-29 16:54:27 +02:00
2009-02-03 14:45:17 +01:00
2009-08-12 12:03:05 +02:00
2011-01-26 16:50:21 +01:00
2010-10-15 20:13:35 +05:00
2010-01-15 10:51:39 +02:00
2009-07-03 10:19:32 +02:00
2009-11-27 18:10:28 +02:00
2009-12-23 17:44:03 +04:00
2009-06-10 11:58:36 +03:00
2009-02-19 18:24:25 -05:00