#At file:///usr/local/devel/bzrroot/server/mysql-next-mr-innodb/ based on revid:vasil.dimov@stripped
3247 Vasil Dimov 2010-09-21 [merge]
Merge mysql-trunk-innodb -> mysql-next-mr-innodb
removed:
mysql-test/suite/innodb/r/innodb-system-table-view.result
mysql-test/suite/innodb/t/innodb-system-table-view-master.opt
mysql-test/suite/innodb/t/innodb-system-table-view.test
storage/innobase/COPYING
storage/innobase/COPYING.Sun_Microsystems
storage/innobase/include/ut0auxconf.h
storage/innobase/ut/ut0auxconf_atomic_pthread_t_gcc.c
storage/innobase/ut/ut0auxconf_atomic_pthread_t_solaris.c
storage/innobase/ut/ut0auxconf_have_gcc_atomics.c
storage/innobase/ut/ut0auxconf_have_solaris_atomics.c
storage/innobase/ut/ut0auxconf_pause.c
storage/innobase/ut/ut0auxconf_sizeof_pthread_t.c
modified:
mysql-test/r/mysqlshow.result
mysql-test/suite/innodb/r/innodb_monitor.result
mysql-test/suite/innodb/t/innodb_monitor.test
mysql-test/suite/sys_vars/r/all_vars.result
storage/innobase/CMakeLists.txt
storage/innobase/Doxyfile
storage/innobase/Makefile.am
storage/innobase/btr/btr0btr.c
storage/innobase/btr/btr0cur.c
storage/innobase/btr/btr0pcur.c
storage/innobase/btr/btr0sea.c
storage/innobase/buf/buf0buf.c
storage/innobase/buf/buf0flu.c
storage/innobase/buf/buf0rea.c
storage/innobase/compile-innodb
storage/innobase/dict/dict0crea.c
storage/innobase/dict/dict0dict.c
storage/innobase/eval/eval0eval.c
storage/innobase/handler/ha_innodb.cc
storage/innobase/handler/i_s.cc
storage/innobase/handler/i_s.h
storage/innobase/ibuf/ibuf0ibuf.c
storage/innobase/include/dict0boot.h
storage/innobase/include/dict0types.h
storage/innobase/include/rem0rec.h
storage/innobase/include/srv0mon.h
storage/innobase/include/univ.i
storage/innobase/include/ut0rnd.ic
storage/innobase/log/log0recv.c
storage/innobase/os/os0file.c
storage/innobase/que/que0que.c
storage/innobase/row/row0purge.c
storage/innobase/row/row0umod.c
storage/innobase/row/row0vers.c
storage/innobase/srv/srv0mon.c
storage/innobase/srv/srv0start.c
storage/innobase/trx/trx0purge.c
storage/innobase/trx/trx0roll.c
storage/innobase/trx/trx0sys.c
storage/innobase/trx/trx0trx.c
storage/innobase/trx/trx0undo.c
=== modified file 'mysql-test/r/mysqlshow.result'
--- a/mysql-test/r/mysqlshow.result revid:vasil.dimov@stripped
+++ b/mysql-test/r/mysqlshow.result revid:vasil.dimov@stripped
@@ -109,21 +109,14 @@ Database: information_schema
| TRIGGERS |
| USER_PRIVILEGES |
| VIEWS |
-| INNODB_SYS_FIELDS |
+| INNODB_CMP_RESET |
| INNODB_TRX |
-| INNODB_SYS_COLUMNS |
+| INNODB_CMPMEM_RESET |
| INNODB_LOCK_WAITS |
-| INNODB_SYS_TABLESTATS |
+| INNODB_CMPMEM |
| INNODB_CMP |
| INNODB_METRICS |
-| INNODB_CMP_RESET |
-| INNODB_SYS_FOREIGN_COLS |
| INNODB_LOCKS |
-| INNODB_CMPMEM_RESET |
-| INNODB_CMPMEM |
-| INNODB_SYS_FOREIGN |
-| INNODB_SYS_TABLES |
-| INNODB_SYS_INDEXES |
+---------------------------------------+
Database: INFORMATION_SCHEMA
+---------------------------------------+
@@ -159,21 +152,14 @@ Database: INFORMATION_SCHEMA
| TRIGGERS |
| USER_PRIVILEGES |
| VIEWS |
-| INNODB_SYS_FIELDS |
+| INNODB_CMP_RESET |
| INNODB_TRX |
-| INNODB_SYS_COLUMNS |
+| INNODB_CMPMEM_RESET |
| INNODB_LOCK_WAITS |
-| INNODB_SYS_TABLESTATS |
+| INNODB_CMPMEM |
| INNODB_CMP |
| INNODB_METRICS |
-| INNODB_CMP_RESET |
-| INNODB_SYS_FOREIGN_COLS |
| INNODB_LOCKS |
-| INNODB_CMPMEM_RESET |
-| INNODB_CMPMEM |
-| INNODB_SYS_FOREIGN |
-| INNODB_SYS_TABLES |
-| INNODB_SYS_INDEXES |
+---------------------------------------+
Wildcard: inf_rmation_schema
+--------------------+
=== removed file 'mysql-test/suite/innodb/r/innodb-system-table-view.result'
--- a/mysql-test/suite/innodb/r/innodb-system-table-view.result revid:vasil.dimov@stripped
+++ b/mysql-test/suite/innodb/r/innodb-system-table-view.result 1970-01-01 00:00:00 +0000
@@ -1,110 +0,0 @@
-SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES;
-TABLE_ID NAME FLAG N_COLS SPACE
-11 SYS_FOREIGN 0 7 0
-12 SYS_FOREIGN_COLS 0 7 0
-SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_INDEXES;
-INDEX_ID NAME TABLE_ID TYPE N_FIELDS PAGE_NO SPACE
-11 ID_IND 11 3 1 302 0
-12 FOR_IND 11 0 1 303 0
-13 REF_IND 11 0 1 304 0
-14 ID_IND 12 3 2 305 0
-SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS;
-TABLE_ID NAME POS MTYPE PRTYPE LEN
-11 ID 0 1 524292 0
-11 FOR_NAME 1 1 524292 0
-11 REF_NAME 2 1 524292 0
-11 N_COLS 3 6 0 4
-12 ID 0 1 524292 0
-12 POS 1 6 0 4
-12 FOR_COL_NAME 2 1 524292 0
-12 REF_COL_NAME 3 1 524292 0
-SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FIELDS;
-INDEX_ID NAME POS
-11 ID 0
-12 FOR_NAME 0
-13 REF_NAME 0
-14 ID 0
-14 POS 1
-SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN;
-ID FOR_NAME REF_NAME N_COLS TYPE
-SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS;
-ID FOR_COL_NAME REF_COL_NAME POS
-SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS;
-TABLE_ID NAME STATS_INITIALIZED NUM_ROWS CLUST_INDEX_SIZE OTHER_INDEX_SIZE MODIFIED_COUNTER AUTOINC MYSQL_HANDLES_OPENED
-11 SYS_FOREIGN Uninitialized 0 0 0 0 0 0
-12 SYS_FOREIGN_COLS Uninitialized 0 0 0 0 0 0
-CREATE TABLE parent (id INT NOT NULL,
-PRIMARY KEY (id)) ENGINE=INNODB;
-CREATE TABLE child (id INT, parent_id INT,
-INDEX par_ind (parent_id),
-CONSTRAINT constraint_test
-FOREIGN KEY (parent_id) REFERENCES parent(id)
-ON DELETE CASCADE) ENGINE=INNODB;
-SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN;
-ID FOR_NAME REF_NAME N_COLS TYPE
-test/constraint_test test/child test/parent 1 1
-SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS;
-ID FOR_COL_NAME REF_COL_NAME POS
-test/constraint_test parent_id id 0
-INSERT INTO parent VALUES(1);
-SELECT name, num_rows, mysql_handles_opened
-FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
-WHERE name LIKE "%parent";
-name num_rows mysql_handles_opened
-test/parent 1 1
-SELECT NAME, FLAG, N_COLS, SPACE FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES;
-NAME FLAG N_COLS SPACE
-SYS_FOREIGN 0 7 0
-SYS_FOREIGN_COLS 0 7 0
-test/child 1 5 0
-test/parent 1 4 0
-SELECT name, n_fields
-from INFORMATION_SCHEMA.INNODB_SYS_INDEXES
-WHERE table_id In (SELECT table_id from
-INFORMATION_SCHEMA.INNODB_SYS_TABLES
-WHERE name LIKE "%parent%");
-name n_fields
-PRIMARY 1
-SELECT name, n_fields
-from INFORMATION_SCHEMA.INNODB_SYS_INDEXES
-WHERE table_id In (SELECT table_id from
-INFORMATION_SCHEMA.INNODB_SYS_TABLES
-WHERE name LIKE "%child%");
-name n_fields
-GEN_CLUST_INDEX 0
-par_ind 1
-SELECT name, pos, mtype, len
-from INFORMATION_SCHEMA.INNODB_SYS_COLUMNS
-WHERE table_id In (SELECT table_id from
-INFORMATION_SCHEMA.INNODB_SYS_TABLES
-WHERE name LIKE "%child%");
-name pos mtype len
-id 0 6 4
-parent_id 1 6 4
-DROP TABLE child;
-DROP TABLE parent;
-CREATE TABLE parent (id INT NOT NULL, newid INT NOT NULL,
-PRIMARY KEY (id, newid)) ENGINE=INNODB;
-CREATE TABLE child (id INT, parent_id INT,
-INDEX par_ind (parent_id),
-CONSTRAINT constraint_test
-FOREIGN KEY (id, parent_id) REFERENCES parent(id, newid)
-ON DELETE CASCADE) ENGINE=INNODB;
-SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN;
-ID FOR_NAME REF_NAME N_COLS TYPE
-test/constraint_test test/child test/parent 2 1
-SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS;
-ID FOR_COL_NAME REF_COL_NAME POS
-test/constraint_test id id 0
-test/constraint_test parent_id newid 1
-INSERT INTO parent VALUES(1, 9);
-SELECT * FROM parent WHERE id IN (SELECT id FROM parent);
-id newid
-1 9
-SELECT name, num_rows, mysql_handles_opened
-FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
-WHERE name LIKE "%parent";
-name num_rows mysql_handles_opened
-test/parent 1 2
-DROP TABLE child;
-DROP TABLE parent;
=== modified file 'mysql-test/suite/innodb/r/innodb_monitor.result'
--- a/mysql-test/suite/innodb/r/innodb_monitor.result revid:vasil.dimov@stripped
+++ b/mysql-test/suite/innodb/r/innodb_monitor.result revid:vasil.dimov@stripped
@@ -1,573 +1,733 @@
select * from information_schema.innodb_metrics;
-name subsystem value_since_start max_since_start min_since_start avg_since_start value_since_reset max_since_reset min_since_reset avg_since_reset start_time stop_time reset_time status type description
-server_table_open Server Metadata 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Number of table handler opened
-server_table_close Server Metadata 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Number of table handler closed
-lock_deadlock_count Lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Number of deadlocks
-lock_timeout Lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Number of lock timeout
-lock_lockrec_wait Lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Number of times wait for record lock
-lock_lockrec_request Lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Number of record lock requested
-lock_lockrec_created Lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Number of record lock created
-lock_lockrec_removed Lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Number of record lock destroyed
-lock_num_lockrec Lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Total number of record locks
-lock_tablelock_created Lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Number of table locks created
-lock_tablelock_removed Lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Number of table lock destroyed
-lock_num_tablelock Lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Total number of table locks
-lock_row_lock_current_wait Lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Current row lock wait
-lock_row_lock_wait_time Lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Time waited for lock acquisition
-lock_row_lock_wait Lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Total row lock waits
-buffer_reads Buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Number of reads from disk
-buffer_read_request Buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Number of read requests
-buffer_write_request Buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Number of write requests
-buffer_page_in_flush Buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Number of pages in flush list
-buffer_wait_free Buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Number of times wait for free buffer
-buffer_read_ahead Buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Number of pages read as read ahead
-buffer_read_ahead_evict Buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Read ahead pages evicted without being accessed
-buffer_pool_total_page Buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped current_value Total buffer pool pages
-buffer_pool_page_misc Buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped current_value Buffer pages for misc use
-buffer_pool_page_data Buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped current_value Buffer pages contain data
-buffer_pool_page_dirty Buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped current_value Buffer pages currently dirty
-buffer_pool_page_free Buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped current_value Buffer pages currently free
-buffer_page_created Buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Number of pages created
-buffer_page_written Buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Number of pages written
-buffer_page_read Buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Number of pages read
-buffer_byte_read Buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Amount data read in bytes
-buffer_byte_written Buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Amount data written in bytes
-os_num_reads OS 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Number of reads initiated
-os_num_writes OS 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Number of writes inititated
-os_num_fsync OS 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Number of fsync() call
-os_num_pending_reads OS 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Number of reads pending
-os_num_pending_writes OS 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Number of writes pending
-os_log_byte_written Recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Bytes of log written
-os_log_fsync Recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Number of fsync log writes
-os_log_pending_fsync Recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Number of pending fsync write
-os_log_pending_write Recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Number of pending log file writes
-trx_num_commit Transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Number of transactions committed
-trx_num_abort Transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Number of transactions aborted
-trx_active_trx Transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Number of active transactions
-trx_num_row_purged Transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Number of rows purged
-trx_purge_delay DML 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped current_value microseconds DML to be delayed due to purge lagging
-trx_rseg_history_len Transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped current_value Length of the TRX_RSEG_HISTORY list
-log_num_checkpoint Recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Number of checkpoints
-log_lsn_last_flush Recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Last flush's LSN
-log_lsn_last_checkpoint Recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value LSN at last checkpoint
-log_current_lsn Recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Current LSN value
-log_pending_log_write Recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped current_value Pending Log Writes
-log_pending_checkpoint Recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Pending Checkpoints
-log_num_log_io Recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Number of log I/Os
-log_waits Recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Number of log waits due to small log buffer
-log_write_request Recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Number of log write requests
-log_writes Recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Number of log writes
-log_flush_io_capacity Recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped current_value Percent of Server IO capacity during flushing
-log_flush_dirty_page_exceed Recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Number of flush calls when the max dirty page pct was hit
-compress_num_page_compressed Compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Number of page compressed
-compress_num_page_decompressed Compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Number of page decompressed
-index_num_split Index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Number of index split
-index_num_merge Index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Number of index merge
-fil_system_num_open_file Tablespace 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped current_value Number of files currently open
-dml_num_reads DML 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Number of rows read
-dml_num_inserts DML 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Number of rows inserted
-dml_num_deletes DML 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Number of rows deleted
-dml_updates DML 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL stopped counter_value Number of rows updated
+NAME SUBSYSTEM COUNT MAX_COUNT MIN_COUNT AVG_COUNT COUNT_SINCE_RESET MAX_COUNT_SINCE_RESET MIN_COUNT_SINCE_RESET AVG_COUNT_SINCE_RESET TIME_ENABLED TIME_DISABLED TIME_RESET STATUS TYPE COMMENT
+metadata_table_opened Server Metadata 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of table handler opened
+metadata_table_closed Server Metadata 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of table handler closed
+lock_deadlock_count Lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of deadlocks
+lock_timeout Lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of lock timeout
+lock_lockrec_wait Lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of times wait for record lock
+lock_lockrec_request Lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of record lock requested
+lock_lockrec_created Lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of record lock created
+lock_lockrec_removed Lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of record lock destroyed
+lock_num_lockrec Lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Total number of record locks
+lock_tablelock_created Lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of table locks created
+lock_tablelock_removed Lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of table lock destroyed
+lock_num_tablelock Lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Total number of table locks
+lock_row_lock_current_wait Lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Current row lock wait
+lock_row_lock_wait_time Lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Time waited for lock acquisition
+lock_row_lock_wait Lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Total row lock waits
+buffer_reads Buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of reads from disk
+buffer_read_request Buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of read requests
+buffer_write_request Buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of write requests
+buffer_page_in_flush Buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of pages in flush list
+buffer_wait_free Buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of times wait for free buffer
+buffer_read_ahead Buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of pages read as read ahead
+buffer_read_ahead_evict Buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Read ahead pages evicted without being accessed
+buffer_pool_total_page Buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled value Total buffer pool pages
+buffer_pool_page_misc Buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled value Buffer pages for misc use
+buffer_pool_page_data Buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled value Buffer pages contain data
+buffer_pool_page_dirty Buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled value Buffer pages currently dirty
+buffer_pool_page_free Buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled value Buffer pages currently free
+buffer_page_created Buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of pages created
+buffer_page_written Buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of pages written
+buffer_page_read Buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of pages read
+buffer_byte_read Buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Amount data read in bytes
+buffer_byte_written Buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Amount data written in bytes
+buf_page_read_index_leaf Buffer Page I/O 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of Index Leaf Pages read
+buf_page_read_index_non_leaf Buffer Page I/O 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of Index Non-leaf Pages read
+buf_page_read_index_ibuf_leaf Buffer Page I/O 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of Insert Buffer Index Leaf Pages read
+buf_page_read_index_ibuf_non_leaf Buffer Page I/O 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of Insert Buffer Index Non-Leaf Pages read
+buf_page_read_undo_log Buffer Page I/O 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of Undo Log Pages read
+buf_page_read_index_inode Buffer Page I/O 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of Index Inode Pages read
+buf_page_read_ibuf_free_list Buffer Page I/O 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of Insert Buffer Free List Pages read
+buf_page_read_ibuf_bitmap Buffer Page I/O 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of Insert Buffer Bitmap Pages read
+buf_page_read_system_page Buffer Page I/O 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of System Pages Pages read
+buf_page_read_trx_system Buffer Page I/O 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of Transaction System Pages read
+buf_page_read_fsp_hdr Buffer Page I/O 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of File Space Header Pages read
+buf_page_read_xdes Buffer Page I/O 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of Extent Descriptor Pages read
+buf_page_read_blob Buffer Page I/O 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of Uncompressed Blob Pages read
+buf_page_read_zblob Buffer Page I/O 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of First Compressed Blob Pages read
+buf_page_read_zblob2 Buffer Page I/O 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of Subsequent Compressed Blob Pages read
+buf_page_read_other Buffer Page I/O 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of other/unknown (old version InnoDB) Pages read
+buf_page_written_index_leaf Buffer Page I/O 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of Index Leaf Pages written
+buf_page_written_index_non_leaf Buffer Page I/O 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of Index Non-leaf Pages written
+buf_page_written_index_ibuf_leaf Buffer Page I/O 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of Insert Buffer Index Leaf Pages written
+buf_page_written_index_ibuf_non_leaf Buffer Page I/O 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of Insert Buffer Index Non-Leaf Pages written
+buf_page_written_undo_log Buffer Page I/O 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of Undo Log Pages written
+buf_page_written_index_inode Buffer Page I/O 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of Index Inode Pages written
+buf_page_written_ibuf_free_list Buffer Page I/O 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of Insert Buffer Free List Pages written
+buf_page_written_ibuf_bitmap Buffer Page I/O 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of Insert Buffer Bitmap Pages written
+buf_page_written_system_page Buffer Page I/O 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of System Pages Pages written
+buf_page_written_trx_system Buffer Page I/O 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of Transaction System Pages written
+buf_page_written_fsp_hdr Buffer Page I/O 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of File Space Header Pages written
+buf_page_written_xdes Buffer Page I/O 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of Extent Descriptor Pages written
+buf_page_written_blob Buffer Page I/O 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of Uncompressed Blob Pages written
+buf_page_written_zblob Buffer Page I/O 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of First Compressed Blob Pages written
+buf_page_written_zblob2 Buffer Page I/O 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of Subsequent Compressed Blob Pages written
+buf_page_written_other Buffer Page I/O 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of other/unknown (old version InnoDB) Pages written
+os_num_reads OS 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of reads initiated
+os_num_writes OS 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of writes inititated
+os_num_fsync OS 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of fsync() call
+os_num_pending_reads OS 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of reads pending
+os_num_pending_writes OS 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of writes pending
+os_log_byte_written Recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Bytes of log written
+os_log_fsync Recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of fsync log writes
+os_log_pending_fsync Recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of pending fsync write
+os_log_pending_write Recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of pending log file writes
+trx_num_commit Transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of transactions committed
+trx_num_abort Transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of transactions aborted
+trx_active_trx Transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of active transactions
+trx_num_row_purged Transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of rows purged
+trx_purge_delay DML 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled value microseconds DML to be delayed due to purge lagging
+trx_rseg_history_len Transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled value Length of the TRX_RSEG_HISTORY list
+log_num_checkpoint Recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of checkpoints
+log_lsn_last_flush Recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Last flush's LSN
+log_lsn_last_checkpoint Recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter LSN at last checkpoint
+log_current_lsn Recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Current LSN value
+log_pending_log_write Recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled value Pending Log Writes
+log_pending_checkpoint Recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Pending Checkpoints
+log_num_log_io Recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of log I/Os
+log_waits Recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of log waits due to small log buffer
+log_write_request Recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of log write requests
+log_writes Recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of log writes
+log_flush_io_capacity Recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled value Percent of Server IO capacity during flushing
+log_flush_dirty_page_exceed Recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of flush calls when the max dirty page pct was hit
+compress_num_page_compressed Compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of page compressed
+compress_num_page_decompressed Compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of page decompressed
+index_num_split Index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of index split
+index_num_merge Index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of index merge
+fil_system_num_open_file Tablespace 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled value Number of files currently open
+dml_num_reads DML 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of rows read
+dml_num_inserts DML 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of rows inserted
+dml_num_deletes DML 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of rows deleted
+dml_updates DML 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL disabled counter Number of rows updated
select name, status from information_schema.innodb_metrics;
name status
-server_table_open stopped
-server_table_close stopped
-lock_deadlock_count stopped
-lock_timeout stopped
-lock_lockrec_wait stopped
-lock_lockrec_request stopped
-lock_lockrec_created stopped
-lock_lockrec_removed stopped
-lock_num_lockrec stopped
-lock_tablelock_created stopped
-lock_tablelock_removed stopped
-lock_num_tablelock stopped
-lock_row_lock_current_wait stopped
-lock_row_lock_wait_time stopped
-lock_row_lock_wait stopped
-buffer_reads stopped
-buffer_read_request stopped
-buffer_write_request stopped
-buffer_page_in_flush stopped
-buffer_wait_free stopped
-buffer_read_ahead stopped
-buffer_read_ahead_evict stopped
-buffer_pool_total_page stopped
-buffer_pool_page_misc stopped
-buffer_pool_page_data stopped
-buffer_pool_page_dirty stopped
-buffer_pool_page_free stopped
-buffer_page_created stopped
-buffer_page_written stopped
-buffer_page_read stopped
-buffer_byte_read stopped
-buffer_byte_written stopped
-os_num_reads stopped
-os_num_writes stopped
-os_num_fsync stopped
-os_num_pending_reads stopped
-os_num_pending_writes stopped
-os_log_byte_written stopped
-os_log_fsync stopped
-os_log_pending_fsync stopped
-os_log_pending_write stopped
-trx_num_commit stopped
-trx_num_abort stopped
-trx_active_trx stopped
-trx_num_row_purged stopped
-trx_purge_delay stopped
-trx_rseg_history_len stopped
-log_num_checkpoint stopped
-log_lsn_last_flush stopped
-log_lsn_last_checkpoint stopped
-log_current_lsn stopped
-log_pending_log_write stopped
-log_pending_checkpoint stopped
-log_num_log_io stopped
-log_waits stopped
-log_write_request stopped
-log_writes stopped
-log_flush_io_capacity stopped
-log_flush_dirty_page_exceed stopped
-compress_num_page_compressed stopped
-compress_num_page_decompressed stopped
-index_num_split stopped
-index_num_merge stopped
-fil_system_num_open_file stopped
-dml_num_reads stopped
-dml_num_inserts stopped
-dml_num_deletes stopped
-dml_updates stopped
-set global innodb_monitor_counter_on = all;
+metadata_table_opened disabled
+metadata_table_closed disabled
+lock_deadlock_count disabled
+lock_timeout disabled
+lock_lockrec_wait disabled
+lock_lockrec_request disabled
+lock_lockrec_created disabled
+lock_lockrec_removed disabled
+lock_num_lockrec disabled
+lock_tablelock_created disabled
+lock_tablelock_removed disabled
+lock_num_tablelock disabled
+lock_row_lock_current_wait disabled
+lock_row_lock_wait_time disabled
+lock_row_lock_wait disabled
+buffer_reads disabled
+buffer_read_request disabled
+buffer_write_request disabled
+buffer_page_in_flush disabled
+buffer_wait_free disabled
+buffer_read_ahead disabled
+buffer_read_ahead_evict disabled
+buffer_pool_total_page disabled
+buffer_pool_page_misc disabled
+buffer_pool_page_data disabled
+buffer_pool_page_dirty disabled
+buffer_pool_page_free disabled
+buffer_page_created disabled
+buffer_page_written disabled
+buffer_page_read disabled
+buffer_byte_read disabled
+buffer_byte_written disabled
+buf_page_read_index_leaf disabled
+buf_page_read_index_non_leaf disabled
+buf_page_read_index_ibuf_leaf disabled
+buf_page_read_index_ibuf_non_leaf disabled
+buf_page_read_undo_log disabled
+buf_page_read_index_inode disabled
+buf_page_read_ibuf_free_list disabled
+buf_page_read_ibuf_bitmap disabled
+buf_page_read_system_page disabled
+buf_page_read_trx_system disabled
+buf_page_read_fsp_hdr disabled
+buf_page_read_xdes disabled
+buf_page_read_blob disabled
+buf_page_read_zblob disabled
+buf_page_read_zblob2 disabled
+buf_page_read_other disabled
+buf_page_written_index_leaf disabled
+buf_page_written_index_non_leaf disabled
+buf_page_written_index_ibuf_leaf disabled
+buf_page_written_index_ibuf_non_leaf disabled
+buf_page_written_undo_log disabled
+buf_page_written_index_inode disabled
+buf_page_written_ibuf_free_list disabled
+buf_page_written_ibuf_bitmap disabled
+buf_page_written_system_page disabled
+buf_page_written_trx_system disabled
+buf_page_written_fsp_hdr disabled
+buf_page_written_xdes disabled
+buf_page_written_blob disabled
+buf_page_written_zblob disabled
+buf_page_written_zblob2 disabled
+buf_page_written_other disabled
+os_num_reads disabled
+os_num_writes disabled
+os_num_fsync disabled
+os_num_pending_reads disabled
+os_num_pending_writes disabled
+os_log_byte_written disabled
+os_log_fsync disabled
+os_log_pending_fsync disabled
+os_log_pending_write disabled
+trx_num_commit disabled
+trx_num_abort disabled
+trx_active_trx disabled
+trx_num_row_purged disabled
+trx_purge_delay disabled
+trx_rseg_history_len disabled
+log_num_checkpoint disabled
+log_lsn_last_flush disabled
+log_lsn_last_checkpoint disabled
+log_current_lsn disabled
+log_pending_log_write disabled
+log_pending_checkpoint disabled
+log_num_log_io disabled
+log_waits disabled
+log_write_request disabled
+log_writes disabled
+log_flush_io_capacity disabled
+log_flush_dirty_page_exceed disabled
+compress_num_page_compressed disabled
+compress_num_page_decompressed disabled
+index_num_split disabled
+index_num_merge disabled
+fil_system_num_open_file disabled
+dml_num_reads disabled
+dml_num_inserts disabled
+dml_num_deletes disabled
+dml_updates disabled
+set global innodb_enable_monitor_counter = all;
select name, status from information_schema.innodb_metrics;
name status
-server_table_open started
-server_table_close started
-lock_deadlock_count started
-lock_timeout started
-lock_lockrec_wait started
-lock_lockrec_request started
-lock_lockrec_created started
-lock_lockrec_removed started
-lock_num_lockrec started
-lock_tablelock_created started
-lock_tablelock_removed started
-lock_num_tablelock started
-lock_row_lock_current_wait started
-lock_row_lock_wait_time started
-lock_row_lock_wait started
-buffer_reads started
-buffer_read_request started
-buffer_write_request started
-buffer_page_in_flush started
-buffer_wait_free started
-buffer_read_ahead started
-buffer_read_ahead_evict started
-buffer_pool_total_page started
-buffer_pool_page_misc started
-buffer_pool_page_data started
-buffer_pool_page_dirty started
-buffer_pool_page_free started
-buffer_page_created started
-buffer_page_written started
-buffer_page_read started
-buffer_byte_read started
-buffer_byte_written started
-os_num_reads started
-os_num_writes started
-os_num_fsync started
-os_num_pending_reads started
-os_num_pending_writes started
-os_log_byte_written started
-os_log_fsync started
-os_log_pending_fsync started
-os_log_pending_write started
-trx_num_commit started
-trx_num_abort started
-trx_active_trx started
-trx_num_row_purged started
-trx_purge_delay started
-trx_rseg_history_len started
-log_num_checkpoint started
-log_lsn_last_flush started
-log_lsn_last_checkpoint started
-log_current_lsn started
-log_pending_log_write started
-log_pending_checkpoint started
-log_num_log_io started
-log_waits started
-log_write_request started
-log_writes started
-log_flush_io_capacity started
-log_flush_dirty_page_exceed started
-compress_num_page_compressed started
-compress_num_page_decompressed started
-index_num_split started
-index_num_merge started
-fil_system_num_open_file started
-dml_num_reads started
-dml_num_inserts started
-dml_num_deletes started
-dml_updates started
-set global innodb_monitor_counter_on = aaa;
-ERROR 42000: Variable 'innodb_monitor_counter_on' can't be set to the value of 'aaa'
-set global innodb_monitor_counter_off = All;
+metadata_table_opened enabled
+metadata_table_closed enabled
+lock_deadlock_count enabled
+lock_timeout enabled
+lock_lockrec_wait enabled
+lock_lockrec_request enabled
+lock_lockrec_created enabled
+lock_lockrec_removed enabled
+lock_num_lockrec enabled
+lock_tablelock_created enabled
+lock_tablelock_removed enabled
+lock_num_tablelock enabled
+lock_row_lock_current_wait enabled
+lock_row_lock_wait_time enabled
+lock_row_lock_wait enabled
+buffer_reads enabled
+buffer_read_request enabled
+buffer_write_request enabled
+buffer_page_in_flush enabled
+buffer_wait_free enabled
+buffer_read_ahead enabled
+buffer_read_ahead_evict enabled
+buffer_pool_total_page enabled
+buffer_pool_page_misc enabled
+buffer_pool_page_data enabled
+buffer_pool_page_dirty enabled
+buffer_pool_page_free enabled
+buffer_page_created enabled
+buffer_page_written enabled
+buffer_page_read enabled
+buffer_byte_read enabled
+buffer_byte_written enabled
+buf_page_read_index_leaf enabled
+buf_page_read_index_non_leaf enabled
+buf_page_read_index_ibuf_leaf enabled
+buf_page_read_index_ibuf_non_leaf enabled
+buf_page_read_undo_log enabled
+buf_page_read_index_inode enabled
+buf_page_read_ibuf_free_list enabled
+buf_page_read_ibuf_bitmap enabled
+buf_page_read_system_page enabled
+buf_page_read_trx_system enabled
+buf_page_read_fsp_hdr enabled
+buf_page_read_xdes enabled
+buf_page_read_blob enabled
+buf_page_read_zblob enabled
+buf_page_read_zblob2 enabled
+buf_page_read_other enabled
+buf_page_written_index_leaf enabled
+buf_page_written_index_non_leaf enabled
+buf_page_written_index_ibuf_leaf enabled
+buf_page_written_index_ibuf_non_leaf enabled
+buf_page_written_undo_log enabled
+buf_page_written_index_inode enabled
+buf_page_written_ibuf_free_list enabled
+buf_page_written_ibuf_bitmap enabled
+buf_page_written_system_page enabled
+buf_page_written_trx_system enabled
+buf_page_written_fsp_hdr enabled
+buf_page_written_xdes enabled
+buf_page_written_blob enabled
+buf_page_written_zblob enabled
+buf_page_written_zblob2 enabled
+buf_page_written_other enabled
+os_num_reads enabled
+os_num_writes enabled
+os_num_fsync enabled
+os_num_pending_reads enabled
+os_num_pending_writes enabled
+os_log_byte_written enabled
+os_log_fsync enabled
+os_log_pending_fsync enabled
+os_log_pending_write enabled
+trx_num_commit enabled
+trx_num_abort enabled
+trx_active_trx enabled
+trx_num_row_purged enabled
+trx_purge_delay enabled
+trx_rseg_history_len enabled
+log_num_checkpoint enabled
+log_lsn_last_flush enabled
+log_lsn_last_checkpoint enabled
+log_current_lsn enabled
+log_pending_log_write enabled
+log_pending_checkpoint enabled
+log_num_log_io enabled
+log_waits enabled
+log_write_request enabled
+log_writes enabled
+log_flush_io_capacity enabled
+log_flush_dirty_page_exceed enabled
+compress_num_page_compressed enabled
+compress_num_page_decompressed enabled
+index_num_split enabled
+index_num_merge enabled
+fil_system_num_open_file enabled
+dml_num_reads enabled
+dml_num_inserts enabled
+dml_num_deletes enabled
+dml_updates enabled
+set global innodb_enable_monitor_counter = aaa;
+ERROR 42000: Variable 'innodb_enable_monitor_counter' can't be set to the value of 'aaa'
+set global innodb_disable_monitor_counter = All;
select name, status from information_schema.innodb_metrics;
name status
-server_table_open stopped
-server_table_close stopped
-lock_deadlock_count stopped
-lock_timeout stopped
-lock_lockrec_wait stopped
-lock_lockrec_request stopped
-lock_lockrec_created stopped
-lock_lockrec_removed stopped
-lock_num_lockrec stopped
-lock_tablelock_created stopped
-lock_tablelock_removed stopped
-lock_num_tablelock stopped
-lock_row_lock_current_wait stopped
-lock_row_lock_wait_time stopped
-lock_row_lock_wait stopped
-buffer_reads stopped
-buffer_read_request stopped
-buffer_write_request stopped
-buffer_page_in_flush stopped
-buffer_wait_free stopped
-buffer_read_ahead stopped
-buffer_read_ahead_evict stopped
-buffer_pool_total_page stopped
-buffer_pool_page_misc stopped
-buffer_pool_page_data stopped
-buffer_pool_page_dirty stopped
-buffer_pool_page_free stopped
-buffer_page_created stopped
-buffer_page_written stopped
-buffer_page_read stopped
-buffer_byte_read stopped
-buffer_byte_written stopped
-os_num_reads stopped
-os_num_writes stopped
-os_num_fsync stopped
-os_num_pending_reads stopped
-os_num_pending_writes stopped
-os_log_byte_written stopped
-os_log_fsync stopped
-os_log_pending_fsync stopped
-os_log_pending_write stopped
-trx_num_commit stopped
-trx_num_abort stopped
-trx_active_trx stopped
-trx_num_row_purged stopped
-trx_purge_delay stopped
-trx_rseg_history_len stopped
-log_num_checkpoint stopped
-log_lsn_last_flush stopped
-log_lsn_last_checkpoint stopped
-log_current_lsn stopped
-log_pending_log_write stopped
-log_pending_checkpoint stopped
-log_num_log_io stopped
-log_waits stopped
-log_write_request stopped
-log_writes stopped
-log_flush_io_capacity stopped
-log_flush_dirty_page_exceed stopped
-compress_num_page_compressed stopped
-compress_num_page_decompressed stopped
-index_num_split stopped
-index_num_merge stopped
-fil_system_num_open_file stopped
-dml_num_reads stopped
-dml_num_inserts stopped
-dml_num_deletes stopped
-dml_updates stopped
-set global innodb_monitor_counter_reset_all = all;
-select name, value_since_start, status from information_schema.innodb_metrics;
-name value_since_start status
-server_table_open 0 stopped
-server_table_close 0 stopped
-lock_deadlock_count 0 stopped
-lock_timeout 0 stopped
-lock_lockrec_wait 0 stopped
-lock_lockrec_request 0 stopped
-lock_lockrec_created 0 stopped
-lock_lockrec_removed 0 stopped
-lock_num_lockrec 0 stopped
-lock_tablelock_created 0 stopped
-lock_tablelock_removed 0 stopped
-lock_num_tablelock 0 stopped
-lock_row_lock_current_wait 0 stopped
-lock_row_lock_wait_time 0 stopped
-lock_row_lock_wait 0 stopped
-buffer_reads 0 stopped
-buffer_read_request 0 stopped
-buffer_write_request 0 stopped
-buffer_page_in_flush 0 stopped
-buffer_wait_free 0 stopped
-buffer_read_ahead 0 stopped
-buffer_read_ahead_evict 0 stopped
-buffer_pool_total_page 0 stopped
-buffer_pool_page_misc 0 stopped
-buffer_pool_page_data 0 stopped
-buffer_pool_page_dirty 0 stopped
-buffer_pool_page_free 0 stopped
-buffer_page_created 0 stopped
-buffer_page_written 0 stopped
-buffer_page_read 0 stopped
-buffer_byte_read 0 stopped
-buffer_byte_written 0 stopped
-os_num_reads 0 stopped
-os_num_writes 0 stopped
-os_num_fsync 0 stopped
-os_num_pending_reads 0 stopped
-os_num_pending_writes 0 stopped
-os_log_byte_written 0 stopped
-os_log_fsync 0 stopped
-os_log_pending_fsync 0 stopped
-os_log_pending_write 0 stopped
-trx_num_commit 0 stopped
-trx_num_abort 0 stopped
-trx_active_trx 0 stopped
-trx_num_row_purged 0 stopped
-trx_purge_delay 0 stopped
-trx_rseg_history_len 0 stopped
-log_num_checkpoint 0 stopped
-log_lsn_last_flush 0 stopped
-log_lsn_last_checkpoint 0 stopped
-log_current_lsn 0 stopped
-log_pending_log_write 0 stopped
-log_pending_checkpoint 0 stopped
-log_num_log_io 0 stopped
-log_waits 0 stopped
-log_write_request 0 stopped
-log_writes 0 stopped
-log_flush_io_capacity 0 stopped
-log_flush_dirty_page_exceed 0 stopped
-compress_num_page_compressed 0 stopped
-compress_num_page_decompressed 0 stopped
-index_num_split 0 stopped
-index_num_merge 0 stopped
-fil_system_num_open_file 0 stopped
-dml_num_reads 0 stopped
-dml_num_inserts 0 stopped
-dml_num_deletes 0 stopped
-dml_updates 0 stopped
-set global innodb_monitor_counter_on = server_table_open;
+metadata_table_opened disabled
+metadata_table_closed disabled
+lock_deadlock_count disabled
+lock_timeout disabled
+lock_lockrec_wait disabled
+lock_lockrec_request disabled
+lock_lockrec_created disabled
+lock_lockrec_removed disabled
+lock_num_lockrec disabled
+lock_tablelock_created disabled
+lock_tablelock_removed disabled
+lock_num_tablelock disabled
+lock_row_lock_current_wait disabled
+lock_row_lock_wait_time disabled
+lock_row_lock_wait disabled
+buffer_reads disabled
+buffer_read_request disabled
+buffer_write_request disabled
+buffer_page_in_flush disabled
+buffer_wait_free disabled
+buffer_read_ahead disabled
+buffer_read_ahead_evict disabled
+buffer_pool_total_page disabled
+buffer_pool_page_misc disabled
+buffer_pool_page_data disabled
+buffer_pool_page_dirty disabled
+buffer_pool_page_free disabled
+buffer_page_created disabled
+buffer_page_written disabled
+buffer_page_read disabled
+buffer_byte_read disabled
+buffer_byte_written disabled
+buf_page_read_index_leaf disabled
+buf_page_read_index_non_leaf disabled
+buf_page_read_index_ibuf_leaf disabled
+buf_page_read_index_ibuf_non_leaf disabled
+buf_page_read_undo_log disabled
+buf_page_read_index_inode disabled
+buf_page_read_ibuf_free_list disabled
+buf_page_read_ibuf_bitmap disabled
+buf_page_read_system_page disabled
+buf_page_read_trx_system disabled
+buf_page_read_fsp_hdr disabled
+buf_page_read_xdes disabled
+buf_page_read_blob disabled
+buf_page_read_zblob disabled
+buf_page_read_zblob2 disabled
+buf_page_read_other disabled
+buf_page_written_index_leaf disabled
+buf_page_written_index_non_leaf disabled
+buf_page_written_index_ibuf_leaf disabled
+buf_page_written_index_ibuf_non_leaf disabled
+buf_page_written_undo_log disabled
+buf_page_written_index_inode disabled
+buf_page_written_ibuf_free_list disabled
+buf_page_written_ibuf_bitmap disabled
+buf_page_written_system_page disabled
+buf_page_written_trx_system disabled
+buf_page_written_fsp_hdr disabled
+buf_page_written_xdes disabled
+buf_page_written_blob disabled
+buf_page_written_zblob disabled
+buf_page_written_zblob2 disabled
+buf_page_written_other disabled
+os_num_reads disabled
+os_num_writes disabled
+os_num_fsync disabled
+os_num_pending_reads disabled
+os_num_pending_writes disabled
+os_log_byte_written disabled
+os_log_fsync disabled
+os_log_pending_fsync disabled
+os_log_pending_write disabled
+trx_num_commit disabled
+trx_num_abort disabled
+trx_active_trx disabled
+trx_num_row_purged disabled
+trx_purge_delay disabled
+trx_rseg_history_len disabled
+log_num_checkpoint disabled
+log_lsn_last_flush disabled
+log_lsn_last_checkpoint disabled
+log_current_lsn disabled
+log_pending_log_write disabled
+log_pending_checkpoint disabled
+log_num_log_io disabled
+log_waits disabled
+log_write_request disabled
+log_writes disabled
+log_flush_io_capacity disabled
+log_flush_dirty_page_exceed disabled
+compress_num_page_compressed disabled
+compress_num_page_decompressed disabled
+index_num_split disabled
+index_num_merge disabled
+fil_system_num_open_file disabled
+dml_num_reads disabled
+dml_num_inserts disabled
+dml_num_deletes disabled
+dml_updates disabled
+set global innodb_reset_all_monitor_counter = all;
+select name, count, status from information_schema.innodb_metrics;
+name count status
+metadata_table_opened 0 disabled
+metadata_table_closed 0 disabled
+lock_deadlock_count 0 disabled
+lock_timeout 0 disabled
+lock_lockrec_wait 0 disabled
+lock_lockrec_request 0 disabled
+lock_lockrec_created 0 disabled
+lock_lockrec_removed 0 disabled
+lock_num_lockrec 0 disabled
+lock_tablelock_created 0 disabled
+lock_tablelock_removed 0 disabled
+lock_num_tablelock 0 disabled
+lock_row_lock_current_wait 0 disabled
+lock_row_lock_wait_time 0 disabled
+lock_row_lock_wait 0 disabled
+buffer_reads 0 disabled
+buffer_read_request 0 disabled
+buffer_write_request 0 disabled
+buffer_page_in_flush 0 disabled
+buffer_wait_free 0 disabled
+buffer_read_ahead 0 disabled
+buffer_read_ahead_evict 0 disabled
+buffer_pool_total_page 0 disabled
+buffer_pool_page_misc 0 disabled
+buffer_pool_page_data 0 disabled
+buffer_pool_page_dirty 0 disabled
+buffer_pool_page_free 0 disabled
+buffer_page_created 0 disabled
+buffer_page_written 0 disabled
+buffer_page_read 0 disabled
+buffer_byte_read 0 disabled
+buffer_byte_written 0 disabled
+buf_page_read_index_leaf 0 disabled
+buf_page_read_index_non_leaf 0 disabled
+buf_page_read_index_ibuf_leaf 0 disabled
+buf_page_read_index_ibuf_non_leaf 0 disabled
+buf_page_read_undo_log 0 disabled
+buf_page_read_index_inode 0 disabled
+buf_page_read_ibuf_free_list 0 disabled
+buf_page_read_ibuf_bitmap 0 disabled
+buf_page_read_system_page 0 disabled
+buf_page_read_trx_system 0 disabled
+buf_page_read_fsp_hdr 0 disabled
+buf_page_read_xdes 0 disabled
+buf_page_read_blob 0 disabled
+buf_page_read_zblob 0 disabled
+buf_page_read_zblob2 0 disabled
+buf_page_read_other 0 disabled
+buf_page_written_index_leaf 0 disabled
+buf_page_written_index_non_leaf 0 disabled
+buf_page_written_index_ibuf_leaf 0 disabled
+buf_page_written_index_ibuf_non_leaf 0 disabled
+buf_page_written_undo_log 0 disabled
+buf_page_written_index_inode 0 disabled
+buf_page_written_ibuf_free_list 0 disabled
+buf_page_written_ibuf_bitmap 0 disabled
+buf_page_written_system_page 0 disabled
+buf_page_written_trx_system 0 disabled
+buf_page_written_fsp_hdr 0 disabled
+buf_page_written_xdes 0 disabled
+buf_page_written_blob 0 disabled
+buf_page_written_zblob 0 disabled
+buf_page_written_zblob2 0 disabled
+buf_page_written_other 0 disabled
+os_num_reads 0 disabled
+os_num_writes 0 disabled
+os_num_fsync 0 disabled
+os_num_pending_reads 0 disabled
+os_num_pending_writes 0 disabled
+os_log_byte_written 0 disabled
+os_log_fsync 0 disabled
+os_log_pending_fsync 0 disabled
+os_log_pending_write 0 disabled
+trx_num_commit 0 disabled
+trx_num_abort 0 disabled
+trx_active_trx 0 disabled
+trx_num_row_purged 0 disabled
+trx_purge_delay 0 disabled
+trx_rseg_history_len 0 disabled
+log_num_checkpoint 0 disabled
+log_lsn_last_flush 0 disabled
+log_lsn_last_checkpoint 0 disabled
+log_current_lsn 0 disabled
+log_pending_log_write 0 disabled
+log_pending_checkpoint 0 disabled
+log_num_log_io 0 disabled
+log_waits 0 disabled
+log_write_request 0 disabled
+log_writes 0 disabled
+log_flush_io_capacity 0 disabled
+log_flush_dirty_page_exceed 0 disabled
+compress_num_page_compressed 0 disabled
+compress_num_page_decompressed 0 disabled
+index_num_split 0 disabled
+index_num_merge 0 disabled
+fil_system_num_open_file 0 disabled
+dml_num_reads 0 disabled
+dml_num_inserts 0 disabled
+dml_num_deletes 0 disabled
+dml_updates 0 disabled
+set global innodb_enable_monitor_counter = metadata_table_opened;
create table monitor_test(col int) engine = innodb;
select * from monitor_test;
col
-select name, max_since_start, min_since_start, value_since_start,
-max_since_reset, min_since_reset, value_since_reset, status
+select name, max_count, min_count, count,
+max_count_since_reset, min_count_since_reset, count_since_reset, status
from information_schema.innodb_metrics
-where name = "server_table_open";
-name max_since_start min_since_start value_since_start max_since_reset min_since_reset value_since_reset status
-server_table_open 1 NULL 1 1 NULL 1 started
-set global innodb_monitor_counter_reset = server_table_open;
-select name, max_since_start, min_since_start, value_since_start,
-max_since_reset, min_since_reset, value_since_reset, status
-from information_schema.innodb_metrics
-where name = "server_table_open";
-name max_since_start min_since_start value_since_start max_since_reset min_since_reset value_since_reset status
-server_table_open 1 NULL 1 NULL NULL 0 started
+where name = "metadata_table_opened";
+name max_count min_count count max_count_since_reset min_count_since_reset count_since_reset status
+metadata_table_opened 1 NULL 1 1 NULL 1 enabled
+set global innodb_reset_monitor_counter = metadata_table_opened;
+select name, max_count, min_count, count,
+max_count_since_reset, min_count_since_reset, count_since_reset, status
+from information_schema.innodb_metrics
+where name = "metadata_table_opened";
+name max_count min_count count max_count_since_reset min_count_since_reset count_since_reset status
+metadata_table_opened 1 NULL 1 NULL NULL 0 enabled
drop table monitor_test;
create table monitor_test(col int) engine = innodb;
select * from monitor_test;
col
-select name, max_since_start, min_since_start, value_since_start,
-max_since_reset, min_since_reset, value_since_reset, status
+select name, max_count, min_count, count,
+max_count_since_reset, min_count_since_reset, count_since_reset, status
from information_schema.innodb_metrics
-where name = "server_table_open";
-name max_since_start min_since_start value_since_start max_since_reset min_since_reset value_since_reset status
-server_table_open 2 NULL 2 1 NULL 1 started
-set global innodb_monitor_counter_reset_all = server_table_open;
-select name, max_since_start, min_since_start, value_since_start,
-max_since_reset, min_since_reset, value_since_reset, status
-from information_schema.innodb_metrics
-where name = "server_table_open";
-name max_since_start min_since_start value_since_start max_since_reset min_since_reset value_since_reset status
-server_table_open 2 NULL 2 1 NULL 1 started
-set global innodb_monitor_counter_off = server_table_open;
-set global innodb_monitor_counter_reset = server_table_open;
-select name, max_since_start, min_since_start, value_since_start,
-max_since_reset, min_since_reset, value_since_reset, status
-from information_schema.innodb_metrics
-where name = "server_table_open";
-name max_since_start min_since_start value_since_start max_since_reset min_since_reset value_since_reset status
-server_table_open 2 NULL 2 NULL NULL 0 stopped
+where name = "metadata_table_opened";
+name max_count min_count count max_count_since_reset min_count_since_reset count_since_reset status
+metadata_table_opened 2 NULL 2 1 NULL 1 enabled
+set global innodb_reset_all_monitor_counter = metadata_table_opened;
+select name, max_count, min_count, count,
+max_count_since_reset, min_count_since_reset, count_since_reset, status
+from information_schema.innodb_metrics
+where name = "metadata_table_opened";
+name max_count min_count count max_count_since_reset min_count_since_reset count_since_reset status
+metadata_table_opened 2 NULL 2 1 NULL 1 enabled
+set global innodb_disable_monitor_counter = metadata_table_opened;
+set global innodb_reset_monitor_counter = metadata_table_opened;
+select name, max_count, min_count, count,
+max_count_since_reset, min_count_since_reset, count_since_reset, status
+from information_schema.innodb_metrics
+where name = "metadata_table_opened";
+name max_count min_count count max_count_since_reset min_count_since_reset count_since_reset status
+metadata_table_opened 2 NULL 2 NULL NULL 0 disabled
drop table monitor_test;
create table monitor_test(col int) engine = innodb;
select * from monitor_test;
col
-select name, max_since_start, min_since_start, value_since_start,
-max_since_reset, min_since_reset, value_since_reset, status
+select name, max_count, min_count, count,
+max_count_since_reset, min_count_since_reset, count_since_reset, status
from information_schema.innodb_metrics
-where name = "server_table_open";
-name max_since_start min_since_start value_since_start max_since_reset min_since_reset value_since_reset status
-server_table_open 2 NULL 2 NULL NULL 0 stopped
-set global innodb_monitor_counter_reset_all = server_table_open;
-select name, max_since_start, min_since_start, value_since_start,
-max_since_reset, min_since_reset, value_since_reset, status
-from information_schema.innodb_metrics
-where name = "server_table_open";
-name max_since_start min_since_start value_since_start max_since_reset min_since_reset value_since_reset status
-server_table_open NULL NULL 0 NULL NULL 0 stopped
-set global innodb_monitor_counter_on = server_table_open;
+where name = "metadata_table_opened";
+name max_count min_count count max_count_since_reset min_count_since_reset count_since_reset status
+metadata_table_opened 2 NULL 2 NULL NULL 0 disabled
+set global innodb_reset_all_monitor_counter = metadata_table_opened;
+select name, max_count, min_count, count,
+max_count_since_reset, min_count_since_reset, count_since_reset, status
+from information_schema.innodb_metrics
+where name = "metadata_table_opened";
+name max_count min_count count max_count_since_reset min_count_since_reset count_since_reset status
+metadata_table_opened NULL NULL 0 NULL NULL 0 disabled
+set global innodb_enable_monitor_counter = metadata_table_opened;
drop table monitor_test;
create table monitor_test(col int) engine = innodb;
select * from monitor_test;
col
-select name, max_since_start, min_since_start, value_since_start,
-max_since_reset, min_since_reset, value_since_reset, status
+select name, max_count, min_count, count,
+max_count_since_reset, min_count_since_reset, count_since_reset, status
from information_schema.innodb_metrics
-where name = "server_table_open";
-name max_since_start min_since_start value_since_start max_since_reset min_since_reset value_since_reset status
-server_table_open 1 NULL 1 1 NULL 1 started
-set global innodb_monitor_counter_on = server_table_close;
+where name = "metadata_table_opened";
+name max_count min_count count max_count_since_reset min_count_since_reset count_since_reset status
+metadata_table_opened 1 NULL 1 1 NULL 1 enabled
+set global innodb_enable_monitor_counter = metadata_table_closed;
create index idx on monitor_test(col);
-select name, max_since_start, min_since_start, value_since_start,
-max_since_reset, min_since_reset, value_since_reset, status
+select name, max_count, min_count, count,
+max_count_since_reset, min_count_since_reset, count_since_reset, status
from information_schema.innodb_metrics
-where name = "server_table_close";
-name max_since_start min_since_start value_since_start max_since_reset min_since_reset value_since_reset status
-server_table_close 1 NULL 1 1 NULL 1 started
-select name, max_since_start, min_since_start, value_since_start,
-max_since_reset, min_since_reset, value_since_reset, status
-from information_schema.innodb_metrics
-where name like "server%";
-name max_since_start min_since_start value_since_start max_since_reset min_since_reset value_since_reset status
-server_table_open 2 NULL 2 2 NULL 2 started
-server_table_close 1 NULL 1 1 NULL 1 started
-set global innodb_monitor_counter_off = module_server;
-set global innodb_monitor_counter_reset = module_server;
-select name, max_since_start, min_since_start, value_since_start,
-max_since_reset, min_since_reset, value_since_reset, status
-from information_schema.innodb_metrics
-where name like "server%";
-name max_since_start min_since_start value_since_start max_since_reset min_since_reset value_since_reset status
-server_table_open 2 NULL 2 NULL NULL 0 stopped
-server_table_close 1 NULL 1 NULL NULL 0 stopped
-set global innodb_monitor_counter_reset_all = module_server;
-select name, max_since_start, min_since_start, value_since_start,
-max_since_reset, min_since_reset, value_since_reset, status
-from information_schema.innodb_metrics
-where name like "server%";
-name max_since_start min_since_start value_since_start max_since_reset min_since_reset value_since_reset status
-server_table_open NULL NULL 0 NULL NULL 0 stopped
-server_table_close NULL NULL 0 NULL NULL 0 stopped
-set global innodb_monitor_counter_on = module_trx;
+where name = "metadata_table_closed";
+name max_count min_count count max_count_since_reset min_count_since_reset count_since_reset status
+metadata_table_closed 1 NULL 1 1 NULL 1 enabled
+select name, max_count, min_count, count,
+max_count_since_reset, min_count_since_reset, count_since_reset, status
+from information_schema.innodb_metrics
+where name like "metadata%";
+name max_count min_count count max_count_since_reset min_count_since_reset count_since_reset status
+metadata_table_opened 2 NULL 2 2 NULL 2 enabled
+metadata_table_closed 1 NULL 1 1 NULL 1 enabled
+set global innodb_disable_monitor_counter = module_metadata;
+set global innodb_reset_monitor_counter = module_metadata;
+select name, max_count, min_count, count,
+max_count_since_reset, min_count_since_reset, count_since_reset, status
+from information_schema.innodb_metrics
+where name like "metadata%";
+name max_count min_count count max_count_since_reset min_count_since_reset count_since_reset status
+metadata_table_opened 2 NULL 2 NULL NULL 0 disabled
+metadata_table_closed 1 NULL 1 NULL NULL 0 disabled
+set global innodb_reset_all_monitor_counter = module_metadata;
+select name, max_count, min_count, count,
+max_count_since_reset, min_count_since_reset, count_since_reset, status
+from information_schema.innodb_metrics
+where name like "metadata%";
+name max_count min_count count max_count_since_reset min_count_since_reset count_since_reset status
+metadata_table_opened NULL NULL 0 NULL NULL 0 disabled
+metadata_table_closed NULL NULL 0 NULL NULL 0 disabled
+set global innodb_enable_monitor_counter = module_trx;
begin;
insert into monitor_test values(9);
commit;
begin;
insert into monitor_test values(9);
rollback;
-select name, max_since_start, min_since_start, value_since_start,
-max_since_reset, min_since_reset, value_since_reset, status
+select name, max_count, min_count, count,
+max_count_since_reset, min_count_since_reset, count_since_reset, status
from information_schema.innodb_metrics
where name like "trx_num_abort" or name like "trx_active_trx";
-name max_since_start min_since_start value_since_start max_since_reset min_since_reset value_since_reset status
-trx_num_abort 1 NULL 1 1 NULL 1 started
-trx_active_trx 1 0 0 1 0 0 started
-set global innodb_monitor_counter_off = module_trx;
-set global innodb_monitor_counter_on = module_dml;
+name max_count min_count count max_count_since_reset min_count_since_reset count_since_reset status
+trx_num_abort 1 NULL 1 1 NULL 1 enabled
+trx_active_trx 1 0 0 1 0 0 enabled
+set global innodb_disable_monitor_counter = module_trx;
+set global innodb_enable_monitor_counter = module_dml;
insert into monitor_test values(9);
update monitor_test set col = 10 where col = 9;
-select name, max_since_start, min_since_start, value_since_start,
-max_since_reset, min_since_reset, value_since_reset, status
+select name, max_count, min_count, count,
+max_count_since_reset, min_count_since_reset, count_since_reset, status
from information_schema.innodb_metrics
where name like "dml%";
-name max_since_start min_since_start value_since_start max_since_reset min_since_reset value_since_reset status
-dml_num_reads 4 NULL 4 4 NULL 4 started
-dml_num_inserts 1 NULL 1 1 NULL 1 started
-dml_num_deletes 0 NULL 0 0 NULL 0 started
-dml_updates 2 NULL 2 2 NULL 2 started
+name max_count min_count count max_count_since_reset min_count_since_reset count_since_reset status
+dml_num_reads 4 NULL 4 4 NULL 4 enabled
+dml_num_inserts 1 NULL 1 1 NULL 1 enabled
+dml_num_deletes 0 NULL 0 0 NULL 0 enabled
+dml_updates 2 NULL 2 2 NULL 2 enabled
delete from monitor_test;
-select name, max_since_start, min_since_start, value_since_start,
-max_since_reset, min_since_reset, value_since_reset, status
+select name, max_count, min_count, count,
+max_count_since_reset, min_count_since_reset, count_since_reset, status
from information_schema.innodb_metrics
where name like "dml%";
-name max_since_start min_since_start value_since_start max_since_reset min_since_reset value_since_reset status
-dml_num_reads 6 NULL 6 6 NULL 6 started
-dml_num_inserts 1 NULL 1 1 NULL 1 started
-dml_num_deletes 2 NULL 2 2 NULL 2 started
-dml_updates 2 NULL 2 2 NULL 2 started
-set global innodb_monitor_counter_reset = module_dml;
-select name, max_since_start, min_since_start, value_since_start,
-max_since_reset, min_since_reset, value_since_reset, status
+name max_count min_count count max_count_since_reset min_count_since_reset count_since_reset status
+dml_num_reads 6 NULL 6 6 NULL 6 enabled
+dml_num_inserts 1 NULL 1 1 NULL 1 enabled
+dml_num_deletes 2 NULL 2 2 NULL 2 enabled
+dml_updates 2 NULL 2 2 NULL 2 enabled
+set global innodb_reset_monitor_counter = module_dml;
+select name, max_count, min_count, count,
+max_count_since_reset, min_count_since_reset, count_since_reset, status
from information_schema.innodb_metrics
where name like "dml%";
-name max_since_start min_since_start value_since_start max_since_reset min_since_reset value_since_reset status
-dml_num_reads 6 NULL 6 0 NULL 0 started
-dml_num_inserts 1 NULL 1 0 NULL 0 started
-dml_num_deletes 2 NULL 2 0 NULL 0 started
-dml_updates 2 NULL 2 0 NULL 0 started
+name max_count min_count count max_count_since_reset min_count_since_reset count_since_reset status
+dml_num_reads 6 NULL 6 0 NULL 0 enabled
+dml_num_inserts 1 NULL 1 0 NULL 0 enabled
+dml_num_deletes 2 NULL 2 0 NULL 0 enabled
+dml_updates 2 NULL 2 0 NULL 0 enabled
insert into monitor_test values(9);
insert into monitor_test values(1);
delete from monitor_test;
-select name, max_since_start, min_since_start, value_since_start,
-max_since_reset, min_since_reset, value_since_reset, status
+select name, max_count, min_count, count,
+max_count_since_reset, min_count_since_reset, count_since_reset, status
from information_schema.innodb_metrics
where name like "dml%";
-name max_since_start min_since_start value_since_start max_since_reset min_since_reset value_since_reset status
-dml_num_reads 8 NULL 8 2 NULL 2 started
-dml_num_inserts 3 NULL 3 2 NULL 2 started
-dml_num_deletes 4 NULL 4 2 NULL 2 started
-dml_updates 2 NULL 2 0 NULL 0 started
-set global innodb_monitor_counter_reset_all = module_dml;
-select name, max_since_start, min_since_start, value_since_start,
-max_since_reset, min_since_reset, value_since_reset, status
+name max_count min_count count max_count_since_reset min_count_since_reset count_since_reset status
+dml_num_reads 8 NULL 8 2 NULL 2 enabled
+dml_num_inserts 3 NULL 3 2 NULL 2 enabled
+dml_num_deletes 4 NULL 4 2 NULL 2 enabled
+dml_updates 2 NULL 2 0 NULL 0 enabled
+set global innodb_reset_all_monitor_counter = module_dml;
+select name, max_count, min_count, count,
+max_count_since_reset, min_count_since_reset, count_since_reset, status
from information_schema.innodb_metrics
where name like "dml%";
-name max_since_start min_since_start value_since_start max_since_reset min_since_reset value_since_reset status
-dml_num_reads 8 NULL 8 2 NULL 2 started
-dml_num_inserts 3 NULL 3 2 NULL 2 started
-dml_num_deletes 4 NULL 4 2 NULL 2 started
-dml_updates 2 NULL 2 0 NULL 0 started
-set global innodb_monitor_counter_off = module_dml;
-select name, max_since_start, min_since_start, value_since_start,
-max_since_reset, min_since_reset, value_since_reset, status
+name max_count min_count count max_count_since_reset min_count_since_reset count_since_reset status
+dml_num_reads 8 NULL 8 2 NULL 2 enabled
+dml_num_inserts 3 NULL 3 2 NULL 2 enabled
+dml_num_deletes 4 NULL 4 2 NULL 2 enabled
+dml_updates 2 NULL 2 0 NULL 0 enabled
+set global innodb_disable_monitor_counter = module_dml;
+select name, max_count, min_count, count,
+max_count_since_reset, min_count_since_reset, count_since_reset, status
from information_schema.innodb_metrics
where name like "dml%";
-name max_since_start min_since_start value_since_start max_since_reset min_since_reset value_since_reset status
-dml_num_reads 8 NULL 8 2 NULL 2 stopped
-dml_num_inserts 3 NULL 3 2 NULL 2 stopped
-dml_num_deletes 4 NULL 4 2 NULL 2 stopped
-dml_updates 2 NULL 2 0 NULL 0 stopped
-set global innodb_monitor_counter_reset_all = module_dml;
-select name, max_since_start, min_since_start, value_since_start,
-max_since_reset, min_since_reset, value_since_reset, status
+name max_count min_count count max_count_since_reset min_count_since_reset count_since_reset status
+dml_num_reads 8 NULL 8 2 NULL 2 disabled
+dml_num_inserts 3 NULL 3 2 NULL 2 disabled
+dml_num_deletes 4 NULL 4 2 NULL 2 disabled
+dml_updates 2 NULL 2 0 NULL 0 disabled
+set global innodb_reset_all_monitor_counter = module_dml;
+select name, max_count, min_count, count,
+max_count_since_reset, min_count_since_reset, count_since_reset, status
from information_schema.innodb_metrics
where name like "dml%";
-name max_since_start min_since_start value_since_start max_since_reset min_since_reset value_since_reset status
-dml_num_reads NULL NULL 0 NULL NULL 0 stopped
-dml_num_inserts NULL NULL 0 NULL NULL 0 stopped
-dml_num_deletes NULL NULL 0 NULL NULL 0 stopped
-dml_updates NULL NULL 0 NULL NULL 0 stopped
-set global innodb_monitor_counter_on = dml_num_inserts;
+name max_count min_count count max_count_since_reset min_count_since_reset count_since_reset status
+dml_num_reads NULL NULL 0 NULL NULL 0 disabled
+dml_num_inserts NULL NULL 0 NULL NULL 0 disabled
+dml_num_deletes NULL NULL 0 NULL NULL 0 disabled
+dml_updates NULL NULL 0 NULL NULL 0 disabled
+set global innodb_enable_monitor_counter = dml_num_inserts;
insert into monitor_test values(9);
insert into monitor_test values(1);
delete from monitor_test;
-select name, max_since_start, min_since_start, value_since_start,
-max_since_reset, min_since_reset, value_since_reset, status
+select name, max_count, min_count, count,
+max_count_since_reset, min_count_since_reset, count_since_reset, status
from information_schema.innodb_metrics
where name like "dml%";
-name max_since_start min_since_start value_since_start max_since_reset min_since_reset value_since_reset status
-dml_num_reads NULL NULL 0 NULL NULL 0 stopped
-dml_num_inserts 2 NULL 2 2 NULL 2 started
-dml_num_deletes NULL NULL 0 NULL NULL 0 stopped
-dml_updates NULL NULL 0 NULL NULL 0 stopped
-set global innodb_monitor_counter_off = module_dml;
+name max_count min_count count max_count_since_reset min_count_since_reset count_since_reset status
+dml_num_reads NULL NULL 0 NULL NULL 0 disabled
+dml_num_inserts 2 NULL 2 2 NULL 2 enabled
+dml_num_deletes NULL NULL 0 NULL NULL 0 disabled
+dml_updates NULL NULL 0 NULL NULL 0 disabled
+set global innodb_disable_monitor_counter = module_dml;
drop table monitor_test;
-set global innodb_monitor_counter_on = fil_system_num_open_file;
-select name, max_since_start, min_since_start, value_since_start,
-max_since_reset, min_since_reset, value_since_reset, status
+set global innodb_enable_monitor_counter = fil_system_num_open_file;
+select name, max_count, min_count, count,
+max_count_since_reset, min_count_since_reset, count_since_reset, status
from information_schema.innodb_metrics
where name like "fil_system_num_open_file";
-name max_since_start min_since_start value_since_start max_since_reset min_since_reset value_since_reset status
-fil_system_num_open_file 3 3 3 3 3 3 started
-set global innodb_monitor_counter_off = fil_system_num_open_file;
-set global innodb_monitor_counter_on = default;
-set global innodb_monitor_counter_off = default;
-set global innodb_monitor_counter_reset = default;
-set global innodb_monitor_counter_reset_all = default;
+name max_count min_count count max_count_since_reset min_count_since_reset count_since_reset status
+fil_system_num_open_file 3 3 3 3 3 3 enabled
+set global innodb_disable_monitor_counter = fil_system_num_open_file;
+set global innodb_enable_monitor_counter = default;
+set global innodb_disable_monitor_counter = default;
+set global innodb_reset_monitor_counter = default;
+set global innodb_reset_all_monitor_counter = default;
=== removed file 'mysql-test/suite/innodb/t/innodb-system-table-view-master.opt'
--- a/mysql-test/suite/innodb/t/innodb-system-table-view-master.opt revid:vasil.dimov@stripped
+++ b/mysql-test/suite/innodb/t/innodb-system-table-view-master.opt 1970-01-01 00:00:00 +0000
@@ -1,3 +0,0 @@
---default-storage-engine=MyISAM
---innodb-strict-mode=0
---innodb-file-per-table=0
=== removed file 'mysql-test/suite/innodb/t/innodb-system-table-view.test'
--- a/mysql-test/suite/innodb/t/innodb-system-table-view.test revid:vasil.dimov@stripped
+++ b/mysql-test/suite/innodb/t/innodb-system-table-view.test 1970-01-01 00:00:00 +0000
@@ -1,94 +0,0 @@
-# This is the test for Information Schema System Table View
-# that displays the InnoDB system table content through
-# information schema tables.
-
---source include/have_innodb.inc
-
-SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES;
-
-SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_INDEXES;
-
-SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS;
-
-SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FIELDS;
-
-SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN;
-
-SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS;
-
-SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS;
-
-# Create a foreign key constraint, and verify the information
-# in INFORMATION_SCHEMA.INNODB_SYS_FOREIGN and
-# INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS
-CREATE TABLE parent (id INT NOT NULL,
- PRIMARY KEY (id)) ENGINE=INNODB;
-
-CREATE TABLE child (id INT, parent_id INT,
- INDEX par_ind (parent_id),
- CONSTRAINT constraint_test
- FOREIGN KEY (parent_id) REFERENCES parent(id)
- ON DELETE CASCADE) ENGINE=INNODB;
-
-SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN;
-
-SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS;
-
-# Insert a row in the table "parent", and see whether that reflected in
-# INNODB_SYS_TABLESTATS
-INSERT INTO parent VALUES(1);
-
-SELECT name, num_rows, mysql_handles_opened
-FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
-WHERE name LIKE "%parent";
-
-SELECT NAME, FLAG, N_COLS, SPACE FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES;
-
-SELECT name, n_fields
-from INFORMATION_SCHEMA.INNODB_SYS_INDEXES
-WHERE table_id In (SELECT table_id from
- INFORMATION_SCHEMA.INNODB_SYS_TABLES
- WHERE name LIKE "%parent%");
-
-SELECT name, n_fields
-from INFORMATION_SCHEMA.INNODB_SYS_INDEXES
-WHERE table_id In (SELECT table_id from
- INFORMATION_SCHEMA.INNODB_SYS_TABLES
- WHERE name LIKE "%child%");
-
-SELECT name, pos, mtype, len
-from INFORMATION_SCHEMA.INNODB_SYS_COLUMNS
-WHERE table_id In (SELECT table_id from
- INFORMATION_SCHEMA.INNODB_SYS_TABLES
- WHERE name LIKE "%child%");
-
-DROP TABLE child;
-
-DROP TABLE parent;
-
-# Create table with 2 columns in the foreign key constraint
-CREATE TABLE parent (id INT NOT NULL, newid INT NOT NULL,
- PRIMARY KEY (id, newid)) ENGINE=INNODB;
-
-CREATE TABLE child (id INT, parent_id INT,
- INDEX par_ind (parent_id),
- CONSTRAINT constraint_test
- FOREIGN KEY (id, parent_id) REFERENCES parent(id, newid)
- ON DELETE CASCADE) ENGINE=INNODB;
-
-SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN;
-
-SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS;
-
-INSERT INTO parent VALUES(1, 9);
-
-# Nested query will open the table handle twice
-SELECT * FROM parent WHERE id IN (SELECT id FROM parent);
-
-SELECT name, num_rows, mysql_handles_opened
-FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
-WHERE name LIKE "%parent";
-
-DROP TABLE child;
-
-DROP TABLE parent;
=== modified file 'mysql-test/suite/innodb/t/innodb_monitor.test'
--- a/mysql-test/suite/innodb/t/innodb_monitor.test revid:vasil.dimov@stripped
+++ b/mysql-test/suite/innodb/t/innodb_monitor.test revid:vasil.dimov@stripped
@@ -11,168 +11,168 @@ select * from information_schema.innodb_
select name, status from information_schema.innodb_metrics;
# Turn on all monitor counters
-set global innodb_monitor_counter_on = all;
+set global innodb_enable_monitor_counter = all;
# status should all change to "started"
select name, status from information_schema.innodb_metrics;
# Test wrong argument to the global configure option
--error ER_WRONG_VALUE_FOR_VAR
-set global innodb_monitor_counter_on = aaa;
+set global innodb_enable_monitor_counter = aaa;
# We require a valid monitor counter/module name. There is no default
# counter name or module. A warning will be printed asking user to
# specify a valid counter name.
#--disable_warnings
-#set global innodb_monitor_counter_on = default;
+#set global innodb_enable_monitor_counter = default;
#--enable_warnings
# Turn off all monitor counters, option name should be case
# insensitive
-set global innodb_monitor_counter_off = All;
+set global innodb_disable_monitor_counter = All;
# status should all change to "stopped"
select name, status from information_schema.innodb_metrics;
# Reset all counter values
-set global innodb_monitor_counter_reset_all = all;
+set global innodb_reset_all_monitor_counter = all;
-# value_since_start should all change to 0
-select name, value_since_start, status from information_schema.innodb_metrics;
+# count should all change to 0
+select name, count, status from information_schema.innodb_metrics;
# Only turn on "table_open" counter
-set global innodb_monitor_counter_on = server_table_open;
+set global innodb_enable_monitor_counter = metadata_table_opened;
-# Create a new table to test "server_table_open" counter
+# Create a new table to test "metadata_table_opened" counter
create table monitor_test(col int) engine = innodb;
# This will open the monitor_test table
select * from monitor_test;
-# "server_table_open" should increment by 1
-select name, max_since_start, min_since_start, value_since_start,
- max_since_reset, min_since_reset, value_since_reset, status
+# "metadata_table_opened" should increment by 1
+select name, max_count, min_count, count,
+ max_count_since_reset, min_count_since_reset, count_since_reset, status
from information_schema.innodb_metrics
-where name = "server_table_open";
+where name = "metadata_table_opened";
# Reset the counter value while counter is still on (started)
-# This will reset value "value_since_reset" but not
-# "value_since_start"
-set global innodb_monitor_counter_reset = server_table_open;
+# This will reset value "count_since_reset" but not
+# "count"
+set global innodb_reset_monitor_counter = metadata_table_opened;
-select name, max_since_start, min_since_start, value_since_start,
- max_since_reset, min_since_reset, value_since_reset, status
+select name, max_count, min_count, count,
+ max_count_since_reset, min_count_since_reset, count_since_reset, status
from information_schema.innodb_metrics
-where name = "server_table_open";
+where name = "metadata_table_opened";
-# re-create table again to increment "server_table_open" again
+# re-create table again to increment "metadata_table_opened" again
drop table monitor_test;
-# Create a new table to test "server_table_open" counter
+# Create a new table to test "metadata_table_opened" counter
create table monitor_test(col int) engine = innodb;
select * from monitor_test;
-# "server_table_open" should increment
-select name, max_since_start, min_since_start, value_since_start,
- max_since_reset, min_since_reset, value_since_reset, status
+# "metadata_table_opened" should increment
+select name, max_count, min_count, count,
+ max_count_since_reset, min_count_since_reset, count_since_reset, status
from information_schema.innodb_metrics
-where name = "server_table_open";
+where name = "metadata_table_opened";
# Cannot reset all monitor value while the counter is on
-set global innodb_monitor_counter_reset_all = server_table_open;
+set global innodb_reset_all_monitor_counter = metadata_table_opened;
-select name, max_since_start, min_since_start, value_since_start,
- max_since_reset, min_since_reset, value_since_reset, status
+select name, max_count, min_count, count,
+ max_count_since_reset, min_count_since_reset, count_since_reset, status
from information_schema.innodb_metrics
-where name = "server_table_open";
+where name = "metadata_table_opened";
-# Turn off the counter "server_table_open"
-set global innodb_monitor_counter_off = server_table_open;
+# Turn off the counter "metadata_table_opened"
+set global innodb_disable_monitor_counter = metadata_table_opened;
# Reset the counter value while counter is off (stopped)
-set global innodb_monitor_counter_reset = server_table_open;
+set global innodb_reset_monitor_counter = metadata_table_opened;
-select name, max_since_start, min_since_start, value_since_start,
- max_since_reset, min_since_reset, value_since_reset, status
+select name, max_count, min_count, count,
+ max_count_since_reset, min_count_since_reset, count_since_reset, status
from information_schema.innodb_metrics
-where name = "server_table_open";
+where name = "metadata_table_opened";
-# re-create table again. Since monitor is off, "server_table_open"
+# re-create table again. Since monitor is off, "metadata_table_opened"
# should not be incremented
drop table monitor_test;
-# Create a new table to test "server_table_open" counter
+# Create a new table to test "metadata_table_opened" counter
create table monitor_test(col int) engine = innodb;
-# "server_table_open" should increment
+# "metadata_table_opened" should increment
select * from monitor_test;
-select name, max_since_start, min_since_start, value_since_start,
- max_since_reset, min_since_reset, value_since_reset, status
+select name, max_count, min_count, count,
+ max_count_since_reset, min_count_since_reset, count_since_reset, status
from information_schema.innodb_metrics
-where name = "server_table_open";
+where name = "metadata_table_opened";
# Reset all the counters, include those counter *_since_start
-set global innodb_monitor_counter_reset_all = server_table_open;
+set global innodb_reset_all_monitor_counter = metadata_table_opened;
-select name, max_since_start, min_since_start, value_since_start,
- max_since_reset, min_since_reset, value_since_reset, status
+select name, max_count, min_count, count,
+ max_count_since_reset, min_count_since_reset, count_since_reset, status
from information_schema.innodb_metrics
-where name = "server_table_open";
+where name = "metadata_table_opened";
# Turn on "table_open" counter again
-set global innodb_monitor_counter_on = server_table_open;
+set global innodb_enable_monitor_counter = metadata_table_opened;
-# Test server_table_open again to see if it is working correctly
+# Test metadata_table_opened again to see if it is working correctly
# after above round of turning on/off/reset
drop table monitor_test;
-# Create a new table to test "server_table_open" counter
+# Create a new table to test "metadata_table_opened" counter
create table monitor_test(col int) engine = innodb;
select * from monitor_test;
-# "server_table_open" should increment
-select name, max_since_start, min_since_start, value_since_start,
- max_since_reset, min_since_reset, value_since_reset, status
+# "metadata_table_opened" should increment
+select name, max_count, min_count, count,
+ max_count_since_reset, min_count_since_reset, count_since_reset, status
from information_schema.innodb_metrics
-where name = "server_table_open";
+where name = "metadata_table_opened";
-# Test counter "server_table_close", create index will close the old handle
-set global innodb_monitor_counter_on = server_table_close;
+# Test counter "metadata_table_closed", create index will close the old handle
+set global innodb_enable_monitor_counter = metadata_table_closed;
create index idx on monitor_test(col);
-select name, max_since_start, min_since_start, value_since_start,
- max_since_reset, min_since_reset, value_since_reset, status
+select name, max_count, min_count, count,
+ max_count_since_reset, min_count_since_reset, count_since_reset, status
from information_schema.innodb_metrics
-where name = "server_table_close";
+where name = "metadata_table_closed";
-select name, max_since_start, min_since_start, value_since_start,
- max_since_reset, min_since_reset, value_since_reset, status
+select name, max_count, min_count, count,
+ max_count_since_reset, min_count_since_reset, count_since_reset, status
from information_schema.innodb_metrics
-where name like "server%";
+where name like "metadata%";
-# Reset counters only in "module_server" module
-set global innodb_monitor_counter_off = module_server;
+# Reset counters only in "module_metadata" module
+set global innodb_disable_monitor_counter = module_metadata;
-set global innodb_monitor_counter_reset = module_server;
+set global innodb_reset_monitor_counter = module_metadata;
-select name, max_since_start, min_since_start, value_since_start,
- max_since_reset, min_since_reset, value_since_reset, status
+select name, max_count, min_count, count,
+ max_count_since_reset, min_count_since_reset, count_since_reset, status
from information_schema.innodb_metrics
-where name like "server%";
+where name like "metadata%";
-set global innodb_monitor_counter_reset_all = module_server;
+set global innodb_reset_all_monitor_counter = module_metadata;
-select name, max_since_start, min_since_start, value_since_start,
- max_since_reset, min_since_reset, value_since_reset, status
+select name, max_count, min_count, count,
+ max_count_since_reset, min_count_since_reset, count_since_reset, status
from information_schema.innodb_metrics
-where name like "server%";
+where name like "metadata%";
# Test Transaction Module
-set global innodb_monitor_counter_on = module_trx;
+set global innodb_enable_monitor_counter = module_trx;
begin;
insert into monitor_test values(9);
@@ -182,37 +182,37 @@ begin;
insert into monitor_test values(9);
rollback;
-select name, max_since_start, min_since_start, value_since_start,
- max_since_reset, min_since_reset, value_since_reset, status
+select name, max_count, min_count, count,
+ max_count_since_reset, min_count_since_reset, count_since_reset, status
from information_schema.innodb_metrics
where name like "trx_num_abort" or name like "trx_active_trx";
-set global innodb_monitor_counter_off = module_trx;
+set global innodb_disable_monitor_counter = module_trx;
# Test DML Module
-set global innodb_monitor_counter_on = module_dml;
+set global innodb_enable_monitor_counter = module_dml;
insert into monitor_test values(9);
update monitor_test set col = 10 where col = 9;
-select name, max_since_start, min_since_start, value_since_start,
- max_since_reset, min_since_reset, value_since_reset, status
+select name, max_count, min_count, count,
+ max_count_since_reset, min_count_since_reset, count_since_reset, status
from information_schema.innodb_metrics
where name like "dml%";
delete from monitor_test;
-select name, max_since_start, min_since_start, value_since_start,
- max_since_reset, min_since_reset, value_since_reset, status
+select name, max_count, min_count, count,
+ max_count_since_reset, min_count_since_reset, count_since_reset, status
from information_schema.innodb_metrics
where name like "dml%";
# test reset counter while the counter is on
-set global innodb_monitor_counter_reset = module_dml;
+set global innodb_reset_monitor_counter = module_dml;
-select name, max_since_start, min_since_start, value_since_start,
- max_since_reset, min_since_reset, value_since_reset, status
+select name, max_count, min_count, count,
+ max_count_since_reset, min_count_since_reset, count_since_reset, status
from information_schema.innodb_metrics
where name like "dml%";
@@ -222,38 +222,38 @@ insert into monitor_test values(1);
delete from monitor_test;
-select name, max_since_start, min_since_start, value_since_start,
- max_since_reset, min_since_reset, value_since_reset, status
+select name, max_count, min_count, count,
+ max_count_since_reset, min_count_since_reset, count_since_reset, status
from information_schema.innodb_metrics
where name like "dml%";
# We do not allow reset_all while the counter is on, nothing
# should be reset here
-set global innodb_monitor_counter_reset_all = module_dml;
+set global innodb_reset_all_monitor_counter = module_dml;
-select name, max_since_start, min_since_start, value_since_start,
- max_since_reset, min_since_reset, value_since_reset, status
+select name, max_count, min_count, count,
+ max_count_since_reset, min_count_since_reset, count_since_reset, status
from information_schema.innodb_metrics
where name like "dml%";
# Turn off the counter
-set global innodb_monitor_counter_off = module_dml;
+set global innodb_disable_monitor_counter = module_dml;
-select name, max_since_start, min_since_start, value_since_start,
- max_since_reset, min_since_reset, value_since_reset, status
+select name, max_count, min_count, count,
+ max_count_since_reset, min_count_since_reset, count_since_reset, status
from information_schema.innodb_metrics
where name like "dml%";
# Reset all counter values
-set global innodb_monitor_counter_reset_all = module_dml;
+set global innodb_reset_all_monitor_counter = module_dml;
-select name, max_since_start, min_since_start, value_since_start,
- max_since_reset, min_since_reset, value_since_reset, status
+select name, max_count, min_count, count,
+ max_count_since_reset, min_count_since_reset, count_since_reset, status
from information_schema.innodb_metrics
where name like "dml%";
# Open individual counter "dml_num_inserts"
-set global innodb_monitor_counter_on = dml_num_inserts;
+set global innodb_enable_monitor_counter = dml_num_inserts;
insert into monitor_test values(9);
insert into monitor_test values(1);
@@ -261,27 +261,27 @@ insert into monitor_test values(1);
delete from monitor_test;
# Only counter "dml_num_inserts" should be updated
-select name, max_since_start, min_since_start, value_since_start,
- max_since_reset, min_since_reset, value_since_reset, status
+select name, max_count, min_count, count,
+ max_count_since_reset, min_count_since_reset, count_since_reset, status
from information_schema.innodb_metrics
where name like "dml%";
-set global innodb_monitor_counter_off = module_dml;
+set global innodb_disable_monitor_counter = module_dml;
drop table monitor_test;
-set global innodb_monitor_counter_on = fil_system_num_open_file;
+set global innodb_enable_monitor_counter = fil_system_num_open_file;
-select name, max_since_start, min_since_start, value_since_start,
- max_since_reset, min_since_reset, value_since_reset, status
+select name, max_count, min_count, count,
+ max_count_since_reset, min_count_since_reset, count_since_reset, status
from information_schema.innodb_metrics
where name like "fil_system_num_open_file";
-set global innodb_monitor_counter_off = fil_system_num_open_file;
+set global innodb_disable_monitor_counter = fil_system_num_open_file;
-- disable_warnings
-set global innodb_monitor_counter_on = default;
-set global innodb_monitor_counter_off = default;
-set global innodb_monitor_counter_reset = default;
-set global innodb_monitor_counter_reset_all = default;
+set global innodb_enable_monitor_counter = default;
+set global innodb_disable_monitor_counter = default;
+set global innodb_reset_monitor_counter = default;
+set global innodb_reset_all_monitor_counter = default;
-- enable_warnings
=== modified file 'mysql-test/suite/sys_vars/r/all_vars.result'
--- a/mysql-test/suite/sys_vars/r/all_vars.result revid:vasil.dimov@stripped
+++ b/mysql-test/suite/sys_vars/r/all_vars.result revid:vasil.dimov@stripped
@@ -10,15 +10,15 @@ There should be *no* long test name list
select variable_name as `There should be *no* variables listed below:` from t2
left join t1 on variable_name=test_name where test_name is null;
There should be *no* variables listed below:
-INNODB_MONITOR_COUNTER_RESET
-INNODB_MONITOR_COUNTER_RESET_ALL
-INNODB_MONITOR_COUNTER_ON
-INNODB_MONITOR_COUNTER_OFF
+INNODB_RESET_MONITOR_COUNTER
+INNODB_RESET_ALL_MONITOR_COUNTER
+INNODB_DISABLE_MONITOR_COUNTER
+INNODB_ENABLE_MONITOR_COUNTER
INNODB_FILE_FORMAT_MAX
-INNODB_MONITOR_COUNTER_RESET
-INNODB_MONITOR_COUNTER_RESET_ALL
-INNODB_MONITOR_COUNTER_ON
-INNODB_MONITOR_COUNTER_OFF
+INNODB_RESET_MONITOR_COUNTER
+INNODB_RESET_ALL_MONITOR_COUNTER
+INNODB_DISABLE_MONITOR_COUNTER
+INNODB_ENABLE_MONITOR_COUNTER
INNODB_FILE_FORMAT_MAX
drop table t1;
drop table t2;
=== modified file 'storage/innobase/CMakeLists.txt'
--- a/storage/innobase/CMakeLists.txt revid:vasil.dimov@stripped
+++ b/storage/innobase/CMakeLists.txt revid:vasil.dimov@stripped
@@ -40,12 +40,10 @@ IF(UNIX)
ENDIF()
ENDIF()
-# Enable InnoDB's UNIV_DEBUG if MySQL's WITH_DEBUG[_FULL] is defined
-# enable when this bug is resolved:
-# Bug#54861 Additional connections not handled properly in mtr --embedded
-#IF(WITH_DEBUG)
-# ADD_DEFINITIONS("-DUNIV_DEBUG")
-#ENDIF()
+# Enable InnoDB's UNIV_DEBUG if MySQL's WITH_DEBUG is defined
+IF(WITH_DEBUG)
+ ADD_DEFINITIONS("-DUNIV_DEBUG")
+ENDIF()
IF(NOT MSVC)
# either define HAVE_IB_GCC_ATOMIC_BUILTINS or not
=== removed file 'storage/innobase/COPYING'
--- a/storage/innobase/COPYING revid:vasil.dimov@stripped
+++ b/storage/innobase/COPYING 1970-01-01 00:00:00 +0000
@@ -1,351 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
-
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-Preamble
-========
-
-The licenses for most software are designed to take away your freedom
-to share and change it. By contrast, the GNU General Public License is
-intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
-When we speak of free software, we are referring to freedom, not price.
-Our General Public Licenses are designed to make sure that you have
-the freedom to distribute copies of free software (and charge for this
-service if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs; and that you know you can do these things.
-
-To protect your rights, we need to make restrictions that forbid anyone
-to deny you these rights or to ask you to surrender the rights. These
-restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
-For example, if you distribute copies of such a program, whether gratis
-or for a fee, you must give the recipients all the rights that you
-have. You must make sure that they, too, receive or can get the source
-code. And you must show them these terms so they know their rights.
-
-We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
-Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
-Finally, any free program is threatened constantly by software patents.
-We wish to avoid the danger that redistributors of a free program will
-individually obtain patent licenses, in effect making the program
-proprietary. To prevent this, we have made it clear that any patent
-must be licensed for everyone's free use or not licensed at all.
-
-The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
- 0. This License applies to any program or other work which contains a
- notice placed by the copyright holder saying it may be distributed
- under the terms of this General Public License. The "Program",
- below, refers to any such program or work, and a "work based on
- the Program" means either the Program or any derivative work under
- copyright law: that is to say, a work containing the Program or a
- portion of it, either verbatim or with modifications and/or
- translated into another language. (Hereinafter, translation is
- included without limitation in the term "modification".) Each
- licensee is addressed as "you".
-
- Activities other than copying, distribution and modification are
- not covered by this License; they are outside its scope. The act
- of running the Program is not restricted, and the output from the
- Program is covered only if its contents constitute a work based on
- the Program (independent of having been made by running the
- Program). Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
- source code as you receive it, in any medium, provided that you
- conspicuously and appropriately publish on each copy an appropriate
- copyright notice and disclaimer of warranty; keep intact all the
- notices that refer to this License and to the absence of any
- warranty; and give any other recipients of the Program a copy of
- this License along with the Program.
-
- You may charge a fee for the physical act of transferring a copy,
- and you may at your option offer warranty protection in exchange
- for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
- of it, thus forming a work based on the Program, and copy and
- distribute such modifications or work under the terms of Section 1
- above, provided that you also meet all of these conditions:
-
- a. You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b. You must cause any work that you distribute or publish, that
- in whole or in part contains or is derived from the Program
- or any part thereof, to be licensed as a whole at no charge
- to all third parties under the terms of this License.
-
- c. If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display
- an announcement including an appropriate copyright notice and
- a notice that there is no warranty (or else, saying that you
- provide a warranty) and that users may redistribute the
- program under these conditions, and telling the user how to
- view a copy of this License. (Exception: if the Program
- itself is interactive but does not normally print such an
- announcement, your work based on the Program is not required
- to print an announcement.)
-
- These requirements apply to the modified work as a whole. If
- identifiable sections of that work are not derived from the
- Program, and can be reasonably considered independent and separate
- works in themselves, then this License, and its terms, do not
- apply to those sections when you distribute them as separate
- works. But when you distribute the same sections as part of a
- whole which is a work based on the Program, the distribution of
- the whole must be on the terms of this License, whose permissions
- for other licensees extend to the entire whole, and thus to each
- and every part regardless of who wrote it.
-
- Thus, it is not the intent of this section to claim rights or
- contest your rights to work written entirely by you; rather, the
- intent is to exercise the right to control the distribution of
- derivative or collective works based on the Program.
-
- In addition, mere aggregation of another work not based on the
- Program with the Program (or with a work based on the Program) on
- a volume of a storage or distribution medium does not bring the
- other work under the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
- under Section 2) in object code or executable form under the terms
- of Sections 1 and 2 above provided that you also do one of the
- following:
-
- a. Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of
- Sections 1 and 2 above on a medium customarily used for
- software interchange; or,
-
- b. Accompany it with a written offer, valid for at least three
- years, to give any third-party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a
- medium customarily used for software interchange; or,
-
- c. Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with
- such an offer, in accord with Subsection b above.)
-
- The source code for a work means the preferred form of the work for
- making modifications to it. For an executable work, complete
- source code means all the source code for all modules it contains,
- plus any associated interface definition files, plus the scripts
- used to control compilation and installation of the executable.
- However, as a special exception, the source code distributed need
- not include anything that is normally distributed (in either
- source or binary form) with the major components (compiler,
- kernel, and so on) of the operating system on which the executable
- runs, unless that component itself accompanies the executable.
-
- If distribution of executable or object code is made by offering
- access to copy from a designated place, then offering equivalent
- access to copy the source code from the same place counts as
- distribution of the source code, even though third parties are not
- compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
- except as expressly provided under this License. Any attempt
- otherwise to copy, modify, sublicense or distribute the Program is
- void, and will automatically terminate your rights under this
- License. However, parties who have received copies, or rights,
- from you under this License will not have their licenses
- terminated so long as such parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
- signed it. However, nothing else grants you permission to modify
- or distribute the Program or its derivative works. These actions
- are prohibited by law if you do not accept this License.
- Therefore, by modifying or distributing the Program (or any work
- based on the Program), you indicate your acceptance of this
- License to do so, and all its terms and conditions for copying,
- distributing or modifying the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
- Program), the recipient automatically receives a license from the
- original licensor to copy, distribute or modify the Program
- subject to these terms and conditions. You may not impose any
- further restrictions on the recipients' exercise of the rights
- granted herein. You are not responsible for enforcing compliance
- by third parties to this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
- infringement or for any other reason (not limited to patent
- issues), conditions are imposed on you (whether by court order,
- agreement or otherwise) that contradict the conditions of this
- License, they do not excuse you from the conditions of this
- License. If you cannot distribute so as to satisfy simultaneously
- your obligations under this License and any other pertinent
- obligations, then as a consequence you may not distribute the
- Program at all. For example, if a patent license would not permit
- royalty-free redistribution of the Program by all those who
- receive copies directly or indirectly through you, then the only
- way you could satisfy both it and this License would be to refrain
- entirely from distribution of the Program.
-
- If any portion of this section is held invalid or unenforceable
- under any particular circumstance, the balance of the section is
- intended to apply and the section as a whole is intended to apply
- in other circumstances.
-
- It is not the purpose of this section to induce you to infringe any
- patents or other property right claims or to contest validity of
- any such claims; this section has the sole purpose of protecting
- the integrity of the free software distribution system, which is
- implemented by public license practices. Many people have made
- generous contributions to the wide range of software distributed
- through that system in reliance on consistent application of that
- system; it is up to the author/donor to decide if he or she is
- willing to distribute software through any other system and a
- licensee cannot impose that choice.
-
- This section is intended to make thoroughly clear what is believed
- to be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
- certain countries either by patents or by copyrighted interfaces,
- the original copyright holder who places the Program under this
- License may add an explicit geographical distribution limitation
- excluding those countries, so that distribution is permitted only
- in or among countries not thus excluded. In such case, this
- License incorporates the limitation as if written in the body of
- this License.
-
- 9. The Free Software Foundation may publish revised and/or new
- versions of the General Public License from time to time. Such
- new versions will be similar in spirit to the present version, but
- may differ in detail to address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
- Program specifies a version number of this License which applies
- to it and "any later version", you have the option of following
- the terms and conditions either of that version or of any later
- version published by the Free Software Foundation. If the Program
- does not specify a version number of this License, you may choose
- any version ever published by the Free Software Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
- programs whose distribution conditions are different, write to the
- author to ask for permission. For software which is copyrighted
- by the Free Software Foundation, write to the Free Software
- Foundation; we sometimes make exceptions for this. Our decision
- will be guided by the two goals of preserving the free status of
- all derivatives of our free software and of promoting the sharing
- and reuse of software generally.
-
- NO WARRANTY
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
- WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
- LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
- HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
- WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT
- NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE
- QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
- PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY
- SERVICING, REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
- WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
- MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE
- LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
- INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
- INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
- DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU
- OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY
- OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
- ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-How to Apply These Terms to Your New Programs
-=============================================
-
-If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these
-terms.
-
-To do so, attach the following notices to the program. It is safest to
-attach them to the start of each source file to most effectively convey
-the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
- ONE LINE TO GIVE THE PROGRAM'S NAME AND A BRIEF IDEA OF WHAT IT DOES.
- Copyright (C) YYYY NAME OF AUTHOR
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) 19YY NAME OF AUTHOR
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the
-appropriate parts of the General Public License. Of course, the
-commands you use may be called something other than `show w' and `show
-c'; they could even be mouse-clicks or menu items--whatever suits your
-program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- SIGNATURE OF TY COON, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program
-into proprietary programs. If your program is a subroutine library,
-you may consider it more useful to permit linking proprietary
-applications with the library. If this is what you want to do, use the
-GNU Library General Public License instead of this License.
=== removed file 'storage/innobase/COPYING.Sun_Microsystems'
--- a/storage/innobase/COPYING.Sun_Microsystems revid:vasil.dimov@stripped
+++ b/storage/innobase/COPYING.Sun_Microsystems 1970-01-01 00:00:00 +0000
@@ -1,31 +0,0 @@
-Portions of this software contain modifications contributed by
-Sun Microsystems, Inc. These contributions are used with the following
-license:
-
-Copyright (c) 2009, Sun Microsystems, Inc.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the following
- disclaimer in the documentation and/or other materials
- provided with the distribution.
- * Neither the name of Sun Microsystems, Inc. nor the names of its
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
=== modified file 'storage/innobase/Doxyfile'
--- a/storage/innobase/Doxyfile revid:vasil.dimov@stripped
+++ b/storage/innobase/Doxyfile revid:vasil.dimov@stripped
@@ -565,7 +565,7 @@ RECURSIVE = YES
# excluded from the INPUT source files. This way you can easily exclude a
# subdirectory from a directory tree whose root is specified with the INPUT tag.
-EXCLUDE = ut0auxconf_*
+EXCLUDE =
# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
# directories that are symbolic links (a Unix filesystem feature) are excluded
=== modified file 'storage/innobase/Makefile.am'
--- a/storage/innobase/Makefile.am revid:vasil.dimov@stripped
+++ b/storage/innobase/Makefile.am revid:vasil.dimov@stripped
@@ -210,7 +210,6 @@ noinst_HEADERS= \
include/usr0sess.h \
include/usr0sess.ic \
include/usr0types.h \
- include/ut0auxconf.h \
include/ut0byte.h \
include/ut0byte.ic \
include/ut0dbg.h \
=== modified file 'storage/innobase/btr/btr0btr.c'
--- a/storage/innobase/btr/btr0btr.c revid:vasil.dimov@stripped
+++ b/storage/innobase/btr/btr0btr.c revid:vasil.dimov@stripped
@@ -604,7 +604,6 @@ btr_page_get_father_node_ptr_func(
ulint line, /*!< in: line where called */
mtr_t* mtr) /*!< in: mtr */
{
- page_t* page;
dtuple_t* tuple;
rec_t* user_rec;
rec_t* node_ptr;
@@ -622,7 +621,6 @@ btr_page_get_father_node_ptr_func(
level = btr_page_get_level(btr_cur_get_page(cursor), mtr);
- page = btr_cur_get_page(cursor);
user_rec = btr_cur_get_rec(cursor);
ut_a(page_rec_is_user_rec(user_rec));
tuple = dict_index_build_node_ptr(index, user_rec, 0, heap, level);
@@ -1900,7 +1898,6 @@ btr_page_split_and_insert(
buf_block_t* left_block;
buf_block_t* right_block;
buf_block_t* insert_block;
- page_t* insert_page;
page_cur_t* page_cursor;
rec_t* first_rec;
byte* buf = 0; /* remove warning */
@@ -2158,8 +2155,6 @@ insert_empty:
insert_block = right_block;
}
- insert_page = buf_block_get_frame(insert_block);
-
/* 7. Reposition the cursor for insert and try insertion */
page_cursor = btr_cur_get_page_cur(cursor);
@@ -2171,8 +2166,12 @@ insert_empty:
#ifdef UNIV_ZIP_DEBUG
{
+ page_t* insert_page
+ = buf_block_get_frame(insert_block);
+
page_zip_des_t* insert_page_zip
= buf_block_get_page_zip(insert_block);
+
ut_a(!insert_page_zip
|| page_zip_validate(insert_page_zip, insert_page));
}
@@ -2566,7 +2565,6 @@ btr_compress(
ulint n_recs;
ulint max_ins_size;
ulint max_ins_size_reorg;
- ulint level;
block = btr_cur_get_block(cursor);
page = btr_cur_get_page(cursor);
@@ -2576,7 +2574,6 @@ btr_compress(
ut_ad(mtr_memo_contains(mtr, dict_index_get_lock(index),
MTR_MEMO_X_LOCK));
ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX));
- level = btr_page_get_level(page, mtr);
space = dict_index_get_space(index);
zip_size = dict_table_zip_size(index->table);
=== modified file 'storage/innobase/btr/btr0cur.c'
--- a/storage/innobase/btr/btr0cur.c revid:vasil.dimov@stripped
+++ b/storage/innobase/btr/btr0cur.c revid:vasil.dimov@stripped
@@ -1954,7 +1954,6 @@ btr_cur_optimistic_update(
page_t* page;
page_zip_des_t* page_zip;
rec_t* rec;
- rec_t* orig_rec;
ulint max_size;
ulint new_rec_size;
ulint old_rec_size;
@@ -1968,7 +1967,7 @@ btr_cur_optimistic_update(
block = btr_cur_get_block(cursor);
page = buf_block_get_frame(block);
- orig_rec = rec = btr_cur_get_rec(cursor);
+ rec = btr_cur_get_rec(cursor);
index = cursor->index;
ut_ad(!!page_rec_is_comp(rec) == dict_table_is_comp(index->table));
ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX));
@@ -4559,17 +4558,20 @@ btr_free_externally_stored_field(
}
for (;;) {
+#ifdef UNIV_SYNC_DEBUG
buf_block_t* rec_block;
+#endif /* UNIV_SYNC_DEBUG */
buf_block_t* ext_block;
mtr_start(&mtr);
- rec_block = buf_page_get(page_get_space_id(
- page_align(field_ref)),
- rec_zip_size,
- page_get_page_no(
- page_align(field_ref)),
- RW_X_LATCH, &mtr);
+#ifdef UNIV_SYNC_DEBUG
+ rec_block =
+#endif /* UNIV_SYNC_DEBUG */
+ buf_page_get(page_get_space_id(page_align(field_ref)),
+ rec_zip_size,
+ page_get_page_no(page_align(field_ref)),
+ RW_X_LATCH, &mtr);
buf_block_dbg_add_level(rec_block, SYNC_NO_ORDER_CHECK);
page_no = mach_read_from_4(field_ref + BTR_EXTERN_PAGE_NO);
=== modified file 'storage/innobase/btr/btr0pcur.c'
--- a/storage/innobase/btr/btr0pcur.c revid:vasil.dimov@stripped
+++ b/storage/innobase/btr/btr0pcur.c revid:vasil.dimov@stripped
@@ -452,7 +452,6 @@ btr_pcur_move_backward_from_page(
mtr_t* mtr) /*!< in: mtr */
{
ulint prev_page_no;
- ulint space;
page_t* page;
buf_block_t* prev_block;
ulint latch_mode;
@@ -488,7 +487,6 @@ btr_pcur_move_backward_from_page(
page = btr_pcur_get_page(cursor);
prev_page_no = btr_page_get_prev(page, mtr);
- space = buf_block_get_space(btr_pcur_get_block(cursor));
if (prev_page_no == FIL_NULL) {
} else if (btr_pcur_is_before_first_on_page(cursor)) {
=== modified file 'storage/innobase/btr/btr0sea.c'
--- a/storage/innobase/btr/btr0sea.c revid:vasil.dimov@stripped
+++ b/storage/innobase/btr/btr0sea.c revid:vasil.dimov@stripped
@@ -1512,7 +1512,6 @@ btr_search_update_hash_on_delete(
rec_t* rec;
ulint fold;
index_id_t index_id;
- ibool found;
ulint offsets_[REC_OFFS_NORMAL_SIZE];
mem_heap_t* heap = NULL;
rec_offs_init(offsets_);
@@ -1545,7 +1544,7 @@ btr_search_update_hash_on_delete(
}
rw_lock_x_lock(&btr_search_latch);
- found = ha_search_and_delete_if_found(table, fold, rec);
+ ha_search_and_delete_if_found(table, fold, rec);
rw_lock_x_unlock(&btr_search_latch);
}
=== modified file 'storage/innobase/buf/buf0buf.c'
--- a/storage/innobase/buf/buf0buf.c revid:vasil.dimov@stripped
+++ b/storage/innobase/buf/buf0buf.c revid:vasil.dimov@stripped
@@ -51,6 +51,7 @@ Created 11/5/1995 Heikki Tuuri
#include "dict0dict.h"
#include "log0recv.h"
#include "page0zip.h"
+#include "srv0mon.h"
/*
IMPLEMENTATION OF THE BUFFER POOL
@@ -304,6 +305,13 @@ struct buf_chunk_struct{
};
#endif /* !UNIV_HOTBACKUP */
+/** Macro to determine whether the read of write counter is used depending
+on the io_type */
+#define MONITOR_RW_COUNTER(io_type, counter) \
+ ((io_type == BUF_IO_READ) \
+ ? (counter##_READ) \
+ : (counter##_WRITTEN))
+
/********************************************************************//**
Gets the smallest oldest_modification lsn for any page in the pool. Returns
zero if all modified pages have been flushed to disk.
@@ -4064,6 +4072,112 @@ buf_page_create(
}
/********************************************************************//**
+Monitor the buffer page read/write activity, and increment corresponding
+counter value if MONITOR_MODULE_BUF_PAGE (module_buf_page) module is
+enabled. */
+static
+void
+buf_page_monitor(
+/*=============*/
+ const buf_page_t* bpage, /*!< in: pointer to the block */
+ enum buf_io_fix io_type)/*!< in: io_fix types */
+{
+ const byte* frame;
+ monitor_id_t counter;
+
+ /* If the counter module is not turned on, just return */
+ if (!MONITOR_IS_ON(MONITOR_MODULE_BUF_PAGE)) {
+ return;
+ }
+
+ ut_a(io_type == BUF_IO_READ || io_type == BUF_IO_WRITE);
+
+ frame = bpage->zip.data
+ ? bpage->zip.data
+ : buf_block_get_frame((buf_block_t*) bpage);
+
+ switch(fil_page_get_type(frame)) {
+ ulint level;
+
+ case FIL_PAGE_INDEX:
+ level = btr_page_get_level_low(frame);
+
+ /* Check if it is an index page for insert buffer */
+ if (btr_page_get_index_id(frame)
+ == (index_id_t)(DICT_IBUF_ID_MIN + IBUF_SPACE_ID)) {
+ if (level == 0) {
+ counter = MONITOR_RW_COUNTER(
+ io_type, MONITOR_INDEX_IBUF_LEAF_PAGE);
+ } else {
+ counter = MONITOR_RW_COUNTER(
+ io_type,
+ MONITOR_INDEX_IBUF_NON_LEAF_PAGE);
+ }
+ } else {
+ if (level == 0) {
+ counter = MONITOR_RW_COUNTER(
+ io_type, MONITOR_INDEX_LEAF_PAGE);
+ } else {
+ counter = MONITOR_RW_COUNTER(
+ io_type, MONITOR_INDEX_NON_LEAF_PAGE);
+ }
+ }
+ break;
+
+ case FIL_PAGE_UNDO_LOG:
+ counter = MONITOR_RW_COUNTER(io_type, MONITOR_UNDO_LOG_PAGE);
+ break;
+
+ case FIL_PAGE_INODE:
+ counter = MONITOR_RW_COUNTER(io_type, MONITOR_INODE_PAGE);
+ break;
+
+ case FIL_PAGE_IBUF_FREE_LIST:
+ counter = MONITOR_RW_COUNTER(io_type,
+ MONITOR_IBUF_FREELIST_PAGE);
+ break;
+
+ case FIL_PAGE_IBUF_BITMAP:
+ counter = MONITOR_RW_COUNTER(io_type,
+ MONITOR_IBUF_BITMAP_PAGE);
+ break;
+
+ case FIL_PAGE_TYPE_SYS:
+ counter = MONITOR_RW_COUNTER(io_type, MONITOR_SYSTEM_PAGE);
+ break;
+
+ case FIL_PAGE_TYPE_TRX_SYS:
+ counter = MONITOR_RW_COUNTER(io_type, MONITOR_TRX_SYSTEM_PAGE);
+ break;
+
+ case FIL_PAGE_TYPE_FSP_HDR:
+ counter = MONITOR_RW_COUNTER(io_type, MONITOR_FSP_HDR_PAGE);
+ break;
+
+ case FIL_PAGE_TYPE_XDES:
+ counter = MONITOR_RW_COUNTER(io_type, MONITOR_XDES_PAGE);
+ break;
+
+ case FIL_PAGE_TYPE_BLOB:
+ counter = MONITOR_RW_COUNTER(io_type, MONITOR_BLOB_PAGE);
+ break;
+
+ case FIL_PAGE_TYPE_ZBLOB:
+ counter = MONITOR_RW_COUNTER(io_type, MONITOR_ZBLOB_PAGE);
+ break;
+
+ case FIL_PAGE_TYPE_ZBLOB2:
+ counter = MONITOR_RW_COUNTER(io_type, MONITOR_ZBLOB2_PAGE);
+ break;
+
+ default:
+ counter = MONITOR_RW_COUNTER(io_type, MONITOR_OTHER_PAGE);
+ }
+
+ MONITOR_INC_NOCHECK(counter);
+}
+
+/********************************************************************//**
Completes an asynchronous read or write request of a file page to or from
the buffer pool. */
UNIV_INTERN
@@ -4263,6 +4377,8 @@ corrupt:
ut_error;
}
+ buf_page_monitor(bpage, io_type);
+
#ifdef UNIV_DEBUG
if (buf_debug_prints) {
fprintf(stderr, "Has %s page space %lu page no %lu\n",
=== modified file 'storage/innobase/buf/buf0flu.c'
--- a/storage/innobase/buf/buf0flu.c revid:vasil.dimov@stripped
+++ b/storage/innobase/buf/buf0flu.c revid:vasil.dimov@stripped
@@ -134,12 +134,18 @@ buf_flush_delete_from_flush_rbt(
/*============================*/
buf_page_t* bpage) /*!< in: bpage to be removed. */
{
+#ifdef UNIV_DEBUG
ibool ret = FALSE;
+#endif /* UNIV_DEBUG */
buf_pool_t* buf_pool = buf_pool_from_bpage(bpage);
ut_ad(buf_flush_list_mutex_own(buf_pool));
- ret = rbt_delete(buf_pool->flush_rbt, &bpage);
+#ifdef UNIV_DEBUG
+ ret =
+#endif /* UNIV_DEBUG */
+ rbt_delete(buf_pool->flush_rbt, &bpage);
+
ut_ad(ret);
}
=== modified file 'storage/innobase/buf/buf0rea.c'
--- a/storage/innobase/buf/buf0rea.c revid:vasil.dimov@stripped
+++ b/storage/innobase/buf/buf0rea.c revid:vasil.dimov@stripped
@@ -260,6 +260,11 @@ buf_read_ahead_linear(
= BUF_READ_AHEAD_LINEAR_AREA(buf_pool);
ulint threshold;
+ /* check if readahead is disabled */
+ if (!srv_read_ahead_threshold) {
+ return(0);
+ }
+
if (UNIV_UNLIKELY(srv_startup_is_before_trx_rollback_phase)) {
/* No read-ahead to avoid thread deadlocks */
return(0);
=== modified file 'storage/innobase/compile-innodb'
--- a/storage/innobase/compile-innodb revid:vasil.dimov@stripped
+++ b/storage/innobase/compile-innodb revid:vasil.dimov@stripped
@@ -22,4 +22,4 @@ MYSQL_ROOT="$(dirname ${0})/../.."
cd ${MYSQL_ROOT}
cmake -DWITH_INNOBASE_STORAGE_ENGINE:BOOL=ON
-make -j4
+make -j$(nproc)
=== modified file 'storage/innobase/dict/dict0crea.c'
--- a/storage/innobase/dict/dict0crea.c revid:vasil.dimov@stripped
+++ b/storage/innobase/dict/dict0crea.c revid:vasil.dimov@stripped
@@ -627,7 +627,6 @@ dict_create_index_tree_step(
{
dict_index_t* index;
dict_table_t* sys_indexes;
- dict_table_t* table;
dtuple_t* search_tuple;
ulint zip_size;
btr_pcur_t pcur;
@@ -636,7 +635,6 @@ dict_create_index_tree_step(
ut_ad(mutex_own(&(dict_sys->mutex)));
index = node->index;
- table = node->table;
sys_indexes = dict_sys->sys_indexes;
=== modified file 'storage/innobase/dict/dict0dict.c'
--- a/storage/innobase/dict/dict0dict.c revid:vasil.dimov@stripped
+++ b/storage/innobase/dict/dict0dict.c revid:vasil.dimov@stripped
@@ -4355,7 +4355,6 @@ dict_index_print_low(
{
ib_int64_t n_vals;
ulint i;
- const char* type_string;
ut_ad(mutex_own(&(dict_sys->mutex)));
@@ -4370,14 +4369,6 @@ dict_index_print_low(
dict_index_stat_mutex_exit(index);
- if (dict_index_is_clust(index)) {
- type_string = "clustered index";
- } else if (dict_index_is_unique(index)) {
- type_string = "unique index";
- } else {
- type_string = "secondary index";
- }
-
fprintf(stderr,
" INDEX: name %s, id %llu, fields %lu/%lu,"
" uniq %lu, type %lu\n"
=== modified file 'storage/innobase/eval/eval0eval.c'
--- a/storage/innobase/eval/eval0eval.c revid:vasil.dimov@stripped
+++ b/storage/innobase/eval/eval0eval.c revid:vasil.dimov@stripped
@@ -384,18 +384,13 @@ eval_notfound(
/*==========*/
func_node_t* func_node) /*!< in: function node */
{
- que_node_t* arg1;
- que_node_t* arg2;
sym_node_t* cursor;
sel_node_t* sel_node;
ibool ibool_val;
- arg1 = func_node->args;
- arg2 = que_node_get_next(arg1);
-
ut_ad(func_node->func == PARS_NOTFOUND_TOKEN);
- cursor = arg1;
+ cursor = func_node->args;
ut_ad(que_node_get_type(cursor) == QUE_NODE_SYMBOL);
=== modified file 'storage/innobase/handler/ha_innodb.cc'
--- a/storage/innobase/handler/ha_innodb.cc revid:vasil.dimov@stripped
+++ b/storage/innobase/handler/ha_innodb.cc revid:vasil.dimov@stripped
@@ -155,10 +155,10 @@ static char* innobase_data_file_path =
static char* innobase_log_group_home_dir = NULL;
static char* innobase_file_format_name = NULL;
static char* innobase_change_buffering = NULL;
-static char* innobase_monitor_counter_on = NULL;
-static char* innobase_monitor_counter_off = NULL;
-static char* innobase_monitor_counter_reset = NULL;
-static char* innobase_monitor_counter_reset_all = NULL;
+static char* innobase_enable_monitor_counter = NULL;
+static char* innobase_disable_monitor_counter = NULL;
+static char* innobase_reset_monitor_counter = NULL;
+static char* innobase_reset_all_monitor_counter = NULL;
/* The highest file format being used in the database. The value can be
set by user, however, it will be adjusted to the newer file format if
@@ -1290,7 +1290,7 @@ innobase_mysql_tmpfile(void)
#ifdef _WIN32
/* Note that on Windows, the integer returned by mysql_tmpfile
- has no relation to C runtime file descriptor. Here, we need
+ has no relation to C runtime file descriptor. Here, we need
to call my_get_osfhandle to get the HANDLE and then convert it
to C runtime filedescriptor. */
{
@@ -2596,7 +2596,7 @@ static
int
innobase_start_trx_and_assign_read_view(
/*====================================*/
- handlerton *hton, /*!< in: Innodb handlerton */
+ handlerton *hton, /*!< in: Innodb handlerton */
THD* thd) /*!< in: MySQL thread handle of the user for whom
the transaction should be committed */
{
@@ -2641,7 +2641,7 @@ static
int
innobase_commit(
/*============*/
- handlerton *hton, /*!< in: Innodb handlerton */
+ handlerton *hton, /*!< in: Innodb handlerton */
THD* thd, /*!< in: MySQL thread handle of the user for whom
the transaction should be committed */
bool all) /*!< in: TRUE - commit transaction
@@ -7272,7 +7272,6 @@ innobase_drop_database(
ulint len = 0;
trx_t* trx;
char* ptr;
- int error;
char* namebuf;
THD* thd = current_thd;
@@ -7315,7 +7314,7 @@ innobase_drop_database(
#else
trx = innobase_trx_allocate(thd);
#endif
- error = row_drop_database_for_mysql(namebuf, trx);
+ row_drop_database_for_mysql(namebuf, trx);
my_free(namebuf);
/* Flush the log to reduce probability that the .frm files and
@@ -9164,12 +9163,9 @@ innodb_show_status(
mutex_exit(&srv_monitor_file_mutex);
- bool result = FALSE;
+ stat_print(thd, innobase_hton_name, (uint) strlen(innobase_hton_name),
+ STRING_WITH_LEN(""), str, flen);
- if (stat_print(thd, innobase_hton_name, (uint) strlen(innobase_hton_name),
- STRING_WITH_LEN(""), str, flen)) {
- result= TRUE;
- }
my_free(str);
DBUG_RETURN(FALSE);
@@ -9687,7 +9683,7 @@ ha_innobase::innobase_get_autoinc(
}
/*******************************************************************//**
-This function reads the global auto-inc counter. It doesn't use the
+This function reads the global auto-inc counter. It doesn't use the
AUTOINC lock even if the lock mode is set to TRADITIONAL.
@return the autoinc value */
UNIV_INTERN
@@ -10869,11 +10865,35 @@ innodb_monitor_valid_byname(
const char* name) /*!< in: incoming monitor name */
{
if (name) {
- ulint use;
+ ulint use;
+ monitor_info_t* monitor_info;
for (use = 0; use < NUM_MONITOR; use++) {
if (!innobase_strcasecmp(
name, srv_mon_get_name((monitor_id_t)use))) {
+ monitor_info = srv_mon_get_info(
+ (monitor_id_t)use);
+
+ /* If the monitor counter is marked with
+ MONITOR_GROUP_MODULE flag, then this counter
+ cannot be turned on/off individually, instead
+ it shall be turned on/off as a group using
+ its module name */
+ if ((monitor_info->monitor_type
+ & MONITOR_GROUP_MODULE)
+ && (!(monitor_info->monitor_type
+ & MONITOR_MODULE))) {
+ sql_print_warning(
+ "Monitor counter '%s' cannot"
+ " be turned on/off individually"
+ " . Please use its module name"
+ " to turn on/off the counters"
+ " in the module as a group.\n",
+ name);
+
+ return(1);
+ }
+
*(ulint*) save = use;
return(0);
}
@@ -10948,8 +10968,7 @@ innodb_monitor_update(
ER_NO_DEFAULT,
"Default value is not defined for "
"this set option. Please specify "
- "counter or module name to turn on/off "
- "or reset monitor counters.");
+ "correct counter or module name.");
*(const char**) var_ptr = NULL;
} else {
monitor_info = srv_mon_get_info(monitor_id);
@@ -10974,6 +10993,11 @@ innodb_monitor_update(
err_monitor = srv_mon_set_module_control(monitor_id,
set_option);
} else {
+ /* If module is marked with MONITOR_GROUP_MODULE
+ status, it cannot be turned on/off individually */
+ ut_a(!(monitor_info->monitor_type &
+ MONITOR_GROUP_MODULE));
+
switch (set_option) {
case MONITOR_TURN_ON:
MONITOR_ON(monitor_id);
@@ -11019,20 +11043,20 @@ exit:
been turned on, we will set err_monitor. Print related
information */
if (err_monitor) {
- sql_print_warning("Monitor %s already turned on.",
+ sql_print_warning("Monitor %s is already enabled.",
srv_mon_get_name((monitor_id_t)err_monitor));
}
return;
}
/****************************************************************//**
-Update the system variable innodb_monitor_counter_on and turn on
+Update the system variable innodb_enable_monitor_counter and enable
specified monitor counter.
This function is registered as a callback with MySQL. */
static
void
-innodb_monitor_on_update(
-/*=====================*/
+innodb_enable_monitor_update(
+/*=========================*/
THD* thd, /*!< in: thread handle */
struct st_mysql_sys_var* var, /*!< in: pointer to
system variable */
@@ -11044,12 +11068,12 @@ innodb_monitor_on_update(
innodb_monitor_update(thd, var_ptr, save, MONITOR_TURN_ON);
}
/****************************************************************//**
-Update the system variable innodb_monitor_counter_off and turn
+Update the system variable innodb_disable_monitor_counter and turn
off specified monitor counter. */
static
void
-innodb_monitor_off_update(
-/*======================*/
+innodb_disable_monitor_update(
+/*==========================*/
THD* thd, /*!< in: thread handle */
struct st_mysql_sys_var* var, /*!< in: pointer to
system variable */
@@ -11066,7 +11090,7 @@ specified monitor counter(s).
This function is registered as a callback with MySQL. */
static
void
-innodb_monitor_reset_update(
+innodb_reset_monitor_update(
/*========================*/
THD* thd, /*!< in: thread handle */
struct st_mysql_sys_var* var, /*!< in: pointer to
@@ -11084,7 +11108,7 @@ all value related monitor counter.
This function is registered as a callback with MySQL. */
static
void
-innodb_monitor_reset_all_update(
+innodb_reset_all_monitor_update(
/*============================*/
THD* thd, /*!< in: thread handle */
struct st_mysql_sys_var* var, /*!< in: pointer to
@@ -11481,29 +11505,29 @@ static MYSQL_SYSVAR_ULONG(read_ahead_thr
"trigger a readahead.",
NULL, NULL, 56, 0, 64, 0);
-static MYSQL_SYSVAR_STR(monitor_counter_on, innobase_monitor_counter_on,
+static MYSQL_SYSVAR_STR(enable_monitor_counter, innobase_enable_monitor_counter,
PLUGIN_VAR_RQCMDARG,
"Turn on a monitor counter",
innodb_monitor_validate,
- innodb_monitor_on_update, NULL);
+ innodb_enable_monitor_update, NULL);
-static MYSQL_SYSVAR_STR(monitor_counter_off, innobase_monitor_counter_off,
+static MYSQL_SYSVAR_STR(disable_monitor_counter, innobase_disable_monitor_counter,
PLUGIN_VAR_RQCMDARG,
"Turn off a monitor counter",
innodb_monitor_validate,
- innodb_monitor_off_update, NULL);
+ innodb_disable_monitor_update, NULL);
-static MYSQL_SYSVAR_STR(monitor_counter_reset, innobase_monitor_counter_reset,
+static MYSQL_SYSVAR_STR(reset_monitor_counter, innobase_reset_monitor_counter,
PLUGIN_VAR_RQCMDARG,
"Reset a monitor counter",
innodb_monitor_validate,
- innodb_monitor_reset_update, NULL);
+ innodb_reset_monitor_update, NULL);
-static MYSQL_SYSVAR_STR(monitor_counter_reset_all, innobase_monitor_counter_reset_all,
+static MYSQL_SYSVAR_STR(reset_all_monitor_counter, innobase_reset_all_monitor_counter,
PLUGIN_VAR_RQCMDARG,
"Reset all values for a monitor counter",
innodb_monitor_validate,
- innodb_monitor_reset_all_update, NULL);
+ innodb_reset_all_monitor_update, NULL);
static struct st_mysql_sys_var* innobase_system_variables[]= {
MYSQL_SYSVAR(additional_mem_pool_size),
@@ -11567,10 +11591,10 @@ static struct st_mysql_sys_var* innobase
MYSQL_SYSVAR(change_buffering),
MYSQL_SYSVAR(read_ahead_threshold),
MYSQL_SYSVAR(io_capacity),
- MYSQL_SYSVAR(monitor_counter_on),
- MYSQL_SYSVAR(monitor_counter_off),
- MYSQL_SYSVAR(monitor_counter_reset),
- MYSQL_SYSVAR(monitor_counter_reset_all),
+ MYSQL_SYSVAR(enable_monitor_counter),
+ MYSQL_SYSVAR(disable_monitor_counter),
+ MYSQL_SYSVAR(reset_monitor_counter),
+ MYSQL_SYSVAR(reset_all_monitor_counter),
MYSQL_SYSVAR(purge_threads),
MYSQL_SYSVAR(purge_batch_size),
MYSQL_SYSVAR(page_hash_mutexes),
@@ -11599,13 +11623,6 @@ i_s_innodb_cmp,
i_s_innodb_cmp_reset,
i_s_innodb_cmpmem,
i_s_innodb_cmpmem_reset,
-i_s_innodb_sys_tables,
-i_s_innodb_sys_tablestats,
-i_s_innodb_sys_indexes,
-i_s_innodb_sys_columns,
-i_s_innodb_sys_fields,
-i_s_innodb_sys_foreign,
-i_s_innodb_sys_foreign_cols,
i_s_innodb_metrics
mysql_declare_plugin_end;
=== modified file 'storage/innobase/handler/i_s.cc'
--- a/storage/innobase/handler/i_s.cc revid:vasil.dimov@stripped
+++ b/storage/innobase/handler/i_s.cc revid:vasil.dimov@stripped
@@ -36,11 +36,9 @@ Created July 18, 2007 Vasil Dimov
#include <mysql/innodb_priv.h>
extern "C" {
-#include "btr0pcur.h" /* for file sys_tables related info. */
#include "btr0types.h"
#include "buf0buddy.h" /* for i_s_cmpmem */
#include "buf0buf.h" /* for buf_pool and PAGE_ZIP_MIN_SIZE */
-#include "dict0load.h" /* for file sys_tables related info. */
#include "dict0mem.h"
#include "dict0types.h"
#include "ha_prototypes.h" /* for innobase_convert_name() */
@@ -1200,6 +1198,7 @@ trx_i_s_common_fill_table(
see http://bugs.mysql.com/29900 ; when that bug is resolved
we can enable the DBUG_RETURN(ret) above */
DBUG_RETURN(0);
+ ret++; // silence a gcc46 warning
#endif
}
@@ -1777,7 +1776,7 @@ UNIV_INTERN struct st_mysql_plugin i_s_i
static ST_FIELD_INFO innodb_metrics_fields_info[] =
{
#define METRIC_NAME 0
- {STRUCT_FLD(field_name, "name"),
+ {STRUCT_FLD(field_name, "NAME"),
STRUCT_FLD(field_length, NAME_LEN + 1),
STRUCT_FLD(field_type, MYSQL_TYPE_STRING),
STRUCT_FLD(value, 0),
@@ -1786,7 +1785,7 @@ static ST_FIELD_INFO innodb_metrics_fiel
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
#define METRIC_SUBSYS 1
- {STRUCT_FLD(field_name, "subsystem"),
+ {STRUCT_FLD(field_name, "SUBSYSTEM"),
STRUCT_FLD(field_length, NAME_LEN + 1),
STRUCT_FLD(field_type, MYSQL_TYPE_STRING),
STRUCT_FLD(value, 0),
@@ -1795,7 +1794,7 @@ static ST_FIELD_INFO innodb_metrics_fiel
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
#define METRIC_VALUE_START 2
- {STRUCT_FLD(field_name, "value_since_start"),
+ {STRUCT_FLD(field_name, "COUNT"),
STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS),
STRUCT_FLD(field_type, MYSQL_TYPE_LONGLONG),
STRUCT_FLD(value, 0),
@@ -1804,7 +1803,7 @@ static ST_FIELD_INFO innodb_metrics_fiel
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
#define METRIC_MAX_VALUE_START 3
- {STRUCT_FLD(field_name, "max_since_start"),
+ {STRUCT_FLD(field_name, "MAX_COUNT"),
STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS),
STRUCT_FLD(field_type, MYSQL_TYPE_LONGLONG),
STRUCT_FLD(value, 0),
@@ -1813,7 +1812,7 @@ static ST_FIELD_INFO innodb_metrics_fiel
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
#define METRIC_MIN_VALUE_START 4
- {STRUCT_FLD(field_name, "min_since_start"),
+ {STRUCT_FLD(field_name, "MIN_COUNT"),
STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS),
STRUCT_FLD(field_type, MYSQL_TYPE_LONGLONG),
STRUCT_FLD(value, 0),
@@ -1822,7 +1821,7 @@ static ST_FIELD_INFO innodb_metrics_fiel
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
#define METRIC_AVG_VALUE_START 5
- {STRUCT_FLD(field_name, "avg_since_start"),
+ {STRUCT_FLD(field_name, "AVG_COUNT"),
STRUCT_FLD(field_length, 0),
STRUCT_FLD(field_type, MYSQL_TYPE_FLOAT),
STRUCT_FLD(value, 0),
@@ -1831,7 +1830,7 @@ static ST_FIELD_INFO innodb_metrics_fiel
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
#define METRIC_VALUE_RESET 6
- {STRUCT_FLD(field_name, "value_since_reset"),
+ {STRUCT_FLD(field_name, "COUNT_SINCE_RESET"),
STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS),
STRUCT_FLD(field_type, MYSQL_TYPE_LONGLONG),
STRUCT_FLD(value, 0),
@@ -1840,7 +1839,7 @@ static ST_FIELD_INFO innodb_metrics_fiel
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
#define METRIC_MAX_VALUE_RESET 7
- {STRUCT_FLD(field_name, "max_since_reset"),
+ {STRUCT_FLD(field_name, "MAX_COUNT_SINCE_RESET"),
STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS),
STRUCT_FLD(field_type, MYSQL_TYPE_LONGLONG),
STRUCT_FLD(value, 0),
@@ -1849,7 +1848,7 @@ static ST_FIELD_INFO innodb_metrics_fiel
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
#define METRIC_MIN_VALUE_RESET 8
- {STRUCT_FLD(field_name, "min_since_reset"),
+ {STRUCT_FLD(field_name, "MIN_COUNT_SINCE_RESET"),
STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS),
STRUCT_FLD(field_type, MYSQL_TYPE_LONGLONG),
STRUCT_FLD(value, 0),
@@ -1858,7 +1857,7 @@ static ST_FIELD_INFO innodb_metrics_fiel
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
#define METRIC_AVG_VALUE_RESET 9
- {STRUCT_FLD(field_name, "avg_since_reset"),
+ {STRUCT_FLD(field_name, "AVG_COUNT_SINCE_RESET"),
STRUCT_FLD(field_length, 0),
STRUCT_FLD(field_type, MYSQL_TYPE_FLOAT),
STRUCT_FLD(value, 0),
@@ -1867,7 +1866,7 @@ static ST_FIELD_INFO innodb_metrics_fiel
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
#define METRIC_START_TIME 10
- {STRUCT_FLD(field_name, "start_time"),
+ {STRUCT_FLD(field_name, "TIME_ENABLED"),
STRUCT_FLD(field_length, 0),
STRUCT_FLD(field_type, MYSQL_TYPE_DATETIME),
STRUCT_FLD(value, 0),
@@ -1876,7 +1875,7 @@ static ST_FIELD_INFO innodb_metrics_fiel
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
#define METRIC_STOP_TIME 11
- {STRUCT_FLD(field_name, "stop_time"),
+ {STRUCT_FLD(field_name, "TIME_DISABLED"),
STRUCT_FLD(field_length, 0),
STRUCT_FLD(field_type, MYSQL_TYPE_DATETIME),
STRUCT_FLD(value, 0),
@@ -1885,7 +1884,7 @@ static ST_FIELD_INFO innodb_metrics_fiel
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
#define METRIC_RESET_TIME 12
- {STRUCT_FLD(field_name, "reset_time"),
+ {STRUCT_FLD(field_name, "TIME_RESET"),
STRUCT_FLD(field_length, 0),
STRUCT_FLD(field_type, MYSQL_TYPE_DATETIME),
STRUCT_FLD(value, 0),
@@ -1894,7 +1893,7 @@ static ST_FIELD_INFO innodb_metrics_fiel
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
#define METRIC_STATUS 13
- {STRUCT_FLD(field_name, "status"),
+ {STRUCT_FLD(field_name, "STATUS"),
STRUCT_FLD(field_length, NAME_LEN + 1),
STRUCT_FLD(field_type, MYSQL_TYPE_STRING),
STRUCT_FLD(value, 0),
@@ -1903,7 +1902,7 @@ static ST_FIELD_INFO innodb_metrics_fiel
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
#define METRIC_TYPE 14
- {STRUCT_FLD(field_name, "type"),
+ {STRUCT_FLD(field_name, "TYPE"),
STRUCT_FLD(field_length, NAME_LEN + 1),
STRUCT_FLD(field_type, MYSQL_TYPE_STRING),
STRUCT_FLD(value, 0),
@@ -1912,7 +1911,7 @@ static ST_FIELD_INFO innodb_metrics_fiel
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
#define METRIC_DESC 15
- {STRUCT_FLD(field_name, "description"),
+ {STRUCT_FLD(field_name, "COMMENT"),
STRUCT_FLD(field_length, NAME_LEN + 1),
STRUCT_FLD(field_type, MYSQL_TYPE_STRING),
STRUCT_FLD(value, 0),
@@ -2080,9 +2079,9 @@ i_s_metrics_fill(
fields[METRIC_RESET_TIME]->set_null();
}
- /* Display the monitor status to be "started" */
+ /* Display the monitor status as "enabled" */
OK(field_store_string(fields[METRIC_STATUS],
- "started"));
+ "enabled"));
} else {
if (MONITOR_FIELD(count, mon_stop_time)) {
OK(field_store_time_t(fields[METRIC_STOP_TIME],
@@ -2095,15 +2094,15 @@ i_s_metrics_fill(
fields[METRIC_RESET_TIME]->set_null();
OK(field_store_string(fields[METRIC_STATUS],
- "stopped"));
+ "disabled"));
}
if (monitor_info->monitor_type & MONITOR_DISPLAY_CURRENT) {
OK(field_store_string(fields[METRIC_TYPE],
- "current_value"));
+ "value"));
} else {
OK(field_store_string(fields[METRIC_TYPE],
- "counter_value"));
+ "counter"));
}
OK(schema_table_store_record(thd, table_to_fill));
@@ -2220,1629 +2219,3 @@ i_s_common_deinit(
DBUG_RETURN(0);
}
-
-/* Fields of the dynamic table INFORMATION_SCHEMA.SYS_TABLES */
-static ST_FIELD_INFO innodb_sys_tables_fields_info[] =
-{
-#define SYS_TABLE_ID 0
- {STRUCT_FLD(field_name, "TABLE_ID"),
- STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS),
- STRUCT_FLD(field_type, MYSQL_TYPE_LONGLONG),
- STRUCT_FLD(value, 0),
- STRUCT_FLD(field_flags, MY_I_S_UNSIGNED),
- STRUCT_FLD(old_name, ""),
- STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
-
-#define SYS_TABLE_NAME 1
- {STRUCT_FLD(field_name, "NAME"),
- STRUCT_FLD(field_length, NAME_LEN + 1),
- STRUCT_FLD(field_type, MYSQL_TYPE_STRING),
- STRUCT_FLD(value, 0),
- STRUCT_FLD(field_flags, 0),
- STRUCT_FLD(old_name, ""),
- STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
-
-#define SYS_TABLE_FLAG 2
- {STRUCT_FLD(field_name, "FLAG"),
- STRUCT_FLD(field_length, MY_INT32_NUM_DECIMAL_DIGITS),
- STRUCT_FLD(field_type, MYSQL_TYPE_LONG),
- STRUCT_FLD(value, 0),
- STRUCT_FLD(field_flags, 0),
- STRUCT_FLD(old_name, ""),
- STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
-
-#define SYS_TABLE_NUM_COLUMN 3
- {STRUCT_FLD(field_name, "N_COLS"),
- STRUCT_FLD(field_length, MY_INT32_NUM_DECIMAL_DIGITS),
- STRUCT_FLD(field_type, MYSQL_TYPE_LONG),
- STRUCT_FLD(value, 0),
- STRUCT_FLD(field_flags, 0),
- STRUCT_FLD(old_name, ""),
- STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
-
-#define SYS_TABLE_SPACE 4
- {STRUCT_FLD(field_name, "SPACE"),
- STRUCT_FLD(field_length, MY_INT32_NUM_DECIMAL_DIGITS),
- STRUCT_FLD(field_type, MYSQL_TYPE_LONG),
- STRUCT_FLD(value, 0),
- STRUCT_FLD(field_flags, 0),
- STRUCT_FLD(old_name, ""),
- STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
-
- END_OF_ST_FIELD_INFO
-};
-
-/**********************************************************************//**
-Populate information_schema.innodb_sys_tables table with information
-from SYS_TABLES.
-@return 0 on success */
-static
-int
-i_s_dict_fill_sys_tables(
-/*=====================*/
- THD* thd, /*!< in: thread */
- dict_table_t* table, /*!< in: table */
- TABLE* table_to_fill) /*!< in/out: fill this table */
-{
- Field** fields;
-
- DBUG_ENTER("i_s_dict_fill_sys_tables");
-
- fields = table_to_fill->field;
-
- OK(fields[SYS_TABLE_ID]->store(longlong(table->id), TRUE));
-
- OK(field_store_string(fields[SYS_TABLE_NAME], table->name));
-
- OK(fields[SYS_TABLE_FLAG]->store(table->flags));
-
- OK(fields[SYS_TABLE_NUM_COLUMN]->store(table->n_cols));
-
- OK(fields[SYS_TABLE_SPACE]->store(table->space));
-
- OK(schema_table_store_record(thd, table_to_fill));
-
- DBUG_RETURN(0);
-}
-/*******************************************************************//**
-Function to go through each record in SYS_TABLES table, and fill the
-information_schema.innodb_sys_tables table with related table information
-@return 0 on success */
-static
-int
-i_s_sys_tables_fill_table(
-/*======================*/
- THD* thd, /*!< in: thread */
- TABLE_LIST* tables, /*!< in/out: tables to fill */
- Item* cond) /*!< in: condition (not used) */
-{
- btr_pcur_t pcur;
- const rec_t* rec;
- mem_heap_t* heap;
- mtr_t mtr;
-
- DBUG_ENTER("i_s_sys_tables_fill_table");
-
- /* deny access to non-superusers */
- if (check_global_access(thd, PROCESS_ACL)) {
-
- DBUG_RETURN(0);
- }
-
- heap = mem_heap_create(1000);
- mutex_enter(&(dict_sys->mutex));
- mtr_start(&mtr);
-
- rec = dict_startscan_system(&pcur, &mtr, SYS_TABLES);
-
- while (rec) {
- const char* err_msg;
- dict_table_t* table_rec;
-
- /* Create and populate a dict_table_t structure with
- information from SYS_TABLES row */
- err_msg = dict_process_sys_tables_rec(
- heap, rec, &table_rec, DICT_TABLE_LOAD_FROM_RECORD);
-
- mtr_commit(&mtr);
- mutex_exit(&dict_sys->mutex);
-
- if (!err_msg) {
- i_s_dict_fill_sys_tables(thd, table_rec, tables->table);
- } else {
- push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
- ER_CANT_FIND_SYSTEM_REC,
- err_msg);
- }
-
- /* Since dict_process_sys_tables_rec() is called with
- DICT_TABLE_LOAD_FROM_RECORD, the table_rec is created in
- dict_process_sys_tables_rec(), we will need to free it */
- if (table_rec) {
- dict_mem_table_free(table_rec);
- }
-
- mem_heap_empty(heap);
-
- /* Get the next record */
- mutex_enter(&dict_sys->mutex);
- mtr_start(&mtr);
- rec = dict_getnext_system(&pcur, &mtr);
- }
-
- mtr_commit(&mtr);
- mutex_exit(&dict_sys->mutex);
- mem_heap_free(heap);
-
- DBUG_RETURN(0);
-}
-
-/*******************************************************************//**
-Bind the dynamic table INFORMATION_SCHEMA.innodb_sys_tables
-@return 0 on success */
-static
-int
-innodb_sys_tables_init(
-/*===================*/
- void* p) /*!< in/out: table schema object */
-{
- ST_SCHEMA_TABLE* schema;
-
- DBUG_ENTER("innodb_sys_tables_init");
-
- schema = (ST_SCHEMA_TABLE*) p;
-
- schema->fields_info = innodb_sys_tables_fields_info;
- schema->fill_table = i_s_sys_tables_fill_table;
-
- DBUG_RETURN(0);
-}
-
-UNIV_INTERN struct st_mysql_plugin i_s_innodb_sys_tables =
-{
- /* the plugin type (a MYSQL_XXX_PLUGIN value) */
- /* int */
- STRUCT_FLD(type, MYSQL_INFORMATION_SCHEMA_PLUGIN),
-
- /* pointer to type-specific plugin descriptor */
- /* void* */
- STRUCT_FLD(info, &i_s_info),
-
- /* plugin name */
- /* const char* */
- STRUCT_FLD(name, "INNODB_SYS_TABLES"),
-
- /* plugin author (for SHOW PLUGINS) */
- /* const char* */
- STRUCT_FLD(author, plugin_author),
-
- /* general descriptive text (for SHOW PLUGINS) */
- /* const char* */
- STRUCT_FLD(descr, "InnoDB SYS_TABLES"),
-
- /* the plugin license (PLUGIN_LICENSE_XXX) */
- /* int */
- STRUCT_FLD(license, PLUGIN_LICENSE_GPL),
-
- /* the function to invoke when plugin is loaded */
- /* int (*)(void*); */
- STRUCT_FLD(init, innodb_sys_tables_init),
-
- /* the function to invoke when plugin is unloaded */
- /* int (*)(void*); */
- STRUCT_FLD(deinit, i_s_common_deinit),
-
- /* plugin version (for SHOW PLUGINS) */
- /* unsigned int */
- STRUCT_FLD(version, INNODB_VERSION_SHORT),
-
- /* struct st_mysql_show_var* */
- STRUCT_FLD(status_vars, NULL),
-
- /* struct st_mysql_sys_var** */
- STRUCT_FLD(system_vars, NULL),
-
- /* reserved for dependency checking */
- /* void* */
- STRUCT_FLD(__reserved1, NULL)
-};
-
-/* Fields of the dynamic table INFORMATION_SCHEMA.SYS_TABLESTATS */
-static ST_FIELD_INFO innodb_sys_tablestats_fields_info[] =
-{
-#define SYS_TABLESTATS_ID 0
- {STRUCT_FLD(field_name, "TABLE_ID"),
- STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS),
- STRUCT_FLD(field_type, MYSQL_TYPE_LONGLONG),
- STRUCT_FLD(value, 0),
- STRUCT_FLD(field_flags, MY_I_S_UNSIGNED),
- STRUCT_FLD(old_name, ""),
- STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
-
-#define SYS_TABLESTATS_NAME 1
- {STRUCT_FLD(field_name, "NAME"),
- STRUCT_FLD(field_length, NAME_LEN + 1),
- STRUCT_FLD(field_type, MYSQL_TYPE_STRING),
- STRUCT_FLD(value, 0),
- STRUCT_FLD(field_flags, 0),
- STRUCT_FLD(old_name, ""),
- STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
-
-#define SYS_TABLESTATS_INIT 2
- {STRUCT_FLD(field_name, "STATS_INITIALIZED"),
- STRUCT_FLD(field_length, NAME_LEN + 1),
- STRUCT_FLD(field_type, MYSQL_TYPE_STRING),
- STRUCT_FLD(value, 0),
- STRUCT_FLD(field_flags, 0),
- STRUCT_FLD(old_name, ""),
- STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
-
-#define SYS_TABLESTATS_NROW 3
- {STRUCT_FLD(field_name, "NUM_ROWS"),
- STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS),
- STRUCT_FLD(field_type, MYSQL_TYPE_LONGLONG),
- STRUCT_FLD(value, 0),
- STRUCT_FLD(field_flags, MY_I_S_UNSIGNED),
- STRUCT_FLD(old_name, ""),
- STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
-
-#define SYS_TABLESTATS_CLUST_SIZE 4
- {STRUCT_FLD(field_name, "CLUST_INDEX_SIZE"),
- STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS),
- STRUCT_FLD(field_type, MYSQL_TYPE_LONGLONG),
- STRUCT_FLD(value, 0),
- STRUCT_FLD(field_flags, MY_I_S_UNSIGNED),
- STRUCT_FLD(old_name, ""),
- STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
-
-#define SYS_TABLESTATS_INDEX_SIZE 5
- {STRUCT_FLD(field_name, "OTHER_INDEX_SIZE"),
- STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS),
- STRUCT_FLD(field_type, MYSQL_TYPE_LONGLONG),
- STRUCT_FLD(value, 0),
- STRUCT_FLD(field_flags, MY_I_S_UNSIGNED),
- STRUCT_FLD(old_name, ""),
- STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
-
-#define SYS_TABLESTATS_MODIFIED 6
- {STRUCT_FLD(field_name, "MODIFIED_COUNTER"),
- STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS),
- STRUCT_FLD(field_type, MYSQL_TYPE_LONGLONG),
- STRUCT_FLD(value, 0),
- STRUCT_FLD(field_flags, MY_I_S_UNSIGNED),
- STRUCT_FLD(old_name, ""),
- STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
-
-#define SYS_TABLESTATS_AUTONINC 7
- {STRUCT_FLD(field_name, "AUTOINC"),
- STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS),
- STRUCT_FLD(field_type, MYSQL_TYPE_LONGLONG),
- STRUCT_FLD(value, 0),
- STRUCT_FLD(field_flags, MY_I_S_UNSIGNED),
- STRUCT_FLD(old_name, ""),
- STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
-
-#define SYS_TABLESTATS_MYSQL_OPEN_HANDLE 8
- {STRUCT_FLD(field_name, "MYSQL_HANDLES_OPENED"),
- STRUCT_FLD(field_length, MY_INT32_NUM_DECIMAL_DIGITS),
- STRUCT_FLD(field_type, MYSQL_TYPE_LONG),
- STRUCT_FLD(value, 0),
- STRUCT_FLD(field_flags, 0),
- STRUCT_FLD(old_name, ""),
- STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
-
- END_OF_ST_FIELD_INFO
-};
-
-/**********************************************************************//**
-Populate information_schema.innodb_sys_tablestats table with information
-from SYS_TABLES.
-@return 0 on success */
-static
-int
-i_s_dict_fill_sys_tablestats(
-/*=========================*/
- THD* thd, /*!< in: thread */
- dict_table_t* table, /*!< in: table */
- TABLE* table_to_fill) /*!< in/out: fill this table */
-{
- Field** fields;
-
- DBUG_ENTER("i_s_dict_fill_sys_tablestats");
-
- fields = table_to_fill->field;
-
- OK(fields[SYS_TABLESTATS_ID]->store(longlong(table->id), TRUE));
-
- OK(field_store_string(fields[SYS_TABLESTATS_NAME], table->name));
-
- if (table->stat_initialized) {
- OK(field_store_string(fields[SYS_TABLESTATS_INIT],
- "Initialized"));
- } else {
- OK(field_store_string(fields[SYS_TABLESTATS_INIT],
- "Uninitialized"));
- }
-
- OK(fields[SYS_TABLESTATS_NROW]->store(table->stat_n_rows, TRUE));
-
- OK(fields[SYS_TABLESTATS_CLUST_SIZE]->store(
- table->stat_clustered_index_size));
-
- OK(fields[SYS_TABLESTATS_INDEX_SIZE]->store(
- table->stat_sum_of_other_index_sizes));
-
- OK(fields[SYS_TABLESTATS_MODIFIED]->store(
- table->stat_modified_counter));
-
- OK(fields[SYS_TABLESTATS_AUTONINC]->store(table->autoinc, TRUE));
-
- OK(fields[SYS_TABLESTATS_MYSQL_OPEN_HANDLE]->store(
- table->n_mysql_handles_opened));
-
- OK(schema_table_store_record(thd, table_to_fill));
-
- DBUG_RETURN(0);
-}
-/*******************************************************************//**
-Function to go through each record in SYS_TABLES table, and fill the
-information_schema.innodb_sys_tablestats table with table statistics
-related information
-@return 0 on success */
-static
-int
-i_s_sys_tables_fill_table_stats(
-/*============================*/
- THD* thd, /*!< in: thread */
- TABLE_LIST* tables, /*!< in/out: tables to fill */
- Item* cond) /*!< in: condition (not used) */
-{
- btr_pcur_t pcur;
- const rec_t* rec;
- mem_heap_t* heap;
- mtr_t mtr;
-
- DBUG_ENTER("i_s_sys_tables_fill_table_stats");
-
- /* deny access to non-superusers */
- if (check_global_access(thd, PROCESS_ACL)) {
-
- DBUG_RETURN(0);
- }
-
- heap = mem_heap_create(1000);
- mutex_enter(&dict_sys->mutex);
- mtr_start(&mtr);
-
- rec = dict_startscan_system(&pcur, &mtr, SYS_TABLES);
-
- while (rec) {
- const char* err_msg;
- dict_table_t* table_rec;
-
- /* Fetch the dict_table_t structure corresponding to
- this SYS_TABLES record */
- err_msg = dict_process_sys_tables_rec(
- heap, rec, &table_rec, DICT_TABLE_LOAD_FROM_CACHE);
-
- mtr_commit(&mtr);
- mutex_exit(&dict_sys->mutex);
-
- if (!err_msg) {
- i_s_dict_fill_sys_tablestats(thd, table_rec,
- tables->table);
- } else {
- push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
- ER_CANT_FIND_SYSTEM_REC,
- err_msg);
- }
-
- mem_heap_empty(heap);
-
- /* Get the next record */
- mutex_enter(&dict_sys->mutex);
- mtr_start(&mtr);
- rec = dict_getnext_system(&pcur, &mtr);
- }
-
- mtr_commit(&mtr);
- mutex_exit(&dict_sys->mutex);
- mem_heap_free(heap);
-
- DBUG_RETURN(0);
-}
-
-/*******************************************************************//**
-Bind the dynamic table INFORMATION_SCHEMA.innodb_sys_tablestats
-@return 0 on success */
-static
-int
-innodb_sys_tablestats_init(
-/*=======================*/
- void* p) /*!< in/out: table schema object */
-{
- ST_SCHEMA_TABLE* schema;
-
- DBUG_ENTER("innodb_sys_tablestats_init");
-
- schema = (ST_SCHEMA_TABLE*) p;
-
- schema->fields_info = innodb_sys_tablestats_fields_info;
- schema->fill_table = i_s_sys_tables_fill_table_stats;
-
- DBUG_RETURN(0);
-}
-
-UNIV_INTERN struct st_mysql_plugin i_s_innodb_sys_tablestats =
-{
- /* the plugin type (a MYSQL_XXX_PLUGIN value) */
- /* int */
- STRUCT_FLD(type, MYSQL_INFORMATION_SCHEMA_PLUGIN),
-
- /* pointer to type-specific plugin descriptor */
- /* void* */
- STRUCT_FLD(info, &i_s_info),
-
- /* plugin name */
- /* const char* */
- STRUCT_FLD(name, "INNODB_SYS_TABLESTATS"),
-
- /* plugin author (for SHOW PLUGINS) */
- /* const char* */
- STRUCT_FLD(author, plugin_author),
-
- /* general descriptive text (for SHOW PLUGINS) */
- /* const char* */
- STRUCT_FLD(descr, "InnoDB SYS_TABLESTATS"),
-
- /* the plugin license (PLUGIN_LICENSE_XXX) */
- /* int */
- STRUCT_FLD(license, PLUGIN_LICENSE_GPL),
-
- /* the function to invoke when plugin is loaded */
- /* int (*)(void*); */
- STRUCT_FLD(init, innodb_sys_tablestats_init),
-
- /* the function to invoke when plugin is unloaded */
- /* int (*)(void*); */
- STRUCT_FLD(deinit, i_s_common_deinit),
-
- /* plugin version (for SHOW PLUGINS) */
- /* unsigned int */
- STRUCT_FLD(version, INNODB_VERSION_SHORT),
-
- /* struct st_mysql_show_var* */
- STRUCT_FLD(status_vars, NULL),
-
- /* struct st_mysql_sys_var** */
- STRUCT_FLD(system_vars, NULL),
-
- /* reserved for dependency checking */
- /* void* */
- STRUCT_FLD(__reserved1, NULL)
-};
-
-/* Fields of the dynamic table INFORMATION_SCHEMA.SYS_INDEXES */
-static ST_FIELD_INFO innodb_sysindex_fields_info[] =
-{
-#define SYS_INDEX_ID 0
- {STRUCT_FLD(field_name, "INDEX_ID"),
- STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS),
- STRUCT_FLD(field_type, MYSQL_TYPE_LONGLONG),
- STRUCT_FLD(value, 0),
- STRUCT_FLD(field_flags, MY_I_S_UNSIGNED),
- STRUCT_FLD(old_name, ""),
- STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
-
-#define SYS_INDEX_NAME 1
- {STRUCT_FLD(field_name, "NAME"),
- STRUCT_FLD(field_length, NAME_LEN + 1),
- STRUCT_FLD(field_type, MYSQL_TYPE_STRING),
- STRUCT_FLD(value, 0),
- STRUCT_FLD(field_flags, 0),
- STRUCT_FLD(old_name, ""),
- STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
-
-#define SYS_INDEX_TABLE_ID 2
- {STRUCT_FLD(field_name, "TABLE_ID"),
- STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS),
- STRUCT_FLD(field_type, MYSQL_TYPE_LONGLONG),
- STRUCT_FLD(value, 0),
- STRUCT_FLD(field_flags, MY_I_S_UNSIGNED),
- STRUCT_FLD(old_name, ""),
- STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
-
-#define SYS_INDEX_TYPE 3
- {STRUCT_FLD(field_name, "TYPE"),
- STRUCT_FLD(field_length, MY_INT32_NUM_DECIMAL_DIGITS),
- STRUCT_FLD(field_type, MYSQL_TYPE_LONG),
- STRUCT_FLD(value, 0),
- STRUCT_FLD(field_flags, 0),
- STRUCT_FLD(old_name, ""),
- STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
-
-#define SYS_INDEX_NUM_FIELDS 4
- {STRUCT_FLD(field_name, "N_FIELDS"),
- STRUCT_FLD(field_length, MY_INT32_NUM_DECIMAL_DIGITS),
- STRUCT_FLD(field_type, MYSQL_TYPE_LONG),
- STRUCT_FLD(value, 0),
- STRUCT_FLD(field_flags, 0),
- STRUCT_FLD(old_name, ""),
- STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
-
-#define SYS_INDEX_PAGE_NO 5
- {STRUCT_FLD(field_name, "PAGE_NO"),
- STRUCT_FLD(field_length, MY_INT32_NUM_DECIMAL_DIGITS),
- STRUCT_FLD(field_type, MYSQL_TYPE_LONG),
- STRUCT_FLD(value, 0),
- STRUCT_FLD(field_flags, 0),
- STRUCT_FLD(old_name, ""),
- STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
-
-#define SYS_INDEX_SPACE 6
- {STRUCT_FLD(field_name, "SPACE"),
- STRUCT_FLD(field_length, MY_INT32_NUM_DECIMAL_DIGITS),
- STRUCT_FLD(field_type, MYSQL_TYPE_LONG),
- STRUCT_FLD(value, 0),
- STRUCT_FLD(field_flags, 0),
- STRUCT_FLD(old_name, ""),
- STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
-
- END_OF_ST_FIELD_INFO
-};
-
-/**********************************************************************//**
-Function to populate the information_schema.innodb_sys_indexes table with
-collected index information
-@return 0 on success */
-static
-int
-i_s_dict_fill_sys_indexes(
-/*======================*/
- THD* thd, /*!< in: thread */
- table_id_t table_id, /*!< in: table id */
- dict_index_t* index, /*!< in: populated dict_index_t
- struct with index info */
- TABLE* table_to_fill) /*!< in/out: fill this table */
-{
- Field** fields;
-
- DBUG_ENTER("i_s_dict_fill_sys_indexes");
-
- fields = table_to_fill->field;
-
- OK(fields[SYS_INDEX_ID]->store(longlong(index->id), TRUE));
-
- OK(field_store_string(fields[SYS_INDEX_NAME], index->name));
-
- OK(fields[SYS_INDEX_TABLE_ID]->store(longlong(table_id), TRUE));
-
- OK(fields[SYS_INDEX_TYPE]->store(index->type));
-
- OK(fields[SYS_INDEX_NUM_FIELDS]->store(index->n_fields));
-
- OK(fields[SYS_INDEX_PAGE_NO]->store(index->page));
-
- OK(fields[SYS_INDEX_SPACE]->store(index->space));
-
- OK(schema_table_store_record(thd, table_to_fill));
-
- DBUG_RETURN(0);
-}
-/*******************************************************************//**
-Function to go through each record in SYS_INDEXES table, and fill the
-information_schema.innodb_sys_indexes table with related index information
-@return 0 on success */
-static
-int
-i_s_sys_indexes_fill_table(
-/*=======================*/
- THD* thd, /*!< in: thread */
- TABLE_LIST* tables, /*!< in/out: tables to fill */
- Item* cond) /*!< in: condition (not used) */
-{
- btr_pcur_t pcur;
- const rec_t* rec;
- mem_heap_t* heap;
- mtr_t mtr;
-
- DBUG_ENTER("i_s_sys_indexes_fill_table");
-
- /* deny access to non-superusers */
- if (check_global_access(thd, PROCESS_ACL)) {
-
- DBUG_RETURN(0);
- }
-
- heap = mem_heap_create(1000);
- mutex_enter(&dict_sys->mutex);
- mtr_start(&mtr);
-
- /* Start scan the SYS_INDEXES table */
- rec = dict_startscan_system(&pcur, &mtr, SYS_INDEXES);
-
- /* Process each record in the table */
- while (rec) {
- const char* err_msg;;
- table_id_t table_id;
- dict_index_t index_rec;
-
- /* Populate a dict_index_t structure with information from
- a SYS_INDEXES row */
- err_msg = dict_process_sys_indexes_rec(heap, rec, &index_rec,
- &table_id);
-
- mtr_commit(&mtr);
- mutex_exit(&dict_sys->mutex);
-
- if (!err_msg) {
- i_s_dict_fill_sys_indexes(thd, table_id, &index_rec,
- tables->table);
- } else {
- push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
- ER_CANT_FIND_SYSTEM_REC,
- err_msg);
- }
-
- mem_heap_empty(heap);
-
- /* Get the next record */
- mutex_enter(&dict_sys->mutex);
- mtr_start(&mtr);
- rec = dict_getnext_system(&pcur, &mtr);
- }
-
- mtr_commit(&mtr);
- mutex_exit(&dict_sys->mutex);
- mem_heap_free(heap);
-
- DBUG_RETURN(0);
-}
-/*******************************************************************//**
-Bind the dynamic table INFORMATION_SCHEMA.innodb_sys_indexes
-@return 0 on success */
-static
-int
-innodb_sys_indexes_init(
-/*====================*/
- void* p) /*!< in/out: table schema object */
-{
- ST_SCHEMA_TABLE* schema;
-
- DBUG_ENTER("innodb_sys_index_init");
-
- schema = (ST_SCHEMA_TABLE*) p;
-
- schema->fields_info = innodb_sysindex_fields_info;
- schema->fill_table = i_s_sys_indexes_fill_table;
-
- DBUG_RETURN(0);
-}
-
-UNIV_INTERN struct st_mysql_plugin i_s_innodb_sys_indexes =
-{
- /* the plugin type (a MYSQL_XXX_PLUGIN value) */
- /* int */
- STRUCT_FLD(type, MYSQL_INFORMATION_SCHEMA_PLUGIN),
-
- /* pointer to type-specific plugin descriptor */
- /* void* */
- STRUCT_FLD(info, &i_s_info),
-
- /* plugin name */
- /* const char* */
- STRUCT_FLD(name, "INNODB_SYS_INDEXES"),
-
- /* plugin author (for SHOW PLUGINS) */
- /* const char* */
- STRUCT_FLD(author, plugin_author),
-
- /* general descriptive text (for SHOW PLUGINS) */
- /* const char* */
- STRUCT_FLD(descr, "InnoDB SYS_INDEXES"),
-
- /* the plugin license (PLUGIN_LICENSE_XXX) */
- /* int */
- STRUCT_FLD(license, PLUGIN_LICENSE_GPL),
-
- /* the function to invoke when plugin is loaded */
- /* int (*)(void*); */
- STRUCT_FLD(init, innodb_sys_indexes_init),
-
- /* the function to invoke when plugin is unloaded */
- /* int (*)(void*); */
- STRUCT_FLD(deinit, i_s_common_deinit),
-
- /* plugin version (for SHOW PLUGINS) */
- /* unsigned int */
- STRUCT_FLD(version, INNODB_VERSION_SHORT),
-
- /* struct st_mysql_show_var* */
- STRUCT_FLD(status_vars, NULL),
-
- /* struct st_mysql_sys_var** */
- STRUCT_FLD(system_vars, NULL),
-
- /* reserved for dependency checking */
- /* void* */
- STRUCT_FLD(__reserved1, NULL)
-};
-
-/* Fields of the dynamic table INFORMATION_SCHEMA.SYS_COLUMNS */
-static ST_FIELD_INFO innodb_sys_columns_fields_info[] =
-{
-#define SYS_COLUMN_TABLE_ID 0
- {STRUCT_FLD(field_name, "TABLE_ID"),
- STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS),
- STRUCT_FLD(field_type, MYSQL_TYPE_LONGLONG),
- STRUCT_FLD(value, 0),
- STRUCT_FLD(field_flags, MY_I_S_UNSIGNED),
- STRUCT_FLD(old_name, ""),
- STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
-
-#define SYS_COLUMN_NAME 1
- {STRUCT_FLD(field_name, "NAME"),
- STRUCT_FLD(field_length, NAME_LEN + 1),
- STRUCT_FLD(field_type, MYSQL_TYPE_STRING),
- STRUCT_FLD(value, 0),
- STRUCT_FLD(field_flags, 0),
- STRUCT_FLD(old_name, ""),
- STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
-
-#define SYS_COLUMN_POSITION 2
- {STRUCT_FLD(field_name, "POS"),
- STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS),
- STRUCT_FLD(field_type, MYSQL_TYPE_LONGLONG),
- STRUCT_FLD(value, 0),
- STRUCT_FLD(field_flags, MY_I_S_UNSIGNED),
- STRUCT_FLD(old_name, ""),
- STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
-
-#define SYS_COLUMN_MTYPE 3
- {STRUCT_FLD(field_name, "MTYPE"),
- STRUCT_FLD(field_length, MY_INT32_NUM_DECIMAL_DIGITS),
- STRUCT_FLD(field_type, MYSQL_TYPE_LONG),
- STRUCT_FLD(value, 0),
- STRUCT_FLD(field_flags, 0),
- STRUCT_FLD(old_name, ""),
- STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
-
-#define SYS_COLUMN__PRTYPE 4
- {STRUCT_FLD(field_name, "PRTYPE"),
- STRUCT_FLD(field_length, MY_INT32_NUM_DECIMAL_DIGITS),
- STRUCT_FLD(field_type, MYSQL_TYPE_LONG),
- STRUCT_FLD(value, 0),
- STRUCT_FLD(field_flags, 0),
- STRUCT_FLD(old_name, ""),
- STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
-
-#define SYS_COLUMN_COLUMN_LEN 5
- {STRUCT_FLD(field_name, "LEN"),
- STRUCT_FLD(field_length, MY_INT32_NUM_DECIMAL_DIGITS),
- STRUCT_FLD(field_type, MYSQL_TYPE_LONG),
- STRUCT_FLD(value, 0),
- STRUCT_FLD(field_flags, 0),
- STRUCT_FLD(old_name, ""),
- STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
-
- END_OF_ST_FIELD_INFO
-};
-
-/**********************************************************************//**
-Function to populate the information_schema.innodb_sys_columns with
-related column information
-@return 0 on success */
-static
-int
-i_s_dict_fill_sys_columns(
-/*======================*/
- THD* thd, /*!< in: thread */
- table_id_t table_id, /*!< in: table ID */
- const char* col_name, /*!< in: column name */
- dict_col_t* column, /*!< in: dict_col_t struct holding
- more column information */
- TABLE* table_to_fill) /*!< in/out: fill this table */
-{
- Field** fields;
-
- DBUG_ENTER("i_s_dict_fill_sys_columns");
-
- fields = table_to_fill->field;
-
- OK(fields[SYS_COLUMN_TABLE_ID]->store(longlong(table_id), TRUE));
-
- OK(field_store_string(fields[SYS_COLUMN_NAME], col_name));
-
- OK(fields[SYS_COLUMN_POSITION]->store(column->ind));
-
- OK(fields[SYS_COLUMN_MTYPE]->store(column->mtype));
-
- OK(fields[SYS_COLUMN__PRTYPE]->store(column->prtype));
-
- OK(fields[SYS_COLUMN_COLUMN_LEN]->store(column->len));
-
- OK(schema_table_store_record(thd, table_to_fill));
-
- DBUG_RETURN(0);
-}
-/*******************************************************************//**
-Function to fill information_schema.innodb_sys_columns with information
-collected by scanning SYS_COLUMNS table.
-@return 0 on success */
-static
-int
-i_s_sys_columns_fill_table(
-/*=======================*/
- THD* thd, /*!< in: thread */
- TABLE_LIST* tables, /*!< in/out: tables to fill */
- Item* cond) /*!< in: condition (not used) */
-{
- btr_pcur_t pcur;
- const rec_t* rec;
- const char* col_name;
- mem_heap_t* heap;
- mtr_t mtr;
-
- DBUG_ENTER("i_s_sys_columns_fill_table");
-
- /* deny access to non-superusers */
- if (check_global_access(thd, PROCESS_ACL)) {
-
- DBUG_RETURN(0);
- }
-
- heap = mem_heap_create(1000);
- mutex_enter(&dict_sys->mutex);
- mtr_start(&mtr);
-
- rec = dict_startscan_system(&pcur, &mtr, SYS_COLUMNS);
-
- while (rec) {
- const char* err_msg;
- dict_col_t column_rec;
- table_id_t table_id;
-
- /* populate a dict_col_t structure with information from
- a SYS_COLUMNS row */
- err_msg = dict_process_sys_columns_rec(heap, rec, &column_rec,
- &table_id, &col_name);
-
- mtr_commit(&mtr);
- mutex_exit(&dict_sys->mutex);
-
- if (!err_msg) {
- i_s_dict_fill_sys_columns(thd, table_id, col_name,
- &column_rec,
- tables->table);
- } else {
- push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
- ER_CANT_FIND_SYSTEM_REC,
- err_msg);
- }
-
- mem_heap_empty(heap);
-
- /* Get the next record */
- mutex_enter(&dict_sys->mutex);
- mtr_start(&mtr);
- rec = dict_getnext_system(&pcur, &mtr);
- }
-
- mtr_commit(&mtr);
- mutex_exit(&dict_sys->mutex);
- mem_heap_free(heap);
-
- DBUG_RETURN(0);
-}
-/*******************************************************************//**
-Bind the dynamic table INFORMATION_SCHEMA.innodb_sys_columns
-@return 0 on success */
-static
-int
-innodb_sys_columns_init(
-/*====================*/
- void* p) /*!< in/out: table schema object */
-{
- ST_SCHEMA_TABLE* schema;
-
- DBUG_ENTER("innodb_sys_columns_init");
-
- schema = (ST_SCHEMA_TABLE*) p;
-
- schema->fields_info = innodb_sys_columns_fields_info;
- schema->fill_table = i_s_sys_columns_fill_table;
-
- DBUG_RETURN(0);
-}
-
-UNIV_INTERN struct st_mysql_plugin i_s_innodb_sys_columns =
-{
- /* the plugin type (a MYSQL_XXX_PLUGIN value) */
- /* int */
- STRUCT_FLD(type, MYSQL_INFORMATION_SCHEMA_PLUGIN),
-
- /* pointer to type-specific plugin descriptor */
- /* void* */
- STRUCT_FLD(info, &i_s_info),
-
- /* plugin name */
- /* const char* */
- STRUCT_FLD(name, "INNODB_SYS_COLUMNS"),
-
- /* plugin author (for SHOW PLUGINS) */
- /* const char* */
- STRUCT_FLD(author, plugin_author),
-
- /* general descriptive text (for SHOW PLUGINS) */
- /* const char* */
- STRUCT_FLD(descr, "InnoDB SYS_COLUMNS"),
-
- /* the plugin license (PLUGIN_LICENSE_XXX) */
- /* int */
- STRUCT_FLD(license, PLUGIN_LICENSE_GPL),
-
- /* the function to invoke when plugin is loaded */
- /* int (*)(void*); */
- STRUCT_FLD(init, innodb_sys_columns_init),
-
- /* the function to invoke when plugin is unloaded */
- /* int (*)(void*); */
- STRUCT_FLD(deinit, i_s_common_deinit),
-
- /* plugin version (for SHOW PLUGINS) */
- /* unsigned int */
- STRUCT_FLD(version, INNODB_VERSION_SHORT),
-
- /* struct st_mysql_show_var* */
- STRUCT_FLD(status_vars, NULL),
-
- /* struct st_mysql_sys_var** */
- STRUCT_FLD(system_vars, NULL),
-
- /* reserved for dependency checking */
- /* void* */
- STRUCT_FLD(__reserved1, NULL)
-};
-/* Fields of the dynamic table INFORMATION_SCHEMA.innodb_sys_fields */
-static ST_FIELD_INFO innodb_sys_fields_fields_info[] =
-{
-#define SYS_FIELD_INDEX_ID 0
- {STRUCT_FLD(field_name, "INDEX_ID"),
- STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS),
- STRUCT_FLD(field_type, MYSQL_TYPE_LONGLONG),
- STRUCT_FLD(value, 0),
- STRUCT_FLD(field_flags, MY_I_S_UNSIGNED),
- STRUCT_FLD(old_name, ""),
- STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
-
-#define SYS_FIELD_NAME 1
- {STRUCT_FLD(field_name, "NAME"),
- STRUCT_FLD(field_length, NAME_LEN + 1),
- STRUCT_FLD(field_type, MYSQL_TYPE_STRING),
- STRUCT_FLD(value, 0),
- STRUCT_FLD(field_flags, 0),
- STRUCT_FLD(old_name, ""),
- STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
-
-#define SYS_FIELD_POS 2
- {STRUCT_FLD(field_name, "POS"),
- STRUCT_FLD(field_length, MY_INT32_NUM_DECIMAL_DIGITS),
- STRUCT_FLD(field_type, MYSQL_TYPE_LONG),
- STRUCT_FLD(value, 0),
- STRUCT_FLD(field_flags, MY_I_S_UNSIGNED),
- STRUCT_FLD(old_name, ""),
- STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
-
- END_OF_ST_FIELD_INFO
-};
-
-/**********************************************************************//**
-Function to fill information_schema.innodb_sys_fields with information
-collected by scanning SYS_FIELDS table.
-@return 0 on success */
-static
-int
-i_s_dict_fill_sys_fields(
-/*=====================*/
- THD* thd, /*!< in: thread */
- index_id_t index_id, /*!< in: index id for the field */
- dict_field_t* field, /*!< in: table */
- ulint pos, /*!< in: Field position */
- TABLE* table_to_fill) /*!< in/out: fill this table */
-{
- Field** fields;
-
- DBUG_ENTER("i_s_dict_fill_sys_fields");
-
- fields = table_to_fill->field;
-
- OK(fields[SYS_FIELD_INDEX_ID]->store(longlong(index_id), TRUE));
-
- OK(field_store_string(fields[SYS_FIELD_NAME], field->name));
-
- OK(fields[SYS_FIELD_POS]->store(pos));
-
- OK(schema_table_store_record(thd, table_to_fill));
-
- DBUG_RETURN(0);
-}
-/*******************************************************************//**
-Function to go through each record in SYS_FIELDS table, and fill the
-information_schema.innodb_sys_fields table with related index field
-information
-@return 0 on success */
-static
-int
-i_s_sys_fields_fill_table(
-/*======================*/
- THD* thd, /*!< in: thread */
- TABLE_LIST* tables, /*!< in/out: tables to fill */
- Item* cond) /*!< in: condition (not used) */
-{
- btr_pcur_t pcur;
- const rec_t* rec;
- mem_heap_t* heap;
- index_id_t last_id;
- mtr_t mtr;
-
- DBUG_ENTER("i_s_sys_fields_fill_table");
-
- /* deny access to non-superusers */
- if (check_global_access(thd, PROCESS_ACL)) {
-
- DBUG_RETURN(0);
- }
-
- heap = mem_heap_create(1000);
- mutex_enter(&dict_sys->mutex);
- mtr_start(&mtr);
-
- /* will save last index id so that we know whether we move to
- the next index. This is used to calculate prefix length */
- last_id = 0;
-
- rec = dict_startscan_system(&pcur, &mtr, SYS_FIELDS);
-
- while (rec) {
- ulint pos;
- const char* err_msg;
- index_id_t index_id;
- dict_field_t field_rec;
-
- /* Populate a dict_field_t structure with information from
- a SYS_FIELDS row */
- err_msg = dict_process_sys_fields_rec(heap, rec, &field_rec,
- &pos, &index_id, last_id);
-
- mtr_commit(&mtr);
- mutex_exit(&dict_sys->mutex);
-
- if (!err_msg) {
- i_s_dict_fill_sys_fields(thd, index_id, &field_rec,
- pos, tables->table);
- last_id = index_id;
- } else {
- push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
- ER_CANT_FIND_SYSTEM_REC,
- err_msg);
- }
-
- mem_heap_empty(heap);
-
- /* Get the next record */
- mutex_enter(&dict_sys->mutex);
- mtr_start(&mtr);
- rec = dict_getnext_system(&pcur, &mtr);
- }
-
- mtr_commit(&mtr);
- mutex_exit(&dict_sys->mutex);
- mem_heap_free(heap);
-
- DBUG_RETURN(0);
-}
-/*******************************************************************//**
-Bind the dynamic table INFORMATION_SCHEMA.innodb_sys_fields
-@return 0 on success */
-static
-int
-innodb_sys_fields_init(
-/*===================*/
- void* p) /*!< in/out: table schema object */
-{
- ST_SCHEMA_TABLE* schema;
-
- DBUG_ENTER("innodb_sys_field_init");
-
- schema = (ST_SCHEMA_TABLE*) p;
-
- schema->fields_info = innodb_sys_fields_fields_info;
- schema->fill_table = i_s_sys_fields_fill_table;
-
- DBUG_RETURN(0);
-}
-
-UNIV_INTERN struct st_mysql_plugin i_s_innodb_sys_fields =
-{
- /* the plugin type (a MYSQL_XXX_PLUGIN value) */
- /* int */
- STRUCT_FLD(type, MYSQL_INFORMATION_SCHEMA_PLUGIN),
-
- /* pointer to type-specific plugin descriptor */
- /* void* */
- STRUCT_FLD(info, &i_s_info),
-
- /* plugin name */
- /* const char* */
- STRUCT_FLD(name, "INNODB_SYS_FIELDS"),
-
- /* plugin author (for SHOW PLUGINS) */
- /* const char* */
- STRUCT_FLD(author, plugin_author),
-
- /* general descriptive text (for SHOW PLUGINS) */
- /* const char* */
- STRUCT_FLD(descr, "InnoDB SYS_FIELDS"),
-
- /* the plugin license (PLUGIN_LICENSE_XXX) */
- /* int */
- STRUCT_FLD(license, PLUGIN_LICENSE_GPL),
-
- /* the function to invoke when plugin is loaded */
- /* int (*)(void*); */
- STRUCT_FLD(init, innodb_sys_fields_init),
-
- /* the function to invoke when plugin is unloaded */
- /* int (*)(void*); */
- STRUCT_FLD(deinit, i_s_common_deinit),
-
- /* plugin version (for SHOW PLUGINS) */
- /* unsigned int */
- STRUCT_FLD(version, INNODB_VERSION_SHORT),
-
- /* struct st_mysql_show_var* */
- STRUCT_FLD(status_vars, NULL),
-
- /* struct st_mysql_sys_var** */
- STRUCT_FLD(system_vars, NULL),
-
- /* reserved for dependency checking */
- /* void* */
- STRUCT_FLD(__reserved1, NULL)
-};
-
-/* Fields of the dynamic table INFORMATION_SCHEMA.innodb_sys_foreign */
-static ST_FIELD_INFO innodb_sys_foreign_fields_info[] =
-{
-#define SYS_FOREIGN_ID 0
- {STRUCT_FLD(field_name, "ID"),
- STRUCT_FLD(field_length, NAME_LEN + 1),
- STRUCT_FLD(field_type, MYSQL_TYPE_STRING),
- STRUCT_FLD(value, 0),
- STRUCT_FLD(field_flags, 0),
- STRUCT_FLD(old_name, ""),
- STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
-
-#define SYS_FOREIGN_FOR_NAME 1
- {STRUCT_FLD(field_name, "FOR_NAME"),
- STRUCT_FLD(field_length, NAME_LEN + 1),
- STRUCT_FLD(field_type, MYSQL_TYPE_STRING),
- STRUCT_FLD(value, 0),
- STRUCT_FLD(field_flags, 0),
- STRUCT_FLD(old_name, ""),
- STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
-
-#define SYS_FOREIGN_REF_NAME 2
- {STRUCT_FLD(field_name, "REF_NAME"),
- STRUCT_FLD(field_length, NAME_LEN + 1),
- STRUCT_FLD(field_type, MYSQL_TYPE_STRING),
- STRUCT_FLD(value, 0),
- STRUCT_FLD(field_flags, 0),
- STRUCT_FLD(old_name, ""),
- STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
-
-#define SYS_FOREIGN_NUM_COL 3
- {STRUCT_FLD(field_name, "N_COLS"),
- STRUCT_FLD(field_length, MY_INT32_NUM_DECIMAL_DIGITS),
- STRUCT_FLD(field_type, MYSQL_TYPE_LONG),
- STRUCT_FLD(value, 0),
- STRUCT_FLD(field_flags, MY_I_S_UNSIGNED),
- STRUCT_FLD(old_name, ""),
- STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
-
-#define SYS_FOREIGN_TYPE 4
- {STRUCT_FLD(field_name, "TYPE"),
- STRUCT_FLD(field_length, MY_INT32_NUM_DECIMAL_DIGITS),
- STRUCT_FLD(field_type, MYSQL_TYPE_LONG),
- STRUCT_FLD(value, 0),
- STRUCT_FLD(field_flags, MY_I_S_UNSIGNED),
- STRUCT_FLD(old_name, ""),
- STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
-
- END_OF_ST_FIELD_INFO
-};
-
-/**********************************************************************//**
-Function to fill information_schema.innodb_sys_foreign with information
-collected by scanning SYS_FOREIGN table.
-@return 0 on success */
-static
-int
-i_s_dict_fill_sys_foreign(
-/*======================*/
- THD* thd, /*!< in: thread */
- dict_foreign_t* foreign, /*!< in: table */
- TABLE* table_to_fill) /*!< in/out: fill this table */
-{
- Field** fields;
-
- DBUG_ENTER("i_s_dict_fill_sys_foreign");
-
- fields = table_to_fill->field;
-
- OK(field_store_string(fields[SYS_FOREIGN_ID], foreign->id));
-
- OK(field_store_string(fields[SYS_FOREIGN_FOR_NAME],
- foreign->foreign_table_name));
-
- OK(field_store_string(fields[SYS_FOREIGN_REF_NAME],
- foreign->referenced_table_name));
-
- OK(fields[SYS_FOREIGN_NUM_COL]->store(foreign->n_fields));
-
- OK(fields[SYS_FOREIGN_TYPE]->store(foreign->type));
-
- OK(schema_table_store_record(thd, table_to_fill));
-
- DBUG_RETURN(0);
-}
-/*******************************************************************//**
-Function to populate INFORMATION_SCHEMA.innodb_sys_foreign table. Loop
-through each record in SYS_FOREIGN, and extract the foreign key
-information.
-@return 0 on success */
-static
-int
-i_s_sys_foreign_fill_table(
-/*=======================*/
- THD* thd, /*!< in: thread */
- TABLE_LIST* tables, /*!< in/out: tables to fill */
- Item* cond) /*!< in: condition (not used) */
-{
- btr_pcur_t pcur;
- const rec_t* rec;
- mem_heap_t* heap;
- mtr_t mtr;
-
- DBUG_ENTER("i_s_sys_foreign_fill_table");
-
- /* deny access to non-superusers */
- if (check_global_access(thd, PROCESS_ACL)) {
-
- DBUG_RETURN(0);
- }
-
- heap = mem_heap_create(1000);
- mutex_enter(&dict_sys->mutex);
- mtr_start(&mtr);
-
- rec = dict_startscan_system(&pcur, &mtr, SYS_FOREIGN);
-
- while (rec) {
- const char* err_msg;
- dict_foreign_t foreign_rec;
-
- /* Populate a dict_foreign_t structure with information from
- a SYS_FOREIGN row */
- err_msg = dict_process_sys_foreign_rec(heap, rec, &foreign_rec);
-
- mtr_commit(&mtr);
- mutex_exit(&dict_sys->mutex);
-
- if (!err_msg) {
- i_s_dict_fill_sys_foreign(thd, &foreign_rec,
- tables->table);
- } else {
- push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
- ER_CANT_FIND_SYSTEM_REC,
- err_msg);
- }
-
- mem_heap_empty(heap);
-
- /* Get the next record */
- mtr_start(&mtr);
- mutex_enter(&dict_sys->mutex);
- rec = dict_getnext_system(&pcur, &mtr);
- }
-
- mtr_commit(&mtr);
- mutex_exit(&dict_sys->mutex);
- mem_heap_free(heap);
-
- DBUG_RETURN(0);
-}
-/*******************************************************************//**
-Bind the dynamic table INFORMATION_SCHEMA.innodb_sys_foreign
-@return 0 on success */
-static
-int
-innodb_sys_foreign_init(
-/*====================*/
- void* p) /*!< in/out: table schema object */
-{
- ST_SCHEMA_TABLE* schema;
-
- DBUG_ENTER("innodb_sys_foreign_init");
-
- schema = (ST_SCHEMA_TABLE*) p;
-
- schema->fields_info = innodb_sys_foreign_fields_info;
- schema->fill_table = i_s_sys_foreign_fill_table;
-
- DBUG_RETURN(0);
-}
-
-UNIV_INTERN struct st_mysql_plugin i_s_innodb_sys_foreign =
-{
- /* the plugin type (a MYSQL_XXX_PLUGIN value) */
- /* int */
- STRUCT_FLD(type, MYSQL_INFORMATION_SCHEMA_PLUGIN),
-
- /* pointer to type-specific plugin descriptor */
- /* void* */
- STRUCT_FLD(info, &i_s_info),
-
- /* plugin name */
- /* const char* */
- STRUCT_FLD(name, "INNODB_SYS_FOREIGN"),
-
- /* plugin author (for SHOW PLUGINS) */
- /* const char* */
- STRUCT_FLD(author, plugin_author),
-
- /* general descriptive text (for SHOW PLUGINS) */
- /* const char* */
- STRUCT_FLD(descr, "InnoDB SYS_FOREIGN"),
-
- /* the plugin license (PLUGIN_LICENSE_XXX) */
- /* int */
- STRUCT_FLD(license, PLUGIN_LICENSE_GPL),
-
- /* the function to invoke when plugin is loaded */
- /* int (*)(void*); */
- STRUCT_FLD(init, innodb_sys_foreign_init),
-
- /* the function to invoke when plugin is unloaded */
- /* int (*)(void*); */
- STRUCT_FLD(deinit, i_s_common_deinit),
-
- /* plugin version (for SHOW PLUGINS) */
- /* unsigned int */
- STRUCT_FLD(version, INNODB_VERSION_SHORT),
-
- /* struct st_mysql_show_var* */
- STRUCT_FLD(status_vars, NULL),
-
- /* struct st_mysql_sys_var** */
- STRUCT_FLD(system_vars, NULL),
-
- /* reserved for dependency checking */
- /* void* */
- STRUCT_FLD(__reserved1, NULL)
-};
-/* Fields of the dynamic table INFORMATION_SCHEMA.innodb_sys_foreign_cols */
-static ST_FIELD_INFO innodb_sys_foreign_cols_fields_info[] =
-{
-#define SYS_FOREIGN_COL_ID 0
- {STRUCT_FLD(field_name, "ID"),
- STRUCT_FLD(field_length, NAME_LEN + 1),
- STRUCT_FLD(field_type, MYSQL_TYPE_STRING),
- STRUCT_FLD(value, 0),
- STRUCT_FLD(field_flags, 0),
- STRUCT_FLD(old_name, ""),
- STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
-
-#define SYS_FOREIGN_COL_FOR_NAME 1
- {STRUCT_FLD(field_name, "FOR_COL_NAME"),
- STRUCT_FLD(field_length, NAME_LEN + 1),
- STRUCT_FLD(field_type, MYSQL_TYPE_STRING),
- STRUCT_FLD(value, 0),
- STRUCT_FLD(field_flags, 0),
- STRUCT_FLD(old_name, ""),
- STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
-
-#define SYS_FOREIGN_COL_REF_NAME 2
- {STRUCT_FLD(field_name, "REF_COL_NAME"),
- STRUCT_FLD(field_length, NAME_LEN + 1),
- STRUCT_FLD(field_type, MYSQL_TYPE_STRING),
- STRUCT_FLD(value, 0),
- STRUCT_FLD(field_flags, 0),
- STRUCT_FLD(old_name, ""),
- STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
-
-#define SYS_FOREIGN_COL_POS 3
- {STRUCT_FLD(field_name, "POS"),
- STRUCT_FLD(field_length, MY_INT32_NUM_DECIMAL_DIGITS),
- STRUCT_FLD(field_type, MYSQL_TYPE_LONG),
- STRUCT_FLD(value, 0),
- STRUCT_FLD(field_flags, MY_I_S_UNSIGNED),
- STRUCT_FLD(old_name, ""),
- STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
-
- END_OF_ST_FIELD_INFO
-};
-
-/**********************************************************************//**
-Function to fill information_schema.innodb_sys_foreign_cols with information
-collected by scanning SYS_FOREIGN_COLS table.
-@return 0 on success */
-static
-int
-i_s_dict_fill_sys_foreign_cols(
-/*==========================*/
- THD* thd, /*!< in: thread */
- const char* name, /*!< in: foreign key constraint name */
- const char* for_col_name, /*!< in: referencing column name*/
- const char* ref_col_name, /*!< in: referenced column
- name */
- ulint pos, /*!< in: column position */
- TABLE* table_to_fill) /*!< in/out: fill this table */
-{
- Field** fields;
-
- DBUG_ENTER("i_s_dict_fill_sys_foreign_cols");
-
- fields = table_to_fill->field;
-
- OK(field_store_string(fields[SYS_FOREIGN_COL_ID], name));
-
- OK(field_store_string(fields[SYS_FOREIGN_COL_FOR_NAME], for_col_name));
-
- OK(field_store_string(fields[SYS_FOREIGN_COL_REF_NAME], ref_col_name));
-
- OK(fields[SYS_FOREIGN_COL_POS]->store(pos));
-
- OK(schema_table_store_record(thd, table_to_fill));
-
- DBUG_RETURN(0);
-}
-/*******************************************************************//**
-Function to populate INFORMATION_SCHEMA.innodb_sys_foreign_cols table. Loop
-through each record in SYS_FOREIGN_COLS, and extract the foreign key column
-information and fill the INFORMATION_SCHEMA.innodb_sys_foreign_cols table.
-@return 0 on success */
-static
-int
-i_s_sys_foreign_cols_fill_table(
-/*============================*/
- THD* thd, /*!< in: thread */
- TABLE_LIST* tables, /*!< in/out: tables to fill */
- Item* cond) /*!< in: condition (not used) */
-{
- btr_pcur_t pcur;
- const rec_t* rec;
- mem_heap_t* heap;
- mtr_t mtr;
-
- DBUG_ENTER("i_s_sys_foreign_cols_fill_table");
-
- /* deny access to non-superusers */
- if (check_global_access(thd, PROCESS_ACL)) {
- DBUG_RETURN(0);
- }
-
- heap = mem_heap_create(1000);
- mutex_enter(&dict_sys->mutex);
- mtr_start(&mtr);
-
- rec = dict_startscan_system(&pcur, &mtr, SYS_FOREIGN_COLS);
-
- while (rec) {
- const char* err_msg;
- const char* name;
- const char* for_col_name;
- const char* ref_col_name;
- ulint pos;
-
- /* Extract necessary information from a SYS_FOREIGN_COLS row */
- err_msg = dict_process_sys_foreign_col_rec(
- heap, rec, &name, &for_col_name, &ref_col_name, &pos);
-
- mtr_commit(&mtr);
- mutex_exit(&dict_sys->mutex);
-
- if (!err_msg) {
- i_s_dict_fill_sys_foreign_cols(
- thd, name, for_col_name, ref_col_name, pos,
- tables->table);
- } else {
- push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
- ER_CANT_FIND_SYSTEM_REC,
- err_msg);
- }
-
- mem_heap_empty(heap);
-
- /* Get the next record */
- mutex_enter(&dict_sys->mutex);
- mtr_start(&mtr);
- rec = dict_getnext_system(&pcur, &mtr);
- }
-
- mtr_commit(&mtr);
- mutex_exit(&dict_sys->mutex);
- mem_heap_free(heap);
-
- DBUG_RETURN(0);
-}
-/*******************************************************************//**
-Bind the dynamic table INFORMATION_SCHEMA.innodb_sys_foreign_cols
-@return 0 on success */
-static
-int
-innodb_sys_foreign_cols_init(
-/*========================*/
- void* p) /*!< in/out: table schema object */
-{
- ST_SCHEMA_TABLE* schema;
-
- DBUG_ENTER("innodb_sys_foreign_cols_init");
-
- schema = (ST_SCHEMA_TABLE*) p;
-
- schema->fields_info = innodb_sys_foreign_cols_fields_info;
- schema->fill_table = i_s_sys_foreign_cols_fill_table;
-
- DBUG_RETURN(0);
-}
-
-UNIV_INTERN struct st_mysql_plugin i_s_innodb_sys_foreign_cols =
-{
- /* the plugin type (a MYSQL_XXX_PLUGIN value) */
- /* int */
- STRUCT_FLD(type, MYSQL_INFORMATION_SCHEMA_PLUGIN),
-
- /* pointer to type-specific plugin descriptor */
- /* void* */
- STRUCT_FLD(info, &i_s_info),
-
- /* plugin name */
- /* const char* */
- STRUCT_FLD(name, "INNODB_SYS_FOREIGN_COLS"),
-
- /* plugin author (for SHOW PLUGINS) */
- /* const char* */
- STRUCT_FLD(author, plugin_author),
-
- /* general descriptive text (for SHOW PLUGINS) */
- /* const char* */
- STRUCT_FLD(descr, "InnoDB SYS_FOREIGN_COLS"),
-
- /* the plugin license (PLUGIN_LICENSE_XXX) */
- /* int */
- STRUCT_FLD(license, PLUGIN_LICENSE_GPL),
-
- /* the function to invoke when plugin is loaded */
- /* int (*)(void*); */
- STRUCT_FLD(init, innodb_sys_foreign_cols_init),
-
- /* the function to invoke when plugin is unloaded */
- /* int (*)(void*); */
- STRUCT_FLD(deinit, i_s_common_deinit),
-
- /* plugin version (for SHOW PLUGINS) */
- /* unsigned int */
- STRUCT_FLD(version, INNODB_VERSION_SHORT),
-
- /* struct st_mysql_show_var* */
- STRUCT_FLD(status_vars, NULL),
-
- /* struct st_mysql_sys_var** */
- STRUCT_FLD(system_vars, NULL),
-
- /* reserved for dependency checking */
- /* void* */
- STRUCT_FLD(__reserved1, NULL)
-};
-
=== modified file 'storage/innobase/handler/i_s.h'
--- a/storage/innobase/handler/i_s.h revid:vasil.dimov@stripped
+++ b/storage/innobase/handler/i_s.h revid:vasil.dimov@stripped
@@ -33,13 +33,6 @@ extern struct st_mysql_plugin i_s_innodb
extern struct st_mysql_plugin i_s_innodb_cmp_reset;
extern struct st_mysql_plugin i_s_innodb_cmpmem;
extern struct st_mysql_plugin i_s_innodb_cmpmem_reset;
-extern struct st_mysql_plugin i_s_innodb_sys_tables;
-extern struct st_mysql_plugin i_s_innodb_sys_tablestats;
-extern struct st_mysql_plugin i_s_innodb_sys_indexes;
-extern struct st_mysql_plugin i_s_innodb_sys_columns;
-extern struct st_mysql_plugin i_s_innodb_sys_fields;
-extern struct st_mysql_plugin i_s_innodb_sys_foreign;
-extern struct st_mysql_plugin i_s_innodb_sys_foreign_cols;
extern struct st_mysql_plugin i_s_innodb_metrics;
#endif /* i_s_h */
=== modified file 'storage/innobase/ibuf/ibuf0ibuf.c'
--- a/storage/innobase/ibuf/ibuf0ibuf.c revid:vasil.dimov@stripped
+++ b/storage/innobase/ibuf/ibuf0ibuf.c revid:vasil.dimov@stripped
@@ -1297,12 +1297,11 @@ ibuf_rec_get_op_type(
const rec_t* rec) /*!< in: ibuf record */
{
ulint len;
- const byte* field;
ut_ad(ibuf_inside());
ut_ad(rec_get_n_fields_old(rec) > 2);
- field = rec_get_nth_field_old(rec, 1, &len);
+ (void) rec_get_nth_field_old(rec, 1, &len);
if (len > 1) {
/* This is a < 4.1.x format record */
@@ -3780,17 +3779,11 @@ ibuf_insert_to_index_page(
rec = page_rec_get_next(page_get_infimum_rec(page));
if (page_rec_is_supremum(rec)) {
- /* Empty pages can result from buffered delete operations.
- The first record from the free list can be used to find the
- father node. */
- rec = page_header_get_ptr(page, PAGE_FREE);
- if (UNIV_UNLIKELY(rec == NULL)) {
- fputs("InnoDB: Trying to insert a record from"
- " the insert buffer to an index page\n"
- "InnoDB: but the index page is empty!\n",
- stderr);
- goto dump;
- }
+ fputs("InnoDB: Trying to insert a record from"
+ " the insert buffer to an index page\n"
+ "InnoDB: but the index page is empty!\n",
+ stderr);
+ goto dump;
}
if (UNIV_UNLIKELY(rec_get_n_fields(rec, index)
=== modified file 'storage/innobase/include/dict0boot.h'
--- a/storage/innobase/include/dict0boot.h revid:vasil.dimov@stripped
+++ b/storage/innobase/include/dict0boot.h revid:vasil.dimov@stripped
@@ -113,7 +113,6 @@ dict_create(void);
indexes; ibuf tables and indexes are
assigned as the id the number
DICT_IBUF_ID_MIN plus the space id */
-#define DICT_IBUF_ID_MIN 0xFFFFFFFF00000000ULL
/* The offset of the dictionary header on the page */
#define DICT_HDR FSEG_PAGE_DATA
=== modified file 'storage/innobase/include/dict0types.h'
--- a/storage/innobase/include/dict0types.h revid:vasil.dimov@stripped
+++ b/storage/innobase/include/dict0types.h revid:vasil.dimov@stripped
@@ -45,6 +45,10 @@ typedef struct tab_node_struct tab_node
#define DICT_HDR_SPACE 0 /* the SYSTEM tablespace */
#define DICT_HDR_PAGE_NO FSP_DICT_HDR_PAGE_NO
+/* The ibuf table and indexes's ID are assigned as the number
+DICT_IBUF_ID_MIN plus the space id */
+#define DICT_IBUF_ID_MIN 0xFFFFFFFF00000000ULL
+
typedef ib_id_t table_id_t;
typedef ib_id_t index_id_t;
=== modified file 'storage/innobase/include/rem0rec.h'
--- a/storage/innobase/include/rem0rec.h revid:vasil.dimov@stripped
+++ b/storage/innobase/include/rem0rec.h revid:vasil.dimov@stripped
@@ -806,8 +806,6 @@ rec_print(
dict_index_t* index); /*!< in: record descriptor */
#endif /* UNIV_HOTBACKUP */
-#define REC_INFO_BITS 6 /* This is single byte bit-field */
-
/* Maximum lengths for the data in a physical record if the offsets
are given in one byte (resp. two byte) format. */
#define REC_1BYTE_OFFS_LIMIT 0x7FUL
=== modified file 'storage/innobase/include/srv0mon.h'
--- a/storage/innobase/include/srv0mon.h revid:vasil.dimov@stripped
+++ b/storage/innobase/include/srv0mon.h revid:vasil.dimov@stripped
@@ -78,10 +78,12 @@ enum monitor_type_value {
MONITOR_AVERAGE = 4, /*!< Set this status if we want to
calculate the average value (over time)
for the counter. */
- MONITOR_DISPLAY_CURRENT = 8 /*!< Display current value of the
+ MONITOR_DISPLAY_CURRENT = 8, /*!< Display current value of the
counter, rather than incremental value
over the period. Mostly for counters
displaying current resource usage */
+ MONITOR_GROUP_MODULE = 16 /*!< Monitor can be turned on/off
+ only as a module, but not individually */
};
typedef enum monitor_type_value monitor_type_t;
@@ -149,6 +151,42 @@ enum monitor_id_value {
MONITOR_OVLD_BYTE_READ,
MONITOR_OVLD_BYTE_WRITTEN,
+ /* Buffer Page I/O specific counters. */
+ MONITOR_MODULE_BUF_PAGE,
+ MONITOR_INDEX_LEAF_PAGE_READ,
+ MONITOR_INDEX_NON_LEAF_PAGE_READ,
+ MONITOR_INDEX_IBUF_LEAF_PAGE_READ,
+ MONITOR_INDEX_IBUF_NON_LEAF_PAGE_READ,
+ MONITOR_UNDO_LOG_PAGE_READ,
+ MONITOR_INODE_PAGE_READ,
+ MONITOR_IBUF_FREELIST_PAGE_READ,
+ MONITOR_IBUF_BITMAP_PAGE_READ,
+ MONITOR_SYSTEM_PAGE_READ,
+ MONITOR_TRX_SYSTEM_PAGE_READ,
+ MONITOR_FSP_HDR_PAGE_READ,
+ MONITOR_XDES_PAGE_READ,
+ MONITOR_BLOB_PAGE_READ,
+ MONITOR_ZBLOB_PAGE_READ,
+ MONITOR_ZBLOB2_PAGE_READ,
+ MONITOR_OTHER_PAGE_READ,
+
+ MONITOR_INDEX_LEAF_PAGE_WRITTEN,
+ MONITOR_INDEX_NON_LEAF_PAGE_WRITTEN,
+ MONITOR_INDEX_IBUF_LEAF_PAGE_WRITTEN,
+ MONITOR_INDEX_IBUF_NON_LEAF_PAGE_WRITTEN,
+ MONITOR_UNDO_LOG_PAGE_WRITTEN,
+ MONITOR_INODE_PAGE_WRITTEN,
+ MONITOR_IBUF_FREELIST_PAGE_WRITTEN,
+ MONITOR_IBUF_BITMAP_PAGE_WRITTEN,
+ MONITOR_SYSTEM_PAGE_WRITTEN,
+ MONITOR_TRX_SYSTEM_PAGE_WRITTEN,
+ MONITOR_FSP_HDR_PAGE_WRITTEN,
+ MONITOR_XDES_PAGE_WRITTEN,
+ MONITOR_BLOB_PAGE_WRITTEN,
+ MONITOR_ZBLOB_PAGE_WRITTEN,
+ MONITOR_ZBLOB2_PAGE_WRITTEN,
+ MONITOR_OTHER_PAGE_WRITTEN,
+
/* OS level counters (I/O) */
MONITOR_MODULE_OS,
MONITOR_OVLD_OS_FILE_READ,
@@ -354,7 +392,7 @@ already exists. No additional mutex is n
on the counters */
#define MONITOR_INC(monitor) \
if (MONITOR_IS_ON(monitor)) { \
- INC_VALUE(MONITOR_VALUE(monitor), 1); \
+ MONITOR_VALUE(monitor)++; \
if (MONITOR_VALUE(monitor) > MONITOR_MAX_VALUE(monitor)) { \
MONITOR_MAX_VALUE(monitor) = MONITOR_VALUE(monitor);\
} \
@@ -362,12 +400,30 @@ on the counters */
#define MONITOR_DEC(monitor) \
if (MONITOR_IS_ON(monitor)) { \
- INC_VALUE(MONITOR_VALUE(monitor), -1); \
+ MONITOR_VALUE(monitor)--; \
if (MONITOR_VALUE(monitor) < MONITOR_MIN_VALUE(monitor)) { \
MONITOR_MIN_VALUE(monitor) = MONITOR_VALUE(monitor);\
} \
}
+/* Increment/decrement counter without check the monitor on/off bit, which
+could already be checked as a module group */
+#define MONITOR_INC_NOCHECK(monitor) \
+ do { \
+ MONITOR_VALUE(monitor)++; \
+ if (MONITOR_VALUE(monitor) > MONITOR_MAX_VALUE(monitor)) { \
+ MONITOR_MAX_VALUE(monitor) = MONITOR_VALUE(monitor);\
+ } \
+ } while (0) \
+
+#define MONITOR_DEC_NOCHECK(monitor) \
+ do { \
+ MONITOR_VALUE(monitor)--; \
+ if (MONITOR_VALUE(monitor) < MONITOR_MIN_VALUE(monitor)) { \
+ MONITOR_MIN_VALUE(monitor) = MONITOR_VALUE(monitor);\
+ } \
+ } while (0)
+
/** Directly set a monitor counter's value */
#define MONITOR_SET(monitor, value) \
if (MONITOR_IS_ON(monitor)) { \
=== modified file 'storage/innobase/include/univ.i'
--- a/storage/innobase/include/univ.i revid:vasil.dimov@stripped
+++ b/storage/innobase/include/univ.i revid:vasil.dimov@stripped
@@ -78,19 +78,6 @@ the virtual method table (vtable) in GCC
# define ha_innobase ha_innodb
#endif /* MYSQL_DYNAMIC_PLUGIN */
-/* if any of the following macros is defined at this point this means
-that the code from the "right" plug.in was executed and we do not
-need to include ut0auxconf.h which would either define the same macros
-or will be empty */
-#if !defined(HAVE_IB_GCC_ATOMIC_BUILTINS) \
- && !defined(HAVE_IB_ATOMIC_PTHREAD_T_GCC) \
- && !defined(HAVE_IB_SOLARIS_ATOMICS) \
- && !defined(HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS) \
- && !defined(SIZEOF_PTHREAD_T) \
- && !defined(HAVE_IB_PAUSE_INSTRUCTION)
-# include "ut0auxconf.h"
-#endif
-
#if (defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)) && !defined(MYSQL_SERVER) && !defined(__WIN__)
# undef __WIN__
# define __WIN__
=== removed file 'storage/innobase/include/ut0auxconf.h'
--- a/storage/innobase/include/ut0auxconf.h revid:vasil.dimov@stripped
+++ b/storage/innobase/include/ut0auxconf.h 1970-01-01 00:00:00 +0000
@@ -1,14 +0,0 @@
-/* Do not remove this file even though it is empty.
-This file is included in univ.i and will cause compilation failure
-if not present.
-A custom checks have been added in the generated
-storage/innobase/Makefile.in that is shipped with the InnoDB Plugin
-source archive. These checks eventually define some macros and put
-them in this file.
-This is a hack that has been developed in order to deploy new compile
-time checks without the need to regenerate the ./configure script that is
-distributed in the MySQL 5.1 official source archives.
-If by any chance Makefile.in and ./configure are regenerated and thus
-the hack from Makefile.in wiped away then the "real" checks from plug.in
-will take over.
-*/
=== modified file 'storage/innobase/include/ut0rnd.ic'
--- a/storage/innobase/include/ut0rnd.ic revid:vasil.dimov@stripped
+++ b/storage/innobase/include/ut0rnd.ic revid:vasil.dimov@stripped
@@ -85,9 +85,6 @@ ut_rnd_gen_ulint(void)
/*==================*/
{
ulint rnd;
- ulint n_bits;
-
- n_bits = 8 * sizeof(ulint);
ut_rnd_ulint_counter = UT_RND1 * ut_rnd_ulint_counter + UT_RND2;
=== modified file 'storage/innobase/log/log0recv.c'
--- a/storage/innobase/log/log0recv.c revid:vasil.dimov@stripped
+++ b/storage/innobase/log/log0recv.c revid:vasil.dimov@stripped
@@ -570,10 +570,8 @@ recv_synchronize_groups(
ib_uint64_t start_lsn;
ib_uint64_t end_lsn;
ib_uint64_t recovered_lsn;
- ib_uint64_t limit_lsn;
recovered_lsn = recv_sys->recovered_lsn;
- limit_lsn = recv_sys->limit_lsn;
/* Read the last recovered log block to the recovery system buffer:
the block is always incomplete */
@@ -1660,12 +1658,8 @@ recv_recover_page_func(
#ifndef UNIV_HOTBACKUP
if (modification_to_page) {
- buf_pool_t* buf_pool;
-
ut_a(block);
- buf_pool = buf_pool_from_block(block);
-
log_flush_order_mutex_enter();
buf_flush_recv_note_modification(block, start_lsn, end_lsn);
log_flush_order_mutex_exit();
@@ -2909,7 +2903,9 @@ recv_recovery_from_checkpoint_start_func
ib_uint64_t old_scanned_lsn;
ib_uint64_t group_scanned_lsn;
ib_uint64_t contiguous_lsn;
+#ifdef UNIV_LOG_ARCHIVE
ib_uint64_t archived_lsn;
+#endif /* UNIV_LOG_ARCHIVE */
byte* buf;
byte log_hdr_buf[LOG_FILE_HDR_SIZE];
ulint err;
@@ -2964,7 +2960,9 @@ recv_recovery_from_checkpoint_start_func
checkpoint_lsn = mach_read_from_8(buf + LOG_CHECKPOINT_LSN);
checkpoint_no = mach_read_from_8(buf + LOG_CHECKPOINT_NO);
+#ifdef UNIV_LOG_ARCHIVE
archived_lsn = mach_read_from_8(buf + LOG_CHECKPOINT_ARCHIVED_LSN);
+#endif /* UNIV_LOG_ARCHIVE */
/* Read the first log file header to print a note if this is
a recovery from a restored InnoDB Hot Backup */
=== modified file 'storage/innobase/os/os0file.c'
--- a/storage/innobase/os/os0file.c revid:vasil.dimov@stripped
+++ b/storage/innobase/os/os0file.c revid:vasil.dimov@stripped
@@ -1483,8 +1483,6 @@ try_again:
int create_flag;
ibool retry;
const char* mode_str = NULL;
- const char* type_str = NULL;
- const char* purpose_str = NULL;
try_again:
ut_a(name);
@@ -1504,26 +1502,9 @@ try_again:
ut_error;
}
- if (type == OS_LOG_FILE) {
- type_str = "LOG";
- } else if (type == OS_DATA_FILE) {
- type_str = "DATA";
- } else {
- ut_error;
- }
+ ut_a(type == OS_LOG_FILE || type == OS_DATA_FILE);
+ ut_a(purpose == OS_FILE_AIO || purpose == OS_FILE_NORMAL);
- if (purpose == OS_FILE_AIO) {
- purpose_str = "AIO";
- } else if (purpose == OS_FILE_NORMAL) {
- purpose_str = "NORMAL";
- } else {
- ut_error;
- }
-
-#if 0
- fprintf(stderr, "Opening file %s, mode %s, type %s, purpose %s\n",
- name, mode_str, type_str, purpose_str);
-#endif
#ifdef O_SYNC
/* We let O_SYNC only affect log files; note that we map O_DSYNC to
O_SYNC because the datasync options seemed to corrupt files in 2001
=== modified file 'storage/innobase/que/que0que.c'
--- a/storage/innobase/que/que0que.c revid:vasil.dimov@stripped
+++ b/storage/innobase/que/que0que.c revid:vasil.dimov@stripped
@@ -1283,18 +1283,13 @@ que_run_threads_low(
que_thr_t* thr) /*!< in: query thread */
{
que_thr_t* next_thr;
- ulint cumul_resource;
ulint loop_count;
ut_ad(thr->state == QUE_THR_RUNNING);
ut_a(thr_get_trx(thr)->error_state == DB_SUCCESS);
ut_ad(!mutex_own(&kernel_mutex));
- /* cumul_resource counts how much resources the OS thread (NOT the
- query thread) has spent in this function */
-
loop_count = QUE_MAX_LOOPS_WITHOUT_CHECK;
- cumul_resource = 0;
loop:
/* Check that there is enough space in the log to accommodate
possible log entries by this query step; if the operation can touch
=== modified file 'storage/innobase/row/row0purge.c'
--- a/storage/innobase/row/row0purge.c revid:vasil.dimov@stripped
+++ b/storage/innobase/row/row0purge.c revid:vasil.dimov@stripped
@@ -789,7 +789,9 @@ row_purge_step(
que_thr_t* thr) /*!< in: query thread */
{
purge_node_t* node;
+#ifdef UNIV_DEBUG
ulint err;
+#endif /* UNIV_DEBUG */
ut_ad(thr);
@@ -797,7 +799,10 @@ row_purge_step(
ut_ad(que_node_get_type(node) == QUE_NODE_PURGE);
- err = row_purge(node, thr);
+#ifdef UNIV_DEBUG
+ err =
+#endif /* UNIV_DEBUG */
+ row_purge(node, thr);
ut_ad(err == DB_SUCCESS);
=== modified file 'storage/innobase/row/row0umod.c'
--- a/storage/innobase/row/row0umod.c revid:vasil.dimov@stripped
+++ b/storage/innobase/row/row0umod.c revid:vasil.dimov@stripped
@@ -114,12 +114,17 @@ row_undo_mod_clust_low(
btr_pcur_t* pcur;
btr_cur_t* btr_cur;
ulint err;
+#ifdef UNIV_DEBUG
ibool success;
+#endif /* UNIV_DEBUG */
pcur = &(node->pcur);
btr_cur = btr_pcur_get_btr_cur(pcur);
- success = btr_pcur_restore_position(mode, pcur, mtr);
+#ifdef UNIV_DEBUG
+ success =
+#endif /* UNIV_DEBUG */
+ btr_pcur_restore_position(mode, pcur, mtr);
ut_ad(success);
=== modified file 'storage/innobase/row/row0vers.c'
--- a/storage/innobase/row/row0vers.c revid:vasil.dimov@stripped
+++ b/storage/innobase/row/row0vers.c revid:vasil.dimov@stripped
@@ -71,7 +71,9 @@ row_vers_impl_x_locked_off_kernel(
warning */
trx_t* trx;
ulint rec_del;
+#ifdef UNIV_DEBUG
ulint err;
+#endif /* UNIV_DEBUG */
mtr_t mtr;
ulint comp;
@@ -169,9 +171,12 @@ row_vers_impl_x_locked_off_kernel(
heap2 = heap;
heap = mem_heap_create(1024);
- err = trx_undo_prev_version_build(clust_rec, &mtr, version,
- clust_index, clust_offsets,
- heap, &prev_version);
+#ifdef UNIV_DEBUG
+ err =
+#endif /* UNIV_DEBUG */
+ trx_undo_prev_version_build(clust_rec, &mtr, version,
+ clust_index, clust_offsets,
+ heap, &prev_version);
mem_heap_free(heap2); /* free version and clust_offsets */
if (prev_version == NULL) {
=== modified file 'storage/innobase/srv/srv0mon.c'
--- a/storage/innobase/srv/srv0mon.c revid:vasil.dimov@stripped
+++ b/storage/innobase/srv/srv0mon.c revid:vasil.dimov@stripped
@@ -33,6 +33,20 @@ Created 12/9/2009 Jimmy Yang
#include "srv0mon.ic"
#endif
+/* Macro to standardize the counter names for counters in the
+"monitor_buf_page" module as they have very structured defines */
+#define MONITOR_BUF_PAGE(name, description, code, op, op_code) \
+ {"buf_page_"op"_"name, "Buffer Page I/O", \
+ "Number of "description" Pages "op, \
+ MONITOR_GROUP_MODULE, MONITOR_##code##_##op_code}
+
+#define MONITOR_BUF_PAGE_READ(name, description, code) \
+ MONITOR_BUF_PAGE(name, description, code, "read", PAGE_READ)
+
+#define MONITOR_BUF_PAGE_WRITTEN(name, description, code) \
+ MONITOR_BUF_PAGE(name, description, code, "written", PAGE_WRITTEN)
+
+
/** This array defines basic static information of monitor counters,
including each monitor's name, sub module it belongs to, a short
description and its property/type and corresponding monitor_id. */
@@ -45,13 +59,13 @@ static monitor_info_t innodb_counter_inf
MONITOR_MODULE, MONITOR_DEFAULT_START},
/* ========== Counters for Server Metadata ========== */
- {"module_server", "Server Metadata", "Server Metadata",
+ {"module_metadata", "Server Metadata", "Server Metadata",
MONITOR_MODULE, MONITOR_MODULE_METADATA},
- {"server_table_open", "Server Metadata",
+ {"metadata_table_opened", "Server Metadata",
"Number of table handler opened", 0, MONITOR_TABLE_OPEN},
- {"server_table_close", "Server Metadata",
+ {"metadata_table_closed", "Server Metadata",
"Number of table handler closed", 0, MONITOR_TABLE_CLOSE},
/* ========== Counters for Lock Module ========== */
@@ -98,7 +112,7 @@ static monitor_info_t innodb_counter_inf
MONITOR_EXISTING, MONITOR_OVLD_ROW_LOCK_WAIT},
/* ========== Counters for Buffer Manager and I/O ========== */
- {"module_buffer", "Buffer", "Buufer Manager Module",
+ {"module_buffer", "Buffer", "Buffer Manager Module",
MONITOR_MODULE, MONITOR_MODULE_BUFFER},
{"buffer_reads", "Buffer", "Number of reads from disk",
@@ -158,6 +172,89 @@ static monitor_info_t innodb_counter_inf
{"buffer_byte_written", "Buffer", "Amount data written in bytes",
MONITOR_EXISTING, MONITOR_OVLD_BYTE_WRITTEN},
+ /* ========== Counters for Buffer Page I/O ========== */
+ {"module_buf_page", "Buffer Page I/O", "Buffer Page I/O Module",
+ MONITOR_MODULE | MONITOR_GROUP_MODULE, MONITOR_MODULE_BUF_PAGE},
+
+ MONITOR_BUF_PAGE_READ("index_leaf","Index Leaf", INDEX_LEAF),
+
+ MONITOR_BUF_PAGE_READ("index_non_leaf","Index Non-leaf",
+ INDEX_NON_LEAF),
+
+ MONITOR_BUF_PAGE_READ("index_ibuf_leaf", "Insert Buffer Index Leaf",
+ INDEX_IBUF_LEAF),
+
+ MONITOR_BUF_PAGE_READ("index_ibuf_non_leaf",
+ "Insert Buffer Index Non-Leaf",
+ INDEX_IBUF_NON_LEAF),
+
+ MONITOR_BUF_PAGE_READ("undo_log", "Undo Log", UNDO_LOG),
+
+ MONITOR_BUF_PAGE_READ("index_inode", "Index Inode", INODE),
+
+ MONITOR_BUF_PAGE_READ("ibuf_free_list", "Insert Buffer Free List",
+ IBUF_FREELIST),
+
+ MONITOR_BUF_PAGE_READ("ibuf_bitmap", "Insert Buffer Bitmap",
+ IBUF_BITMAP),
+
+ MONITOR_BUF_PAGE_READ("system_page", "System Pages", SYSTEM),
+
+ MONITOR_BUF_PAGE_READ("trx_system", "Transaction System", TRX_SYSTEM),
+
+ MONITOR_BUF_PAGE_READ("fsp_hdr", "File Space Header", FSP_HDR),
+
+ MONITOR_BUF_PAGE_READ("xdes", "Extent Descriptor", XDES),
+
+ MONITOR_BUF_PAGE_READ("blob", "Uncompressed Blob", BLOB),
+
+ MONITOR_BUF_PAGE_READ("zblob", "First Compressed Blob", ZBLOB),
+
+ MONITOR_BUF_PAGE_READ("zblob2", "Subsequent Compressed Blob", ZBLOB2),
+
+ MONITOR_BUF_PAGE_READ("other", "other/unknown (old version InnoDB)",
+ OTHER),
+
+ MONITOR_BUF_PAGE_WRITTEN("index_leaf","Index Leaf", INDEX_LEAF),
+
+ MONITOR_BUF_PAGE_WRITTEN("index_non_leaf","Index Non-leaf",
+ INDEX_NON_LEAF),
+
+ MONITOR_BUF_PAGE_WRITTEN("index_ibuf_leaf", "Insert Buffer Index Leaf",
+ INDEX_IBUF_LEAF),
+
+ MONITOR_BUF_PAGE_WRITTEN("index_ibuf_non_leaf",
+ "Insert Buffer Index Non-Leaf",
+ INDEX_IBUF_NON_LEAF),
+
+ MONITOR_BUF_PAGE_WRITTEN("undo_log", "Undo Log", UNDO_LOG),
+
+ MONITOR_BUF_PAGE_WRITTEN("index_inode", "Index Inode", INODE),
+
+ MONITOR_BUF_PAGE_WRITTEN("ibuf_free_list", "Insert Buffer Free List",
+ IBUF_FREELIST),
+
+ MONITOR_BUF_PAGE_WRITTEN("ibuf_bitmap", "Insert Buffer Bitmap",
+ IBUF_BITMAP),
+
+ MONITOR_BUF_PAGE_WRITTEN("system_page", "System Pages", SYSTEM),
+
+ MONITOR_BUF_PAGE_WRITTEN("trx_system", "Transaction System",
+ TRX_SYSTEM),
+ MONITOR_BUF_PAGE_WRITTEN("fsp_hdr", "File Space Header", FSP_HDR),
+
+ MONITOR_BUF_PAGE_WRITTEN("xdes", "Extent Descriptor", XDES),
+
+ MONITOR_BUF_PAGE_WRITTEN("blob", "Uncompressed Blob", BLOB),
+
+ MONITOR_BUF_PAGE_WRITTEN("zblob", "First Compressed Blob", ZBLOB),
+
+ MONITOR_BUF_PAGE_WRITTEN("zblob2", "Subsequent Compressed Blob",
+ ZBLOB2),
+
+ MONITOR_BUF_PAGE_WRITTEN("other", "other/unknown (old version InnoDB)",
+ OTHER),
+
/* ========== Counters for OS level operations ========== */
{"module_os", "OS", "OS Level Operation",
MONITOR_MODULE, MONITOR_MODULE_OS},
@@ -369,6 +466,8 @@ srv_mon_set_module_control(
counter */
{
ulint ix;
+ ulint start_id;
+ ibool set_current_module = FALSE;
ut_a(module_id <= NUM_MONITOR);
ut_a(UT_ARR_SIZE(innodb_counter_info) == NUM_MONITOR);
@@ -379,8 +478,21 @@ srv_mon_set_module_control(
/* start with the first monitor in the module. If module_id
is MONITOR_ALL_COUNTER, this means we need to turn on all
monitor counters. */
- for (ix = (module_id == MONITOR_ALL_COUNTER) ? 1 : module_id + 1;
- ix < NUM_MONITOR; ix++) {
+ if (module_id == MONITOR_ALL_COUNTER) {
+ start_id = 1;
+ } else if (innodb_counter_info[module_id].monitor_type
+ & MONITOR_GROUP_MODULE) {
+ /* Counters in this module are set as a group together
+ and cannot be turned on/off individually. Need to set
+ the on/off bit in the module counter */
+ start_id = module_id;
+ set_current_module = TRUE;
+
+ } else {
+ start_id = module_id + 1;
+ }
+
+ for (ix = start_id; ix < NUM_MONITOR; ix++) {
/* Cannot turn on a monitor already been turned on. User
should be aware some counters are already on before
turn them on again (which could reset counter value) */
@@ -393,9 +505,15 @@ srv_mon_set_module_control(
and break if just turn on the counters in the
current module. */
if (innodb_counter_info[ix].monitor_type & MONITOR_MODULE) {
- if (module_id == MONITOR_ALL_COUNTER) {
+
+ if (set_current_module) {
+ /* Continue to set on/off bit on current
+ module */
+ set_current_module = FALSE;
+ } else if (module_id == MONITOR_ALL_COUNTER) {
continue;
} else {
+ /* Hitting the next module, stop */
break;
}
}
@@ -553,12 +671,12 @@ srv_mon_process_existing_counter(
value = stat.n_pages_read;
break;
- /* innodb_data_writes, the total number of data writes. */
+ /* innodb_data_reads, the total number of data reads */
case MONITOR_OVLD_BYTE_READ:
value = srv_data_read;
break;
- /* innodb_data_reads, the total number of data reads */
+ /* innodb_data_writes, the total number of data writes. */
case MONITOR_OVLD_BYTE_WRITTEN:
value = srv_data_written;
break;
=== modified file 'storage/innobase/srv/srv0start.c'
--- a/storage/innobase/srv/srv0start.c revid:vasil.dimov@stripped
+++ b/storage/innobase/srv/srv0start.c revid:vasil.dimov@stripped
@@ -1337,7 +1337,7 @@ innobase_start_or_create_for_mysql(void)
/* Print time to initialize the buffer pool */
ut_print_timestamp(stderr);
fprintf(stderr,
- " InnoDB: Initializing buffer pool, size =");
+ " InnoDB: Initializing buffer pool, size =");
if (srv_buf_pool_size >= 1024 * 1024 * 1024) {
fprintf(stderr,
@@ -1353,7 +1353,7 @@ innobase_start_or_create_for_mysql(void)
ut_print_timestamp(stderr);
fprintf(stderr,
- " InnoDB: Completed initialization of buffer pool\n");
+ " InnoDB: Completed initialization of buffer pool\n");
if (err != DB_SUCCESS) {
fprintf(stderr,
@@ -1871,7 +1871,7 @@ innobase_start_or_create_for_mysql(void)
if (srv_print_verbose_log) {
ut_print_timestamp(stderr);
fprintf(stderr,
- " InnoDB %s started; "
+ " InnoDB: %s started; "
"log sequence number %llu\n",
INNODB_VERSION_STR, srv_start_lsn);
}
=== modified file 'storage/innobase/trx/trx0purge.c'
--- a/storage/innobase/trx/trx0purge.c revid:vasil.dimov@stripped
+++ b/storage/innobase/trx/trx0purge.c revid:vasil.dimov@stripped
@@ -314,9 +314,10 @@ trx_purge_add_update_undo_to_history(
trx_undo_t* undo;
trx_rseg_t* rseg;
trx_rsegf_t* rseg_header;
+#ifdef UNIV_DEBUG
trx_usegf_t* seg_header;
+#endif /* UNIV_DEBUG */
trx_ulogf_t* undo_header;
- trx_upagef_t* page_header;
ulint hist_size;
undo = trx->update_undo;
@@ -331,8 +332,9 @@ trx_purge_add_update_undo_to_history(
rseg->page_no, mtr);
undo_header = undo_page + undo->hdr_offset;
+#ifdef UNIV_DEBUG
seg_header = undo_page + TRX_UNDO_SEG_HDR;
- page_header = undo_page + TRX_UNDO_PAGE_HDR;
+#endif /* UNIV_DEBUG */
if (undo->state != TRX_UNDO_CACHED) {
/* The undo log segment will not be reused */
@@ -670,7 +672,6 @@ trx_purge_rseg_get_next_history_log(
{
page_t* undo_page;
trx_ulogf_t* log_hdr;
- trx_usegf_t* seg_hdr;
fil_addr_t prev_log_addr;
trx_id_t trx_no;
ibool del_marks;
@@ -691,7 +692,6 @@ trx_purge_rseg_get_next_history_log(
undo_page = trx_undo_page_get_s_latched(rseg->space, rseg->zip_size,
rseg->last_page_no, &mtr);
log_hdr = undo_page + rseg->last_offset;
- seg_hdr = undo_page + TRX_UNDO_SEG_HDR;
/* Increase the purge page count by one for every handled log */
@@ -1080,12 +1080,8 @@ trx_purge_rec_release(
/*==================*/
trx_undo_inf_t* cell) /*!< in: storage cell */
{
- trx_undo_arr_t* arr;
-
mutex_enter(&(purge_sys->mutex));
- arr = purge_sys->arr;
-
trx_purge_arr_remove_info(cell);
mutex_exit(&(purge_sys->mutex));
=== modified file 'storage/innobase/trx/trx0roll.c'
--- a/storage/innobase/trx/trx0roll.c revid:vasil.dimov@stripped
+++ b/storage/innobase/trx/trx0roll.c revid:vasil.dimov@stripped
@@ -747,13 +747,8 @@ trx_undo_arr_remove_info(
undo_no_t undo_no)/*!< in: undo number */
{
trx_undo_inf_t* cell;
- ulint n_used;
- ulint n;
ulint i;
- n_used = arr->n_used;
- n = 0;
-
for (i = 0;; i++) {
cell = trx_undo_arr_get_nth_info(arr, i);
=== modified file 'storage/innobase/trx/trx0sys.c'
--- a/storage/innobase/trx/trx0sys.c revid:vasil.dimov@stripped
+++ b/storage/innobase/trx/trx0sys.c revid:vasil.dimov@stripped
@@ -249,7 +249,9 @@ trx_sys_create_doublewrite_buf(void)
{
buf_block_t* block;
buf_block_t* block2;
+#ifdef UNIV_SYNC_DEBUG
buf_block_t* new_block;
+#endif /* UNIV_SYNC_DEBUG */
byte* doublewrite;
byte* fseg_header;
ulint page_no;
@@ -352,8 +354,11 @@ start_again:
the page position in the tablespace, then the page
has not been written to in doublewrite. */
- new_block = buf_page_get(TRX_SYS_SPACE, 0, page_no,
- RW_X_LATCH, &mtr);
+#ifdef UNIV_SYNC_DEBUG
+ new_block =
+#endif /* UNIV_SYNC_DEBUG */
+ buf_page_get(TRX_SYS_SPACE, 0, page_no,
+ RW_X_LATCH, &mtr);
buf_block_dbg_add_level(new_block,
SYNC_NO_ORDER_CHECK);
=== modified file 'storage/innobase/trx/trx0trx.c'
--- a/storage/innobase/trx/trx0trx.c revid:vasil.dimov@stripped
+++ b/storage/innobase/trx/trx0trx.c revid:vasil.dimov@stripped
@@ -1806,7 +1806,6 @@ trx_prepare_off_kernel(
/*===================*/
trx_t* trx) /*!< in: transaction */
{
- page_t* update_hdr_page;
trx_rseg_t* rseg;
ib_uint64_t lsn = 0;
mtr_t mtr;
@@ -1839,7 +1838,7 @@ trx_prepare_off_kernel(
}
if (trx->update_undo) {
- update_hdr_page = trx_undo_set_state_at_prepare(
+ trx_undo_set_state_at_prepare(
trx, trx->update_undo, &mtr);
}
=== modified file 'storage/innobase/trx/trx0undo.c'
--- a/storage/innobase/trx/trx0undo.c revid:vasil.dimov@stripped
+++ b/storage/innobase/trx/trx0undo.c revid:vasil.dimov@stripped
@@ -1072,14 +1072,11 @@ trx_undo_truncate_end(
ulint last_page_no;
trx_undo_rec_t* rec;
trx_undo_rec_t* trunc_here;
- trx_rseg_t* rseg;
mtr_t mtr;
ut_ad(mutex_own(&(trx->undo_mutex)));
ut_ad(mutex_own(&(trx->rseg->mutex)));
- rseg = trx->rseg;
-
for (;;) {
mtr_start(&mtr);
@@ -1873,7 +1870,6 @@ trx_undo_set_state_at_prepare(
mtr_t* mtr) /*!< in: mtr */
{
trx_usegf_t* seg_hdr;
- trx_upagef_t* page_hdr;
trx_ulogf_t* undo_header;
page_t* undo_page;
ulint offset;
@@ -1891,7 +1887,6 @@ trx_undo_set_state_at_prepare(
undo->hdr_page_no, mtr);
seg_hdr = undo_page + TRX_UNDO_SEG_HDR;
- page_hdr = undo_page + TRX_UNDO_PAGE_HDR;
/*------------------------------*/
undo->state = TRX_UNDO_PREPARED;
=== removed file 'storage/innobase/ut/ut0auxconf_atomic_pthread_t_gcc.c'
--- a/storage/innobase/ut/ut0auxconf_atomic_pthread_t_gcc.c revid:vasil.dimov@stripped
+++ b/storage/innobase/ut/ut0auxconf_atomic_pthread_t_gcc.c 1970-01-01 00:00:00 +0000
@@ -1,43 +0,0 @@
-/*****************************************************************************
-
-Copyright (c) 2009, Innobase Oy. All Rights Reserved.
-
-This program is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free Software
-Foundation; version 2 of the License.
-
-This program is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along with
-this program; if not, write to the Free Software Foundation, Inc., 59 Temple
-Place, Suite 330, Boston, MA 02111-1307 USA
-
-*****************************************************************************/
-
-/*****************************************************************************
-If this program compiles, then pthread_t objects can be used as arguments
-to GCC atomic builtin functions.
-
-Created March 5, 2009 Vasil Dimov
-*****************************************************************************/
-
-#include <pthread.h>
-#include <string.h>
-
-int
-main(int argc, char** argv)
-{
- pthread_t x1;
- pthread_t x2;
- pthread_t x3;
-
- memset(&x1, 0x0, sizeof(x1));
- memset(&x2, 0x0, sizeof(x2));
- memset(&x3, 0x0, sizeof(x3));
-
- __sync_bool_compare_and_swap(&x1, x2, x3);
-
- return(0);
-}
=== removed file 'storage/innobase/ut/ut0auxconf_atomic_pthread_t_solaris.c'
--- a/storage/innobase/ut/ut0auxconf_atomic_pthread_t_solaris.c revid:vasil.dimov@stripped
+++ b/storage/innobase/ut/ut0auxconf_atomic_pthread_t_solaris.c 1970-01-01 00:00:00 +0000
@@ -1,54 +0,0 @@
-/*****************************************************************************
-
-Copyright (c) 2009, Innobase Oy. All Rights Reserved.
-
-This program is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free Software
-Foundation; version 2 of the License.
-
-This program is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along with
-this program; if not, write to the Free Software Foundation, Inc., 59 Temple
-Place, Suite 330, Boston, MA 02111-1307 USA
-
-*****************************************************************************/
-
-/*****************************************************************************
-If this program compiles and returns 0, then pthread_t objects can be used as
-arguments to Solaris libc atomic functions.
-
-Created April 18, 2009 Vasil Dimov
-*****************************************************************************/
-
-#include <pthread.h>
-#include <string.h>
-
-int
-main(int argc, char** argv)
-{
- pthread_t x1;
- pthread_t x2;
- pthread_t x3;
-
- memset(&x1, 0x0, sizeof(x1));
- memset(&x2, 0x0, sizeof(x2));
- memset(&x3, 0x0, sizeof(x3));
-
- if (sizeof(pthread_t) == 4) {
-
- atomic_cas_32(&x1, x2, x3);
-
- } else if (sizeof(pthread_t) == 8) {
-
- atomic_cas_64(&x1, x2, x3);
-
- } else {
-
- return(1);
- }
-
- return(0);
-}
=== removed file 'storage/innobase/ut/ut0auxconf_have_gcc_atomics.c'
--- a/storage/innobase/ut/ut0auxconf_have_gcc_atomics.c revid:vasil.dimov@stripped
+++ b/storage/innobase/ut/ut0auxconf_have_gcc_atomics.c 1970-01-01 00:00:00 +0000
@@ -1,61 +0,0 @@
-/*****************************************************************************
-
-Copyright (c) 2009, Innobase Oy. All Rights Reserved.
-
-This program is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free Software
-Foundation; version 2 of the License.
-
-This program is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along with
-this program; if not, write to the Free Software Foundation, Inc., 59 Temple
-Place, Suite 330, Boston, MA 02111-1307 USA
-
-*****************************************************************************/
-
-/*****************************************************************************
-If this program compiles and returns 0, then GCC atomic funcions are available.
-
-Created September 12, 2009 Vasil Dimov
-*****************************************************************************/
-
-int
-main(int argc, char** argv)
-{
- long x;
- long y;
- long res;
- char c;
-
- x = 10;
- y = 123;
- res = __sync_bool_compare_and_swap(&x, x, y);
- if (!res || x != y) {
- return(1);
- }
-
- x = 10;
- y = 123;
- res = __sync_bool_compare_and_swap(&x, x + 1, y);
- if (res || x != 10) {
- return(1);
- }
-
- x = 10;
- y = 123;
- res = __sync_add_and_fetch(&x, y);
- if (res != 123 + 10 || x != 123 + 10) {
- return(1);
- }
-
- c = 10;
- res = __sync_lock_test_and_set(&c, 123);
- if (res != 10 || c != 123) {
- return(1);
- }
-
- return(0);
-}
=== removed file 'storage/innobase/ut/ut0auxconf_have_solaris_atomics.c'
--- a/storage/innobase/ut/ut0auxconf_have_solaris_atomics.c revid:vasil.dimov@stripped
+++ b/storage/innobase/ut/ut0auxconf_have_solaris_atomics.c 1970-01-01 00:00:00 +0000
@@ -1,39 +0,0 @@
-/*****************************************************************************
-
-Copyright (c) 2009, Innobase Oy. All Rights Reserved.
-
-This program is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free Software
-Foundation; version 2 of the License.
-
-This program is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along with
-this program; if not, write to the Free Software Foundation, Inc., 59 Temple
-Place, Suite 330, Boston, MA 02111-1307 USA
-
-*****************************************************************************/
-
-/*****************************************************************************
-If this program compiles, then Solaris libc atomic funcions are available.
-
-Created April 18, 2009 Vasil Dimov
-*****************************************************************************/
-#include <atomic.h>
-
-int
-main(int argc, char** argv)
-{
- ulong_t ulong = 0;
- uint32_t uint32 = 0;
- uint64_t uint64 = 0;
-
- atomic_cas_ulong(&ulong, 0, 1);
- atomic_cas_32(&uint32, 0, 1);
- atomic_cas_64(&uint64, 0, 1);
- atomic_add_long(&ulong, 0);
-
- return(0);
-}
=== removed file 'storage/innobase/ut/ut0auxconf_pause.c'
--- a/storage/innobase/ut/ut0auxconf_pause.c revid:vasil.dimov@stripped
+++ b/storage/innobase/ut/ut0auxconf_pause.c 1970-01-01 00:00:00 +0000
@@ -1,32 +0,0 @@
-/*****************************************************************************
-
-Copyright (c) 2009, Innobase Oy. All Rights Reserved.
-
-This program is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free Software
-Foundation; version 2 of the License.
-
-This program is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along with
-this program; if not, write to the Free Software Foundation, Inc., 59 Temple
-Place, Suite 330, Boston, MA 02111-1307 USA
-
-*****************************************************************************/
-
-/*****************************************************************************
-If this program compiles and can be run and returns 0, then the pause
-instruction is available.
-
-Created Jul 21, 2009 Vasil Dimov
-*****************************************************************************/
-
-int
-main(int argc, char** argv)
-{
- __asm__ __volatile__ ("pause");
-
- return(0);
-}
=== removed file 'storage/innobase/ut/ut0auxconf_sizeof_pthread_t.c'
--- a/storage/innobase/ut/ut0auxconf_sizeof_pthread_t.c revid:vasil.dimov@stripped
+++ b/storage/innobase/ut/ut0auxconf_sizeof_pthread_t.c 1970-01-01 00:00:00 +0000
@@ -1,35 +0,0 @@
-/*****************************************************************************
-
-Copyright (c) 2009, Innobase Oy. All Rights Reserved.
-
-This program is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free Software
-Foundation; version 2 of the License.
-
-This program is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along with
-this program; if not, write to the Free Software Foundation, Inc., 59 Temple
-Place, Suite 330, Boston, MA 02111-1307 USA
-
-*****************************************************************************/
-
-/*****************************************************************************
-This program should compile and when run, print a single line like:
-#define SIZEOF_PTHREAD_T %d
-
-Created April 18, 2009 Vasil Dimov
-*****************************************************************************/
-
-#include <stdio.h>
-#include <pthread.h>
-
-int
-main(int argc, char** argv)
-{
- printf("#define SIZEOF_PTHREAD_T %d\n", (int) sizeof(pthread_t));
-
- return(0);
-}
Attachment: [text/bzr-bundle] bzr/vasil.dimov@oracle.com-20100921121219-76k4tsqfwtq34bks.bundle
| Thread |
|---|
| • bzr commit into mysql-next-mr-innodb branch (vasil.dimov:3247) | vasil.dimov | 21 Sep |