buf_pool->mutex: Rename to buf_pool_mutex, so that the wrappers will have
to be used when changes are merged from other source trees.
buf_pool->zip_mutex: Rename to buf_pool_zip_mutex.
buf_pool_mutex_own(), buf_pool_mutex_enter(), buf_pool_mutex_exit():
Wrappers for buf_pool_mutex.
Change the format of TRX_IDs in INFORMATION_SCHEMA tables from DEC to
HEX.
The current TRX_IDs are hard to remember and track down: 426355, 428466,
428566, etc.
In HEX:
* there are less "digits", the strings are shorter;
* since there are 16 instead of 10 "digits", the chance of having
repeating ones are smaller.
The above look like 68173, 689B2, 68A16 in HEX.
Discussed with: Ken
Approved by: Heikki (via IM)
* Change terminology:
wait lock -> requested lock
waited lock -> blocking lock
new: requesting transaction (the trx what owns the requested lock)
new: blocking transaction (the trx that owns the blocking lock)
* Add transaction ids to INFORMATION_SCHEMA.INNODB_LOCK_WAITS. This is
somewhat redundant because transaction ids can be found in INNODB_LOCKS
(which can be joined with INNODB_LOCK_WAITS) but would help users to
write shorter joins (one table less) in some cases where they want to
find which transaction is blocking which.
Suggested by: Ken
Approved by: Heikki
Fix the size of the static buffer for lock_table and lock_index.
I was not realizing that NAME_LEN contains the mbmaxlen multiplier and thus
a quote, when converted to 2 quotes, will take 2 bytes while there are 3
bytes reserved.
Spotted by: Marko
Pointyhat to: Vasil
Bugfix1: Set innodb_locks.lock_index to NOT NULL.
If a column in INFORMATION_SCHEMA table has the flag
MY_I_S_MAYBE_NULL and it is not explicitly marked as NOT NULL
with the method ::set_notnull() then it is always rendered as
NULL by MySQL.
Bugfix2: Avoid crashes if lock_index is NULL. It is NULL for table
level locks.
Pointyhat to: Marko
innodb_information_schema.test. Add tests that display most columns from
INFORMATION_SCHEMA.INNODB_LOCKS. Test that quoting of table names works
and respects SQL_MODE='ANSI_QUOTES'.
innobase_print_identifier(): Remove.
innobase_convert_identifier(): New function,
based on innobase_print_identifier().
innobase_convert_name(): New function, similar to ut_print_namel(), but
using a memory buffer.
ut_print_namel(): Use innobase_convert_name().
fill_innodb_locks_from_cache(): Convert lock_table and lock_index by
calling innobase_convert_name().
Implement a limit on the memory used by the INNODB_TRX, INNODB_LOCKS and
INNODB_LOCK_WAITS tables. The maximum allowed memory is defined with the
macro TRX_I_S_MEM_LIMIT.
Approved by: Marko (via IM)
Add the query in information_schema.innodb_trx.trx_query. Add it even
though it is available in information_schema.processlist.info to make
inconsistencies between those two tables obvious.
It is rather confusting to see a transaction shown in innodb_trx and
innodb_locks that holds a lock on one table and the corresponding query
in processlist executing INSERT on another table. We do not want users
to contact us asking to explain that. It is caused by the fact that the
data for innodb_* tables and processlist is fetched at different time.
Approved by: Marko
ha_innobase::write_row(): The printf format %p expects const void*.
STRUCT_FLD: Do not use the GCC extension when __STRICT_ANSI__ is defined.
row_merge_read_clustered_index(): Compound initializers must not contain
variables. Assign to struct fields instead.
Add innodb_locks.lock_data column and some relevant tests.
For record locks this column represents the ordering fields of the
locked row in a human readable, SQL-valid, format.
Approved by: Marko
INNODB_ZIP and INNODB_ZIP_RESET from ha_innodb.cc to i_s.cc.
plugin_author, END_OF_ST_FIELD_INFO, i_s_info: New common constants.
trx_i_s_common_deinit(): Renamed to i_s_common_deinit().
innodb_lock_waits. See
https://svn.innodb.com/innobase/InformationSchema/TransactionsAndLocks
for design notes.
Things that need to be resolved before this goes live:
* MySQL must add thd_get_thread_id() function to their code
http://bugs.mysql.com/30930
* Allocate memory from mem_heap instead of using mem_alloc()
* Copy table name and index name into the cache because they may be
freed later which will result in referencing freed memory
Approved by: Marko