mariadb/tests
unknown 79c1be9e44 A fix and a test case for Bug#10736 "mysql_stmt_attr_set
CURSOR_TYPE_READ_ONLY select within select".
The bug was caused by the reset of thd->mem_root to thd->main_mem_root in 
Item_subselect::exec, which in turn triggered too early free_root() for
data which was needed on subsequent fetches from a cursor.
This reset also caused a memory leak in stored procedures, as 
subsequent executions of instructions containing a subselect
were allocating memory in thd->main_mem_root, which is not freed
until the end of the entire SP, instead of the per-call mem_root,
which is freed in the end of execution of the instruction.


sql/item_subselect.cc:
  Don't try to protect subqueries from the code that assumes that
  it can reset thd->mem_root and get away with it: it's responsibility
  of the caller to ensure that no assumption about the life span
  of the allocated memory made by the called code is broken.
  Besides, this didn't work well with cursors and stored procedures, 
  where the runtime memory root is not the same as &thd->main_mem_root.
sql/opt_range.cc:
  In get_mm_leaf restore the original mem_root of the thd which has
  been temporarily reset with the quick select mem_root earlier: if 
  thd->mem_root points to the QUICK...::mem_root, the memory allocated
  in JOIN::exec during evaluation of a subquery gets freed too early.
tests/mysql_client_test.c:
  A test case for Bug#10736 "mysql_stmt_attr_set CURSOR_TYPE_READ_ONLY
   select within select"
2005-06-28 20:52:15 +04:00
..
.cvsignore Import changeset 2000-07-31 21:29:14 +02:00
auto_increment.res Import changeset 2000-07-31 21:29:14 +02:00
auto_increment.tst Import changeset 2000-07-31 21:29:14 +02:00
big_record.pl Safety fix to enable RAID in max binaries 2003-05-13 10:54:07 +03:00
connect_test.c Changing the default of libmysqlclient : it's now NO reconnection. 2004-12-09 14:44:10 +01:00
deadlock_test.c Changing the default of libmysqlclient : it's now NO reconnection. 2004-12-09 14:44:10 +01:00
drop_test.pl Bug fixes for 3.23.23 2000-08-29 12:31:01 +03:00
export.pl Fixed bug in send in mysqltest 2001-03-25 01:02:26 +02:00
fork2_test.pl Don't do signal() on windows (Causes instability problems) 2001-10-17 19:39:39 +03:00
fork_big.pl Don't do signal() on windows (Causes instability problems) 2001-10-17 19:39:39 +03:00
fork_big2.pl fork_big2.pl: 2003-11-25 13:06:46 -08:00
function.res Arjens LOG functions changes with small changes and tests added to mysql-test 2002-07-17 12:11:48 +04:00
function.tst Arjens LOG functions changes with small changes and tests added to mysql-test 2002-07-17 12:11:48 +04:00
grant.pl Fixed two bugs in MySQL ACL. 2005-03-17 08:16:56 +02:00
grant.res Merge with 4.0.18 2004-02-11 00:06:46 +01:00
index_corrupt.pl Fixed core dump bug when hot link list in key cache was empty. Bug #10167 2005-04-27 14:31:04 +03:00
insert_and_repair.pl Don't do signal() on windows (Causes instability problems) 2001-10-17 19:39:39 +03:00
insert_test.c Changing the default of libmysqlclient : it's now NO reconnection. 2004-12-09 14:44:10 +01:00
list_test.c Changing the default of libmysqlclient : it's now NO reconnection. 2004-12-09 14:44:10 +01:00
lock_test.pl Import changeset 2000-07-31 21:29:14 +02:00
lock_test.res Import changeset 2000-07-31 21:29:14 +02:00
mail_to_db.pl New versions of mail_to_db.pl and pmail.pl. 2005-04-09 18:37:32 +03:00
Makefile.am WL#2286 - Compile MySQL w/YASSL support 2005-06-12 18:18:46 +05:00
myisam-big-rows.tst Fix for MyISAM records > 16M 2001-12-11 20:45:48 +02:00
mysql_client_test.c A fix and a test case for Bug#10736 "mysql_stmt_attr_set 2005-06-28 20:52:15 +04:00
pmail.pl New versions of mail_to_db.pl and pmail.pl. 2005-04-09 18:37:32 +03:00
rename_test.pl Don't do signal() on windows (Causes instability problems) 2001-10-17 19:39:39 +03:00
restore-lock.smack sql/slave.cc 2000-09-19 17:23:58 -06:00
select_test.c Changing the default of libmysqlclient : it's now NO reconnection. 2004-12-09 14:44:10 +01:00
showdb_test.c Changing the default of libmysqlclient : it's now NO reconnection. 2004-12-09 14:44:10 +01:00
ssl_test.c Changing the default of libmysqlclient : it's now NO reconnection. 2004-12-09 14:44:10 +01:00
table_types.pl Safety fix to enable RAID in max binaries 2003-05-13 10:54:07 +03:00
test_delayed_insert.pl Don't do signal() on windows (Causes instability problems) 2001-10-17 19:39:39 +03:00
thread_test.c Changing the default of libmysqlclient : it's now NO reconnection. 2004-12-09 14:44:10 +01:00
truncate.pl Fixed mutex problem in TRUNCATE TABLE 2002-06-04 22:59:12 +03:00
udf_test after review patch (SCRUM) 2003-10-06 11:13:25 +03:00
udf_test.res after review patch (SCRUM) 2003-10-06 11:13:25 +03:00