diff options
author | unknown <konstantin@mysql.com> | 2005-08-10 18:36:13 +0400 |
---|---|---|
committer | unknown <konstantin@mysql.com> | 2005-08-10 18:36:13 +0400 |
commit | 6861b1bf9b804f1dd8490355bb2dc1628a04bf36 (patch) | |
tree | 456848ab2f200b91bb21ed69d717cf36187eabdc /sql/sp.cc | |
parent | cf1a9d3b88a3af1b3582522d3c9702528a70e9a1 (diff) | |
download | mariadb-git-6861b1bf9b804f1dd8490355bb2dc1628a04bf36.tar.gz |
A fix and a test case for Bug#12243 "MySQL Server crashes with 2
cursors (+ commit)" and Bug#11832 "Server crash with InnoDB + Cursors"
See comments to the changed files.
innobase/include/read0read.h:
- add cursor_view_t::n_mysql_tables_in_use
innobase/read/read0read.c:
- maintain cursor_view_t::n_mysql_tables_in_use. InnoDB
maintains trx->n_mysql_tables_in_use to know when it can auto-commit
a read-only statement. When this count drops to zero,
MySQL has ended processing of such statement and InnoDB can commit.
Cursors should not break this invariant, and should exclude the tables
used in a cursor from the count of active tables.
When a cursor is closed, the number of its tables is added back,
to ensure that close_thread_tables->unlock_external->
ha_innobase::external_lock(F_UNLCK) won't drop the count in trx
below zero.
innobase/row/row0sel.c:
- remove the restoration of the global read view from
row_search_for_mysql: MySQL may call row_search_for_mysql
more than once when fetching a row for a cursor (e.g. if there
is a WHERE clause that filters out some rows).
sql/ha_innodb.cc:
- add more verbose printout for the case when we close an InnoDB
connection without priorlly issuing a commit or rollback. The problem
should be investigated.
tests/mysql_client_test.c:
- add a test case for Bug#12243 "MySQL Server crashes with 2 cursors
(+ commit)"
Diffstat (limited to 'sql/sp.cc')
0 files changed, 0 insertions, 0 deletions