status clientMysql cc show processlist show authors show

  • Slides: 26
Download presentation

客户端status命令 client/Mysql. cc源文件 …

客户端status命令 client/Mysql. cc源文件 …

服务端常用的一些命令 • • show processlist show authors show contributors show create table / view

服务端常用的一些命令 • • show processlist show authors show contributors show create table / view show create database show privileges 神奇的information_schema

Show processlist

Show processlist

Show authors

Show authors

show contributors

show contributors

show create table / view

show create table / view

show create database

show create database

show privileges

show privileges

information_schema中的对象

information_schema中的对象

schema_information中的对象

schema_information中的对象

st_schema_table结构体定义

st_schema_table结构体定义

show table status Table的各种信息,都在tables_fields_info[]数组里定义义 , Name, Engine, Version, Row_format, Rows, Avg_row_lenght, Dat a_length 等等

show table status Table的各种信息,都在tables_fields_info[]数组里定义义 , Name, Engine, Version, Row_format, Rows, Avg_row_lenght, Dat a_length 等等

show table status 再看ST_SCHEMA_TABLE schema_tables[]关于tables的定 义 表的名字:TABLES 表结构的定义:tables_fields_info 表的创建函数:create_schema_table 填冲数据函数:by function get_all_tables and get_schema_tables_record

show table status 再看ST_SCHEMA_TABLE schema_tables[]关于tables的定 义 表的名字:TABLES 表结构的定义:tables_fields_info 表的创建函数:create_schema_table 填冲数据函数:by function get_all_tables and get_schema_tables_record

My. SQL复制的常用命令 • show slave status; • show master status;

My. SQL复制的常用命令 • show slave status; • show master status;

show slave status sql/Slave. cc源文件 如何把一台 mysql做成多台 master的slave?

show slave status sql/Slave. cc源文件 如何把一台 mysql做成多台 master的slave?

show master status sql/Sql_repl. cc源文件

show master status sql/Sql_repl. cc源文件

Show innodb status

Show innodb status

show innodb status srv_print_master_thread_info(file) 注解:BACKGROUND THREAD sync_print(file) 注解:SEMAPHORES sync_array_print_info sync_print_wait_info /** Synchronization array */

show innodb status srv_print_master_thread_info(file) 注解:BACKGROUND THREAD sync_print(file) 注解:SEMAPHORES sync_array_print_info sync_print_wait_info /** Synchronization array */ sync_array_struct lock_print_info_summary() 汇总事务信息 lock_print_info_all_transactions()每个事务的信息 注解:TRANSACTIONS os_aio_print(file); 注解:FILE I/O srv_printf_innodb_monitor INNODB MONITOR OUTPUT ibuf_print(file) // insert buffer ha_print_info(file…) //hash table 注解:INSERT BUFFER AND ADAPTIVE HASH INDEX log_print(file) 注解:LOG buf_print_io(file) 注解:BUFFER POOL AND MEMORY ROW OPERATIONS(根据全局变量 值计算) 源文件位置:storage/innodb_plugin/srv 0 srv. c trx_sys_struct trx_purge_struct os_aio_array_struct /** The asynchronous i/o array structure */ ibuf_struct hash_table_struct log_struct buf_pool_struct

Innodb monitor信息展示与源码 srv/Srv 0 srv. c源文件中的srv_monitor_thread主函数 INNODB TABLESPACE and TABLE MONITOR OUTPUT ……. dict_table_print_low,

Innodb monitor信息展示与源码 srv/Srv 0 srv. c源文件中的srv_monitor_thread主函数 INNODB TABLESPACE and TABLE MONITOR OUTPUT ……. dict_table_print_low, dict_col_print_low, dict_update_statistics_low, dtype_print

Follow me • • • 团队blog: http: //www. taobaodba. com 个人blog: http: //zhaolinjnu. blog.

Follow me • • • 团队blog: http: //www. taobaodba. com 个人blog: http: //zhaolinjnu. blog. sohu. com Twitter: http: //twitter. com/zhaolinjnu 新浪微博:http: //t. sina. com. cn/zhaolinjnu Email: zhaolinjnu@163. com