MySQL之innochecksum初探
innochecksum是一个用于校验innodb表空间文件完整性的工具,这是一个官方自带的工具,关于它的介绍,可以查看MySQL官方文档,下文主要是通过innodb_ruby来对innochecksum --page-type-dump的结果进行解读。
关于innodb_ruby的使用,请稍移玉步,查看以前的拙文"使用innodb_ruby探查Innodb索引结构"
innnchecksum的使用限制:必须关闭mysqld进程,否则会在使用的时候提示“Unable to lock file”的错误。 个人认为innochecksum的使用非常受限,也只有在mysqld进程异常退出,或者服务器宕机的时候用于快速检查表空间文件的完整性。而innodb_ruby的使用范围更广。
innnchecksum在MySQL5.7之后,可选项比MySQL5.6稍多。
特别说明:本文使用的是MySQL5.7的innochecksum。
首先,看看MySQL5.6的innochecksum的选项
[root@MySQL57M1 :: /root]# /usr/local/mysql56/bin/innochecksum --version
InnoDB offline file checksum utility.
/usr/local/mysql56/bin/innochecksum Ver 5.6., for linux-glibc2. (x86_64) [root@MySQL57M1 :: /root]# /usr/local/mysql56/bin/innochecksum --help
InnoDB offline file checksum utility.
/usr/local/mysql56/bin/innochecksum Ver 5.6., for linux-glibc2. (x86_64)
Copyright (c) , , Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners. InnoDB offline file checksum utility.
Usage: /usr/local/mysql56/bin/innochecksum [-c] [-s <start page>] [-e <end page>] [-p <page>] [-v] [-d] <filename>
-?, --help Displays this help and exits.
-I, --info Synonym for --help.
-V, --version Displays version information and exits.
-v, --verbose Verbose (prints progress every seconds).
-d, --debug Debug mode (prints checksums for each page, implies
verbose).
-c, --count Print the count of pages in the file.
-s, --start-page=# Start on this page number ( based).
-e, --end-page=# End at this page number ( based).
-p, --page=# Check only this page ( based). Variables (--variable-name=value)
and boolean options {FALSE|TRUE} Value (after reading options)
--------------------------------- ----------------------------------------
verbose FALSE
debug FALSE
count FALSE
start-page
end-page
page
再看看MySQL5.7的innochecksum的选项
[root@MySQL57M1 :: /root]# /usr/local/mysql/bin/innochecksum --help
/usr/local/mysql/bin/innochecksum Ver 5.7., for linux-glibc2. (x86_64)
Copyright (c) , , Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners. InnoDB offline file checksum utility.
Usage: /usr/local/mysql/bin/innochecksum [-c] [-s <start page>] [-e <end page>] [-p <page>] [-v] [-a <allow mismatches>] [-n] [-C <strict-check>] [-w <write>] [-S] [-D <page type dump>] [-l <log>] <filename or [-]>
See http://dev.mysql.com/doc/refman/5.7/en/innochecksum.html for usage hints.
-?, --help Displays this help and exits.
-I, --info Synonym for --help.
-V, --version Displays version information and exits.
-v, --verbose Verbose (prints progress every seconds).
-c, --count Print the count of pages in the file and exits.
-s, --start-page=# Start on this page number ( based).
-e, --end-page=# End at this page number ( based).
-p, --page=# Check only this page ( based).
-C, --strict-check=name
Specify the strict checksum algorithm by the user.
-n, --no-check Ignore the checksum verification.
-a, --allow-mismatches=#
Maximum checksum mismatch allowed.
-w, --write=name Rewrite the checksum algorithm by the user.
-S, --page-type-summary
Display a count of each page type in a tablespace.
-D, --page-type-dump=name
Dump the page type info for each page in a tablespace.
-l, --log=name log output. Variables (--variable-name=value)
and boolean options {FALSE|TRUE} Value (after reading options)
--------------------------------- ----------------------------------------
verbose FALSE
count FALSE
start-page
end-page
page
strict-check crc32
no-check FALSE
allow-mismatches
write crc32
page-type-summary FALSE
page-type-dump (No default value)
log (No default value)
下面通过与innodb_ruby的比较来解读一下输出结果
步骤一、通过sysbench来插入1000条记录
# 创建数据库
root@localhost:mysql3306.sock [(none)]>show create database sbtest ;
+----------+-----------------------------------------------------------------+
| Database | Create Database |
+----------+-----------------------------------------------------------------+
| sbtest | CREATE DATABASE `sbtest` /*!40100 DEFAULT CHARACTER SET utf8 */ |
+----------+-----------------------------------------------------------------+
row in set (0.02 sec)
root@localhost:mysql3306.sock [sbtest]>show create table sbtest1 ;
+---------+-----------------------------------------------------------------------------------+
| Table | Create Table |
+---------+-----------------------------------------------------------------------------------+
| sbtest1 | CREATE TABLE `sbtest1` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`k` int(10) unsigned NOT NULL DEFAULT '0',
`c` char(120) NOT NULL DEFAULT '',
`pad` char(60) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `k_1` (`k`)
) ENGINE=InnoDB AUTO_INCREMENT=1001 DEFAULT CHARSET=utf8 MAX_ROWS=1000000 |
+---------+-----------------------------------------------------------------------------------+
1 row in set (0.00 sec)
# 使用sysbench插入数据
[root@MySQL57M1 :: /opt/software/sysbench-0.4.-1.1/sysbench]# sysbench --test=/opt/software/sysbench-0.4.-1.1/sysbench/tests/db/oltp.lua --oltp-table-size= --oltp-read-only=off --initg=on --numads= --max-requests= --oltp-dist-type=uniform --max-time= --mysql-user=root --mysql-socket=/tmp/mysql3306.sock --mysql-password= --db-driver=mysql --mysql-table-engine=innodb --oltp-test-mode=complex prepare
sysbench 0.5: multi-threaded system evaluation benchmark # 检查插入记录
[root@MySQL57M1 :: /opt/software/sysbench-0.4.-1.1/sysbench]# mysql -S /tmp/mysql3306.sock
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is
Server version: 5.7.-log MySQL Community Server (GPL) Copyright (c) , , Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. root@localhost:mysql3306.sock [(none)]>use sbtest ;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A Database changed
root@localhost:mysql3306.sock [sbtest]>select count() from sbtest1 ;
+----------+
| count() |
+----------+
| |
+----------+
row in set (0.00 sec)
步骤二、关闭mysqld进程
[root@MySQL57M1 :: /root]# /usr/local/mysql/bin/mysqladmin -S /tmp/mysql3306.sock shutdown
步骤三、输出innochecksum的结果
选项一、--count,此选项表明文件中共有多少个page
[root@MySQL57M1 :: /data/mysql/mysql3306/data/sbtest]# /usr/local/mysql/bin/innochecksum --count sbtest1.ibd
Number of pages:21 # 此项在innodb_ruby的space-page-type-regions中进行解读,也可以从innochecksum --page-type-dump中得到印证,使用的page是0~20,共21个page
选项二、--page-type-sumary
[root@MySQL57M1 :: /data/mysql/mysql3306/data/sbtest]# /usr/local/mysql/bin/innochecksum --page-type-summary sbtest1.ibd File::sbtest1.ibd
================PAGE TYPE SUMMARY==============
#PAGE_COUNT PAGE_TYPE
===============================================
Index page # 此项在innodb_ruby的space-indexes中解释
Undo log page
Inode page
Insert buffer free list page
Freshly allocated page
Insert buffer bitmap
System page
Transaction system page
File Space Header
Extent descriptor page
BLOB page
Compressed BLOB page
Other type of page
===============================================
Additional information:
Undo page type: insert, update, other
Undo page state: active, cached, to_free, to_purge, prepared, other
选项三、--page-type-dump
[root@MySQL57M1 :: /data/mysql/mysql3306/data/sbtest]# /usr/local/mysql/bin/innochecksum --page-type-dump=/tmp/sbtest_dump.log sbtest1.ibd [root@MySQL57M1 :: /data/mysql/mysql3306/data/sbtest]# more /tmp/sbtest_dump.log Filename::sbtest1.ibd
==============================================================================
PAGE_NO | PAGE_TYPE | EXTRA INFO
==============================================================================
#:: | File Space Header | -
#:: | Insert Buffer Bitmap | -
#:: | Inode page | -
#:: | Index page | index id=, page level=, No. of records=, garbage=, - # index id 和 page level在innodb_ruby的space-indexes中解读,No. of records 在innodb_ruby的page records中解读,garbage尚未能解读是什么
#:: | Index page | index id=, page level=, No. of records=, garbage=, -
#:: | Index page | index id=, page level=, No. of records=, garbage=, -
#:: | Index page | index id=, page level=, No. of records=, garbage=, -
#:: | Index page | index id=, page level=, No. of records=, garbage=, -
#:: | Index page | index id=, page level=, No. of records=, garbage=, -
#:: | Index page | index id=, page level=, No. of records=, garbage=, -
#:: | Index page | index id=, page level=, No. of records=, garbage=, -
#:: | Index page | index id=, page level=, No. of records=, garbage=, -
#:: | Index page | index id=, page level=, No. of records=, garbage=, -
#:: | Index page | index id=, page level=, No. of records=, garbage=, -
#:: | Index page | index id=, page level=, No. of records=, garbage=, -
#:: | Index page | index id=, page level=, No. of records=, garbage=, -
#:: | Index page | index id=, page level=, No. of records=, garbage=, -
#:: | Index page | index id=, page level=, No. of records=, garbage=, -
#:: | Index page | index id=, page level=, No. of records=, garbage=, -
#:: | Index page | index id=, page level=, No. of records=, garbage=, -
#:: | Freshly allocated page | - [root@MySQL57M1 :: /data/mysql/mysql3306/data/sbtest]#
注:这里的index page都是按照page num的顺序从小到大排列的(至少我的实验结果是这样的,实际情况不知道。使用innodb_space -s ibdata1 -T sbtest/sbtest1 -p 5 page-records得到的是36条记录,innodb_space -s ibdata1 -T sbtest/sbtest1 -p 19 page-records得到的是15条记录)
步骤四、使用innodb_ruby进行解读
选项一、space-indexes
[root@MySQL57M1 :: /data/mysql/mysql3306/data]# innodb_space -s ibdata1 -T sbtest/sbtest1 space-indexes
id name root fseg used allocated fill_factor
PRIMARY internal 100.00%
PRIMARY leaf 100.00%
k_1 internal 100.00%
k_1 leaf 0.00%
此项可以解释innochecksum --page-type-checksum中为什么得到了17个index pages,因为表sbtest1对应着2个索引,一个是主键索引,另外一个是二级索引。其中主键索引‘PRIMARY’共分配了16个page(1个非叶子节点,15个叶子节点,因为sbtest1是聚集索引组织表,索引叶子节点中也包含了真实的数据),二级索引‘k_1’分配了一个page,所以共占用了1+15+1=17个page。
从上面的结果还可以看出主键索引(‘Primary’)的索引ID是45,根结点是page 3,而且叶子节点与根节点并不是同一个节点,所以根节点的page level为1;二级索引(‘k_1’)的索引ID是46,根节点是page 4,而且此根节点也是叶子节点,所以索引ID46在innochecksum --page-type-dump中的结果只有page level = 0【叶子节点的page level是0,越是往上level值就越大】,并不包含page level = 1 的记录。
选项二、space-page-type-regions
[root@MySQL57M1 :: /data/mysql/mysql3306/data]# innodb_space -s ibdata1 -T sbtest/sbtest1 space-page-type-regions
start end count type
FSP_HDR
IBUF_BITMAP
INODE
INDEX
FREE (ALLOCATED)
这里用于印证innochecksum中--count选项,sbtest1表空间文件共使用了21个page,start表示从第x个page开始,end表示到第x个page结束,count表示何种page类型使用了多少个page,type表示page类型。共使用了1+1+1+17+1 = 21。
选项三、-p pagenum page-records
[root@MySQL57M1 :: /data/mysql/mysql3306/data]# innodb_space -s ibdata1 -T sbtest/sbtest1 -p page-records
Record : (id=) → #
Record : (id=) → #
Record : (id=) → #
Record : (id=) → #
Record : (id=) → #
Record : (id=) → #
Record : (id=) → #
Record : (id=) → #
Record : (id=) → #
Record : (id=) → #
Record : (id=) → #
Record : (id=) → #
Record : (id=) → #
Record : (id=) → #
Record : (id=) → #
这里的15条记录对应这个15个叶子节点的page num(5~19),也对应着innochecksum中的No. of records,所以No. of records代表的就是page中包含的记录数。
补充:添加对page 5和page 19的innodb_space page records解析
[root@MySQL57M1 :: /data/mysql/mysql3306/data]# innodb_space -s ibdata1 -T sbtest/sbtest1 -p page-records
Record : (id=) → (k=, c="08566691963-88624912351-16662227201-46648573979-64646226163-77505759394-75470094713-41097360717-15161106334-50535565977", pad="63188288836-92351140030-06390587585-66802097351-49282961843") Record : (id=) → (k=, c="95969429576-20587925969-20202408199-67602281819-18293380360-38184587501-73192830026-41693404212-56705243222-89212376805", pad="09512147864-77936258834-40901700703-13541171421-15205431759") Record : (id=) → (k=, c="26283585383-48610978532-72166636310-67148386979-89643583984-06169170732-23477134062-17788128188-73465768032-24619558652", pad="21979564480-87492594656-60524686334-78820761788-57684966682") Record : (id=) → (k=, c="57481185690-89398636500-16888148413-67987678267-15604944838-94210794401-18107184012-91338377776-83386272438-09451188763", pad="35227182905-15234265621-59793845249-15413569710-23749555118") Record : (id=) → (k=, c="29279855805-99348203463-85191104223-39587263726-81794340135-73817557808-54578801760-64404111877-55434439976-37212880746", pad="59222897263-22759023974-22020489960-93434521232-77981152534") Record : (id=) → (k=, c="24267764271-42431022577-79399828403-34660685942-15614883401-01775912296-17834847270-24498656403-67162539148-21266176221", pad="26472102213-44313108032-85929810653-63595461233-99754685588") Record : (id=) → (k=, c="75769514803-27086227718-38612213700-37972984756-05033716175-01596446901-14887935702-82254196675-91092890141-99940009825", pad="01920094826-30050572228-27293124892-55703762324-88111796380") Record : (id=) → (k=, c="82571936845-31830426410-85662298479-28456275464-64339136268-26186841165-94168712814-56389105006-66969794071-60071049942", pad="13152283289-69561545685-52868757241-04245213425-69280254356") Record : (id=) → (k=, c="94556997174-32108982644-63004661483-42547508604-40987100663-82959520169-01960773852-23325192900-64841585484-09299809863", pad="38130396901-31554193919-79854584773-97713622125-48090103407") Record : (id=) → (k=, c="92229281843-40509455748-54180693333-69666735372-33631067191-52840688810-46742388152-62036963372-40370446940-14952664058", pad="29251291459-26439838509-02439953981-87093993879-41189576069") Record : (id=) → (k=, c="55539894961-94630227272-87892715306-11757554233-65025656366-18040038788-59035923136-82077391351-71299309808-41806629806", pad="95243893840-44524415901-82294436187-08420012728-74234360637") Record : (id=) → (k=, c="85745887749-43926612815-52671599838-72615670779-39539880737-32384431916-14624123858-03743007646-92421088881-13995056613", pad="95695252907-40835773194-59752082278-75477923775-11498955389") Record : (id=) → (k=, c="56316294888-57679890769-58383613277-57458454910-66366822420-44427204096-36206800006-57779232548-42467397897-95291088583", pad="88218646660-35398169196-80904295321-21916525974-80577254755") Record : (id=) → (k=, c="49194164261-78718959601-76453436726-12328252331-82252358387-32591334883-94591313333-32194299027-56489480566-29273924881", pad="29180048350-56869357598-30507794298-39605791895-24572116324") Record : (id=) → (k=, c="25087972499-30804716351-98946650357-16506466188-42176842560-16335148324-61364737966-77319603815-63697591309-04051890496", pad="43910273478-50996077734-27755511063-38289440715-15018863089") Record : (id=) → (k=, c="43454717653-44558192345-39282807857-81817475020-59463951424-65087261835-25202204115-99284673840-03229487757-24342009464", pad="20451441330-30875371862-04498774055-95322094956-34874417333") Record : (id=) → (k=, c="38155538057-45725545265-40889413187-19176032256-33350854183-64846306087-12561577300-76952889459-50179987140-19189659407", pad="47983967466-32916043660-26754951311-67648211152-77587164235") Record : (id=) → (k=, c="23655981276-08645059528-30058537153-25321072018-87163062804-08883437163-58223216794-90063295219-14234702496-80694475355", pad="58046153567-81750139665-38039780155-05506141429-84599433667") Record : (id=) → (k=, c="79942101578-07260787699-83643054812-74587100667-46426009339-58721772706-98945630642-82234846798-71888359042-26732947100", pad="92272567328-80415195747-71974765950-52428122735-62201258395") Record : (id=) → (k=, c="88145905092-43361185087-51020319593-37179046642-84310697372-70862287819-48856968404-99184797065-93751342014-72177157904", pad="24134778965-24746119933-67168161568-50086411748-70562288790") Record : (id=) → (k=, c="38424691506-09354796197-61202697271-63038046508-29888453798-92949141153-62688443035-08026750638-08254686176-61761342594", pad="79733906981-31521935604-58311962288-85453122462-71504498773") Record : (id=) → (k=, c="14727371780-27787201378-78787463594-18460466846-21839479873-30447182067-93416020974-84136743014-58317107496-48981937169", pad="96709539373-81997780696-95347904390-38078115633-62447355461") Record : (id=) → (k=, c="90230837177-91597521543-23236354134-79212233606-17507706971-75567480641-70481816939-85424101073-64577171634-48162481689", pad="27800249225-92962708583-56272782620-97779067645-23232529648") Record : (id=) → (k=, c="96225808974-56822595984-95377074482-83456476383-25408814447-92968603608-77649769299-95136600978-30286715144-34964058160", pad="10255815850-80260680522-69787802778-01654410036-27346900110") Record : (id=) → (k=, c="39480776623-00640080130-24904126938-78433406039-49288389176-22282678080-47593616764-27175866783-76471987280-19342048981", pad="06494949497-92944075663-00641001373-66339631879-79992388428") Record : (id=) → (k=, c="98265218933-49011148684-87417682873-50240835334-63362800751-26404352055-84312047314-60245034763-37365752796-84881045043", pad="13545447624-79776314902-61013724602-32988712578-06240717021") Record : (id=) → (k=, c="91079361241-09020847684-37391806898-07273736210-93629366034-98744355592-20414955521-01312444108-12076129320-46986911874", pad="69590894051-41889115293-04015358313-27891602619-86760056074") Record : (id=) → (k=, c="80179432201-98548860753-91071657657-08431367331-52356826954-28157300365-86275596256-02785465787-96895628664-00768599865", pad="33389172619-93724844897-09488184787-91378022772-29059719650") Record : (id=) → (k=, c="58209632634-43428453594-47456591135-47559683146-08619138313-32670203285-43565200994-03574309358-44183488778-44132897676", pad="94180732599-41019997528-32379837658-27859269245-31924674726") Record : (id=) → (k=, c="85452655587-77830531569-94567785727-88551977409-59919100524-37150116535-18673032762-44703758355-80271278927-32342812113", pad="32564586600-33076490416-56481808104-36256881339-89021614149") Record : (id=) → (k=, c="39326381516-63921696904-87491520820-37013348913-29492574405-00049940380-73338425185-15684942822-68194250937-43955352407", pad="21039155106-57470432053-20794119530-37429140194-04940180039") Record : (id=) → (k=, c="03515613512-80898990798-18127527684-13820923410-87634298088-09696188722-57126942783-21229376041-55087409499-84868981582", pad="09234013725-21861902085-62986870504-46868808475-64122952251") Record : (id=) → (k=, c="23266654172-78195672262-36264075637-94939288146-23645310951-37183821782-68857233719-03327841652-09169517965-20526019272", pad="72521203537-87305696795-36845341458-79422297727-89248574761") Record : (id=) → (k=, c="38423913511-71623847994-68618244490-86589321139-77132624675-92398243198-54892244775-51156020613-11419752608-78874205780", pad="79447375504-29813460505-34699095586-42852971172-10094297988") Record : (id=) → (k=, c="52101984189-39229076175-04316910553-64297530658-96446154615-15344967034-76614845754-87528921307-64652782110-03909494474", pad="30363008196-82587212701-32548750678-55550447232-82627277050") Record : (id=) → (k=, c="60401506099-53488453875-83999629965-15055549870-48449782366-42360013702-73918593804-33127766677-37977797336-72110586674", pad="91361291187-39343181035-58706528978-28600137866-50235431912") [root@MySQL57M1 :: /data/mysql/mysql3306/data]# [root@MySQL57M1 :: /data/mysql/mysql3306/data]# innodb_space -s ibdata1 -T sbtest/sbtest1 -p page-records
Record : (id=) → (k=, c="87298914175-67019310774-55914766116-99828999777-99586454236-20112561950-04631324345-42297289244-53773772569-18847518165", pad="51641139864-09971760446-48470783437-67945081862-02437170409") Record : (id=) → (k=, c="92379144351-81987843986-60512646961-43351715220-89143263257-35157311208-00971788323-81113388070-51063502831-14585145751", pad="54562744428-58434610050-02640971647-28643258481-82786922223") Record : (id=) → (k=, c="79480787598-39254493988-69786031029-70870874504-39408353161-74914604044-71312408918-90080844569-76683765267-75045254744", pad="66798872943-27202526790-73601971494-14196086682-33205984184") Record : (id=) → (k=, c="76613703975-82648385342-65551565318-48073944213-71095746644-21533359862-02468363964-12827037545-15025918511-99958538641", pad="38546404030-64482612227-79761253030-12629548985-71060525466") Record : (id=) → (k=, c="27517650862-96268857874-14433848856-73786054388-95781750782-17746238114-15483646344-81063380673-29949561587-62048756586", pad="86418789389-75080583550-28788891732-08577340926-95852238449") Record : (id=) → (k=, c="13499442135-63729372612-00275706338-88486676039-41096881141-28185759547-80480437474-69347981661-92232870081-39724037280", pad="54660772003-50838112072-93582421460-90434524209-63516920354") Record : (id=) → (k=, c="79620784849-00009549599-62394242058-63066433982-71035091537-35754137965-86009757471-55756806049-53705417378-55041368810", pad="63548119286-47199979705-42988872119-13070669712-06137073580") Record : (id=) → (k=, c="33283211264-24104569482-49264463192-09788701315-23954673461-86748673406-98818577066-14240275554-97803650262-31630156143", pad="80210283445-13340705489-64221956430-39947049243-74556653233") Record : (id=) → (k=, c="83529629079-37942549488-11187709798-93240515639-48172628293-01762263287-90076192966-92341984336-56589272804-75716525178", pad="14134715187-27217033507-96959210163-63526812993-29261456006") Record : (id=) → (k=, c="28769317254-04610620937-33197663850-06518823866-27538021436-58760267595-46800223318-09591165747-49998359495-80438066644", pad="28997889228-51766953098-77939220474-53869366939-65122058297") Record : (id=) → (k=, c="32972167321-21678283565-66466390078-58658971709-41234554112-81164217010-17369749478-42053792679-91787935893-73897637591", pad="84962785394-67975877825-54938010963-97372544497-10658110844") Record : (id=) → (k=, c="95487528837-46850865997-40704725014-54408638016-53826361046-89364038833-04046942105-18066005022-87589460289-21223164339", pad="41335103059-85552460472-48481785622-06965909863-36628827974") Record : (id=) → (k=, c="44144448828-38741837876-41443995192-83251064406-55334438827-77662225731-08536762638-97753926873-81832829034-78595369790", pad="40656376548-15920620514-89673385654-08014037818-12933490278") Record : (id=) → (k=, c="28092799576-44007252568-97298475370-17983935646-96883601559-37032302110-13467978291-80633123787-54692039428-43594456579", pad="36157782684-31531034792-80519610585-46470205763-00609302773") Record : (id=) → (k=, c="41661884355-04359997856-74148055858-87015057769-70320273831-12909644636-94738459377-75660797476-90352294801-17449377020", pad="26633455577-63943069160-88331246770-21566796168-02314240479")
最后,对于innochecksum --page-type-dump中的garbages是代表什么意思,依然无从着手,为什么只有主键索引的最小page num的garbages才是非0,其他的都是0?
以上,如有错谬, 请不吝指正。
MySQL之innochecksum初探的更多相关文章
- mysql Partition(分区)初探
mysql Partition(分区)初探 表数据量大的时候一般都考虑水平拆分,即所谓的sharding.不过mysql本身具有分区功能,可以实现一定程度 的水平切分. mysql是具有MERG ...
- Mysql查询阻塞初探
第一次值班,报警打电话给我说,数据库复制延时一个多小时,那个时候是半夜啊,但我还是很清醒的起来,开机.vpn.登录.show processlist,结果发现情况是这样的: 红线框表示的是当前每个线程 ...
- Mysql之CentOS初探
1. 卸载mysql 查看CentOS是否已经安装mysql数据库 rpm -qa | grep mysqlrpm -qa | grep MySQL 如果有,则卸载 // --nodeps表示强制rp ...
- Mysql之Windows初探
准备工作 防止原先mysql残留,DOS模式下删除mysql服务 sc delete mysql 或者 进入mysql目录下子目录bin卸载mysql服务 mysqld --remove mysql ...
- [转] mysql分区性能初探
本文转自:http://www.cnblogs.com/acpp/archive/2010/08/09/1795464.html 一, 分区概念 分区允许根据指定的规则,跨文件系统分配单个 ...
- MySQL运行计划初探
-Mysql运行计划总结– 1 运行计划概述 先看看一个运行计划 mysql> explain SELECT * FROM EMP , DAO_OBJECTS t1 , DAO_OBJECTS ...
- 从零开始自学 Java Web
目录: 1.Java JDK下载安装及配置 2.eclipse下载与安装并测试 3.eclipse快捷键 4.Tomcat 下载与安装 5.Tomcat部署Web应用 6.Eclipse中配置Tomc ...
- php 学习笔记之搭建开发环境(mac版)
Mac 系统默认集成了很多开发工具,其中就包括 php 所需要的一些软件工具. 下面我们将搭建最简单的 php 开发环境,每一步都会验证上一步的操作结构,请一步一步跟我一起搭建吧! web 服务器之 ...
- mysql performance_schema 初探
mysql performance_schema 初探: mysql 5.5 版本 新增了一个性能优化的引擎: PERFORMANCE_SCHEMA 这个功能默认是关闭的: 需要设置参数: perf ...
随机推荐
- P3066 [USACO12DEC]逃跑的BarnRunning Away From (树上二分)
题意 给出以1号点为根的一棵有根树,问每个点的子树中与它距离小于等于l的点有多少个. 树上二分.这个做法还是基于树上差分的,也就是对于每一个点uu,我们要找到它向上跳LL的长度最高能够跳到的祖先.(当 ...
- HDU6311 Cover (欧拉路径->无向图有最少用多少条边不重复的路径可以覆盖一个张无向图)
题意:有最少用多少条边不重复的路径可以覆盖一个张无向图 ,输出每条路径的边的序号 , 如果是反向就输出-id. 也就是可以多少次一笔画的方式画完这个无向图. 题解:我们已知最优胜的情况是整个图是欧拉图 ...
- TCP/IP网络通信-数据传输
1.通过网络IP实现数据的传输. 2.服务器端代码 [ 服务端主要通过Socket类来创建一个监听等待客户端连接,服务端发送用send方法,接收用Receive方法] using System.Ne ...
- python 爬虫系列06--古诗文
读书破万卷,下笔如有神 import requests import re def parse_page(url): headers = { 'USer-Agent':'user-agent: Moz ...
- java Folder transform to Source Folder
右键文件夹然后选择Build Path ===>Use as Source Folder 里面的东西现在就可以编译了 然后想要让一个源码包变成一个文件夹的话: 只需要再次右键源码包==>选 ...
- AtCoder Grand Contest 023 E - Inversions
Description 给出长度为 \(n\) 序列 \(A_i\),求出所有长度为 \(n\) 的排列 \(P\),满足 \(P_i<=A_i\),求所有满足条件的 \(P\) 的逆序对数之和 ...
- 深入理解JavaScript系列(22):S.O.L.I.D五大原则之依赖倒置原则DIP
前言 本章我们要讲解的是S.O.L.I.D五大原则JavaScript语言实现的第5篇,依赖倒置原则LSP(The Dependency Inversion Principle ). 英文原文:htt ...
- [转]ASP.NET Core基本原理(11)-管理应用程序状态
本文转自:http://zhuchenglin.me/fundamentals-11-app-state?utm_source=tuicool&utm_medium=referral ASP. ...
- SQL脚本整理系列一 表分区
表分区的目的: 1.把历史数据放到另外一个表里面 可以提高查询效率 当然如果经常查询历史数据和新数据的合并结果集这样做就大大的不好了 2.通过把一个表放到不同的文件,不同的文件再存储到不同的磁盘列阵中 ...
- Javascript怎么跳出循环,嵌套循环。
今天要实现一个功能,在数组a中的每一项,对应数组b中的每一项,如果对应上了就给数组b的checked增加ture属性,如果查找不到就给数组b的checked增加false属性. 如果有哪里写的不对欢迎 ...