Push the patch of Jan Lindstrom: better comments
ha_innodb.cc:
Partial fix for Bug #12263 : we let InnoDB always to perform a rollback on the trx object if MySQL closes a connection; but we do print a warning to the .err log if an InnoDB transaction was active; we may remove that print later, since the situation really is not a bug; MySQL just is not aware that some cursor operation started an InnoDB transaction
cursors for InnoDB. The idea of the patch is that if MySQL requests
a consistent read view, we open one when open a cursor, set is as the
active view to a transaction when fetch from the cursor, and close
together with cursor close. This patch is associated to bugs #11813,
#11832, and #11833. Contains after review fixes.
The idea of the patch
is that every cursor gets its own lock id for table level locking.
Thus cursors are protected from updates performed within the same
connection. Additionally a list of transient (must be closed at
commit) cursors is maintained and all transient cursors are closed
when necessary. Lastly, this patch adds support for deadlock
timeouts to TLL locking when using cursors.
+ post-review fixes.
Fix bug #10359 : the critical AUTO-INC bug in InnoDB; since reading of the auto-inc counter in an INSERT was not protected by the AUTO-INC table lock of InnoDB, two inserted rows could get the same value for the auto-inc counter, leading to a duplicate key error
Semi-synchronous replication for InnoDB type tables; before telling the client that a commit has been processed, wait that the replication thread has returned from my_net_send() where it sends the binlog to the slave; note that TCP/IP, even with the TCP_NODELAY option does not guarantee that the slave has RECEIVED the data - this is just heuristic at the moment; this is useful in failover: in almost all cases, every transaction that has returned from the commit has been sent and processed in the slave, which makes failover to the slave simpler if the master crashes; the code does not work yet as is, because MySQL should call innobase_report_binlog_offset_and_commit() in a commit; we will most probably return that call to 5.0.x, to make InnoDB Hot Backup and group commit to work again; XA code broke them temporarily in 5.0.3
most InnoDB threads are not terminated properly and the buffer pool is not flushed
to disk. Still no committed transaction is lost as we flush the logs to disk.
InnoDB does crash recovery at startup after this shutdown.
Using this shutdown in testsuite (mysql-test-run --mysqld=--innodb_fast_shutdown=2) saved 3 minutes (13% of total time).
Fixed warnings by valgrind for sum_distinct.test
Enable buffered-record-reads after filesort for InnoDB tables with short primary key
Enabled sort-with-data for MyISAM temporary files
Windows to call CreateFileMapping() with correct arguments, and
propogating the introduction of query_id_t to everywhere query ids are
passed around. (Bug #8826)
Logging to logging@openlogging.org accepted
sql_yacc.yy, sql_parse.cc, sql_lex.h, lex.h:
Implements the SHOW MUTEX STATUS command
set_var.cc, mysqld.cc, mysql_priv.h:
Added new GLOBAL variable timed_mutexes
ha_innodb.h:
New function innodb_mutex_show_status
ha_innodb.cc:
Added new innodb variables in SHOW STATUS
Implements the SHOW MUTEX STATUS command
innodb.test, innodb.result:
Added new row_lock_waits status variables tests.
variables.test, variables.result:
test new variable timed_mutexes
ut0ut.c:
New function ut_usectime.
sync0sync.c:
Mutex counting.
sync0rw.c:
New mutex parameters initialization.
srv0srv.c:
Counting row lock waits
row0sel.c, row0mysql.c:
Setting row_lock or table_lock state to thd.
que0que.c:
Added default no_lock_state to thd.
univ.i:
Added UNIV_SRV_PRINT_LATCH_WAITS debug define
sync0sync.ic:
Count mutex using.
sync0sync.h:
Added new parameters to mutex structure for counting.
sync0rw.h:
Added new parameters to rw_create_func.
srv0srv.h:
Added new innodb varuables to SHOW STATUS.
que0que.h:
Added thread lock states.
transactional table locks to tables mentioned in the query. These locks
are released at the end of the transaction automatically.
This is fix for bugs #5655, #5998 and issue #3762.
Renamed HA_VAR_LENGTH to HA_VAR_LENGTH_PART
Renamed in all files FIELD_TYPE_STRING and FIELD_TYPE_VAR_STRING to MYSQL_TYPE_STRING and MYSQL_TYPE_VAR_STRING to make it easy to catch all possible errors
Added support for VARCHAR KEYS to heap
Removed support for ISAM
Now only long VARCHAR columns are changed to TEXT on demand (not CHAR)
Internal temporary files can now use fixed length tables if the used VARCHAR columns are short
enabled query cache for ndb
modified engine interface somewhat
sql/ha_innodb.h
enabled query cache for ndb
modified engine interface somewhat
sql/ha_ndbcluster.cc
enabled query cache for ndb
modified engine interface somewhat
ndb will only allow caching and retrieval if running autocommit
- return false, but do not invalidate
commit count is used as engine data, i.e.
- store commit count before store of cache
- allow retrieval if commit count has not changed on a table
- invalidate if commit count has changed
sql/ha_ndbcluster.h
enabled query cache for ndb
modified engine interface somewhat
sql/handler.cc
enabled query cache for ndb
modified engine interface somewhat
sql/handler.h
enabled query cache for ndb
modified engine interface somewhat
new virtual handler method cached_table_registration called on each table before alowing store in query cache
- return TRUE - ok to cache, FALSE - not allowed to cache, invalidate queries if engine_data below has changed
- sets ulonglong (engine_data) that is stored in query cache for each table
- sets callback to be called for each table before usage of cached query, callback = 0 -> no check later
sql/mysql_priv.h
enabled query cache for ndb
modified engine interface somewhat
callcack prototype for callback to engine before query cache retrieval
sql/sql_cache.cc
enabled query cache for ndb
modified engine interface somewhat
if callback is set on table in cache, do callback to check if allowed to use cache
if not allowed to use cache, check if engine_data has changed, if so, invalidate all queries with that table
+ changes to store and pass callback and engine_data around
sql/sql_cache.h
enabled query cache for ndb
modified engine interface somewhat
changes to store callback and engine_data
sql/table.h
enabled query cache for ndb
modified engine interface somewhat
changes to store callback and engine_data
locks all rows (BUG #3300). When using innobase_locks_unsafe_for_binlog
option InnoDB does not take locks for those rows which do not
belong to the result set or werent changed by the query. This fix removes
unnecessary locks also from SELECT and DELETE queries.