mariadb/tests
unknown 813fc4104e A fix and a test case for Bug#6513 "Test Suite: Values inserted by using
cursor is interpreted latin1 character and Bug#9819 "Cursors: Mysql Server
Crash while fetching from table with 5 million records."
A fix for a possible memory leak when fetching into an SP cursor
in a long loop.
The patch uses a common implementation of cursors in the binary protocol and 
in stored procedures and implements materialized cursors.
For implementation details, see comments in sql_cursor.cc


include/my_sys.h:
  - declaration for multi_alloc_root
libmysqld/Makefile.am:
  - drop protocol_cursor.cc, add sql_cursor.cc (replaces the old
  implementation of cursors with a new one)
mysql-test/r/ctype_ujis.result:
  - test results fixed (a test case for Bug#6513)
mysql-test/r/sp-big.result:
  - test results fixed (a test case for Bug#9819)
mysql-test/t/ctype_ujis.test:
  Add a test case for Bug#6513 "Test Suite: Values inserted by using cursor is
   interpreted latin1 character"
mysql-test/t/sp-big.test:
  Add a restricted test case for Bug#9819 "Cursors: Mysql Server Crash
  while fetching from table with 5 million records."
mysys/my_alloc.c:
  - an implementation of multi_alloc_root; this is largely a copy-paste
    from mulalloc.c, but the function is small and there is no easy way
    to reuse the existing C function.
sql/Makefile.am:
  - add sql_cursor.h, sql_cursor.cc (a new implementation of stored procedure
  cursors) and drop protocol_cursor.cc (the old one)
sql/handler.cc:
  - now TABLE object has its mem_root always initialized.
    Adjust the implementation handler::ha_open
sql/item_subselect.cc:
  - adjust to the changed declaration of st_select_lex_unit::prepare
sql/protocol.h:
  - drop Protocol_cursor
sql/sp_head.cc:
  - move juggling with Query_arena::free_list and Item::next to
    sp_eval_func_item, as this is needed in 3 places already.
sql/sp_head.h:
  - declare a no-op implementation for cleanup_stmt in sp_instr_cpush.
    This method is needed for non-materializing cursors, which are yet not 
    used in stored procedures.
  - declaration for sp_eval_func_item
sql/sp_rcontext.cc:
  - reimplement sp_cursor using the new implementation of server side cursors.
  - use sp_eval_func_item to assign values of SP variables from the
    row fetched from a cursor. This should fix a possible memory leak in 
    the old implementation of sp_cursor::fetch
sql/sp_rcontext.h:
  - reimplement sp_cursor using the new implementation of server side cursors.
sql/sql_class.cc:
  - disable the functionality that closes transient cursors at commit/rollback;
    transient cursors are not used in 5.0, instead we use materialized ones.
    To be enabled in a later version.
sql/sql_class.h:
  - adjust to the rename Cursor -> Server_side_cursor
  - additional declarations of select_union used in materialized cursors
sql/sql_derived.cc:
  - reuse bits of tmp table code in UNION, derived tables, and materialized
    cursors
  - cleanup comments
sql/sql_lex.h:
  - declarations of auxiliary methods used by materialized cursors
  - a cleanup in st_select_lex_unit interface
sql/sql_list.h:
  - add an array operator new[] to class Sql_alloc
sql/sql_prepare.cc:
  - split the tight coupling of cursors and prepared statements to reuse 
    the same implementation in stored procedures
  - cleanups of error processing in Prepared_statement::{prepare,execute}
sql/sql_select.cc:
  - move the implementation of sensitive (non-materializing) cursors to 
    sql_cursor.cc
  - make temporary tables self-contained: the table, its record and fields
    are allocated in TABLE::mem_root. This implementation is not clean
    and resets thd->mem_root several times because of the way create_tmp_table 
    works (many additional things are done inside it).
  - adjust to the changed declaration of st_select_lex_unit::prepare
sql/sql_select.h:
  - move the declaration of sensitive (non-materializing) cursors to 
    sql_cursor.cc
sql/sql_union.cc:
  - move pieces of st_select_unit::prepare to select_union and st_table
    methods to be able to reuse code in the implementation of materialized
    cursors
sql/sql_view.cc:
  - adjust to the changed signature of st_select_lex_unit::prepare
sql/table.cc:
  - implement auxiliary st_table methods for use with temporary tables
sql/table.h:
  - add declarations for auxiliary methods of st_table used to work with 
   temporary tables
tests/mysql_client_test.c:
  - if cursors are materialized, a parallel update of the table used
    in the cursor may go through: update the test.
sql/sql_cursor.cc:
  New BitKeeper file ``sql/sql_cursor.cc'' -- implementation of server side
  cursors
sql/sql_cursor.h:
  New BitKeeper file ``sql/sql_cursor.h'' - declarations for
  server side cursors.
2005-09-22 02:11:21 +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 Save and clear run context before executing a stored function or trigger and restore it afterwards. 2005-08-15 18:15:12 +03: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 Fix build using --without-server. (Bug #11680) 2005-08-23 11:25:24 -07: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#6513 "Test Suite: Values inserted by using 2005-09-22 02:11:21 +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