声明下Percona Data Recovery Tool for InnoDB工具的问题!(带遇到问题的说明)-You're the best-51CTO博客

首先呢,请各位注意此工具的适用范围:

1)本次应用的恢复工具仅适用与innodb存储引擎,Myisam不支持

2)Truncate tabe 不能恢复

3)Drop table 想也别想了

恢复原理:

对于INNODB存储引擎而言,DELETE操作,不是真正删除物理文件上的行,而是给删除的行添加了一个删除的标记,我们利用此工具找到那些标注了删除标记的行,然后将其存放到一个文本中去,最后通过load data恢复数据;而truncate操作,是直接将数据行清空,并非添加删除标记(查看物理文件,执行truncate的表的ibd文件会缩小,而执行了DELETE的表,甚至比之前大)

正文开始:

1、安装Percona Data Recovery Tool for InnoDB工具

好吧,总是需要先安装一些依赖包啥的

yum -y install ncurses-devel.x86_64

不安此包,会报错的,啥错,忘记写进来了

这是有安装包的情况

rpm -ivh glibc-static-2.17-55.el7.x86_64.rpm --force --nodeps

centos yum

yum install glibc-static
[root@localhost percona-data-recovery-tool-for-innodb-0.5]# yum install glibc-static
Loaded plugins: fastestmirror, langpacks, nvidia
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * elrepo: hkg.mirror.rackspace.com
 * epel: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * nux-dextop: mirror.li.nux.ro
 * updates: mirrors.aliyun.com
Resolving Dependencies
--> Running transaction check
---> Package glibc-static.x86_64 0:2.17-222.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================================================================================================================
 Package                                               Arch                                            Version                                                 Repository                                     Size
===================================================================================================================================================================================================================
Installing:
 glibc-static                                          x86_64                                          2.17-222.el7                                            base                                          1.6 M

Transaction Summary
===================================================================================================================================================================================================================
Install  1 Package

Total download size: 1.6 M
Installed size: 7.6 M
Is this ok [y/d/N]: y
Downloading packages:
glibc-static-2.17-222.el7.x86_64.rpm                                                                                                                                                        | 1.6 MB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : glibc-static-2.17-222.el7.x86_64                                                                                                                                                                1/1 
  Verifying  : glibc-static-2.17-222.el7.x86_64                                                                                                                                                                1/1 

Installed:
  glibc-static.x86_64 0:2.17-222.el7                                                                                                                                                                               

Complete!

不安此包:看看啥报错:

gcc -DHAVE_OFFSET64_T -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE_SOURCE=1 -Wall -O3 -g -I include -I mysql-source/include -I mysql-source/innobase/include -static -lrt -o page_parser page_parser.c lib/tables_dict.o lib/libut.a 

/usr/bin/ld: cannot find -lrt

collect2: ld 返回 1

make: * [page_parser] 错误 1

make 出错: /usr/bin/ld: cannot find -lrt-gchjs-ChinaUnix博客

2、正式配置安装

cd percona-data-recovery-tool-for-innodb-0.5/mysql-source/
./configure
 cd ..
make
\[root@dns1 percona-data-recovery-tool-for-innodb-0.5\]# make 
gcc -I include -I mysql-source/include -I mysql-source/innobase/include -o innochecksum innochecksum.c

gcc  -o ibdconnect ibdconnect.c

最后,没什么ERROR报错信息,就是正常的

3、OK,准备工作已经完成,来恢复你的数据

1)从服务器的层面提取你误删的数据

\[root@dns1 percona-data-recovery-tool-for-innodb-0.5\]# ./page\_parser -5 -f /var/lib/mysql/test/site\_ksteam.ibd
[root@localhost percona-data-recovery-tool-for-innodb-0.5]# ./page_parser -5 -f /mnt1t/mysql_recovery/ims_superdesk_shop_goods.ibd
Opening file: /mnt1t/mysql_recovery/ims_superdesk_shop_goods.ibd:
2065        ID of device containing file
58722100        inode number
33204        protection
1        number of hard links
1000        user ID of owner
1000        group ID of owner
0        device ID (if special file)
62914560        total size, in bytes
4096        blocksize for filesystem I/O
122880        number of blocks allocated
1540292041    time of last access
1540271592    time of last modification
1540292041    time of last status change
62914560    Size to process in bytes
104857600    Disk cache size in bytes
3.29% done. 2018-10-23 18:55:58 ETA(in 00:00 hours). Processing speed: 2068687 B/sec
16.65% done. 2018-10-23 18:55:36 ETA(in 00:00 hours). Processing speed: 8407901 B/sec
32.91% done. 2018-10-23 18:55:35 ETA(in 00:00 hours). Processing speed: 10226471 B/sec
43.29% done. 2018-10-23 18:55:37 ETA(in 00:00 hours). Processing speed: 6532560 B/sec
52.16% done. 2018-10-23 18:55:38 ETA(in 00:00 hours). Processing speed: 5581799 B/sec
60.17% done. 2018-10-23 18:55:38 ETA(in 00:00 hours). Processing speed: 5039744 B/sec
64.37% done. 2018-10-23 18:55:43 ETA(in 00:00 hours). Processing speed: 2641597 B/sec
70.81% done. 2018-10-23 18:55:40 ETA(in 00:00 hours). Processing speed: 4050286 B/sec
76.08% done. 2018-10-23 18:55:41 ETA(in 00:00 hours). Processing speed: 3313624 B/sec
83.38% done. 2018-10-23 18:55:40 ETA(in 00:00 hours). Processing speed: 4593638 B/sec
89.08% done. 2018-10-23 18:55:40 ETA(in 00:00 hours). Processing speed: 3587535 B/sec
92.44% done. 2018-10-23 18:55:42 ETA(in 00:00 hours). Processing speed: 2117094 B/sec
95.82% done. 2018-10-23 18:55:42 ETA(in 00:00 hours). Processing speed: 2122558 B/sec
99.19% done. 2018-10-23 18:55:42 ETA(in 00:00 hours). Processing speed: 2118950 B/sec

[root@dns1 percona-data-recovery-tool-for-innodb-0.5]# ls

check_data.c          create_defs.pl  ibdconnect    incrementalupdate.c  INSTALL   mysql-source   pages-1494339302  split_dump.pl

constraints_parser    docs            ibdconnect.c  innochecksum         lib       page_parser    pages-1494339674  tables_dict.c

[root@localhost percona-data-recovery-tool-for-innodb-0.5]# ll
total 3304
-rwxrwxrwx  1  510 wheel    6269 Aug 28  2011 check_data.c
-rwxr-xr-x  1 root root   777976 Oct 23 18:53 constraints_parser
-rwxrwxrwx  1  510 wheel   22172 Aug 28  2011 constraints_parser.c
-rwxrwxrwx  1  510 wheel   12051 Aug 28  2011 create_defs.pl
drwxrwxrwx  2  510 wheel    4096 Aug 28  2011 docs
-rwxrwxrwx  1  510 wheel    1978 Aug 28  2011 fetch_data.sh
-rwxr-xr-x  1 root root   982552 Oct 23 18:45 ibdconnect
-rwxrwxrwx  1  510 wheel   12200 Aug 28  2011 ibdconnect.c
drwxrwxrwx  2  510 wheel    4096 Aug 28  2011 include
-rwxrwxrwx  1  510 wheel    8262 Aug 28  2011 incrementalupdate.c
-rwxr-xr-x  1 root root    17960 Oct 23 18:45 innochecksum
-rwxrwxrwx  1  510 wheel    9117 Aug 28  2011 innochecksum.c
-rwxrwxrwx  1  510 wheel      74 Aug 28  2011 INSTALL
drwxr-xr-x  2 root root     4096 Oct 23 18:53 lib
-rwxrwxrwx  1  510 wheel    2676 Aug 28  2011 Makefile
drwxrwxrwx 40  510 wheel    4096 Oct 23 18:44 mysql-source
-rwxr-xr-x  1 root root  1448832 Oct 23 18:53 page_parser
-rwxrwxrwx  1  510 wheel   15239 Aug 28  2011 page_parser.c
drwxr-xr-x  4 root root     4096 Oct 23 18:55 pages-1540292128
-rwxrwxrwx  1  510 wheel   10608 Aug 28  2011 print_data.c
-rwxrwxrwx  1  510 wheel     302 Aug 28  2011 split_dump.pl
-rwxrwxrwx  1  510 wheel    2046 Aug 28  2011 tables_dict.c

[root@dns1 percona-data-recovery-tool-for-innodb-0.5]# ls pages-1494339302/FIL_PAGE_INDEX/
0-2475  0-2476  0-2477

[root@localhost percona-data-recovery-tool-for-innodb-0.5]# ll pages-1540292128/FIL_PAGE_INDEX/
total 160
drwxr-xr-x 2 root root 81920 Oct 23 18:55 0-273
drwxr-xr-x 2 root root  4096 Oct 23 18:55 0-279
drwxr-xr-x 2 root root  4096 Oct 23 18:55 0-280
drwxr-xr-x 2 root root  4096 Oct 23 18:55 0-281
drwxr-xr-x 2 root root  4096 Oct 23 18:55 0-282
drwxr-xr-x 2 root root  4096 Oct 23 18:55 0-283
drwxr-xr-x 2 root root  4096 Oct 23 18:55 0-284
drwxr-xr-x 2 root root  4096 Oct 23 18:55 0-285
drwxr-xr-x 2 root root  4096 Oct 23 18:55 0-286
drwxr-xr-x 2 root root  4096 Oct 23 18:55 0-287
drwxr-xr-x 2 root root  4096 Oct 23 18:55 0-288
drwxr-xr-x 2 root root  4096 Oct 23 18:55 0-289
drwxr-xr-x 2 root root  4096 Oct 23 18:55 0-290
drwxr-xr-x 2 root root  4096 Oct 23 18:55 0-291
drwxr-xr-x 2 root root  4096 Oct 23 18:55 0-292
drwxr-xr-x 2 root root  4096 Oct 23 18:55 0-293
drwxr-xr-x 2 root root  4096 Oct 23 18:55 0-294
drwxr-xr-x 2 root root  4096 Oct 23 18:55 0-295
drwxr-xr-x 2 root root  4096 Oct 23 18:55 0-296
drwxr-xr-x 2 root root  4096 Oct 23 18:55 0-297
drwxr-xr-x 2 root root  4096 Oct 23 18:55 0-298

在FIL_PAGE_INDEX目录下会生成主键和索引,数据最小的是主键,后面的依次是每个列的索引,如0-2475是site_ksteam表的主键,0-2476是表的索引

2)生成site_ksteam表的表结构:

[root@dns1percona-data-recovery-tool-for-innodb-0.5]# ./create_defs.pl --host localhost --port 3306 --user root --password 123456 --db test --table site_ksteam > include/table_defs.h  正常情况下没有任何的报错

实际

[root@localhost percona-data-recovery-tool-for-innodb-0.5]# ./create_defs.pl --host localhost --port 3306 --user root --password fuckyou888168998 --db shop_welfare_20180912 --table ims_superdesk_shop_goods > include/table_defs.h

结果

[root@localhost percona-data-recovery-tool-for-innodb-0.5]# ./create_defs.pl --host localhost --port 3306 --user root --password fuckyou888168998 --db shop_welfare_20180912 --table ims_superdesk_shop_goods 
#ifndef table_defs_h
#define table_defs_h

// Table definitions
table_def_t table_definitions[] = {
    {
        name: "ims_superdesk_shop_goods",
        {
            { /* int(11) */
                name: "id",
                type: FT_INT,
                fixed_length: 4,

                has_limits: FALSE,
                limits: {
                    can_be_null: FALSE,
                    int_min_val: -2147483648LL,
                    int_max_val: 2147483647LL
                },

                can_be_null: FALSE
            },
            { /*  */
                name: "DB_TRX_ID",
                type: FT_INTERNAL,
                fixed_length: 6,

                can_be_null: FALSE
            },
            { /*  */
                name: "DB_ROLL_PTR",
                type: FT_INTERNAL,
                fixed_length: 7,

                can_be_null: FALSE
            },
            { /* int(11) */
                name: "uniacid",
                type: FT_INT,
                fixed_length: 4,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -2147483648LL,
                    int_max_val: 2147483647LL
                },

                can_be_null: TRUE
            },
            { /* int(11) */
                name: "merchid",
                type: FT_INT,
                fixed_length: 4,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -2147483648LL,
                    int_max_val: 2147483647LL
                },

                can_be_null: TRUE
            },
            { /* int(11) */
                name: "pcate",
                type: FT_INT,
                fixed_length: 4,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -2147483648LL,
                    int_max_val: 2147483647LL
                },

                can_be_null: TRUE
            },
            { /* int(11) */
                name: "ccate",
                type: FT_INT,
                fixed_length: 4,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -2147483648LL,
                    int_max_val: 2147483647LL
                },

                can_be_null: TRUE
            },
            { /* int(11) */
                name: "tcate",
                type: FT_INT,
                fixed_length: 4,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -2147483648LL,
                    int_max_val: 2147483647LL
                },

                can_be_null: TRUE
            },
            { /* text */
                name: "cates",
                type: FT_TEXT,
                min_length: 0,
                max_length: 65535,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 65535,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* text */
                name: "pcates",
                type: FT_TEXT,
                min_length: 0,
                max_length: 65535,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 65535,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* text */
                name: "ccates",
                type: FT_TEXT,
                min_length: 0,
                max_length: 65535,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 65535,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* text */
                name: "tcates",
                type: FT_TEXT,
                min_length: 0,
                max_length: 65535,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 65535,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* tinyint(2) */
                name: "type",
                type: FT_UINT,
                fixed_length: 1,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    uint_min_val: 0,
                    uint_max_val: 255
                },

                can_be_null: TRUE
            },
            { /* tinyint(1) */
                name: "status",
                type: FT_INT,
                fixed_length: 1,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -128,
                    int_max_val: 127
                },

                can_be_null: TRUE
            },
            { /* int(11) */
                name: "displayorder",
                type: FT_INT,
                fixed_length: 4,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -2147483648LL,
                    int_max_val: 2147483647LL
                },

                can_be_null: TRUE
            },
            { /* varchar(100) */
                name: "title",
                type: FT_CHAR,
                min_length: 0,
                max_length: 300,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 300,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* varchar(255) */
                name: "thumb",
                type: FT_CHAR,
                min_length: 0,
                max_length: 765,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 765,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* varchar(5) */
                name: "unit",
                type: FT_CHAR,
                min_length: 0,
                max_length: 15,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 15,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* varchar(1000) */
                name: "description",
                type: FT_CHAR,
                min_length: 0,
                max_length: 3000,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 3000,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* text */
                name: "content",
                type: FT_TEXT,
                min_length: 0,
                max_length: 65535,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 65535,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* varchar(50) */
                name: "goodssn",
                type: FT_CHAR,
                min_length: 0,
                max_length: 150,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 150,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* varchar(50) */
                name: "productsn",
                type: FT_CHAR,
                min_length: 0,
                max_length: 150,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 150,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* decimal(10,2) */
                name: "productprice",
                type: FT_DECIMAL,
                fixed_length: 5,

                decimal_precision: 10,
                decimal_digits: 2,
                can_be_null: TRUE
            },
            { /* decimal(10,2) */
                name: "marketprice",
                type: FT_DECIMAL,
                fixed_length: 5,

                decimal_precision: 10,
                decimal_digits: 2,
                can_be_null: TRUE
            },
            { /* decimal(10,2) */
                name: "costprice",
                type: FT_DECIMAL,
                fixed_length: 5,

                decimal_precision: 10,
                decimal_digits: 2,
                can_be_null: TRUE
            },
            { /* decimal(10,2) */
                name: "originalprice",
                type: FT_DECIMAL,
                fixed_length: 5,

                decimal_precision: 10,
                decimal_digits: 2,
                can_be_null: TRUE
            },
            { /* int(10) */
                name: "total",
                type: FT_UINT,
                fixed_length: 4,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    uint_min_val: 0,
                    uint_max_val: 4294967295ULL
                },

                can_be_null: TRUE
            },
            { /* int(11) */
                name: "totalcnf",
                type: FT_INT,
                fixed_length: 4,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -2147483648LL,
                    int_max_val: 2147483647LL
                },

                can_be_null: TRUE
            },
            { /* int(11) */
                name: "sales",
                type: FT_INT,
                fixed_length: 4,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -2147483648LL,
                    int_max_val: 2147483647LL
                },

                can_be_null: TRUE
            },
            { /* int(11) */
                name: "salesreal",
                type: FT_INT,
                fixed_length: 4,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -2147483648LL,
                    int_max_val: 2147483647LL
                },

                can_be_null: TRUE
            },
            { /* varchar(5000) */
                name: "spec",
                type: FT_CHAR,
                min_length: 0,
                max_length: 15000,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 15000,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* decimal(10,2) */
                name: "weight",
                type: FT_DECIMAL,
                fixed_length: 5,

                decimal_precision: 10,
                decimal_digits: 2,
                can_be_null: TRUE
            },
            { /* varchar(255) */
                name: "credit",
                type: FT_CHAR,
                min_length: 0,
                max_length: 765,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 765,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* int(11) */
                name: "maxbuy",
                type: FT_INT,
                fixed_length: 4,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -2147483648LL,
                    int_max_val: 2147483647LL
                },

                can_be_null: TRUE
            },
            { /* int(11) */
                name: "usermaxbuy",
                type: FT_INT,
                fixed_length: 4,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -2147483648LL,
                    int_max_val: 2147483647LL
                },

                can_be_null: TRUE
            },
            { /* int(11) */
                name: "hasoption",
                type: FT_INT,
                fixed_length: 4,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -2147483648LL,
                    int_max_val: 2147483647LL
                },

                can_be_null: TRUE
            },
            { /* int(11) */
                name: "dispatch",
                type: FT_INT,
                fixed_length: 4,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -2147483648LL,
                    int_max_val: 2147483647LL
                },

                can_be_null: TRUE
            },
            { /* text */
                name: "thumb_url",
                type: FT_TEXT,
                min_length: 0,
                max_length: 65535,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 65535,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* tinyint(1) */
                name: "isnew",
                type: FT_INT,
                fixed_length: 1,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -128,
                    int_max_val: 127
                },

                can_be_null: TRUE
            },
            { /* tinyint(1) */
                name: "ishot",
                type: FT_INT,
                fixed_length: 1,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -128,
                    int_max_val: 127
                },

                can_be_null: TRUE
            },
            { /* tinyint(1) */
                name: "isdiscount",
                type: FT_INT,
                fixed_length: 1,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -128,
                    int_max_val: 127
                },

                can_be_null: TRUE
            },
            { /* tinyint(1) */
                name: "isrecommand",
                type: FT_INT,
                fixed_length: 1,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -128,
                    int_max_val: 127
                },

                can_be_null: TRUE
            },
            { /* tinyint(1) */
                name: "issendfree",
                type: FT_INT,
                fixed_length: 1,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -128,
                    int_max_val: 127
                },

                can_be_null: TRUE
            },
            { /* tinyint(1) */
                name: "istime",
                type: FT_INT,
                fixed_length: 1,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -128,
                    int_max_val: 127
                },

                can_be_null: TRUE
            },
            { /* tinyint(1) */
                name: "iscomment",
                type: FT_INT,
                fixed_length: 1,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -128,
                    int_max_val: 127
                },

                can_be_null: TRUE
            },
            { /* int(11) */
                name: "timestart",
                type: FT_INT,
                fixed_length: 4,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -2147483648LL,
                    int_max_val: 2147483647LL
                },

                can_be_null: TRUE
            },
            { /* int(11) */
                name: "timeend",
                type: FT_INT,
                fixed_length: 4,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -2147483648LL,
                    int_max_val: 2147483647LL
                },

                can_be_null: TRUE
            },
            { /* int(11) */
                name: "viewcount",
                type: FT_INT,
                fixed_length: 4,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -2147483648LL,
                    int_max_val: 2147483647LL
                },

                can_be_null: TRUE
            },
            { /* tinyint(3) */
                name: "hascommission",
                type: FT_INT,
                fixed_length: 1,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -128,
                    int_max_val: 127
                },

                can_be_null: TRUE
            },
            { /* decimal(10,2) */
                name: "commission1_rate",
                type: FT_DECIMAL,
                fixed_length: 5,

                decimal_precision: 10,
                decimal_digits: 2,
                can_be_null: TRUE
            },
            { /* decimal(10,2) */
                name: "commission1_pay",
                type: FT_DECIMAL,
                fixed_length: 5,

                decimal_precision: 10,
                decimal_digits: 2,
                can_be_null: TRUE
            },
            { /* decimal(10,2) */
                name: "commission2_rate",
                type: FT_DECIMAL,
                fixed_length: 5,

                decimal_precision: 10,
                decimal_digits: 2,
                can_be_null: TRUE
            },
            { /* decimal(10,2) */
                name: "commission2_pay",
                type: FT_DECIMAL,
                fixed_length: 5,

                decimal_precision: 10,
                decimal_digits: 2,
                can_be_null: TRUE
            },
            { /* decimal(10,2) */
                name: "commission3_rate",
                type: FT_DECIMAL,
                fixed_length: 5,

                decimal_precision: 10,
                decimal_digits: 2,
                can_be_null: TRUE
            },
            { /* decimal(10,2) */
                name: "commission3_pay",
                type: FT_DECIMAL,
                fixed_length: 5,

                decimal_precision: 10,
                decimal_digits: 2,
                can_be_null: TRUE
            },
            { /* decimal(10,2) */
                name: "score",
                type: FT_DECIMAL,
                fixed_length: 5,

                decimal_precision: 10,
                decimal_digits: 2,
                can_be_null: TRUE
            },
            { /* varchar(255) */
                name: "taobaoid",
                type: FT_CHAR,
                min_length: 0,
                max_length: 765,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 765,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* varchar(255) */
                name: "taotaoid",
                type: FT_CHAR,
                min_length: 0,
                max_length: 765,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 765,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* varchar(255) */
                name: "taobaourl",
                type: FT_CHAR,
                min_length: 0,
                max_length: 765,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 765,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* varchar(255) */
                name: "share_title",
                type: FT_CHAR,
                min_length: 0,
                max_length: 765,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 765,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* varchar(255) */
                name: "share_icon",
                type: FT_CHAR,
                min_length: 0,
                max_length: 765,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 765,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* tinyint(3) */
                name: "cash",
                type: FT_INT,
                fixed_length: 1,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -128,
                    int_max_val: 127
                },

                can_be_null: TRUE
            },
            { /* varchar(255) */
                name: "commission_thumb",
                type: FT_CHAR,
                min_length: 0,
                max_length: 765,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 765,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* tinyint(3) */
                name: "isnodiscount",
                type: FT_INT,
                fixed_length: 1,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -128,
                    int_max_val: 127
                },

                can_be_null: TRUE
            },
            { /* text */
                name: "showlevels",
                type: FT_TEXT,
                min_length: 0,
                max_length: 65535,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 65535,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* text */
                name: "buylevels",
                type: FT_TEXT,
                min_length: 0,
                max_length: 65535,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 65535,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* text */
                name: "showgroups",
                type: FT_TEXT,
                min_length: 0,
                max_length: 65535,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 65535,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* text */
                name: "buygroups",
                type: FT_TEXT,
                min_length: 0,
                max_length: 65535,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 65535,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* tinyint(3) */
                name: "isverify",
                type: FT_INT,
                fixed_length: 1,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -128,
                    int_max_val: 127
                },

                can_be_null: TRUE
            },
            { /* text */
                name: "storeids",
                type: FT_TEXT,
                min_length: 0,
                max_length: 65535,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 65535,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* varchar(255) */
                name: "noticeopenid",
                type: FT_CHAR,
                min_length: 0,
                max_length: 765,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 765,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* text */
                name: "noticetype",
                type: FT_TEXT,
                min_length: 0,
                max_length: 65535,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 65535,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* tinyint(3) */
                name: "needfollow",
                type: FT_INT,
                fixed_length: 1,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -128,
                    int_max_val: 127
                },

                can_be_null: TRUE
            },
            { /* varchar(255) */
                name: "followtip",
                type: FT_CHAR,
                min_length: 0,
                max_length: 765,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 765,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* varchar(255) */
                name: "followurl",
                type: FT_CHAR,
                min_length: 0,
                max_length: 765,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 765,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* decimal(10,2) */
                name: "deduct",
                type: FT_DECIMAL,
                fixed_length: 5,

                decimal_precision: 10,
                decimal_digits: 2,
                can_be_null: TRUE
            },
            { /* int(11) */
                name: "virtual",
                type: FT_INT,
                fixed_length: 4,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -2147483648LL,
                    int_max_val: 2147483647LL
                },

                can_be_null: TRUE
            },
            { /* text */
                name: "discounts",
                type: FT_TEXT,
                min_length: 0,
                max_length: 65535,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 65535,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* tinyint(3) */
                name: "nocommission",
                type: FT_INT,
                fixed_length: 1,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -128,
                    int_max_val: 127
                },

                can_be_null: TRUE
            },
            { /* tinyint(3) */
                name: "hidecommission",
                type: FT_INT,
                fixed_length: 1,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -128,
                    int_max_val: 127
                },

                can_be_null: TRUE
            },
            { /* int(11) */
                name: "artid",
                type: FT_INT,
                fixed_length: 4,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -2147483648LL,
                    int_max_val: 2147483647LL
                },

                can_be_null: TRUE
            },
            { /* varchar(255) */
                name: "detail_logo",
                type: FT_CHAR,
                min_length: 0,
                max_length: 765,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 765,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* varchar(255) */
                name: "detail_shopname",
                type: FT_CHAR,
                min_length: 0,
                max_length: 765,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 765,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* varchar(255) */
                name: "detail_btntext1",
                type: FT_CHAR,
                min_length: 0,
                max_length: 765,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 765,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* varchar(255) */
                name: "detail_btnurl1",
                type: FT_CHAR,
                min_length: 0,
                max_length: 765,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 765,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* varchar(255) */
                name: "detail_btntext2",
                type: FT_CHAR,
                min_length: 0,
                max_length: 765,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 765,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* varchar(255) */
                name: "detail_btnurl2",
                type: FT_CHAR,
                min_length: 0,
                max_length: 765,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 765,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* varchar(255) */
                name: "detail_totaltitle",
                type: FT_CHAR,
                min_length: 0,
                max_length: 765,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 765,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* decimal(10,2) */
                name: "deduct2",
                type: FT_DECIMAL,
                fixed_length: 5,

                decimal_precision: 10,
                decimal_digits: 2,
                can_be_null: TRUE
            },
            { /* int(11) */
                name: "ednum",
                type: FT_INT,
                fixed_length: 4,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -2147483648LL,
                    int_max_val: 2147483647LL
                },

                can_be_null: TRUE
            },
            { /* decimal(10,2) */
                name: "edmoney",
                type: FT_DECIMAL,
                fixed_length: 5,

                decimal_precision: 10,
                decimal_digits: 2,
                can_be_null: TRUE
            },
            { /* text */
                name: "edareas",
                type: FT_TEXT,
                min_length: 0,
                max_length: 65535,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 65535,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* tinyint(1) */
                name: "diyformtype",
                type: FT_INT,
                fixed_length: 1,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -128,
                    int_max_val: 127
                },

                can_be_null: TRUE
            },
            { /* int(11) */
                name: "diyformid",
                type: FT_INT,
                fixed_length: 4,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -2147483648LL,
                    int_max_val: 2147483647LL
                },

                can_be_null: TRUE
            },
            { /* tinyint(1) */
                name: "diymode",
                type: FT_INT,
                fixed_length: 1,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -128,
                    int_max_val: 127
                },

                can_be_null: TRUE
            },
            { /* tinyint(1) */
                name: "dispatchtype",
                type: FT_INT,
                fixed_length: 1,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -128,
                    int_max_val: 127
                },

                can_be_null: TRUE
            },
            { /* int(11) */
                name: "dispatchid",
                type: FT_INT,
                fixed_length: 4,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -2147483648LL,
                    int_max_val: 2147483647LL
                },

                can_be_null: TRUE
            },
            { /* decimal(10,2) */
                name: "dispatchprice",
                type: FT_DECIMAL,
                fixed_length: 5,

                decimal_precision: 10,
                decimal_digits: 2,
                can_be_null: TRUE
            },
            { /* tinyint(1) */
                name: "manydeduct",
                type: FT_INT,
                fixed_length: 1,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -128,
                    int_max_val: 127
                },

                can_be_null: TRUE
            },
            { /* varchar(255) */
                name: "shorttitle",
                type: FT_CHAR,
                min_length: 0,
                max_length: 765,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 765,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* varchar(255) */
                name: "isdiscount_title",
                type: FT_CHAR,
                min_length: 0,
                max_length: 765,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 765,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* int(11) */
                name: "isdiscount_time",
                type: FT_INT,
                fixed_length: 4,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -2147483648LL,
                    int_max_val: 2147483647LL
                },

                can_be_null: TRUE
            },
            { /* text */
                name: "isdiscount_discounts",
                type: FT_TEXT,
                min_length: 0,
                max_length: 65535,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 65535,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* text */
                name: "commission",
                type: FT_TEXT,
                min_length: 0,
                max_length: 65535,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 65535,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* int(11) */
                name: "shopid",
                type: FT_INT,
                fixed_length: 4,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -2147483648LL,
                    int_max_val: 2147483647LL
                },

                can_be_null: TRUE
            },
            { /* text */
                name: "allcates",
                type: FT_TEXT,
                min_length: 0,
                max_length: 65535,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 65535,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* int(11) */
                name: "minbuy",
                type: FT_INT,
                fixed_length: 4,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -2147483648LL,
                    int_max_val: 2147483647LL
                },

                can_be_null: TRUE
            },
            { /* tinyint(3) */
                name: "invoice",
                type: FT_INT,
                fixed_length: 1,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -128,
                    int_max_val: 127
                },

                can_be_null: TRUE
            },
            { /* tinyint(3) */
                name: "repair",
                type: FT_INT,
                fixed_length: 1,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -128,
                    int_max_val: 127
                },

                can_be_null: TRUE
            },
            { /* tinyint(3) */
                name: "seven",
                type: FT_INT,
                fixed_length: 1,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -128,
                    int_max_val: 127
                },

                can_be_null: TRUE
            },
            { /* varchar(255) */
                name: "money",
                type: FT_CHAR,
                min_length: 0,
                max_length: 765,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 765,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* decimal(10,2) */
                name: "minprice",
                type: FT_DECIMAL,
                fixed_length: 5,

                decimal_precision: 10,
                decimal_digits: 2,
                can_be_null: TRUE
            },
            { /* decimal(10,2) */
                name: "maxprice",
                type: FT_DECIMAL,
                fixed_length: 5,

                decimal_precision: 10,
                decimal_digits: 2,
                can_be_null: TRUE
            },
            { /* varchar(255) */
                name: "province",
                type: FT_CHAR,
                min_length: 0,
                max_length: 765,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 765,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* varchar(255) */
                name: "city",
                type: FT_CHAR,
                min_length: 0,
                max_length: 765,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 765,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* tinyint(1) */
                name: "buyshow",
                type: FT_INT,
                fixed_length: 1,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -128,
                    int_max_val: 127
                },

                can_be_null: TRUE
            },
            { /* text */
                name: "buycontent",
                type: FT_TEXT,
                min_length: 0,
                max_length: 65535,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 65535,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* tinyint(1) */
                name: "virtualsend",
                type: FT_INT,
                fixed_length: 1,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -128,
                    int_max_val: 127
                },

                can_be_null: TRUE
            },
            { /* text */
                name: "virtualsendcontent",
                type: FT_TEXT,
                min_length: 0,
                max_length: 65535,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 65535,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* tinyint(1) */
                name: "verifytype",
                type: FT_INT,
                fixed_length: 1,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -128,
                    int_max_val: 127
                },

                can_be_null: TRUE
            },
            { /* text */
                name: "diyfields",
                type: FT_TEXT,
                min_length: 0,
                max_length: 65535,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 65535,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* int(11) */
                name: "diysaveid",
                type: FT_INT,
                fixed_length: 4,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -2147483648LL,
                    int_max_val: 2147483647LL
                },

                can_be_null: TRUE
            },
            { /* tinyint(1) */
                name: "diysave",
                type: FT_INT,
                fixed_length: 1,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -128,
                    int_max_val: 127
                },

                can_be_null: TRUE
            },
            { /* tinyint(3) */
                name: "quality",
                type: FT_INT,
                fixed_length: 1,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -128,
                    int_max_val: 127
                },

                can_be_null: TRUE
            },
            { /* tinyint(1) unsigned */
                name: "groupstype",
                type: FT_UINT,
                fixed_length: 1,

                has_limits: FALSE,
                limits: {
                    can_be_null: FALSE,
                    uint_min_val: 0,
                    uint_max_val: 255
                },

                can_be_null: FALSE
            },
            { /* tinyint(1) unsigned */
                name: "showtotal",
                type: FT_UINT,
                fixed_length: 1,

                has_limits: FALSE,
                limits: {
                    can_be_null: FALSE,
                    uint_min_val: 0,
                    uint_max_val: 255
                },

                can_be_null: FALSE
            },
            { /* varchar(255) */
                name: "subtitle",
                type: FT_CHAR,
                min_length: 0,
                max_length: 765,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 765,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* tinyint(1) */
                name: "sharebtn",
                type: FT_INT,
                fixed_length: 1,

                has_limits: FALSE,
                limits: {
                    can_be_null: FALSE,
                    int_min_val: -128,
                    int_max_val: 127
                },

                can_be_null: FALSE
            },
            { /* tinyint(3) */
                name: "checked",
                type: FT_INT,
                fixed_length: 1,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -128,
                    int_max_val: 127
                },

                can_be_null: TRUE
            },
            { /* tinyint(3) */
                name: "thumb_first",
                type: FT_INT,
                fixed_length: 1,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -128,
                    int_max_val: 127
                },

                can_be_null: TRUE
            },
            { /* text */
                name: "catesinit3",
                type: FT_TEXT,
                min_length: 0,
                max_length: 65535,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 65535,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* tinyint(1) */
                name: "showtotaladd",
                type: FT_INT,
                fixed_length: 1,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -128,
                    int_max_val: 127
                },

                can_be_null: TRUE
            },
            { /* tinyint(1) */
                name: "merchsale",
                type: FT_INT,
                fixed_length: 1,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -128,
                    int_max_val: 127
                },

                can_be_null: TRUE
            },
            { /* varchar(255) */
                name: "keywords",
                type: FT_CHAR,
                min_length: 0,
                max_length: 765,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 765,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* varchar(255) */
                name: "catch_id",
                type: FT_CHAR,
                min_length: 0,
                max_length: 765,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 765,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* varchar(255) */
                name: "catch_url",
                type: FT_CHAR,
                min_length: 0,
                max_length: 765,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 765,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* varchar(255) */
                name: "catch_source",
                type: FT_CHAR,
                min_length: 0,
                max_length: 765,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 765,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* tinyint(1) */
                name: "minpriceupdated",
                type: FT_INT,
                fixed_length: 1,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -128,
                    int_max_val: 127
                },

                can_be_null: TRUE
            },
            { /* text */
                name: "labelname",
                type: FT_TEXT,
                min_length: 0,
                max_length: 65535,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 65535,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* int(11) */
                name: "autoreceive",
                type: FT_INT,
                fixed_length: 4,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -2147483648LL,
                    int_max_val: 2147483647LL
                },

                can_be_null: TRUE
            },
            { /* tinyint(3) */
                name: "cannotrefund",
                type: FT_INT,
                fixed_length: 1,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -128,
                    int_max_val: 127
                },

                can_be_null: TRUE
            },
            { /* int(11) */
                name: "bargain",
                type: FT_INT,
                fixed_length: 4,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -2147483648LL,
                    int_max_val: 2147483647LL
                },

                can_be_null: TRUE
            },
            { /* decimal(10,2) */
                name: "buyagain",
                type: FT_DECIMAL,
                fixed_length: 5,

                decimal_precision: 10,
                decimal_digits: 2,
                can_be_null: TRUE
            },
            { /* int(11) */
                name: "diypage",
                type: FT_INT,
                fixed_length: 4,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -2147483648LL,
                    int_max_val: 2147483647LL
                },

                can_be_null: TRUE
            },
            { /* tinyint(1) */
                name: "buyagain_islong",
                type: FT_INT,
                fixed_length: 1,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -128,
                    int_max_val: 127
                },

                can_be_null: TRUE
            },
            { /* tinyint(1) */
                name: "buyagain_condition",
                type: FT_INT,
                fixed_length: 1,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -128,
                    int_max_val: 127
                },

                can_be_null: TRUE
            },
            { /* tinyint(1) */
                name: "buyagain_sale",
                type: FT_INT,
                fixed_length: 1,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -128,
                    int_max_val: 127
                },

                can_be_null: TRUE
            },
            { /* text */
                name: "buyagain_commission",
                type: FT_TEXT,
                min_length: 0,
                max_length: 65535,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    char_min_len: 0,
                    char_max_len: 65535,
                    char_ascii_only: TRUE
                },

                can_be_null: TRUE
            },
            { /* int(11) */
                name: "jd_vop_sku",
                type: FT_INT,
                fixed_length: 4,

                has_limits: FALSE,
                limits: {
                    can_be_null: FALSE,
                    int_min_val: -2147483648LL,
                    int_max_val: 2147483647LL
                },

                can_be_null: FALSE
            },
            { /* varchar(16) */
                name: "jd_vop_page_num",
                type: FT_CHAR,
                min_length: 0,
                max_length: 48,

                has_limits: FALSE,
                limits: {
                    can_be_null: FALSE,
                    char_min_len: 0,
                    char_max_len: 48,
                    char_ascii_only: TRUE
                },

                can_be_null: FALSE
            },
            { /* int(11) */
                name: "old_shop_goods_id",
                type: FT_INT,
                fixed_length: 4,

                has_limits: FALSE,
                limits: {
                    can_be_null: FALSE,
                    int_min_val: -2147483648LL,
                    int_max_val: 2147483647LL
                },

                can_be_null: FALSE
            },
            { /* int(11) */
                name: "createtime",
                type: FT_INT,
                fixed_length: 4,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -2147483648LL,
                    int_max_val: 2147483647LL
                },

                can_be_null: TRUE
            },
            { /* int(11) */
                name: "updatetime",
                type: FT_INT,
                fixed_length: 4,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -2147483648LL,
                    int_max_val: 2147483647LL
                },

                can_be_null: TRUE
            },
            { /* tinyint(3) */
                name: "deleted",
                type: FT_INT,
                fixed_length: 1,

                has_limits: FALSE,
                limits: {
                    can_be_null: TRUE,
                    int_min_val: -128,
                    int_max_val: 127
                },

                can_be_null: TRUE
            },
            { /* int(11) */
                name: "synctime_jd_vop_price",
                type: FT_INT,
                fixed_length: 4,

                has_limits: FALSE,
                limits: {
                    can_be_null: FALSE,
                    int_min_val: -2147483648LL,
                    int_max_val: 2147483647LL
                },

                can_be_null: FALSE
            },
            { type: FT_NONE }
        }
    },
};

#endif

可能出现的错误

[root@localhost percona-data-recovery-tool-for-innodb-0.5]# ./create_defs.pl --host localhost --port 3306 --user root --password fuckyou888168998 --db db_super_desk --table ims_superdesk_shop_goods > include/table_defs.h
DBI connect('database=db_super_desk;host=localhost;port=3306','root',...) failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) at ./create_defs.pl line 37.
[root@localhost percona-data-recovery-tool-for-innodb-0.5]# ./create_defs.pl --host localhost --port 3306 --user root --password fuckyou888168998 --db db_super_desk --table ims_superdesk_shop_goods 
DBI connect('database=db_super_desk;host=localhost;port=3306','root',...) failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) at ./create_defs.pl line 37.
Error: Can't connect to mysql!
Usage: ./create_defs.pl [options]
Where options are:
    --host     - mysql host
    --port     - mysql port
    --user     - mysql username
    --password - mysql password
    --db       - mysql database
    --table    - specific table only
    --help     - show this help

解决方法
解决Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’错误 - 似水流年 - CSDN博客

3)还得再次执行make命令

[root@dns1 percona-data-recovery-tool-for-innodb-0.5]# make

gcc -DHAVE_OFFSET64_T -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE_SOURCE=1 -Wall -O3 -g -I include -I mysql-source/include -I mysql-source/innobase/include -static -lrt -o page_parser page_parser.c lib/tables_dict.o lib/libut.a 

最后是这条信息,就是正常的

4)将查找到的数据保存到/tmp/site_ksteam.txt文件

\[root@dns1percona-data-recovery-tool-for-innodb-0.5\]# ./constraints\_parser -D -5 -f pages-1494339674/FIL\_PAGE\_INDEX/0-2351/ > /tmp/site\_ksteam.txt
-D 恢复删除的行;
-5表的文件格式,默认Compact;
-f 指定site_ksteam表的主键目录

LOAD DATA INFILE '/com/percona-data-recovery-tool-for-innodb-0.5/dumps/default/site_ksteam' REPLACE INTO TABLE `site_ksteam` FIELDS TERMINATED BY '\t' OPTIONALLY ENCLOSED BY '"' LINES STARTING BY 'site_ksteam\t' (id, catid, typeid, title, style, thumb, keywords, description, posids, url, listorder, status, sysadd, islink, username, inputtime, updatetime, contact, titles, level, cimage, bimage, language, subject);

5)连接Mysql,将数据导入表中

mysql> LOAD DATA INFILE '/tmp/site_ksteam.txt' REPLACE INTO TABLE `site_ksteam` FIELDS TERMINATED BY '\t' OPTIONALLY ENCLOSED BY '"' LINES STARTING BY 'site_ksteam\t' (id, catid, typeid, title, style, thumb, keywords, description, posids, url, listorder, status, sysadd, islink, username, inputtime, updatetime, contact, titles, level, cimage, bimage, language, subject);

最后呢,还是想吐槽下,开始搞这个工具的时候,网上的资料,呵呵,人云亦云的,也不说中间可能遇到啥问题,怎么解决,最最重要的是, 此工具对在线运行的数据库进行恢复操作,会出现数据丢失现象!!!

到底是我哪里没理解到,还是本是如此,欢迎留言!


Original url: Access
Created at: 2018-10-23 18:49:09
Category: default
Tags: none

请先后发表评论
  • 最新评论
  • 总共0条评论