/*
 Navicat Premium Data Transfer

 Source Server         : mysqllocal
 Source Server Type    : MySQL
 Source Server Version : 50717
 Source Host           : localhost:3306
 Source Schema         : sys

 Target Server Type    : MySQL
 Target Server Version : 50717
 File Encoding         : 65001

 Date: 07/02/2019 23:01:38
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for Access
-- ----------------------------
DROP TABLE IF EXISTS `Access`;
CREATE TABLE `Access` (
  `id` bigint(15) NOT NULL AUTO_INCREMENT COMMENT '唯一标识',
  `schema` varchar(20) NOT NULL DEFAULT 'sys' COMMENT '集合空间',
  `name` varchar(50) NOT NULL COMMENT '实际表名，例如 apijson_user',
  `alias` varchar(20) DEFAULT NULL COMMENT '外部调用的表别名，例如 User',
  `get` varchar(100) NOT NULL DEFAULT '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]' COMMENT '允许 get 的角色列表，例如 ["LOGIN", "CONTACT", "CIRCLE", "OWNER"]\n用 JSON 类型不能设置默认值，反正权限对应的需求是明确的，也不需要自动转 JSONArray。',
  `head` varchar(100) NOT NULL DEFAULT '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]' COMMENT '允许 head 的角色列表，例如 ["LOGIN", "CONTACT", "CIRCLE", "OWNER"]',
  `gets` varchar(100) NOT NULL DEFAULT '["LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]' COMMENT '允许 gets 的角色列表，例如 ["LOGIN", "CONTACT", "CIRCLE", "OWNER"]',
  `heads` varchar(100) NOT NULL DEFAULT '["LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]' COMMENT '允许 heads 的角色列表，例如 ["LOGIN", "CONTACT", "CIRCLE", "OWNER"]',
  `post` varchar(100) NOT NULL DEFAULT '["OWNER", "ADMIN"]' COMMENT '允许 post 的角色列表，例如 ["LOGIN", "CONTACT", "CIRCLE", "OWNER"]',
  `put` varchar(100) NOT NULL DEFAULT '["OWNER", "ADMIN"]' COMMENT '允许 put 的角色列表，例如 ["LOGIN", "CONTACT", "CIRCLE", "OWNER"]',
  `delete` varchar(100) NOT NULL DEFAULT '["OWNER", "ADMIN"]' COMMENT '允许 delete 的角色列表，例如 ["LOGIN", "CONTACT", "CIRCLE", "OWNER"]',
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `name_UNIQUE` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 COMMENT='权限配置';

-- ----------------------------
-- Records of Access
-- ----------------------------
BEGIN;
INSERT INTO `Access` VALUES (1, 'sys', 'Table', NULL, '[\"UNKNOWN\", \"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[\"UNKNOWN\", \"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[\"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[\"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[]', '[]', '[]', '2018-11-28 16:38:14');
INSERT INTO `Access` VALUES (2, 'sys', 'Column', NULL, '[\"UNKNOWN\", \"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[\"UNKNOWN\", \"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[\"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[\"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[]', '[]', '[]', '2018-11-28 16:38:14');
INSERT INTO `Access` VALUES (3, 'sys', 'Request', NULL, '[\"UNKNOWN\", \"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[\"UNKNOWN\", \"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[\"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[\"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[]', '[]', '[]', '2018-11-28 16:38:14');
INSERT INTO `Access` VALUES (4, 'sys', 'Response', NULL, '[\"UNKNOWN\", \"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[\"UNKNOWN\", \"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[\"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[\"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[]', '[]', '[]', '2018-11-28 16:38:15');
INSERT INTO `Access` VALUES (5, 'sys', 'Function', NULL, '[\"UNKNOWN\", \"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[\"UNKNOWN\", \"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[\"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[\"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[]', '[]', '[]', '2018-11-28 16:38:15');
INSERT INTO `Access` VALUES (6, 'sys', 'Document', NULL, '[\"LOGIN\", \"ADMIN\"]', '[\"LOGIN\", \"ADMIN\"]', '[\"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[\"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[\"OWNER\", \"ADMIN\"]', '[\"LOGIN\", \"ADMIN\"]', '[\"OWNER\", \"ADMIN\"]', '2018-11-28 16:38:15');
INSERT INTO `Access` VALUES (7, 'sys', 'Test', NULL, '[\"UNKNOWN\", \"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[\"UNKNOWN\", \"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[\"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[\"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[]', '[]', '[]', '2018-11-28 16:38:15');
INSERT INTO `Access` VALUES (8, 'sys', 'TestRecord', NULL, '[\"LOGIN\", \"ADMIN\"]', '[\"UNKNOWN\", \"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[\"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[\"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[\"OWNER\", \"ADMIN\"]', '[\"OWNER\", \"ADMIN\"]', '[\"OWNER\", \"ADMIN\"]', '2018-11-28 16:38:15');
INSERT INTO `Access` VALUES (11, 'sys', 'apijson_user', 'User', '[\"UNKNOWN\", \"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[\"UNKNOWN\", \"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[\"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[\"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[\"OWNER\", \"ADMIN\"]', '[\"OWNER\", \"ADMIN\"]', '[\"OWNER\", \"ADMIN\"]', '2018-11-28 16:28:53');
INSERT INTO `Access` VALUES (12, 'sys', 'apijson_privacy', 'Privacy', '[\"UNKNOWN\", \"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[\"UNKNOWN\", \"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[\"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[\"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[\"OWNER\", \"ADMIN\"]', '[\"OWNER\", \"ADMIN\"]', '[\"OWNER\", \"ADMIN\"]', '2018-11-28 16:29:48');
INSERT INTO `Access` VALUES (13, 'sys', 'Moment', NULL, '[\"UNKNOWN\", \"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[\"UNKNOWN\", \"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[\"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[\"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[\"OWNER\", \"ADMIN\"]', '[\"OWNER\", \"ADMIN\"]', '[\"OWNER\", \"ADMIN\"]', '2018-11-28 16:29:19');
INSERT INTO `Access` VALUES (14, 'sys', 'Comment', NULL, '[\"UNKNOWN\", \"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[\"UNKNOWN\", \"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[\"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[\"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[\"OWNER\", \"ADMIN\"]', '[\"OWNER\", \"ADMIN\"]', '[\"OWNER\", \"ADMIN\"]', '2018-11-28 16:29:19');
INSERT INTO `Access` VALUES (15, 'sys', 'Login', NULL, '[]', '[]', '[\"UNKNOWN\", \"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[\"UNKNOWN\", \"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[ \"ADMIN\"]', '[ \"ADMIN\"]', '[\"ADMIN\"]', '2018-11-28 16:29:48');
INSERT INTO `Access` VALUES (16, 'sys', 'Verify', NULL, '[]', '[]', '[\"UNKNOWN\", \"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[\"UNKNOWN\", \"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[\"UNKNOWN\", \"LOGIN\", \"CONTACT\", \"CIRCLE\", \"OWNER\", \"ADMIN\"]', '[ \"ADMIN\"]', '[\"ADMIN\"]', '2018-11-28 16:29:48');
COMMIT;

-- ----------------------------
-- Table structure for Comment
-- ----------------------------
DROP TABLE IF EXISTS `Comment`;
CREATE TABLE `Comment` (
  `id` bigint(15) NOT NULL COMMENT '唯一标识',
  `toId` bigint(15) NOT NULL DEFAULT '0' COMMENT '被回复的id',
  `userId` bigint(15) NOT NULL COMMENT '评论人id',
  `momentId` bigint(15) NOT NULL COMMENT '动态id',
  `date` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `content` varchar(1000) NOT NULL COMMENT '内容',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='评论';

-- ----------------------------
-- Records of Comment
-- ----------------------------
BEGIN;
INSERT INTO `Comment` VALUES (4, 0, 38710, 470, '2017-02-01 11:20:50', 'This is a Content...-4');
INSERT INTO `Comment` VALUES (13, 0, 82005, 58, '2017-02-01 11:20:50', 'This is a Content...-13');
INSERT INTO `Comment` VALUES (22, 221, 82001, 470, '2017-02-01 11:20:50', '测试修改评论');
INSERT INTO `Comment` VALUES (44, 0, 82003, 170, '2017-02-01 11:20:50', 'This is a Content...-44');
INSERT INTO `Comment` VALUES (45, 0, 93793, 301, '2017-02-01 11:20:50', 'This is a Content...-45');
INSERT INTO `Comment` VALUES (47, 4, 70793, 470, '2017-02-01 11:20:50', 'This is a Content...-47');
INSERT INTO `Comment` VALUES (51, 45, 82003, 301, '2017-02-01 11:20:50', 'This is a Content...-51');
INSERT INTO `Comment` VALUES (54, 0, 82004, 170, '2017-02-01 11:20:50', 'This is a Content...-54');
INSERT INTO `Comment` VALUES (68, 0, 82005, 371, '2017-02-01 11:20:50', 'This is a Content...-68');
INSERT INTO `Comment` VALUES (76, 45, 93793, 301, '2017-02-01 11:20:50', 'This is a Content...-76');
INSERT INTO `Comment` VALUES (77, 13, 93793, 58, '2017-02-01 11:20:50', 'This is a Content...-77');
INSERT INTO `Comment` VALUES (97, 13, 82006, 58, '2017-02-01 11:20:50', 'This is a Content...-97');
INSERT INTO `Comment` VALUES (99, 44, 70793, 170, '2017-02-01 11:20:50', 'This is a Content...-99');
INSERT INTO `Comment` VALUES (110, 0, 93793, 371, '2017-02-01 11:23:24', 'This is a Content...-110');
INSERT INTO `Comment` VALUES (114, 0, 82001, 371, '2017-03-02 05:56:06', 'This is a Content...-114');
INSERT INTO `Comment` VALUES (115, 0, 38710, 371, '2017-03-02 05:56:06', 'This is a Content...-115');
INSERT INTO `Comment` VALUES (116, 0, 70793, 371, '2017-03-02 05:56:06', 'This is a Content...-116');
INSERT INTO `Comment` VALUES (120, 0, 93793, 301, '2017-03-02 05:56:06', 'This is a Content...-110');
INSERT INTO `Comment` VALUES (124, 0, 82001, 301, '2017-03-02 05:56:06', 'This is a Content...-114');
INSERT INTO `Comment` VALUES (157, 0, 93793, 371, '2017-02-01 11:20:50', 'This is a Content...-157');
INSERT INTO `Comment` VALUES (158, 0, 93793, 301, '2018-07-12 17:28:23', 'This is a Content...-157');
INSERT INTO `Comment` VALUES (160, 0, 82001, 235, '2017-03-02 05:56:06', 'This is a Content...-160');
INSERT INTO `Comment` VALUES (162, 0, 93793, 12, '2017-03-06 05:03:45', 'This is a Content...-162');
INSERT INTO `Comment` VALUES (163, 0, 82001, 235, '2017-03-02 05:56:06', 'This is a Content...-163');
INSERT INTO `Comment` VALUES (164, 0, 93793, 12, '2017-03-06 05:03:45', 'This is a Content...-164');
INSERT INTO `Comment` VALUES (167, 0, 82001, 58, '2017-03-25 11:48:41', 'Nice!');
INSERT INTO `Comment` VALUES (168, 1490442545077, 82001, 235, '2017-03-25 11:49:14', '???');
INSERT INTO `Comment` VALUES (172, 162, 82001, 12, '2017-03-25 12:22:58', 'OK');
INSERT INTO `Comment` VALUES (173, 0, 38710, 58, '2017-03-25 12:25:13', 'Good');
INSERT INTO `Comment` VALUES (175, 0, 38710, 12, '2017-03-25 12:26:53', 'Java is the best program language!');
INSERT INTO `Comment` VALUES (176, 166, 38710, 15, '2017-03-25 12:28:03', 'thank you');
INSERT INTO `Comment` VALUES (178, 0, 38710, 511, '2017-03-25 12:30:55', 'wbw');
INSERT INTO `Comment` VALUES (182, 110, 82001, 371, '2017-03-26 06:12:52', 'hahaha');
INSERT INTO `Comment` VALUES (188, 97, 82001, 58, '2017-03-26 07:21:32', '1646');
INSERT INTO `Comment` VALUES (190, 0, 82001, 58, '2017-03-26 07:22:13', 'dbdj');
INSERT INTO `Comment` VALUES (206, 54, 82001, 170, '2017-03-29 03:04:23', 'ejej');
INSERT INTO `Comment` VALUES (209, 13, 82001, 58, '2017-03-29 03:05:59', 'hehj');
INSERT INTO `Comment` VALUES (300, 97, 82001, 58, '2017-03-29 03:06:07', 'hj');
INSERT INTO `Comment` VALUES (301, 194, 82001, 235, '2017-03-29 03:06:24', 'jj');
INSERT INTO `Comment` VALUES (4001, 0, 82001, 58, '2017-03-29 08:39:52', 'I would like to say …');
INSERT INTO `Comment` VALUES (1490776944301, 0, 82001, 58, '2017-03-29 08:42:24', 'hello');
INSERT INTO `Comment` VALUES (1490776966828, 173, 82001, 58, '2017-03-29 08:42:46', 'me too');
INSERT INTO `Comment` VALUES (1490777905437, 0, 82001, 543, '2017-03-29 08:58:25', 'rr');
INSERT INTO `Comment` VALUES (1490778122719, 175, 82001, 12, '2017-03-29 09:02:02', 'Yeah! I think so!');
INSERT INTO `Comment` VALUES (1490778494751, 1490778122719, 82001, 12, '2017-03-29 09:08:14', 'reply Android82001');
INSERT INTO `Comment` VALUES (1490778681337, 166, 82001, 12, '2017-03-29 09:11:21', 'gg');
INSERT INTO `Comment` VALUES (1490780759866, 99, 82001, 170, '2017-03-29 09:45:59', '99');
INSERT INTO `Comment` VALUES (1490781009548, 51, 82001, 301, '2017-03-29 09:50:09', '3');
INSERT INTO `Comment` VALUES (1490781032005, 45, 82001, 301, '2017-03-29 09:50:32', '93793');
INSERT INTO `Comment` VALUES (1490781817044, 209, 38710, 58, '2017-03-29 10:03:37', '82001');
INSERT INTO `Comment` VALUES (1490781850893, 1490776966828, 38710, 58, '2017-03-29 10:04:10', 'haha!');
INSERT INTO `Comment` VALUES (1490781857242, 190, 38710, 58, '2017-03-29 10:04:17', 'nice');
INSERT INTO `Comment` VALUES (1490781865407, 1490781857242, 38710, 58, '2017-03-29 10:04:25', 'wow');
INSERT INTO `Comment` VALUES (1490781899147, 197, 38710, 12, '2017-03-29 10:04:59', 'kaka');
INSERT INTO `Comment` VALUES (1490794439561, 1490778681337, 82001, 12, '2017-03-29 13:33:59', 'gg?');
INSERT INTO `Comment` VALUES (1490794610632, 172, 82001, 12, '2017-03-29 13:36:50', 'All right');
INSERT INTO `Comment` VALUES (1490794937137, 1490794919957, 82001, 12, '2017-03-29 13:42:17', 'All right ok ok');
INSERT INTO `Comment` VALUES (1490794953438, 1490794937137, 82001, 12, '2017-03-29 13:42:33', 'All right ok ok ll');
INSERT INTO `Comment` VALUES (1490796241178, 0, 38710, 58, '2017-03-29 14:04:01', 'Anything else?');
INSERT INTO `Comment` VALUES (1490796629591, 175, 38710, 12, '2017-03-29 14:10:29', 'well');
INSERT INTO `Comment` VALUES (1490798710678, 110, 38710, 371, '2017-03-29 14:45:10', '110');
INSERT INTO `Comment` VALUES (1490800971064, 175, 38710, 12, '2017-03-29 15:22:51', 'I do');
INSERT INTO `Comment` VALUES (1490848396072, 175, 82001, 12, '2017-03-30 04:33:16', 'Lemon');
INSERT INTO `Comment` VALUES (1490848581424, 166, 82001, 12, '2017-03-30 04:36:21', '82001ejej');
INSERT INTO `Comment` VALUES (1490850764448, 162, 82001, 12, '2017-03-30 05:12:44', '-162');
INSERT INTO `Comment` VALUES (1490850844016, 0, 82001, 12, '2017-03-30 05:14:04', 'I like it');
INSERT INTO `Comment` VALUES (1490850876656, 1490800971064, 82001, 12, '2017-03-30 05:14:36', 'I do so');
INSERT INTO `Comment` VALUES (1490854894566, 175, 82001, 12, '2017-03-30 06:21:34', 'it does be a good lang');
INSERT INTO `Comment` VALUES (1490863443219, 1490850844016, 82002, 12, '2017-03-30 08:44:03', 'me too!');
INSERT INTO `Comment` VALUES (1490863469638, 0, 82002, 15, '2017-03-30 08:44:29', 'Just do it');
INSERT INTO `Comment` VALUES (1490863507114, 4, 82003, 470, '2017-03-30 08:45:07', 'yes');
INSERT INTO `Comment` VALUES (1490863563124, 0, 82003, 704, '2017-03-30 08:46:03', 'I want one');
INSERT INTO `Comment` VALUES (1490863651493, 0, 70793, 595, '2017-03-30 08:47:31', 'wow');
INSERT INTO `Comment` VALUES (1490863661426, 1490780759866, 70793, 170, '2017-03-30 08:47:41', '66');
INSERT INTO `Comment` VALUES (1490863676989, 0, 70793, 12, '2017-03-30 08:47:56', 'Shy');
INSERT INTO `Comment` VALUES (1490863711703, 0, 70793, 511, '2017-03-30 08:48:31', 'I hope I can join');
INSERT INTO `Comment` VALUES (1490863717947, 178, 70793, 511, '2017-03-30 08:48:37', 'what?');
INSERT INTO `Comment` VALUES (1490863783276, 1490863711703, 93793, 511, '2017-03-30 08:49:43', 'haha welcome');
INSERT INTO `Comment` VALUES (1490863903900, 0, 82006, 470, '2017-03-30 08:51:43', 'SOGA');
INSERT INTO `Comment` VALUES (1490863915675, 0, 82006, 235, '2017-03-30 08:51:55', 'Good boy');
INSERT INTO `Comment` VALUES (1490863938712, 0, 82006, 12, '2017-03-30 08:52:18', 'Handsome!');
INSERT INTO `Comment` VALUES (1490863978239, 1490796241178, 82006, 58, '2017-03-30 08:52:58', 'there still remains a question…');
INSERT INTO `Comment` VALUES (1490864016738, 0, 82006, 511, '2017-03-30 08:53:36', 'I want to have a try!');
INSERT INTO `Comment` VALUES (1490864023700, 0, 82006, 543, '2017-03-30 08:53:43', 'oops');
INSERT INTO `Comment` VALUES (1490864039264, 0, 82006, 551, '2017-03-30 08:53:59', 'Wonderful!');
INSERT INTO `Comment` VALUES (1490864152008, 0, 82006, 58, '2017-03-30 08:55:52', 'U R ugly( ´?` )');
INSERT INTO `Comment` VALUES (1490864254400, 1490863915675, 82044, 235, '2017-03-30 08:57:34', 'And I have no idea');
INSERT INTO `Comment` VALUES (1490864276824, 0, 82044, 12, '2017-03-30 08:57:56', 'Oh my God!');
INSERT INTO `Comment` VALUES (1490864292184, 1490864152008, 82044, 58, '2017-03-30 08:58:12', 'haha!');
INSERT INTO `Comment` VALUES (1490864379424, 1490863938712, 82001, 12, '2017-03-30 08:59:39', 'Thank you~');
INSERT INTO `Comment` VALUES (1490864400210, 1490864276824, 82001, 12, '2017-03-30 09:00:00', 'Amazing, isnt it?');
INSERT INTO `Comment` VALUES (1490874908570, 1490864023700, 82055, 543, '2017-03-30 11:55:08', 'yeah');
INSERT INTO `Comment` VALUES (1490874930994, 1490777905437, 82055, 543, '2017-03-30 11:55:30', 'yy');
INSERT INTO `Comment` VALUES (1490874968779, 0, 82055, 12, '2017-03-30 11:56:08', 'I love it');
INSERT INTO `Comment` VALUES (1490875033494, 0, 82055, 301, '2017-03-30 11:57:13', 'More Comments');
INSERT INTO `Comment` VALUES (1490875040761, 158, 82055, 301, '2017-03-30 11:57:20', '157');
INSERT INTO `Comment` VALUES (1490875046704, 120, 82055, 301, '2017-03-30 11:57:26', '110');
INSERT INTO `Comment` VALUES (1490875660259, 1490863469638, 82055, 15, '2017-03-30 12:07:40', 'I prove wht you said(??????)');
INSERT INTO `Comment` VALUES (1490879678127, 0, 82001, 543, '2017-03-30 13:14:38', 'Baby you are a firework!');
INSERT INTO `Comment` VALUES (1490973736662, 1490973715568, 70793, 170, '2017-03-31 15:22:16', 'Hello, I am a fresh man');
INSERT INTO `Comment` VALUES (1490973890875, 1490864039264, 93793, 551, '2017-03-31 15:24:50', 'While I donot think so…');
INSERT INTO `Comment` VALUES (1491014830404, 1490864016738, 82001, 511, '2017-04-01 02:47:10', 'Have a nice day!');
INSERT INTO `Comment` VALUES (1491119615611, 1490864023700, 82001, 543, '2017-04-02 07:53:35', '$$');
INSERT INTO `Comment` VALUES (1491119670185, 68, 82001, 371, '2017-04-02 07:54:30', 'Leave a word');
INSERT INTO `Comment` VALUES (1491119695580, 0, 82001, 371, '2017-04-02 07:54:55', 'leave a word');
INSERT INTO `Comment` VALUES (1491130701902, 0, 38710, 511, '2017-04-02 10:58:21', 'Thanks for your supports (-^?^-)');
INSERT INTO `Comment` VALUES (1491209763162, 0, 82001, 1491200468898, '2017-04-03 08:56:03', 'How do you do');
INSERT INTO `Comment` VALUES (1491277552385, 0, 82001, 58, '2017-04-04 03:45:52', 'Seven');
INSERT INTO `Comment` VALUES (1491312438951, 1490863651493, 82001, 595, '2017-04-04 13:27:18', 'WaKaKa!');
INSERT INTO `Comment` VALUES (1491709064513, 0, 82001, 551, '2017-04-09 03:37:44', 'soga');
INSERT INTO `Comment` VALUES (1491740899179, 0, 82001, 470, '2017-04-09 12:28:19', 'www');
INSERT INTO `Comment` VALUES (1491798370749, 0, 82002, 551, '2017-04-10 04:26:10', 'Nice!');
INSERT INTO `Comment` VALUES (1491798499667, 115, 82002, 371, '2017-04-10 04:28:19', 'I do not understand…');
INSERT INTO `Comment` VALUES (1491830543193, 0, 82001, 170, '2017-04-10 13:22:23', 'What is the hell?');
INSERT INTO `Comment` VALUES (1492932228287, 1491209763162, 38710, 1491200468898, '2017-04-23 07:23:48', 'fine,thanks');
INSERT INTO `Comment` VALUES (1493094307810, 0, 82001, 551, '2017-04-25 04:25:04', '删除或修改数据请先创建，不要动原来的，谢谢');
INSERT INTO `Comment` VALUES (1493094307910, 0, 82001, 551, '2017-04-25 04:26:04', '用POST新增数据');
INSERT INTO `Comment` VALUES (1493186363132, 1490850764448, 82001, 12, '2017-04-26 05:59:23', 'sndnd');
INSERT INTO `Comment` VALUES (1502632433970, 0, 82002, 1493835799335, '2017-08-13 13:53:53', 'just have fun!');
INSERT INTO `Comment` VALUES (1508053783278, 0, 82001, 1508053762227, '2017-10-15 07:49:43', '可以的');
INSERT INTO `Comment` VALUES (1508072695833, 0, 82003, 1508072633830, '2017-10-15 13:04:55', '心疼地抱住自己(๑´ㅂ`๑)');
INSERT INTO `Comment` VALUES (1508227456407, 0, 82001, 15, '2017-10-17 08:04:16', 'hsh');
INSERT INTO `Comment` VALUES (1508227498578, 1491798370749, 82001, 551, '2017-10-17 08:04:58', 'g');
INSERT INTO `Comment` VALUES (1508462026394, 1490850844016, 82001, 12, '2017-10-20 01:13:46', '欧');
INSERT INTO `Comment` VALUES (1508492585904, 1508462026394, 82001, 12, '2017-10-20 09:43:05', 'my god');
INSERT INTO `Comment` VALUES (1509003045509, 0, 82001, 1508072633830, '2017-10-26 07:30:45', 'hhh');
INSERT INTO `Comment` VALUES (1509346549158, 0, 82001, 170, '2017-10-30 06:55:49', '呵呵');
INSERT INTO `Comment` VALUES (1509346556395, 0, 82001, 170, '2017-10-30 06:55:56', '测试');
INSERT INTO `Comment` VALUES (1509346606036, 0, 82001, 15, '2017-10-30 06:56:46', '测');
INSERT INTO `Comment` VALUES (1509518079106, 0, 82001, 1508073178489, '2017-11-01 06:34:39', '哦哦哦');
INSERT INTO `Comment` VALUES (1510795816462, 162, 82001, 12, '2017-11-16 01:30:16', '赞');
INSERT INTO `Comment` VALUES (1510795933629, 0, 82001, 1508073178489, '2017-11-16 01:32:13', 'cc');
INSERT INTO `Comment` VALUES (1510813284894, 0, 82001, 12, '2017-11-16 06:21:24', 'asdasdasdas');
INSERT INTO `Comment` VALUES (1510813295700, 162, 82001, 12, '2017-11-16 06:21:35', 'adsdasdasdasd');
INSERT INTO `Comment` VALUES (1511374269759, 99, 82001, 170, '2017-11-22 18:11:09', '记录里');
INSERT INTO `Comment` VALUES (1511374274194, 0, 82001, 170, '2017-11-22 18:11:14', '哦哦哦');
INSERT INTO `Comment` VALUES (1511407695342, 0, 1511407581570, 371, '2017-11-23 03:28:15', '好的');
INSERT INTO `Comment` VALUES (1511407702981, 157, 1511407581570, 371, '2017-11-23 03:28:22', '你好');
INSERT INTO `Comment` VALUES (1511878024415, 0, 1511761906715, 12, '2017-11-28 14:07:04', '你今年');
INSERT INTO `Comment` VALUES (1511878031610, 1511878024415, 1511761906715, 12, '2017-11-28 14:07:11', '不鸟你');
INSERT INTO `Comment` VALUES (1512035094555, 0, 82001, 12, '2017-11-30 09:44:54', '呵呵呵');
INSERT INTO `Comment` VALUES (1512035117021, 0, 82001, 32, '2017-11-30 09:45:17', '图片看不了啊');
INSERT INTO `Comment` VALUES (1512038831617, 1512035117021, 82001, 32, '2017-11-30 10:47:11', '代码截屏都是2k分辨率的，并且还放在GitHub上，可以等一会儿，或者更新下ZBLibray(图片加载库从UIL换成了Glide)就行');
INSERT INTO `Comment` VALUES (1512039030970, 1512035117021, 82001, 32, '2017-11-30 10:50:30', '一般九宫格图片都是压缩图，分辨率在300*300左右，加载很快，点击放大后才是原图，1080P左右');
INSERT INTO `Comment` VALUES (1512531859019, 0, 1512531601485, 1512314438990, '2017-12-06 03:44:19', '666');
INSERT INTO `Comment` VALUES (1512533520832, 1512531859019, 38710, 1512314438990, '2017-12-06 04:12:00', '嘿嘿');
INSERT INTO `Comment` VALUES (1513656045399, 0, 82001, 1508072633830, '2017-12-19 04:00:45', '444444');
INSERT INTO `Comment` VALUES (1514425796195, 0, 82001, 1513094436910, '2017-12-28 01:49:56', '一起');
INSERT INTO `Comment` VALUES (1514473034425, 1514425796195, 93793, 1513094436910, '2017-12-28 14:57:14', '干啥？');
INSERT INTO `Comment` VALUES (1514478784653, 0, 82001, 1513094436910, '2017-12-28 16:33:04', 'bug很多');
INSERT INTO `Comment` VALUES (1514506206319, 1514478784653, 38710, 1513094436910, '2017-12-29 00:10:06', '碰到哪些了呢？欢迎指出，尽快解决^_^');
INSERT INTO `Comment` VALUES (1514617131036, 0, 82005, 1513094436910, '2017-12-30 06:58:51', '口子');
INSERT INTO `Comment` VALUES (1514858592813, 0, 82001, 1514858533480, '2018-01-02 02:03:12', '铁人');
INSERT INTO `Comment` VALUES (1514858640958, 0, 38710, 1514858533480, '2018-01-02 02:04:00', '斯塔克工业');
INSERT INTO `Comment` VALUES (1514858707767, 0, 70793, 1514858533480, '2018-01-02 02:05:07', '壕友乎？');
INSERT INTO `Comment` VALUES (1514960713300, 0, 82001, 1513094436910, '2018-01-03 06:25:13', '1');
INSERT INTO `Comment` VALUES (1514960744185, 1512531859019, 82001, 1512314438990, '2018-01-03 06:25:44', '哇');
INSERT INTO `Comment` VALUES (1515057852156, 0, 82001, 58, '2018-01-04 09:24:12', '你说');
INSERT INTO `Comment` VALUES (1515057857464, 0, 82001, 58, '2018-01-04 09:24:17', '你说');
INSERT INTO `Comment` VALUES (1515057861094, 0, 82001, 58, '2018-01-04 09:24:21', '蓉蓉');
INSERT INTO `Comment` VALUES (1515057864174, 1515057857464, 82001, 58, '2018-01-04 09:24:24', '哦轻松');
INSERT INTO `Comment` VALUES (1515057869554, 0, 82001, 58, '2018-01-04 09:24:29', ',王者荣耀');
INSERT INTO `Comment` VALUES (1515313792063, 162, 82001, 12, '2018-01-07 08:29:52', 'you');
INSERT INTO `Comment` VALUES (1515313823155, 164, 82001, 12, '2018-01-07 08:30:23', 'you');
INSERT INTO `Comment` VALUES (1516190557098, 0, 82001, 1513094436910, '2018-01-17 12:02:37', '哦婆婆');
INSERT INTO `Comment` VALUES (1516629533520, 0, 82001, 1508072633830, '2018-01-22 13:58:53', '小臭臭');
INSERT INTO `Comment` VALUES (1516686985310, 0, 82001, 1516086423441, '2018-01-23 05:56:25', 'hologram');
INSERT INTO `Comment` VALUES (1516687072270, 1516629533520, 82001, 1508072633830, '2018-01-23 05:57:52', '咯我就');
INSERT INTO `Comment` VALUES (1516687437251, 1516686985310, 82001, 1516086423441, '2018-01-23 06:03:57', '你家里好哦');
INSERT INTO `Comment` VALUES (1516691119239, 1516686985310, 38710, 1516086423441, '2018-01-23 07:05:19', '我喜欢Hololens嘿嘿');
INSERT INTO `Comment` VALUES (1516780129884, 0, 82001, 1516086423441, '2018-01-24 07:48:49', 'aaa');
INSERT INTO `Comment` VALUES (1516783920998, 0, 82001, 1513094436910, '2018-01-24 08:52:00', '这个是实时的吗');
INSERT INTO `Comment` VALUES (1516785657724, 0, 82001, 1516086423441, '2018-01-24 09:20:57', 'hj');
INSERT INTO `Comment` VALUES (1516805226757, 1516785657724, 38710, 1516086423441, '2018-01-24 14:47:06', '滑稽？');
INSERT INTO `Comment` VALUES (1516805340593, 1516783920998, 38710, 1513094436910, '2018-01-24 14:49:00', '看怎么定义 实时 。这个是仿微信朋友圈列表和QQ空间说说详情，在线同步的，但没做推送，所以不是QQ微信聊天那种即时通讯。');
INSERT INTO `Comment` VALUES (1516843720270, 1516780129884, 82001, 1516086423441, '2018-01-25 01:28:40', 'ghj');
INSERT INTO `Comment` VALUES (1516862537978, 1515057869554, 70793, 58, '2018-01-25 06:42:17', '绝地逃亡吃鸡');
INSERT INTO `Comment` VALUES (1516931850067, 0, 82001, 1516086423441, '2018-01-26 01:57:30', '1111111111111');
INSERT INTO `Comment` VALUES (1516951734010, 1514506206319, 82001, 1513094436910, '2018-01-26 07:28:54', '火锅');
INSERT INTO `Comment` VALUES (1516951754620, 0, 82001, 1513094436910, '2018-01-26 07:29:14', '凤飞飞刚刚好');
INSERT INTO `Comment` VALUES (1516951826863, 0, 82001, 170, '2018-01-26 07:30:26', '黑珍珠');
INSERT INTO `Comment` VALUES (1517193267472, 1513656045399, 82001, 1508072633830, '2018-01-29 02:34:27', '1');
INSERT INTO `Comment` VALUES (1517193278459, 0, 82001, 1508072633830, '2018-01-29 02:34:38', '112');
INSERT INTO `Comment` VALUES (1517229342303, 0, 82001, 1516086423441, '2018-01-29 12:35:42', '几号抢的');
INSERT INTO `Comment` VALUES (1517234768450, 1517229342303, 93793, 1516086423441, '2018-01-29 14:06:08', '9号');
INSERT INTO `Comment` VALUES (1517303775429, 1490863903900, 82001, 470, '2018-01-30 09:16:15', '？？？');
INSERT INTO `Comment` VALUES (1517375165233, 0, 82001, 1508053762227, '2018-01-31 05:06:05', '666');
INSERT INTO `Comment` VALUES (1517730034960, 0, 82001, 170, '2018-02-04 07:40:34', '陌陌陌陌');
INSERT INTO `Comment` VALUES (1518365470893, 44, 82001, 170, '2018-02-11 16:11:10', '野蜂飞舞');
INSERT INTO `Comment` VALUES (1518614899681, 0, 82001, 301, '2018-02-14 13:28:19', 'https://goo.gl/search/JJB+Sports\nJJB Sports,');
INSERT INTO `Comment` VALUES (1519719341810, 0, 82001, 1516086423441, '2018-02-27 08:15:41', '我也想抢一张');
INSERT INTO `Comment` VALUES (1519793574249, 1519719341810, 93793, 1516086423441, '2018-02-28 04:52:54', '哈哈，春运都过了啊');
INSERT INTO `Comment` VALUES (1519813825959, 0, 82001, 1516086423441, '2018-02-28 10:30:25', '距P民');
INSERT INTO `Comment` VALUES (1519974842508, 0, 82001, 1516086423441, '2018-03-02 07:14:02', '1111');
INSERT INTO `Comment` VALUES (1519974868848, 1516691119239, 82001, 1516086423441, '2018-03-02 07:14:28', '1111');
INSERT INTO `Comment` VALUES (1519979533242, 0, 82001, 1508072633830, '2018-03-02 08:32:13', 'hj');
INSERT INTO `Comment` VALUES (1520231250819, 0, 82001, 12, '2018-03-05 06:27:30', '浑身难受呢');
INSERT INTO `Comment` VALUES (1520264640815, 0, 70793, 1520242333325, '2018-03-05 15:44:00', '兰博基尼');
INSERT INTO `Comment` VALUES (1520330788006, 0, 1520242280259, 1514017444961, '2018-03-06 10:06:28', '八组');
INSERT INTO `Comment` VALUES (1520578883309, 0, 82001, 12, '2018-03-09 07:01:23', '我用流量');
INSERT INTO `Comment` VALUES (1520699466219, 1520578883309, 82001, 12, '2018-03-10 16:31:06', '壕');
INSERT INTO `Comment` VALUES (1522074343188, 1513656045399, 82001, 1508072633830, '2018-03-26 14:25:43', 'rrrrr');
INSERT INTO `Comment` VALUES (1522074360206, 1519979533242, 82001, 1508072633830, '2018-03-26 14:26:00', 'tttt');
INSERT INTO `Comment` VALUES (1522657767636, 120, 82001, 301, '2018-04-02 08:29:27', '云画');
INSERT INTO `Comment` VALUES (1522741138316, 1517193278459, 82001, 1508072633830, '2018-04-03 07:38:58', '哦哦哦');
INSERT INTO `Comment` VALUES (1522986959852, 1508072695833, 82001, 1508072633830, '2018-04-06 03:55:59', '！？？？？');
INSERT INTO `Comment` VALUES (1523936378484, 0, 1523935772553, 1523936332614, '2018-04-17 03:39:38', '不错不错哦');
INSERT INTO `Comment` VALUES (1524032180807, 1519719341810, 82001, 1516086423441, '2018-04-18 06:16:20', '你好啊');
INSERT INTO `Comment` VALUES (1524032244441, 1519974842508, 82001, 1516086423441, '2018-04-18 06:17:24', '干嘛，单身吗?');
INSERT INTO `Comment` VALUES (1524032255755, 1519974842508, 82001, 1516086423441, '2018-04-18 06:17:35', '单身到底吗？');
INSERT INTO `Comment` VALUES (1524032299622, 0, 82001, 1516086423441, '2018-04-18 06:18:19', '别给我得怂');
INSERT INTO `Comment` VALUES (1524032305810, 1524032299622, 82001, 1516086423441, '2018-04-18 06:18:25', '你好');
INSERT INTO `Comment` VALUES (1524178495587, 0, 1524042900591, 1524178455305, '2018-04-19 22:54:55', '嘻嘻');
INSERT INTO `Comment` VALUES (1524178500568, 1524178495587, 1524042900591, 1524178455305, '2018-04-19 22:55:00', '哈哈哈');
INSERT INTO `Comment` VALUES (1524190367904, 0, 38710, 1524178455305, '2018-04-20 02:12:47', '你头像用的是本地的路径，只有你能看到，别人看不到哦，可以换一个url');
INSERT INTO `Comment` VALUES (1524190412418, 1524190367904, 38710, 1524178455305, '2018-04-20 02:13:32', '我的资料>编辑>改下备注');
INSERT INTO `Comment` VALUES (1524190941111, 1524032244441, 82003, 1516086423441, '2018-04-20 02:22:21', '单身约吗？');
INSERT INTO `Comment` VALUES (1524190981549, 1522657767636, 82003, 301, '2018-04-20 02:23:01', '这个6');
INSERT INTO `Comment` VALUES (1524191012552, 0, 82003, 1524178455305, '2018-04-20 02:23:32', '早上好小姐姐');
INSERT INTO `Comment` VALUES (1524214012015, 1524190367904, 1524042900591, 1524178455305, '2018-04-20 08:46:52', '怎么换url');
INSERT INTO `Comment` VALUES (1524235902970, 1524214012015, 82003, 1524178455305, '2018-04-20 14:51:42', '在我的资料界面编辑备注');
INSERT INTO `Comment` VALUES (1524297798490, 0, 82001, 1513094436910, '2018-04-21 08:03:18', 'gg');
INSERT INTO `Comment` VALUES (1524461430874, 1519979533242, 82001, 1508072633830, '2018-04-23 05:30:30', '哦哦哦');
INSERT INTO `Comment` VALUES (1524461436914, 0, 82001, 1508072633830, '2018-04-23 05:30:36', '莫');
INSERT INTO `Comment` VALUES (1524461441914, 0, 82001, 1508072633830, '2018-04-23 05:30:41', '默默');
INSERT INTO `Comment` VALUES (1524488068926, 1524178500568, 82001, 1524178455305, '2018-04-23 12:54:28', '哦哦哦');
INSERT INTO `Comment` VALUES (1524582671132, 1524461441914, 82003, 1508072633830, '2018-04-24 15:11:11', '陌陌');
INSERT INTO `Comment` VALUES (1524582716289, 1524461441914, 70793, 1508072633830, '2018-04-24 15:11:56', '脉脉');
INSERT INTO `Comment` VALUES (1524798402799, 0, 1523626157302, 1524178455305, '2018-04-27 03:06:42', '能不能把本地的图片传到服务器，这样大家都能看到了，用url换头像不太习惯');
INSERT INTO `Comment` VALUES (1524799118232, 0, 1523626157302, 1512314438990, '2018-04-27 03:18:38', '这些图片是怎么发上去的呢？我发动态只有默认的两张图');
INSERT INTO `Comment` VALUES (1524843908458, 1524799118232, 82001, 1512314438990, '2018-04-27 15:45:08', '在HttpRequest.addMoment中加的，因为APIJSON的Server Demo没做图片存储，所以目前只能自己传图片的url，可以百度图片上找哈');
INSERT INTO `Comment` VALUES (1524844181029, 1524798402799, 82001, 1524178455305, '2018-04-27 15:49:41', '确实有这样的问题，但这个Demo仅供展示APIJSON的接口数据增删改查的能力，又拍云，七牛等平台又需要对接及付费，所以Demo暂时不提供哈，需要的话可以自己搞。建议先把图片上传到又拍云等平台，拿回url再传到自己的服务器^_^');
INSERT INTO `Comment` VALUES (1524844222775, 1524798402799, 82001, 1524178455305, '2018-04-27 15:50:22', '目前也可以百度一张图，把对应的url传上去，大家就都能看到了哈哈');
INSERT INTO `Comment` VALUES (1525658333654, 0, 82001, 1513094436910, '2018-05-07 01:58:53', 'q');
INSERT INTO `Comment` VALUES (1527821844576, 0, 1527821445610, 1527821296110, '2018-06-01 02:57:24', '好不好用啊');
INSERT INTO `Comment` VALUES (1527821876802, 1527821844576, 1527495857924, 1527821296110, '2018-06-01 02:57:56', '当然好用啊');
INSERT INTO `Comment` VALUES (1527837906576, 0, 38710, 1527830331780, '2018-06-01 07:25:06', '哇，好漂亮');
INSERT INTO `Comment` VALUES (1527837965006, 0, 82002, 1527830474378, '2018-06-01 07:26:05', '像平板电脑哈哈');
INSERT INTO `Comment` VALUES (1527862540820, 0, 1527495857924, 1527830331780, '2018-06-01 14:15:40', '谢谢你');
INSERT INTO `Comment` VALUES (1527862609352, 1527837965006, 1527495857924, 1527830474378, '2018-06-01 14:16:49', 'ㄟ(≧◇≦)ㄏ');
INSERT INTO `Comment` VALUES (1528105592852, 0, 82001, 1516086423441, '2018-06-04 09:46:32', 'aaaaa');
INSERT INTO `Comment` VALUES (1528250648974, 0, 82001, 1523936332614, '2018-06-06 02:04:08', 'hshdv');
INSERT INTO `Comment` VALUES (1528270188205, 0, 1528250827953, 1527830474378, '2018-06-06 07:29:48', '这个图片是怎么发出来的啊，我发动态就只是那两张默认图片');
INSERT INTO `Comment` VALUES (1528278187969, 0, 82001, 470, '2018-06-06 09:43:07', '啊啊啊啊');
INSERT INTO `Comment` VALUES (1528289446172, 0, 82001, 1528269988360, '2018-06-06 12:50:46', '因为没做前端上传和后端保存图片的功能，APIJSONApp主要是用来展示APIJSON的自动化接口的');
INSERT INTO `Comment` VALUES (1528289580140, 0, 38710, 1528274037224, '2018-06-06 12:53:00', '这两张图片的url错了哦，都是网页url，所以小图加载不出来，只能点击后用WebView查看');
INSERT INTO `Comment` VALUES (1528327885509, 1528289580140, 1528250827953, 1528274037224, '2018-06-06 23:31:25', '噢噢，没想到你能这么快回复，谢谢');
INSERT INTO `Comment` VALUES (1528333168328, 0, 82001, 1514017444961, '2018-06-07 00:59:28', 'zj');
INSERT INTO `Comment` VALUES (1528333174811, 0, 82001, 1514017444961, '2018-06-07 00:59:34', 'xj');
INSERT INTO `Comment` VALUES (1528393204569, 1528270188205, 38710, 1527830474378, '2018-06-07 17:40:04', '把接口里的pictureList的值改下，里面包含图片url');
INSERT INTO `Comment` VALUES (1528463152459, 1528463135762, 1528339692804, 1528462217322, '2018-06-08 13:05:52', '我想去');
INSERT INTO `Comment` VALUES (1528463165903, 0, 1528339692804, 1528462217322, '2018-06-08 13:06:05', '我想去');
INSERT INTO `Comment` VALUES (1528516951218, 0, 82001, 1528462217322, '2018-06-09 04:02:31', '这里能约到小姐姐算我输୧(๑•̀⌄•́๑)૭');
INSERT INTO `Comment` VALUES (1528531711651, 0, 82001, 543, '2018-06-09 08:08:31', 'fn');
INSERT INTO `Comment` VALUES (1528554476310, 0, 82001, 1516086423441, '2018-06-09 14:27:56', 'thS');
INSERT INTO `Comment` VALUES (1528676480604, 0, 1528339692804, 1528356421201, '2018-06-11 00:21:20', 'nihshs');
INSERT INTO `Comment` VALUES (1528677257985, 0, 1528339692804, 1528676875139, '2018-06-11 00:34:17', 'aaa');
INSERT INTO `Comment` VALUES (1528679814166, 0, 1528339692804, 1528676875139, '2018-06-11 01:16:54', '12');
INSERT INTO `Comment` VALUES (1528681265496, 1528516951218, 1528339692804, 1528462217322, '2018-06-11 01:41:05', '你输了有什么惩罚吗？');
INSERT INTO `Comment` VALUES (1528698907535, 0, 82001, 1516086423441, '2018-06-11 06:35:07', 'yhbv');
INSERT INTO `Comment` VALUES (1528703971675, 1528681265496, 82001, 1528462217322, '2018-06-11 07:59:31', '一起陪小姐姐出游*。٩(ˊωˋ*)و✧');
INSERT INTO `Comment` VALUES (1528799506317, 1516805340593, 82001, 1513094436910, '2018-06-12 10:31:46', '摩恩');
INSERT INTO `Comment` VALUES (1528972547638, 0, 82001, 1528462217322, '2018-06-14 10:35:47', '古古怪怪');
INSERT INTO `Comment` VALUES (1528972555336, 0, 82001, 1528462217322, '2018-06-14 10:35:55', '合计怕v就怕vi');
INSERT INTO `Comment` VALUES (1529730035521, 0, 82001, 1527830331780, '2018-06-23 05:00:35', '还有别的吗？');
INSERT INTO `Comment` VALUES (1530528524447, 0, 38710, 1528269988360, '2018-07-02 10:48:44', '所以HttpRequest里写死了两张图片url，你可以改下');
INSERT INTO `Comment` VALUES (1531063660028, 0, 82003, 1531062713966, '2018-07-08 15:27:40', '这是哪里啊？我也想去');
INSERT INTO `Comment` VALUES (1531412238453, 0, 82001, 1528356378455, '2018-07-12 16:17:18', '去啊');
INSERT INTO `Comment` VALUES (1531412264667, 0, 82003, 1528356378455, '2018-07-12 16:17:44', '去哪呢？');
INSERT INTO `Comment` VALUES (1531887938362, 1531063660028, 82001, 1531062713966, '2018-07-18 04:25:38', '是呀');
INSERT INTO `Comment` VALUES (1531894411487, 0, 82001, 1520242333325, '2018-07-18 06:13:31', 'sssx');
INSERT INTO `Comment` VALUES (1531983163150, 0, 1531969715979, 1531969818357, '2018-07-19 06:52:43', 'http://q18idc.com');
INSERT INTO `Comment` VALUES (1532057419100, 0, 38710, 1531969818357, '2018-07-20 03:30:19', '可以加上标题哦');
INSERT INTO `Comment` VALUES (1533008631299, 1532057419100, 82001, 1531969818357, '2018-07-31 03:43:51', '加上');
INSERT INTO `Comment` VALUES (1533120405110, 1516780129884, 82001, 1516086423441, '2018-08-01 10:46:45', 'eeeeee');
INSERT INTO `Comment` VALUES (1533120420498, 1528105592852, 82001, 1516086423441, '2018-08-01 10:47:00', 'eeeeeee');
INSERT INTO `Comment` VALUES (1533186909764, 0, 82001, 1531969818357, '2018-08-02 05:15:09', 'hello');
INSERT INTO `Comment` VALUES (1533187733941, 0, 82001, 1508072633830, '2018-08-02 05:28:53', '好好');
INSERT INTO `Comment` VALUES (1533188056603, 1531887938362, 82001, 1531062713966, '2018-08-02 05:34:16', '顺带');
INSERT INTO `Comment` VALUES (1533195207026, 0, 82001, 1531062713966, '2018-08-02 07:33:27', 'JJ');
INSERT INTO `Comment` VALUES (1533202426013, 1533186909764, 82003, 1531969818357, '2018-08-02 09:33:46', 'world');
INSERT INTO `Comment` VALUES (1533202917743, 1533186909764, 82001, 1531969818357, '2018-08-02 09:41:57', '00');
INSERT INTO `Comment` VALUES (1533629063261, 0, 82001, 1531969818357, '2018-08-07 08:04:23', '大鸡鸡');
INSERT INTO `Comment` VALUES (1533631893738, 0, 82001, 1531969818357, '2018-08-07 08:51:33', '哈哈哈哈哈哈');
INSERT INTO `Comment` VALUES (1533809879340, 1533186909764, 82001, 1531969818357, '2018-08-09 10:17:59', '434');
INSERT INTO `Comment` VALUES (1533889646344, 0, 82001, 1508072491570, '2018-08-10 08:27:26', '11111111');
INSERT INTO `Comment` VALUES (1533902815448, 0, 82001, 1531969818357, '2018-08-10 12:06:55', '很不要吃');
INSERT INTO `Comment` VALUES (1533902902749, 0, 82001, 1531969818357, '2018-08-10 12:08:22', '性能还可以');
INSERT INTO `Comment` VALUES (1534053913157, 1524190941111, 1508072160401, 1516086423441, '2018-08-12 06:05:13', '怎么约？');
INSERT INTO `Comment` VALUES (1534128014211, 0, 82001, 1520242333325, '2018-08-13 02:40:14', 'zxxx');
INSERT INTO `Comment` VALUES (1534412022857, 0, 82001, 1531969818357, '2018-08-16 09:33:42', 'dgf');
INSERT INTO `Comment` VALUES (1534684074665, 1531983163150, 82001, 1531969818357, '2018-08-19 13:07:54', 'ggggg');
INSERT INTO `Comment` VALUES (1534684209052, 110, 82001, 371, '2018-08-19 13:10:09', '44444444444444444444444444');
INSERT INTO `Comment` VALUES (1534926143012, 0, 82001, 1508053762227, '2018-08-22 08:22:23', '治标不治本在不在不在不');
INSERT INTO `Comment` VALUES (1534926149638, 1517375165233, 82001, 1508053762227, '2018-08-22 08:22:29', '把标准版申报表上班设备');
INSERT INTO `Comment` VALUES (1534992151350, 0, 82001, 1516086423441, '2018-08-23 02:42:31', '你咋不');
INSERT INTO `Comment` VALUES (1535279823332, 0, 82001, 1520242333325, '2018-08-26 10:37:03', '斤斤计较');
INSERT INTO `Comment` VALUES (1535279827983, 0, 82001, 1520242333325, '2018-08-26 10:37:07', '斤斤计较');
INSERT INTO `Comment` VALUES (1535598334136, 1534992151350, 82003, 1516086423441, '2018-08-30 03:05:34', '啥？');
INSERT INTO `Comment` VALUES (1535600352436, 0, 82001, 1520242333325, '2018-08-30 03:39:12', '6666666');
INSERT INTO `Comment` VALUES (1535600430479, 0, 82001, 1520242333325, '2018-08-30 03:40:30', '法拉利');
INSERT INTO `Comment` VALUES (1535785537390, 1535279823332, 82003, 1520242333325, '2018-09-01 07:05:37', '不好哦');
INSERT INTO `Comment` VALUES (1535785585222, 1534926143012, 82003, 1508053762227, '2018-09-01 07:06:25', '啥？');
INSERT INTO `Comment` VALUES (1535963519864, 0, 82001, 1535781636403, '2018-09-03 08:31:59', 'gghhh');
INSERT INTO `Comment` VALUES (1535963525135, 1535963519864, 82001, 1535781636403, '2018-09-03 08:32:05', 'gyuji');
INSERT INTO `Comment` VALUES (1536337000073, 1516686985310, 82001, 1516086423441, '2018-09-07 16:16:40', 'heh');
INSERT INTO `Comment` VALUES (1536378833060, 0, 82001, 1508072633830, '2018-09-08 03:53:53', '真的嘛');
INSERT INTO `Comment` VALUES (1536469270492, 0, 82001, 1528356496939, '2018-09-09 05:01:10', '这是啥表情？Σ(ŎдŎ|||)ﾉﾉ');
INSERT INTO `Comment` VALUES (1536805661269, 0, 70793, 1536805585275, '2018-09-13 02:27:41', '6s再战一年');
INSERT INTO `Comment` VALUES (1537373307627, 0, 82001, 1516086423441, '2018-09-19 16:08:27', '。。。');
INSERT INTO `Comment` VALUES (1537410620002, 0, 82001, 1536805585275, '2018-09-20 02:30:20', '不一样');
INSERT INTO `Comment` VALUES (1537710348414, 0, 82001, 1516086423441, '2018-09-23 13:45:48', 'hhj');
INSERT INTO `Comment` VALUES (1537710359760, 0, 82001, 1516086423441, '2018-09-23 13:45:59', '锵锵锵');
INSERT INTO `Comment` VALUES (1537857324518, 0, 82001, 1536805585275, '2018-09-25 06:35:24', '嗯呢');
INSERT INTO `Comment` VALUES (1537857334299, 1537857324518, 82001, 1536805585275, '2018-09-25 06:35:34', '嗯嗯');
INSERT INTO `Comment` VALUES (1539252343243, 1539252313711, 82001, 15, '2018-10-11 10:05:43', 'dxdf');
INSERT INTO `Comment` VALUES (1539252350604, 1539252337210, 82001, 15, '2018-10-11 10:05:50', 'djdnjd');
INSERT INTO `Comment` VALUES (1539592963862, 0, 82001, 1516086423441, '2018-10-15 08:42:43', '1111');
INSERT INTO `Comment` VALUES (1539868250267, 1531063660028, 82001, 1531062713966, '2018-10-18 13:10:50', '555555555555555555');
INSERT INTO `Comment` VALUES (1539868258868, 1533188056603, 82001, 1531062713966, '2018-10-18 13:10:58', '555555555');
INSERT INTO `Comment` VALUES (1539868269471, 1539868250267, 82001, 1531062713966, '2018-10-18 13:11:09', '4444444444444');
INSERT INTO `Comment` VALUES (1539868275645, 1531887938362, 82001, 1531062713966, '2018-10-18 13:11:15', '22222222222222222');
INSERT INTO `Comment` VALUES (1539960436993, 0, 82001, 1539868023868, '2018-10-19 14:47:16', '111');
INSERT INTO `Comment` VALUES (1540459429565, 0, 82001, 1540459361744, '2018-10-25 09:23:49', '哦破');
INSERT INTO `Comment` VALUES (1541496033857, 0, 82001, 301, '2018-11-06 09:20:33', '能解决');
INSERT INTO `Comment` VALUES (1541651688961, 1539960436993, 82001, 1539868023868, '2018-11-08 04:34:48', '哈哈');
INSERT INTO `Comment` VALUES (1541814609499, 0, 82001, 1541667920272, '2018-11-10 01:50:09', '11');
INSERT INTO `Comment` VALUES (1541814627709, 0, 82001, 1540459361744, '2018-11-10 01:50:27', '1111');
INSERT INTO `Comment` VALUES (1541815269164, 0, 82001, 1541667945772, '2018-11-10 02:01:09', '11');
INSERT INTO `Comment` VALUES (1541816372114, 0, 82001, 1541684010904, '2018-11-10 02:19:32', '111');
INSERT INTO `Comment` VALUES (1543193682067, 0, 1528339692804, 1528269822710, '2018-11-26 00:54:42', 'ss');
INSERT INTO `Comment` VALUES (1543463677434, 1541816372114, 82001, 1541684010904, '2018-11-29 03:54:37', 'djdjjj');
INSERT INTO `Comment` VALUES (1544496611006, 0, 82001, 15, '2018-12-11 02:50:11', '测试新增评论');
INSERT INTO `Comment` VALUES (1544496618728, 0, 82001, 15, '2018-12-11 02:50:18', '测试新增评论');
INSERT INTO `Comment` VALUES (1544496620126, 0, 82001, 15, '2018-12-11 02:50:20', '测试新增评论');
INSERT INTO `Comment` VALUES (1544503960414, 1537410620002, 1544503822963, 1536805585275, '2018-12-11 04:52:40', '664984');
INSERT INTO `Comment` VALUES (1544514743789, 0, 82001, 1544497353863, '2018-12-11 07:52:23', '墨迹');
INSERT INTO `Comment` VALUES (1544514759556, 1544514743789, 82001, 1544497353863, '2018-12-11 07:52:39', '路路通');
INSERT INTO `Comment` VALUES (1544514788248, 1544514743789, 82001, 1544497353863, '2018-12-11 07:53:08', '啦啦啦');
INSERT INTO `Comment` VALUES (1544514802708, 0, 82001, 1544497355630, '2018-12-11 07:53:22', '秃头');
INSERT INTO `Comment` VALUES (1544514806180, 1544514802708, 82001, 1544497355630, '2018-12-11 07:53:26', '啦咯啦咯啦咯');
INSERT INTO `Comment` VALUES (1544519833507, 1544514788248, 82001, 1544497353863, '2018-12-11 09:17:13', '呃呃呃');
INSERT INTO `Comment` VALUES (1544520025670, 1544514743789, 82001, 1544497353863, '2018-12-11 09:20:25', '考虑考虑1');
INSERT INTO `Comment` VALUES (1544520033768, 1544520025670, 82001, 1544497353863, '2018-12-11 09:20:33', '考虑考虑');
INSERT INTO `Comment` VALUES (1544520037107, 1544520025670, 82001, 1544497353863, '2018-12-11 09:20:37', '噢噢噢哦哦');
INSERT INTO `Comment` VALUES (1544520040994, 1544520037107, 82001, 1544497353863, '2018-12-11 09:20:40', '空空');
INSERT INTO `Comment` VALUES (1544520078377, 0, 82001, 1544265482923, '2018-12-11 09:21:18', '路路通');
INSERT INTO `Comment` VALUES (1544520083950, 1544520078377, 82001, 1544265482923, '2018-12-11 09:21:23', '记录贴');
INSERT INTO `Comment` VALUES (1544520088507, 1544520078377, 82001, 1544265482923, '2018-12-11 09:21:28', '旅途我');
INSERT INTO `Comment` VALUES (1544581157084, 1544514743789, 82001, 1544497353863, '2018-12-12 02:19:17', '111');
INSERT INTO `Comment` VALUES (1544581171474, 0, 82001, 1544497353863, '2018-12-12 02:19:31', '333');
INSERT INTO `Comment` VALUES (1544581181353, 1544581171474, 82001, 1544497353863, '2018-12-12 02:19:41', '444');
INSERT INTO `Comment` VALUES (1544581186743, 1544514743789, 82001, 1544497353863, '2018-12-12 02:19:46', '555');
INSERT INTO `Comment` VALUES (1544617314076, 0, 82001, 1544497355630, '2018-12-12 12:21:54', 'hubby');
INSERT INTO `Comment` VALUES (1544617322784, 1544514802708, 82001, 1544497355630, '2018-12-12 12:22:02', 'we see');
INSERT INTO `Comment` VALUES (1545102266463, 0, 82001, 1544497355630, '2018-12-18 03:04:26', '厉害呀');
INSERT INTO `Comment` VALUES (1545209831932, 0, 82001, 1544537838100, '2018-12-19 08:57:11', '牛逼的');
INSERT INTO `Comment` VALUES (1545527888416, 0, 82001, 1545508011343, '2018-12-23 01:18:08', 'hello');
INSERT INTO `Comment` VALUES (1545527898986, 1545527888416, 82001, 1545508011343, '2018-12-23 01:18:18', 'world');
INSERT INTO `Comment` VALUES (1545527923036, 1545527888416, 82001, 1545508011343, '2018-12-23 01:18:43', '还差还差还差');
INSERT INTO `Comment` VALUES (1545802151172, 0, 82001, 1545560428650, '2018-12-26 05:29:11', '输入了');
INSERT INTO `Comment` VALUES (1545811395533, 1545802151172, 82001, 1545560428650, '2018-12-26 08:03:15', '呵呵');
INSERT INTO `Comment` VALUES (1545904207328, 1545802151172, 82001, 1545560428650, '2018-12-27 09:50:07', '！！！');
INSERT INTO `Comment` VALUES (1545918307310, 0, 82001, 15, '2018-12-27 13:45:07', '测试新增评论');
INSERT INTO `Comment` VALUES (1545927001999, 1545895875719, 82001, 1545893190636, '2018-12-27 16:10:02', '哦哦哦www');
INSERT INTO `Comment` VALUES (1545961973331, 0, 82001, 15, '2018-12-28 01:52:53', '测试新增评论');
INSERT INTO `Comment` VALUES (1546050359778, 0, 82001, 15, '2018-12-29 02:25:59', '测试新增评论');
INSERT INTO `Comment` VALUES (1546050386785, 0, 82001, 1516086423441, '2018-12-29 02:26:26', '不鸟你');
INSERT INTO `Comment` VALUES (1546934031755, 0, 82001, 1544497355630, '2019-01-08 07:53:51', '厉害+1');
INSERT INTO `Comment` VALUES (1546934145366, 0, 82001, 15, '2019-01-08 07:55:45', '测试新增评论');
INSERT INTO `Comment` VALUES (1546935903414, 0, 82001, 15, '2019-01-08 08:25:03', '测试新增评论');
INSERT INTO `Comment` VALUES (1546999088223, 0, 82001, 1546934384440, '2019-01-09 01:58:08', '哈哈');
INSERT INTO `Comment` VALUES (1547479596730, 0, 82001, 15, '2019-01-14 15:26:36', '测试新增评论');
INSERT INTO `Comment` VALUES (1547542463183, 1546999088223, 82001, 1546934384440, '2019-01-15 08:54:23', '急急急');
INSERT INTO `Comment` VALUES (1547542491318, 0, 82001, 1547479596460, '2019-01-15 08:54:51', 'YY');
INSERT INTO `Comment` VALUES (1547549161954, 0, 82001, 1547479596460, '2019-01-15 10:46:01', 'Ggh');
INSERT INTO `Comment` VALUES (1547559759283, 0, 82002, 15, '2019-01-15 13:42:39', '测试新增评论');
INSERT INTO `Comment` VALUES (1547627710657, 0, 82001, 15, '2019-01-16 08:35:10', '测试新增评论');
INSERT INTO `Comment` VALUES (1547627714193, 0, 82001, 15, '2019-01-16 08:35:14', '测试新增评论');
INSERT INTO `Comment` VALUES (1547629888747, 0, 82002, 15, '2019-01-16 09:11:28', '测试新增评论');
INSERT INTO `Comment` VALUES (1547629914001, 0, 82001, 15, '2019-01-16 09:11:54', '测试新增评论');
INSERT INTO `Comment` VALUES (1547630122254, 0, 82001, 15, '2019-01-16 09:15:22', '测试新增评论');
INSERT INTO `Comment` VALUES (1547630243666, 0, 82001, 15, '2019-01-16 09:17:23', '测试新增评论');
INSERT INTO `Comment` VALUES (1547691041482, 0, 82001, 15, '2019-01-17 02:10:41', '测试新增评论');
INSERT INTO `Comment` VALUES (1547713184681, 0, 82001, 15, '2019-01-17 08:19:44', '测试新增评论');
INSERT INTO `Comment` VALUES (1547723265947, 0, 82001, 15, '2019-01-17 11:07:45', '测试新增评论');
INSERT INTO `Comment` VALUES (1547782483094, 0, 82001, 15, '2019-01-18 03:34:43', '测试新增评论');
INSERT INTO `Comment` VALUES (1547783370682, 0, 82001, 15, '2019-01-18 03:49:30', '测试新增评论');
INSERT INTO `Comment` VALUES (1547889930890, 0, 82001, 1544276121218, '2019-01-19 09:25:30', '@');
INSERT INTO `Comment` VALUES (1547975064126, 0, 82001, 15, '2019-01-20 09:04:24', '测试新增评论');
INSERT INTO `Comment` VALUES (1548118482563, 1547542463183, 82001, 1546934384440, '2019-01-22 00:54:42', '啦啦啦');
INSERT INTO `Comment` VALUES (1548138917327, 0, 82001, 1545560428650, '2019-01-22 06:35:17', '摸摸');
INSERT INTO `Comment` VALUES (1548382620695, 0, 82001, 15, '2019-01-25 02:17:00', '测试新增评论');
INSERT INTO `Comment` VALUES (1548599385881, 0, 82001, 1548599375288, '2019-01-27 14:29:45', '不喜欢好像就地解决');
INSERT INTO `Comment` VALUES (1548643322337, 0, 82001, 15, '2019-01-28 02:42:02', '测试新增评论');
INSERT INTO `Comment` VALUES (1548653580883, 1548599385881, 82001, 1548599375288, '2019-01-28 05:33:00', '哈哈哈哈');
INSERT INTO `Comment` VALUES (1548728775182, 0, 82001, 15, '2019-01-29 02:26:15', '测试新增评论');
INSERT INTO `Comment` VALUES (1548822634508, 0, 82002, 15, '2019-01-30 04:30:34', '测试新增评论');
INSERT INTO `Comment` VALUES (1548822671709, 0, 82001, 15, '2019-01-30 04:31:11', '测试新增评论');
INSERT INTO `Comment` VALUES (1548828580032, 1548653580883, 82001, 1548599375288, '2019-01-30 06:09:40', '嗯');
INSERT INTO `Comment` VALUES (1548828610840, 0, 82001, 1545819752556, '2019-01-30 06:10:10', '啦啦啦');
INSERT INTO `Comment` VALUES (1549549983638, 0, 82001, 15, '2019-02-07 14:33:11', '测试新增评论');
COMMIT;

-- ----------------------------
-- Table structure for Document
-- ----------------------------
DROP TABLE IF EXISTS `Document`;
CREATE TABLE `Document` (
  `id` bigint(15) NOT NULL COMMENT '唯一标识',
  `userId` bigint(15) NOT NULL COMMENT '用户id\n应该用adminId，只有当登录账户是管理员时才能操作文档。\n需要先建Admin表，新增登录等相关接口。',
  `version` tinyint(4) NOT NULL DEFAULT '2' COMMENT '接口版本号\n<=0 - 不限制版本，任意版本都可用这个接口\n>0 - 在这个版本添加的接口',
  `name` varchar(100) NOT NULL COMMENT '接口名称',
  `url` varchar(250) NOT NULL COMMENT '请求地址',
  `request` text NOT NULL COMMENT '请求\n用json格式会导致强制排序，而请求中引用赋值只能引用上面的字段，必须有序。',
  `response` text COMMENT '标准返回结果JSON\n用json格式会导致强制排序，而请求中引用赋值只能引用上面的字段，必须有序。',
  `date` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='测试用例文档\n后端开发者在测试好后，把选好的测试用例上传，这样就能共享给前端/客户端开发者';

-- ----------------------------
-- Records of Document
-- ----------------------------
BEGIN;
INSERT INTO `Document` VALUES (1, 0, 1, '登录', '/login', '{\"type\": 0, \"phone\": \"13000082001\", \"version\": 1, \"password\": \"123456\"}', NULL, '2017-11-26 07:35:19');
INSERT INTO `Document` VALUES (2, 0, 1, '注册(先获取验证码type:1)', '/register', '{\n    \"Privacy\": {\n        \"phone\": \"13000083333\",\n        \"_password\": \"123456\"\n    },\n    \"User\": {\n        \"name\": \"APIJSONUser\"\n    },\n    \"verify\": \"6840\"\n}', '{\"code\":412,\"msg\":\"手机号或验证码错误！\"}', '2017-11-26 06:56:10');
INSERT INTO `Document` VALUES (3, 0, 1, '退出登录', '/logout', '{}', NULL, '2017-11-26 09:36:10');
INSERT INTO `Document` VALUES (1511689914598, 0, 1, '获取用户隐私信息', '/gets', '{\"tag\": \"Privacy\", \"Privacy\": {\"id\": 82001}}', '{\"Privacy\":{\"id\":82001,\"more\":true,\"certified\":1,\"phone\":13000082001,\"balance\":9835.11},\"code\":200,\"msg\":\"success\"}', '2017-11-26 09:51:54');
INSERT INTO `Document` VALUES (1511796155276, 0, 1, '获取验证码', '/post/verify', '{\"type\": 0, \"phone\": \"13000082001\"}', '{\"Verify\":{\"id\":1533396718012,\"type\":0,\"phone\":13000082001,\"verify\":4995,\"date\":\"2018-08-04 23:31:58.0\"},\"tag\":\"Verify\",\"code\":200,\"msg\":\"success\"}', '2017-11-27 15:22:35');
INSERT INTO `Document` VALUES (1511796208669, 0, 1, '检查验证码是否存在', '/heads/verify', '{\"type\": 0, \"phone\": \"13000082001\"}', '{\"Verify\":{\"code\":200,\"msg\":\"success\",\"count\":1},\"code\":200,\"msg\":\"success\"}', '2017-11-27 15:23:28');
INSERT INTO `Document` VALUES (1511796589078, 0, 1, '修改登录密码(先获取验证码type:2)-手机号+验证码', '/put/password', '{\"verify\": \"10322\", \"Privacy\": {\"phone\": \"13000082001\", \"_password\": \"666666\"}}', '{\"code\":412,\"msg\":\"手机号或验证码错误！\"}', '2017-11-27 15:29:49');
INSERT INTO `Document` VALUES (1511796882183, 0, 1, '充值(需要支付密码)/提现', '/put/balance', '{\"tag\": \"Privacy\", \"Privacy\": {\"id\": 82001, \"balance+\": 100.15, \"_payPassword\": \"123456\"}}', '{\"Privacy\":{\"code\":200,\"msg\":\"success\",\"id\":82001,\"count\":1},\"code\":200,\"msg\":\"success\"}', '2017-11-27 15:34:42');
INSERT INTO `Document` VALUES (1511963330794, 0, 2, '获取文档列表(即在线解析网页上的共享)-API调用方式', '/get', '{\n    \"Document[]\": {\n        \"Document\": {\n            \"@role\": \"login\",\n            \"@order\": \"version-,date-\"\n        }\n    }\n}', NULL, '2017-11-29 13:48:50');
INSERT INTO `Document` VALUES (1511963677324, 0, 1, '获取用户', '/get', '{\"User\": {\"id\": 82001}}', '{\"User\":{\"id\":82001,\"sex\":0,\"name\":\"测试改名\",\"tag\":\"APIJSON User\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\",\"contactIdList\":[82025,82024,82003,93793,70793],\"pictureList\":[\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"},\"code\":200,\"msg\":\"success\"}', '2017-11-29 13:54:37');
INSERT INTO `Document` VALUES (1511963722969, 0, 1, '获取用户列表(\"id{}\":contactIdList)-朋友页', '/get', '{\n    \"User[]\": {\n        \"count\": 10,\n        \"page\": 0,\n        \"User\": {\n            \"@column\": \"id,sex,name,tag,head\",\n            \"@order\": \"name+\",\n            \"id{}\": [\n                82002,\n                82004,\n                70793\n            ]\n        }\n    }\n}', '{\"User[]\":[{\"id\":82002,\"sex\":1,\"name\":\"Happy~\",\"tag\":\"iOS\",\"head\":\"http://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000\"},{\"id\":70793,\"sex\":0,\"name\":\"Strong\",\"tag\":\"djdj\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\"},{\"id\":82004,\"sex\":0,\"name\":\"Tommy\",\"tag\":\"fasef\",\"head\":\"http://static.oschina.net/uploads/user/1200/2400261_50.png?t=1439638750000\"}],\"code\":200,\"msg\":\"success\"}', '2017-11-29 13:55:22');
INSERT INTO `Document` VALUES (1511963990071, 0, 1, '获取动态Moment+User+praiseUserList', '/get', '{\n    \"Moment\": {\n        \"id\": 15\n    },\n    \"User\": {\n        \"id@\": \"Moment/userId\",\n        \"@column\": \"id,name,head\"\n    },\n    \"User[]\": {\n        \"count\": 10,\n        \"User\": {\n            \"id{}@\": \"Moment/praiseUserIdList\",\n            \"@column\": \"id,name\"\n        }\n    }\n}', '{\"Moment\":{\"id\":15,\"userId\":70793,\"date\":\"2017-02-08 16:06:11.0\",\"content\":\"APIJSON is a JSON Transmission Structure Protocol…\",\"praiseUserIdList\":[82055,82002,38710],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"]},\"User\":{\"id\":70793,\"name\":\"Strong\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\"},\"User[]\":[{\"id\":38710,\"name\":\"TommyLemon\"},{\"id\":82002,\"name\":\"Happy~\"},{\"id\":82055,\"name\":\"Solid\"}],\"code\":200,\"msg\":\"success\"}', '2017-11-29 13:59:50');
INSERT INTO `Document` VALUES (1511964176688, 0, 1, '获取评论列表-动态详情页Comment+User', '/get', '{\n    \"[]\": {\n        \"count\": 20,\n        \"page\": 0,\n        \"Comment\": {\n            \"@order\": \"date+\",\n            \"momentId\": 15\n        },\n        \"User\": {\n            \"id@\": \"/Comment/userId\",\n            \"@column\": \"id,name,head\"\n        }\n    }\n}', '{\"[]\":[{\"Comment\":{\"id\":176,\"toId\":166,\"userId\":38710,\"momentId\":15,\"date\":\"2017-03-25 20:28:03.0\",\"content\":\"thank you\"},\"User\":{\"id\":38710,\"name\":\"TommyLemon\",\"head\":\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\"}},{\"Comment\":{\"id\":1490863469638,\"toId\":0,\"userId\":82002,\"momentId\":15,\"date\":\"2017-03-30 16:44:29.0\",\"content\":\"Just do it\"},\"User\":{\"id\":82002,\"name\":\"Happy~\",\"head\":\"http://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000\"}},{\"Comment\":{\"id\":1490875660259,\"toId\":1490863469638,\"userId\":82055,\"momentId\":15,\"date\":\"2017-03-30 20:07:40.0\",\"content\":\"I prove wht you said(??????)\"},\"User\":{\"id\":82055,\"name\":\"Solid\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1508227456407,\"toId\":0,\"userId\":82001,\"momentId\":15,\"date\":\"2017-10-17 16:04:16.0\",\"content\":\"hsh\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1509346606036,\"toId\":0,\"userId\":82001,\"momentId\":15,\"date\":\"2017-10-30 14:56:46.0\",\"content\":\"测\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1525933255901,\"userId\":82001,\"momentId\":15,\"date\":\"2018-05-10 14:20:55.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1527949266037,\"userId\":82001,\"momentId\":15,\"date\":\"2018-06-02 22:21:06.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1528339777338,\"userId\":82001,\"momentId\":15,\"date\":\"2018-06-07 10:49:37.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1528366915282,\"userId\":82001,\"momentId\":15,\"date\":\"2018-06-07 18:21:55.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1528366931410,\"userId\":82001,\"momentId\":15,\"date\":\"2018-06-07 18:22:11.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1528392773597,\"userId\":82001,\"momentId\":15,\"date\":\"2018-06-08 01:32:53.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1529034360708,\"userId\":82001,\"momentId\":15,\"date\":\"2018-06-15 11:46:00.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1529078537044,\"userId\":82001,\"momentId\":15,\"date\":\"2018-06-16 00:02:17.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1529401004622,\"userId\":82001,\"momentId\":15,\"date\":\"2018-06-19 17:36:44.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1529401505690,\"userId\":82001,\"momentId\":15,\"date\":\"2018-06-19 17:45:05.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1529468113356,\"userId\":82001,\"momentId\":15,\"date\":\"2018-06-20 12:15:13.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1529724026842,\"userId\":82001,\"momentId\":15,\"date\":\"2018-06-23 11:20:26.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1529909214303,\"userId\":82001,\"momentId\":15,\"date\":\"2018-06-25 14:46:54.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1530276831779,\"userId\":82001,\"momentId\":15,\"date\":\"2018-06-29 20:53:51.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1531365764793,\"userId\":82001,\"momentId\":15,\"date\":\"2018-07-12 11:22:44.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}}],\"code\":200,\"msg\":\"success\"}', '2017-11-29 14:02:56');
INSERT INTO `Document` VALUES (1511967853339, 0, 1, '获取动态列表Moment+User+User:parise[]+Comment[]', '/get', '{     \"[]\": {         \"count\": 5,         \"page\": 0,         \"Moment\": {             \"@order\": \"date+\"         },         \"User\": {             \"id@\": \"/Moment/userId\",             \"@column\": \"id,name,head\"         },         \"User[]\": {             \"count\": 10,             \"User\": {                 \"id{}@\": \"[]/Moment/praiseUserIdList\",                 \"@column\": \"id,name\"             }         },         \"[]\": {             \"count\": 6,             \"Comment\": {                 \"@order\": \"date+\",                 \"momentId@\": \"[]/Moment/id\"             },             \"User\": {                 \"id@\": \"/Comment/userId\",                 \"@column\": \"id,name\"             }         }     } }', '{\"[]\":[{\"Moment\":{\"id\":301,\"userId\":93793,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-301\",\"praiseUserIdList\":[38710,93793,82003,82005,82040,82055,82002,82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\"]},\"User\":{\"id\":93793,\"name\":\"Mike\",\"head\":\"http://static.oschina.net/uploads/user/48/96331_50.jpg\"},\"User[]\":[{\"id\":38710,\"name\":\"TommyLemon\"},{\"id\":82001,\"name\":\"测试改名\"},{\"id\":82002,\"name\":\"Happy~\"},{\"id\":82003,\"name\":\"Wechat\"},{\"id\":82005,\"name\":\"Jan\"},{\"id\":82040,\"name\":\"Dream\"},{\"id\":82055,\"name\":\"Solid\"},{\"id\":93793,\"name\":\"Mike\"}],\"[]\":[{\"Comment\":{\"id\":45,\"toId\":0,\"userId\":93793,\"momentId\":301,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-45\"},\"User\":{\"id\":93793,\"name\":\"Mike\"}},{\"Comment\":{\"id\":51,\"toId\":45,\"userId\":82003,\"momentId\":301,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-51\"},\"User\":{\"id\":82003,\"name\":\"Wechat\"}},{\"Comment\":{\"id\":76,\"toId\":45,\"userId\":93793,\"momentId\":301,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-76\"},\"User\":{\"id\":93793,\"name\":\"Mike\"}},{\"Comment\":{\"id\":120,\"toId\":0,\"userId\":93793,\"momentId\":301,\"date\":\"2017-03-02 13:56:06.0\",\"content\":\"This is a Content...-110\"},\"User\":{\"id\":93793,\"name\":\"Mike\"}},{\"Comment\":{\"id\":124,\"toId\":0,\"userId\":82001,\"momentId\":301,\"date\":\"2017-03-02 13:56:06.0\",\"content\":\"This is a Content...-114\"},\"User\":{\"id\":82001,\"name\":\"测试改名\"}},{\"Comment\":{\"id\":1490781009548,\"toId\":51,\"userId\":82001,\"momentId\":301,\"date\":\"2017-03-29 17:50:09.0\",\"content\":\"3\"},\"User\":{\"id\":82001,\"name\":\"测试改名\"}}]},{\"Moment\":{\"id\":58,\"userId\":90814,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-435\",\"praiseUserIdList\":[38710,82003,82005,93793,82006,82044,82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172507_aMmH.jpg\"]},\"User\":{\"id\":90814,\"name\":\"007\",\"head\":\"http://static.oschina.net/uploads/user/51/102723_50.jpg?t=1449212504000\"},\"User[]\":[{\"id\":38710,\"name\":\"TommyLemon\"},{\"id\":82001,\"name\":\"测试改名\"},{\"id\":82003,\"name\":\"Wechat\"},{\"id\":82005,\"name\":\"Jan\"},{\"id\":82006,\"name\":\"Meria\"},{\"id\":82044,\"name\":\"Love\"},{\"id\":93793,\"name\":\"Mike\"}],\"[]\":[{\"Comment\":{\"id\":13,\"toId\":0,\"userId\":82005,\"momentId\":58,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-13\"},\"User\":{\"id\":82005,\"name\":\"Jan\"}},{\"Comment\":{\"id\":77,\"toId\":13,\"userId\":93793,\"momentId\":58,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-77\"},\"User\":{\"id\":93793,\"name\":\"Mike\"}},{\"Comment\":{\"id\":97,\"toId\":13,\"userId\":82006,\"momentId\":58,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-97\"},\"User\":{\"id\":82006,\"name\":\"Meria\"}},{\"Comment\":{\"id\":167,\"userId\":82001,\"momentId\":58,\"date\":\"2017-03-25 19:48:41.0\",\"content\":\"Nice!\"},\"User\":{\"id\":82001,\"name\":\"测试改名\"}},{\"Comment\":{\"id\":173,\"userId\":38710,\"momentId\":58,\"date\":\"2017-03-25 20:25:13.0\",\"content\":\"Good\"},\"User\":{\"id\":38710,\"name\":\"TommyLemon\"}},{\"Comment\":{\"id\":188,\"toId\":97,\"userId\":82001,\"momentId\":58,\"date\":\"2017-03-26 15:21:32.0\",\"content\":\"1646\"},\"User\":{\"id\":82001,\"name\":\"测试改名\"}}]},{\"Moment\":{\"id\":371,\"userId\":82002,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-371\",\"praiseUserIdList\":[90814,93793,82003,82005,82006,82040,82002,82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067\",\"http://static.oschina.net/uploads/img/201604/22172507_aMmH.jpg\",\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\"]},\"User\":{\"id\":82002,\"name\":\"Happy~\",\"head\":\"http://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000\"},\"User[]\":[{\"id\":82001,\"name\":\"测试改名\"},{\"id\":82002,\"name\":\"Happy~\"},{\"id\":82003,\"name\":\"Wechat\"},{\"id\":82005,\"name\":\"Jan\"},{\"id\":82006,\"name\":\"Meria\"},{\"id\":82040,\"name\":\"Dream\"},{\"id\":90814,\"name\":\"007\"},{\"id\":93793,\"name\":\"Mike\"}],\"[]\":[{\"Comment\":{\"id\":68,\"toId\":0,\"userId\":82005,\"momentId\":371,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-68\"},\"User\":{\"id\":82005,\"name\":\"Jan\"}},{\"Comment\":{\"id\":157,\"userId\":93793,\"momentId\":371,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-157\"},\"User\":{\"id\":93793,\"name\":\"Mike\"}},{\"Comment\":{\"id\":110,\"toId\":0,\"userId\":93793,\"momentId\":371,\"date\":\"2017-02-01 19:23:24.0\",\"content\":\"This is a Content...-110\"},\"User\":{\"id\":93793,\"name\":\"Mike\"}},{\"Comment\":{\"id\":114,\"toId\":0,\"userId\":82001,\"momentId\":371,\"date\":\"2017-03-02 13:56:06.0\",\"content\":\"This is a Content...-114\"},\"User\":{\"id\":82001,\"name\":\"测试改名\"}},{\"Comment\":{\"id\":115,\"toId\":0,\"userId\":38710,\"momentId\":371,\"date\":\"2017-03-02 13:56:06.0\",\"content\":\"This is a Content...-115\"},\"User\":{\"id\":38710,\"name\":\"TommyLemon\"}},{\"Comment\":{\"id\":116,\"toId\":0,\"userId\":70793,\"momentId\":371,\"date\":\"2017-03-02 13:56:06.0\",\"content\":\"This is a Content...-116\"},\"User\":{\"id\":70793,\"name\":\"Strong\"}}]},{\"Moment\":{\"id\":170,\"userId\":70793,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-73\",\"praiseUserIdList\":[82044,82002,82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172508_mpwj.jpg\"]},\"User\":{\"id\":70793,\"name\":\"Strong\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\"},\"User[]\":[{\"id\":82001,\"name\":\"测试改名\"},{\"id\":82002,\"name\":\"Happy~\"},{\"id\":82044,\"name\":\"Love\"}],\"[]\":[{\"Comment\":{\"id\":44,\"toId\":0,\"userId\":82003,\"momentId\":170,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-44\"},\"User\":{\"id\":82003,\"name\":\"Wechat\"}},{\"Comment\":{\"id\":54,\"toId\":0,\"userId\":82004,\"momentId\":170,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-54\"},\"User\":{\"id\":82004,\"name\":\"Tommy\"}},{\"Comment\":{\"id\":99,\"toId\":44,\"userId\":70793,\"momentId\":170,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-99\"},\"User\":{\"id\":70793,\"name\":\"Strong\"}},{\"Comment\":{\"id\":206,\"toId\":54,\"userId\":82001,\"momentId\":170,\"date\":\"2017-03-29 11:04:23.0\",\"content\":\"ejej\"},\"User\":{\"id\":82001,\"name\":\"测试改名\"}},{\"Comment\":{\"id\":1490780759866,\"toId\":99,\"userId\":82001,\"momentId\":170,\"date\":\"2017-03-29 17:45:59.0\",\"content\":\"99\"},\"User\":{\"id\":82001,\"name\":\"测试改名\"}},{\"Comment\":{\"id\":1490863661426,\"toId\":1490780759866,\"userId\":70793,\"momentId\":170,\"date\":\"2017-03-30 16:47:41.0\",\"content\":\"66\"},\"User\":{\"id\":70793,\"name\":\"Strong\"}}]},{\"Moment\":{\"id\":470,\"userId\":38710,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-470\",\"praiseUserIdList\":[82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172507_Pz9Y.png\"]},\"User\":{\"id\":38710,\"name\":\"TommyLemon\",\"head\":\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\"},\"User[]\":[{\"id\":82001,\"name\":\"测试改名\"}],\"[]\":[{\"Comment\":{\"id\":4,\"toId\":0,\"userId\":38710,\"momentId\":470,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-4\"},\"User\":{\"id\":38710,\"name\":\"TommyLemon\"}},{\"Comment\":{\"id\":22,\"toId\":221,\"userId\":82001,\"momentId\":470,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"测试修改评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\"}},{\"Comment\":{\"id\":47,\"toId\":4,\"userId\":70793,\"momentId\":470,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-47\"},\"User\":{\"id\":70793,\"name\":\"Strong\"}},{\"Comment\":{\"id\":1490863507114,\"toId\":4,\"userId\":82003,\"momentId\":470,\"date\":\"2017-03-30 16:45:07.0\",\"content\":\"yes\"},\"User\":{\"id\":82003,\"name\":\"Wechat\"}},{\"Comment\":{\"id\":1490863903900,\"toId\":0,\"userId\":82006,\"momentId\":470,\"date\":\"2017-03-30 16:51:43.0\",\"content\":\"SOGA\"},\"User\":{\"id\":82006,\"name\":\"Meria\"}},{\"Comment\":{\"id\":1491740899179,\"toId\":0,\"userId\":82001,\"momentId\":470,\"date\":\"2017-04-09 20:28:19.0\",\"content\":\"www\"},\"User\":{\"id\":82001,\"name\":\"测试改名\"}}]}],\"code\":200,\"msg\":\"success\"}', '2017-11-29 15:04:13');
INSERT INTO `Document` VALUES (1511969181103, 0, 1, '添加朋友', '/put', '{\n    \"User\": {\n        \"id\": 82001,\n        \"contactIdList+\": [93793]\n    },\n    \"tag\": \"User\"\n}', '{\"User\":{\"id\":82001,\"contactIdList+\":[93793],\"@role\":\"owner\"},\"code\":409,\"msg\":\"PUT User, contactIdList:93793 已存在！\"}', '2017-11-29 15:26:21');
INSERT INTO `Document` VALUES (1511969417632, 0, 1, '点赞/取消点赞', '/put', '{\n    \"Moment\": {\n        \"id\": 15,\n        \"praiseUserIdList-\": [\n            82001\n        ]\n    },\n    \"tag\": \"Moment\"\n}', '{\"Moment\":{\"code\":200,\"msg\":\"success\",\"id\":15,\"count\":1},\"code\":200,\"msg\":\"success\"}', '2017-11-29 15:30:17');
INSERT INTO `Document` VALUES (1511969630371, 0, 1, '新增评论', '/post', '{     \"Comment\": {         \"momentId\": 15,         \"content\": \"测试新增评论\"     },     \"tag\": \"Comment\" }', '{\"Comment\":{\"code\":200,\"msg\":\"success\",\"id\":1533140610714,\"count\":1},\"code\":200,\"msg\":\"success\"}', '2017-11-29 15:33:50');
INSERT INTO `Document` VALUES (1511970009071, 0, 1, '新增动态', '/post', '{     \"Moment\": {         \"content\": \"测试新增动态\",         \"pictureList\": [\"http://static.oschina.net/uploads/user/48/96331_50.jpg\"         ]     },     \"tag\": \"Moment\" }', '{\"Moment\":{\"code\":200,\"msg\":\"success\",\"id\":1533140610716,\"count\":1},\"code\":200,\"msg\":\"success\"}', '2017-11-29 15:40:09');
INSERT INTO `Document` VALUES (1511970224332, 0, 1, '修改用户信息', '/put', '{\r     \"User\": {\r         \"id\": 82001,\r         \"name\": \"测试账号\"\r     },\r     \"tag\": \"User\"\r }', '{\"User\":{\"code\":200,\"msg\":\"success\",\"id\":82001,\"count\":1},\"code\":200,\"msg\":\"success\"}', '2017-11-29 15:43:44');
INSERT INTO `Document` VALUES (1512216131854, 0, 1, '获取文档列表(即在线解析网页上的文档)-表和字段、请求格式限制', '/get', '{\n    \"[]\": {\n        \"Table\": {\n            \"TABLE_SCHEMA\": \"sys\",\n            \"TABLE_TYPE\": \"BASE TABLE\",\n            \"TABLE_NAME!$\": [\n                \"\\\\_%\",\n                \"sys\\\\_%\",\n                \"system\\\\_%\"\n            ],\n            \"@order\": \"TABLE_NAME+\",\n            \"@column\": \"TABLE_NAME,TABLE_COMMENT\"\n        },\n        \"Column[]\": {\n            \"Column\": {\n                \"TABLE_NAME@\": \"[]/Table/TABLE_NAME\",\n                \"@column\": \"COLUMN_NAME,COLUMN_TYPE,IS_NULLABLE,COLUMN_COMMENT\"\n            }\n        }\n    },\n    \"Request[]\": {\n        \"Request\": {\n            \"@order\": \"version-,method-\"\n        }\n    }\n}', NULL, '2017-12-02 12:02:11');
INSERT INTO `Document` VALUES (1521901518764, 0, 2, '功能符(对象关键词): ⑤从pictureList获取第0张图片：', '/get', '{     \"User\": {         \"id\": 38710,         \"@position\": 0,         \"firstPicture()\": \"getFromArray(pictureList,@position)\"     } }', '{\"User\":{\"id\":38710,\"sex\":0,\"name\":\"TommyLemon\",\"tag\":\"Android&Java\",\"head\":\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"contactIdList\":[82003,82005,90814,82004,82009,82002,82044,93793,70793],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\",\"@position\":0,\"firstPicture\":\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\"},\"code\":200,\"msg\":\"success\"}', '2018-03-24 14:25:18');
INSERT INTO `Document` VALUES (1521901610783, 0, 2, '功能符(对象关键词): ④查询 按userId分组、id最大值>=100 的Moment数组', '/get', '{\"[]\":{\"count\":10,\"Moment\":{\"@column\":\"userId;max(id):maxId\",\"@group\":\"userId\",\"@having\":\"maxId>=100\"}}}', '{\"[]\":[{\"Moment\":{\"userId\":38710,\"maxId\":1537025707417}},{\"Moment\":{\"userId\":70793,\"maxId\":551}},{\"Moment\":{\"userId\":82001,\"maxId\":1537025634931}},{\"Moment\":{\"userId\":82002,\"maxId\":1531062713966}},{\"Moment\":{\"userId\":82003,\"maxId\":1536805585275}},{\"Moment\":{\"userId\":82045,\"maxId\":1508073178489}},{\"Moment\":{\"userId\":82056,\"maxId\":1514858533480}},{\"Moment\":{\"userId\":93793,\"maxId\":1516086423441}},{\"Moment\":{\"userId\":1520242280259,\"maxId\":1520242333325}},{\"Moment\":{\"userId\":1523626157302,\"maxId\":1523936332614}}],\"code\":200,\"msg\":\"success\"}', '2018-03-24 14:26:50');
INSERT INTO `Document` VALUES (1521901682845, 0, 2, '功能符(对象关键词): ③查询按userId分组的Moment数组', '/get', '{\"[]\":{\"count\":10,\"Moment\":{\"@column\":\"userId,id\",\"@group\":\"userId,id\"}}}', '{\"[]\":[{\"Moment\":{\"userId\":38710,\"id\":235}},{\"Moment\":{\"userId\":38710,\"id\":470}},{\"Moment\":{\"userId\":38710,\"id\":511}},{\"Moment\":{\"userId\":38710,\"id\":595}},{\"Moment\":{\"userId\":38710,\"id\":704}},{\"Moment\":{\"userId\":38710,\"id\":1491200468898}},{\"Moment\":{\"userId\":38710,\"id\":1493835799335}},{\"Moment\":{\"userId\":38710,\"id\":1512314438990}},{\"Moment\":{\"userId\":38710,\"id\":1513094436910}},{\"Moment\":{\"userId\":38710,\"id\":1537025625613}}],\"code\":200,\"msg\":\"success\"}', '2018-03-24 14:28:02');
INSERT INTO `Document` VALUES (1521901746808, 0, 2, '功能符(对象关键词): ②查询按 name降序、id默认顺序 排序的User数组', '/get', '{\"[]\":{\"count\":10,\"User\":{\"@column\":\"name,id\",\"@order\":\"name-,id\"}}}', '{\"[]\":[{\"User\":{\"name\":\"赵钱孙李\",\"id\":1508072071492}},{\"User\":{\"name\":\"测试改名\",\"id\":82001}},{\"User\":{\"name\":\"梦\",\"id\":1528264711016}},{\"User\":{\"name\":\"宁旭\",\"id\":1532188114543}},{\"User\":{\"name\":\"四五六\",\"id\":1508072160401}},{\"User\":{\"name\":\"哈哈哈\",\"id\":1524042900591}},{\"User\":{\"name\":\"周吴郑王\",\"id\":1508072105320}},{\"User\":{\"name\":\"七八九十\",\"id\":1508072202871}},{\"User\":{\"name\":\"一二三\",\"id\":1499057230629}},{\"User\":{\"name\":\"Yong\",\"id\":82027}}],\"code\":200,\"msg\":\"success\"}', '2018-03-24 14:29:06');
INSERT INTO `Document` VALUES (1521901787202, 0, 2, '功能符(对象关键词): ①只查询id,sex,name这几列并且请求结果也按照这个顺序', '/get', '{\"User\":{\"@column\":\"id,sex,name\",\"id\":38710}}', '{\"User\":{\"id\":38710,\"sex\":0,\"name\":\"TommyLemon\"},\"code\":200,\"msg\":\"success\"}', '2018-03-24 14:29:47');
INSERT INTO `Document` VALUES (1521902033331, 0, 2, '功能符(数组关键词): ③查询User数组和对应的User总数', '/get', '{\"[]\":{\"query\":2,\"count\":5,\"User\":{}},\"total@\":\"/[]/total\"}', '{\"[]\":[{\"User\":{\"id\":38710,\"sex\":0,\"name\":\"TommyLemon\",\"tag\":\"Android&Java\",\"head\":\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"contactIdList\":[82003,82005,90814,82004,82009,82002,82044,93793,70793],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":70793,\"sex\":0,\"name\":\"Strong\",\"tag\":\"djdj\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\",\"contactIdList\":[38710,82002],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/788c0a7e11a\",\"https://camo.githubusercontent.com/f513f67\"],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82001,\"sex\":0,\"name\":\"测试改名\",\"tag\":\"APIJSON User\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\",\"contactIdList\":[82025,82024,82003,93793,82012,82028,82021,82006,82030,82035],\"pictureList\":[\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82002,\"sex\":1,\"name\":\"Happy~\",\"tag\":\"iOS\",\"head\":\"http://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000\",\"contactIdList\":[82005,82001,38710],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82003,\"sex\":1,\"name\":\"Wechat\",\"head\":\"http://common.cnblogs.com/images/wechat.png\",\"contactIdList\":[82001,93793],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}}],\"total\":121,\"code\":200,\"msg\":\"success\"}', '2018-03-24 14:33:53');
INSERT INTO `Document` VALUES (1521902069870, 0, 2, '功能符(数组关键词): ②查询第3页的User数组，每页5个', '/get', '{\"[]\":{\"count\":5,\"page\":3,\"User\":{}}}', '{\"[]\":[{\"User\":{\"id\":82025,\"sex\":1,\"name\":\"Tommy\",\"head\":\"http://static.oschina.net/uploads/user/629/1258821_50.jpg?t=1378063141000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82026,\"sex\":0,\"name\":\"iOS\",\"head\":\"http://static.oschina.net/uploads/user/1200/2400261_50.png?t=1439638750000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82027,\"sex\":0,\"name\":\"Yong\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82028,\"sex\":1,\"name\":\"gaeg\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82029,\"sex\":0,\"name\":\"GASG\",\"head\":\"http://common.cnblogs.com/images/wechat.png\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}}],\"code\":200,\"msg\":\"success\"}', '2018-03-24 14:34:29');
INSERT INTO `Document` VALUES (1521902110679, 0, 2, '功能符(数组关键词): ①查询User数组，最多5个', '/get', '{\"[]\":{\"count\":5,\"User\":{}}}', '{\"[]\":[{\"User\":{\"id\":38710,\"sex\":0,\"name\":\"TommyLemon\",\"tag\":\"Android&Java\",\"head\":\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"contactIdList\":[82003,82005,90814,82004,82009,82002,82044,93793,70793],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":70793,\"sex\":0,\"name\":\"Strong\",\"tag\":\"djdj\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\",\"contactIdList\":[38710,82002],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/788c0a7e11a\",\"https://camo.githubusercontent.com/f513f67\"],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82001,\"sex\":0,\"name\":\"测试改名\",\"tag\":\"APIJSON User\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\",\"contactIdList\":[82025,82024,82003,93793,82012,82028,82021,82006,82030,82035],\"pictureList\":[\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82002,\"sex\":1,\"name\":\"Happy~\",\"tag\":\"iOS\",\"head\":\"http://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000\",\"contactIdList\":[82005,82001,38710],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82003,\"sex\":1,\"name\":\"Wechat\",\"head\":\"http://common.cnblogs.com/images/wechat.png\",\"contactIdList\":[82001,93793],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}}],\"code\":200,\"msg\":\"success\"}', '2018-03-24 14:35:10');
INSERT INTO `Document` VALUES (1521903761688, 0, 2, '功能符(逻辑运算): ③ ! 非运算', '/head', '{\"User\":{\"id!{}\":[82001,38710]}}', '{\"User\":{\"code\":200,\"msg\":\"success\",\"count\":119},\"code\":200,\"msg\":\"success\"}', '2018-03-24 15:02:41');
INSERT INTO `Document` VALUES (1521903828409, 0, 2, '功能符(逻辑运算): ② | 或运算', '/head', '{\"User\":{\"id|{}\":\">90000,<=80000\"}}', '{\"User\":{\"code\":200,\"msg\":\"success\",\"count\":72},\"code\":200,\"msg\":\"success\"}', '2018-03-24 15:03:48');
INSERT INTO `Document` VALUES (1521903882829, 0, 2, '功能符(逻辑运算): ① & 与运算', '/head', '{\"User\":{\"id&{}\":\">80000,<=90000\"}}', '{\"User\":{\"code\":200,\"msg\":\"success\",\"count\":49},\"code\":200,\"msg\":\"success\"}', '2018-03-24 15:04:42');
INSERT INTO `Document` VALUES (1521904098110, 0, 2, '功能符: 减少 或 去除', '/put/balance', '{\n    \n    \"Privacy\": {\n        \"id\": 82001,\n        \"balance+\": -100,\n        \"_payPassword\": \"123456\"\n    },\"tag\": \"Privacy\"\n}', '{\"Privacy\":{\"code\":200,\"msg\":\"success\",\"id\":82001,\"count\":1},\"code\":200,\"msg\":\"success\"}', '2018-03-24 15:08:18');
INSERT INTO `Document` VALUES (1521904162065, 0, 2, '功能符: 增加 或 扩展', '/put', '{\n    \"Moment\": {\n        \"id\": 15,\n        \"praiseUserIdList+\": [\n            82001\n        ]\n    },\n    \"tag\": \"Moment\"\n}', '{\"Moment\":{\"code\":200,\"msg\":\"success\",\"id\":15,\"count\":1},\"code\":200,\"msg\":\"success\"}', '2018-03-24 15:09:22');
INSERT INTO `Document` VALUES (1521904337053, 0, 2, '功能符: 新建别名', '/get', '{\"Comment\":{\"@column\":\"id,toId:parentId\",\"id\":51}}', '{\"Comment\":{\"id\":51,\"parentId\":45},\"code\":200,\"msg\":\"success\"}', '2018-03-24 15:12:17');
INSERT INTO `Document` VALUES (1521904394041, 0, 2, '功能符: 正则匹配', '/get', '{\"User[]\":{\"count\":3,\"User\":{\"name?\":\"^[0-9]+$\"}}}', '{\"User[]\":[{\"id\":90814,\"sex\":0,\"name\":\"007\",\"head\":\"http://static.oschina.net/uploads/user/51/102723_50.jpg?t=1449212504000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":1528339692804,\"sex\":1,\"name\":\"568599\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[1528250827953,1528264711016],\"date\":\"2018-06-07 10:48:12.0\"}],\"code\":200,\"msg\":\"success\"}', '2018-03-24 15:13:14');
INSERT INTO `Document` VALUES (1521904437583, 0, 2, '功能符: 模糊搜索', '/get', '{\"User[]\":{\"count\":3,\"User\":{\"name$\":\"%m%\"}}}', '{\"User[]\":[{\"id\":38710,\"sex\":0,\"name\":\"TommyLemon\",\"tag\":\"Android&Java\",\"head\":\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"contactIdList\":[82003,82005,90814,82004,82009,82002,82044,93793,70793],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":82004,\"sex\":0,\"name\":\"Tommy\",\"tag\":\"fasef\",\"head\":\"http://static.oschina.net/uploads/user/1200/2400261_50.png?t=1439638750000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":82006,\"sex\":1,\"name\":\"Meria\",\"head\":\"http://static.oschina.net/uploads/user/998/1997902_50.jpg?t=1407806577000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}],\"code\":200,\"msg\":\"success\"}', '2018-03-24 15:13:57');
INSERT INTO `Document` VALUES (1521904547991, 0, 2, '功能符: 引用赋值', '/get', '{\"Moment\":{\n   \"userId\":38710\n},\n\"User\":{\n   \"id@\":\"/Moment/userId\"\n}}', '{\"Moment\":{\"id\":235,\"userId\":38710,\"date\":\"2017-02-08 16:06:11.0\",\"content\":\"APIJSON,let interfaces and documents go to hell !\",\"praiseUserIdList\":[82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_mpwj.jpg\",\"http://static.oschina.net/uploads/user/1332/2664107_50.jpg?t=1457405500000\"]},\"User\":{\"id\":38710,\"sex\":0,\"name\":\"TommyLemon\",\"tag\":\"Android&Java\",\"head\":\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"contactIdList\":[82003,82005,90814,82004,82009,82002,82044,93793,70793],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"},\"code\":200,\"msg\":\"success\"}', '2018-03-24 15:15:47');
INSERT INTO `Document` VALUES (1521904617126, 0, 2, '功能符: 远程调用函数', '/get', '{     \"Moment\": {         \"id\": 301,         \"@column\": \"userId,praiseUserIdList\",         \"isPraised()\": \"isContain(praiseUserIdList,userId)\"     } }', '{\"Moment\":{\"userId\":93793,\"praiseUserIdList\":[38710,93793,82003,82005,82040,82055,82002,82001],\"isPraised\":true},\"code\":200,\"msg\":\"success\"}', '2018-03-24 15:16:57');
INSERT INTO `Document` VALUES (1521904653621, 0, 2, '功能符: 包含选项范围', '/get', '{\"User[]\":{\"count\":3,\"User\":{\"contactIdList<>\":38710}}}', '{\"User[]\":[{\"id\":70793,\"sex\":0,\"name\":\"Strong\",\"tag\":\"djdj\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\",\"contactIdList\":[38710,82002],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/788c0a7e11a\",\"https://camo.githubusercontent.com/f513f67\"],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":82002,\"sex\":1,\"name\":\"Happy~\",\"tag\":\"iOS\",\"head\":\"http://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000\",\"contactIdList\":[82005,82001,38710],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":82005,\"sex\":1,\"name\":\"Jan\",\"tag\":\"AG\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[82001,38710,1532439021068],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}],\"code\":200,\"msg\":\"success\"}', '2018-03-24 15:17:33');
INSERT INTO `Document` VALUES (1521904698934, 0, 2, '功能符: 匹配条件范围', '/get', '{\"User[]\":{\"count\":3,\"User\":{\"id{}\":\"<=80000,>90000\"}}}', '{\"User[]\":[{\"id\":38710,\"sex\":0,\"name\":\"TommyLemon\",\"tag\":\"Android&Java\",\"head\":\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"contactIdList\":[82003,82005,90814,82004,82009,82002,82044,93793,70793],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":70793,\"sex\":0,\"name\":\"Strong\",\"tag\":\"djdj\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\",\"contactIdList\":[38710,82002],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/788c0a7e11a\",\"https://camo.githubusercontent.com/f513f67\"],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":90814,\"sex\":0,\"name\":\"007\",\"head\":\"http://static.oschina.net/uploads/user/51/102723_50.jpg?t=1449212504000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}],\"code\":200,\"msg\":\"success\"}', '2018-03-24 15:18:18');
INSERT INTO `Document` VALUES (1521904756673, 0, 2, '功能符: 查询数组', '/get', '{\"User[]\":{\"count\":3,\"User\":{}}}', '{\"User[]\":[{\"id\":38710,\"sex\":0,\"name\":\"TommyLemon\",\"tag\":\"Android&Java\",\"head\":\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"contactIdList\":[82003,82005,90814,82004,82009,82002,82044,93793,70793],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":70793,\"sex\":0,\"name\":\"Strong\",\"tag\":\"djdj\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\",\"contactIdList\":[38710,82002],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/788c0a7e11a\",\"https://camo.githubusercontent.com/f513f67\"],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":82001,\"sex\":0,\"name\":\"测试改名\",\"tag\":\"APIJSON User\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\",\"contactIdList\":[82025,82024,82003,93793],\"pictureList\":[\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"}],\"code\":200,\"msg\":\"success\"}', '2018-03-24 15:19:16');
INSERT INTO `Document` VALUES (1521905263827, 0, 2, '操作方法(DELETE):  删除数据', '/delete', '{\n   \"Moment\":{\n     \"id\":120\n   },\n   \"tag\":\"Moment\"\n}', '{\"Moment\":{\"code\":404,\"msg\":\"可能对象不存在！\",\"id\":120,\"count\":0},\"Comment\":{\"code\":404,\"msg\":\"可能对象不存在！\",\"count\":0},\"code\":200,\"msg\":\"success\"}', '2018-03-24 15:27:43');
INSERT INTO `Document` VALUES (1521905599149, 0, 2, '操作方法(PUT):  修改数据，只修改所传的字段', '/put', '{\n   \"Moment\":{\n     \"id\":235,\n     \"content\":\"APIJSON,let interfaces and documents go to hell !\"\n   },\n   \"tag\":\"Moment\"\n}', '{\"Moment\":{\"code\":200,\"msg\":\"success\",\"id\":235,\"count\":1},\"code\":200,\"msg\":\"success\"}', '2018-03-24 15:33:19');
INSERT INTO `Document` VALUES (1521905680679, 0, 2, '操作方法(POST):  新增数据', '/post', '{     \"Moment\": {         \"content\": \"APIJSON,let interfaces and documents go to hell !\"     },     \"tag\": \"Moment\" }', '{\"Moment\":{\"code\":200,\"msg\":\"success\",\"id\":1538112282445,\"count\":1},\"code\":200,\"msg\":\"success\"}', '2018-03-24 15:34:40');
INSERT INTO `Document` VALUES (1521905787849, 0, 2, '操作方法(HEADS):  安全/私密获取数量，用于获取银行卡数量等 对安全性要求高的数据总数', '/heads', '{\n    \"Login\": {\n        \"userId\": 38710,\"type\":1\n    },\n    \"tag\": \"Login\"\n}', '{\"Login\":{\"code\":200,\"msg\":\"success\",\"count\":1},\"code\":200,\"msg\":\"success\"}', '2018-03-24 15:36:27');
INSERT INTO `Document` VALUES (1521905868718, 0, 2, '操作方法(GETS):  安全/私密获取数据，用于获取钱包等 对安全性要求高的数据', '/gets', '{\n    \"Privacy\": {\n        \"id\": 82001\n    },\n    \"tag\": \"Privacy\"\n}', '{\"Privacy\":{\"id\":82001,\"certified\":1,\"phone\":13000082001,\"balance\":9832.86},\"code\":200,\"msg\":\"success\"}', '2018-03-24 15:37:48');
INSERT INTO `Document` VALUES (1521905895590, 0, 2, '操作方法(HEAD):  普通获取数量，可用浏览器调试', '/head', '{\n   \"Moment\":{\n     \"userId\":38710\n   }\n}', '{\"Moment\":{\"code\":200,\"msg\":\"success\",\"count\":10},\"code\":200,\"msg\":\"success\"}', '2018-03-24 15:38:15');
INSERT INTO `Document` VALUES (1521905913187, 0, 2, '操作方法(GET):  普通获取数据，可用浏览器调试', '/get', '{\n   \"Moment\":{\n     \"id\":235\n   }\n}', '{\"Moment\":{\"id\":235,\"userId\":38710,\"date\":\"2017-02-08 16:06:11.0\",\"content\":\"APIJSON,let interfaces and documents go to hell !\",\"praiseUserIdList\":[82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_mpwj.jpg\",\"http://static.oschina.net/uploads/user/1332/2664107_50.jpg?t=1457405500000\"]},\"code\":200,\"msg\":\"success\"}', '2018-03-24 15:38:33');
INSERT INTO `Document` VALUES (1521906240331, 0, 2, 'User发布的Moment列表，每个Moment包括 1.发布者User 2.前3条Comment: ③不查已获取的User', '/get', '{\n   \"[]\":{\n     \"page\":0,\n     \"count\":3, \n     \"Moment\":{\n       \"userId\":38710\n     },\n     \"Comment[]\":{\n       \"count\":3,\n       \"Comment\":{\n         \"momentId@\":\"[]/Moment/id\"\n       }\n     }\n   }\n}', '{\"[]\":[{\"Moment\":{\"id\":235,\"userId\":38710,\"date\":\"2017-02-08 16:06:11.0\",\"content\":\"APIJSON,let interfaces and documents go to hell !\",\"praiseUserIdList\":[82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_mpwj.jpg\",\"http://static.oschina.net/uploads/user/1332/2664107_50.jpg?t=1457405500000\"]},\"Comment[]\":[{\"id\":160,\"toId\":0,\"userId\":82001,\"momentId\":235,\"date\":\"2017-03-02 13:56:06.0\",\"content\":\"This is a Content...-160\"},{\"id\":163,\"toId\":0,\"userId\":82001,\"momentId\":235,\"date\":\"2017-03-02 13:56:06.0\",\"content\":\"This is a Content...-163\"},{\"id\":168,\"toId\":1490442545077,\"userId\":82001,\"momentId\":235,\"date\":\"2017-03-25 19:49:14.0\",\"content\":\"???\"}]},{\"Moment\":{\"id\":470,\"userId\":38710,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-470\",\"praiseUserIdList\":[82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172507_Pz9Y.png\"]},\"Comment[]\":[{\"id\":4,\"toId\":0,\"userId\":38710,\"momentId\":470,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-4\"},{\"id\":22,\"toId\":221,\"userId\":82001,\"momentId\":470,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"测试修改评论\"},{\"id\":47,\"toId\":4,\"userId\":70793,\"momentId\":470,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-47\"}]},{\"Moment\":{\"id\":511,\"userId\":38710,\"date\":\"2017-02-08 16:06:11.0\",\"praiseUserIdList\":[70793,93793,82001],\"pictureList\":[\"https://camo.githubusercontent.com/f513fa631bd780dc0ec3cf2663777e356dc3664f/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343733323232332d3337333933303233322e6a7067\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_aMmH.jpg\",\"https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067\"]},\"Comment[]\":[{\"id\":178,\"userId\":38710,\"momentId\":511,\"date\":\"2017-03-25 20:30:55.0\",\"content\":\"wbw\"},{\"id\":1490863711703,\"toId\":0,\"userId\":70793,\"momentId\":511,\"date\":\"2017-03-30 16:48:31.0\",\"content\":\"I hope I can join\"},{\"id\":1490863717947,\"toId\":178,\"userId\":70793,\"momentId\":511,\"date\":\"2017-03-30 16:48:37.0\",\"content\":\"what?\"}]}],\"code\":200,\"msg\":\"success\"}', '2018-03-24 15:44:00');
INSERT INTO `Document` VALUES (1521906265959, 0, 2, 'User发布的Moment列表，每个Moment包括 1.发布者User 2.前3条Comment: ②省去重复的User', '/get', '{\n   \"User\":{\n     \"id\":38710\n   },\n   \"[]\":{\n     \"page\":0,\n     \"count\":3, \n     \"Moment\":{\n       \"userId\":38710\n     }, \n     \"Comment[]\":{\n       \"count\":3,\n       \"Comment\":{\n         \"momentId@\":\"[]/Moment/id\"\n       }\n     }\n   }\n}', '{\"User\":{\"id\":38710,\"sex\":0,\"name\":\"TommyLemon\",\"tag\":\"Android&Java\",\"head\":\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"contactIdList\":[82003,82005,90814,82004,82009,82002,82044,93793,70793],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"},\"[]\":[{\"Moment\":{\"id\":235,\"userId\":38710,\"date\":\"2017-02-08 16:06:11.0\",\"content\":\"APIJSON,let interfaces and documents go to hell !\",\"praiseUserIdList\":[82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_mpwj.jpg\",\"http://static.oschina.net/uploads/user/1332/2664107_50.jpg?t=1457405500000\"]},\"Comment[]\":[{\"id\":160,\"toId\":0,\"userId\":82001,\"momentId\":235,\"date\":\"2017-03-02 13:56:06.0\",\"content\":\"This is a Content...-160\"},{\"id\":163,\"toId\":0,\"userId\":82001,\"momentId\":235,\"date\":\"2017-03-02 13:56:06.0\",\"content\":\"This is a Content...-163\"},{\"id\":168,\"toId\":1490442545077,\"userId\":82001,\"momentId\":235,\"date\":\"2017-03-25 19:49:14.0\",\"content\":\"???\"}]},{\"Moment\":{\"id\":470,\"userId\":38710,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-470\",\"praiseUserIdList\":[82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172507_Pz9Y.png\"]},\"Comment[]\":[{\"id\":4,\"toId\":0,\"userId\":38710,\"momentId\":470,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-4\"},{\"id\":22,\"toId\":221,\"userId\":82001,\"momentId\":470,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"测试修改评论\"},{\"id\":47,\"toId\":4,\"userId\":70793,\"momentId\":470,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-47\"}]},{\"Moment\":{\"id\":511,\"userId\":38710,\"date\":\"2017-02-08 16:06:11.0\",\"praiseUserIdList\":[70793,93793,82001],\"pictureList\":[\"https://camo.githubusercontent.com/f513fa631bd780dc0ec3cf2663777e356dc3664f/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343733323232332d3337333933303233322e6a7067\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_aMmH.jpg\",\"https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067\"]},\"Comment[]\":[{\"id\":178,\"userId\":38710,\"momentId\":511,\"date\":\"2017-03-25 20:30:55.0\",\"content\":\"wbw\"},{\"id\":1490863711703,\"toId\":0,\"userId\":70793,\"momentId\":511,\"date\":\"2017-03-30 16:48:31.0\",\"content\":\"I hope I can join\"},{\"id\":1490863717947,\"toId\":178,\"userId\":70793,\"momentId\":511,\"date\":\"2017-03-30 16:48:37.0\",\"content\":\"what?\"}]}],\"code\":200,\"msg\":\"success\"}', '2018-03-24 15:44:25');
INSERT INTO `Document` VALUES (1521906517000, 0, 2, 'User发布的Moment列表，每个Moment包括 1.发布者User 2.前3条Comment: ①指定id', '/get', '{\n    \"[]\": {\n        \"page\": 0,\n        \"count\": 3,\n        \"Moment\":{\"userId\":38710}, \"User\":{\"id\":38710} ,\n        \"Comment[]\": {\n            \"count\": 3,\n            \"Comment\": {\n                \"momentId@\": \"[]/Moment/id\"\n            }\n        }\n    }\n}', '{\"[]\":[{\"Moment\":{\"id\":235,\"userId\":38710,\"date\":\"2017-02-08 16:06:11.0\",\"content\":\"APIJSON,let interfaces and documents go to hell !\",\"praiseUserIdList\":[82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_mpwj.jpg\",\"http://static.oschina.net/uploads/user/1332/2664107_50.jpg?t=1457405500000\"]},\"User\":{\"id\":38710,\"sex\":0,\"name\":\"TommyLemon\",\"tag\":\"Android&Java\",\"head\":\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"contactIdList\":[82003,82005,90814,82004,82009,82002,82044,93793,70793],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"},\"Comment[]\":[{\"id\":160,\"toId\":0,\"userId\":82001,\"momentId\":235,\"date\":\"2017-03-02 13:56:06.0\",\"content\":\"This is a Content...-160\"},{\"id\":163,\"toId\":0,\"userId\":82001,\"momentId\":235,\"date\":\"2017-03-02 13:56:06.0\",\"content\":\"This is a Content...-163\"},{\"id\":168,\"toId\":1490442545077,\"userId\":82001,\"momentId\":235,\"date\":\"2017-03-25 19:49:14.0\",\"content\":\"???\"}]},{\"Moment\":{\"id\":470,\"userId\":38710,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-470\",\"praiseUserIdList\":[82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172507_Pz9Y.png\"]},\"User\":{\"id\":38710,\"sex\":0,\"name\":\"TommyLemon\",\"tag\":\"Android&Java\",\"head\":\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"contactIdList\":[82003,82005,90814,82004,82009,82002,82044,93793,70793],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"},\"Comment[]\":[{\"id\":4,\"toId\":0,\"userId\":38710,\"momentId\":470,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-4\"},{\"id\":22,\"toId\":221,\"userId\":82001,\"momentId\":470,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"测试修改评论\"},{\"id\":47,\"toId\":4,\"userId\":70793,\"momentId\":470,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-47\"}]},{\"Moment\":{\"id\":511,\"userId\":38710,\"date\":\"2017-02-08 16:06:11.0\",\"praiseUserIdList\":[70793,93793,82001],\"pictureList\":[\"https://camo.githubusercontent.com/f513fa631bd780dc0ec3cf2663777e356dc3664f/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343733323232332d3337333933303233322e6a7067\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_aMmH.jpg\",\"https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067\"]},\"User\":{\"id\":38710,\"sex\":0,\"name\":\"TommyLemon\",\"tag\":\"Android&Java\",\"head\":\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"contactIdList\":[82003,82005,90814,82004,82009,82002,82044,93793,70793],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"},\"Comment[]\":[{\"id\":178,\"userId\":38710,\"momentId\":511,\"date\":\"2017-03-25 20:30:55.0\",\"content\":\"wbw\"},{\"id\":1490863711703,\"toId\":0,\"userId\":70793,\"momentId\":511,\"date\":\"2017-03-30 16:48:31.0\",\"content\":\"I hope I can join\"},{\"id\":1490863717947,\"toId\":178,\"userId\":70793,\"momentId\":511,\"date\":\"2017-03-30 16:48:37.0\",\"content\":\"what?\"}]}],\"code\":200,\"msg\":\"success\"}', '2018-03-24 15:48:37');
INSERT INTO `Document` VALUES (1521907009307, 0, 2, 'Moment列表，每个Moment包括 1.发布者User 2.前3条Comment', '/get', '{\n   \"[]\":{\n     \"page\":0, \n     \"count\":3, \n     \"Moment\":{}, \n     \"User\":{\n       \"id@\":\"/Moment/userId\"\n     },\n     \"Comment[]\":{\n       \"count\":3,\n       \"Comment\":{\n         \"momentId@\":\"[]/Moment/id\"\n       }\n     }\n   }\n}', '{\"[]\":[{\"Moment\":{\"id\":12,\"userId\":70793,\"date\":\"2017-02-08 16:06:11.0\",\"content\":\"1111534034\",\"praiseUserIdList\":[70793,93793,82044,82040,82055,90814,38710,82002,82006,1508072105320,82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/788c0a7e11a4f5aadef3c886f028c79b4808613a/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343932353935372d313732303737333630382e6a7067\",\"http://static.oschina.net/uploads/img/201604/22172507_Pz9Y.png\",\"https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067\",\"https://camo.githubusercontent.com/f513fa631bd780dc0ec3cf2663777e356dc3664f/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343733323232332d3337333933303233322e6a7067\",\"https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067\",\"https://camo.githubusercontent.com/f513fa631bd780dc0ec3cf2663777e356dc3664f/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343733323232332d3337333933303233322e6a7067\"]},\"User\":{\"id\":70793,\"sex\":0,\"name\":\"Strong\",\"tag\":\"djdj\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\",\"contactIdList\":[38710,82002],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/788c0a7e11a\",\"https://camo.githubusercontent.com/f513f67\"],\"date\":\"2017-02-01 19:21:50.0\"},\"Comment[]\":[{\"id\":162,\"toId\":0,\"userId\":93793,\"momentId\":12,\"date\":\"2017-03-06 13:03:45.0\",\"content\":\"This is a Content...-162\"},{\"id\":164,\"toId\":0,\"userId\":93793,\"momentId\":12,\"date\":\"2017-03-06 13:03:45.0\",\"content\":\"This is a Content...-164\"},{\"id\":172,\"toId\":162,\"userId\":82001,\"momentId\":12,\"date\":\"2017-03-25 20:22:58.0\",\"content\":\"OK\"}]},{\"Moment\":{\"id\":15,\"userId\":70793,\"date\":\"2017-02-08 16:06:11.0\",\"content\":\"APIJSON is a JSON Transmission Structure Protocol…\",\"praiseUserIdList\":[82055,82002,38710],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"]},\"User\":{\"id\":70793,\"sex\":0,\"name\":\"Strong\",\"tag\":\"djdj\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\",\"contactIdList\":[38710,82002],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/788c0a7e11a\",\"https://camo.githubusercontent.com/f513f67\"],\"date\":\"2017-02-01 19:21:50.0\"},\"Comment[]\":[{\"id\":176,\"toId\":166,\"userId\":38710,\"momentId\":15,\"date\":\"2017-03-25 20:28:03.0\",\"content\":\"thank you\"},{\"id\":1490863469638,\"toId\":0,\"userId\":82002,\"momentId\":15,\"date\":\"2017-03-30 16:44:29.0\",\"content\":\"Just do it\"},{\"id\":1490875660259,\"toId\":1490863469638,\"userId\":82055,\"momentId\":15,\"date\":\"2017-03-30 20:07:40.0\",\"content\":\"I prove wht you said(??????)\"}]},{\"Moment\":{\"id\":32,\"userId\":82002,\"date\":\"2017-02-08 16:06:11.0\",\"praiseUserIdList\":[38710,82002,82001],\"pictureList\":[\"https://camo.githubusercontent.com/f513fa631bd780dc0ec3cf2663777e356dc3664f/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343733323232332d3337333933303233322e6a7067\",\"https://camo.githubusercontent.com/5f5c4e0c4dc539c34e8eae8ac0cbc6dccdfee5d3/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343533333831362d323032373434343231382e6a7067\",\"http://static.oschina.net/uploads/img/201604/22172508_mpwj.jpg\"]},\"User\":{\"id\":82002,\"sex\":1,\"name\":\"Happy~\",\"tag\":\"iOS\",\"head\":\"http://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000\",\"contactIdList\":[82005,82001,38710],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"},\"Comment[]\":[{\"id\":1512035117021,\"toId\":0,\"userId\":82001,\"momentId\":32,\"date\":\"2017-11-30 17:45:17.0\",\"content\":\"图片看不了啊\"},{\"id\":1512038831617,\"toId\":1512035117021,\"userId\":82001,\"momentId\":32,\"date\":\"2017-11-30 18:47:11.0\",\"content\":\"代码截屏都是2k分辨率的，并且还放在GitHub上，可以等一会儿，或者更新下ZBLibray(图片加载库从UIL换成了Glide)就行\"},{\"id\":1512039030970,\"toId\":1512035117021,\"userId\":82001,\"momentId\":32,\"date\":\"2017-11-30 18:50:30.0\",\"content\":\"一般九宫格图片都是压缩图，分辨率在300*300左右，加载很快，点击放大后才是原图，1080P左右\"}]}],\"code\":200,\"msg\":\"success\"}', '2018-03-24 15:56:49');
INSERT INTO `Document` VALUES (1521907303539, 0, 2, 'User列表', '/get', '{\n   \"User[]\":{\n     \"page\":0,\n     \"count\":3, \n     \"User\":{\n       \"sex\":0\n     }\n   }\n}', '{\"User[]\":[{\"id\":38710,\"sex\":0,\"name\":\"TommyLemon\",\"tag\":\"Android&Java\",\"head\":\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"contactIdList\":[82003,82005,90814,82004,82009,82002,82044,93793,70793],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":70793,\"sex\":0,\"name\":\"Strong\",\"tag\":\"djdj\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\",\"contactIdList\":[38710,82002],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/788c0a7e11a\",\"https://camo.githubusercontent.com/f513f67\"],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":82001,\"sex\":0,\"name\":\"测试改名\",\"tag\":\"APIJSON User\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\",\"contactIdList\":[82025,82024,82003,93793],\"pictureList\":[\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"}],\"code\":200,\"msg\":\"success\"}', '2018-03-24 16:01:43');
INSERT INTO `Document` VALUES (1521907317870, 0, 2, 'Moment和对应的User', '/get', '{\n   \"Moment\":{\n     \"userId\":38710\n   }, \n   \"User\":{\n     \"id\":38710\n   }\n}', '{\"Moment\":{\"id\":235,\"userId\":38710,\"date\":\"2017-02-08 16:06:11.0\",\"content\":\"APIJSON,let interfaces and documents go to hell !\",\"praiseUserIdList\":[82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_mpwj.jpg\",\"http://static.oschina.net/uploads/user/1332/2664107_50.jpg?t=1457405500000\"]},\"User\":{\"id\":38710,\"sex\":0,\"name\":\"TommyLemon\",\"tag\":\"Android&Java\",\"head\":\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"contactIdList\":[82003,82005,90814,82004,82009,82002,82044,93793,70793],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"},\"code\":200,\"msg\":\"success\"}', '2018-03-24 16:01:57');
INSERT INTO `Document` VALUES (1521907333044, 0, 2, 'User', '/get', '{\n   \"User\":{\n     \"id\":38710\n   }\n}', '{\"User\":{\"id\":38710,\"sex\":0,\"name\":\"TommyLemon\",\"tag\":\"Android&Java\",\"head\":\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"contactIdList\":[82003,82005,90814,82004,82009,82002,82044,93793,70793],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"},\"code\":200,\"msg\":\"success\"}', '2018-03-24 16:02:13');
INSERT INTO `Document` VALUES (1521907333046, 0, 2, 'Moment INNER JOIN User LEFT JOIN Comment', '/get', '{\n    \"[]\": {\n        \"count\": 10,\n        \"page\": 0,\n        \"join\": \"&/User/id@,</Comment/momentId@\",\n        \"Moment\": {\n            \"@order\": \"date+\"\n        },\n        \"User\": {\n            \"name?\": [\n                \"a\",\n                \"t\"\n            ],\n            \"id@\": \"/Moment/userId\",\n            \"@column\": \"id,name,head\"\n        },\n        \"Comment\": {\n            \"momentId@\": \"/Moment/id\",\n            \"@column\": \"id,momentId,content\"\n        }\n    }\n}', '{\"[]\":[{\"Moment\":{\"id\":470,\"userId\":38710,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-470\",\"praiseUserIdList\":[82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172507_Pz9Y.png\"]},\"User\":{\"id\":38710,\"name\":\"TommyLemon\",\"head\":\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\"},\"Comment\":{\"id\":47,\"momentId\":470,\"content\":\"This is a Content...-47\"}},{\"Moment\":{\"id\":470,\"userId\":38710,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-470\",\"praiseUserIdList\":[82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172507_Pz9Y.png\"]},\"User\":{\"id\":38710,\"name\":\"TommyLemon\",\"head\":\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\"},\"Comment\":{\"id\":47,\"momentId\":470,\"content\":\"This is a Content...-47\"}},{\"Moment\":{\"id\":170,\"userId\":70793,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-73\",\"praiseUserIdList\":[82044,82002,82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172508_mpwj.jpg\"]},\"User\":{\"id\":70793,\"name\":\"Strong\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\"},\"Comment\":{\"id\":99,\"momentId\":170,\"content\":\"This is a Content...-99\"}},{\"Moment\":{\"id\":470,\"userId\":38710,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-470\",\"praiseUserIdList\":[82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172507_Pz9Y.png\"]},\"User\":{\"id\":38710,\"name\":\"TommyLemon\",\"head\":\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\"},\"Comment\":{\"id\":47,\"momentId\":470,\"content\":\"This is a Content...-47\"}},{\"Moment\":{\"id\":170,\"userId\":70793,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-73\",\"praiseUserIdList\":[82044,82002,82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172508_mpwj.jpg\"]},\"User\":{\"id\":70793,\"name\":\"Strong\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\"},\"Comment\":{\"id\":99,\"momentId\":170,\"content\":\"This is a Content...-99\"}},{\"Moment\":{\"id\":371,\"userId\":82002,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-371\",\"praiseUserIdList\":[90814,93793,82003,82005,82006,82040,82002,82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067\",\"http://static.oschina.net/uploads/img/201604/22172507_aMmH.jpg\",\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\"]},\"User\":{\"id\":82002,\"name\":\"Happy~\",\"head\":\"http://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000\"},\"Comment\":{\"id\":115,\"momentId\":371,\"content\":\"This is a Content...-115\"}},{\"Moment\":{\"id\":170,\"userId\":70793,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-73\",\"praiseUserIdList\":[82044,82002,82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172508_mpwj.jpg\"]},\"User\":{\"id\":70793,\"name\":\"Strong\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\"},\"Comment\":{\"id\":99,\"momentId\":170,\"content\":\"This is a Content...-99\"}},{\"Moment\":{\"id\":371,\"userId\":82002,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-371\",\"praiseUserIdList\":[90814,93793,82003,82005,82006,82040,82002,82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067\",\"http://static.oschina.net/uploads/img/201604/22172507_aMmH.jpg\",\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\"]},\"User\":{\"id\":82002,\"name\":\"Happy~\",\"head\":\"http://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000\"},\"Comment\":{\"id\":115,\"momentId\":371,\"content\":\"This is a Content...-115\"}},{\"Moment\":{\"id\":371,\"userId\":82002,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-371\",\"praiseUserIdList\":[90814,93793,82003,82005,82006,82040,82002,82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067\",\"http://static.oschina.net/uploads/img/201604/22172507_aMmH.jpg\",\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\"]},\"User\":{\"id\":82002,\"name\":\"Happy~\",\"head\":\"http://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000\"},\"Comment\":{\"id\":115,\"momentId\":371,\"content\":\"This is a Content...-115\"}},{\"Moment\":{\"id\":371,\"userId\":82002,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-371\",\"praiseUserIdList\":[90814,93793,82003,82005,82006,82040,82002,82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067\",\"http://static.oschina.net/uploads/img/201604/22172507_aMmH.jpg\",\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\"]},\"User\":{\"id\":82002,\"name\":\"Happy~\",\"head\":\"http://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000\"},\"Comment\":{\"id\":115,\"momentId\":371,\"content\":\"This is a Content...-115\"}}],\"code\":200,\"msg\":\"success\"}', '2018-03-24 16:02:43');
INSERT INTO `Document` VALUES (1521907333047, 0, 2, '获取粉丝的动态列表', '/get', '{     \"Moment[]\": {         \"join\": \"&/User/id@\",         \"Moment\": {},         \"User\": {             \"id@\": \"/Moment/userId\",             \"contactIdList<>\": 82001,             \"@column\": \"id\"         }     } }', '{\"User-id[]\":[82002,82003,82005,82041,82045,82058,1512531601485,1528254173621],\"Moment[]\":[{\"id\":32,\"userId\":82002,\"date\":\"2017-02-08 16:06:11.0\",\"praiseUserIdList\":[38710,82002,82001],\"pictureList\":[\"https://camo.githubusercontent.com/f513fa631bd780dc0ec3cf2663777e356dc3664f/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343733323232332d3337333933303233322e6a7067\",\"https://camo.githubusercontent.com/5f5c4e0c4dc539c34e8eae8ac0cbc6dccdfee5d3/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343533333831362d323032373434343231382e6a7067\",\"http://static.oschina.net/uploads/img/201604/22172508_mpwj.jpg\"]},{\"id\":371,\"userId\":82002,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-371\",\"praiseUserIdList\":[90814,93793,82003,82005,82006,82040,82002,82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067\",\"http://static.oschina.net/uploads/img/201604/22172507_aMmH.jpg\",\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\"]},{\"id\":1508053762227,\"userId\":82003,\"date\":\"2017-10-15 15:49:22.0\",\"content\":\"我也试试\",\"praiseUserIdList\":[1515565976140],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"]},{\"id\":1508072491570,\"userId\":82002,\"date\":\"2017-10-15 21:01:31.0\",\"content\":\"有点冷~\",\"praiseUserIdList\":[82001,82002],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"]},{\"id\":1508073178489,\"userId\":82045,\"date\":\"2017-10-15 21:12:58.0\",\"content\":\"发动态\",\"praiseUserIdList\":[82001],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"]},{\"id\":1514017444961,\"userId\":82002,\"date\":\"2017-12-23 16:24:04.0\",\"content\":\"123479589679\",\"praiseUserIdList\":[82002,1520242280259,82001,70793,1524042900591,1528264711016],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"]},{\"id\":1531062713966,\"userId\":82002,\"date\":\"2018-07-08 23:11:53.0\",\"content\":\"云南好美啊( ◞˟૩˟)◞\",\"praiseUserIdList\":[82001,82005,38710,70793,93793,82003,1531969715979],\"pictureList\":[\"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1531072366455&di=c0d4b15b2c4b70aad49e6ae747f60742&imgtype=0&src=http%3A%2F%2Fpic1.win4000.com%2Fwallpaper%2F3%2F57a2a41f57d09.jpg\",\"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1531072499167&di=5b5621d117edbc5d344a03ba0a6b580b&imgtype=0&src=http%3A%2F%2Fi0.szhomeimg.com%2FUploadFiles%2FBBS%2F2006%2F08%2F05%2F24752199_79122.91.jpg\"]},{\"id\":1536805585275,\"userId\":82003,\"date\":\"2018-09-13 10:26:25.0\",\"content\":\"iPhone Xs发布了，大家怎么看？\",\"praiseUserIdList\":[82002,82005,70793,82003,82001],\"pictureList\":[\"https://pic1.zhimg.com/80/v2-e129b40810070443add1c28e6185c894_hd.jpg\"]}],\"code\":200,\"msg\":\"success\"}', '2018-03-24 16:03:13');
INSERT INTO `Document` VALUES (1521907546128, 0, 2, '获取类似微信朋友圈的动态列表', '/get', '{\n    \"[]\": {\n        \"page\": 0,\n        \"count\": 2,\n        \"Moment\": {\n            \"content$\": \"%a%\"\n        },\n        \"User\": {\n            \"id@\": \"/Moment/userId\",\n            \"@column\": \"id,name,head\"\n        },\n        \"Comment[]\": {\n            \"count\": 2,\n            \"Comment\": {\n                \"momentId@\": \"[]/Moment/id\"\n            }\n        }\n    }\n}', '{\"[]\":[{\"Moment\":{\"id\":15,\"userId\":70793,\"date\":\"2017-02-08 16:06:11.0\",\"content\":\"APIJSON is a JSON Transmission Structure Protocol…\",\"praiseUserIdList\":[82055,82002,38710],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"]},\"User\":{\"id\":70793,\"name\":\"Strong\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\"},\"Comment[]\":[{\"id\":176,\"toId\":166,\"userId\":38710,\"momentId\":15,\"date\":\"2017-03-25 20:28:03.0\",\"content\":\"thank you\"},{\"id\":1490863469638,\"toId\":0,\"userId\":82002,\"momentId\":15,\"date\":\"2017-03-30 16:44:29.0\",\"content\":\"Just do it\"}]},{\"Moment\":{\"id\":58,\"userId\":90814,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-435\",\"praiseUserIdList\":[38710,82003,82005,93793,82006,82044,82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172507_aMmH.jpg\"]},\"User\":{\"id\":90814,\"name\":\"007\",\"head\":\"http://static.oschina.net/uploads/user/51/102723_50.jpg?t=1449212504000\"},\"Comment[]\":[{\"id\":13,\"toId\":0,\"userId\":82005,\"momentId\":58,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-13\"},{\"id\":77,\"toId\":13,\"userId\":93793,\"momentId\":58,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-77\"}]}],\"code\":200,\"msg\":\"success\"}', '2018-03-24 16:05:46');
INSERT INTO `Document` VALUES (1521907570451, 0, 2, '获取动态及发布者用户', '/get', '{\n    \"Moment\": {},\n    \"User\": {\n        \"id@\": \"Moment/userId\"\n    }\n}', '{\"Moment\":{\"id\":12,\"userId\":70793,\"date\":\"2017-02-08 16:06:11.0\",\"content\":\"1111534034\",\"praiseUserIdList\":[70793,93793,82044,82040,82055,90814,38710,82002,82006,1508072105320],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/788c0a7e11a4f5aadef3c886f028c79b4808613a/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343932353935372d313732303737333630382e6a7067\",\"http://static.oschina.net/uploads/img/201604/22172507_Pz9Y.png\",\"https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067\",\"https://camo.githubusercontent.com/f513fa631bd780dc0ec3cf2663777e356dc3664f/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343733323232332d3337333933303233322e6a7067\",\"https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067\",\"https://camo.githubusercontent.com/f513fa631bd780dc0ec3cf2663777e356dc3664f/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343733323232332d3337333933303233322e6a7067\"]},\"User\":{\"id\":70793,\"sex\":0,\"name\":\"Strong\",\"tag\":\"djdj\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\",\"contactIdList\":[38710,82002],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/788c0a7e11a\",\"https://camo.githubusercontent.com/f513f67\"],\"date\":\"2017-02-01 19:21:50.0\"},\"code\":200,\"msg\":\"success\"}', '2018-03-24 16:06:10');
INSERT INTO `Document` VALUES (1521907587429, 0, 2, '获取用户列表', '/get', '{\n    \"[]\": {\n        \"count\": 3,\n        \"User\": {\n            \"@column\": \"id,name\"\n        }\n    }\n}', '{\"[]\":[{\"User\":{\"id\":38710,\"name\":\"TommyLemon\"}},{\"User\":{\"id\":70793,\"name\":\"Strong\"}},{\"User\":{\"id\":82001,\"name\":\"测试账号\"}}],\"code\":200,\"msg\":\"success\"}', '2018-03-24 16:06:27');
INSERT INTO `Document` VALUES (1521907601298, 0, 2, '获取用户', '/get', '{\n  \"User\":{\n  }\n}', '{\"User\":{\"id\":38710,\"sex\":0,\"name\":\"TommyLemon\",\"tag\":\"Android&Java\",\"head\":\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"contactIdList\":[82003,82005,90814,82004,82009,82002,82044,93793,70793],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"},\"code\":200,\"msg\":\"success\"}', '2018-03-24 16:06:41');
COMMIT;

-- ----------------------------
-- Table structure for Function
-- ----------------------------
DROP TABLE IF EXISTS `Function`;
CREATE TABLE `Function` (
  `id` bigint(15) NOT NULL AUTO_INCREMENT,
  `userId` bigint(15) NOT NULL COMMENT '管理员用户Id',
  `name` varchar(20) NOT NULL COMMENT '方法名',
  `arguments` varchar(100) DEFAULT NULL COMMENT '参数列表，每个参数的类型都是 String。\n用 , 分割的字符串 比 [JSONArray] 更好，例如 array,item ，更直观，还方便拼接函数。',
  `demo` json NOT NULL COMMENT '可用的示例。',
  `detail` varchar(1000) DEFAULT NULL COMMENT '详细描述',
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COMMENT='远程函数。强制在启动时校验所有demo是否能正常运行通过';

-- ----------------------------
-- Records of Function
-- ----------------------------
BEGIN;
INSERT INTO `Function` VALUES (3, 0, 'countArray', 'array', '{\"array\": [1, 2, 3]}', '获取数组长度。没写调用键值对，会自动补全 \"result()\": \"countArray(array)\"', '2018-10-13 08:23:23');
INSERT INTO `Function` VALUES (4, 0, 'countObject', 'object', '{\"object\": {\"key0\": 1, \"key1\": 2}}', '获取对象长度。', '2018-10-13 08:23:23');
INSERT INTO `Function` VALUES (5, 0, 'isContain', 'array,value', '{\"array\": [1, 2, 3], \"value\": 2}', '判断是否数组包含值。', '2018-10-13 08:23:23');
INSERT INTO `Function` VALUES (6, 0, 'isContainKey', 'object,key', '{\"key\": \"id\", \"object\": {\"id\": 1}}', '判断是否对象包含键。', '2018-10-13 08:30:31');
INSERT INTO `Function` VALUES (7, 0, 'isContainValue', 'object,value', '{\"value\": 1, \"object\": {\"id\": 1}}', '判断是否对象包含值。', '2018-10-13 08:30:31');
INSERT INTO `Function` VALUES (8, 0, 'getFromArray', 'array,position', '{\"array\": [1, 2, 3], \"result()\": \"getFromArray(array,1)\"}', '根据下标获取数组里的值。position 传数字时直接作为值，而不是从所在对象 request 中取值', '2018-10-13 08:30:31');
INSERT INTO `Function` VALUES (9, 0, 'getFromObject', 'object,key', '{\"key\": \"id\", \"object\": {\"id\": 1}}', '根据键获取对象里的值。', '2018-10-13 08:30:31');
COMMIT;

-- ----------------------------
-- Table structure for Login
-- ----------------------------
DROP TABLE IF EXISTS `Login`;
CREATE TABLE `Login` (
  `id` bigint(15) NOT NULL COMMENT '唯一标识',
  `userId` bigint(15) NOT NULL COMMENT '用户id',
  `type` tinyint(2) NOT NULL COMMENT '类型\n0-密码登录\n1-验证码登录',
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='@deprecated，登录信息存session';

-- ----------------------------
-- Records of Login
-- ----------------------------
BEGIN;
INSERT INTO `Login` VALUES (1488365732208, 0, 0, '2017-03-01 10:55:32');
INSERT INTO `Login` VALUES (1488379391681, 1488378558927, 0, '2017-03-01 14:43:11');
INSERT INTO `Login` VALUES (1488379908786, 1488378449469, 0, '2017-03-01 14:51:48');
INSERT INTO `Login` VALUES (1488379961820, 1488379935755, 0, '2017-03-01 14:52:41');
INSERT INTO `Login` VALUES (1488386227319, 1488380023998, 0, '2017-03-01 16:37:07');
INSERT INTO `Login` VALUES (1488387166592, 1488378449469, 0, '2017-03-01 16:52:46');
INSERT INTO `Login` VALUES (1488423710531, 1488423676823, 0, '2017-03-02 03:01:50');
INSERT INTO `Login` VALUES (1488428867991, 1488428734202, 0, '2017-03-02 04:27:47');
INSERT INTO `Login` VALUES (1488473261705, 1488473066471, 0, '2017-03-02 16:47:41');
INSERT INTO `Login` VALUES (1488516623869, 1488378449469, 0, '2017-03-03 04:50:23');
INSERT INTO `Login` VALUES (1488540997715, 1488540991808, 0, '2017-03-03 11:36:37');
INSERT INTO `Login` VALUES (1488541075533, 1488541028865, 0, '2017-03-03 11:37:55');
INSERT INTO `Login` VALUES (1488541560585, 1488541531131, 0, '2017-03-03 11:46:00');
INSERT INTO `Login` VALUES (1488569711657, 1488569508197, 0, '2017-03-03 19:35:11');
INSERT INTO `Login` VALUES (1488569782719, 1488569732797, 0, '2017-03-03 19:36:22');
INSERT INTO `Login` VALUES (1488569807192, 1488569798561, 0, '2017-03-03 19:36:47');
INSERT INTO `Login` VALUES (1488572273190, 1488572225956, 0, '2017-03-03 20:17:53');
INSERT INTO `Login` VALUES (1488572823466, 1488569798561, 0, '2017-03-03 20:27:03');
INSERT INTO `Login` VALUES (1488572844863, 1488572838263, 0, '2017-03-03 20:27:24');
INSERT INTO `Login` VALUES (1488572852849, 1488572838263, 0, '2017-03-03 20:27:32');
INSERT INTO `Login` VALUES (1488572994566, 1488572838263, 0, '2017-03-03 20:29:54');
INSERT INTO `Login` VALUES (1488602587483, 1488602583693, 0, '2017-03-04 04:43:07');
INSERT INTO `Login` VALUES (1488602732477, 1488602583693, 0, '2017-03-04 04:45:32');
INSERT INTO `Login` VALUES (1488602739644, 1488569508197, 0, '2017-03-04 04:45:39');
INSERT INTO `Login` VALUES (1488616804093, 82012, 0, '2017-03-04 09:30:21');
INSERT INTO `Login` VALUES (1488619853762, 82012, 0, '2017-03-04 09:30:53');
INSERT INTO `Login` VALUES (1488619853763, 1488621574081, 0, '2017-03-04 09:59:34');
INSERT INTO `Login` VALUES (1488621807871, 1488621574081, 0, '2017-03-04 10:03:27');
INSERT INTO `Login` VALUES (1488621807872, 1488621574081, 0, '2017-03-04 10:03:43');
INSERT INTO `Login` VALUES (1488621827734, 1488621574081, 0, '2017-03-04 10:03:47');
INSERT INTO `Login` VALUES (1488621827735, 1488621574081, 0, '2017-03-04 10:04:03');
INSERT INTO `Login` VALUES (1488621846267, 1488621574081, 0, '2017-03-04 10:04:06');
INSERT INTO `Login` VALUES (1488621846268, 1488621873562, 0, '2017-03-04 10:04:33');
INSERT INTO `Login` VALUES (1488621876782, 1488621873562, 0, '2017-03-04 10:04:36');
INSERT INTO `Login` VALUES (1488621876783, 1488621904086, 0, '2017-03-04 10:05:04');
INSERT INTO `Login` VALUES (1488622533567, 1488621904086, 0, '2017-03-04 10:15:33');
INSERT INTO `Login` VALUES (1488622533568, 1488622827857, 0, '2017-03-04 10:20:27');
INSERT INTO `Login` VALUES (1488622831418, 1488622827857, 0, '2017-03-04 10:20:31');
INSERT INTO `Login` VALUES (1488622831419, 1488473066471, 0, '2017-03-04 10:21:52');
INSERT INTO `Login` VALUES (1488622919890, 1488473066471, 0, '2017-03-04 10:21:59');
INSERT INTO `Login` VALUES (1488622919891, 1488622959038, 0, '2017-03-04 10:22:39');
INSERT INTO `Login` VALUES (1488623021260, 1488622959038, 0, '2017-03-04 10:23:41');
INSERT INTO `Login` VALUES (1488623021261, 1488622959038, 0, '2017-03-04 10:25:02');
INSERT INTO `Login` VALUES (1488623107782, 1488622959038, 0, '2017-03-04 10:25:07');
INSERT INTO `Login` VALUES (1488623107783, 1488622959038, 0, '2017-03-04 14:23:31');
INSERT INTO `Login` VALUES (1488638599393, 1488622959038, 0, '2017-03-04 14:43:19');
INSERT INTO `Login` VALUES (1488638599394, 1488622959038, 0, '2017-03-04 15:07:50');
INSERT INTO `Login` VALUES (1488640073476, 1488622959038, 0, '2017-03-04 15:07:53');
INSERT INTO `Login` VALUES (1488640255126, 1488640277910, 0, '2017-03-04 15:11:18');
INSERT INTO `Login` VALUES (1488640325578, 1488640277910, 0, '2017-03-04 15:12:05');
INSERT INTO `Login` VALUES (1488640325579, 1488640277910, 0, '2017-03-04 15:12:08');
INSERT INTO `Login` VALUES (1488640330490, 1488640277910, 0, '2017-03-04 15:12:10');
INSERT INTO `Login` VALUES (1488640330491, 1488640277910, 0, '2017-03-04 15:59:25');
INSERT INTO `Login` VALUES (1488643309485, 1488640277910, 0, '2017-03-04 16:01:49');
INSERT INTO `Login` VALUES (1488643309486, 1488643325534, 0, '2017-03-04 16:02:05');
INSERT INTO `Login` VALUES (1488643330578, 1488643325534, 0, '2017-03-04 16:02:10');
INSERT INTO `Login` VALUES (1488643414031, 1488643442503, 0, '2017-03-04 16:04:02');
INSERT INTO `Login` VALUES (1488643446184, 1488643442503, 0, '2017-03-04 16:04:06');
INSERT INTO `Login` VALUES (1488645359252, 82012, 0, '2017-03-04 16:43:41');
INSERT INTO `Login` VALUES (1488645825647, 82012, 0, '2017-03-04 16:43:45');
INSERT INTO `Login` VALUES (1488645825648, 82012, 0, '2017-03-04 16:44:32');
INSERT INTO `Login` VALUES (1488645964496, 82012, 0, '2017-03-04 16:46:04');
INSERT INTO `Login` VALUES (1488645964497, 82012, 0, '2017-03-04 16:46:06');
INSERT INTO `Login` VALUES (1488645968694, 82012, 0, '2017-03-04 16:46:08');
INSERT INTO `Login` VALUES (1488707458563, 1488643442503, 0, '2017-03-05 09:51:32');
INSERT INTO `Login` VALUES (1488707494290, 1488643442503, 0, '2017-03-05 09:51:34');
INSERT INTO `Login` VALUES (1488707494291, 1488707511472, 0, '2017-03-05 09:51:51');
INSERT INTO `Login` VALUES (1488707514358, 1488707511472, 0, '2017-03-05 09:51:54');
INSERT INTO `Login` VALUES (1488707514359, 1488707511472, 1, '2017-03-05 09:52:15');
INSERT INTO `Login` VALUES (1488707539344, 1488707511472, 0, '2017-03-05 09:52:19');
INSERT INTO `Login` VALUES (1488707539345, 1488707572184, 0, '2017-03-05 09:52:52');
INSERT INTO `Login` VALUES (1488707575181, 1488707572184, 0, '2017-03-05 09:52:55');
INSERT INTO `Login` VALUES (1488707575182, 1488707617655, 0, '2017-03-05 09:53:37');
INSERT INTO `Login` VALUES (1488707626071, 1488707617655, 0, '2017-03-05 09:53:46');
INSERT INTO `Login` VALUES (1488707626072, 1488707617655, 0, '2017-03-05 09:53:52');
INSERT INTO `Login` VALUES (1488707635801, 1488707617655, 0, '2017-03-05 09:53:55');
INSERT INTO `Login` VALUES (1488707635802, 1488707617655, 0, '2017-03-05 09:57:26');
INSERT INTO `Login` VALUES (1488707850222, 1488707617655, 0, '2017-03-05 09:57:30');
INSERT INTO `Login` VALUES (1488707850223, 1488707874944, 0, '2017-03-05 09:57:55');
INSERT INTO `Login` VALUES (1488707877660, 1488707874944, 0, '2017-03-05 09:57:57');
INSERT INTO `Login` VALUES (1488707877661, 1488707874944, 1, '2017-03-05 09:58:27');
INSERT INTO `Login` VALUES (1488707915649, 1488707874944, 0, '2017-03-05 09:58:35');
INSERT INTO `Login` VALUES (1488727516722, 1488727542397, 0, '2017-03-05 15:25:42');
INSERT INTO `Login` VALUES (1488727548031, 1488727542397, 0, '2017-03-05 15:25:48');
INSERT INTO `Login` VALUES (1488803302239, 1488727542397, 0, '2017-03-06 12:28:24');
INSERT INTO `Login` VALUES (1488803306640, 1488727542397, 0, '2017-03-06 12:28:26');
INSERT INTO `Login` VALUES (1488803306641, 1488803343874, 0, '2017-03-06 12:29:04');
INSERT INTO `Login` VALUES (1488803346374, 1488803343874, 0, '2017-03-06 12:29:06');
INSERT INTO `Login` VALUES (1488803346375, 1488803343874, 0, '2017-03-06 15:06:09');
INSERT INTO `Login` VALUES (1488812773144, 1488803343874, 0, '2017-03-06 15:06:13');
INSERT INTO `Login` VALUES (1489244600336, 1489244640435, 0, '2017-03-11 15:04:00');
INSERT INTO `Login` VALUES (1489244647438, 1489244640435, 0, '2017-03-11 15:04:07');
INSERT INTO `Login` VALUES (1489244647439, 1489244640435, 1, '2017-03-11 15:04:25');
INSERT INTO `Login` VALUES (1489244669153, 1489244640435, 0, '2017-03-11 15:04:29');
INSERT INTO `Login` VALUES (1489246281612, 1489244640435, 0, '2017-03-11 15:31:37');
INSERT INTO `Login` VALUES (1489246300085, 1489244640435, 0, '2017-03-11 15:31:40');
INSERT INTO `Login` VALUES (1489246300086, 1489244640435, 0, '2017-03-11 15:32:00');
INSERT INTO `Login` VALUES (1489246323014, 1489244640435, 0, '2017-03-11 15:32:03');
INSERT INTO `Login` VALUES (1489246323015, 1489246345610, 0, '2017-03-11 15:32:25');
INSERT INTO `Login` VALUES (1489246350667, 1489246345610, 0, '2017-03-11 15:32:30');
INSERT INTO `Login` VALUES (1489298452742, 1488727542397, 0, '2017-03-12 06:01:02');
INSERT INTO `Login` VALUES (1489298464822, 1488727542397, 0, '2017-03-12 06:01:04');
INSERT INTO `Login` VALUES (1489298464823, 1489298483829, 0, '2017-03-12 06:01:23');
INSERT INTO `Login` VALUES (1489298490008, 1489298483829, 0, '2017-03-12 06:01:30');
INSERT INTO `Login` VALUES (1489298490009, 82005, 0, '2017-03-12 06:02:12');
INSERT INTO `Login` VALUES (1489298931649, 82005, 0, '2017-03-12 06:08:53');
INSERT INTO `Login` VALUES (1489298971069, 82005, 0, '2017-03-12 06:09:31');
INSERT INTO `Login` VALUES (1489298971070, 82005, 0, '2017-03-12 06:09:40');
INSERT INTO `Login` VALUES (1489299084011, 82005, 0, '2017-03-12 06:11:24');
INSERT INTO `Login` VALUES (1489299139305, 90814, 0, '2017-03-12 06:12:23');
INSERT INTO `Login` VALUES (1489317763943, 1489317784114, 0, '2017-03-12 11:23:04');
INSERT INTO `Login` VALUES (1489317856607, 1489317784114, 0, '2017-03-12 11:24:16');
INSERT INTO `Login` VALUES (1489934937901, 1489934955220, 0, '2017-03-19 14:49:15');
INSERT INTO `Login` VALUES (1489934967736, 1489934955220, 0, '2017-03-19 14:49:27');
INSERT INTO `Login` VALUES (1490105370959, 1490105418731, 0, '2017-03-21 14:10:18');
INSERT INTO `Login` VALUES (1490105432172, 1490105418731, 0, '2017-03-21 14:10:32');
INSERT INTO `Login` VALUES (1490109211714, 1490109742863, 0, '2017-03-21 15:22:23');
INSERT INTO `Login` VALUES (1490109746858, 1490109742863, 0, '2017-03-21 15:22:26');
INSERT INTO `Login` VALUES (1490109746859, 1490109845208, 0, '2017-03-21 15:24:05');
INSERT INTO `Login` VALUES (1490109847412, 1490109845208, 0, '2017-03-21 15:24:07');
INSERT INTO `Login` VALUES (1490109847413, 1490109845208, 1, '2017-03-21 15:25:39');
INSERT INTO `Login` VALUES (1490109943463, 1490109845208, 0, '2017-03-21 15:25:43');
INSERT INTO `Login` VALUES (1490420549513, 1488707874944, 0, '2017-03-25 05:43:30');
INSERT INTO `Login` VALUES (1490420612726, 1488707874944, 0, '2017-03-25 05:43:32');
INSERT INTO `Login` VALUES (1490420612727, 1490420651686, 0, '2017-03-25 05:44:11');
INSERT INTO `Login` VALUES (1490420694018, 1490420651686, 0, '2017-03-25 05:44:54');
INSERT INTO `Login` VALUES (1490425995551, 1490427139175, 0, '2017-03-25 07:32:19');
INSERT INTO `Login` VALUES (1490427142481, 1490427139175, 0, '2017-03-25 07:32:22');
INSERT INTO `Login` VALUES (1490427142482, 1490427139175, 0, '2017-03-25 07:32:25');
INSERT INTO `Login` VALUES (1490427147907, 1490427139175, 0, '2017-03-25 07:32:27');
INSERT INTO `Login` VALUES (1490427147908, 1490427139175, 1, '2017-03-25 07:32:46');
INSERT INTO `Login` VALUES (1490427169820, 1490427139175, 0, '2017-03-25 07:32:49');
INSERT INTO `Login` VALUES (1490427169821, 1490427139175, 1, '2017-03-25 07:36:09');
INSERT INTO `Login` VALUES (1490427460928, 1490427139175, 0, '2017-03-25 07:37:40');
INSERT INTO `Login` VALUES (1490427550424, 1490427577823, 0, '2017-03-25 07:39:37');
INSERT INTO `Login` VALUES (1490427581040, 1490427577823, 0, '2017-03-25 07:39:41');
INSERT INTO `Login` VALUES (1490584927873, 1490584952968, 0, '2017-03-27 03:22:33');
INSERT INTO `Login` VALUES (1490584967616, 1490584952968, 0, '2017-03-27 03:22:47');
INSERT INTO `Login` VALUES (1490585175679, 1490585192903, 0, '2017-03-27 03:26:33');
INSERT INTO `Login` VALUES (1490585175680, 1490585226494, 0, '2017-03-27 03:27:06');
INSERT INTO `Login` VALUES (1490585175681, 1490586230028, 0, '2017-03-27 03:43:50');
INSERT INTO `Login` VALUES (1490586242829, 1490586230028, 0, '2017-03-27 03:44:02');
INSERT INTO `Login` VALUES (1490586242830, 1490586417277, 0, '2017-03-27 03:46:57');
INSERT INTO `Login` VALUES (1490586420868, 1490586417277, 0, '2017-03-27 03:47:00');
INSERT INTO `Login` VALUES (1490586420869, 1490587219677, 0, '2017-03-27 04:00:20');
INSERT INTO `Login` VALUES (1490587222853, 1490587219677, 0, '2017-03-27 04:00:22');
INSERT INTO `Login` VALUES (1490587222854, 1490587219677, 0, '2017-03-27 04:00:30');
INSERT INTO `Login` VALUES (1490587232018, 1490587219677, 0, '2017-03-27 04:00:32');
INSERT INTO `Login` VALUES (1490763654616, 1489317784114, 0, '2017-03-29 05:01:03');
INSERT INTO `Login` VALUES (1490763665719, 1489317784114, 0, '2017-03-29 05:01:05');
INSERT INTO `Login` VALUES (1490763665720, 1490763680229, 0, '2017-03-29 05:01:20');
INSERT INTO `Login` VALUES (1490763684749, 1490763680229, 0, '2017-03-29 05:01:24');
INSERT INTO `Login` VALUES (1490763684750, 1490763889677, 0, '2017-03-29 05:04:49');
INSERT INTO `Login` VALUES (1490763892907, 1490763889677, 0, '2017-03-29 05:04:52');
INSERT INTO `Login` VALUES (1490763892908, 1490763889677, 1, '2017-03-29 05:09:04');
INSERT INTO `Login` VALUES (1490764146839, 1490763889677, 0, '2017-03-29 05:09:06');
INSERT INTO `Login` VALUES (1490764146840, 1490763889677, 0, '2017-03-29 05:09:17');
INSERT INTO `Login` VALUES (1490764160920, 1490763889677, 0, '2017-03-29 05:09:20');
INSERT INTO `Login` VALUES (1490796426168, 1490796536716, 0, '2017-03-29 14:08:56');
INSERT INTO `Login` VALUES (1490796539768, 1490796536716, 0, '2017-03-29 14:08:59');
INSERT INTO `Login` VALUES (1490796539769, 1490796536716, 1, '2017-03-29 14:09:25');
INSERT INTO `Login` VALUES (1490796612462, 1490796536716, 0, '2017-03-29 14:10:12');
INSERT INTO `Login` VALUES (1490796612463, 1490796536716, 0, '2017-03-29 14:10:14');
INSERT INTO `Login` VALUES (1490797130482, 1490796536716, 0, '2017-03-29 14:18:50');
INSERT INTO `Login` VALUES (1490797130483, 1490796536716, 0, '2017-03-29 14:21:17');
INSERT INTO `Login` VALUES (1490799078694, 1490796536716, 0, '2017-03-29 14:51:18');
INSERT INTO `Login` VALUES (1490799078695, 1490796536716, 0, '2017-03-29 15:04:49');
INSERT INTO `Login` VALUES (1490863478648, 82003, 0, '2017-03-30 08:44:40');
INSERT INTO `Login` VALUES (1490863574695, 82003, 0, '2017-03-30 08:46:14');
INSERT INTO `Login` VALUES (1490863574696, 82005, 0, '2017-03-30 08:46:16');
INSERT INTO `Login` VALUES (1490863617906, 82005, 0, '2017-03-30 08:46:57');
INSERT INTO `Login` VALUES (1490863617907, 70793, 1, '2017-03-30 08:47:12');
INSERT INTO `Login` VALUES (1490863735458, 70793, 0, '2017-03-30 08:48:55');
INSERT INTO `Login` VALUES (1490863735459, 93793, 0, '2017-03-30 08:49:01');
INSERT INTO `Login` VALUES (1490863793209, 93793, 0, '2017-03-30 08:49:53');
INSERT INTO `Login` VALUES (1490863793210, 82006, 0, '2017-03-30 08:50:07');
INSERT INTO `Login` VALUES (1490864162242, 82006, 0, '2017-03-30 08:56:02');
INSERT INTO `Login` VALUES (1490864162243, 82044, 1, '2017-03-30 08:56:39');
INSERT INTO `Login` VALUES (1490864359458, 82044, 0, '2017-03-30 08:59:19');
INSERT INTO `Login` VALUES (1490874790302, 82040, 0, '2017-03-30 11:53:14');
INSERT INTO `Login` VALUES (1490874856899, 82040, 0, '2017-03-30 11:54:16');
INSERT INTO `Login` VALUES (1490874856900, 82055, 0, '2017-03-30 11:54:22');
INSERT INTO `Login` VALUES (1490875711368, 82055, 0, '2017-03-30 12:08:31');
INSERT INTO `Login` VALUES (1490875711369, 82056, 0, '2017-03-30 12:08:37');
INSERT INTO `Login` VALUES (1490875721491, 82056, 0, '2017-03-30 12:08:41');
INSERT INTO `Login` VALUES (1490875721492, 82060, 0, '2017-03-30 12:08:43');
INSERT INTO `Login` VALUES (1490875725467, 82060, 0, '2017-03-30 12:08:45');
INSERT INTO `Login` VALUES (1490875725468, 1490875855144, 0, '2017-03-30 12:10:55');
INSERT INTO `Login` VALUES (1490875857334, 1490875855144, 0, '2017-03-30 12:10:57');
INSERT INTO `Login` VALUES (1490880027108, 82054, 0, '2017-03-30 13:20:27');
INSERT INTO `Login` VALUES (1490880030859, 82054, 0, '2017-03-30 13:20:30');
INSERT INTO `Login` VALUES (1490880030860, 1490880220255, 0, '2017-03-30 13:23:40');
INSERT INTO `Login` VALUES (1490880236865, 1490880220255, 0, '2017-03-30 13:23:56');
INSERT INTO `Login` VALUES (1490880236866, 1490880254410, 0, '2017-03-30 13:24:14');
INSERT INTO `Login` VALUES (1490880256555, 1490880254410, 0, '2017-03-30 13:24:16');
INSERT INTO `Login` VALUES (1490973548451, 1490973670928, 0, '2017-03-31 15:21:11');
INSERT INTO `Login` VALUES (1490974102842, 1490973670928, 0, '2017-03-31 15:28:22');
INSERT INTO `Login` VALUES (1490974212206, 70793, 0, '2017-03-31 15:30:27');
INSERT INTO `Login` VALUES (1490974347168, 70793, 0, '2017-03-31 15:32:27');
INSERT INTO `Login` VALUES (1491014963729, 82049, 0, '2017-04-01 02:49:29');
INSERT INTO `Login` VALUES (1491014970908, 82049, 0, '2017-04-01 02:49:30');
INSERT INTO `Login` VALUES (1491014970909, 82051, 0, '2017-04-01 02:49:32');
INSERT INTO `Login` VALUES (1491014975055, 82051, 0, '2017-04-01 02:49:35');
INSERT INTO `Login` VALUES (1491014975056, 1490420651686, 0, '2017-04-01 02:49:37');
INSERT INTO `Login` VALUES (1491014978929, 1490420651686, 0, '2017-04-01 02:49:38');
INSERT INTO `Login` VALUES (1491014978930, 1491015049274, 0, '2017-04-01 02:50:49');
INSERT INTO `Login` VALUES (1491015064226, 1491015049274, 0, '2017-04-01 02:51:04');
INSERT INTO `Login` VALUES (1491015064227, 70793, 0, '2017-04-01 02:57:27');
INSERT INTO `Login` VALUES (1491130974601, 82049, 0, '2017-04-02 11:03:06');
INSERT INTO `Login` VALUES (1491130988304, 82049, 0, '2017-04-02 11:03:08');
INSERT INTO `Login` VALUES (1491130988305, 82050, 0, '2017-04-02 11:03:10');
INSERT INTO `Login` VALUES (1491130992091, 82050, 0, '2017-04-02 11:03:12');
INSERT INTO `Login` VALUES (1491130992092, 1490420651686, 0, '2017-04-02 11:03:13');
INSERT INTO `Login` VALUES (1491130996226, 1490420651686, 0, '2017-04-02 11:03:16');
INSERT INTO `Login` VALUES (1491130996227, 1491131016872, 0, '2017-04-02 11:03:37');
INSERT INTO `Login` VALUES (1491131020967, 1491131016872, 0, '2017-04-02 11:03:40');
INSERT INTO `Login` VALUES (1491131114629, 1491131208618, 0, '2017-04-02 11:06:48');
INSERT INTO `Login` VALUES (1491131215621, 1491131208618, 0, '2017-04-02 11:06:55');
INSERT INTO `Login` VALUES (1491131215622, 1491131208618, 0, '2017-04-02 12:32:26');
INSERT INTO `Login` VALUES (1491136484469, 1491131208618, 0, '2017-04-02 12:34:44');
INSERT INTO `Login` VALUES (1491137049692, 1491137170621, 0, '2017-04-02 12:46:10');
INSERT INTO `Login` VALUES (1491137175158, 1491137170621, 0, '2017-04-02 12:46:15');
INSERT INTO `Login` VALUES (1491137175159, 70793, 0, '2017-04-02 12:46:27');
INSERT INTO `Login` VALUES (1491210186666, 82046, 0, '2017-04-03 09:05:37');
INSERT INTO `Login` VALUES (1491210340156, 82046, 0, '2017-04-03 09:05:40');
INSERT INTO `Login` VALUES (1491210340157, 82041, 0, '2017-04-03 09:05:41');
INSERT INTO `Login` VALUES (1491210344197, 82041, 0, '2017-04-03 09:05:44');
INSERT INTO `Login` VALUES (1491210344198, 1491210361659, 1, '2017-04-03 09:06:23');
INSERT INTO `Login` VALUES (1491210385826, 1491210361659, 0, '2017-04-03 09:06:25');
INSERT INTO `Login` VALUES (1491210385827, 1491210948591, 0, '2017-04-03 09:15:48');
INSERT INTO `Login` VALUES (1491210951970, 1491210948591, 0, '2017-04-03 09:15:51');
INSERT INTO `Login` VALUES (1491210951971, 1491210948591, 1, '2017-04-03 09:16:01');
INSERT INTO `Login` VALUES (1491210964359, 1491210948591, 0, '2017-04-03 09:16:04');
INSERT INTO `Login` VALUES (1491210964360, 1491210948591, 0, '2017-04-03 09:16:07');
INSERT INTO `Login` VALUES (1491210969546, 1491210948591, 0, '2017-04-03 09:16:09');
INSERT INTO `Login` VALUES (1491231490642, 82003, 0, '2017-04-03 14:58:13');
INSERT INTO `Login` VALUES (1491231560497, 82003, 0, '2017-04-03 14:59:20');
INSERT INTO `Login` VALUES (1491231560498, 93793, 0, '2017-04-03 14:59:31');
INSERT INTO `Login` VALUES (1491231602048, 93793, 0, '2017-04-03 15:00:02');
INSERT INTO `Login` VALUES (1491231602049, 93793, 0, '2017-04-03 15:09:42');
INSERT INTO `Login` VALUES (1491232187135, 93793, 0, '2017-04-03 15:09:47');
INSERT INTO `Login` VALUES (1491278106043, 1490109742863, 0, '2017-04-04 03:55:15');
INSERT INTO `Login` VALUES (1491278117918, 1490109742863, 0, '2017-04-04 03:55:17');
INSERT INTO `Login` VALUES (1491278117919, 1490427577823, 0, '2017-04-04 03:55:19');
INSERT INTO `Login` VALUES (1491278121481, 1490427577823, 0, '2017-04-04 03:55:21');
INSERT INTO `Login` VALUES (1491278121482, 1491278203315, 0, '2017-04-04 03:56:43');
INSERT INTO `Login` VALUES (1491283571224, 1491278203315, 0, '2017-04-04 05:26:11');
INSERT INTO `Login` VALUES (1491283708324, 1491210314249, 1, '2017-04-04 05:28:55');
INSERT INTO `Login` VALUES (1491283800948, 1491210314249, 0, '2017-04-04 05:30:00');
INSERT INTO `Login` VALUES (1491706177615, 1491706263570, 0, '2017-04-09 02:51:03');
INSERT INTO `Login` VALUES (1491713830487, 1491713931091, 0, '2017-04-09 04:58:51');
INSERT INTO `Login` VALUES (1491713972850, 1491713931091, 0, '2017-04-09 04:59:32');
INSERT INTO `Login` VALUES (1491728210153, 1490427139175, 0, '2017-04-09 08:56:53');
INSERT INTO `Login` VALUES (1491728216317, 1490427139175, 0, '2017-04-09 08:56:56');
INSERT INTO `Login` VALUES (1491728216318, 82054, 0, '2017-04-09 08:56:58');
INSERT INTO `Login` VALUES (1491728221137, 82054, 0, '2017-04-09 08:57:01');
INSERT INTO `Login` VALUES (1491728221138, 1491728303733, 0, '2017-04-09 08:58:23');
INSERT INTO `Login` VALUES (1491728316688, 1491728303733, 0, '2017-04-09 08:58:36');
INSERT INTO `Login` VALUES (1491798585269, 1490420651686, 0, '2017-04-10 04:30:17');
INSERT INTO `Login` VALUES (1491798619163, 1490420651686, 0, '2017-04-10 04:30:19');
INSERT INTO `Login` VALUES (1491798619164, 1491015049274, 0, '2017-04-10 04:30:21');
INSERT INTO `Login` VALUES (1491798623156, 1491015049274, 0, '2017-04-10 04:30:23');
INSERT INTO `Login` VALUES (1491798623157, 1491798705995, 0, '2017-04-10 04:31:46');
INSERT INTO `Login` VALUES (1491798824157, 1491798705995, 0, '2017-04-10 04:33:44');
INSERT INTO `Login` VALUES (1491830822528, 1491830893899, 0, '2017-04-10 13:28:14');
INSERT INTO `Login` VALUES (1491831356223, 1491830893899, 0, '2017-04-10 13:35:56');
INSERT INTO `Login` VALUES (1491838437130, 1491838521279, 0, '2017-04-10 15:35:21');
INSERT INTO `Login` VALUES (1491838535040, 1491838521279, 0, '2017-04-10 15:35:35');
INSERT INTO `Login` VALUES (1491917352614, 1491728303733, 0, '2017-04-11 13:29:22');
INSERT INTO `Login` VALUES (1491917364596, 1491728303733, 0, '2017-04-11 13:29:24');
INSERT INTO `Login` VALUES (1491917364597, 1491917447333, 0, '2017-04-11 13:30:47');
INSERT INTO `Login` VALUES (1491917916123, 1491917447333, 0, '2017-04-11 13:38:36');
INSERT INTO `Login` VALUES (1492865677465, 82058, 0, '2017-04-22 12:54:45');
INSERT INTO `Login` VALUES (1492865687807, 82058, 0, '2017-04-22 12:54:47');
INSERT INTO `Login` VALUES (1492865687808, 1492866224074, 0, '2017-04-22 13:03:44');
INSERT INTO `Login` VALUES (1492866227861, 1492866224074, 0, '2017-04-22 13:03:47');
INSERT INTO `Login` VALUES (1492866227862, 1492866224074, 0, '2017-04-22 13:03:52');
INSERT INTO `Login` VALUES (1492866235005, 1492866224074, 0, '2017-04-22 13:03:55');
INSERT INTO `Login` VALUES (1492866235006, 1492866322486, 0, '2017-04-22 13:05:22');
INSERT INTO `Login` VALUES (1492866325550, 1492866322486, 0, '2017-04-22 13:05:25');
INSERT INTO `Login` VALUES (1492936150349, 1492936169722, 0, '2017-04-23 08:29:30');
INSERT INTO `Login` VALUES (1492936172897, 1492936169722, 0, '2017-04-23 08:29:32');
INSERT INTO `Login` VALUES (1492936172898, 1492936169722, 0, '2017-04-23 08:33:44');
INSERT INTO `Login` VALUES (1492936427137, 1492936169722, 0, '2017-04-23 08:33:47');
INSERT INTO `Login` VALUES (1492936427138, 1492936169722, 0, '2017-04-23 08:37:29');
INSERT INTO `Login` VALUES (1492936651770, 1492936169722, 0, '2017-04-23 08:37:31');
INSERT INTO `Login` VALUES (1493456282571, 90814, 0, '2017-04-29 08:58:09');
INSERT INTO `Login` VALUES (1493457036233, 90814, 0, '2017-04-29 09:10:36');
INSERT INTO `Login` VALUES (1493480121888, 1490427139175, 0, '2017-04-29 15:35:26');
INSERT INTO `Login` VALUES (1493480129111, 1490427139175, 0, '2017-04-29 15:35:29');
INSERT INTO `Login` VALUES (1493480129112, 1493480142628, 0, '2017-04-29 15:35:42');
INSERT INTO `Login` VALUES (1493480148564, 1493480142628, 0, '2017-04-29 15:35:48');
INSERT INTO `Login` VALUES (1493480148565, 1493480142628, 0, '2017-04-29 15:35:54');
INSERT INTO `Login` VALUES (1493480156757, 1493480142628, 0, '2017-04-29 15:35:56');
INSERT INTO `Login` VALUES (1493480156758, 90814, 0, '2017-04-29 15:36:01');
INSERT INTO `Login` VALUES (1493480162695, 90814, 0, '2017-04-29 15:36:02');
INSERT INTO `Login` VALUES (1493480162696, 93793, 0, '2017-04-29 15:36:06');
INSERT INTO `Login` VALUES (1493480189011, 93793, 0, '2017-04-29 15:36:29');
INSERT INTO `Login` VALUES (1493747501699, 1493747512860, 0, '2017-05-02 17:51:53');
INSERT INTO `Login` VALUES (1493747519493, 1493747512860, 0, '2017-05-02 17:51:59');
INSERT INTO `Login` VALUES (1493747519494, 1493747777770, 0, '2017-05-02 17:56:17');
INSERT INTO `Login` VALUES (1493747780534, 1493747777770, 0, '2017-05-02 17:56:20');
INSERT INTO `Login` VALUES (1493748571679, 1493748594003, 0, '2017-05-02 18:09:54');
INSERT INTO `Login` VALUES (1493748596459, 1493748594003, 0, '2017-05-02 18:09:56');
INSERT INTO `Login` VALUES (1493748596460, 1493748615711, 0, '2017-05-02 18:10:15');
INSERT INTO `Login` VALUES (1493748617966, 1493748615711, 0, '2017-05-02 18:10:17');
INSERT INTO `Login` VALUES (1493748617967, 1493749090643, 0, '2017-05-02 18:18:10');
INSERT INTO `Login` VALUES (1493749100206, 1493749090643, 0, '2017-05-02 18:18:20');
INSERT INTO `Login` VALUES (1493836047659, 1493836043151, 0, '2017-05-03 18:27:27');
INSERT INTO `Login` VALUES (1493836049490, 1493836043151, 0, '2017-05-03 18:27:29');
INSERT INTO `Login` VALUES (1493883116023, 1493883110132, 0, '2017-05-04 07:31:56');
INSERT INTO `Login` VALUES (1493883118007, 1493883110132, 0, '2017-05-04 07:31:58');
INSERT INTO `Login` VALUES (1493890214303, 1493890214167, 0, '2017-05-04 09:30:14');
INSERT INTO `Login` VALUES (1493890216183, 1493890214167, 0, '2017-05-04 09:30:16');
INSERT INTO `Login` VALUES (1493890699755, 1493890303473, 0, '2017-05-04 09:38:19');
INSERT INTO `Login` VALUES (1493890702129, 1493890303473, 0, '2017-05-04 09:38:22');
INSERT INTO `Login` VALUES (1493891565732, 82001, 0, '2017-05-04 09:52:45');
INSERT INTO `Login` VALUES (1493891782837, 82001, 0, '2017-05-04 09:56:22');
INSERT INTO `Login` VALUES (1493891784591, 82002, 0, '2017-05-04 09:56:24');
INSERT INTO `Login` VALUES (1493891793881, 82002, 0, '2017-05-04 09:56:33');
INSERT INTO `Login` VALUES (1493891806372, 38710, 1, '2017-05-04 09:56:46');
COMMIT;

-- ----------------------------
-- Table structure for Moment
-- ----------------------------
DROP TABLE IF EXISTS `Moment`;
CREATE TABLE `Moment` (
  `id` bigint(15) NOT NULL COMMENT '唯一标识',
  `userId` bigint(15) NOT NULL COMMENT '用户id',
  `date` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `content` varchar(300) DEFAULT NULL COMMENT '内容',
  `praiseUserIdList` json NOT NULL COMMENT '点赞的用户id列表',
  `pictureList` json NOT NULL COMMENT '图片列表',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='动态';

-- ----------------------------
-- Records of Moment
-- ----------------------------
BEGIN;
INSERT INTO `Moment` VALUES (12, 70793, '2017-02-08 08:06:11', 'APIJSON,let interfaces and documents go to hell !', '[70793, 93793, 82044, 82040, 82055, 90814, 38710, 82002, 82006, 1508072105320, 82001]', '[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\", \"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\", \"https://camo.githubusercontent.com/788c0a7e11a4f5aadef3c886f028c79b4808613a/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343932353935372d313732303737333630382e6a7067\", \"http://static.oschina.net/uploads/img/201604/22172507_Pz9Y.png\", \"https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067\", \"https://camo.githubusercontent.com/f513fa631bd780dc0ec3cf2663777e356dc3664f/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343733323232332d3337333933303233322e6a7067\", \"https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067\", \"https://camo.githubusercontent.com/f513fa631bd780dc0ec3cf2663777e356dc3664f/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343733323232332d3337333933303233322e6a7067\"]');
INSERT INTO `Moment` VALUES (15, 70793, '2017-02-08 08:06:11', 'APIJSON is a JSON Transmission Structure Protocol…', '[82002, 70793, 38710, 93793, 82001]', '[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]');
INSERT INTO `Moment` VALUES (32, 82002, '2017-02-08 08:06:11', NULL, '[38710, 82002, 82001]', '[\"https://camo.githubusercontent.com/f513fa631bd780dc0ec3cf2663777e356dc3664f/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343733323232332d3337333933303233322e6a7067\", \"https://camo.githubusercontent.com/5f5c4e0c4dc539c34e8eae8ac0cbc6dccdfee5d3/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343533333831362d323032373434343231382e6a7067\", \"http://static.oschina.net/uploads/img/201604/22172508_mpwj.jpg\"]');
INSERT INTO `Moment` VALUES (58, 90814, '2017-02-01 11:14:31', 'This is a Content...-435', '[38710, 82003, 82005, 93793, 82006, 82044, 82001]', '[\"http://static.oschina.net/uploads/img/201604/22172507_aMmH.jpg\"]');
INSERT INTO `Moment` VALUES (170, 70793, '2017-02-01 11:14:31', 'This is a Content...-73', '[82044, 82002, 82001]', '[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\", \"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\", \"http://static.oschina.net/uploads/img/201604/22172508_mpwj.jpg\"]');
INSERT INTO `Moment` VALUES (235, 38710, '2017-02-08 08:06:11', 'APIJSON,let interfaces and documents go to hell !', '[82001]', '[\"http://static.oschina.net/uploads/img/201604/22172508_mpwj.jpg\", \"http://static.oschina.net/uploads/user/1332/2664107_50.jpg?t=1457405500000\"]');
INSERT INTO `Moment` VALUES (301, 93793, '2017-02-01 11:14:31', 'This is a Content...-301', '[38710, 93793, 82003, 82005, 82040, 82055, 82002, 82001]', '[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\"]');
INSERT INTO `Moment` VALUES (371, 82002, '2017-02-01 11:14:31', 'This is a Content...-371', '[90814, 93793, 82003, 82005, 82006, 82040, 82002, 82001]', '[\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\", \"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\", \"https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067\", \"http://static.oschina.net/uploads/img/201604/22172507_aMmH.jpg\", \"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\"]');
INSERT INTO `Moment` VALUES (470, 38710, '2017-02-01 11:14:31', 'This is a Content...-470', '[82001]', '[\"http://static.oschina.net/uploads/img/201604/22172507_Pz9Y.png\"]');
INSERT INTO `Moment` VALUES (511, 38710, '2017-02-08 08:06:11', NULL, '[70793, 93793, 82001]', '[\"https://camo.githubusercontent.com/f513fa631bd780dc0ec3cf2663777e356dc3664f/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343733323232332d3337333933303233322e6a7067\", \"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\", \"https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067\", \"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\", \"http://static.oschina.net/uploads/img/201604/22172507_aMmH.jpg\", \"https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067\"]');
INSERT INTO `Moment` VALUES (543, 93793, '2017-02-08 08:06:11', NULL, '[82001]', '[\"https://camo.githubusercontent.com/5f5c4e0c4dc539c34e8eae8ac0cbc6dccdfee5d3/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343533333831362d323032373434343231382e6a7067\", \"https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067\", \"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\", \"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\", \"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\"]');
INSERT INTO `Moment` VALUES (551, 70793, '2017-02-08 08:06:11', 'test', '[82001]', '[\"http://static.oschina.net/uploads/img/201604/22172507_Pz9Y.png\"]');
INSERT INTO `Moment` VALUES (595, 38710, '2017-03-05 05:29:19', NULL, '[70793, 82002, 82001]', '[\"http://common.cnblogs.com/images/icon_weibo_24.png\", \"http://static.oschina.net/uploads/user/19/39085_50.jpg\"]');
INSERT INTO `Moment` VALUES (704, 38710, '2017-03-12 09:39:44', 'APIJSON is a JSON Transmission Structure Protocol…', '[82003, 82002, 82001]', '[\"http://static.oschina.net/uploads/user/629/1258821_50.jpg?t=1378063141000\", \"http://static.oschina.net/uploads/user/1332/2664107_50.jpg?t=1457405500000\"]');
INSERT INTO `Moment` VALUES (1491200468898, 38710, '2017-04-03 06:21:08', 'APIJSON, let interfaces go to hell!', '[82001]', '[\"http://static.oschina.net/uploads/user/998/1997902_50.jpg?t=1407806577000\", \"http://static.oschina.net/uploads/user/1200/2400261_50.png?t=1439638750000\"]');
INSERT INTO `Moment` VALUES (1493835799335, 38710, '2017-05-03 18:23:19', 'APIJSON is a JSON Transmission Structure Protocol…', '[82002, 82001]', '[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]');
INSERT INTO `Moment` VALUES (1508053762227, 82003, '2017-10-15 07:49:22', '我也试试', '[1515565976140, 82001]', '[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]');
INSERT INTO `Moment` VALUES (1508072491570, 82002, '2017-10-15 13:01:31', '有点冷~', '[82001, 82002]', '[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]');
INSERT INTO `Moment` VALUES (1508072633830, 93793, '2017-10-15 13:03:53', '天凉了\n有男朋友的抱男盆友\n有女朋友的抱女朋友\n而我就比较牛逼了\n我不冷。', '[82005, 82002, 70793, 38710, 82045, 82001]', '[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]');
INSERT INTO `Moment` VALUES (1508073178489, 82045, '2017-10-15 13:12:58', '发动态', '[82001]', '[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]');
INSERT INTO `Moment` VALUES (1512314438990, 38710, '2017-12-03 15:20:38', 'APIJSON iOS-Swift版发布，自动生成请求代码,欢迎使用^_^ \n https://github.com/TommyLemon/APIJSON', '[82001, 82002, 70793, 1512531601485]', '[\"https://images2018.cnblogs.com/blog/660067/201712/660067-20171203231829476-1202860128.jpg\"]');
INSERT INTO `Moment` VALUES (1513094436910, 38710, '2017-12-12 16:00:36', 'APIJSON-Python已发布，欢迎体验^_^\nhttps://github.com/TommyLemon/APIJSON', '[82005, 82001]', '[\"https://raw.githubusercontent.com/TommyLemon/APIJSON/master/picture/APIJSON_Auto_get.jpg\", \"https://raw.githubusercontent.com/TommyLemon/APIJSON/master/picture/APIJSON_Auto_code.jpg\", \"https://raw.githubusercontent.com/TommyLemon/APIJSON/master/picture/APIJSON_Auto_doc.jpg\"]');
INSERT INTO `Moment` VALUES (1514017444961, 82002, '2017-12-23 08:24:04', '123479589679', '[82002, 1520242280259, 82001, 70793, 1524042900591, 1528264711016]', '[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]');
INSERT INTO `Moment` VALUES (1514858533480, 82056, '2018-01-02 02:02:13', 'I am the Iron Man', '[82001]', '[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]');
INSERT INTO `Moment` VALUES (1516086423441, 93793, '2018-01-16 07:07:03', '抢到票了，开心ପ( ˘ᵕ˘ ) ੭ ☆', '[93793, 38710, 82001]', '[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]');
INSERT INTO `Moment` VALUES (1520242333325, 1520242280259, '2018-03-05 09:32:13', '法拉利', '[1520242280259, 70793, 82001]', '[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]');
INSERT INTO `Moment` VALUES (1523935589834, 1523626157302, '2018-04-17 03:26:29', 'by第一条动态', '[]', '[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]');
INSERT INTO `Moment` VALUES (1523936332614, 1523626157302, '2018-04-17 03:38:52', 'by第二条', '[82001, 1523935772553]', '[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]');
INSERT INTO `Moment` VALUES (1524178455305, 1524042900591, '2018-04-19 22:54:15', '早上好啊', '[1524042900591, 38710, 82003, 82001, 1523626157302]', '[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]');
INSERT INTO `Moment` VALUES (1524298780222, 1524298730523, '2018-04-21 08:19:40', 'e说点什么吧~', '[82001]', '[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]');
INSERT INTO `Moment` VALUES (1524826652626, 1524298730523, '2018-04-27 10:57:32', '说点什么吧~哈哈哈', '[82001]', '[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]');
INSERT INTO `Moment` VALUES (1527498273102, 1527498229991, '2018-05-28 09:04:33', '说点什么吧~yui', '[82001]', '[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]');
INSERT INTO `Moment` VALUES (1527821296110, 1527495857924, '2018-06-01 02:48:16', '这是我的商品1号', '[1527821445610, 82003, 82001]', '[\"http://pic31.nipic.com/20130710/13151003_093759013311_2.jpg\", \"https://cbu01.alicdn.com/img/ibank/2013/514/580/740085415_2101098104.310x310.jpg\"]');
INSERT INTO `Moment` VALUES (1527830331780, 1527495857924, '2018-06-01 05:18:51', '各种购物袋', '[38710, 82002, 1527495857924, 82003]', '[\"https://cbu01.alicdn.com/img/ibank/2018/292/335/8058533292_57202994.310x310.jpg\", \"https://cbu01.alicdn.com/img/ibank/2018/089/747/8586747980_1843977904.310x310.jpg\", \"https://cbu01.alicdn.com/img/ibank/2016/025/123/3012321520_471514049.310x310.jpg\", \"https://cbu01.alicdn.com/img/ibank/2017/729/995/4800599927_69233977.310x310.jpg\", \"https://cbu01.alicdn.com/img/ibank/2016/377/263/3755362773_609022431.310x310.jpg\"]');
INSERT INTO `Moment` VALUES (1527830474378, 1527495857924, '2018-06-01 05:21:14', '电视机', '[1527495857924]', '[\"https://cbu01.alicdn.com/img/ibank/2017/231/077/4524770132_781046171.310x310.jpg\"]');
INSERT INTO `Moment` VALUES (1528251335464, 1528250827953, '2018-06-06 02:15:35', 'meiyou', '[1528250827953]', '[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]');
INSERT INTO `Moment` VALUES (1528260617722, 1528255497767, '2018-06-06 04:50:17', '。。。。', '[]', '[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]');
INSERT INTO `Moment` VALUES (1528269822710, 1528264711016, '2018-06-06 07:23:42', 'hhhhhhh', '[1528250827953, 82001]', '[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]');
INSERT INTO `Moment` VALUES (1528269988360, 1528250827953, '2018-06-06 07:26:28', '为什么发动态默认会有这两张图片啊？不可以选择自己的图片', '[1528250827953]', '[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]');
INSERT INTO `Moment` VALUES (1528274037224, 1528250827953, '2018-06-06 08:33:57', '说点什么吧~hgdsryh', '[]', '[\"https://image.baidu.com/search/detail?ct=503316480&z=0&ipn=d&word=%E4%BA%91%E5%8D%97%E9%A3%8E%E6%99%AF%E5%9B%BE%E7%89%87&step_word=&hs=0&pn=0&spn=0&di=163958046450&pi=0&rn=1&tn=baiduimagedetail&is=0%2C0&istype=2&ie=utf-8&oe=utf-8&in=&cl=2&lm=-1&st=-1&cs=1403824732%2C1921310327&os=1571651475%2C3950546936&simid=3426978648%2C550887139&adpicid=0&lpn=0&ln=1985&fr=&fmq=1528273681226_R&fm=result&ic=0&s=undefined&se=&sme=&tab=0&width=&height=&face=undefined&ist=&jit=&cg=&bdtype=0&oriquery=&objurl=http%3A%2F%2Fpic1.win4000.com%2Fwallpaper%2F3%2F57a2a41f57d09.jpg&fromurl=ippr_z2C%24qAzdH3FAzdH3Fooo_z%26e3Botg9aaa_z%26e3Bv54AzdH3Fowssrwrj6_kt2_88an88_8_z%26e3Bip4s&gsm=0&rpstart=0&rpnum=0&islist=&querylist=\", \"https://image.baidu.com/search/detail?ct=503316480&z=0&ipn=d&word=%E4%BA%91%E5%8D%97%E9%A3%8E%E6%99%AF%E5%9B%BE%E7%89%87&step_word=&hs=0&pn=12&spn=0&di=105575240210&pi=0&rn=1&tn=baiduimagedetail&is=0%2C0&istype=2&ie=utf-8&oe=utf-8&in=&cl=2&lm=-1&st=-1&cs=832573604%2C2847830718&os=1862795828%2C1682403963&simid=4268934412%2C608274877&adpicid=0&lpn=0&ln=1985&fr=&fmq=1528273681226_R&fm=result&ic=0&s=undefined&se=&sme=&tab=0&width=&height=&face=undefined&ist=&jit=&cg=&bdtype=0&oriquery=&objurl=http%3A%2F%2Fi0.szhomeimg.com%2FUploadFiles%2FBBS%2F2006%2F08%2F05%2F24752199_79122.91.jpg&fromurl=ippr_z2C%24qAzdH3FAzdH3Fkkf_z%26e3Bfzi54j_z%26e3Bv54AzdH3Fna-ccbaa-1jpwts-d90cd8ll-a-8_z%26e3Bip4s&gsm=0&rpstart=0&rpnum=0&islist=&querylist=\"]');
INSERT INTO `Moment` VALUES (1528356378455, 1528264711016, '2018-06-07 07:26:18', '去旅游嘛～', '[82001]', '[]');
INSERT INTO `Moment` VALUES (1528356421201, 1528264711016, '2018-06-07 07:27:01', '(ง •̀_•́)ง', '[]', '[]');
INSERT INTO `Moment` VALUES (1528356496939, 1528356470041, '2018-06-07 07:28:16', '(๑•ั็ω•็ั๑)', '[]', '[]');
INSERT INTO `Moment` VALUES (1528462217322, 1528339692804, '2018-06-08 12:50:17', '有没有小姐姐准备端午出游的？\n地点:北戴河', '[]', '[\"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1531072366455&di=c0d4b15b2c4b70aad49e6ae747f60742&imgtype=0&src=http%3A%2F%2Fpic1.win4000.com%2Fwallpaper%2F3%2F57a2a41f57d09.jpg\", \"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1531072499167&di=5b5621d117edbc5d344a03ba0a6b580b&imgtype=0&src=http%3A%2F%2Fi0.szhomeimg.com%2FUploadFiles%2FBBS%2F2006%2F08%2F05%2F24752199_79122.91.jpg\"]');
INSERT INTO `Moment` VALUES (1528676875139, 1528339692804, '2018-06-11 00:27:55', '123456', '[82001]', '[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]');
INSERT INTO `Moment` VALUES (1531062713966, 82002, '2018-07-08 15:11:53', '云南好美啊( ◞˟૩˟)◞', '[82001, 82005, 38710, 70793, 93793, 82003, 1531969715979]', '[\"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1531072366455&di=c0d4b15b2c4b70aad49e6ae747f60742&imgtype=0&src=http%3A%2F%2Fpic1.win4000.com%2Fwallpaper%2F3%2F57a2a41f57d09.jpg\", \"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1531072499167&di=5b5621d117edbc5d344a03ba0a6b580b&imgtype=0&src=http%3A%2F%2Fi0.szhomeimg.com%2FUploadFiles%2FBBS%2F2006%2F08%2F05%2F24752199_79122.91.jpg\"]');
INSERT INTO `Moment` VALUES (1531969818357, 1531969715979, '2018-07-19 03:10:18', 'http://q18idc.com', '[1531969715979, 82001, 38710, 1534926301956]', '[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]');
INSERT INTO `Moment` VALUES (1533908589726, 1533835176109, '2018-08-10 13:43:09', '我的', '[82001]', '[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]');
INSERT INTO `Moment` VALUES (1535781636403, 1532188114543, '2018-09-01 06:00:36', '这是一个测试', '[82001]', '[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]');
INSERT INTO `Moment` VALUES (1536064087117, 1532188114543, '2018-09-04 12:28:07', '说点什么吧~奥哈达', '[]', '[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]');
INSERT INTO `Moment` VALUES (1536805585275, 82003, '2018-09-13 02:26:25', 'iPhone Xs发布了，大家怎么看？', '[82002, 82005, 70793, 82003]', '[\"https://pic1.zhimg.com/80/v2-e129b40810070443add1c28e6185c894_hd.jpg\"]');
INSERT INTO `Moment` VALUES (1539868023868, 82001, '2018-10-18 13:07:03', '说点什么吧~3', '[82001]', '[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]');
INSERT INTO `Moment` VALUES (1540459349460, 82001, '2018-10-25 09:22:29', '说点什么吧~而你', '[]', '[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]');
INSERT INTO `Moment` VALUES (1540459361744, 82001, '2018-10-25 09:22:41', '说点什么吧~哦哦', '[82001]', '[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]');
INSERT INTO `Moment` VALUES (1540634282433, 82001, '2018-10-27 09:58:02', 'https://gss2.bdstatic.com/-fo3dSag_xI4khGkpoWK1HF6hhy/baike/c0%3Dbaike92%2C5%2C5%2C92%2C30/sign=c31ae7219525bc313f5009ca3fb6e6d4/42a98226cffc1e17646dbede4690f603728de90b.jpg', '[82001]', '[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]');
INSERT INTO `Moment` VALUES (1541557989440, 38710, '2018-11-07 02:33:09', '自动化接口和文档 APIJSON 3.0.0 发布\nhttps://www.oschina.net/news/101548/apijson-3-0-released', '[82001]', '[\"https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Auto_get.jpg\"]');
INSERT INTO `Moment` VALUES (1541667920272, 82001, '2018-11-08 09:05:20', '说点什么吧~？？？', '[82001]', '[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]');
INSERT INTO `Moment` VALUES (1541667945772, 82001, '2018-11-08 09:05:45', '说点什么吧~都有', '[82001]', '[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]');
INSERT INTO `Moment` VALUES (1541684010904, 82001, '2018-11-08 13:33:30', '说点什么吧~A man can be destroyed but not defeated', '[82002, 38710, 82001]', '[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]');
INSERT INTO `Moment` VALUES (1544265482923, 82001, '2018-12-08 10:38:02', 'APIJSON is a JSON Transmission Structure Protocol…', '[82002, 82003, 82001]', '[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]');
INSERT INTO `Moment` VALUES (1544276121218, 82001, '2018-12-08 13:35:21', '说点什么吧~ajhs', '[82001]', '[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]');
INSERT INTO `Moment` VALUES (1544276216289, 1544276209348, '2018-12-08 13:36:56', '说点什么吧~ey', '[1544276209348]', '[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]');
INSERT INTO `Moment` VALUES (1544497353863, 82001, '2018-12-11 03:02:33', 'APIJSON,let interfaces and documents go to hell !', '[82001]', '[]');
INSERT INTO `Moment` VALUES (1544497355630, 82001, '2018-12-11 03:02:35', 'APIJSON,let interfaces and documents go to hell !', '[]', '[]');
INSERT INTO `Moment` VALUES (1544537838100, 82001, '2018-12-11 14:17:18', '说点什么吧~logo灭了也可', '[]', '[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]');
INSERT INTO `Moment` VALUES (1545187924367, 1544503822963, '2018-12-19 02:52:04', '说哼哼唧唧点什么吧~', '[1544503822963, 82001]', '[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]');
INSERT INTO `Moment` VALUES (1545490282104, 82001, '2018-12-22 14:51:22', '说点什么吧~apijson', '[82001]', '[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]');
INSERT INTO `Moment` VALUES (1545560428650, 82001, '2018-12-23 10:20:28', 'APIJSON,let interfaces and documents go to hell !', '[82001]', '[]');
INSERT INTO `Moment` VALUES (1545564986045, 82003, '2018-12-23 11:36:26', '测试新增动态', '[82001]', '[\"http://static.oschina.net/uploads/user/48/96331_50.jpg\"]');
INSERT INTO `Moment` VALUES (1545819572448, 82002, '2018-12-26 10:19:32', 'APIJSON,let interfaces and documents go to hell !', '[82001]', '[]');
INSERT INTO `Moment` VALUES (1545819572637, 82002, '2018-12-26 10:19:32', '测试新增动态', '[82001]', '[\"http://static.oschina.net/uploads/user/48/96331_50.jpg\"]');
INSERT INTO `Moment` VALUES (1545819752556, 82001, '2018-12-26 10:22:32', '说点什么吧~hello world', '[82001]', '[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]');
INSERT INTO `Moment` VALUES (1546934384440, 82001, '2019-01-08 07:59:44', 'APIJSON,let interfaces and documents go to hell !', '[82001]', '[]');
INSERT INTO `Moment` VALUES (1547436860950, 82001, '2019-01-14 03:34:20', '测试新增动态', '[82001]', '[\"http://static.oschina.net/uploads/user/48/96331_50.jpg\"]');
INSERT INTO `Moment` VALUES (1547479596460, 82001, '2019-01-14 15:26:36', 'APIJSON,let interfaces and documents go to hell !', '[82001]', '[]');
INSERT INTO `Moment` VALUES (1547559758939, 82002, '2019-01-15 13:42:38', 'APIJSON,let interfaces and documents go to hell !', '[]', '[]');
INSERT INTO `Moment` VALUES (1548145750536, 82003, '2019-01-22 08:29:10', 'APIJSON,let interfaces and documents go to hell !', '[82001]', '[]');
INSERT INTO `Moment` VALUES (1548145750829, 82003, '2019-01-22 08:29:10', '测试新增动态', '[]', '[\"http://static.oschina.net/uploads/user/48/96331_50.jpg\"]');
INSERT INTO `Moment` VALUES (1548236953106, 82001, '2019-01-23 09:49:13', '{@}', '[82001]', '[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]');
INSERT INTO `Moment` VALUES (1548300581350, 82002, '2019-01-24 03:29:41', 'APIJSON,let interfaces and documents go to hell !', '[]', '[]');
INSERT INTO `Moment` VALUES (1548599361342, 82001, '2019-01-27 14:29:21', '说点什么吧~好)不会徐下节课斜挎包', '[82001]', '[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]');
INSERT INTO `Moment` VALUES (1548599375288, 82001, '2019-01-27 14:29:35', '说点什么吧~告诉v是v就瞎几把想表达华西坝你撒几哈', '[82001]', '[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]');
INSERT INTO `Moment` VALUES (1548822634246, 82002, '2019-01-30 04:30:34', 'APIJSON,let interfaces and documents go to hell !', '[]', '[]');
INSERT INTO `Moment` VALUES (1548822634518, 82002, '2019-01-30 04:30:34', '测试新增动态', '[]', '[\"http://static.oschina.net/uploads/user/48/96331_50.jpg\"]');
INSERT INTO `Moment` VALUES (1549017200628, 82001, '2019-02-01 10:33:20', '说点什么吧~快捷键', '[82001]', '[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]');
INSERT INTO `Moment` VALUES (1549549981723, 82001, '2019-02-07 14:33:09', 'APIJSON,let interfaces and documents go to hell !', '[]', '[]');
INSERT INTO `Moment` VALUES (1549549983315, 82001, '2019-02-07 14:33:10', '测试新增动态', '[]', '[\"http://static.oschina.net/uploads/user/48/96331_50.jpg\"]');
INSERT INTO `Moment` VALUES (1549550007404, 82001, '2019-02-07 14:33:34', 'APIJSON,let interfaces and documents go to hell !', '[]', '[]');
COMMIT;

-- ----------------------------
-- Table structure for Praise
-- ----------------------------
DROP TABLE IF EXISTS `Praise`;
CREATE TABLE `Praise` (
  `id` bigint(15) NOT NULL AUTO_INCREMENT COMMENT '动态id',
  `momentId` bigint(15) NOT NULL COMMENT '唯一标识',
  `userId` bigint(15) NOT NULL COMMENT '用户id',
  `date` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '点赞时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 COMMENT='如果对Moment写安全要求高，可以将Moment内praiserUserIdList分离到Praise表中，作为userIdList。\n权限注解也改下：\n@MethodAccess(\n		PUT = {OWNER, ADMIN}\n		)\nclass Moment {\n       …\n}\n\n@MethodAccess(\n		PUT = {LOGIN, CONTACT, CIRCLE, OWNER, ADMIN}\n		)\n class Praise {\n       …\n }\n';

-- ----------------------------
-- Records of Praise
-- ----------------------------
BEGIN;
INSERT INTO `Praise` VALUES (1, 12, 82001, '2017-11-19 13:02:30');
INSERT INTO `Praise` VALUES (2, 15, 82002, '2017-11-19 13:02:30');
INSERT INTO `Praise` VALUES (3, 32, 82003, '2017-11-19 13:02:30');
INSERT INTO `Praise` VALUES (4, 58, 82004, '2017-11-19 13:02:30');
INSERT INTO `Praise` VALUES (5, 170, 82005, '2017-11-19 13:02:30');
INSERT INTO `Praise` VALUES (6, 235, 82006, '2017-11-19 13:02:30');
INSERT INTO `Praise` VALUES (7, 301, 82007, '2017-11-19 13:02:30');
INSERT INTO `Praise` VALUES (8, 371, 82008, '2017-11-19 13:02:30');
INSERT INTO `Praise` VALUES (9, 470, 82009, '2017-11-19 13:02:30');
INSERT INTO `Praise` VALUES (10, 511, 82010, '2017-11-19 13:02:30');
INSERT INTO `Praise` VALUES (11, 543, 82011, '2017-11-19 13:02:30');
INSERT INTO `Praise` VALUES (12, 551, 82012, '2017-11-19 13:02:30');
INSERT INTO `Praise` VALUES (13, 594, 82013, '2017-11-19 13:02:30');
INSERT INTO `Praise` VALUES (14, 595, 82014, '2017-11-19 13:02:30');
INSERT INTO `Praise` VALUES (15, 704, 82015, '2017-11-19 13:02:30');
INSERT INTO `Praise` VALUES (16, 1491200468898, 82016, '2017-11-19 13:02:30');
INSERT INTO `Praise` VALUES (17, 1491277116776, 82017, '2017-11-19 13:02:30');
INSERT INTO `Praise` VALUES (18, 1493835799335, 82018, '2017-11-19 13:02:30');
COMMIT;

-- ----------------------------
-- Table structure for Request
-- ----------------------------
DROP TABLE IF EXISTS `Request`;
CREATE TABLE `Request` (
  `id` bigint(15) NOT NULL COMMENT '唯一标识',
  `version` tinyint(4) NOT NULL DEFAULT '1' COMMENT 'GET,HEAD可用任意结构访问任意开放内容，不需要这个字段。\n其它的操作因为写入了结构和内容，所以都需要，按照不同的version选择对应的structure。\n\n自动化版本管理：\nRequest JSON最外层可以传  “version”:Integer 。\n1.未传或 <= 0，用最新版。 “@order”:”version-“\n2.已传且 > 0，用version以上的可用版本的最低版本。 “@order”:”version+”, “version{}”:”>={version}”',
  `method` varchar(10) DEFAULT 'GETS' COMMENT '只限于GET,HEAD外的操作方法。',
  `tag` varchar(20) NOT NULL COMMENT '标签',
  `structure` json NOT NULL COMMENT '结构。\nTODO 里面的 PUT 改为 UPDATE，避免和请求 PUT 搞混。',
  `detail` varchar(10000) DEFAULT NULL COMMENT '详细说明',
  `date` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='最好编辑完后删除主键，这样就是只读状态，不能随意更改。需要更改就重新加上主键。\n\n每次启动服务器时加载整个表到内存。\n这个表不可省略，model内注解的权限只是客户端能用的，其它可以保证即便服务端代码错误时也不会误删数据。';

-- ----------------------------
-- Records of Request
-- ----------------------------
BEGIN;
INSERT INTO `Request` VALUES (1, 1, 'POST', 'register', '{\"User\": {\"PUT\": {\"id@\": \"Privacy/id\"}, \"DISALLOW\": \"id\", \"NECESSARY\": \"name\"}, \"Privacy\": {\"UNIQUE\": \"phone\", \"VERIFY\": {\"phone?\": \"phone\"}, \"DISALLOW\": \"id\", \"NECESSARY\": \"_password,phone\"}}', 'UNIQUE校验phone是否已存在。VERIFY校验phone是否符合手机号的格式', '2017-02-01 11:19:51');
INSERT INTO `Request` VALUES (2, 1, 'POST', 'Moment', '{\"ADD\": {\"@role\": \"owner\", \"pictureList\": [], \"praiseUserIdList\": []}, \"PUT\": {\"verifyIdList-()\": \"verifyIdList(praiseUserIdList)\", \"verifyURLList-()\": \"verifyURLList(pictureList)\"}, \"DISALLOW\": \"id\"}', 'ADD当没传pictureList和praiseUserIdList时用空数组[]补全，保证不会为null', '2017-02-01 11:19:51');
INSERT INTO `Request` VALUES (3, 1, 'POST', 'Comment', '{\"PUT\": {\"@role\": \"owner\"}, \"DISALLOW\": \"id\", \"NECESSARY\": \"momentId,content\"}', '必须传userId,momentId,content，不允许传id', '2017-02-01 11:19:51');
INSERT INTO `Request` VALUES (4, 1, 'PUT', 'User', '{\"ADD\": {\"@role\": \"owner\"}, \"DISALLOW\": \"phone\", \"NECESSARY\": \"id\"}', '必须传id，不允许传phone。ADD当没传@role时用owner补全', '2017-02-01 11:19:51');
INSERT INTO `Request` VALUES (5, 1, 'DELETE', 'Moment', '{\"Moment\": {\"ADD\": {\"@role\": \"owner\"}, \"PUT\": {\"commentCount()\": \"deleteCommentOfMoment(id)\"}, \"NECESSARY\": \"id\"}}', NULL, '2017-02-01 11:19:51');
INSERT INTO `Request` VALUES (6, 1, 'DELETE', 'Comment', '{\"ADD\": {\"@role\": \"owner\"}, \"PUT\": {\"childCount()\": \"deleteChildComment(id)\"}, \"NECESSARY\": \"id\"}', 'disallow没必要用于DELETE', '2017-02-01 11:19:51');
INSERT INTO `Request` VALUES (8, 1, 'PUT', 'User-phone', '{\"User\": {\"ADD\": {\"@role\": \"owner\"}, \"PUT\": {\"@combine\": \"_password\"}, \"DISALLOW\": \"!\", \"NECESSARY\": \"id,phone,_password\"}}', '! 表示其它所有，这里指necessary所有未包含的字段', '2017-02-01 11:19:51');
INSERT INTO `Request` VALUES (14, 1, 'POST', 'Verify', '{\"DISALLOW\": \"!\", \"NECESSARY\": \"phone,verify\"}', '必须传phone,verify，其它都不允许传', '2017-02-18 14:20:43');
INSERT INTO `Request` VALUES (15, 1, 'GETS', 'Verify', '{\"NECESSARY\": \"phone\"}', '必须传phone', '2017-02-18 14:20:43');
INSERT INTO `Request` VALUES (16, 1, 'HEADS', 'Verify', '{}', '允许任意内容', '2017-02-18 14:20:43');
INSERT INTO `Request` VALUES (17, 1, 'PUT', 'Moment', '{\"DISALLOW\": \"userId,date\", \"NECESSARY\": \"id\"}', NULL, '2017-02-01 11:19:51');
INSERT INTO `Request` VALUES (21, 1, 'HEADS', 'Login', '{\"DISALLOW\": \"!\", \"NECESSARY\": \"userId,type\"}', NULL, '2017-02-18 14:20:43');
INSERT INTO `Request` VALUES (22, 1, 'GETS', 'User', '{}', '允许传任何内容，除了表对象', '2017-02-18 14:20:43');
INSERT INTO `Request` VALUES (23, 1, 'PUT', 'Privacy', '{\"ADD\": {\"@role\": \"owner\"}, \"NECESSARY\": \"id\"}', 'ADD当没传@role时用owner补全', '2017-02-01 11:19:51');
INSERT INTO `Request` VALUES (25, 1, 'PUT', 'Praise', '{\"NECESSARY\": \"id\"}', '必须传id', '2017-02-01 11:19:51');
INSERT INTO `Request` VALUES (26, 1, 'DELETE', 'Comment[]', '{\"Comment\": {\"ADD\": {\"@role\": \"owner\"}, \"NECESSARY\": \"id{}\"}}', 'DISALLOW没必要用于DELETE', '2017-02-01 11:19:51');
INSERT INTO `Request` VALUES (27, 1, 'PUT', 'Comment[]', '{\"Comment\": {\"ADD\": {\"@role\": \"owner\"}, \"NECESSARY\": \"id{}\"}}', 'DISALLOW没必要用于DELETE', '2017-02-01 11:19:51');
INSERT INTO `Request` VALUES (28, 1, 'PUT', 'Comment', '{\"ADD\": {\"@role\": \"owner\"}, \"NECESSARY\": \"id\"}', '这里省略了Comment，因为tag就是Comment，Parser.getCorrectRequest会自动补全', '2017-02-01 11:19:51');
INSERT INTO `Request` VALUES (29, 1, 'GETS', 'login', '{\"Privacy\": {\"DISALLOW\": \"id\", \"NECESSARY\": \"phone,_password\"}}', NULL, '2017-10-15 10:04:52');
INSERT INTO `Request` VALUES (30, 1, 'PUT', 'balance+', '{\"Privacy\": {\"VERIFY\": {\"balance+&{}\": \">=1,<=100000\"}, \"DISALLOW\": \"!\", \"NECESSARY\": \"id,balance+\"}}', '验证balance+对应的值是否满足>=1且<=100000', '2017-10-21 08:48:34');
INSERT INTO `Request` VALUES (31, 1, 'PUT', 'balance-', '{\"Privacy\": {\"PUT\": {\"@combine\": \"_password\"}, \"VERIFY\": {\"balance-&{}\": \">=1,<=10000\"}, \"DISALLOW\": \"!\", \"NECESSARY\": \"id,balance-,_password\"}}', 'PUT强制把_password作为WHERE条件', '2017-10-21 08:48:34');
INSERT INTO `Request` VALUES (32, 2, 'GETS', 'Privacy', '{\"ADD\": {\"@role\": \"owner\"}, \"DISALLOW\": \"_password,_payPassword\", \"NECESSARY\": \"id\"}', NULL, '2017-06-12 16:05:51');
INSERT INTO `Request` VALUES (33, 2, 'GETS', 'Privacy-CIRCLE', '{\"Privacy\": {\"PUT\": {\"@role\": \"CIRCLE\", \"@column\": \"phone\"}, \"DISALLOW\": \"!\", \"NECESSARY\": \"id\"}}', NULL, '2017-06-12 16:05:51');
INSERT INTO `Request` VALUES (35, 2, 'POST', 'Document', '{\"DISALLOW\": \"id\", \"NECESSARY\": \"userId,name,url,request\"}', NULL, '2017-11-26 08:34:41');
INSERT INTO `Request` VALUES (36, 2, 'PUT', 'Document', '{\"DISALLOW\": \"userId\", \"NECESSARY\": \"id\"}', NULL, '2017-11-26 08:35:15');
INSERT INTO `Request` VALUES (37, 2, 'DELETE', 'Document', '{\"ADD\": {\"@role\": \"owner\"}, \"PUT\": {\"TestRecord\": {\"@role\": \"owner\", \"documentId@\": \"Document/id\"}}, \"DISALLOW\": \"!\", \"NECESSARY\": \"id\"}', NULL, '2017-11-26 00:36:20');
INSERT INTO `Request` VALUES (38, 2, 'POST', 'TestRecord', '{\"DISALLOW\": \"id\", \"NECESSARY\": \"userId,documentId,response\"}', NULL, '2018-06-16 23:44:36');
COMMIT;

-- ----------------------------
-- Table structure for Response
-- ----------------------------
DROP TABLE IF EXISTS `Response`;
CREATE TABLE `Response` (
  `id` bigint(15) NOT NULL COMMENT '唯一标识',
  `method` varchar(10) DEFAULT 'GET' COMMENT '方法',
  `model` varchar(20) NOT NULL COMMENT '表名，table是SQL关键词不能用',
  `structure` json NOT NULL COMMENT '结构',
  `detail` varchar(10000) DEFAULT NULL COMMENT '详细说明',
  `date` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id_UNIQUE` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='每次启动服务器时加载整个表到内存。';

-- ----------------------------
-- Records of Response
-- ----------------------------
BEGIN;
INSERT INTO `Response` VALUES (1, 'GET', 'User', '{\"put\": {\"extra\": \"Response works! Test:He(She) is lazy and wrote nothing here\"}, \"remove\": \"phone\"}', NULL, '2017-05-22 12:36:47');
INSERT INTO `Response` VALUES (2, 'DELETE', 'Comment', '{\"remove\": \"Comment:child\"}', NULL, '2017-05-03 17:51:26');
INSERT INTO `Response` VALUES (3, 'DELETE', 'Moment', '{\"remove\": \"Comment\"}', NULL, '2017-05-03 17:51:26');
COMMIT;

-- ----------------------------
-- Table structure for Test
-- ----------------------------
DROP TABLE IF EXISTS `Test`;
CREATE TABLE `Test` (
  `id` tinyint(2) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='测试及验证用的表，可以用 SELECT condition替代 SELECT * FROM Test WHERE condition，这样就不需要这张表了';

-- ----------------------------
-- Records of Test
-- ----------------------------
BEGIN;
INSERT INTO `Test` VALUES (1);
COMMIT;

-- ----------------------------
-- Table structure for TestRecord
-- ----------------------------
DROP TABLE IF EXISTS `TestRecord`;
CREATE TABLE `TestRecord` (
  `id` bigint(15) NOT NULL COMMENT '唯一标识',
  `userId` bigint(15) NOT NULL COMMENT '用户id',
  `documentId` bigint(15) NOT NULL COMMENT '测试用例文档id',
  `response` text NOT NULL COMMENT '接口返回结果JSON',
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `compare` text COMMENT '对比结果',
  `standard` text COMMENT 'response 的校验标准，是一个 JSON 格式的 AST ，描述了正确 Response 的结构、里面的字段名称、类型、长度、取值范围 等属性。',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='测试记录\n主要用于保存自动化接口回归测试';

-- ----------------------------
-- Records of TestRecord
-- ----------------------------
BEGIN;
INSERT INTO `TestRecord` VALUES (1520087199083, 82001, 1519526273822, '{\"[]\":[{\"User\":{\"id\":82002,\"sex\":1,\"name\":\"Happy~\",\"tag\":\"iOS\",\"head\":\"http://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000\",\"contactIdList\":[82005,82001,38710,93793],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82003,\"sex\":1,\"name\":\"Wechat\",\"head\":\"http://common.cnblogs.com/images/wechat.png\",\"contactIdList\":[82001,93793],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82005,\"sex\":1,\"name\":\"Jan\",\"tag\":\"AG\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[82001,38710],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82006,\"sex\":1,\"name\":\"Meria\",\"head\":\"http://static.oschina.net/uploads/user/998/1997902_50.jpg?t=1407806577000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82021,\"sex\":1,\"name\":\"Tommy\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82025,\"sex\":1,\"name\":\"Tommy\",\"head\":\"http://static.oschina.net/uploads/user/629/1258821_50.jpg?t=1378063141000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82028,\"sex\":1,\"name\":\"gaeg\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82030,\"sex\":1,\"name\":\"Fun\",\"head\":\"http://static.oschina.net/uploads/user/998/1997902_50.jpg?t=1407806577000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82033,\"sex\":1,\"name\":\"GAS\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82034,\"sex\":1,\"name\":\"Jump\",\"head\":\"http://static.oschina.net/uploads/user/1332/2664107_50.jpg?t=1457405500000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82035,\"sex\":1,\"name\":\"Tab\",\"head\":\"http://static.oschina.net/uploads/user/629/1258821_50.jpg?t=1378063141000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82039,\"sex\":1,\"name\":\"Everyday\",\"head\":\"http://common.cnblogs.com/images/icon_weibo_24.png\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-19 21:57:56.0\"}},{\"User\":{\"id\":82040,\"sex\":1,\"name\":\"Dream\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[70793],\"pictureList\":[],\"date\":\"2017-03-03 00:44:26.0\"}},{\"User\":{\"id\":82042,\"sex\":1,\"name\":\"Why\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-04 18:04:33.0\"}},{\"User\":{\"id\":82044,\"sex\":1,\"name\":\"Love\",\"head\":\"http://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000\",\"contactIdList\":[82006],\"pictureList\":[],\"date\":\"2017-03-04 18:20:27.0\"}},{\"User\":{\"id\":82055,\"sex\":1,\"name\":\"Solid\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\",\"contactIdList\":[38710,82002],\"pictureList\":[],\"date\":\"2017-03-11 23:04:00.0\"}},{\"User\":{\"id\":82056,\"sex\":1,\"name\":\"IronMan\",\"head\":\"http://static.oschina.net/uploads/user/48/96289_50.jpg?t=1452751699000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-11 23:32:25.0\"}},{\"User\":{\"id\":82059,\"sex\":1,\"name\":\"He&She\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-19 22:49:15.0\"}},{\"User\":{\"id\":82060,\"sex\":1,\"name\":\"Anyway~\",\"head\":\"http://static.oschina.net/uploads/user/1/3064_50.jpg?t=1449566001000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-21 22:10:18.0\"}},{\"User\":{\"id\":1490109742863,\"sex\":1,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-21 23:22:22.0\"}},{\"User\":{\"id\":1490420651686,\"sex\":1,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[70793],\"pictureList\":[],\"date\":\"2017-03-25 13:44:11.0\"}},{\"User\":{\"id\":1490973670928,\"sex\":1,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[70793,93793],\"pictureList\":[],\"date\":\"2017-03-31 23:21:10.0\"}},{\"User\":{\"id\":1508072105320,\"sex\":1,\"name\":\"周吴郑王\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-10-15 20:55:05.0\"}}],\"code\":200,\"msg\":\"success\"}', '2018-03-03 14:26:39', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520087202299, 82001, 1519368532249, '{\"Privacy\":{\"id\":82001,\"certified\":1,\"phone\":13000082001,\"balance\":21927.05},\"code\":200,\"msg\":\"success\"}', '2018-03-03 14:26:42', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520087205329, 82001, 1511969630372, '{\"Comment\":{\"code\":200,\"msg\":\"success\",\"id\":1520087181598,\"count\":1},\"code\":200,\"msg\":\"success\"}', '2018-03-03 14:26:45', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520088798322, 82001, 1519526273822, '{\"Document[]\":[{\"id\":1519526273822,\"userId\":82001,\"version\":2,\"compare\":2,\"name\":\"gets请求\",\"url\":\"/gets\",\"request\":\"{\n    \"Privacy\": {\n        \"id\": 82001\n    },\n    \"tag\": \"Privacy\"\n}\",\"date\":\"2018-02-25 10:37:53.0\"},{\"id\":1519368532249,\"userId\":82001,\"version\":2,\"compare\":1,\"name\":\"login请求\",\"url\":\"/login\",\"request\":\"{\n    \"type\": 0,\n    \"phone\": \"13000082001\",\n    \"password\": \"123456\",\n    \"version\": 1\n}\",\"date\":\"2018-02-23 14:48:52.0\"},{\"id\":1516325614520,\"userId\":82001,\"version\":2,\"compare\":0,\"name\":\"get请求\",\"url\":\"/get\",\"request\":\"        {\n          \"[]\":{\n            \"User\":{\n              \"sex\":1\n            }\n          }\n        }\n      \",\"date\":\"2018-01-19 09:33:34.0\"},{\"id\":1511963330795,\"userId\":0,\"version\":2,\"compare\":0,\"name\":\"获取文档列表(即在线解析网页上的共享)-API调用方式\",\"url\":\"/get\",\"request\":\"{\n    \"Document[]\": {\n        \"Document\": {\n            \"@role\": \"login\",\n            \"@order\": \"version-,date-\"\n        }\n    }\n}\",\"date\":\"2017-11-29 21:48:50.0\"},{\"id\":1512216131855,\"userId\":0,\"version\":1,\"compare\":0,\"name\":\"获取文档列表(即在线解析网页上的文档)-表和字段、请求格式限制\",\"url\":\"/get\",\"request\":\"{\n    \"[]\": {\n        \"Table\": {\n            \"TABLE_SCHEMA\": \"sys\",\n            \"TABLE_TYPE\": \"BASE TABLE\",\n            \"TABLE_NAME!$\": [\n                \"\\\\_%\",\n                \"sys\\\\_%\",\n                \"system\\\\_%\"\n            ],\n            \"@order\": \"TABLE_NAME+\",\n            \"@column\": \"TABLE_NAME,TABLE_COMMENT\"\n        },\n        \"Column[]\": {\n            \"Column\": {\n                \"TABLE_NAME@\": \"[]/Table/TABLE_NAME\",\n                \"@column\": \"COLUMN_NAME,COLUMN_TYPE,IS_NULLABLE,COLUMN_COMMENT\"\n            }\n        }\n    },\n    \"Request[]\": {\n        \"Request\": {\n            \"@order\": \"version-,method-\"\n        }\n    }\n}\",\"date\":\"2017-12-02 20:02:11.0\"},{\"id\":1511970224333,\"userId\":0,\"version\":1,\"compare\":3,\"name\":\"修改用户信息\",\"url\":\"/put\",\"request\":\"{\n    \"User\": {\n        \"id\": 82001,\n        \"name\": \"测试改名\"\n    },\n    \"tag\": \"User\"\n}\",\"date\":\"2017-11-29 23:43:44.0\"},{\"id\":1511970009072,\"userId\":0,\"version\":1,\"compare\":0,\"name\":\"新增动态\",\"url\":\"/post\",\"request\":\"{\n    \"Moment\": {\n        \"userId\": 82001,\n        \"content\": \"测试新增动态\",\n        \"pictureList\": [\"http://static.oschina.net/uploads/user/48/96331_50.jpg\"\n        ]\n    },\n    \"tag\": \"Moment\"\n}\",\"date\":\"2017-11-29 23:40:09.0\"},{\"id\":1511969630372,\"userId\":0,\"version\":1,\"compare\":4,\"name\":\"新增评论\",\"url\":\"/post\",\"request\":\"{\n    \"Comment\": {\n        \"userId\": 82001,\n        \"momentId\": 15,\n        \"content\": \"测试新增评论\"\n    },\n    \"tag\": \"Comment\"\n}\",\"date\":\"2017-11-29 23:33:50.0\"},{\"id\":1511969417633,\"userId\":0,\"version\":1,\"compare\":0,\"name\":\"点赞/取消点赞\",\"url\":\"/put\",\"request\":\"{\n    \"Moment\": {\n        \"id\": 15,\n        \"praiseUserIdList-\": [\n            82001\n        ]\n    },\n    \"tag\": \"Moment\"\n}\",\"date\":\"2017-11-29 23:30:17.0\"},{\"id\":1511969181104,\"userId\":0,\"version\":1,\"compare\":0,\"name\":\"添加朋友\",\"url\":\"/put\",\"request\":\"{\n    \"User\": {\n        \"id\": 82001,\n        \"contactIdList+\": [93793]\n    },\n    \"tag\": \"User\"\n}\",\"date\":\"2017-11-29 23:26:21.0\"},{\"id\":1511967853340,\"userId\":0,\"version\":1,\"compare\":0,\"name\":\"获取动态列表Moment+User+User:parise[]+Comment[]\",\"url\":\"/get\",\"request\":\"{\n    \"[]\": {\n        \"count\": 5,\n        \"page\": 0,\n        \"Moment\": {\n            \"@order\": \"date-\"\n        },\n        \"User\": {\n            \"id@\": \"/Moment/userId\",\n            \"@column\": \"id,name,head\"\n        },\n        \"User[]\": {\n            \"count\": 10,\n            \"User\": {\n                \"id{}@\": \"[]/Moment/praiseUserIdList\",\n                \"@column\": \"id,name\"\n            }\n        },\n        \"[]\": {\n            \"count\": 6,\n            \"Comment\": {\n                \"@order\": \"date+\",\n                \"momentId@\": \"[]/Moment/id\"\n            },\n            \"User\": {\n                \"id@\": \"/Comment/userId\",\n                \"@column\": \"id,name\"\n            }\n        }\n    }\n}\",\"date\":\"2017-11-29 23:04:13.0\"},{\"id\":1511964176689,\"userId\":0,\"version\":1,\"compare\":0,\"name\":\"获取评论列表-动态详情页Comment+User\",\"url\":\"/get\",\"request\":\"{\n    \"[]\": {\n        \"count\": 20,\n        \"page\": 0,\n        \"Comment\": {\n            \"@order\": \"date+\",\n            \"momentId\": 15\n        },\n        \"User\": {\n            \"id@\": \"/Comment/userId\",\n            \"@column\": \"id,name,head\"\n        }\n    }\n}\",\"date\":\"2017-11-29 22:02:56.0\"},{\"id\":1511963990072,\"userId\":0,\"version\":1,\"compare\":0,\"name\":\"获取动态Moment+User+praiseUserList\",\"url\":\"/get\",\"request\":\"{\n    \"Moment\": {\n        \"id\": 15\n    },\n    \"User\": {\n        \"id@\": \"Moment/userId\",\n        \"@column\": \"id,name,head\"\n    },\n    \"User[]\": {\n        \"count\": 10,\n        \"User\": {\n            \"id{}@\": \"Moment/praiseUserIdList\",\n            \"@column\": \"id,name\"\n        }\n    }\n}\",\"date\":\"2017-11-29 21:59:50.0\"},{\"id\":1511963722970,\"userId\":0,\"version\":1,\"compare\":0,\"name\":\"获取用户列表(\"id{}\":contactIdList)-朋友页\",\"url\":\"/get\",\"request\":\"{\n    \"User[]\": {\n        \"count\": 10,\n        \"page\": 0,\n        \"User\": {\n            \"@column\": \"id,sex,name,tag,head\",\n            \"@order\": \"name+\",\n            \"id{}\": [\n                82002,\n                82004,\n                70793\n            ]\n        }\n    }\n}\",\"date\":\"2017-11-29 21:55:22.0\"},{\"id\":1511963677325,\"userId\":0,\"version\":1,\"compare\":1,\"name\":\"获取用户\",\"url\":\"/get\",\"request\":\"{\"User\": {\"id\": 82001}}\",\"date\":\"2017-11-29 21:54:37.0\"},{\"id\":1511796882184,\"userId\":0,\"version\":1,\"compare\":0,\"name\":\"充值(需要支付密码)/提现\",\"url\":\"/put/balance\",\"request\":\"{\"tag\": \"Privacy\", \"Privacy\": {\"id\": 82001, \"balance+\": 100.15, \"_payPassword\": \"123456\"}}\",\"date\":\"2017-11-27 23:34:42.0\"},{\"id\":1511796589079,\"userId\":0,\"version\":1,\"compare\":0,\"name\":\"修改登录密码(先获取验证码type:2)-手机号+验证码\",\"url\":\"/put/password\",\"request\":\"{\"verify\": \"10322\", \"Privacy\": {\"phone\": \"13000082001\", \"_password\": \"666666\"}}\",\"date\":\"2017-11-27 23:29:49.0\"},{\"id\":1511796208670,\"userId\":0,\"version\":1,\"compare\":0,\"name\":\"检查验证码是否存在\",\"url\":\"/heads/verify\",\"request\":\"{\"type\": 0, \"phone\": \"13000082001\"}\",\"date\":\"2017-11-27 23:23:28.0\"},{\"id\":1511796155277,\"userId\":0,\"version\":1,\"compare\":0,\"name\":\"获取验证码\",\"url\":\"/post/verify\",\"request\":\"{\"type\": 0, \"phone\": \"13000082001\"}\",\"date\":\"2017-11-27 23:22:35.0\"},{\"id\":3,\"userId\":0,\"version\":1,\"compare\":0,\"name\":\"退出登录\",\"url\":\"/logout\",\"request\":\"{}\",\"date\":\"2017-11-26 17:56:10.0\"},{\"id\":1511689914599,\"userId\":0,\"version\":1,\"compare\":0,\"name\":\"获取用户隐私信息\",\"url\":\"/gets\",\"request\":\"{\"tag\": \"Privacy\", \"Privacy\": {\"id\": 82001}}\",\"date\":\"2017-11-26 17:51:54.0\"},{\"id\":1,\"userId\":0,\"version\":1,\"compare\":0,\"name\":\"登录\",\"url\":\"/login\",\"request\":\"{\"type\": 0, \"phone\": \"13000082001\", \"version\": 1, \"password\": \"123456\"}\",\"date\":\"2017-11-26 15:35:19.0\"},{\"id\":2,\"userId\":0,\"version\":1,\"compare\":0,\"name\":\"注册(先获取验证码type:1)\",\"url\":\"/register\",\"request\":\"{\n    \"Privacy\": {\n        \"phone\": \"13000083333\",\n        \"_password\": \"123456\"\n    },\n    \"User\": {\n        \"name\": \"APIJSONUser\"\n    },\n    \"verify\": \"6840\"\n}\"}],\"code\":200,\"msg\":\"success\"}', '2018-03-03 14:53:18', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520088802486, 82001, 1511970224333, '{\"Comment\":{\"code\":200,\"msg\":\"success\",\"id\":1520088770429,\"count\":1},\"code\":200,\"msg\":\"success\"}', '2018-03-03 14:53:22', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520088813403, 82001, 1511969630372, '{\"Moment\":{\"id\":15,\"praiseUserIdList-\":[82001]},\"code\":417,\"msg\":\"PUT Moment, praiseUserIdList:82001 不存在！\"}', '2018-03-03 14:53:33', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520088985525, 82001, 1511963677325, '{\"code\":412,\"msg\":\"手机号或验证码错误！\"}', '2018-03-03 14:56:25', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520089316891, 82001, 1519368532249, '{\"User\":{\"code\":200,\"msg\":\"success\",\"id\":82001,\"count\":1},\"code\":200,\"msg\":\"success\"}', '2018-03-03 15:01:56', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520089324108, 82001, 1511970224333, '{\"Comment\":{\"code\":200,\"msg\":\"success\",\"id\":1520089307634,\"count\":1},\"code\":200,\"msg\":\"success\"}', '2018-03-03 15:02:04', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520089326569, 82001, 1511969630372, '{\"[]\":[{\"User\":{\"id\":82002,\"sex\":1,\"name\":\"Happy~\",\"tag\":\"iOS\",\"head\":\"http://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000\",\"contactIdList\":[82005,82001,38710,93793],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82003,\"sex\":1,\"name\":\"Wechat\",\"head\":\"http://common.cnblogs.com/images/wechat.png\",\"contactIdList\":[82001,93793],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82005,\"sex\":1,\"name\":\"Jan\",\"tag\":\"AG\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[82001,38710],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82006,\"sex\":1,\"name\":\"Meria\",\"head\":\"http://static.oschina.net/uploads/user/998/1997902_50.jpg?t=1407806577000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82021,\"sex\":1,\"name\":\"Tommy\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82025,\"sex\":1,\"name\":\"Tommy\",\"head\":\"http://static.oschina.net/uploads/user/629/1258821_50.jpg?t=1378063141000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82028,\"sex\":1,\"name\":\"gaeg\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82030,\"sex\":1,\"name\":\"Fun\",\"head\":\"http://static.oschina.net/uploads/user/998/1997902_50.jpg?t=1407806577000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82033,\"sex\":1,\"name\":\"GAS\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82034,\"sex\":1,\"name\":\"Jump\",\"head\":\"http://static.oschina.net/uploads/user/1332/2664107_50.jpg?t=1457405500000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82035,\"sex\":1,\"name\":\"Tab\",\"head\":\"http://static.oschina.net/uploads/user/629/1258821_50.jpg?t=1378063141000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82039,\"sex\":1,\"name\":\"Everyday\",\"head\":\"http://common.cnblogs.com/images/icon_weibo_24.png\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-19 21:57:56.0\"}},{\"User\":{\"id\":82040,\"sex\":1,\"name\":\"Dream\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[70793],\"pictureList\":[],\"date\":\"2017-03-03 00:44:26.0\"}},{\"User\":{\"id\":82042,\"sex\":1,\"name\":\"Why\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-04 18:04:33.0\"}},{\"User\":{\"id\":82044,\"sex\":1,\"name\":\"Love\",\"head\":\"http://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000\",\"contactIdList\":[82006],\"pictureList\":[],\"date\":\"2017-03-04 18:20:27.0\"}},{\"User\":{\"id\":82055,\"sex\":1,\"name\":\"Solid\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\",\"contactIdList\":[38710,82002],\"pictureList\":[],\"date\":\"2017-03-11 23:04:00.0\"}},{\"User\":{\"id\":82056,\"sex\":1,\"name\":\"IronMan\",\"head\":\"http://static.oschina.net/uploads/user/48/96289_50.jpg?t=1452751699000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-11 23:32:25.0\"}},{\"User\":{\"id\":82059,\"sex\":1,\"name\":\"He&She\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-19 22:49:15.0\"}},{\"User\":{\"id\":82060,\"sex\":1,\"name\":\"Anyway~\",\"head\":\"http://static.oschina.net/uploads/user/1/3064_50.jpg?t=1449566001000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-21 22:10:18.0\"}},{\"User\":{\"id\":1490109742863,\"sex\":1,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-21 23:22:22.0\"}},{\"User\":{\"id\":1490420651686,\"sex\":1,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[70793],\"pictureList\":[],\"date\":\"2017-03-25 13:44:11.0\"}},{\"User\":{\"id\":1490973670928,\"sex\":1,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[70793,93793],\"pictureList\":[],\"date\":\"2017-03-31 23:21:10.0\"}},{\"User\":{\"id\":1508072105320,\"sex\":1,\"name\":\"周吴郑王\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-10-15 20:55:05.0\"}}],\"code\":200,\"msg\":\"success\"}', '2018-03-03 15:02:06', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520089328891, 82001, 1511963677325, '{\"code\":412,\"msg\":\"手机号或验证码错误！\"}', '2018-03-03 15:02:08', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520089695229, 82001, 2, '{\"Document[]\":[{\"id\":1519526273822,\"userId\":82001,\"version\":2,\"name\":\"gets请求\",\"url\":\"/gets\",\"request\":\"{\n    \"Privacy\": {\n        \"id\": 82001\n    },\n    \"tag\": \"Privacy\"\n}\",\"response\":\"{\"Document[]\":[{\"id\":1519526273822,\"userId\":82001,\"version\":2,\"compare\":2,\"name\":\"gets请求\",\"url\":\"/gets\",\"request\":\"{\n    \"Privacy\": {\n        \"id\": 82001\n    },\n    \"tag\": \"Privacy\"\n}\",\"date\":\"2018-02-25 10:37:53.0\"},{\"id\":1519368532249,\"userId\":82001,\"version\":2,\"compare\":1,\"name\":\"login请求\",\"url\":\"/login\",\"request\":\"{\n    \"type\": 0,\n    \"phone\": \"13000082001\",\n    \"password\": \"123456\",\n    \"version\": 1\n}\",\"date\":\"2018-02-23 14:48:52.0\"},{\"id\":1516325614520,\"userId\":82001,\"version\":2,\"compare\":0,\"name\":\"get请求\",\"url\":\"/get\",\"request\":\"        {\n          \"[]\":{\n            \"User\":{\n              \"sex\":1\n            }\n          }\n        }\n      \",\"date\":\"2018-01-19 09:33:34.0\"},{\"id\":1511963330795,\"userId\":0,\"version\":2,\"compare\":0,\"name\":\"获取文档列表(即在线解析网页上的共享)-API调用方式\",\"url\":\"/get\",\"request\":\"{\n    \"Document[]\": {\n        \"Document\": {\n            \"@role\": \"login\",\n            \"@order\": \"version-,date-\"\n        }\n    }\n}\",\"date\":\"2017-11-29 21:48:50.0\"},{\"id\":1512216131855,\"userId\":0,\"version\":1,\"compare\":0,\"name\":\"获取文档列表(即在线解析网页上的文档)-表和字段、请求格式限制\",\"url\":\"/get\",\"request\":\"{\n    \"[]\": {\n        \"Table\": {\n            \"TABLE_SCHEMA\": \"sys\",\n            \"TABLE_TYPE\": \"BASE TABLE\",\n            \"TABLE_NAME!$\": [\n                \"\\\\_%\",\n                \"sys\\\\_%\",\n                \"system\\\\_%\"\n            ],\n            \"@order\": \"TABLE_NAME+\",\n            \"@column\": \"TABLE_NAME,TABLE_COMMENT\"\n        },\n        \"Column[]\": {\n            \"Column\": {\n                \"TABLE_NAME@\": \"[]/Table/TABLE_NAME\",\n                \"@column\": \"COLUMN_NAME,COLUMN_TYPE,IS_NULLABLE,COLUMN_COMMENT\"\n            }\n        }\n    },\n    \"Request[]\": {\n        \"Request\": {\n            \"@order\": \"version-,method-\"\n        }\n    }\n}\",\"date\":\"2017-12-02 20:02:11.0\"},{\"id\":1511970224333,\"userId\":0,\"version\":1,\"compare\":3,\"name\":\"修改用户信息\",\"url\":\"/put\",\"request\":\"{\n    \"User\": {\n        \"id\": 82001,\n        \"name\": \"测试改名\"\n    },\n    \"tag\": \"User\"\n}\",\"date\":\"2017-11-29 23:43:44.0\"},{\"id\":1511970009072,\"userId\":0,\"version\":1,\"compare\":0,\"name\":\"新增动态\",\"url\":\"/post\",\"request\":\"{\n    \"Moment\": {\n        \"userId\": 82001,\n        \"content\": \"测试新增动态\",\n        \"pictureList\": [\"http://static.oschina.net/uploads/user/48/96331_50.jpg\"\n        ]\n    },\n    \"tag\": \"Moment\"\n}\",\"date\":\"2017-11-29 23:40:09.0\"},{\"id\":1511969630372,\"userId\":0,\"version\":1,\"compare\":4,\"name\":\"新增评论\",\"url\":\"/post\",\"request\":\"{\n    \"Comment\": {\n        \"userId\": 82001,\n        \"momentId\": 15,\n        \"content\": \"测试新增评论\"\n    },\n    \"tag\": \"Comment\"\n}\",\"date\":\"2017-11-29 23:33:50.0\"},{\"id\":1511969417633,\"userId\":0,\"version\":1,\"compare\":0,\"name\":\"点赞/取消点赞\",\"url\":\"/put\",\"request\":\"{\n    \"Moment\": {\n        \"id\": 15,\n        \"praiseUserIdList-\": [\n            82001\n        ]\n    },\n    \"tag\": \"Moment\"\n}\",\"date\":\"2017-11-29 23:30:17.0\"},{\"id\":1511969181104,\"userId\":0,\"version\":1,\"compare\":0,\"name\":\"添加朋友\",\"url\":\"/put\",\"request\":\"{\n    \"User\": {\n        \"id\": 82001,\n        \"contactIdList+\": [93793]\n    },\n    \"tag\": \"User\"\n}\",\"date\":\"2017-11-29 23:26:21.0\"},{\"id\":1511967853340,\"userId\":0,\"version\":1,\"compare\":0,\"name\":\"获取动态列表Moment+User+User:parise[]+Comment[]\",\"url\":\"/get\",\"request\":\"{\n    \"[]\": {\n        \"count\": 5,\n        \"page\": 0,\n        \"Moment\": {\n            \"@order\": \"date-\"\n        },\n        \"User\": {\n            \"id@\": \"/Moment/userId\",\n            \"@column\": \"id,name,head\"\n        },\n        \"User[]\": {\n            \"count\": 10,\n            \"User\": {\n                \"id{}@\": \"[]/Moment/praiseUserIdList\",\n                \"@column\": \"id,name\"\n            }\n        },\n        \"[]\": {\n            \"count\": 6,\n            \"Comment\": {\n                \"@order\": \"date+\",\n                \"momentId@\": \"[]/Moment/id\"\n            },\n            \"User\": {\n                \"id@\": \"/Comment/userId\",\n                \"@column\": \"id,name\"\n            }\n        }\n    }\n}\",\"date\":\"2017-11-29 23:04:13.0\"},{\"id\":1511964176689,\"userId\":0,\"version\":1,\"compare\":0,\"name\":\"获取评论列表-动态详情页Comment+User\",\"url\":\"/get\",\"request\":\"{\n    \"[]\": {\n        \"count\": 20,\n        \"page\": 0,\n        \"Comment\": {\n            \"@order\": \"date+\",\n            \"momentId\": 15\n        },\n        \"User\": {\n            \"id@\": \"/Comment/userId\",\n            \"@column\": \"id,name,head\"\n        }\n    }\n}\",\"date\":\"2017-11-29 22:02:56.0\"},{\"id\":1511963990072,\"userId\":0,\"version\":1,\"compare\":0,\"name\":\"获取动态Moment+User+praiseUserList\",\"url\":\"/get\",\"request\":\"{\n    \"Moment\": {\n        \"id\": 15\n    },\n    \"User\": {\n        \"id@\": \"Moment/userId\",\n        \"@column\": \"id,name,head\"\n    },\n    \"User[]\": {\n        \"count\": 10,\n        \"User\": {\n            \"id{}@\": \"Moment/praiseUserIdList\",\n            \"@column\": \"id,name\"\n        }\n    }\n}\",\"date\":\"2017-11-29 21:59:50.0\"},{\"id\":1511963722970,\"userId\":0,\"version\":1,\"compare\":0,\"name\":\"获取用户列表(\"id{}\":contactIdList)-朋友页\",\"url\":\"/get\",\"request\":\"{\n    \"User[]\": {\n        \"count\": 10,\n        \"page\": 0,\n        \"User\": {\n            \"@column\": \"id,sex,name,tag,head\",\n            \"@order\": \"name+\",\n            \"id{}\": [\n                82002,\n                82004,\n                70793\n            ]\n        }\n    }\n}\",\"date\":\"2017-11-29 21:55:22.0\"},{\"id\":1511963677325,\"userId\":0,\"version\":1,\"compare\":1,\"name\":\"获取用户\",\"url\":\"/get\",\"request\":\"{\"User\": {\"id\": 82001}}\",\"date\":\"2017-11-29 21:54:37.0\"},{\"id\":1511796882184,\"userId\":0,\"version\":1,\"compare\":0,\"name\":\"充值(需要支付密码)/提现\",\"url\":\"/put/balance\",\"request\":\"{\"tag\": \"Privacy\", \"Privacy\": {\"id\": 82001, \"balance+\": 100.15, \"_payPassword\": \"123456\"}}\",\"date\":\"2017-11-27 23:34:42.0\"},{\"id\":1511796589079,\"userId\":0,\"version\":1,\"compare\":0,\"name\":\"修改登录密码(先获取验证码type:2)-手机号+验证码\",\"url\":\"/put/password\",\"request\":\"{\"verify\": \"10322\", \"Privacy\": {\"phone\": \"13000082001\", \"_password\": \"666666\"}}\",\"date\":\"2017-11-27 23:29:49.0\"},{\"id\":1511796208670,\"userId\":0,\"version\":1,\"compare\":0,\"name\":\"检查验证码是否存在\",\"url\":\"/heads/verify\",\"request\":\"{\"type\": 0, \"phone\": \"13000082001\"}\",\"date\":\"2017-11-27 23:23:28.0\"},{\"id\":1511796155277,\"userId\":0,\"version\":1,\"compare\":0,\"name\":\"获取验证码\",\"url\":\"/post/verify\",\"request\":\"{\"type\": 0, \"phone\": \"13000082001\"}\",\"date\":\"2017-11-27 23:22:35.0\"},{\"id\":3,\"userId\":0,\"version\":1,\"compare\":0,\"name\":\"退出登录\",\"url\":\"/logout\",\"request\":\"{}\",\"date\":\"2017-11-26 17:56:10.0\"},{\"id\":1511689914599,\"userId\":0,\"version\":1,\"compare\":0,\"name\":\"获取用户隐私信息\",\"url\":\"/gets\",\"request\":\"{\"tag\": \"Privacy\", \"Privacy\": {\"id\": 82001}}\",\"date\":\"2017-11-26 17:51:54.0\"},{\"id\":1,\"userId\":0,\"version\":1,\"compare\":0,\"name\":\"登录\",\"url\":\"/login\",\"request\":\"{\"type\": 0, \"phone\": \"13000082001\", \"version\": 1, \"password\": \"123456\"}\",\"date\":\"2017-11-26 15:35:19.0\"},{\"id\":2,\"userId\":0,\"version\":1,\"compare\":0,\"name\":\"注册(先获取验证码type:1)\",\"url\":\"/register\",\"request\":\"{\n    \"Privacy\": {\n        \"phone\": \"13000083333\",\n        \"_password\": \"123456\"\n    },\n    \"User\": {\n        \"name\": \"APIJSONUser\"\n    },\n    \"verify\": \"6840\"\n}\"}],\"code\":200,\"msg\":\"success\"}\",\"date\":\"2018-02-25 10:37:53.0\"},{\"id\":1519368532249,\"userId\":82001,\"version\":2,\"name\":\"login请求\",\"url\":\"/login\",\"request\":\"{\n    \"type\": 0,\n    \"phone\": \"13000082001\",\n    \"password\": \"123456\",\n    \"version\": 1\n}\",\"response\":\"{\"User\":{\"code\":200,\"msg\":\"success\",\"id\":82001,\"count\":1},\"code\":200,\"msg\":\"success\"}\",\"date\":\"2018-02-23 14:48:52.0\"},{\"id\":1516325614520,\"userId\":82001,\"version\":2,\"name\":\"get请求\",\"url\":\"/get\",\"request\":\"        {\n          \"[]\":{\n            \"User\":{\n              \"sex\":1\n            }\n          }\n        }\n      \",\"date\":\"2018-01-19 09:33:34.0\"},{\"id\":1511963330795,\"userId\":0,\"version\":2,\"name\":\"获取文档列表(即在线解析网页上的共享)-API调用方式\",\"url\":\"/get\",\"request\":\"{\n    \"Document[]\": {\n        \"Document\": {\n            \"@role\": \"login\",\n            \"@order\": \"version-,date-\"\n        }\n    }\n}\",\"date\":\"2017-11-29 21:48:50.0\"},{\"id\":1512216131855,\"userId\":0,\"version\":1,\"name\":\"获取文档列表(即在线解析网页上的文档)-表和字段、请求格式限制\",\"url\":\"/get\",\"request\":\"{\n    \"[]\": {\n        \"Table\": {\n            \"TABLE_SCHEMA\": \"sys\",\n            \"TABLE_TYPE\": \"BASE TABLE\",\n            \"TABLE_NAME!$\": [\n                \"\\\\_%\",\n                \"sys\\\\_%\",\n                \"system\\\\_%\"\n            ],\n            \"@order\": \"TABLE_NAME+\",\n            \"@column\": \"TABLE_NAME,TABLE_COMMENT\"\n        },\n        \"Column[]\": {\n            \"Column\": {\n                \"TABLE_NAME@\": \"[]/Table/TABLE_NAME\",\n                \"@column\": \"COLUMN_NAME,COLUMN_TYPE,IS_NULLABLE,COLUMN_COMMENT\"\n            }\n        }\n    },\n    \"Request[]\": {\n        \"Request\": {\n            \"@order\": \"version-,method-\"\n        }\n    }\n}\",\"date\":\"2017-12-02 20:02:11.0\"},{\"id\":1511970224333,\"userId\":0,\"version\":1,\"name\":\"修改用户信息\",\"url\":\"/put\",\"request\":\"{\n    \"User\": {\n        \"id\": 82001,\n        \"name\": \"测试改名\"\n    },\n    \"tag\": \"User\"\n}\",\"date\":\"2017-11-29 23:43:44.0\"},{\"id\":1511970009072,\"userId\":0,\"version\":1,\"name\":\"新增动态\",\"url\":\"/post\",\"request\":\"{\n    \"Moment\": {\n        \"userId\": 82001,\n        \"content\": \"测试新增动态\",\n        \"pictureList\": [\"http://static.oschina.net/uploads/user/48/96331_50.jpg\"\n        ]\n    },\n    \"tag\": \"Moment\"\n}\",\"date\":\"2017-11-29 23:40:09.0\"},{\"id\":1511969630372,\"userId\":0,\"version\":1,\"name\":\"新增评论\",\"url\":\"/post\",\"request\":\"{\n    \"Comment\": {\n        \"userId\": 82001,\n        \"momentId\": 15,\n        \"content\": \"测试新增评论\"\n    },\n    \"tag\": \"Comment\"\n}\",\"date\":\"2017-11-29 23:33:50.0\"},{\"id\":1511969417633,\"userId\":0,\"version\":1,\"name\":\"点赞/取消点赞\",\"url\":\"/put\",\"request\":\"{\n    \"Moment\": {\n        \"id\": 15,\n        \"praiseUserIdList-\": [\n            82001\n        ]\n    },\n    \"tag\": \"Moment\"\n}\",\"date\":\"2017-11-29 23:30:17.0\"},{\"id\":1511969181104,\"userId\":0,\"version\":1,\"name\":\"添加朋友\",\"url\":\"/put\",\"request\":\"{\n    \"User\": {\n        \"id\": 82001,\n        \"contactIdList+\": [93793]\n    },\n    \"tag\": \"User\"\n}\",\"date\":\"2017-11-29 23:26:21.0\"},{\"id\":1511967853340,\"userId\":0,\"version\":1,\"name\":\"获取动态列表Moment+User+User:parise[]+Comment[]\",\"url\":\"/get\",\"request\":\"{\n    \"[]\": {\n        \"count\": 5,\n        \"page\": 0,\n        \"Moment\": {\n            \"@order\": \"date-\"\n        },\n        \"User\": {\n            \"id@\": \"/Moment/userId\",\n            \"@column\": \"id,name,head\"\n        },\n        \"User[]\": {\n            \"count\": 10,\n            \"User\": {\n                \"id{}@\": \"[]/Moment/praiseUserIdList\",\n                \"@column\": \"id,name\"\n            }\n        },\n        \"[]\": {\n            \"count\": 6,\n            \"Comment\": {\n                \"@order\": \"date+\",\n                \"momentId@\": \"[]/Moment/id\"\n            },\n            \"User\": {\n                \"id@\": \"/Comment/userId\",\n                \"@column\": \"id,name\"\n            }\n        }\n    }\n}\",\"date\":\"2017-11-29 23:04:13.0\"},{\"id\":1511964176689,\"userId\":0,\"version\":1,\"name\":\"获取评论列表-动态详情页Comment+User\",\"url\":\"/get\",\"request\":\"{\n    \"[]\": {\n        \"count\": 20,\n        \"page\": 0,\n        \"Comment\": {\n            \"@order\": \"date+\",\n            \"momentId\": 15\n        },\n        \"User\": {\n            \"id@\": \"/Comment/userId\",\n            \"@column\": \"id,name,head\"\n        }\n    }\n}\",\"date\":\"2017-11-29 22:02:56.0\"},{\"id\":1511963990072,\"userId\":0,\"version\":1,\"name\":\"获取动态Moment+User+praiseUserList\",\"url\":\"/get\",\"request\":\"{\n    \"Moment\": {\n        \"id\": 15\n    },\n    \"User\": {\n        \"id@\": \"Moment/userId\",\n        \"@column\": \"id,name,head\"\n    },\n    \"User[]\": {\n        \"count\": 10,\n        \"User\": {\n            \"id{}@\": \"Moment/praiseUserIdList\",\n            \"@column\": \"id,name\"\n        }\n    }\n}\",\"date\":\"2017-11-29 21:59:50.0\"},{\"id\":1511963722970,\"userId\":0,\"version\":1,\"name\":\"获取用户列表(\"id{}\":contactIdList)-朋友页\",\"url\":\"/get\",\"request\":\"{\n    \"User[]\": {\n        \"count\": 10,\n        \"page\": 0,\n        \"User\": {\n            \"@column\": \"id,sex,name,tag,head\",\n            \"@order\": \"name+\",\n            \"id{}\": [\n                82002,\n                82004,\n                70793\n            ]\n        }\n    }\n}\",\"date\":\"2017-11-29 21:55:22.0\"},{\"id\":1511963677325,\"userId\":0,\"version\":1,\"name\":\"获取用户\",\"url\":\"/get\",\"request\":\"{\"User\": {\"id\": 82001}}\",\"date\":\"2017-11-29 21:54:37.0\"},{\"id\":1511796882184,\"userId\":0,\"version\":1,\"name\":\"充值(需要支付密码)/提现\",\"url\":\"/put/balance\",\"request\":\"{\"tag\": \"Privacy\", \"Privacy\": {\"id\": 82001, \"balance+\": 100.15, \"_payPassword\": \"123456\"}}\",\"date\":\"2017-11-27 23:34:42.0\"},{\"id\":1511796589079,\"userId\":0,\"version\":1,\"name\":\"修改登录密码(先获取验证码type:2)-手机号+验证码\",\"url\":\"/put/password\",\"request\":\"{\"verify\": \"10322\", \"Privacy\": {\"phone\": \"13000082001\", \"_password\": \"666666\"}}\",\"date\":\"2017-11-27 23:29:49.0\"},{\"id\":1511796208670,\"userId\":0,\"version\":1,\"name\":\"检查验证码是否存在\",\"url\":\"/heads/verify\",\"request\":\"{\"type\": 0, \"phone\": \"13000082001\"}\",\"date\":\"2017-11-27 23:23:28.0\"},{\"id\":1511796155277,\"userId\":0,\"version\":1,\"name\":\"获取验证码\",\"url\":\"/post/verify\",\"request\":\"{\"type\": 0, \"phone\": \"13000082001\"}\",\"date\":\"2017-11-27 23:22:35.0\"},{\"id\":3,\"userId\":0,\"version\":1,\"name\":\"退出登录\",\"url\":\"/logout\",\"request\":\"{}\",\"date\":\"2017-11-26 17:56:10.0\"},{\"id\":1511689914599,\"userId\":0,\"version\":1,\"name\":\"获取用户隐私信息\",\"url\":\"/gets\",\"request\":\"{\"tag\": \"Privacy\", \"Privacy\": {\"id\": 82001}}\",\"date\":\"2017-11-26 17:51:54.0\"},{\"id\":1,\"userId\":0,\"version\":1,\"name\":\"登录\",\"url\":\"/login\",\"request\":\"{\"type\": 0, \"phone\": \"13000082001\", \"version\": 1, \"password\": \"123456\"}\",\"date\":\"2017-11-26 15:35:19.0\"},{\"id\":2,\"userId\":0,\"version\":1,\"name\":\"注册(先获取验证码type:1)\",\"url\":\"/register\",\"request\":\"{\n    \"Privacy\": {\n        \"phone\": \"13000083333\",\n        \"_password\": \"123456\"\n    },\n    \"User\": {\n        \"name\": \"APIJSONUser\"\n    },\n    \"verify\": \"6840\"\n}\"}],\"code\":200,\"msg\":\"success\"}', '2018-03-03 15:08:15', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520090219049, 82001, 1519526273822, '{\"Privacy\":{\"id\":82001,\"certified\":1,\"phone\":13000082001,\"balance\":22628.1},\"code\":200,\"msg\":\"success\"}', '2018-03-03 15:16:59', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520090220914, 82001, 1516325614520, '{\"[]\":[{\"User\":{\"id\":82002,\"sex\":1,\"name\":\"Happy~\",\"tag\":\"iOS\",\"head\":\"http://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000\",\"contactIdList\":[82005,82001,38710,93793],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82003,\"sex\":1,\"name\":\"Wechat\",\"head\":\"http://common.cnblogs.com/images/wechat.png\",\"contactIdList\":[82001,93793],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82005,\"sex\":1,\"name\":\"Jan\",\"tag\":\"AG\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[82001,38710],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82006,\"sex\":1,\"name\":\"Meria\",\"head\":\"http://static.oschina.net/uploads/user/998/1997902_50.jpg?t=1407806577000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82021,\"sex\":1,\"name\":\"Tommy\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82025,\"sex\":1,\"name\":\"Tommy\",\"head\":\"http://static.oschina.net/uploads/user/629/1258821_50.jpg?t=1378063141000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82028,\"sex\":1,\"name\":\"gaeg\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82030,\"sex\":1,\"name\":\"Fun\",\"head\":\"http://static.oschina.net/uploads/user/998/1997902_50.jpg?t=1407806577000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82033,\"sex\":1,\"name\":\"GAS\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82034,\"sex\":1,\"name\":\"Jump\",\"head\":\"http://static.oschina.net/uploads/user/1332/2664107_50.jpg?t=1457405500000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82035,\"sex\":1,\"name\":\"Tab\",\"head\":\"http://static.oschina.net/uploads/user/629/1258821_50.jpg?t=1378063141000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82039,\"sex\":1,\"name\":\"Everyday\",\"head\":\"http://common.cnblogs.com/images/icon_weibo_24.png\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-19 21:57:56.0\"}},{\"User\":{\"id\":82040,\"sex\":1,\"name\":\"Dream\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[70793],\"pictureList\":[],\"date\":\"2017-03-03 00:44:26.0\"}},{\"User\":{\"id\":82042,\"sex\":1,\"name\":\"Why\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-04 18:04:33.0\"}},{\"User\":{\"id\":82044,\"sex\":1,\"name\":\"Love\",\"head\":\"http://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000\",\"contactIdList\":[82006],\"pictureList\":[],\"date\":\"2017-03-04 18:20:27.0\"}},{\"User\":{\"id\":82055,\"sex\":1,\"name\":\"Solid\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\",\"contactIdList\":[38710,82002],\"pictureList\":[],\"date\":\"2017-03-11 23:04:00.0\"}},{\"User\":{\"id\":82056,\"sex\":1,\"name\":\"IronMan\",\"head\":\"http://static.oschina.net/uploads/user/48/96289_50.jpg?t=1452751699000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-11 23:32:25.0\"}},{\"User\":{\"id\":82059,\"sex\":1,\"name\":\"He&She\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-19 22:49:15.0\"}},{\"User\":{\"id\":82060,\"sex\":1,\"name\":\"Anyway~\",\"head\":\"http://static.oschina.net/uploads/user/1/3064_50.jpg?t=1449566001000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-21 22:10:18.0\"}},{\"User\":{\"id\":1490109742863,\"sex\":1,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-21 23:22:22.0\"}},{\"User\":{\"id\":1490420651686,\"sex\":1,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[70793],\"pictureList\":[],\"date\":\"2017-03-25 13:44:11.0\"}},{\"User\":{\"id\":1490973670928,\"sex\":1,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[70793,93793],\"pictureList\":[],\"date\":\"2017-03-31 23:21:10.0\"}},{\"User\":{\"id\":1508072105320,\"sex\":1,\"name\":\"周吴郑王\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-10-15 20:55:05.0\"}}],\"code\":200,\"msg\":\"success\"}', '2018-03-03 15:17:00', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520090222151, 82001, 1519368532249, '{\"User\":{\"id\":82001,\"sex\":0,\"name\":\"测试改名\",\"tag\":\"APIJSON User\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\",\"contactIdList\":[82025,70793,82034,93793,82021,82033],\"pictureList\":[\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"},\"code\":200,\"msg\":\"success\"}', '2018-03-03 15:17:02', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520090430596, 82001, 1516325614520, '{\"User\":{\"id\":82001,\"sex\":0,\"name\":\"测试改名\",\"tag\":\"APIJSON User\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\",\"contactIdList\":[82025,70793,82034,93793,82021,82033],\"pictureList\":[\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"},\"code\":200,\"msg\":\"success\"}', '2018-03-03 15:20:30', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520090633508, 82001, 1516325614520, '{\"code\":412,\"msg\":\"手机号或验证码错误！\"}', '2018-03-03 15:23:53', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520091069489, 82001, 1516325614520, '{\"code\":412,\"msg\":\"手机号或验证码错误！\"}', '2018-03-03 15:31:09', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520091190755, 82001, 1519368532249, '{\"code\":412,\"msg\":\"手机号或验证码错误！\"}', '2018-03-03 15:33:10', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520091349017, 82001, 1519526273822, '{\"code\":412,\"msg\":\"手机号或验证码错误！\"}', '2018-03-03 15:35:49', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520091550804, 82001, 1519526273822, '{\"Privacy\":{\"id\":82001,\"certified\":1,\"phone\":13000082001,\"balance\":22628.1},\"code\":200,\"msg\":\"success\"}', '2018-03-03 15:39:10', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520091551472, 82001, 1519368532249, '{\"User\":{\"id\":82001,\"sex\":0,\"name\":\"测试改名\",\"tag\":\"APIJSON User\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\",\"contactIdList\":[82025,70793,82034,93793,82021,82033],\"pictureList\":[\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"},\"code\":200,\"msg\":\"success\"}', '2018-03-03 15:39:11', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520091552062, 82001, 1516325614520, '{\"[]\":[{\"User\":{\"id\":82002,\"sex\":1,\"name\":\"Happy~\",\"tag\":\"iOS\",\"head\":\"http://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000\",\"contactIdList\":[82005,82001,38710,93793],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82003,\"sex\":1,\"name\":\"Wechat\",\"head\":\"http://common.cnblogs.com/images/wechat.png\",\"contactIdList\":[82001,93793],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82005,\"sex\":1,\"name\":\"Jan\",\"tag\":\"AG\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[82001,38710],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82006,\"sex\":1,\"name\":\"Meria\",\"head\":\"http://static.oschina.net/uploads/user/998/1997902_50.jpg?t=1407806577000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82021,\"sex\":1,\"name\":\"Tommy\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82025,\"sex\":1,\"name\":\"Tommy\",\"head\":\"http://static.oschina.net/uploads/user/629/1258821_50.jpg?t=1378063141000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82028,\"sex\":1,\"name\":\"gaeg\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82030,\"sex\":1,\"name\":\"Fun\",\"head\":\"http://static.oschina.net/uploads/user/998/1997902_50.jpg?t=1407806577000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82033,\"sex\":1,\"name\":\"GAS\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82034,\"sex\":1,\"name\":\"Jump\",\"head\":\"http://static.oschina.net/uploads/user/1332/2664107_50.jpg?t=1457405500000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82035,\"sex\":1,\"name\":\"Tab\",\"head\":\"http://static.oschina.net/uploads/user/629/1258821_50.jpg?t=1378063141000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82039,\"sex\":1,\"name\":\"Everyday\",\"head\":\"http://common.cnblogs.com/images/icon_weibo_24.png\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-19 21:57:56.0\"}},{\"User\":{\"id\":82040,\"sex\":1,\"name\":\"Dream\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[70793],\"pictureList\":[],\"date\":\"2017-03-03 00:44:26.0\"}},{\"User\":{\"id\":82042,\"sex\":1,\"name\":\"Why\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-04 18:04:33.0\"}},{\"User\":{\"id\":82044,\"sex\":1,\"name\":\"Love\",\"head\":\"http://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000\",\"contactIdList\":[82006],\"pictureList\":[],\"date\":\"2017-03-04 18:20:27.0\"}},{\"User\":{\"id\":82055,\"sex\":1,\"name\":\"Solid\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\",\"contactIdList\":[38710,82002],\"pictureList\":[],\"date\":\"2017-03-11 23:04:00.0\"}},{\"User\":{\"id\":82056,\"sex\":1,\"name\":\"IronMan\",\"head\":\"http://static.oschina.net/uploads/user/48/96289_50.jpg?t=1452751699000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-11 23:32:25.0\"}},{\"User\":{\"id\":82059,\"sex\":1,\"name\":\"He&She\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-19 22:49:15.0\"}},{\"User\":{\"id\":82060,\"sex\":1,\"name\":\"Anyway~\",\"head\":\"http://static.oschina.net/uploads/user/1/3064_50.jpg?t=1449566001000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-21 22:10:18.0\"}},{\"User\":{\"id\":1490109742863,\"sex\":1,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-21 23:22:22.0\"}},{\"User\":{\"id\":1490420651686,\"sex\":1,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[70793],\"pictureList\":[],\"date\":\"2017-03-25 13:44:11.0\"}},{\"User\":{\"id\":1490973670928,\"sex\":1,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[70793,93793],\"pictureList\":[],\"date\":\"2017-03-31 23:21:10.0\"}},{\"User\":{\"id\":1508072105320,\"sex\":1,\"name\":\"周吴郑王\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-10-15 20:55:05.0\"}}],\"code\":200,\"msg\":\"success\"}', '2018-03-03 15:39:12', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520091900844, 82001, 1516325614520, '{\"[]\":[{\"User\":{\"id\":82002,\"sex\":1,\"name\":\"Happy~\",\"tag\":\"iOS\",\"head\":\"http://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000\",\"contactIdList\":[82005,82001,38710,93793],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82003,\"sex\":1,\"name\":\"Wechat\",\"head\":\"http://common.cnblogs.com/images/wechat.png\",\"contactIdList\":[82001,93793],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82005,\"sex\":1,\"name\":\"Jan\",\"tag\":\"AG\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[82001,38710],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82006,\"sex\":1,\"name\":\"Meria\",\"head\":\"http://static.oschina.net/uploads/user/998/1997902_50.jpg?t=1407806577000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82021,\"sex\":1,\"name\":\"Tommy\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82025,\"sex\":1,\"name\":\"Tommy\",\"head\":\"http://static.oschina.net/uploads/user/629/1258821_50.jpg?t=1378063141000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82028,\"sex\":1,\"name\":\"gaeg\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82030,\"sex\":1,\"name\":\"Fun\",\"head\":\"http://static.oschina.net/uploads/user/998/1997902_50.jpg?t=1407806577000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82033,\"sex\":1,\"name\":\"GAS\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82034,\"sex\":1,\"name\":\"Jump\",\"head\":\"http://static.oschina.net/uploads/user/1332/2664107_50.jpg?t=1457405500000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82035,\"sex\":1,\"name\":\"Tab\",\"head\":\"http://static.oschina.net/uploads/user/629/1258821_50.jpg?t=1378063141000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82039,\"sex\":1,\"name\":\"Everyday\",\"head\":\"http://common.cnblogs.com/images/icon_weibo_24.png\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-19 21:57:56.0\"}},{\"User\":{\"id\":82040,\"sex\":1,\"name\":\"Dream\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[70793],\"pictureList\":[],\"date\":\"2017-03-03 00:44:26.0\"}},{\"User\":{\"id\":82042,\"sex\":1,\"name\":\"Why\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-04 18:04:33.0\"}},{\"User\":{\"id\":82044,\"sex\":1,\"name\":\"Love\",\"head\":\"http://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000\",\"contactIdList\":[82006],\"pictureList\":[],\"date\":\"2017-03-04 18:20:27.0\"}},{\"User\":{\"id\":82055,\"sex\":1,\"name\":\"Solid\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\",\"contactIdList\":[38710,82002],\"pictureList\":[],\"date\":\"2017-03-11 23:04:00.0\"}},{\"User\":{\"id\":82056,\"sex\":1,\"name\":\"IronMan\",\"head\":\"http://static.oschina.net/uploads/user/48/96289_50.jpg?t=1452751699000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-11 23:32:25.0\"}},{\"User\":{\"id\":82059,\"sex\":1,\"name\":\"He&She\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-19 22:49:15.0\"}},{\"User\":{\"id\":82060,\"sex\":1,\"name\":\"Anyway~\",\"head\":\"http://static.oschina.net/uploads/user/1/3064_50.jpg?t=1449566001000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-21 22:10:18.0\"}},{\"User\":{\"id\":1490109742863,\"sex\":1,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-21 23:22:22.0\"}},{\"User\":{\"id\":1490420651686,\"sex\":1,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[70793],\"pictureList\":[],\"date\":\"2017-03-25 13:44:11.0\"}},{\"User\":{\"id\":1490973670928,\"sex\":1,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[70793,93793],\"pictureList\":[],\"date\":\"2017-03-31 23:21:10.0\"}},{\"User\":{\"id\":1508072105320,\"sex\":1,\"name\":\"周吴郑王\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-10-15 20:55:05.0\"}}],\"code\":200,\"msg\":\"success\"}', '2018-03-03 15:45:00', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520092115128, 82001, 1520091922118, '{\"User\":{\"id\":82001,\"sex\":0,\"name\":\"测试改名\",\"tag\":\"APIJSON User\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\",\"contactIdList\":[82025,70793,82034,93793,82021,82033],\"pictureList\":[\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"},\"code\":200,\"msg\":\"success\"}', '2018-03-03 15:48:35', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520092224195, 82001, 1519526273822, '{\"Privacy\":{\"id\":82001,\"certified\":1,\"phone\":13000082001,\"balance\":22628.1},\"code\":200,\"msg\":\"success\"}', '2018-03-03 15:50:24', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520092385815, 82001, 1520091922118, '{\"User\":{\"id\":82001,\"sex\":0,\"name\":\"测试改名\",\"tag\":\"APIJSON User\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\",\"contactIdList\":[82025,70793,82034,93793,82021,82033],\"pictureList\":[\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"},\"code\":200,\"msg\":\"success\"}', '2018-03-03 15:53:05', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520092411345, 82001, 1516325614520, '{\"[]\":[{\"User\":{\"id\":82002,\"sex\":1,\"name\":\"Happy~\",\"tag\":\"iOS\",\"head\":\"http://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000\",\"contactIdList\":[82005,82001,38710,93793],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82003,\"sex\":1,\"name\":\"Wechat\",\"head\":\"http://common.cnblogs.com/images/wechat.png\",\"contactIdList\":[82001,93793],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82005,\"sex\":1,\"name\":\"Jan\",\"tag\":\"AG\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[82001,38710],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82006,\"sex\":1,\"name\":\"Meria\",\"head\":\"http://static.oschina.net/uploads/user/998/1997902_50.jpg?t=1407806577000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82021,\"sex\":1,\"name\":\"Tommy\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82025,\"sex\":1,\"name\":\"Tommy\",\"head\":\"http://static.oschina.net/uploads/user/629/1258821_50.jpg?t=1378063141000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82028,\"sex\":1,\"name\":\"gaeg\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82030,\"sex\":1,\"name\":\"Fun\",\"head\":\"http://static.oschina.net/uploads/user/998/1997902_50.jpg?t=1407806577000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82033,\"sex\":1,\"name\":\"GAS\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82034,\"sex\":1,\"name\":\"Jump\",\"head\":\"http://static.oschina.net/uploads/user/1332/2664107_50.jpg?t=1457405500000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82035,\"sex\":1,\"name\":\"Tab\",\"head\":\"http://static.oschina.net/uploads/user/629/1258821_50.jpg?t=1378063141000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82039,\"sex\":1,\"name\":\"Everyday\",\"head\":\"http://common.cnblogs.com/images/icon_weibo_24.png\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-19 21:57:56.0\"}},{\"User\":{\"id\":82040,\"sex\":1,\"name\":\"Dream\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[70793],\"pictureList\":[],\"date\":\"2017-03-03 00:44:26.0\"}},{\"User\":{\"id\":82042,\"sex\":1,\"name\":\"Why\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-04 18:04:33.0\"}},{\"User\":{\"id\":82044,\"sex\":1,\"name\":\"Love\",\"head\":\"http://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000\",\"contactIdList\":[82006],\"pictureList\":[],\"date\":\"2017-03-04 18:20:27.0\"}},{\"User\":{\"id\":82055,\"sex\":1,\"name\":\"Solid\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\",\"contactIdList\":[38710,82002],\"pictureList\":[],\"date\":\"2017-03-11 23:04:00.0\"}},{\"User\":{\"id\":82056,\"sex\":1,\"name\":\"IronMan\",\"head\":\"http://static.oschina.net/uploads/user/48/96289_50.jpg?t=1452751699000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-11 23:32:25.0\"}},{\"User\":{\"id\":82059,\"sex\":1,\"name\":\"He&She\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-19 22:49:15.0\"}},{\"User\":{\"id\":82060,\"sex\":1,\"name\":\"Anyway~\",\"head\":\"http://static.oschina.net/uploads/user/1/3064_50.jpg?t=1449566001000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-21 22:10:18.0\"}},{\"User\":{\"id\":1490109742863,\"sex\":1,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-21 23:22:22.0\"}},{\"User\":{\"id\":1490420651686,\"sex\":1,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[70793],\"pictureList\":[],\"date\":\"2017-03-25 13:44:11.0\"}},{\"User\":{\"id\":1490973670928,\"sex\":1,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[70793,93793],\"pictureList\":[],\"date\":\"2017-03-31 23:21:10.0\"}},{\"User\":{\"id\":1508072105320,\"sex\":1,\"name\":\"周吴郑王\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-10-15 20:55:05.0\"}}],\"code\":200,\"msg\":\"success\"}', '2018-03-03 15:53:31', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520092528119, 82001, 1519526273822, '{\"Privacy\":{\"id\":82001,\"certified\":1,\"phone\":13000082001,\"balance\":22628.1},\"code\":200,\"msg\":\"success\"}', '2018-03-03 15:55:28', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520092670553, 82001, 1519526273822, '{\"Privacy\":{\"id\":82001,\"certified\":1,\"phone\":13000082001,\"balance\":22628.1},\"code\":200,\"msg\":\"success\"}', '2018-03-03 15:57:50', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520092819799, 82001, 1520091922118, '{\"User\":{\"id\":82001,\"sex\":0,\"name\":\"测试改名\",\"tag\":\"APIJSON User\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\",\"contactIdList\":[82025,70793,82034,93793,82021,82033],\"pictureList\":[\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"},\"code\":200,\"msg\":\"success\"}', '2018-03-03 16:00:19', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520173868568, 82001, 1519526273822, '{\"Privacy\":{\"id\":82001,\"certified\":1,\"phone\":13000082001,\"balance\":26734.25},\"code\":200,\"msg\":\"success\"}', '2018-03-04 14:31:08', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520173870784, 82001, 1512216131855, '{\"[]\":[{\"Table\":{\"TABLE_NAME\":\"apijson_privacy\",\"TABLE_COMMENT\":\"用户隐私信息表。\n对安全要求高，不想泄漏真实名称。对外名称为 Privacy\"},\"Column[]\":[{\"COLUMN_NAME\":\"id\",\"COLUMN_TYPE\":\"bigint(15)\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"唯一标识\"},{\"COLUMN_NAME\":\"certified\",\"COLUMN_TYPE\":\"tinyint(2)\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"已认证\"},{\"COLUMN_NAME\":\"phone\",\"COLUMN_TYPE\":\"bigint(11)\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"手机号，仅支持 11 位数的。不支持 +86 这种国家地区开头的。如果要支持就改为 VARCHAR(14)\"},{\"COLUMN_NAME\":\"balance\",\"COLUMN_TYPE\":\"decimal(10,2)\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"余额\"},{\"COLUMN_NAME\":\"_password\",\"COLUMN_TYPE\":\"varchar(20)\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"登录密码\"},{\"COLUMN_NAME\":\"_payPassword\",\"COLUMN_TYPE\":\"int(6)\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"支付密码\"}]},{\"Table\":{\"TABLE_NAME\":\"apijson_user\",\"TABLE_COMMENT\":\"用户公开信息表。\n对安全要求高，不想泄漏真实名称。对外名称为 User\"},\"Column[]\":[{\"COLUMN_NAME\":\"id\",\"COLUMN_TYPE\":\"bigint(15)\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"唯一标识\"},{\"COLUMN_NAME\":\"sex\",\"COLUMN_TYPE\":\"tinyint(2)\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"性别：\n0-男\n1-女\"},{\"COLUMN_NAME\":\"name\",\"COLUMN_TYPE\":\"varchar(20)\",\"IS_NULLABLE\":\"YES\",\"COLUMN_COMMENT\":\"名称\"},{\"COLUMN_NAME\":\"tag\",\"COLUMN_TYPE\":\"varchar(45)\",\"IS_NULLABLE\":\"YES\",\"COLUMN_COMMENT\":\"标签\"},{\"COLUMN_NAME\":\"head\",\"COLUMN_TYPE\":\"varchar(300)\",\"IS_NULLABLE\":\"YES\",\"COLUMN_COMMENT\":\"头像url\"},{\"COLUMN_NAME\":\"contactIdList\",\"COLUMN_TYPE\":\"json\",\"IS_NULLABLE\":\"YES\",\"COLUMN_COMMENT\":\"联系人id列表\"},{\"COLUMN_NAME\":\"pictureList\",\"COLUMN_TYPE\":\"json\",\"IS_NULLABLE\":\"YES\",\"COLUMN_COMMENT\":\"照片列表\"},{\"COLUMN_NAME\":\"date\",\"COLUMN_TYPE\":\"timestamp\",\"IS_NULLABLE\":\"YES\",\"COLUMN_COMMENT\":\"创建日期\"}]},{\"Table\":{\"TABLE_NAME\":\"Comment\",\"TABLE_COMMENT\":\"评论\"},\"Column[]\":[{\"COLUMN_NAME\":\"id\",\"COLUMN_TYPE\":\"bigint(15)\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"唯一标识\"},{\"COLUMN_NAME\":\"toId\",\"COLUMN_TYPE\":\"bigint(15)\",\"IS_NULLABLE\":\"YES\",\"COLUMN_COMMENT\":\"被回复的id\"},{\"COLUMN_NAME\":\"userId\",\"COLUMN_TYPE\":\"bigint(15)\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"评论人id\"},{\"COLUMN_NAME\":\"momentId\",\"COLUMN_TYPE\":\"bigint(15)\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"动态id\"},{\"COLUMN_NAME\":\"date\",\"COLUMN_TYPE\":\"timestamp\",\"IS_NULLABLE\":\"YES\",\"COLUMN_COMMENT\":\"创建日期\"},{\"COLUMN_NAME\":\"content\",\"COLUMN_TYPE\":\"varchar(1000)\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"内容\"}]},{\"Table\":{\"TABLE_NAME\":\"Document\",\"TABLE_COMMENT\":\"测试用例文档\n后端开发者在测试好后，把选好的测试用例上传，这样就能共享给前端/客户端开发者\"},\"Column[]\":[{\"COLUMN_NAME\":\"id\",\"COLUMN_TYPE\":\"bigint(15)\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"唯一标识\"},{\"COLUMN_NAME\":\"userId\",\"COLUMN_TYPE\":\"bigint(15)\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"用户id\n应该用adminId，只有当登录账户是管理员时才能操作文档。\n需要先建Admin表，新增登录等相关接口。\"},{\"COLUMN_NAME\":\"version\",\"COLUMN_TYPE\":\"tinyint(4)\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"接口版本号\n<=0 - 不限制版本，任意版本都可用这个接口\n>0 - 在这个版本添加的接口\"},{\"COLUMN_NAME\":\"name\",\"COLUMN_TYPE\":\"varchar(50)\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"接口名称\"},{\"COLUMN_NAME\":\"url\",\"COLUMN_TYPE\":\"varchar(250)\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"请求地址\"},{\"COLUMN_NAME\":\"request\",\"COLUMN_TYPE\":\"text\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"请求\n用json格式会导致强制排序，而请求中引用赋值只能引用上面的字段，必须有序。\"},{\"COLUMN_NAME\":\"response\",\"COLUMN_TYPE\":\"text\",\"IS_NULLABLE\":\"YES\",\"COLUMN_COMMENT\":\"标准返回结果JSON\n用json格式会导致强制排序，而请求中引用赋值只能引用上面的字段，必须有序。\"},{\"COLUMN_NAME\":\"date\",\"COLUMN_TYPE\":\"timestamp\",\"IS_NULLABLE\":\"YES\",\"COLUMN_COMMENT\":\"创建日期\"}]},{\"Table\":{\"TABLE_NAME\":\"Login\",\"TABLE_COMMENT\":\"@deprecated，登录信息存session\"},\"Column[]\":[{\"COLUMN_NAME\":\"id\",\"COLUMN_TYPE\":\"bigint(15)\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"唯一标识\"},{\"COLUMN_NAME\":\"userId\",\"COLUMN_TYPE\":\"bigint(15)\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"用户id\"},{\"COLUMN_NAME\":\"type\",\"COLUMN_TYPE\":\"tinyint(2)\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"类型\n0-密码登录\n1-验证码登录\"},{\"COLUMN_NAME\":\"date\",\"COLUMN_TYPE\":\"timestamp\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"创建日期\"}]},{\"Table\":{\"TABLE_NAME\":\"Moment\",\"TABLE_COMMENT\":\"动态\"},\"Column[]\":[{\"COLUMN_NAME\":\"id\",\"COLUMN_TYPE\":\"bigint(15)\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"唯一标识\"},{\"COLUMN_NAME\":\"userId\",\"COLUMN_TYPE\":\"bigint(15)\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"用户id\"},{\"COLUMN_NAME\":\"date\",\"COLUMN_TYPE\":\"timestamp\",\"IS_NULLABLE\":\"YES\",\"COLUMN_COMMENT\":\"创建日期\"},{\"COLUMN_NAME\":\"content\",\"COLUMN_TYPE\":\"varchar(300)\",\"IS_NULLABLE\":\"YES\",\"COLUMN_COMMENT\":\"内容\"},{\"COLUMN_NAME\":\"praiseUserIdList\",\"COLUMN_TYPE\":\"json\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"点赞的用户id列表\"},{\"COLUMN_NAME\":\"pictureList\",\"COLUMN_TYPE\":\"json\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"图片列表\"}]},{\"Table\":{\"TABLE_NAME\":\"Praise\",\"TABLE_COMMENT\":\"如果对Moment写安全要求高，可以将Moment内praiserUserIdList分离到Praise表中，作为userIdList。\n权限注解也改下：\n@MethodAccess(\n		PUT = {OWNER, ADMIN}\n		)\nclass Moment {\n       …\n}\n\n@MethodAccess(\n		PUT = {LOGIN, CONTACT, CIRCLE, OWNER, ADMIN}\n		)\n class Praise {\n       …\n }\n\"},\"Column[]\":[{\"COLUMN_NAME\":\"id\",\"COLUMN_TYPE\":\"bigint(15)\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"动态id\"},{\"COLUMN_NAME\":\"momentId\",\"COLUMN_TYPE\":\"bigint(15)\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"唯一标识\"},{\"COLUMN_NAME\":\"userId\",\"COLUMN_TYPE\":\"bigint(15)\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"用户id\"},{\"COLUMN_NAME\":\"date\",\"COLUMN_TYPE\":\"timestamp\",\"IS_NULLABLE\":\"YES\",\"COLUMN_COMMENT\":\"点赞时间\"}]},{\"Table\":{\"TABLE_NAME\":\"Request\",\"TABLE_COMMENT\":\"最好编辑完后删除主键，这样就是只读状态，不能随意更改。需要更改就重新加上主键。\n\n每次启动服务器时加载整个表到内存。\n这个表不可省略，model内注解的权限只是客户端能用的，其它可以保证即便服务端代码错误时也不会误删数据。\"},\"Column[]\":[{\"COLUMN_NAME\":\"id\",\"COLUMN_TYPE\":\"bigint(15)\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"唯一标识\"},{\"COLUMN_NAME\":\"version\",\"COLUMN_TYPE\":\"tinyint(4)\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"GET,HEAD可用任意结构访问任意开放内容，不需要这个字段。\n其它的操作因为写入了结构和内容，所以都需要，按照不同的version选择对应的structure。\n\n自动化版本管理：\nRequest JSON最外层可以传  “version”:Integer 。\n1.未传或 <= 0，用最新版。 “@order”:”version-“\n2.已传且 > 0，用version以上的可用版本的最低版本。 “@order”:”version+”, “version{}”:”>={version}”\"},{\"COLUMN_NAME\":\"method\",\"COLUMN_TYPE\":\"varchar(10)\",\"IS_NULLABLE\":\"YES\",\"COLUMN_COMMENT\":\"只限于GET,HEAD外的操作方法。\"},{\"COLUMN_NAME\":\"tag\",\"COLUMN_TYPE\":\"varchar(20)\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"标签\"},{\"COLUMN_NAME\":\"structure\",\"COLUMN_TYPE\":\"json\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"结构\"},{\"COLUMN_NAME\":\"detail\",\"COLUMN_TYPE\":\"varchar(10000)\",\"IS_NULLABLE\":\"YES\",\"COLUMN_COMMENT\":\"详细说明\"},{\"COLUMN_NAME\":\"date\",\"COLUMN_TYPE\":\"timestamp\",\"IS_NULLABLE\":\"YES\",\"COLUMN_COMMENT\":\"创建日期\"}]},{\"Table\":{\"TABLE_NAME\":\"Response\",\"TABLE_COMMENT\":\"每次启动服务器时加载整个表到内存。\"},\"Column[]\":[{\"COLUMN_NAME\":\"id\",\"COLUMN_TYPE\":\"bigint(15)\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"唯一标识\"},{\"COLUMN_NAME\":\"method\",\"COLUMN_TYPE\":\"varchar(10)\",\"IS_NULLABLE\":\"YES\",\"COLUMN_COMMENT\":\"方法\"},{\"COLUMN_NAME\":\"model\",\"COLUMN_TYPE\":\"varchar(20)\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"表名，table是SQL关键词不能用\"},{\"COLUMN_NAME\":\"structure\",\"COLUMN_TYPE\":\"json\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"结构\"},{\"COLUMN_NAME\":\"detail\",\"COLUMN_TYPE\":\"varchar(10000)\",\"IS_NULLABLE\":\"YES\",\"COLUMN_COMMENT\":\"详细说明\"},{\"COLUMN_NAME\":\"date\",\"COLUMN_TYPE\":\"timestamp\",\"IS_NULLABLE\":\"YES\",\"COLUMN_COMMENT\":\"创建日期\"}]},{\"Table\":{\"TABLE_NAME\":\"Test\",\"TABLE_COMMENT\":\"测试及验证用的表，可以用 SELECT condition替代 SELECT * FROM Test WHERE condition，这样就不需要这张表了\"},\"Column[]\":[{\"COLUMN_NAME\":\"id\",\"COLUMN_TYPE\":\"tinyint(2)\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"\"}]},{\"Table\":{\"TABLE_NAME\":\"TestRecord\",\"TABLE_COMMENT\":\"测试记录\n主要用于保存自动化接口回归测试\"},\"Column[]\":[{\"COLUMN_NAME\":\"id\",\"COLUMN_TYPE\":\"bigint(15)\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"唯一标识\"},{\"COLUMN_NAME\":\"userId\",\"COLUMN_TYPE\":\"bigint(15)\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"用户id\"},{\"COLUMN_NAME\":\"documentId\",\"COLUMN_TYPE\":\"bigint(15)\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"测试用例文档id\"},{\"COLUMN_NAME\":\"response\",\"COLUMN_TYPE\":\"text\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"接口返回结果JSON\"},{\"COLUMN_NAME\":\"date\",\"COLUMN_TYPE\":\"timestamp\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"创建日期\"}]},{\"Table\":{\"TABLE_NAME\":\"Verify\",\"TABLE_COMMENT\":\"\"},\"Column[]\":[{\"COLUMN_NAME\":\"id\",\"COLUMN_TYPE\":\"bigint(15)\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"唯一标识\"},{\"COLUMN_NAME\":\"type\",\"COLUMN_TYPE\":\"int(2)\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"类型：\n0-登录\n1-注册\n2-修改登录密码\n3-修改支付密码\"},{\"COLUMN_NAME\":\"phone\",\"COLUMN_TYPE\":\"bigint(11)\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"手机号\"},{\"COLUMN_NAME\":\"verify\",\"COLUMN_TYPE\":\"int(6)\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"验证码\"},{\"COLUMN_NAME\":\"date\",\"COLUMN_TYPE\":\"timestamp\",\"IS_NULLABLE\":\"NO\",\"COLUMN_COMMENT\":\"创建时间\"}]}],\"Request[]\":[{\"id\":36,\"version\":2,\"method\":\"PUT\",\"tag\":\"Document\",\"structure\":{\"ADD\":{\"@role\":\"owner\"},\"DISALLOW\":\"userId\",\"NECESSARY\":\"id\"},\"date\":\"2017-11-26 16:35:15.0\"},{\"id\":35,\"version\":2,\"method\":\"POST\",\"tag\":\"Document\",\"structure\":{\"DISALLOW\":\"id\",\"NECESSARY\":\"userId,name,url,request\"},\"date\":\"2017-11-26 16:34:41.0\"},{\"id\":32,\"version\":2,\"method\":\"GETS\",\"tag\":\"Privacy\",\"structure\":{\"ADD\":{\"@role\":\"owner\"},\"DISALLOW\":\"_password,_payPassword\",\"NECESSARY\":\"id\"},\"date\":\"2017-06-13 00:05:51.0\"},{\"id\":33,\"version\":2,\"method\":\"GETS\",\"tag\":\"Privacy-CIRCLE\",\"structure\":{\"Privacy\":{\"DISALLOW\":\"!\",\"NECESSARY\":\"id\",\"PUT\":{\"@column\":\"phone\",\"@role\":\"CIRCLE\"}}},\"date\":\"2017-06-13 00:05:51.0\"},{\"id\":37,\"version\":2,\"method\":\"DELETE\",\"tag\":\"Document\",\"structure\":{\"ADD\":{\"@role\":\"owner\"},\"DISALLOW\":\"!\",\"NECESSARY\":\"id\"},\"date\":\"2017-11-26 16:36:20.0\"},{\"id\":4,\"version\":1,\"method\":\"PUT\",\"tag\":\"User\",\"structure\":{\"ADD\":{\"@role\":\"owner\"},\"DISALLOW\":\"phone\",\"NECESSARY\":\"id\"},\"detail\":\"必须传id，不允许传phone。ADD当没传@role时用owner补全\",\"date\":\"2017-02-01 19:19:51.0\"},{\"id\":8,\"version\":1,\"method\":\"PUT\",\"tag\":\"User-phone\",\"structure\":{\"User\":{\"ADD\":{\"@role\":\"owner\"},\"DISALLOW\":\"!\",\"NECESSARY\":\"id,phone,_password\",\"PUT\":{\"@condition\":\"_password\"}}},\"detail\":\"! 表示其它所有，这里指necessary所有未包含的字段\",\"date\":\"2017-02-01 19:19:51.0\"},{\"id\":17,\"version\":1,\"method\":\"PUT\",\"tag\":\"Moment\",\"structure\":{\"DISALLOW\":\"userId,date\",\"NECESSARY\":\"id\"},\"date\":\"2017-02-01 19:19:51.0\"},{\"id\":23,\"version\":1,\"method\":\"PUT\",\"tag\":\"Privacy\",\"structure\":{\"ADD\":{\"@role\":\"owner\"},\"NECESSARY\":\"id\"},\"detail\":\"ADD当没传@role时用owner补全\",\"date\":\"2017-02-01 19:19:51.0\"},{\"id\":25,\"version\":1,\"method\":\"PUT\",\"tag\":\"Praise\",\"structure\":{\"NECESSARY\":\"id\"},\"detail\":\"必须传id\",\"date\":\"2017-02-01 19:19:51.0\"},{\"id\":27,\"version\":1,\"method\":\"PUT\",\"tag\":\"Comment[]\",\"structure\":{\"Comment\":{\"ADD\":{\"@role\":\"owner\"},\"NECESSARY\":\"id{}\"}},\"detail\":\"DISALLOW没必要用于DELETE\",\"date\":\"2017-02-01 19:19:51.0\"},{\"id\":28,\"version\":1,\"method\":\"PUT\",\"tag\":\"Comment\",\"structure\":{\"ADD\":{\"@role\":\"owner\"},\"NECESSARY\":\"id\"},\"detail\":\"这里省略了Comment，因为tag就是Comment，Parser.getCorrectRequest会自动补全\",\"date\":\"2017-02-01 19:19:51.0\"},{\"id\":30,\"version\":1,\"method\":\"PUT\",\"tag\":\"balance+\",\"structure\":{\"Privacy\":{\"VERIFY\":{\"balance+&{}\":\">=1,<=100000\"},\"DISALLOW\":\"!\",\"NECESSARY\":\"id,balance+\"}},\"detail\":\"验证balance+对应的值是否满足>=1且<=100000\",\"date\":\"2017-10-21 16:48:34.0\"},{\"id\":31,\"version\":1,\"method\":\"PUT\",\"tag\":\"balance-\",\"structure\":{\"Privacy\":{\"VERIFY\":{\"balance-&{}\":\">=1,<=10000\"},\"DISALLOW\":\"!\",\"NECESSARY\":\"id,balance-,_password\",\"PUT\":{\"@condition\":\"_password\"}}},\"detail\":\"PUT强制把_password作为WHERE条件\",\"date\":\"2017-10-21 16:48:34.0\"},{\"id\":1,\"version\":1,\"method\":\"POST\",\"tag\":\"register\",\"structure\":{\"Privacy\":{\"UNIQUE\":\"phone\",\"VERIFY\":{\"phone?\":\"phone\"},\"DISALLOW\":\"id\",\"NECESSARY\":\"_password,phone\"},\"User\":{\"DISALLOW\":\"id\",\"NECESSARY\":\"name\",\"PUT\":{\"id@\":\"Privacy/id\"}}},\"detail\":\"UNIQUE校验phone是否已存在。VERIFY校验phone是否符合手机号的格式\",\"date\":\"2017-02-01 19:19:51.0\"},{\"id\":2,\"version\":1,\"method\":\"POST\",\"tag\":\"Moment\",\"structure\":{\"ADD\":{\"praiseUserIdList\":[],\"pictureList\":[]},\"DISALLOW\":\"id\",\"NECESSARY\":\"userId,pictureList\"},\"detail\":\"ADD当没传pictureList和praiseUserIdList时用空数组[]补全，保证不会为null\",\"date\":\"2017-02-01 19:19:51.0\"},{\"id\":3,\"version\":1,\"method\":\"POST\",\"tag\":\"Comment\",\"structure\":{\"DISALLOW\":\"id\",\"NECESSARY\":\"userId,momentId,content\"},\"detail\":\"必须传userId,momentId,content，不允许传id\",\"date\":\"2017-02-01 19:19:51.0\"},{\"id\":14,\"version\":1,\"method\":\"POST\",\"tag\":\"Verify\",\"structure\":{\"DISALLOW\":\"!\",\"NECESSARY\":\"phone,verify\"},\"detail\":\"必须传phone,verify，其它都不允许传\",\"date\":\"2017-02-18 22:20:43.0\"},{\"id\":38,\"version\":1,\"method\":\"POST\",\"tag\":\"TestRecord\",\"structure\":{\"DISALLOW\":\"id\",\"NECESSARY\":\"userId,documentId,response\"},\"date\":\"2017-11-26 16:34:41.0\"},{\"id\":16,\"version\":1,\"method\":\"HEADS\",\"tag\":\"Verify\",\"structure\":{},\"detail\":\"允许任意内容\",\"date\":\"2017-02-18 22:20:43.0\"},{\"id\":21,\"version\":1,\"method\":\"HEADS\",\"tag\":\"Login\",\"structure\":{\"DISALLOW\":\"!\",\"NECESSARY\":\"userId,type\"},\"date\":\"2017-02-18 22:20:43.0\"},{\"id\":15,\"version\":1,\"method\":\"GETS\",\"tag\":\"Verify\",\"structure\":{\"NECESSARY\":\"phone\"},\"detail\":\"必须传phone\",\"date\":\"2017-02-18 22:20:43.0\"},{\"id\":22,\"version\":1,\"method\":\"GETS\",\"tag\":\"User\",\"structure\":{},\"detail\":\"允许传任何内容，除了表对象\",\"date\":\"2017-02-18 22:20:43.0\"},{\"id\":29,\"version\":1,\"method\":\"GETS\",\"tag\":\"login\",\"structure\":{\"Privacy\":{\"DISALLOW\":\"id\",\"NECESSARY\":\"phone,_password\"}},\"date\":\"2017-10-15 18:04:52.0\"},{\"id\":5,\"version\":1,\"method\":\"DELETE\",\"tag\":\"Moment\",\"structure\":{\"Moment\":{\"ADD\":{\"@role\":\"owner\"},\"NECESSARY\":\"id\"},\"PUT\":{\"Comment\":{\"@role\":\"admin\",\"momentId@\":\"Moment/id\"}}},\"date\":\"2017-02-01 19:19:51.0\"},{\"id\":6,\"version\":1,\"method\":\"DELETE\",\"tag\":\"Comment\",\"structure\":{\"Comment\":{\"ADD\":{\"@role\":\"owner\"},\"NECESSARY\":\"id\"},\"PUT\":{\"Comment:child\":{\"toId@\":\"Comment/id\",\"@role\":\"admin\"}}},\"detail\":\"disallow没必要用于DELETE\",\"date\":\"2017-02-01 19:19:51.0\"},{\"id\":26,\"version\":1,\"method\":\"DELETE\",\"tag\":\"Comment[]\",\"structure\":{\"Comment\":{\"ADD\":{\"@role\":\"owner\"},\"NECESSARY\":\"id{}\"}},\"detail\":\"DISALLOW没必要用于DELETE\",\"date\":\"2017-02-01 19:19:51.0\"}],\"code\":200,\"msg\":\"success\"}', '2018-03-04 14:31:10', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520173872976, 82001, 1511970224333, '{\"User\":{\"code\":200,\"msg\":\"success\",\"id\":82001,\"count\":1},\"code\":200,\"msg\":\"success\"}', '2018-03-04 14:31:12', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520173873719, 82001, 1511970009072, '{\"Moment\":{\"code\":200,\"msg\":\"success\",\"id\":1520173865791,\"count\":1},\"code\":200,\"msg\":\"success\"}', '2018-03-04 14:31:13', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520173875424, 82001, 1511969181104, '{\"User\":{\"id\":82001,\"contactIdList+\":[93793],\"@role\":\"owner\"},\"code\":409,\"msg\":\"PUT User, contactIdList:93793 已存在！\"}', '2018-03-04 14:31:15', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520173877914, 82001, 1511969630372, '{\"Comment\":{\"code\":200,\"msg\":\"success\",\"id\":1520173865916,\"count\":1},\"code\":200,\"msg\":\"success\"}', '2018-03-04 14:31:17', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520173878817, 82001, 1511967853340, '{\"[]\":[{\"Moment\":{\"id\":1520173760960,\"userId\":82001,\"date\":\"2018-03-04 22:29:20.0\",\"content\":\"测试新增动态\",\"praiseUserIdList\":[],\"pictureList\":[\"http://static.oschina.net/uploads/user/48/96331_50.jpg\"]},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Moment\":{\"id\":1520173720451,\"userId\":82001,\"date\":\"2018-03-04 22:28:40.0\",\"content\":\"测试新增动态\",\"praiseUserIdList\":[],\"pictureList\":[\"http://static.oschina.net/uploads/user/48/96331_50.jpg\"]},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Moment\":{\"id\":1520173672910,\"userId\":82001,\"date\":\"2018-03-04 22:27:52.0\",\"content\":\"测试新增动态\",\"praiseUserIdList\":[],\"pictureList\":[\"http://static.oschina.net/uploads/user/48/96331_50.jpg\"]},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Moment\":{\"id\":1520173667947,\"userId\":82001,\"date\":\"2018-03-04 22:27:47.0\",\"content\":\"测试新增动态\",\"praiseUserIdList\":[],\"pictureList\":[\"http://static.oschina.net/uploads/user/48/96331_50.jpg\"]},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Moment\":{\"id\":1520173666384,\"userId\":82001,\"date\":\"2018-03-04 22:27:46.0\",\"content\":\"测试新增动态\",\"praiseUserIdList\":[],\"pictureList\":[\"http://static.oschina.net/uploads/user/48/96331_50.jpg\"]},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\"}}],\"code\":200,\"msg\":\"success\"}', '2018-03-04 14:31:18', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520173879493, 82001, 1511964176689, '{\"[]\":[{\"Comment\":{\"id\":176,\"toId\":166,\"userId\":38710,\"momentId\":15,\"date\":\"2017-03-25 20:28:03.0\",\"content\":\"thank you\"},\"User\":{\"id\":38710,\"name\":\"TommyLemon\",\"head\":\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\"}},{\"Comment\":{\"id\":1490863469638,\"toId\":0,\"userId\":82002,\"momentId\":15,\"date\":\"2017-03-30 16:44:29.0\",\"content\":\"Just do it\"},\"User\":{\"id\":82002,\"name\":\"Happy~\",\"head\":\"http://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000\"}},{\"Comment\":{\"id\":1490875660259,\"toId\":1490863469638,\"userId\":82055,\"momentId\":15,\"date\":\"2017-03-30 20:07:40.0\",\"content\":\"I prove wht you said(??????)\"},\"User\":{\"id\":82055,\"name\":\"Solid\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1508227456407,\"toId\":0,\"userId\":82001,\"momentId\":15,\"date\":\"2017-10-17 16:04:16.0\",\"content\":\"hsh\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1509346606036,\"toId\":0,\"userId\":82001,\"momentId\":15,\"date\":\"2017-10-30 14:56:46.0\",\"content\":\"测\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1520086403693,\"userId\":82001,\"momentId\":15,\"date\":\"2018-03-03 22:13:23.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1520086647789,\"userId\":82001,\"momentId\":15,\"date\":\"2018-03-03 22:17:27.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1520086858159,\"userId\":82001,\"momentId\":15,\"date\":\"2018-03-03 22:20:58.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1520087089611,\"userId\":82001,\"momentId\":15,\"date\":\"2018-03-03 22:24:49.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1520087181598,\"userId\":82001,\"momentId\":15,\"date\":\"2018-03-03 22:26:21.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1520088770429,\"userId\":82001,\"momentId\":15,\"date\":\"2018-03-03 22:52:50.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1520089307634,\"userId\":82001,\"momentId\":15,\"date\":\"2018-03-03 23:01:47.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1520089508692,\"userId\":82001,\"momentId\":15,\"date\":\"2018-03-03 23:05:08.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1520089597667,\"userId\":82001,\"momentId\":15,\"date\":\"2018-03-03 23:06:37.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1520089619339,\"userId\":82001,\"momentId\":15,\"date\":\"2018-03-03 23:06:59.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1520089621208,\"userId\":82001,\"momentId\":15,\"date\":\"2018-03-03 23:07:01.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1520171621453,\"userId\":82001,\"momentId\":15,\"date\":\"2018-03-04 21:53:41.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1520171658156,\"userId\":82001,\"momentId\":15,\"date\":\"2018-03-04 21:54:18.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1520171697409,\"userId\":82001,\"momentId\":15,\"date\":\"2018-03-04 21:54:57.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1520171714260,\"userId\":82001,\"momentId\":15,\"date\":\"2018-03-04 21:55:14.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\"}}],\"code\":200,\"msg\":\"success\"}', '2018-03-04 14:31:19', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520173881709, 82001, 1511796208670, '{\"code\":408,\"msg\":\"验证码已过期！\"}', '2018-03-04 14:31:21', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520173883243, 82001, 1511689914599, '{\"Privacy\":{\"id\":82001,\"certified\":1,\"phone\":13000082001,\"balance\":26834.4},\"code\":200,\"msg\":\"success\"}', '2018-03-04 14:31:23', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520173889466, 82001, 1, '{\"User\":{\"id\":82001,\"sex\":0,\"name\":\"测试改名\",\"tag\":\"APIJSON User\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\",\"contactIdList\":[82025,70793,82034,93793,82021,82033],\"pictureList\":[\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"},\"code\":200,\"msg\":\"success\"}', '2018-03-04 14:31:29', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520173915650, 82001, 1519526273822, '{\"Privacy\":{\"id\":82001,\"certified\":1,\"phone\":13000082001,\"balance\":27134.85},\"code\":200,\"msg\":\"success\"}', '2018-03-04 14:31:55', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520173922657, 82001, 1519526273822, '{\"Privacy\":{\"id\":82001,\"certified\":1,\"phone\":13000082001,\"balance\":27235},\"code\":200,\"msg\":\"success\"}', '2018-03-04 14:32:02', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520173935008, 82001, 1519526273822, '{\"Privacy\":{\"id\":82001,\"certified\":1,\"phone\":13000082001,\"balance\":27435.3},\"code\":200,\"msg\":\"success\"}', '2018-03-04 14:32:15', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520174017925, 82001, 1519526273822, '{\"Privacy\":{\"id\":82001,\"certified\":1,\"phone\":13000082001,\"balance\":29939.05},\"code\":200,\"msg\":\"success\"}', '2018-03-04 14:33:37', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520174362871, 82001, 1519526273822, '{\"Privacy\":{\"id\":82001,\"certified\":1,\"phone\":13000082001,\"balance\":30039.2},\"code\":200,\"msg\":\"success\"}', '2018-03-04 14:39:22', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520176947082, 82001, 1519526273822, '{\"Privacy\":{\"id\":82001,\"certified\":1,\"phone\":13000082001,\"balance\":28699.05},\"code\":200,\"msg\":\"success\"}', '2018-03-04 15:22:27', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520177104344, 82001, 1519526273822, '{\"Privacy\":{\"id\":82001,\"certified\":1,\"phone\":13000082001,\"balance\":28709.2},\"code\":200,\"msg\":\"success\"}', '2018-03-04 15:25:04', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520177328250, 82001, 1519526273822, '{\"Privacy\":{\"id\":82001,\"certified\":1,\"phone\":13000082001,\"balance\":28809.35},\"code\":200,\"msg\":\"success\"}', '2018-03-04 15:28:48', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520177426424, 82001, 1520177221844, '{\"[]\":[{\"User\":{\"id\":38710,\"sex\":0,\"name\":\"TommyLemon\",\"tag\":\"Android&Java\",\"head\":\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"contactIdList\":[82003,82005,90814,82004,82009,82002,82044,93793,70793],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":70793,\"sex\":0,\"name\":\"Strong\",\"tag\":\"djdj\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\",\"contactIdList\":[38710,82002],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/788c0a7e11a\",\"https://camo.githubusercontent.com/f513f67\"],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82001,\"sex\":0,\"name\":\"测试改名\",\"tag\":\"APIJSON User\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\",\"contactIdList\":[82025,70793,82034,93793,82021,82033,93794],\"pictureList\":[\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82004,\"sex\":0,\"name\":\"Tommy\",\"tag\":\"fasef\",\"head\":\"http://static.oschina.net/uploads/user/1200/2400261_50.png?t=1439638750000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82009,\"sex\":0,\"name\":\"God\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82012,\"sex\":0,\"name\":\"Steve\",\"tag\":\"FEWE\",\"head\":\"http://static.oschina.net/uploads/user/1/3064_50.jpg?t=1449566001000\",\"contactIdList\":[82004,82002,93793],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82020,\"sex\":0,\"name\":\"ORANGE\",\"head\":\"http://static.oschina.net/uploads/user/48/96289_50.jpg?t=1452751699000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82022,\"sex\":0,\"name\":\"Internet\",\"head\":\"http://static.oschina.net/uploads/user/1332/2664107_50.jpg?t=1457405500000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82023,\"sex\":0,\"name\":\"No1\",\"head\":\"http://static.oschina.net/uploads/user/1385/2770216_50.jpg?t=1464405516000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82024,\"sex\":0,\"name\":\"Lemon\",\"head\":\"http://static.oschina.net/uploads/user/427/855532_50.jpg?t=1435030876000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82026,\"sex\":0,\"name\":\"iOS\",\"head\":\"http://static.oschina.net/uploads/user/1200/2400261_50.png?t=1439638750000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82027,\"sex\":0,\"name\":\"Yong\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82029,\"sex\":0,\"name\":\"GASG\",\"head\":\"http://common.cnblogs.com/images/wechat.png\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82031,\"sex\":0,\"name\":\"Lemon\",\"head\":\"http://static.oschina.net/uploads/user/48/96331_50.jpg\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82032,\"sex\":0,\"name\":\"Stack\",\"tag\":\"fasdg\",\"head\":\"http://static.oschina.net/uploads/user/1385/2770216_50.jpg?t=1464405516000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82036,\"sex\":0,\"name\":\"SAG\",\"head\":\"http://static.oschina.net/uploads/user/1332/2664107_50.jpg?t=1457405500000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82037,\"sex\":0,\"name\":\"Test\",\"head\":\"http://static.oschina.net/uploads/user/1200/2400261_50.png?t=1439638750000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82038,\"sex\":0,\"name\":\"Battle\",\"head\":\"http://static.oschina.net/uploads/user/48/96289_50.jpg?t=1452751699000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82041,\"sex\":0,\"name\":\"Holo\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[38710,82001],\"pictureList\":[],\"date\":\"2017-03-04 17:59:34.0\"}},{\"User\":{\"id\":82043,\"sex\":0,\"name\":\"Holiday\",\"head\":\"http://static.oschina.net/uploads/user/998/1997902_50.jpg?t=1407806577000\",\"contactIdList\":[70793,82006],\"pictureList\":[],\"date\":\"2017-03-04 18:05:04.0\"}},{\"User\":{\"id\":82045,\"sex\":0,\"name\":\"Green\",\"head\":\"http://common.cnblogs.com/images/wechat.png\",\"contactIdList\":[82001,82002,82003,1485246481130],\"pictureList\":[],\"date\":\"2017-03-04 18:22:39.0\"}},{\"User\":{\"id\":82046,\"sex\":0,\"name\":\"Team\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[38710,82002,1485246481130],\"pictureList\":[],\"date\":\"2017-03-04 23:11:17.0\"}},{\"User\":{\"id\":82047,\"sex\":0,\"name\":\"Tesla\",\"head\":\"http://common.cnblogs.com/images/wechat.png\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-05 00:02:05.0\"}},{\"User\":{\"id\":82048,\"sex\":0,\"name\":\"Moto\",\"head\":\"http://static.oschina.net/uploads/user/48/96289_50.jpg?t=1452751699000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-05 00:04:02.0\"}},{\"User\":{\"id\":82049,\"sex\":0,\"name\":\"ITMan\",\"head\":\"http://static.oschina.net/uploads/user/629/1258821_50.jpg?t=1378063141000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-05 17:51:51.0\"}},{\"User\":{\"id\":82050,\"sex\":0,\"name\":\"Parl\",\"head\":\"http://static.oschina.net/uploads/user/998/1997902_50.jpg?t=1407806577000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-05 17:52:52.0\"}},{\"User\":{\"id\":82051,\"sex\":0,\"name\":\"Girl\",\"head\":\"http://static.oschina.net/uploads/user/1332/2664107_50.jpg?t=1457405500000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-05 17:53:37.0\"}},{\"User\":{\"id\":82052,\"sex\":0,\"name\":\"Unbrella\",\"head\":\"http://static.oschina.net/uploads/user/1385/2770216_50.jpg?t=1464405516000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-05 17:57:54.0\"}},{\"User\":{\"id\":82053,\"sex\":0,\"name\":\"Alice\",\"head\":\"http://common.cnblogs.com/images/wechat.png\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-05 23:25:42.0\"}},{\"User\":{\"id\":82054,\"sex\":0,\"name\":\"Harvey\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-06 20:29:03.0\"}},{\"User\":{\"id\":82057,\"sex\":0,\"name\":\"NullPointerExeption\",\"head\":\"http://static.oschina.net/uploads/user/1385/2770216_50.jpg?t=1464405516000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-12 14:01:23.0\"}},{\"User\":{\"id\":82058,\"sex\":0,\"name\":\"StupidBird\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[82001,82002],\"pictureList\":[],\"date\":\"2017-03-12 19:23:04.0\"}},{\"User\":{\"id\":90814,\"sex\":0,\"name\":\"007\",\"head\":\"http://static.oschina.net/uploads/user/51/102723_50.jpg?t=1449212504000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":93793,\"sex\":0,\"name\":\"Mike\",\"tag\":\"GES\",\"head\":\"http://static.oschina.net/uploads/user/48/96331_50.jpg\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":93794,\"sex\":0,\"name\":\"Lemon\",\"head\":\"http://static.oschina.net/uploads/user/48/97721_50.jpg?t=1451544779000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":1490109845208,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-21 23:24:05.0\"}},{\"User\":{\"id\":1490427139175,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[38710,70793],\"pictureList\":[],\"date\":\"2017-03-25 15:32:19.0\"}},{\"User\":{\"id\":1490427577823,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-25 15:39:37.0\"}},{\"User\":{\"id\":1490584952968,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-27 11:22:32.0\"}},{\"User\":{\"id\":1492936169722,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-04-23 16:29:29.0\"}},{\"User\":{\"id\":1493480142628,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-04-29 23:35:42.0\"}},{\"User\":{\"id\":1493747512860,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-05-03 01:51:52.0\"}},{\"User\":{\"id\":1493747777770,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-05-03 01:56:17.0\"}},{\"User\":{\"id\":1493748594003,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-05-03 02:09:54.0\"}},{\"User\":{\"id\":1493748615711,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-05-03 02:10:15.0\"}},{\"User\":{\"id\":1493749090643,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-05-03 02:18:10.0\"}},{\"User\":{\"id\":1493836043151,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-05-04 02:27:23.0\"}},{\"User\":{\"id\":1493883110132,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-05-04 15:31:50.0\"}},{\"User\":{\"id\":1493890214167,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-05-04 17:30:14.0\"}},{\"User\":{\"id\":1493890303473,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-05-04 17:31:43.0\"}},{\"User\":{\"id\":1493890303474,\"sex\":0,\"name\":\"Test Post\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-06-12 23:50:44.0\"}},{\"User\":{\"id\":1493890303475,\"sex\":0,\"name\":\"Test Post\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-06-12 23:51:23.0\"}},{\"User\":{\"id\":1497792972314,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-06-18 21:36:12.0\"}},{\"User\":{\"id\":1497792972315,\"sex\":0,\"name\":\"一二三\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-06-25 18:42:33.0\"}},{\"User\":{\"id\":1499057230629,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-07-03 12:47:10.0\"}},{\"User\":{\"id\":1500825221910,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-07-23 23:53:41.0\"}},{\"User\":{\"id\":1502638023483,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-08-13 23:27:03.0\"}},{\"User\":{\"id\":1502639062900,\"sex\":0,\"name\":\"TESLA\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-08-13 23:44:22.0\"}},{\"User\":{\"id\":1502639424119,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-08-13 23:50:24.0\"}},{\"User\":{\"id\":1507220582167,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-10-06 00:23:02.0\"}},{\"User\":{\"id\":1508072071492,\"sex\":0,\"name\":\"赵钱孙李\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-10-15 20:54:31.0\"}},{\"User\":{\"id\":1508072160401,\"sex\":0,\"name\":\"四五六\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-10-15 20:56:00.0\"}},{\"User\":{\"id\":1508072202871,\"sex\":0,\"name\":\"七八九十\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-10-15 20:56:42.0\"}},{\"User\":{\"id\":1510495628760,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-11-12 22:07:08.0\"}},{\"User\":{\"id\":1511407581570,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[82002,82003,82005,82006,82021,82023,82036,82033],\"pictureList\":[],\"date\":\"2017-11-23 11:26:21.0\"}},{\"User\":{\"id\":1511761906715,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-11-27 13:51:46.0\"}},{\"User\":{\"id\":1511965911349,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-11-29 22:31:51.0\"}},{\"User\":{\"id\":1512387063078,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-12-04 19:31:03.0\"}},{\"User\":{\"id\":1512531601485,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[82001],\"pictureList\":[],\"date\":\"2017-12-06 11:40:01.0\"}},{\"User\":{\"id\":1514623064133,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"date\":\"2017-12-30 16:37:44.0\"}},{\"User\":{\"id\":1514625918255,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[82002,93793],\"date\":\"2017-12-30 17:25:18.0\"}},{\"User\":{\"id\":1514626163032,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"date\":\"2017-12-30 17:29:23.0\"}},{\"User\":{\"id\":1514858422969,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[93793,82056],\"date\":\"2018-01-02 10:00:22.0\"}},{\"User\":{\"id\":1515565976140,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"傻\",\"contactIdList\":[82003,82021],\"date\":\"2018-01-10 14:32:56.0\"}},{\"User\":{\"id\":1518218350585,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"date\":\"2018-02-10 07:19:10.0\"}},{\"User\":{\"id\":1519778917280,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"date\":\"2018-02-28 08:48:37.0\"}}],\"code\":200,\"msg\":\"success\"}', '2018-03-04 15:30:26', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520680590422, 82001, 1519526273822, '{\"Privacy\":{\"id\":82001,\"certified\":1,\"phone\":13000082001,\"balance\":28709.2},\"code\":200,\"msg\":\"success\"}', '2018-03-10 11:16:30', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520681233526, 82001, 1519526273822, '{\"Privacy\":{\"id\":82001,\"certified\":1,\"phone\":13000082001,\"balance\":28809.35},\"code\":200,\"msg\":\"success\"}', '2018-03-10 11:27:13', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520681278572, 82001, 1519526273822, '{\"Privacy\":{\"id\":82001,\"certified\":1,\"phone\":13000082001,\"balance\":28809.35,\"test\":\"gda\"},\"code\":200,\"msg\":\"success\"}', '2018-03-10 11:27:58', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520681315261, 82001, 1519526273822, '{\"Privacy\":{\"id\":82001,\"certified\":1,\"phone\":13000082001,\"balance\":28809.35},\"code\":200,\"msg\":\"success\"}', '2018-03-10 11:28:35', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520681361520, 82001, 1519526273822, '{\"Privacy\":{\"id\":82001,\"certified\":1,\"phone\":13000082001,\"balance\":28809.35,\"test\":\"sfgr\"},\"code\":200,\"msg\":\"success\"}', '2018-03-10 11:29:21', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520681493656, 82001, 1519526273822, '{\"Privacy\":{\"id\":82001,\"certified\":1,\"phone\":13000082001,\"balance\":28809.35},\"code\":200,\"msg\":\"success\"}', '2018-03-10 11:31:33', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520681641244, 82001, 1519526273822, '{\"Privacy\":{\"id\":82001,\"certified\":1,\"phone\":13000082001,\"balance\":28809},\"code\":200,\"msg\":\"success\"}', '2018-03-10 11:34:01', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520681770042, 82001, 1519526273822, '{\"Privacy\":{\"id\":82001,\"certified\":1,\"phone\":13000082001,\"balance\":28808.5},\"code\":200,\"msg\":\"success\"}', '2018-03-10 11:36:10', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520682056396, 82001, 1520680656479, '{\"User[]\":[{\"id\":38710,\"sex\":0,\"name\":\"TommyLemon\",\"tag\":\"Android&Java\",\"head\":\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"contactIdList\":[82003,82005,90814,82004,82009,82002,82044,93793,70793],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":70793,\"sex\":0,\"name\":\"Strong\",\"tag\":\"djdj\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\",\"contactIdList\":[38710,82002],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/788c0a7e11a\",\"https://camo.githubusercontent.com/f513f67\"],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":82001,\"sex\":0,\"name\":\"测试改名2\",\"tag\":\"APIJSON User\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\",\"contactIdList\":[82025,70793,82034,93793,82021,82033,93794],\"pictureList\":[\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":82004,\"sex\":0,\"name\":\"Tommy\",\"tag\":\"fasef\",\"head\":\"http://static.oschina.net/uploads/user/1200/2400261_50.png?t=1439638750000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":82009,\"sex\":0,\"name\":\"God\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":82012,\"sex\":0,\"name\":\"Steve\",\"tag\":\"FEWE\",\"head\":\"http://static.oschina.net/uploads/user/1/3064_50.jpg?t=1449566001000\",\"contactIdList\":[82004,82002,93793],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":82020,\"sex\":0,\"name\":\"ORANGE\",\"head\":\"http://static.oschina.net/uploads/user/48/96289_50.jpg?t=1452751699000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":82022,\"sex\":0,\"name\":\"Internet\",\"head\":\"http://static.oschina.net/uploads/user/1332/2664107_50.jpg?t=1457405500000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":82023,\"sex\":0,\"name\":\"No1\",\"head\":\"http://static.oschina.net/uploads/user/1385/2770216_50.jpg?t=1464405516000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":82024,\"sex\":0,\"name\":\"Lemon\",\"head\":\"http://static.oschina.net/uploads/user/427/855532_50.jpg?t=1435030876000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":82026,\"sex\":0,\"name\":\"iOS\",\"head\":\"http://static.oschina.net/uploads/user/1200/2400261_50.png?t=1439638750000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":82027,\"sex\":0,\"name\":\"Yong\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":82029,\"sex\":0,\"name\":\"GASG\",\"head\":\"http://common.cnblogs.com/images/wechat.png\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":82031,\"sex\":0,\"name\":\"Lemon\",\"head\":\"http://static.oschina.net/uploads/user/48/96331_50.jpg\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":82032,\"sex\":0,\"name\":\"Stack\",\"tag\":\"fasdg\",\"head\":\"http://static.oschina.net/uploads/user/1385/2770216_50.jpg?t=1464405516000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":82036,\"sex\":0,\"name\":\"SAG\",\"head\":\"http://static.oschina.net/uploads/user/1332/2664107_50.jpg?t=1457405500000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":82037,\"sex\":0,\"name\":\"Test\",\"head\":\"http://static.oschina.net/uploads/user/1200/2400261_50.png?t=1439638750000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":82038,\"sex\":0,\"name\":\"Battle\",\"head\":\"http://static.oschina.net/uploads/user/48/96289_50.jpg?t=1452751699000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":82041,\"sex\":0,\"name\":\"Holo\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[38710,82001],\"pictureList\":[],\"date\":\"2017-03-04 17:59:34.0\"},{\"id\":82043,\"sex\":0,\"name\":\"Holiday\",\"head\":\"http://static.oschina.net/uploads/user/998/1997902_50.jpg?t=1407806577000\",\"contactIdList\":[70793,82006],\"pictureList\":[],\"date\":\"2017-03-04 18:05:04.0\"},{\"id\":82045,\"sex\":0,\"name\":\"Green\",\"head\":\"http://common.cnblogs.com/images/wechat.png\",\"contactIdList\":[82001,82002,82003,1485246481130],\"pictureList\":[],\"date\":\"2017-03-04 18:22:39.0\"},{\"id\":82046,\"sex\":0,\"name\":\"Team\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[38710,82002,1485246481130],\"pictureList\":[],\"date\":\"2017-03-04 23:11:17.0\"},{\"id\":82047,\"sex\":0,\"name\":\"Tesla\",\"head\":\"http://common.cnblogs.com/images/wechat.png\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-05 00:02:05.0\"},{\"id\":82048,\"sex\":0,\"name\":\"Moto\",\"head\":\"http://static.oschina.net/uploads/user/48/96289_50.jpg?t=1452751699000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-05 00:04:02.0\"},{\"id\":82049,\"sex\":0,\"name\":\"ITMan\",\"head\":\"http://static.oschina.net/uploads/user/629/1258821_50.jpg?t=1378063141000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-05 17:51:51.0\"},{\"id\":82050,\"sex\":0,\"name\":\"Parl\",\"head\":\"http://static.oschina.net/uploads/user/998/1997902_50.jpg?t=1407806577000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-05 17:52:52.0\"},{\"id\":82051,\"sex\":0,\"name\":\"Girl\",\"head\":\"http://static.oschina.net/uploads/user/1332/2664107_50.jpg?t=1457405500000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-05 17:53:37.0\"},{\"id\":82052,\"sex\":0,\"name\":\"Unbrella\",\"head\":\"http://static.oschina.net/uploads/user/1385/2770216_50.jpg?t=1464405516000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-05 17:57:54.0\"},{\"id\":82053,\"sex\":0,\"name\":\"Alice\",\"head\":\"http://common.cnblogs.com/images/wechat.png\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-05 23:25:42.0\"},{\"id\":82054,\"sex\":0,\"name\":\"Harvey\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-06 20:29:03.0\"},{\"id\":82057,\"sex\":0,\"name\":\"NullPointerExeption\",\"head\":\"http://static.oschina.net/uploads/user/1385/2770216_50.jpg?t=1464405516000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-12 14:01:23.0\"},{\"id\":82058,\"sex\":0,\"name\":\"StupidBird\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[82001,82002],\"pictureList\":[],\"date\":\"2017-03-12 19:23:04.0\"},{\"id\":90814,\"sex\":0,\"name\":\"007\",\"head\":\"http://static.oschina.net/uploads/user/51/102723_50.jpg?t=1449212504000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":93793,\"sex\":0,\"name\":\"Mike\",\"tag\":\"GES\",\"head\":\"http://static.oschina.net/uploads/user/48/96331_50.jpg\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":93794,\"sex\":0,\"name\":\"Lemon\",\"head\":\"http://static.oschina.net/uploads/user/48/97721_50.jpg?t=1451544779000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":1490109845208,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-21 23:24:05.0\"},{\"id\":1490427139175,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[38710,70793],\"pictureList\":[],\"date\":\"2017-03-25 15:32:19.0\"},{\"id\":1490427577823,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-25 15:39:37.0\"},{\"id\":1490584952968,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-03-27 11:22:32.0\"},{\"id\":1492936169722,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-04-23 16:29:29.0\"},{\"id\":1493480142628,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-04-29 23:35:42.0\"},{\"id\":1493747512860,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-05-03 01:51:52.0\"},{\"id\":1493747777770,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-05-03 01:56:17.0\"},{\"id\":1493748594003,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-05-03 02:09:54.0\"},{\"id\":1493748615711,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-05-03 02:10:15.0\"},{\"id\":1493749090643,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-05-03 02:18:10.0\"},{\"id\":1493836043151,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-05-04 02:27:23.0\"},{\"id\":1493883110132,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-05-04 15:31:50.0\"},{\"id\":1493890214167,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-05-04 17:30:14.0\"},{\"id\":1493890303473,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-05-04 17:31:43.0\"},{\"id\":1493890303474,\"sex\":0,\"name\":\"Test Post\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-06-12 23:50:44.0\"},{\"id\":1493890303475,\"sex\":0,\"name\":\"Test Post\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-06-12 23:51:23.0\"},{\"id\":1497792972314,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-06-18 21:36:12.0\"},{\"id\":1497792972315,\"sex\":0,\"name\":\"一二三\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-06-25 18:42:33.0\"},{\"id\":1499057230629,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-07-03 12:47:10.0\"},{\"id\":1500825221910,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-07-23 23:53:41.0\"},{\"id\":1502638023483,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-08-13 23:27:03.0\"},{\"id\":1502639062900,\"sex\":0,\"name\":\"TESLA\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-08-13 23:44:22.0\"},{\"id\":1502639424119,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-08-13 23:50:24.0\"},{\"id\":1507220582167,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-10-06 00:23:02.0\"},{\"id\":1508072071492,\"sex\":0,\"name\":\"赵钱孙李\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-10-15 20:54:31.0\"},{\"id\":1508072160401,\"sex\":0,\"name\":\"四五六\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-10-15 20:56:00.0\"},{\"id\":1508072202871,\"sex\":0,\"name\":\"七八九十\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-10-15 20:56:42.0\"},{\"id\":1510495628760,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-11-12 22:07:08.0\"},{\"id\":1511407581570,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[82002,82003,82005,82006,82021,82023,82036,82033],\"pictureList\":[],\"date\":\"2017-11-23 11:26:21.0\"},{\"id\":1511761906715,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-11-27 13:51:46.0\"},{\"id\":1511965911349,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-11-29 22:31:51.0\"},{\"id\":1512387063078,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[],\"pictureList\":[],\"date\":\"2017-12-04 19:31:03.0\"},{\"id\":1512531601485,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[82001],\"pictureList\":[],\"date\":\"2017-12-06 11:40:01.0\"},{\"id\":1514623064133,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"date\":\"2017-12-30 16:37:44.0\"},{\"id\":1514625918255,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[82002,93793],\"date\":\"2017-12-30 17:25:18.0\"},{\"id\":1514626163032,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"date\":\"2017-12-30 17:29:23.0\"},{\"id\":1514858422969,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[93793,82056],\"date\":\"2018-01-02 10:00:22.0\"},{\"id\":1515565976140,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"傻\",\"contactIdList\":[82003,82021],\"date\":\"2018-01-10 14:32:56.0\"},{\"id\":1518218350585,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"date\":\"2018-02-10 07:19:10.0\"},{\"id\":1519778917280,\"sex\":0,\"name\":\"APIJSONUser\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"date\":\"2018-02-28 08:48:37.0\"}],\"code\":200,\"msg\":\"success\"}', '2018-03-10 11:40:56', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520682589957, 82001, 1520682468690, '{\"Moment\":{\"id\":1520086403692,\"userId\":82001,\"date\":\"2018-03-03 22:13:23.0\",\"content\":\"测试新增动态\",\"praiseUserIdList\":[],\"pictureList\":[\"http://static.oschina.net/uploads/user/48/96331_50.jpg\"]},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\"},\"code\":200,\"msg\":\"success\"}', '2018-03-10 11:49:49', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1520682742215, 82001, 1519526273822, '{\"Privacy\":{\"id\":82001,\"certified\":1,\"phone\":13000082001,\"balance\":28808},\"code\":200,\"msg\":\"success\"}', '2018-03-10 11:52:22', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1532879615717, 82001, 1521907333048, '{\"User-id[]\":[82002,82003,82005,82041,82045,82058,1512531601485,1528254173621],\"Moment[]\":[{\"id\":32,\"userId\":82002,\"date\":\"2017-02-08 16:06:11.0\",\"praiseUserIdList\":[38710,82002,82001],\"pictureList\":[\"https://camo.githubusercontent.com/f513fa631bd780dc0ec3cf2663777e356dc3664f/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343733323232332d3337333933303233322e6a7067\",\"https://camo.githubusercontent.com/5f5c4e0c4dc539c34e8eae8ac0cbc6dccdfee5d3/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343533333831362d323032373434343231382e6a7067\",\"http://static.oschina.net/uploads/img/201604/22172508_mpwj.jpg\"]},{\"id\":371,\"userId\":82002,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-371\",\"praiseUserIdList\":[90814,93793,82003,82005,82006,82040,82002,82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067\",\"http://static.oschina.net/uploads/img/201604/22172507_aMmH.jpg\",\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\"]},{\"id\":1508053762227,\"userId\":82003,\"date\":\"2017-10-15 15:49:22.0\",\"content\":\"我也试试\",\"praiseUserIdList\":[1515565976140,82001],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"]},{\"id\":1508072491570,\"userId\":82002,\"date\":\"2017-10-15 21:01:31.0\",\"content\":\"有点冷~\",\"praiseUserIdList\":[82001,82002],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"]},{\"id\":1508073178489,\"userId\":82045,\"date\":\"2017-10-15 21:12:58.0\",\"content\":\"发动态\",\"praiseUserIdList\":[82001],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"]},{\"id\":1514017444961,\"userId\":82002,\"date\":\"2017-12-23 16:24:04.0\",\"content\":\"123479589679\",\"praiseUserIdList\":[82002,1520242280259,82001,70793,1524042900591,1528264711016],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"]},{\"id\":1531062713966,\"userId\":82002,\"date\":\"2018-07-08 23:11:53.0\",\"content\":\"云南好美啊( ◞˟૩˟)◞\",\"praiseUserIdList\":[82001,82005,38710,70793,93793,82003,1531969715979],\"pictureList\":[\"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1531072366455&di=c0d4b15b2c4b70aad49e6ae747f60742&imgtype=0&src=http%3A%2F%2Fpic1.win4000.com%2Fwallpaper%2F3%2F57a2a41f57d09.jpg\",\"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1531072499167&di=5b5621d117edbc5d344a03ba0a6b580b&imgtype=0&src=http%3A%2F%2Fi0.szhomeimg.com%2FUploadFiles%2FBBS%2F2006%2F08%2F05%2F24752199_79122.91.jpg\"]}],\"code\":200,\"msg\":\"success\"}', '2018-07-29 15:53:35', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1532879625816, 82001, 1521907333047, '{\"[]\":[{\"Moment\":{\"id\":301,\"userId\":93793,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-301\",\"praiseUserIdList\":[38710,93793,82003,82005,82040,82055,82002],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\"]},\"Comment\":{\"id\":45,\"momentId\":301,\"content\":\"This is a Content...-45\"},\"join\":\"&/User/id@,</Comment/momentId@\"},{\"Moment\":{\"id\":58,\"userId\":90814,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-435\",\"praiseUserIdList\":[38710,82003,82005,93793,82006,82044,82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172507_aMmH.jpg\"]},\"Comment\":{\"id\":13,\"momentId\":58,\"content\":\"This is a Content...-13\"},\"join\":\"&/User/id@,</Comment/momentId@\"},{\"Moment\":{\"id\":371,\"userId\":82002,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-371\",\"praiseUserIdList\":[90814,93793,82003,82005,82006,82040,82002,82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067\",\"http://static.oschina.net/uploads/img/201604/22172507_aMmH.jpg\",\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\"]},\"User\":{\"id\":82002,\"name\":\"Happy~\",\"head\":\"http://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000\"},\"Comment\":{\"id\":68,\"momentId\":371,\"content\":\"This is a Content...-68\"},\"join\":\"&/User/id@,</Comment/momentId@\"},{\"Moment\":{\"id\":170,\"userId\":70793,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-73\",\"praiseUserIdList\":[82044,82002,82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172508_mpwj.jpg\"]},\"User\":{\"id\":70793,\"name\":\"Strong\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\"},\"Comment\":{\"id\":44,\"momentId\":170,\"content\":\"This is a Content...-44\"},\"join\":\"&/User/id@,</Comment/momentId@\"},{\"Moment\":{\"id\":470,\"userId\":38710,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-470\",\"praiseUserIdList\":[82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172507_Pz9Y.png\"]},\"User\":{\"id\":38710,\"name\":\"TommyLemon\",\"head\":\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\"},\"Comment\":{\"id\":4,\"momentId\":470,\"content\":\"This is a Content...-4\"},\"join\":\"&/User/id@,</Comment/momentId@\"},{\"Moment\":{\"id\":12,\"userId\":70793,\"date\":\"2017-02-08 16:06:11.0\",\"content\":\"1111534034\",\"praiseUserIdList\":[70793,93793,82044,82040,82055,90814,38710,82002,82006,1508072105320,82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/788c0a7e11a4f5aadef3c886f028c79b4808613a/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343932353935372d313732303737333630382e6a7067\",\"http://static.oschina.net/uploads/img/201604/22172507_Pz9Y.png\",\"https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067\",\"https://camo.githubusercontent.com/f513fa631bd780dc0ec3cf2663777e356dc3664f/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343733323232332d3337333933303233322e6a7067\",\"https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067\",\"https://camo.githubusercontent.com/f513fa631bd780dc0ec3cf2663777e356dc3664f/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343733323232332d3337333933303233322e6a7067\"]},\"User\":{\"id\":70793,\"name\":\"Strong\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\"},\"Comment\":{\"id\":162,\"momentId\":12,\"content\":\"This is a Content...-162\"},\"join\":\"&/User/id@,</Comment/momentId@\"},{\"Moment\":{\"id\":15,\"userId\":70793,\"date\":\"2017-02-08 16:06:11.0\",\"content\":\"APIJSON is a JSON Transmission Structure Protocol…\",\"praiseUserIdList\":[82055,82002,38710],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"]},\"User\":{\"id\":70793,\"name\":\"Strong\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\"},\"Comment\":{\"id\":176,\"momentId\":15,\"content\":\"thank you\"},\"join\":\"&/User/id@,</Comment/momentId@\"},{\"Moment\":{\"id\":543,\"userId\":93793,\"date\":\"2017-02-08 16:06:11.0\",\"praiseUserIdList\":[82001],\"pictureList\":[\"https://camo.githubusercontent.com/5f5c4e0c4dc539c34e8eae8ac0cbc6dccdfee5d3/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343533333831362d323032373434343231382e6a7067\",\"https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067\",\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\"]},\"Comment\":{\"id\":1490777905437,\"momentId\":543,\"content\":\"rr\"},\"join\":\"&/User/id@,</Comment/momentId@\"},{\"Moment\":{\"id\":32,\"userId\":82002,\"date\":\"2017-02-08 16:06:11.0\",\"praiseUserIdList\":[38710,82002,82001],\"pictureList\":[\"https://camo.githubusercontent.com/f513fa631bd780dc0ec3cf2663777e356dc3664f/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343733323232332d3337333933303233322e6a7067\",\"https://camo.githubusercontent.com/5f5c4e0c4dc539c34e8eae8ac0cbc6dccdfee5d3/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343533333831362d323032373434343231382e6a7067\",\"http://static.oschina.net/uploads/img/201604/22172508_mpwj.jpg\"]},\"User\":{\"id\":82002,\"name\":\"Happy~\",\"head\":\"http://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000\"},\"Comment\":{\"id\":1512035117021,\"momentId\":32,\"content\":\"图片看不了啊\"},\"join\":\"&/User/id@,</Comment/momentId@\"},{\"Moment\":{\"id\":551,\"userId\":70793,\"date\":\"2017-02-08 16:06:11.0\",\"content\":\"test\",\"praiseUserIdList\":[82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172507_Pz9Y.png\"]},\"User\":{\"id\":70793,\"name\":\"Strong\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\"},\"Comment\":{\"id\":1490864039264,\"momentId\":551,\"content\":\"Wonderful!\"},\"join\":\"&/User/id@,</Comment/momentId@\"}],\"code\":200,\"msg\":\"success\"}', '2018-07-29 15:53:45', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1533140211536, 82001, 1521907303540, '{\"User[]\":[{\"id\":38710,\"sex\":0,\"name\":\"TommyLemon\",\"tag\":\"Android&Java\",\"head\":\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"contactIdList\":[82003,82005,90814,82004,82009,82002,82044,93793,70793],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":70793,\"sex\":0,\"name\":\"Strong\",\"tag\":\"djdj\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\",\"contactIdList\":[38710,82002],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/788c0a7e11a\",\"https://camo.githubusercontent.com/f513f67\"],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":82001,\"sex\":0,\"name\":\"测试改名\",\"tag\":\"APIJSON User\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\",\"contactIdList\":[1520242280259,82030,82025,82003,93793,82002,1531969715979,82006,82005],\"pictureList\":[\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"}],\"code\":200,\"msg\":\"success\"}', '2018-08-01 16:16:51', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1533140331684, 82001, 1521905895591, '{\"Moment\":{\"code\":200,\"msg\":\"success\",\"count\":11},\"code\":200,\"msg\":\"success\"}', '2018-08-01 16:18:51', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1533140553624, 82001, 1521903828410, '{\"User\":{\"code\":200,\"msg\":\"success\",\"count\":70},\"code\":200,\"msg\":\"success\"}', '2018-08-01 16:22:33', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1533140565380, 82001, 1511796208670, '{\"Verify\":{\"code\":200,\"msg\":\"success\",\"count\":1},\"code\":200,\"msg\":\"success\"}', '2018-08-01 16:22:45', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1533140569777, 82001, 1511796155277, '{\"Verify\":{\"id\":1533140566615,\"type\":0,\"phone\":13000082001,\"verify\":10867,\"date\":\"2018-08-02 00:22:46.0\"},\"tag\":\"Verify\",\"code\":200,\"msg\":\"success\"}', '2018-08-01 16:22:49', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1533140576601, 82001, 1511796155277, '{\"Verify\":{\"id\":1533140571205,\"type\":0,\"phone\":13000082001,\"verify\":2383,\"date\":\"2018-08-02 00:22:51.0\"},\"tag\":\"Verify\",\"code\":200,\"msg\":\"success\"}', '2018-08-01 16:22:56', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1533140600338, 82001, 1511967853340, '{\"[]\":[{\"Moment\":{\"id\":301,\"userId\":93793,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-301\",\"praiseUserIdList\":[38710,93793,82003,82005,82040,82055,82002],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\"]},\"User\":{\"id\":93793,\"name\":\"Mike\",\"head\":\"http://static.oschina.net/uploads/user/48/96331_50.jpg\"},\"User[]\":[{\"id\":38710,\"name\":\"TommyLemon\"},{\"id\":82002,\"name\":\"Happy~\"},{\"id\":82003,\"name\":\"Wechat\"},{\"id\":82005,\"name\":\"Jan\"},{\"id\":82040,\"name\":\"Dream\"},{\"id\":82055,\"name\":\"Solid\"},{\"id\":93793,\"name\":\"Mike\"}],\"[]\":[{\"Comment\":{\"id\":45,\"toId\":0,\"userId\":93793,\"momentId\":301,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-45\"},\"User\":{\"id\":93793,\"name\":\"Mike\"}},{\"Comment\":{\"id\":51,\"toId\":45,\"userId\":82003,\"momentId\":301,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-51\"},\"User\":{\"id\":82003,\"name\":\"Wechat\"}},{\"Comment\":{\"id\":76,\"toId\":45,\"userId\":93793,\"momentId\":301,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-76\"},\"User\":{\"id\":93793,\"name\":\"Mike\"}},{\"Comment\":{\"id\":120,\"toId\":0,\"userId\":93793,\"momentId\":301,\"date\":\"2017-03-02 13:56:06.0\",\"content\":\"This is a Content...-110\"},\"User\":{\"id\":93793,\"name\":\"Mike\"}},{\"Comment\":{\"id\":124,\"toId\":0,\"userId\":82001,\"momentId\":301,\"date\":\"2017-03-02 13:56:06.0\",\"content\":\"This is a Content...-114\"},\"User\":{\"id\":82001,\"name\":\"测试改名\"}},{\"Comment\":{\"id\":1490781009548,\"toId\":51,\"userId\":82001,\"momentId\":301,\"date\":\"2017-03-29 17:50:09.0\",\"content\":\"3\"},\"User\":{\"id\":82001,\"name\":\"测试改名\"}}]},{\"Moment\":{\"id\":58,\"userId\":90814,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-435\",\"praiseUserIdList\":[38710,82003,82005,93793,82006,82044,82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172507_aMmH.jpg\"]},\"User\":{\"id\":90814,\"name\":\"007\",\"head\":\"http://static.oschina.net/uploads/user/51/102723_50.jpg?t=1449212504000\"},\"User[]\":[{\"id\":38710,\"name\":\"TommyLemon\"},{\"id\":82001,\"name\":\"测试改名\"},{\"id\":82003,\"name\":\"Wechat\"},{\"id\":82005,\"name\":\"Jan\"},{\"id\":82006,\"name\":\"Meria\"},{\"id\":82044,\"name\":\"Love\"},{\"id\":93793,\"name\":\"Mike\"}],\"[]\":[{\"Comment\":{\"id\":13,\"toId\":0,\"userId\":82005,\"momentId\":58,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-13\"},\"User\":{\"id\":82005,\"name\":\"Jan\"}},{\"Comment\":{\"id\":77,\"toId\":13,\"userId\":93793,\"momentId\":58,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-77\"},\"User\":{\"id\":93793,\"name\":\"Mike\"}},{\"Comment\":{\"id\":97,\"toId\":13,\"userId\":82006,\"momentId\":58,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-97\"},\"User\":{\"id\":82006,\"name\":\"Meria\"}},{\"Comment\":{\"id\":167,\"userId\":82001,\"momentId\":58,\"date\":\"2017-03-25 19:48:41.0\",\"content\":\"Nice!\"},\"User\":{\"id\":82001,\"name\":\"测试改名\"}},{\"Comment\":{\"id\":173,\"userId\":38710,\"momentId\":58,\"date\":\"2017-03-25 20:25:13.0\",\"content\":\"Good\"},\"User\":{\"id\":38710,\"name\":\"TommyLemon\"}},{\"Comment\":{\"id\":188,\"toId\":97,\"userId\":82001,\"momentId\":58,\"date\":\"2017-03-26 15:21:32.0\",\"content\":\"1646\"},\"User\":{\"id\":82001,\"name\":\"测试改名\"}}]},{\"Moment\":{\"id\":371,\"userId\":82002,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-371\",\"praiseUserIdList\":[90814,93793,82003,82005,82006,82040,82002,82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067\",\"http://static.oschina.net/uploads/img/201604/22172507_aMmH.jpg\",\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\"]},\"User\":{\"id\":82002,\"name\":\"Happy~\",\"head\":\"http://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000\"},\"User[]\":[{\"id\":82001,\"name\":\"测试改名\"},{\"id\":82002,\"name\":\"Happy~\"},{\"id\":82003,\"name\":\"Wechat\"},{\"id\":82005,\"name\":\"Jan\"},{\"id\":82006,\"name\":\"Meria\"},{\"id\":82040,\"name\":\"Dream\"},{\"id\":90814,\"name\":\"007\"},{\"id\":93793,\"name\":\"Mike\"}],\"[]\":[{\"Comment\":{\"id\":68,\"toId\":0,\"userId\":82005,\"momentId\":371,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-68\"},\"User\":{\"id\":82005,\"name\":\"Jan\"}},{\"Comment\":{\"id\":157,\"userId\":93793,\"momentId\":371,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-157\"},\"User\":{\"id\":93793,\"name\":\"Mike\"}},{\"Comment\":{\"id\":110,\"toId\":0,\"userId\":93793,\"momentId\":371,\"date\":\"2017-02-01 19:23:24.0\",\"content\":\"This is a Content...-110\"},\"User\":{\"id\":93793,\"name\":\"Mike\"}},{\"Comment\":{\"id\":114,\"toId\":0,\"userId\":82001,\"momentId\":371,\"date\":\"2017-03-02 13:56:06.0\",\"content\":\"This is a Content...-114\"},\"User\":{\"id\":82001,\"name\":\"测试改名\"}},{\"Comment\":{\"id\":115,\"toId\":0,\"userId\":38710,\"momentId\":371,\"date\":\"2017-03-02 13:56:06.0\",\"content\":\"This is a Content...-115\"},\"User\":{\"id\":38710,\"name\":\"TommyLemon\"}},{\"Comment\":{\"id\":116,\"toId\":0,\"userId\":70793,\"momentId\":371,\"date\":\"2017-03-02 13:56:06.0\",\"content\":\"This is a Content...-116\"},\"User\":{\"id\":70793,\"name\":\"Strong\"}}]},{\"Moment\":{\"id\":170,\"userId\":70793,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-73\",\"praiseUserIdList\":[82044,82002,82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172508_mpwj.jpg\"]},\"User\":{\"id\":70793,\"name\":\"Strong\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\"},\"User[]\":[{\"id\":82001,\"name\":\"测试改名\"},{\"id\":82002,\"name\":\"Happy~\"},{\"id\":82044,\"name\":\"Love\"}],\"[]\":[{\"Comment\":{\"id\":44,\"toId\":0,\"userId\":82003,\"momentId\":170,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-44\"},\"User\":{\"id\":82003,\"name\":\"Wechat\"}},{\"Comment\":{\"id\":54,\"toId\":0,\"userId\":82004,\"momentId\":170,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-54\"},\"User\":{\"id\":82004,\"name\":\"Tommy\"}},{\"Comment\":{\"id\":99,\"toId\":44,\"userId\":70793,\"momentId\":170,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-99\"},\"User\":{\"id\":70793,\"name\":\"Strong\"}},{\"Comment\":{\"id\":206,\"toId\":54,\"userId\":82001,\"momentId\":170,\"date\":\"2017-03-29 11:04:23.0\",\"content\":\"ejej\"},\"User\":{\"id\":82001,\"name\":\"测试改名\"}},{\"Comment\":{\"id\":1490780759866,\"toId\":99,\"userId\":82001,\"momentId\":170,\"date\":\"2017-03-29 17:45:59.0\",\"content\":\"99\"},\"User\":{\"id\":82001,\"name\":\"测试改名\"}},{\"Comment\":{\"id\":1490863661426,\"toId\":1490780759866,\"userId\":70793,\"momentId\":170,\"date\":\"2017-03-30 16:47:41.0\",\"content\":\"66\"},\"User\":{\"id\":70793,\"name\":\"Strong\"}}]},{\"Moment\":{\"id\":470,\"userId\":38710,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-470\",\"praiseUserIdList\":[82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172507_Pz9Y.png\"]},\"User\":{\"id\":38710,\"name\":\"TommyLemon\",\"head\":\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\"},\"User[]\":[{\"id\":82001,\"name\":\"测试改名\"}],\"[]\":[{\"Comment\":{\"id\":4,\"toId\":0,\"userId\":38710,\"momentId\":470,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-4\"},\"User\":{\"id\":38710,\"name\":\"TommyLemon\"}},{\"Comment\":{\"id\":22,\"toId\":221,\"userId\":82001,\"momentId\":470,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"测试修改评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\"}},{\"Comment\":{\"id\":47,\"toId\":4,\"userId\":70793,\"momentId\":470,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-47\"},\"User\":{\"id\":70793,\"name\":\"Strong\"}},{\"Comment\":{\"id\":1490863507114,\"toId\":4,\"userId\":82003,\"momentId\":470,\"date\":\"2017-03-30 16:45:07.0\",\"content\":\"yes\"},\"User\":{\"id\":82003,\"name\":\"Wechat\"}},{\"Comment\":{\"id\":1490863903900,\"toId\":0,\"userId\":82006,\"momentId\":470,\"date\":\"2017-03-30 16:51:43.0\",\"content\":\"SOGA\"},\"User\":{\"id\":82006,\"name\":\"Meria\"}},{\"Comment\":{\"id\":1491740899179,\"toId\":0,\"userId\":82001,\"momentId\":470,\"date\":\"2017-04-09 20:28:19.0\",\"content\":\"www\"},\"User\":{\"id\":82001,\"name\":\"测试改名\"}}]}],\"code\":200,\"msg\":\"success\"}', '2018-08-01 16:23:20', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1533140607459, 82001, 1511964176689, '{\"[]\":[{\"Comment\":{\"id\":176,\"toId\":166,\"userId\":38710,\"momentId\":15,\"date\":\"2017-03-25 20:28:03.0\",\"content\":\"thank you\"},\"User\":{\"id\":38710,\"name\":\"TommyLemon\",\"head\":\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\"}},{\"Comment\":{\"id\":1490863469638,\"toId\":0,\"userId\":82002,\"momentId\":15,\"date\":\"2017-03-30 16:44:29.0\",\"content\":\"Just do it\"},\"User\":{\"id\":82002,\"name\":\"Happy~\",\"head\":\"http://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000\"}},{\"Comment\":{\"id\":1490875660259,\"toId\":1490863469638,\"userId\":82055,\"momentId\":15,\"date\":\"2017-03-30 20:07:40.0\",\"content\":\"I prove wht you said(??????)\"},\"User\":{\"id\":82055,\"name\":\"Solid\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1508227456407,\"toId\":0,\"userId\":82001,\"momentId\":15,\"date\":\"2017-10-17 16:04:16.0\",\"content\":\"hsh\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1509346606036,\"toId\":0,\"userId\":82001,\"momentId\":15,\"date\":\"2017-10-30 14:56:46.0\",\"content\":\"测\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1520332892486,\"userId\":82001,\"momentId\":15,\"date\":\"2018-03-06 18:41:32.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1525933236313,\"userId\":82001,\"momentId\":15,\"date\":\"2018-05-10 14:20:36.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1525933255901,\"userId\":82001,\"momentId\":15,\"date\":\"2018-05-10 14:20:55.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1527949266037,\"userId\":82001,\"momentId\":15,\"date\":\"2018-06-02 22:21:06.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1528339777338,\"userId\":82001,\"momentId\":15,\"date\":\"2018-06-07 10:49:37.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1528366915282,\"userId\":82001,\"momentId\":15,\"date\":\"2018-06-07 18:21:55.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1528366931410,\"userId\":82001,\"momentId\":15,\"date\":\"2018-06-07 18:22:11.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1528392773597,\"userId\":82001,\"momentId\":15,\"date\":\"2018-06-08 01:32:53.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1529034360708,\"userId\":82001,\"momentId\":15,\"date\":\"2018-06-15 11:46:00.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1529078537044,\"userId\":82001,\"momentId\":15,\"date\":\"2018-06-16 00:02:17.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1529401004622,\"userId\":82001,\"momentId\":15,\"date\":\"2018-06-19 17:36:44.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1529401505690,\"userId\":82001,\"momentId\":15,\"date\":\"2018-06-19 17:45:05.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1529468113356,\"userId\":82001,\"momentId\":15,\"date\":\"2018-06-20 12:15:13.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1529724026842,\"userId\":82001,\"momentId\":15,\"date\":\"2018-06-23 11:20:26.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1529909214303,\"userId\":82001,\"momentId\":15,\"date\":\"2018-06-25 14:46:54.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}}],\"code\":200,\"msg\":\"success\"}', '2018-08-01 16:23:27', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1533140610051, 82001, 1511969630372, '{\"Comment\":{\"code\":200,\"msg\":\"success\",\"id\":1533140601544,\"count\":1},\"code\":200,\"msg\":\"success\"}', '2018-08-01 16:23:30', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1533140615913, 82001, 1521905895591, '{\"Moment\":{\"code\":200,\"msg\":\"success\",\"count\":19},\"code\":200,\"msg\":\"success\"}', '2018-08-01 16:23:35', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1533140617466, 82001, 1521905868719, '{\"Privacy\":{\"id\":82001,\"certified\":1,\"phone\":13000082001,\"balance\":9832.86},\"code\":200,\"msg\":\"success\"}', '2018-08-01 16:23:37', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1533140619001, 82001, 1521905680680, '{\"Moment\":{\"code\":200,\"msg\":\"success\",\"id\":1533140610656,\"count\":1},\"code\":200,\"msg\":\"success\"}', '2018-08-01 16:23:39', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1533140623032, 82001, 1521904756674, '{\"User[]\":[{\"id\":38710,\"sex\":0,\"name\":\"TommyLemon\",\"tag\":\"Android&Java\",\"head\":\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"contactIdList\":[82003,82005,90814,82004,82009,82002,82044,93793,70793],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":70793,\"sex\":0,\"name\":\"Strong\",\"tag\":\"djdj\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\",\"contactIdList\":[38710,82002],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/788c0a7e11a\",\"https://camo.githubusercontent.com/f513f67\"],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":82001,\"sex\":0,\"name\":\"测试改名\",\"tag\":\"APIJSON User\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\",\"contactIdList\":[1520242280259,82030,82025,82003,93793,82002,1531969715979,82006,82005],\"pictureList\":[\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"}],\"code\":200,\"msg\":\"success\"}', '2018-08-01 16:23:43', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1533140626067, 82001, 1521904653622, '{\"User[]\":[{\"id\":70793,\"sex\":0,\"name\":\"Strong\",\"tag\":\"djdj\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\",\"contactIdList\":[38710,82002],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/788c0a7e11a\",\"https://camo.githubusercontent.com/f513f67\"],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":82002,\"sex\":1,\"name\":\"Happy~\",\"tag\":\"iOS\",\"head\":\"http://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000\",\"contactIdList\":[82005,82001,38710],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":82005,\"sex\":1,\"name\":\"Jan\",\"tag\":\"AG\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[82001,38710],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}],\"code\":200,\"msg\":\"success\"}', '2018-08-01 16:23:46', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1533140629710, 82001, 1521903761689, '{\"User\":{\"code\":200,\"msg\":\"success\",\"count\":117},\"code\":200,\"msg\":\"success\"}', '2018-08-01 16:23:49', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1533140633031, 82001, 1521902110680, '{\"[]\":[{\"User\":{\"id\":38710,\"sex\":0,\"name\":\"TommyLemon\",\"tag\":\"Android&Java\",\"head\":\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"contactIdList\":[82003,82005,90814,82004,82009,82002,82044,93793,70793],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":70793,\"sex\":0,\"name\":\"Strong\",\"tag\":\"djdj\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\",\"contactIdList\":[38710,82002],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/788c0a7e11a\",\"https://camo.githubusercontent.com/f513f67\"],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82001,\"sex\":0,\"name\":\"测试改名\",\"tag\":\"APIJSON User\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\",\"contactIdList\":[1520242280259,82030,82025,82003,93793,82002,1531969715979,82006,82005],\"pictureList\":[\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82002,\"sex\":1,\"name\":\"Happy~\",\"tag\":\"iOS\",\"head\":\"http://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000\",\"contactIdList\":[82005,82001,38710],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82003,\"sex\":1,\"name\":\"Wechat\",\"head\":\"http://common.cnblogs.com/images/wechat.png\",\"contactIdList\":[82001,93793],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}}],\"code\":200,\"msg\":\"success\"}', '2018-08-01 16:23:53', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1533140636466, 82001, 1521902033332, '{\"[]\":[{\"User\":{\"id\":38710,\"sex\":0,\"name\":\"TommyLemon\",\"tag\":\"Android&Java\",\"head\":\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"contactIdList\":[82003,82005,90814,82004,82009,82002,82044,93793,70793],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":70793,\"sex\":0,\"name\":\"Strong\",\"tag\":\"djdj\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\",\"contactIdList\":[38710,82002],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/788c0a7e11a\",\"https://camo.githubusercontent.com/f513f67\"],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82001,\"sex\":0,\"name\":\"测试改名\",\"tag\":\"APIJSON User\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\",\"contactIdList\":[1520242280259,82030,82025,82003,93793,82002,1531969715979,82006,82005],\"pictureList\":[\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82002,\"sex\":1,\"name\":\"Happy~\",\"tag\":\"iOS\",\"head\":\"http://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000\",\"contactIdList\":[82005,82001,38710],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82003,\"sex\":1,\"name\":\"Wechat\",\"head\":\"http://common.cnblogs.com/images/wechat.png\",\"contactIdList\":[82001,93793],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}}],\"total\":119,\"code\":200,\"msg\":\"success\"}', '2018-08-01 16:23:56', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1533140640270, 82001, 1521901682846, '{\"[]\":[{\"Moment\":{\"userId\":38710,\"id\":235}},{\"Moment\":{\"userId\":38710,\"id\":470}},{\"Moment\":{\"userId\":38710,\"id\":511}},{\"Moment\":{\"userId\":38710,\"id\":595}},{\"Moment\":{\"userId\":38710,\"id\":704}},{\"Moment\":{\"userId\":38710,\"id\":1491200468898}},{\"Moment\":{\"userId\":38710,\"id\":1493835799335}},{\"Moment\":{\"userId\":38710,\"id\":1512314438990}},{\"Moment\":{\"userId\":38710,\"id\":1513094436910}},{\"Moment\":{\"userId\":38710,\"id\":1533140171134}}],\"code\":200,\"msg\":\"success\"}', '2018-08-01 16:24:00', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1533140662591, 82001, 1511970009072, '{\"Moment\":{\"code\":200,\"msg\":\"success\",\"id\":1533140610716,\"count\":1},\"code\":200,\"msg\":\"success\"}', '2018-08-01 16:24:22', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1533140664191, 82001, 1511969630372, '{\"Comment\":{\"code\":200,\"msg\":\"success\",\"id\":1533140610714,\"count\":1},\"code\":200,\"msg\":\"success\"}', '2018-08-01 16:24:24', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1533140666518, 82001, 1511963677325, '{\"User\":{\"id\":82001,\"sex\":0,\"name\":\"测试改名\",\"tag\":\"APIJSON User\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\",\"contactIdList\":[1520242280259,82030,82025,82003,93793,82002,1531969715979,82006,82005],\"pictureList\":[\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"},\"code\":200,\"msg\":\"success\"}', '2018-08-01 16:24:26', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1533140668867, 82001, 1511689914599, '{\"Privacy\":{\"id\":82001,\"certified\":1,\"phone\":13000082001,\"balance\":9833.01},\"code\":200,\"msg\":\"success\"}', '2018-08-01 16:24:28', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1533140694117, 82001, 1511963990072, '{\"Moment\":{\"id\":15,\"userId\":70793,\"date\":\"2017-02-08 16:06:11.0\",\"content\":\"APIJSON is a JSON Transmission Structure Protocol…\",\"praiseUserIdList\":[82055,82002,38710,82001],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"]},\"User\":{\"id\":70793,\"name\":\"Strong\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\"},\"User[]\":[{\"id\":38710,\"name\":\"TommyLemon\"},{\"id\":82001,\"name\":\"测试改名\"},{\"id\":82002,\"name\":\"Happy~\"},{\"id\":82055,\"name\":\"Solid\"}],\"code\":200,\"msg\":\"success\"}', '2018-08-01 16:24:54', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1533140697885, 82001, 1511963990072, '{\"Moment\":{\"id\":15,\"userId\":70793,\"date\":\"2017-02-08 16:06:11.0\",\"content\":\"APIJSON is a JSON Transmission Structure Protocol…\",\"praiseUserIdList\":[82055,82002,38710],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"]},\"User\":{\"id\":70793,\"name\":\"Strong\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\"},\"User[]\":[{\"id\":38710,\"name\":\"TommyLemon\"},{\"id\":82002,\"name\":\"Happy~\"},{\"id\":82055,\"name\":\"Solid\"}],\"code\":200,\"msg\":\"success\"}', '2018-08-01 16:24:57', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1533396720929, 82001, 1511796155277, '{\"Verify\":{\"id\":1533396718012,\"type\":0,\"phone\":13000082001,\"verify\":4995,\"date\":\"2018-08-04 23:31:58.0\"},\"tag\":\"Verify\",\"code\":200,\"msg\":\"success\"}', '2018-08-04 15:32:00', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1533396731930, 82001, 1521901682846, '{\"[]\":[{\"Moment\":{\"userId\":38710,\"id\":235}},{\"Moment\":{\"userId\":38710,\"id\":470}},{\"Moment\":{\"userId\":38710,\"id\":511}},{\"Moment\":{\"userId\":38710,\"id\":595}},{\"Moment\":{\"userId\":38710,\"id\":704}},{\"Moment\":{\"userId\":38710,\"id\":1491200468898}},{\"Moment\":{\"userId\":38710,\"id\":1493835799335}},{\"Moment\":{\"userId\":38710,\"id\":1512314438990}},{\"Moment\":{\"userId\":38710,\"id\":1513094436910}},{\"Moment\":{\"userId\":38710,\"id\":1533395051809}}],\"code\":200,\"msg\":\"success\"}', '2018-08-04 15:32:11', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1533396739099, 82001, 1511689914599, '{\"Privacy\":{\"id\":82001,\"certified\":1,\"phone\":13000082001,\"balance\":9835.11},\"code\":200,\"msg\":\"success\"}', '2018-08-04 15:32:19', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1533396867840, 82001, 1511964176689, '{\"[]\":[{\"Comment\":{\"id\":176,\"toId\":166,\"userId\":38710,\"momentId\":15,\"date\":\"2017-03-25 20:28:03.0\",\"content\":\"thank you\"},\"User\":{\"id\":38710,\"name\":\"TommyLemon\",\"head\":\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\"}},{\"Comment\":{\"id\":1490863469638,\"toId\":0,\"userId\":82002,\"momentId\":15,\"date\":\"2017-03-30 16:44:29.0\",\"content\":\"Just do it\"},\"User\":{\"id\":82002,\"name\":\"Happy~\",\"head\":\"http://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000\"}},{\"Comment\":{\"id\":1490875660259,\"toId\":1490863469638,\"userId\":82055,\"momentId\":15,\"date\":\"2017-03-30 20:07:40.0\",\"content\":\"I prove wht you said(??????)\"},\"User\":{\"id\":82055,\"name\":\"Solid\",\"head\":\"http://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1508227456407,\"toId\":0,\"userId\":82001,\"momentId\":15,\"date\":\"2017-10-17 16:04:16.0\",\"content\":\"hsh\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1509346606036,\"toId\":0,\"userId\":82001,\"momentId\":15,\"date\":\"2017-10-30 14:56:46.0\",\"content\":\"测\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1525933255901,\"userId\":82001,\"momentId\":15,\"date\":\"2018-05-10 14:20:55.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1527949266037,\"userId\":82001,\"momentId\":15,\"date\":\"2018-06-02 22:21:06.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1528339777338,\"userId\":82001,\"momentId\":15,\"date\":\"2018-06-07 10:49:37.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1528366915282,\"userId\":82001,\"momentId\":15,\"date\":\"2018-06-07 18:21:55.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1528366931410,\"userId\":82001,\"momentId\":15,\"date\":\"2018-06-07 18:22:11.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1528392773597,\"userId\":82001,\"momentId\":15,\"date\":\"2018-06-08 01:32:53.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1529034360708,\"userId\":82001,\"momentId\":15,\"date\":\"2018-06-15 11:46:00.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1529078537044,\"userId\":82001,\"momentId\":15,\"date\":\"2018-06-16 00:02:17.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1529401004622,\"userId\":82001,\"momentId\":15,\"date\":\"2018-06-19 17:36:44.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1529401505690,\"userId\":82001,\"momentId\":15,\"date\":\"2018-06-19 17:45:05.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1529468113356,\"userId\":82001,\"momentId\":15,\"date\":\"2018-06-20 12:15:13.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1529724026842,\"userId\":82001,\"momentId\":15,\"date\":\"2018-06-23 11:20:26.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1529909214303,\"userId\":82001,\"momentId\":15,\"date\":\"2018-06-25 14:46:54.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1530276831779,\"userId\":82001,\"momentId\":15,\"date\":\"2018-06-29 20:53:51.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}},{\"Comment\":{\"id\":1531365764793,\"userId\":82001,\"momentId\":15,\"date\":\"2018-07-12 11:22:44.0\",\"content\":\"测试新增评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\"}}],\"code\":200,\"msg\":\"success\"}', '2018-08-04 15:34:27', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1534152309932, 82001, 1521905895591, '{\"Moment\":{\"code\":200,\"msg\":\"success\",\"count\":9},\"code\":200,\"msg\":\"success\"}', '2018-08-13 09:25:09', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1534152344226, 82001, 1521903828410, '{\"User\":{\"code\":200,\"msg\":\"success\",\"count\":71},\"code\":200,\"msg\":\"success\"}', '2018-08-13 09:25:44', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1534152350031, 82001, 1521903761689, '{\"User\":{\"code\":200,\"msg\":\"success\",\"count\":118},\"code\":200,\"msg\":\"success\"}', '2018-08-13 09:25:50', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1534152388437, 82001, 1521905895591, '{\"Moment\":{\"code\":200,\"msg\":\"success\",\"count\":10},\"code\":200,\"msg\":\"success\"}', '2018-08-13 09:26:28', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1534152406351, 82001, 1521902033332, '{\"[]\":[{\"User\":{\"id\":38710,\"sex\":0,\"name\":\"TommyLemon\",\"tag\":\"Android&Java\",\"head\":\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"contactIdList\":[82003,82005,90814,82004,82009,82002,82044,93793,70793],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":70793,\"sex\":0,\"name\":\"Strong\",\"tag\":\"djdj\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\",\"contactIdList\":[38710,82002],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/788c0a7e11a\",\"https://camo.githubusercontent.com/f513f67\"],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82001,\"sex\":0,\"name\":\"测试改名\",\"tag\":\"APIJSON User\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\",\"contactIdList\":[82030,82025,82003,93793,82006,82002,1520242280259,82005,1531969715979,1532188114543,82024],\"pictureList\":[\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82002,\"sex\":1,\"name\":\"Happy~\",\"tag\":\"iOS\",\"head\":\"http://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000\",\"contactIdList\":[82005,82001,38710],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82003,\"sex\":1,\"name\":\"Wechat\",\"head\":\"http://common.cnblogs.com/images/wechat.png\",\"contactIdList\":[82001,93793],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}}],\"total\":120,\"code\":200,\"msg\":\"success\"}', '2018-08-13 09:26:46', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1534152424378, 82001, 1521901682846, '{\"[]\":[{\"Moment\":{\"userId\":38710,\"id\":235}},{\"Moment\":{\"userId\":38710,\"id\":470}},{\"Moment\":{\"userId\":38710,\"id\":511}},{\"Moment\":{\"userId\":38710,\"id\":595}},{\"Moment\":{\"userId\":38710,\"id\":704}},{\"Moment\":{\"userId\":38710,\"id\":1491200468898}},{\"Moment\":{\"userId\":38710,\"id\":1493835799335}},{\"Moment\":{\"userId\":38710,\"id\":1512314438990}},{\"Moment\":{\"userId\":38710,\"id\":1513094436910}},{\"Moment\":{\"userId\":38710,\"id\":1534152251941}}],\"code\":200,\"msg\":\"success\"}', '2018-08-13 09:27:04', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1534241166066, 82001, 1521901682846, '{\"[]\":[{\"Moment\":{\"userId\":38710,\"id\":235}},{\"Moment\":{\"userId\":38710,\"id\":470}},{\"Moment\":{\"userId\":38710,\"id\":511}},{\"Moment\":{\"userId\":38710,\"id\":595}},{\"Moment\":{\"userId\":38710,\"id\":704}},{\"Moment\":{\"userId\":38710,\"id\":1491200468898}},{\"Moment\":{\"userId\":38710,\"id\":1493835799335}},{\"Moment\":{\"userId\":38710,\"id\":1512314438990}},{\"Moment\":{\"userId\":38710,\"id\":1513094436910}},{\"Moment\":{\"userId\":38710,\"id\":1534241152403}}],\"code\":200,\"msg\":\"success\"}', '2018-08-14 10:06:06', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1534477342518, 82001, 1521907303540, '{\"User[]\":[{\"id\":38710,\"sex\":0,\"name\":\"TommyLemon\",\"tag\":\"Android&Java\",\"head\":\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"contactIdList\":[82003,82005,90814,82004,82009,82002,82044,93793,70793],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":70793,\"sex\":0,\"name\":\"Strong\",\"tag\":\"djdj\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\",\"contactIdList\":[38710,82002],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/788c0a7e11a\",\"https://camo.githubusercontent.com/f513f67\"],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":82001,\"sex\":0,\"name\":\"测试改名\",\"tag\":\"APIJSON User\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\",\"contactIdList\":[82030,82025,82003,93793,82006,82002,1520242280259,82005,1531969715979,82024],\"pictureList\":[\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"}],\"code\":200,\"msg\":\"success\"}', '2018-08-17 03:42:22', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1534776475640, 82001, 1521901610784, '{\"[]\":[{\"Moment\":{\"userId\":38710,\"maxId\":1534776429151}},{\"Moment\":{\"userId\":70793,\"maxId\":551}},{\"Moment\":{\"userId\":82001,\"maxId\":1534776370291}},{\"Moment\":{\"userId\":82002,\"maxId\":1531062713966}},{\"Moment\":{\"userId\":82003,\"maxId\":1508053762227}},{\"Moment\":{\"userId\":82045,\"maxId\":1508073178489}},{\"Moment\":{\"userId\":82056,\"maxId\":1514858533480}},{\"Moment\":{\"userId\":93793,\"maxId\":1516086423441}},{\"Moment\":{\"userId\":1520242280259,\"maxId\":1520242333325}},{\"Moment\":{\"userId\":1523626157302,\"maxId\":1523936332614}}],\"code\":200,\"msg\":\"success\"}', '2018-08-20 14:47:55', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1534780207036, 82001, 1521907333047, '{\"[]\":[{\"Moment\":{\"id\":470,\"userId\":38710,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-470\",\"praiseUserIdList\":[82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172507_Pz9Y.png\"]},\"User\":{\"id\":38710,\"name\":\"TommyLemon\",\"head\":\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\"},\"Comment\":{\"id\":47,\"momentId\":470,\"content\":\"This is a Content...-47\"}},{\"Moment\":{\"id\":470,\"userId\":38710,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-470\",\"praiseUserIdList\":[82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172507_Pz9Y.png\"]},\"User\":{\"id\":38710,\"name\":\"TommyLemon\",\"head\":\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\"},\"Comment\":{\"id\":47,\"momentId\":470,\"content\":\"This is a Content...-47\"}},{\"Moment\":{\"id\":170,\"userId\":70793,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-73\",\"praiseUserIdList\":[82044,82002,82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172508_mpwj.jpg\"]},\"User\":{\"id\":70793,\"name\":\"Strong\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\"},\"Comment\":{\"id\":99,\"momentId\":170,\"content\":\"This is a Content...-99\"}},{\"Moment\":{\"id\":470,\"userId\":38710,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-470\",\"praiseUserIdList\":[82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172507_Pz9Y.png\"]},\"User\":{\"id\":38710,\"name\":\"TommyLemon\",\"head\":\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\"},\"Comment\":{\"id\":47,\"momentId\":470,\"content\":\"This is a Content...-47\"}},{\"Moment\":{\"id\":170,\"userId\":70793,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-73\",\"praiseUserIdList\":[82044,82002,82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172508_mpwj.jpg\"]},\"User\":{\"id\":70793,\"name\":\"Strong\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\"},\"Comment\":{\"id\":99,\"momentId\":170,\"content\":\"This is a Content...-99\"}},{\"Moment\":{\"id\":371,\"userId\":82002,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-371\",\"praiseUserIdList\":[90814,93793,82003,82005,82006,82040,82002,82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067\",\"http://static.oschina.net/uploads/img/201604/22172507_aMmH.jpg\",\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\"]},\"User\":{\"id\":82002,\"name\":\"Happy~\",\"head\":\"http://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000\"},\"Comment\":{\"id\":115,\"momentId\":371,\"content\":\"This is a Content...-115\"}},{\"Moment\":{\"id\":170,\"userId\":70793,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-73\",\"praiseUserIdList\":[82044,82002,82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172508_mpwj.jpg\"]},\"User\":{\"id\":70793,\"name\":\"Strong\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\"},\"Comment\":{\"id\":99,\"momentId\":170,\"content\":\"This is a Content...-99\"}},{\"Moment\":{\"id\":371,\"userId\":82002,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-371\",\"praiseUserIdList\":[90814,93793,82003,82005,82006,82040,82002,82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067\",\"http://static.oschina.net/uploads/img/201604/22172507_aMmH.jpg\",\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\"]},\"User\":{\"id\":82002,\"name\":\"Happy~\",\"head\":\"http://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000\"},\"Comment\":{\"id\":115,\"momentId\":371,\"content\":\"This is a Content...-115\"}},{\"Moment\":{\"id\":371,\"userId\":82002,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-371\",\"praiseUserIdList\":[90814,93793,82003,82005,82006,82040,82002,82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067\",\"http://static.oschina.net/uploads/img/201604/22172507_aMmH.jpg\",\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\"]},\"User\":{\"id\":82002,\"name\":\"Happy~\",\"head\":\"http://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000\"},\"Comment\":{\"id\":115,\"momentId\":371,\"content\":\"This is a Content...-115\"}},{\"Moment\":{\"id\":371,\"userId\":82002,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-371\",\"praiseUserIdList\":[90814,93793,82003,82005,82006,82040,82002,82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067\",\"http://static.oschina.net/uploads/img/201604/22172507_aMmH.jpg\",\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\"]},\"User\":{\"id\":82002,\"name\":\"Happy~\",\"head\":\"http://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000\"},\"Comment\":{\"id\":115,\"momentId\":371,\"content\":\"This is a Content...-115\"}}],\"code\":200,\"msg\":\"success\"}', '2018-08-20 15:50:07', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1536484351109, 82001, 1511963677325, '{\"User\":{\"id\":82001,\"sex\":0,\"name\":\"测试改名\",\"tag\":\"APIJSON User\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\",\"contactIdList\":[82025,82024,82003,93793,82012,82028,82034,82021,82006,82005,82030,82035],\"pictureList\":[\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"},\"code\":200,\"msg\":\"success\"}', '2018-09-09 09:12:31', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1536484428955, 82001, 1511963677325, '{\"User\":{\"id\":82001,\"sex\":0,\"name\":\"测试改名\",\"tag\":\"APIJSON User\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\",\"contactIdList\":[82025,82024,82003,93793,82012,82028,82034,82021,82006,82005,82030,82035],\"pictureList\":[\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"},\"code\":200,\"msg\":\"success\"}', '2018-09-09 09:13:48', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1537025782935, 82001, 1521901746809, '{\"[]\":[{\"User\":{\"name\":\"赵钱孙李\",\"id\":1508072071492}},{\"User\":{\"name\":\"测试改名\",\"id\":82001}},{\"User\":{\"name\":\"梦\",\"id\":1528264711016}},{\"User\":{\"name\":\"宁旭\",\"id\":1532188114543}},{\"User\":{\"name\":\"四五六\",\"id\":1508072160401}},{\"User\":{\"name\":\"哈哈哈\",\"id\":1524042900591}},{\"User\":{\"name\":\"周吴郑王\",\"id\":1508072105320}},{\"User\":{\"name\":\"七八九十\",\"id\":1508072202871}},{\"User\":{\"name\":\"一二三\",\"id\":1499057230629}},{\"User\":{\"name\":\"Yong\",\"id\":82027}}],\"code\":200,\"msg\":\"success\"}', '2018-09-15 15:36:22', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1537025788659, 82001, 1521901682846, '{\"[]\":[{\"Moment\":{\"userId\":38710,\"id\":235}},{\"Moment\":{\"userId\":38710,\"id\":470}},{\"Moment\":{\"userId\":38710,\"id\":511}},{\"Moment\":{\"userId\":38710,\"id\":595}},{\"Moment\":{\"userId\":38710,\"id\":704}},{\"Moment\":{\"userId\":38710,\"id\":1491200468898}},{\"Moment\":{\"userId\":38710,\"id\":1493835799335}},{\"Moment\":{\"userId\":38710,\"id\":1512314438990}},{\"Moment\":{\"userId\":38710,\"id\":1513094436910}},{\"Moment\":{\"userId\":38710,\"id\":1537025625613}}],\"code\":200,\"msg\":\"success\"}', '2018-09-15 15:36:28', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1537025791504, 82001, 1521901610784, '{\"[]\":[{\"Moment\":{\"userId\":38710,\"maxId\":1537025707417}},{\"Moment\":{\"userId\":70793,\"maxId\":551}},{\"Moment\":{\"userId\":82001,\"maxId\":1537025634931}},{\"Moment\":{\"userId\":82002,\"maxId\":1531062713966}},{\"Moment\":{\"userId\":82003,\"maxId\":1536805585275}},{\"Moment\":{\"userId\":82045,\"maxId\":1508073178489}},{\"Moment\":{\"userId\":82056,\"maxId\":1514858533480}},{\"Moment\":{\"userId\":93793,\"maxId\":1516086423441}},{\"Moment\":{\"userId\":1520242280259,\"maxId\":1520242333325}},{\"Moment\":{\"userId\":1523626157302,\"maxId\":1523936332614}}],\"code\":200,\"msg\":\"success\"}', '2018-09-15 15:36:31', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1537025795194, 82001, 1521902033332, '{\"[]\":[{\"User\":{\"id\":38710,\"sex\":0,\"name\":\"TommyLemon\",\"tag\":\"Android&Java\",\"head\":\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"contactIdList\":[82003,82005,90814,82004,82009,82002,82044,93793,70793],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":70793,\"sex\":0,\"name\":\"Strong\",\"tag\":\"djdj\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\",\"contactIdList\":[38710,82002],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/788c0a7e11a\",\"https://camo.githubusercontent.com/f513f67\"],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82001,\"sex\":0,\"name\":\"测试改名\",\"tag\":\"APIJSON User\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\",\"contactIdList\":[82025,82024,82003,93793,82012,82028,82021,82006,82030,82035],\"pictureList\":[\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82002,\"sex\":1,\"name\":\"Happy~\",\"tag\":\"iOS\",\"head\":\"http://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000\",\"contactIdList\":[82005,82001,38710],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82003,\"sex\":1,\"name\":\"Wechat\",\"head\":\"http://common.cnblogs.com/images/wechat.png\",\"contactIdList\":[82001,93793],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}}],\"total\":121,\"code\":200,\"msg\":\"success\"}', '2018-09-15 15:36:35', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1537025798273, 82001, 1521903828410, '{\"User\":{\"code\":200,\"msg\":\"success\",\"count\":72},\"code\":200,\"msg\":\"success\"}', '2018-09-15 15:36:38', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1537025799810, 82001, 1521903761689, '{\"User\":{\"code\":200,\"msg\":\"success\",\"count\":119},\"code\":200,\"msg\":\"success\"}', '2018-09-15 15:36:39', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1537025801244, 82001, 1521902110680, '{\"[]\":[{\"User\":{\"id\":38710,\"sex\":0,\"name\":\"TommyLemon\",\"tag\":\"Android&Java\",\"head\":\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"contactIdList\":[82003,82005,90814,82004,82009,82002,82044,93793,70793],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":70793,\"sex\":0,\"name\":\"Strong\",\"tag\":\"djdj\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\",\"contactIdList\":[38710,82002],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/788c0a7e11a\",\"https://camo.githubusercontent.com/f513f67\"],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82001,\"sex\":0,\"name\":\"测试改名\",\"tag\":\"APIJSON User\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\",\"contactIdList\":[82025,82024,82003,93793,82012,82028,82021,82006,82030,82035],\"pictureList\":[\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82002,\"sex\":1,\"name\":\"Happy~\",\"tag\":\"iOS\",\"head\":\"http://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000\",\"contactIdList\":[82005,82001,38710],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}},{\"User\":{\"id\":82003,\"sex\":1,\"name\":\"Wechat\",\"head\":\"http://common.cnblogs.com/images/wechat.png\",\"contactIdList\":[82001,93793],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}}],\"code\":200,\"msg\":\"success\"}', '2018-09-15 15:36:41', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1537025812404, 82001, 1521904653622, '{\"User[]\":[{\"id\":70793,\"sex\":0,\"name\":\"Strong\",\"tag\":\"djdj\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\",\"contactIdList\":[38710,82002],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/788c0a7e11a\",\"https://camo.githubusercontent.com/f513f67\"],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":82002,\"sex\":1,\"name\":\"Happy~\",\"tag\":\"iOS\",\"head\":\"http://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000\",\"contactIdList\":[82005,82001,38710],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":82005,\"sex\":1,\"name\":\"Jan\",\"tag\":\"AG\",\"head\":\"http://my.oschina.net/img/portrait.gif?t=1451961935000\",\"contactIdList\":[82001,38710,1532439021068],\"pictureList\":[],\"date\":\"2017-02-01 19:21:50.0\"}],\"code\":200,\"msg\":\"success\"}', '2018-09-15 15:36:52', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1537025813024, 82001, 1521904617127, '{\"Moment\":{\"userId\":93793,\"praiseUserIdList\":[38710,93793,82003,82005,82040,82055,82002,82001],\"isPraised\":true},\"code\":200,\"msg\":\"success\"}', '2018-09-15 15:36:53', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1537025814838, 82001, 1521904756674, '{\"User[]\":[{\"id\":38710,\"sex\":0,\"name\":\"TommyLemon\",\"tag\":\"Android&Java\",\"head\":\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"contactIdList\":[82003,82005,90814,82004,82009,82002,82044,93793,70793],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":70793,\"sex\":0,\"name\":\"Strong\",\"tag\":\"djdj\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\",\"contactIdList\":[38710,82002],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/788c0a7e11a\",\"https://camo.githubusercontent.com/f513f67\"],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":82001,\"sex\":0,\"name\":\"测试改名\",\"tag\":\"APIJSON User\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\",\"contactIdList\":[82025,82024,82003,93793,82012,82028,82021,82006,82030,82035],\"pictureList\":[\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"}],\"code\":200,\"msg\":\"success\"}', '2018-09-15 15:36:54', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1537025828828, 82001, 1521907303540, '{\"User[]\":[{\"id\":38710,\"sex\":0,\"name\":\"TommyLemon\",\"tag\":\"Android&Java\",\"head\":\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"contactIdList\":[82003,82005,90814,82004,82009,82002,82044,93793,70793],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":70793,\"sex\":0,\"name\":\"Strong\",\"tag\":\"djdj\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\",\"contactIdList\":[38710,82002],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/788c0a7e11a\",\"https://camo.githubusercontent.com/f513f67\"],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":82001,\"sex\":0,\"name\":\"测试改名\",\"tag\":\"APIJSON User\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\",\"contactIdList\":[82025,82024,82003,93793,82012,82028,82021,82006,82030,82035],\"pictureList\":[\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"}],\"code\":200,\"msg\":\"success\"}', '2018-09-15 15:37:08', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1537025834254, 82001, 1521907333048, '{\"User-id[]\":[82002,82003,82005,82041,82045,82058,1512531601485,1528254173621],\"Moment[]\":[{\"id\":32,\"userId\":82002,\"date\":\"2017-02-08 16:06:11.0\",\"praiseUserIdList\":[38710,82002,82001],\"pictureList\":[\"https://camo.githubusercontent.com/f513fa631bd780dc0ec3cf2663777e356dc3664f/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343733323232332d3337333933303233322e6a7067\",\"https://camo.githubusercontent.com/5f5c4e0c4dc539c34e8eae8ac0cbc6dccdfee5d3/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343533333831362d323032373434343231382e6a7067\",\"http://static.oschina.net/uploads/img/201604/22172508_mpwj.jpg\"]},{\"id\":371,\"userId\":82002,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-371\",\"praiseUserIdList\":[90814,93793,82003,82005,82006,82040,82002,82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067\",\"http://static.oschina.net/uploads/img/201604/22172507_aMmH.jpg\",\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\"]},{\"id\":1508053762227,\"userId\":82003,\"date\":\"2017-10-15 15:49:22.0\",\"content\":\"我也试试\",\"praiseUserIdList\":[1515565976140],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"]},{\"id\":1508072491570,\"userId\":82002,\"date\":\"2017-10-15 21:01:31.0\",\"content\":\"有点冷~\",\"praiseUserIdList\":[82001,82002],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"]},{\"id\":1508073178489,\"userId\":82045,\"date\":\"2017-10-15 21:12:58.0\",\"content\":\"发动态\",\"praiseUserIdList\":[82001],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"]},{\"id\":1514017444961,\"userId\":82002,\"date\":\"2017-12-23 16:24:04.0\",\"content\":\"123479589679\",\"praiseUserIdList\":[82002,1520242280259,82001,70793,1524042900591,1528264711016],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"]},{\"id\":1531062713966,\"userId\":82002,\"date\":\"2018-07-08 23:11:53.0\",\"content\":\"云南好美啊( ◞˟૩˟)◞\",\"praiseUserIdList\":[82001,82005,38710,70793,93793,82003,1531969715979],\"pictureList\":[\"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1531072366455&di=c0d4b15b2c4b70aad49e6ae747f60742&imgtype=0&src=http%3A%2F%2Fpic1.win4000.com%2Fwallpaper%2F3%2F57a2a41f57d09.jpg\",\"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1531072499167&di=5b5621d117edbc5d344a03ba0a6b580b&imgtype=0&src=http%3A%2F%2Fi0.szhomeimg.com%2FUploadFiles%2FBBS%2F2006%2F08%2F05%2F24752199_79122.91.jpg\"]},{\"id\":1536805585275,\"userId\":82003,\"date\":\"2018-09-13 10:26:25.0\",\"content\":\"iPhone Xs发布了，大家怎么看？\",\"praiseUserIdList\":[82002,82005,70793,82003,82001],\"pictureList\":[\"https://pic1.zhimg.com/80/v2-e129b40810070443add1c28e6185c894_hd.jpg\"]}],\"code\":200,\"msg\":\"success\"}', '2018-09-15 15:37:14', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1537025841443, 82001, 1511967853340, '{\"[]\":[{\"Moment\":{\"id\":301,\"userId\":93793,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-301\",\"praiseUserIdList\":[38710,93793,82003,82005,82040,82055,82002,82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\"]},\"User\":{\"id\":93793,\"name\":\"Mike\",\"head\":\"http://static.oschina.net/uploads/user/48/96331_50.jpg\"},\"User[]\":[{\"id\":38710,\"name\":\"TommyLemon\"},{\"id\":82001,\"name\":\"测试改名\"},{\"id\":82002,\"name\":\"Happy~\"},{\"id\":82003,\"name\":\"Wechat\"},{\"id\":82005,\"name\":\"Jan\"},{\"id\":82040,\"name\":\"Dream\"},{\"id\":82055,\"name\":\"Solid\"},{\"id\":93793,\"name\":\"Mike\"}],\"[]\":[{\"Comment\":{\"id\":45,\"toId\":0,\"userId\":93793,\"momentId\":301,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-45\"},\"User\":{\"id\":93793,\"name\":\"Mike\"}},{\"Comment\":{\"id\":51,\"toId\":45,\"userId\":82003,\"momentId\":301,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-51\"},\"User\":{\"id\":82003,\"name\":\"Wechat\"}},{\"Comment\":{\"id\":76,\"toId\":45,\"userId\":93793,\"momentId\":301,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-76\"},\"User\":{\"id\":93793,\"name\":\"Mike\"}},{\"Comment\":{\"id\":120,\"toId\":0,\"userId\":93793,\"momentId\":301,\"date\":\"2017-03-02 13:56:06.0\",\"content\":\"This is a Content...-110\"},\"User\":{\"id\":93793,\"name\":\"Mike\"}},{\"Comment\":{\"id\":124,\"toId\":0,\"userId\":82001,\"momentId\":301,\"date\":\"2017-03-02 13:56:06.0\",\"content\":\"This is a Content...-114\"},\"User\":{\"id\":82001,\"name\":\"测试改名\"}},{\"Comment\":{\"id\":1490781009548,\"toId\":51,\"userId\":82001,\"momentId\":301,\"date\":\"2017-03-29 17:50:09.0\",\"content\":\"3\"},\"User\":{\"id\":82001,\"name\":\"测试改名\"}}]},{\"Moment\":{\"id\":58,\"userId\":90814,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-435\",\"praiseUserIdList\":[38710,82003,82005,93793,82006,82044,82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172507_aMmH.jpg\"]},\"User\":{\"id\":90814,\"name\":\"007\",\"head\":\"http://static.oschina.net/uploads/user/51/102723_50.jpg?t=1449212504000\"},\"User[]\":[{\"id\":38710,\"name\":\"TommyLemon\"},{\"id\":82001,\"name\":\"测试改名\"},{\"id\":82003,\"name\":\"Wechat\"},{\"id\":82005,\"name\":\"Jan\"},{\"id\":82006,\"name\":\"Meria\"},{\"id\":82044,\"name\":\"Love\"},{\"id\":93793,\"name\":\"Mike\"}],\"[]\":[{\"Comment\":{\"id\":13,\"toId\":0,\"userId\":82005,\"momentId\":58,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-13\"},\"User\":{\"id\":82005,\"name\":\"Jan\"}},{\"Comment\":{\"id\":77,\"toId\":13,\"userId\":93793,\"momentId\":58,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-77\"},\"User\":{\"id\":93793,\"name\":\"Mike\"}},{\"Comment\":{\"id\":97,\"toId\":13,\"userId\":82006,\"momentId\":58,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-97\"},\"User\":{\"id\":82006,\"name\":\"Meria\"}},{\"Comment\":{\"id\":167,\"userId\":82001,\"momentId\":58,\"date\":\"2017-03-25 19:48:41.0\",\"content\":\"Nice!\"},\"User\":{\"id\":82001,\"name\":\"测试改名\"}},{\"Comment\":{\"id\":173,\"userId\":38710,\"momentId\":58,\"date\":\"2017-03-25 20:25:13.0\",\"content\":\"Good\"},\"User\":{\"id\":38710,\"name\":\"TommyLemon\"}},{\"Comment\":{\"id\":188,\"toId\":97,\"userId\":82001,\"momentId\":58,\"date\":\"2017-03-26 15:21:32.0\",\"content\":\"1646\"},\"User\":{\"id\":82001,\"name\":\"测试改名\"}}]},{\"Moment\":{\"id\":371,\"userId\":82002,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-371\",\"praiseUserIdList\":[90814,93793,82003,82005,82006,82040,82002,82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067\",\"http://static.oschina.net/uploads/img/201604/22172507_aMmH.jpg\",\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\"]},\"User\":{\"id\":82002,\"name\":\"Happy~\",\"head\":\"http://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000\"},\"User[]\":[{\"id\":82001,\"name\":\"测试改名\"},{\"id\":82002,\"name\":\"Happy~\"},{\"id\":82003,\"name\":\"Wechat\"},{\"id\":82005,\"name\":\"Jan\"},{\"id\":82006,\"name\":\"Meria\"},{\"id\":82040,\"name\":\"Dream\"},{\"id\":90814,\"name\":\"007\"},{\"id\":93793,\"name\":\"Mike\"}],\"[]\":[{\"Comment\":{\"id\":68,\"toId\":0,\"userId\":82005,\"momentId\":371,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-68\"},\"User\":{\"id\":82005,\"name\":\"Jan\"}},{\"Comment\":{\"id\":157,\"userId\":93793,\"momentId\":371,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-157\"},\"User\":{\"id\":93793,\"name\":\"Mike\"}},{\"Comment\":{\"id\":110,\"toId\":0,\"userId\":93793,\"momentId\":371,\"date\":\"2017-02-01 19:23:24.0\",\"content\":\"This is a Content...-110\"},\"User\":{\"id\":93793,\"name\":\"Mike\"}},{\"Comment\":{\"id\":114,\"toId\":0,\"userId\":82001,\"momentId\":371,\"date\":\"2017-03-02 13:56:06.0\",\"content\":\"This is a Content...-114\"},\"User\":{\"id\":82001,\"name\":\"测试改名\"}},{\"Comment\":{\"id\":115,\"toId\":0,\"userId\":38710,\"momentId\":371,\"date\":\"2017-03-02 13:56:06.0\",\"content\":\"This is a Content...-115\"},\"User\":{\"id\":38710,\"name\":\"TommyLemon\"}},{\"Comment\":{\"id\":116,\"toId\":0,\"userId\":70793,\"momentId\":371,\"date\":\"2017-03-02 13:56:06.0\",\"content\":\"This is a Content...-116\"},\"User\":{\"id\":70793,\"name\":\"Strong\"}}]},{\"Moment\":{\"id\":170,\"userId\":70793,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-73\",\"praiseUserIdList\":[82044,82002,82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172508_mpwj.jpg\"]},\"User\":{\"id\":70793,\"name\":\"Strong\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\"},\"User[]\":[{\"id\":82001,\"name\":\"测试改名\"},{\"id\":82002,\"name\":\"Happy~\"},{\"id\":82044,\"name\":\"Love\"}],\"[]\":[{\"Comment\":{\"id\":44,\"toId\":0,\"userId\":82003,\"momentId\":170,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-44\"},\"User\":{\"id\":82003,\"name\":\"Wechat\"}},{\"Comment\":{\"id\":54,\"toId\":0,\"userId\":82004,\"momentId\":170,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-54\"},\"User\":{\"id\":82004,\"name\":\"Tommy\"}},{\"Comment\":{\"id\":99,\"toId\":44,\"userId\":70793,\"momentId\":170,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-99\"},\"User\":{\"id\":70793,\"name\":\"Strong\"}},{\"Comment\":{\"id\":206,\"toId\":54,\"userId\":82001,\"momentId\":170,\"date\":\"2017-03-29 11:04:23.0\",\"content\":\"ejej\"},\"User\":{\"id\":82001,\"name\":\"测试改名\"}},{\"Comment\":{\"id\":1490780759866,\"toId\":99,\"userId\":82001,\"momentId\":170,\"date\":\"2017-03-29 17:45:59.0\",\"content\":\"99\"},\"User\":{\"id\":82001,\"name\":\"测试改名\"}},{\"Comment\":{\"id\":1490863661426,\"toId\":1490780759866,\"userId\":70793,\"momentId\":170,\"date\":\"2017-03-30 16:47:41.0\",\"content\":\"66\"},\"User\":{\"id\":70793,\"name\":\"Strong\"}}]},{\"Moment\":{\"id\":470,\"userId\":38710,\"date\":\"2017-02-01 19:14:31.0\",\"content\":\"This is a Content...-470\",\"praiseUserIdList\":[82001],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172507_Pz9Y.png\"]},\"User\":{\"id\":38710,\"name\":\"TommyLemon\",\"head\":\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\"},\"User[]\":[{\"id\":82001,\"name\":\"测试改名\"}],\"[]\":[{\"Comment\":{\"id\":4,\"toId\":0,\"userId\":38710,\"momentId\":470,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-4\"},\"User\":{\"id\":38710,\"name\":\"TommyLemon\"}},{\"Comment\":{\"id\":22,\"toId\":221,\"userId\":82001,\"momentId\":470,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"测试修改评论\"},\"User\":{\"id\":82001,\"name\":\"测试改名\"}},{\"Comment\":{\"id\":47,\"toId\":4,\"userId\":70793,\"momentId\":470,\"date\":\"2017-02-01 19:20:50.0\",\"content\":\"This is a Content...-47\"},\"User\":{\"id\":70793,\"name\":\"Strong\"}},{\"Comment\":{\"id\":1490863507114,\"toId\":4,\"userId\":82003,\"momentId\":470,\"date\":\"2017-03-30 16:45:07.0\",\"content\":\"yes\"},\"User\":{\"id\":82003,\"name\":\"Wechat\"}},{\"Comment\":{\"id\":1490863903900,\"toId\":0,\"userId\":82006,\"momentId\":470,\"date\":\"2017-03-30 16:51:43.0\",\"content\":\"SOGA\"},\"User\":{\"id\":82006,\"name\":\"Meria\"}},{\"Comment\":{\"id\":1491740899179,\"toId\":0,\"userId\":82001,\"momentId\":470,\"date\":\"2017-04-09 20:28:19.0\",\"content\":\"www\"},\"User\":{\"id\":82001,\"name\":\"测试改名\"}}]}],\"code\":200,\"msg\":\"success\"}', '2018-09-15 15:37:21', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1537025843337, 82001, 1511963677325, '{\"User\":{\"id\":82001,\"sex\":0,\"name\":\"测试改名\",\"tag\":\"APIJSON User\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\",\"contactIdList\":[82025,82024,82003,93793,82012,82028,82021,82006,82030,82035],\"pictureList\":[\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"},\"code\":200,\"msg\":\"success\"}', '2018-09-15 15:37:23', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1538112293306, 82001, 1521907303540, '{\"User[]\":[{\"id\":38710,\"sex\":0,\"name\":\"TommyLemon\",\"tag\":\"Android&Java\",\"head\":\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"contactIdList\":[82003,82005,90814,82004,82009,82002,82044,93793,70793],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":70793,\"sex\":0,\"name\":\"Strong\",\"tag\":\"djdj\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\",\"contactIdList\":[38710,82002],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/788c0a7e11a\",\"https://camo.githubusercontent.com/f513f67\"],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":82001,\"sex\":0,\"name\":\"测试改名\",\"tag\":\"APIJSON User\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\",\"contactIdList\":[82025,82024,82003,93793],\"pictureList\":[\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"}],\"code\":200,\"msg\":\"success\"}', '2018-09-28 05:24:53', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1538112310565, 82001, 1521905680680, '{\"Moment\":{\"code\":200,\"msg\":\"success\",\"id\":1538112282445,\"count\":1},\"code\":200,\"msg\":\"success\"}', '2018-09-28 05:25:10', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1538112311450, 82001, 1521904756674, '{\"User[]\":[{\"id\":38710,\"sex\":0,\"name\":\"TommyLemon\",\"tag\":\"Android&Java\",\"head\":\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"contactIdList\":[82003,82005,90814,82004,82009,82002,82044,93793,70793],\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":70793,\"sex\":0,\"name\":\"Strong\",\"tag\":\"djdj\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\",\"contactIdList\":[38710,82002],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/788c0a7e11a\",\"https://camo.githubusercontent.com/f513f67\"],\"date\":\"2017-02-01 19:21:50.0\"},{\"id\":82001,\"sex\":0,\"name\":\"测试改名\",\"tag\":\"APIJSON User\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\",\"contactIdList\":[82025,82024,82003,93793],\"pictureList\":[\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"}],\"code\":200,\"msg\":\"success\"}', '2018-09-28 05:25:11', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1538731040138, 82001, 1511963677325, '{\"User\":{\"id\":82001,\"sex\":0,\"name\":\"测试改名\",\"tag\":\"APIJSON User\",\"head\":\"https://static.oschina.net/uploads/user/19/39085_50.jpg\",\"contactIdList\":[82025,82024,82003,93793,70793],\"pictureList\":[\"http://common.cnblogs.com/images/icon_weibo_24.png\"],\"date\":\"2017-02-01 19:21:50.0\"},\"code\":200,\"msg\":\"success\"}', '2018-10-05 09:17:20', NULL, NULL);
INSERT INTO `TestRecord` VALUES (1538731046687, 82001, 1521907570452, '{\"Moment\":{\"id\":12,\"userId\":70793,\"date\":\"2017-02-08 16:06:11.0\",\"content\":\"1111534034\",\"praiseUserIdList\":[70793,93793,82044,82040,82055,90814,38710,82002,82006,1508072105320],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/788c0a7e11a4f5aadef3c886f028c79b4808613a/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343932353935372d313732303737333630382e6a7067\",\"http://static.oschina.net/uploads/img/201604/22172507_Pz9Y.png\",\"https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067\",\"https://camo.githubusercontent.com/f513fa631bd780dc0ec3cf2663777e356dc3664f/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343733323232332d3337333933303233322e6a7067\",\"https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067\",\"https://camo.githubusercontent.com/f513fa631bd780dc0ec3cf2663777e356dc3664f/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343733323232332d3337333933303233322e6a7067\"]},\"User\":{\"id\":70793,\"sex\":0,\"name\":\"Strong\",\"tag\":\"djdj\",\"head\":\"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\",\"contactIdList\":[38710,82002],\"pictureList\":[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\",\"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\",\"https://camo.githubusercontent.com/788c0a7e11a\",\"https://camo.githubusercontent.com/f513f67\"],\"date\":\"2017-02-01 19:21:50.0\"},\"code\":200,\"msg\":\"success\"}', '2018-10-05 09:17:27', NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for Verify
-- ----------------------------
DROP TABLE IF EXISTS `Verify`;
CREATE TABLE `Verify` (
  `id` bigint(15) NOT NULL AUTO_INCREMENT COMMENT '唯一标识',
  `type` int(2) NOT NULL DEFAULT '0' COMMENT '类型：\n0-登录\n1-注册\n2-修改登录密码\n3-修改支付密码',
  `phone` bigint(11) NOT NULL COMMENT '手机号',
  `verify` int(6) NOT NULL COMMENT '验证码',
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1549549983792 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of Verify
-- ----------------------------
BEGIN;
INSERT INTO `Verify` VALUES (1527950171719, 1, 130000844444, 10375, '2018-06-02 14:36:11');
INSERT INTO `Verify` VALUES (1528250810515, 1, 15122820115, 2586, '2018-06-06 02:06:50');
INSERT INTO `Verify` VALUES (1528254139866, 1, 15225556855, 8912, '2018-06-06 03:02:19');
INSERT INTO `Verify` VALUES (1528255485691, 1, 15822798927, 2101, '2018-06-06 03:24:45');
INSERT INTO `Verify` VALUES (1528264687329, 1, 15620878773, 3991, '2018-06-06 05:58:07');
INSERT INTO `Verify` VALUES (1528269508031, 1, 18616024605, 4901, '2018-06-06 07:18:28');
INSERT INTO `Verify` VALUES (1528289406640, 1, 13142033348, 3005, '2018-06-06 12:50:06');
INSERT INTO `Verify` VALUES (1528327843188, 0, 15122820115, 4912, '2018-06-06 23:30:43');
INSERT INTO `Verify` VALUES (1528330720259, 2, 15122820115, 5267, '2018-06-07 00:18:40');
INSERT INTO `Verify` VALUES (1528339646013, 1, 15122541683, 6112, '2018-06-07 02:47:26');
INSERT INTO `Verify` VALUES (1528344962707, 1, 15188899797, 4540, '2018-06-07 04:16:02');
INSERT INTO `Verify` VALUES (1528345364195, 2, 15122541683, 10500, '2018-06-07 04:22:44');
INSERT INTO `Verify` VALUES (1528345372998, 0, 15122541683, 9940, '2018-06-07 04:22:53');
INSERT INTO `Verify` VALUES (1528356342784, 2, 15620878773, 2076, '2018-06-07 07:25:42');
INSERT INTO `Verify` VALUES (1528356449927, 1, 15620878772, 4733, '2018-06-07 07:27:29');
INSERT INTO `Verify` VALUES (1528411937273, 0, 15620878772, 7375, '2018-06-07 22:52:17');
INSERT INTO `Verify` VALUES (1531793525394, 1, 15629184762, 9737, '2018-07-17 02:12:05');
INSERT INTO `Verify` VALUES (1531969702694, 1, 13800138000, 8213, '2018-07-19 03:08:22');
INSERT INTO `Verify` VALUES (1531983017848, 2, 13800138000, 1552, '2018-07-19 06:50:17');
INSERT INTO `Verify` VALUES (1532188103364, 1, 13977757845, 8753, '2018-07-21 15:48:23');
INSERT INTO `Verify` VALUES (1532439015405, 1, 18779607703, 10136, '2018-07-24 13:30:15');
INSERT INTO `Verify` VALUES (1533450371245, 1, 18911061423, 5795, '2018-08-05 06:26:11');
INSERT INTO `Verify` VALUES (1533618759900, 1, 13977757843, 10204, '2018-08-07 05:12:39');
INSERT INTO `Verify` VALUES (1533627819054, 1, 13107695518, 7515, '2018-08-07 07:43:39');
INSERT INTO `Verify` VALUES (1533693421836, 1, 15901373410, 4884, '2018-08-08 01:57:01');
INSERT INTO `Verify` VALUES (1533698902309, 1, 18664900086, 3654, '2018-08-08 03:28:22');
INSERT INTO `Verify` VALUES (1533723898511, 1, 8881816, 5272, '2018-08-08 10:24:58');
INSERT INTO `Verify` VALUES (1533835163777, 1, 13977757846, 9332, '2018-08-09 17:19:23');
INSERT INTO `Verify` VALUES (1534142797624, 2, 13977757845, 4136, '2018-08-13 06:46:37');
INSERT INTO `Verify` VALUES (1534142802751, 0, 13977757845, 5754, '2018-08-13 06:46:42');
INSERT INTO `Verify` VALUES (1534671951719, 1, 13000082023, 5869, '2018-08-19 09:45:51');
INSERT INTO `Verify` VALUES (1534671960833, 1, 13000082013, 6169, '2018-08-19 09:46:00');
INSERT INTO `Verify` VALUES (1534671980295, 1, 13000082032, 10171, '2018-08-19 09:46:20');
INSERT INTO `Verify` VALUES (1534672028733, 0, 13000093793, 6478, '2018-08-19 09:47:08');
INSERT INTO `Verify` VALUES (1534898613829, 1, 17755531490, 3961, '2018-08-22 00:43:33');
INSERT INTO `Verify` VALUES (1534926287534, 1, 17602120205, 5297, '2018-08-22 08:24:47');
INSERT INTO `Verify` VALUES (1535345181813, 1, 13000082022, 8145, '2018-08-27 04:46:21');
INSERT INTO `Verify` VALUES (1536220749108, 1, 13241042199, 9916, '2018-09-06 07:59:09');
INSERT INTO `Verify` VALUES (1536583466723, 1, 18013819609, 2483, '2018-09-10 12:44:26');
INSERT INTO `Verify` VALUES (1536805630726, 0, 13000070793, 1798, '2018-09-13 02:27:10');
INSERT INTO `Verify` VALUES (1537515268266, 2, 13000038710, 4171, '2018-09-21 07:34:28');
INSERT INTO `Verify` VALUES (1537515280163, 2, 13000038713, 5877, '2018-09-21 07:34:40');
INSERT INTO `Verify` VALUES (1537515287973, 2, 13000038714, 10441, '2018-09-21 07:34:47');
INSERT INTO `Verify` VALUES (1537515337629, 1, 13000033333, 7353, '2018-09-21 07:35:37');
INSERT INTO `Verify` VALUES (1537521279290, 1, 13000049499, 2854, '2018-09-21 09:14:39');
INSERT INTO `Verify` VALUES (1538114970328, 1, 15855512382, 10359, '2018-09-28 06:09:30');
INSERT INTO `Verify` VALUES (1538504245612, 1, 13000087654, 10791, '2018-10-02 18:17:25');
INSERT INTO `Verify` VALUES (1538504485798, 1, 13000087655, 4776, '2018-10-02 18:21:25');
INSERT INTO `Verify` VALUES (1538987940551, 1, 18662327672, 1800, '2018-10-08 08:39:00');
INSERT INTO `Verify` VALUES (1539076064496, 1, 15094295280, 3361, '2018-10-09 09:07:44');
INSERT INTO `Verify` VALUES (1539076102284, 1, 15094395280, 1562, '2018-10-09 09:08:22');
INSERT INTO `Verify` VALUES (1540364623910, 1, 13000085001, 4382, '2018-10-24 07:03:43');
INSERT INTO `Verify` VALUES (1540966375865, 1, 13122091271, 3880, '2018-10-31 06:12:55');
INSERT INTO `Verify` VALUES (1541427928139, 0, 13759127249, 5913, '2018-11-05 14:25:28');
INSERT INTO `Verify` VALUES (1541500666143, 1, 15280239960, 9142, '2018-11-06 10:37:46');
INSERT INTO `Verify` VALUES (1541510152560, 1, 13000099999, 1097, '2018-11-06 13:15:52');
INSERT INTO `Verify` VALUES (1541510270190, 1, 13000077777, 8192, '2018-11-06 13:17:50');
INSERT INTO `Verify` VALUES (1541583746916, 1, 18689846285, 8724, '2018-11-07 09:42:26');
INSERT INTO `Verify` VALUES (1541724338244, 0, 13000038710, 8283, '2018-11-09 00:45:38');
INSERT INTO `Verify` VALUES (1541757538733, 1, 17717112856, 2268, '2018-11-09 09:58:58');
INSERT INTO `Verify` VALUES (1542261432641, 1, 15800506515, 2586, '2018-11-15 05:57:12');
INSERT INTO `Verify` VALUES (1542265654497, 1, 18010001000, 5666, '2018-11-15 07:07:34');
INSERT INTO `Verify` VALUES (1542337959344, 1, 13000012345, 4981, '2018-11-16 03:12:39');
INSERT INTO `Verify` VALUES (1542352629436, 1, 13000082002, 10212, '2018-11-16 07:17:09');
INSERT INTO `Verify` VALUES (1542548523509, 1, 13317833374, 8921, '2018-11-18 13:42:03');
INSERT INTO `Verify` VALUES (1542702268195, 1, 123123, 8055, '2018-11-20 08:24:28');
INSERT INTO `Verify` VALUES (1542840424025, 1, 13818118257, 7126, '2018-11-21 22:47:04');
INSERT INTO `Verify` VALUES (1543377157089, 1, 18622250185, 6620, '2018-11-28 03:52:37');
INSERT INTO `Verify` VALUES (1543966631575, 1, 13466260815, 5835, '2018-12-04 23:37:11');
INSERT INTO `Verify` VALUES (1544276193603, 1, 13000087656, 4078, '2018-12-08 13:36:33');
INSERT INTO `Verify` VALUES (1544276277509, 2, 13000087656, 9356, '2018-12-08 13:37:57');
INSERT INTO `Verify` VALUES (1544276305800, 0, 13000087656, 8708, '2018-12-08 13:38:25');
INSERT INTO `Verify` VALUES (1544276475231, 1, 15988125475, 8940, '2018-12-08 13:41:15');
INSERT INTO `Verify` VALUES (1544503797981, 1, 13000082968, 6965, '2018-12-11 04:49:57');
INSERT INTO `Verify` VALUES (1545038887447, 1, 13000083333, 4527, '2018-12-17 09:28:07');
INSERT INTO `Verify` VALUES (1545238881566, 1, 13166059778, 4434, '2018-12-19 17:01:21');
INSERT INTO `Verify` VALUES (1545269417538, 1, 18124099720, 4882, '2018-12-20 01:30:17');
INSERT INTO `Verify` VALUES (1545464407106, 1, 17755015200, 3870, '2018-12-22 07:40:07');
INSERT INTO `Verify` VALUES (1545707514503, 1, 13533039558, 3941, '2018-12-25 03:11:54');
INSERT INTO `Verify` VALUES (1545895656481, 1, 13533039550, 4968, '2018-12-27 07:27:36');
INSERT INTO `Verify` VALUES (1546701633801, 1, 13534201057, 8487, '2019-01-05 15:20:33');
INSERT INTO `Verify` VALUES (1547177422559, 1, 18980210241, 7012, '2019-01-11 03:30:22');
INSERT INTO `Verify` VALUES (1548068010027, 1, 17181595855, 10716, '2019-01-21 10:53:30');
INSERT INTO `Verify` VALUES (1548310439111, 1, 13059203278, 9438, '2019-01-24 06:13:59');
INSERT INTO `Verify` VALUES (1548398132694, 1, 15050529772, 9276, '2019-01-25 06:35:32');
INSERT INTO `Verify` VALUES (1548742004597, 1, 13738007826, 6318, '2019-01-29 06:06:44');
INSERT INTO `Verify` VALUES (1548742060130, 1, 13000082001, 8387, '2019-01-29 06:07:40');
INSERT INTO `Verify` VALUES (1548742087417, 2, 13000082001, 8685, '2019-01-29 06:08:07');
INSERT INTO `Verify` VALUES (1548742124507, 6, 13000082001, 4901, '2019-01-29 06:08:44');
INSERT INTO `Verify` VALUES (1548742151361, 10, 13000082001, 8513, '2019-01-29 06:09:11');
INSERT INTO `Verify` VALUES (1549549983791, 0, 13000082001, 3640, '2019-02-07 14:33:11');
COMMIT;

-- ----------------------------
-- Table structure for _Visit
-- ----------------------------
DROP TABLE IF EXISTS `_Visit`;
CREATE TABLE `_Visit` (
  `model` varchar(15) NOT NULL,
  `id` bigint(15) NOT NULL,
  `operate` tinyint(4) NOT NULL COMMENT '1-增\n2-删\n3-改\n4-查',
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for apijson_privacy
-- ----------------------------
DROP TABLE IF EXISTS `apijson_privacy`;
CREATE TABLE `apijson_privacy` (
  `id` bigint(15) NOT NULL COMMENT '唯一标识',
  `certified` tinyint(2) NOT NULL DEFAULT '0' COMMENT '已认证',
  `phone` bigint(11) NOT NULL COMMENT '手机号，仅支持 11 位数的。不支持 +86 这种国家地区开头的。如果要支持就改为 VARCHAR(14)',
  `balance` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '余额',
  `_password` varchar(20) NOT NULL COMMENT '登录密码',
  `_payPassword` int(6) NOT NULL DEFAULT '123456' COMMENT '支付密码',
  PRIMARY KEY (`id`),
  UNIQUE KEY `phone_UNIQUE` (`phone`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户隐私信息表。\n对安全要求高，不想泄漏真实名称。对外名称为 Privacy';

-- ----------------------------
-- Records of apijson_privacy
-- ----------------------------
BEGIN;
INSERT INTO `apijson_privacy` VALUES (38710, 1, 13000038710, 33376.00, 'apijson', 123456);
INSERT INTO `apijson_privacy` VALUES (70793, 0, 13000070793, 56000.00, 'apijson', 123456);
INSERT INTO `apijson_privacy` VALUES (82001, 1, 13000082001, 53317.55, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82002, 1, 13000082002, 6817.23, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82003, 1, 13000082003, 2000.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82004, 0, 13000082004, 2000.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82005, 0, 13000082005, 1923.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82006, 0, 13000082006, 2000.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82009, 0, 13000082009, 2000.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82012, 0, 13000082012, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82020, 0, 12345678900, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82021, 0, 12345678901, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82022, 0, 12345678902, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82023, 0, 12345678903, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82024, 0, 12345678904, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82025, 0, 12345678905, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82026, 0, 12345678906, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82027, 0, 12345678907, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82028, 0, 12345678908, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82029, 0, 12345678909, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82030, 0, 12345678910, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82031, 0, 12345678911, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82032, 0, 12345678912, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82033, 0, 12345678913, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82034, 0, 12345678914, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82035, 0, 12345678915, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82036, 0, 12345678916, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82037, 0, 12345678917, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82038, 0, 12345678918, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82039, 0, 12345678919, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82040, 0, 13000082019, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82041, 0, 13000082015, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82042, 0, 13000082016, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82043, 0, 13000082017, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82044, 0, 13000082018, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82045, 0, 13000082020, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82046, 0, 13000082010, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82047, 0, 13000082021, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82048, 0, 13000038711, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82049, 0, 13000038712, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82050, 0, 13000038713, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82051, 0, 13000038714, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82052, 0, 13000038715, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82053, 0, 13000038720, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82054, 0, 13000038721, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82055, 0, 13000082030, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82056, 0, 13000082040, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82057, 0, 13000038730, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82058, 0, 13000038750, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82059, 0, 13000082033, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (82060, 0, 13000082050, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (90814, 1, 13000090814, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (93793, 1, 13000093793, 3000.00, 'apijson', 123456);
INSERT INTO `apijson_privacy` VALUES (93794, 0, 99999999999, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1490109742863, 0, 13000082100, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1490109845208, 0, 13000082101, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1490420651686, 0, 13000038716, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1490427139175, 0, 13000038717, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1490427577823, 0, 13000082102, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1490584952968, 0, 13000038790, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1490973670928, 0, 13000082051, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1492936169722, 0, 13000093794, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1493480142628, 0, 13000038888, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1493747512860, 0, 13000038777, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1493747777770, 0, 13000038778, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1493748594003, 0, 13000038779, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1493748615711, 0, 13000038780, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1493749090643, 0, 13000038781, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1493836043151, 0, 13000038999, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1493883110132, 0, 13000039999, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1493890214167, 0, 13000031000, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1493890303473, 0, 13000031001, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1493890303474, 0, 13000088888, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1497792972314, 0, 13000082111, 0.00, '654321', 123456);
INSERT INTO `apijson_privacy` VALUES (1499057230629, 0, 13000082011, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1500825221910, 0, 13000099999, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1502639062900, 0, 13000082222, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1502639424119, 0, 13000082333, 0.00, '12345678', 123456);
INSERT INTO `apijson_privacy` VALUES (1507220582167, 0, 13000011111, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1508072071492, 0, 13000071492, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1508072105320, 0, 13000082008, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1508072160401, 0, 13000082007, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1508072202871, 0, 13000082031, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1510495628760, 0, 13000082000, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1511407581570, 0, 17610725819, 0.00, '123123', 123456);
INSERT INTO `apijson_privacy` VALUES (1511761906715, 0, 13708222312, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1511965911349, 0, 13000083333, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1512387063078, 0, 15858585858, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1512531601485, 0, 18210847727, 0.00, '5816136', 123456);
INSERT INTO `apijson_privacy` VALUES (1514623064133, 0, 13000038725, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1514625918255, 0, 13000038726, 255.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1514626163032, 0, 13000038727, 4951.37, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1514858422969, 0, 13000082041, 164.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1515565976140, 0, 15009257563, 0.00, 'qazwsx', 123456);
INSERT INTO `apijson_privacy` VALUES (1518218350585, 0, 18663689263, 0.00, 'cherish751220', 123456);
INSERT INTO `apijson_privacy` VALUES (1519778917280, 0, 15000536915, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1520242280259, 0, 18917212395, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1521274648008, 0, 18989491914, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1521371722416, 0, 13000088889, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1521374327542, 0, 13000056789, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1523626157302, 0, 15603313259, 0.00, '15603313259', 123456);
INSERT INTO `apijson_privacy` VALUES (1523935772553, 0, 15603313258, 0.00, '15603313258', 123456);
INSERT INTO `apijson_privacy` VALUES (1524042900591, 0, 15222297100, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1524298730523, 0, 17854217949, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1524878698882, 0, 13917451840, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1525677515673, 0, 13390935538, 10000.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1527495857924, 0, 13142033345, 15.00, 'qweasd', 123456);
INSERT INTO `apijson_privacy` VALUES (1527498229991, 0, 13142033342, 0.00, 'qweasd', 123456);
INSERT INTO `apijson_privacy` VALUES (1527821445610, 0, 13142033346, 0.00, 'qweasd', 123456);
INSERT INTO `apijson_privacy` VALUES (1528250827953, 0, 15122820115, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1528254173621, 0, 15225556855, 200.00, 'lmt970208', 123456);
INSERT INTO `apijson_privacy` VALUES (1528255497767, 0, 15822798927, 0.00, '111111', 123456);
INSERT INTO `apijson_privacy` VALUES (1528264711016, 0, 15620878773, 0.00, '111111', 123456);
INSERT INTO `apijson_privacy` VALUES (1528339692804, 0, 15122541683, 0.00, '568599', 123456);
INSERT INTO `apijson_privacy` VALUES (1528344980598, 0, 15188899797, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1528356470041, 0, 15620878772, 0.00, '111111', 123456);
INSERT INTO `apijson_privacy` VALUES (1531969715979, 0, 13800138000, 10000.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1532188114543, 0, 13977757845, 20360.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1532439021068, 0, 18779607703, 0.00, '15879684798qq', 123456);
INSERT INTO `apijson_privacy` VALUES (1533835176109, 0, 13977757846, 1700.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1534926301956, 0, 17602120205, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1538504264944, 0, 13000087654, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1538504500574, 0, 13000087655, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1538987952996, 0, 18662327672, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1541583762603, 0, 18689846285, 0.00, 'jyt123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1544276209348, 0, 13000087656, 1050.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1544503822963, 0, 13000082968, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1545707526805, 0, 13533039558, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1545895694424, 0, 13533039550, 357.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1547177436600, 0, 18980210241, 0.00, '123456', 123456);
INSERT INTO `apijson_privacy` VALUES (1548068043688, 0, 17181595855, 0.00, '0812563993gg', 123456);
COMMIT;

-- ----------------------------
-- Table structure for apijson_user
-- ----------------------------
DROP TABLE IF EXISTS `apijson_user`;
CREATE TABLE `apijson_user` (
  `id` bigint(15) NOT NULL AUTO_INCREMENT COMMENT '唯一标识',
  `sex` tinyint(2) NOT NULL DEFAULT '0' COMMENT '性别：\n0-男\n1-女',
  `name` varchar(20) DEFAULT NULL COMMENT '名称',
  `tag` varchar(45) DEFAULT NULL COMMENT '标签',
  `head` varchar(300) DEFAULT 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png' COMMENT '头像url',
  `contactIdList` json DEFAULT NULL COMMENT '联系人id列表',
  `pictureList` json DEFAULT NULL COMMENT '照片列表',
  `date` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1548068043689 DEFAULT CHARSET=utf8 COMMENT='用户公开信息表。\n对安全要求高，不想泄漏真实名称。对外名称为 User';

-- ----------------------------
-- Records of apijson_user
-- ----------------------------
BEGIN;
INSERT INTO `apijson_user` VALUES (38710, 0, 'TommyLemon', 'Android&Java', 'http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000', '[82003, 82005, 90814, 82004, 82009, 82002, 82044, 93793, 70793]', '[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]', '2017-02-01 11:21:50');
INSERT INTO `apijson_user` VALUES (70793, 0, 'Strong', 'djdj', 'http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000', '[38710, 82002]', '[\"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\", \"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\", \"https://camo.githubusercontent.com/788c0a7e11a\", \"https://camo.githubusercontent.com/f513f67\"]', '2017-02-01 11:21:50');
INSERT INTO `apijson_user` VALUES (82001, 0, '测试账号', 'Dev', 'https://gss2.bdstatic.com/-fo3dSag_xI4khGkpoWK1HF6hhy/baike/c0%3Dbaike92%2C5%2C5%2C92%2C30/sign=c31ae7219525bc313f5009ca3fb6e6d4/42a98226cffc1e17646dbede4690f603728de90b.jpg', '[82028, 82006, 82034, 93793, 82036, 82048]', '[\"http://common.cnblogs.com/images/icon_weibo_24.png\"]', '2017-02-01 11:21:50');
INSERT INTO `apijson_user` VALUES (82002, 1, 'Happy~', 'iOS', 'http://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000', '[82005, 82001, 38710]', '[]', '2017-02-01 11:21:50');
INSERT INTO `apijson_user` VALUES (82003, 1, 'Wechat', NULL, 'http://common.cnblogs.com/images/wechat.png', '[82001, 93793]', '[]', '2017-02-01 11:21:50');
INSERT INTO `apijson_user` VALUES (82004, 0, 'Tommy', 'fasef', 'http://static.oschina.net/uploads/user/1200/2400261_50.png?t=1439638750000', '[]', '[]', '2017-02-01 11:21:50');
INSERT INTO `apijson_user` VALUES (82005, 1, 'Jan', 'AG', 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[82001, 38710, 1532439021068]', '[]', '2017-02-01 11:21:50');
INSERT INTO `apijson_user` VALUES (82006, 1, 'Meria', NULL, 'http://static.oschina.net/uploads/user/998/1997902_50.jpg?t=1407806577000', '[]', '[]', '2017-02-01 11:21:50');
INSERT INTO `apijson_user` VALUES (82009, 0, 'God', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-02-01 11:21:50');
INSERT INTO `apijson_user` VALUES (82012, 0, 'Steve', 'FEWE', 'http://static.oschina.net/uploads/user/1/3064_50.jpg?t=1449566001000', '[82004, 82002, 93793]', '[]', '2017-02-01 11:21:50');
INSERT INTO `apijson_user` VALUES (82020, 0, 'ORANGE', NULL, 'http://static.oschina.net/uploads/user/48/96289_50.jpg?t=1452751699000', '[]', '[]', '2017-02-01 11:21:50');
INSERT INTO `apijson_user` VALUES (82021, 1, 'Tommy', NULL, 'http://static.oschina.net/uploads/user/19/39085_50.jpg', '[]', '[]', '2017-02-01 11:21:50');
INSERT INTO `apijson_user` VALUES (82022, 0, 'Internet', NULL, 'http://static.oschina.net/uploads/user/1332/2664107_50.jpg?t=1457405500000', '[]', '[]', '2017-02-01 11:21:50');
INSERT INTO `apijson_user` VALUES (82023, 0, 'No1', NULL, 'http://static.oschina.net/uploads/user/1385/2770216_50.jpg?t=1464405516000', '[]', '[]', '2017-02-01 11:21:50');
INSERT INTO `apijson_user` VALUES (82024, 0, 'Lemon', NULL, 'http://static.oschina.net/uploads/user/427/855532_50.jpg?t=1435030876000', '[]', '[]', '2017-02-01 11:21:50');
INSERT INTO `apijson_user` VALUES (82025, 1, 'Tommy', NULL, 'http://static.oschina.net/uploads/user/629/1258821_50.jpg?t=1378063141000', '[]', '[]', '2017-02-01 11:21:50');
INSERT INTO `apijson_user` VALUES (82026, 0, 'iOS', NULL, 'http://static.oschina.net/uploads/user/1200/2400261_50.png?t=1439638750000', '[]', '[]', '2017-02-01 11:21:50');
INSERT INTO `apijson_user` VALUES (82027, 0, 'Yong', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-02-01 11:21:50');
INSERT INTO `apijson_user` VALUES (82028, 1, 'gaeg', NULL, 'http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000', '[]', '[]', '2017-02-01 11:21:50');
INSERT INTO `apijson_user` VALUES (82029, 0, 'GASG', NULL, 'http://common.cnblogs.com/images/wechat.png', '[]', '[]', '2017-02-01 11:21:50');
INSERT INTO `apijson_user` VALUES (82030, 1, 'Fun', NULL, 'http://static.oschina.net/uploads/user/998/1997902_50.jpg?t=1407806577000', '[]', '[]', '2017-02-01 11:21:50');
INSERT INTO `apijson_user` VALUES (82031, 0, 'Lemon', NULL, 'http://static.oschina.net/uploads/user/48/96331_50.jpg', '[]', '[]', '2017-02-01 11:21:50');
INSERT INTO `apijson_user` VALUES (82032, 0, 'Stack', 'fasdg', 'http://static.oschina.net/uploads/user/1385/2770216_50.jpg?t=1464405516000', '[]', '[]', '2017-02-01 11:21:50');
INSERT INTO `apijson_user` VALUES (82033, 1, 'GAS', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-02-01 11:21:50');
INSERT INTO `apijson_user` VALUES (82034, 1, 'Jump', NULL, 'http://static.oschina.net/uploads/user/1332/2664107_50.jpg?t=1457405500000', '[]', '[]', '2017-02-01 11:21:50');
INSERT INTO `apijson_user` VALUES (82035, 1, 'Tab', NULL, 'http://static.oschina.net/uploads/user/629/1258821_50.jpg?t=1378063141000', '[]', '[]', '2017-02-01 11:21:50');
INSERT INTO `apijson_user` VALUES (82036, 0, 'SAG', NULL, 'http://static.oschina.net/uploads/user/1332/2664107_50.jpg?t=1457405500000', '[]', '[]', '2017-02-01 11:21:50');
INSERT INTO `apijson_user` VALUES (82037, 0, 'Test', NULL, 'http://static.oschina.net/uploads/user/1200/2400261_50.png?t=1439638750000', '[]', '[]', '2017-02-01 11:21:50');
INSERT INTO `apijson_user` VALUES (82038, 0, 'Battle', NULL, 'http://static.oschina.net/uploads/user/48/96289_50.jpg?t=1452751699000', '[]', '[]', '2017-02-01 11:21:50');
INSERT INTO `apijson_user` VALUES (82039, 1, 'Everyday', NULL, 'http://common.cnblogs.com/images/icon_weibo_24.png', '[]', '[]', '2017-02-19 13:57:56');
INSERT INTO `apijson_user` VALUES (82040, 1, 'Dream', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[70793]', '[]', '2017-03-02 16:44:26');
INSERT INTO `apijson_user` VALUES (82041, 0, 'Holo', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[38710, 82001]', '[]', '2017-03-04 09:59:34');
INSERT INTO `apijson_user` VALUES (82042, 1, 'Why', NULL, 'http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000', '[]', '[]', '2017-03-04 10:04:33');
INSERT INTO `apijson_user` VALUES (82043, 0, 'Holiday', NULL, 'http://static.oschina.net/uploads/user/998/1997902_50.jpg?t=1407806577000', '[70793, 82006]', '[]', '2017-03-04 10:05:04');
INSERT INTO `apijson_user` VALUES (82044, 1, 'Love', NULL, 'http://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000', '[82006]', '[]', '2017-03-04 10:20:27');
INSERT INTO `apijson_user` VALUES (82045, 0, 'Green', NULL, 'http://common.cnblogs.com/images/wechat.png', '[82001, 82002, 82003, 1485246481130]', '[]', '2017-03-04 10:22:39');
INSERT INTO `apijson_user` VALUES (82046, 0, 'Team', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[38710, 82002, 1485246481130]', '[]', '2017-03-04 15:11:17');
INSERT INTO `apijson_user` VALUES (82047, 0, 'Tesla', NULL, 'http://common.cnblogs.com/images/wechat.png', '[]', '[]', '2017-03-04 16:02:05');
INSERT INTO `apijson_user` VALUES (82048, 0, 'Moto', NULL, 'http://static.oschina.net/uploads/user/48/96289_50.jpg?t=1452751699000', '[]', '[]', '2017-03-04 16:04:02');
INSERT INTO `apijson_user` VALUES (82049, 0, 'ITMan', NULL, 'http://static.oschina.net/uploads/user/629/1258821_50.jpg?t=1378063141000', '[]', '[]', '2017-03-05 09:51:51');
INSERT INTO `apijson_user` VALUES (82050, 0, 'Parl', NULL, 'http://static.oschina.net/uploads/user/998/1997902_50.jpg?t=1407806577000', '[]', '[]', '2017-03-05 09:52:52');
INSERT INTO `apijson_user` VALUES (82051, 0, 'Girl', NULL, 'http://static.oschina.net/uploads/user/1332/2664107_50.jpg?t=1457405500000', '[]', '[]', '2017-03-05 09:53:37');
INSERT INTO `apijson_user` VALUES (82052, 0, 'Unbrella', NULL, 'http://static.oschina.net/uploads/user/1385/2770216_50.jpg?t=1464405516000', '[]', '[]', '2017-03-05 09:57:54');
INSERT INTO `apijson_user` VALUES (82053, 0, 'Alice', NULL, 'http://common.cnblogs.com/images/wechat.png', '[]', '[]', '2017-03-05 15:25:42');
INSERT INTO `apijson_user` VALUES (82054, 0, 'Harvey', NULL, 'http://static.oschina.net/uploads/user/19/39085_50.jpg', '[]', '[]', '2017-03-06 12:29:03');
INSERT INTO `apijson_user` VALUES (82055, 1, 'Solid', NULL, 'http://static.oschina.net/uploads/user/19/39085_50.jpg', '[38710, 82002]', '[]', '2017-03-11 15:04:00');
INSERT INTO `apijson_user` VALUES (82056, 1, 'IronMan', NULL, 'http://static.oschina.net/uploads/user/48/96289_50.jpg?t=1452751699000', '[]', '[]', '2017-03-11 15:32:25');
INSERT INTO `apijson_user` VALUES (82057, 0, 'NullPointerExeption', NULL, 'http://static.oschina.net/uploads/user/1385/2770216_50.jpg?t=1464405516000', '[]', '[]', '2017-03-12 06:01:23');
INSERT INTO `apijson_user` VALUES (82058, 0, 'StupidBird', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[82001, 82002]', '[]', '2017-03-12 11:23:04');
INSERT INTO `apijson_user` VALUES (82059, 1, 'He&She', NULL, 'http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000', '[]', '[]', '2017-03-19 14:49:15');
INSERT INTO `apijson_user` VALUES (82060, 1, 'Anyway~', NULL, 'http://static.oschina.net/uploads/user/1/3064_50.jpg?t=1449566001000', '[]', '[]', '2017-03-21 14:10:18');
INSERT INTO `apijson_user` VALUES (90814, 0, '007', NULL, 'http://static.oschina.net/uploads/user/51/102723_50.jpg?t=1449212504000', '[]', '[]', '2017-02-01 11:21:50');
INSERT INTO `apijson_user` VALUES (93793, 0, 'Mike', 'GES', 'http://static.oschina.net/uploads/user/48/96331_50.jpg', '[]', '[]', '2017-02-01 11:21:50');
INSERT INTO `apijson_user` VALUES (93794, 0, 'Lemon', NULL, 'http://static.oschina.net/uploads/user/48/97721_50.jpg?t=1451544779000', '[]', '[]', '2017-02-01 11:21:50');
INSERT INTO `apijson_user` VALUES (1490109742863, 1, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-03-21 15:22:22');
INSERT INTO `apijson_user` VALUES (1490109845208, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-03-21 15:24:05');
INSERT INTO `apijson_user` VALUES (1490420651686, 1, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[70793]', '[]', '2017-03-25 05:44:11');
INSERT INTO `apijson_user` VALUES (1490427139175, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[38710, 70793]', '[]', '2017-03-25 07:32:19');
INSERT INTO `apijson_user` VALUES (1490427577823, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-03-25 07:39:37');
INSERT INTO `apijson_user` VALUES (1490584952968, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-03-27 03:22:32');
INSERT INTO `apijson_user` VALUES (1490973670928, 1, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[70793, 93793]', '[]', '2017-03-31 15:21:10');
INSERT INTO `apijson_user` VALUES (1492936169722, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-04-23 08:29:29');
INSERT INTO `apijson_user` VALUES (1493480142628, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-04-29 15:35:42');
INSERT INTO `apijson_user` VALUES (1493747512860, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-05-02 17:51:52');
INSERT INTO `apijson_user` VALUES (1493747777770, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-05-02 17:56:17');
INSERT INTO `apijson_user` VALUES (1493748594003, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-05-02 18:09:54');
INSERT INTO `apijson_user` VALUES (1493748615711, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-05-02 18:10:15');
INSERT INTO `apijson_user` VALUES (1493749090643, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-05-02 18:18:10');
INSERT INTO `apijson_user` VALUES (1493836043151, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-05-03 18:27:23');
INSERT INTO `apijson_user` VALUES (1493883110132, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-05-04 07:31:50');
INSERT INTO `apijson_user` VALUES (1493890214167, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-05-04 09:30:14');
INSERT INTO `apijson_user` VALUES (1493890303473, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-05-04 09:31:43');
INSERT INTO `apijson_user` VALUES (1493890303474, 0, 'Test Post', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-06-12 15:50:44');
INSERT INTO `apijson_user` VALUES (1497792972314, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-06-18 13:36:12');
INSERT INTO `apijson_user` VALUES (1499057230629, 0, '一二三', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-07-03 04:47:10');
INSERT INTO `apijson_user` VALUES (1500825221910, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-07-23 15:53:41');
INSERT INTO `apijson_user` VALUES (1502639062900, 0, 'TESLA', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-08-13 15:44:22');
INSERT INTO `apijson_user` VALUES (1502639424119, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-08-13 15:50:24');
INSERT INTO `apijson_user` VALUES (1507220582167, 0, 'APIJSONUser', '通过APIJSONAuto的图像化界面注册，按Enter而不是Register', 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-10-05 16:23:02');
INSERT INTO `apijson_user` VALUES (1508072071492, 0, '赵钱孙李', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-10-15 12:54:31');
INSERT INTO `apijson_user` VALUES (1508072105320, 1, '周吴郑王', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-10-15 12:55:05');
INSERT INTO `apijson_user` VALUES (1508072160401, 0, '四五六', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-10-15 12:56:00');
INSERT INTO `apijson_user` VALUES (1508072202871, 0, '七八九十', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-10-15 12:56:42');
INSERT INTO `apijson_user` VALUES (1510495628760, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-11-12 14:07:08');
INSERT INTO `apijson_user` VALUES (1511407581570, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[82002, 82003, 82005, 82006, 82021, 82023, 82036, 82033]', '[]', '2017-11-23 03:26:21');
INSERT INTO `apijson_user` VALUES (1511761906715, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-11-27 05:51:46');
INSERT INTO `apijson_user` VALUES (1511965911349, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-11-29 14:31:51');
INSERT INTO `apijson_user` VALUES (1512387063078, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-12-04 11:31:03');
INSERT INTO `apijson_user` VALUES (1512531601485, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[82001]', '[]', '2017-12-06 03:40:01');
INSERT INTO `apijson_user` VALUES (1514623064133, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', NULL, NULL, '2017-12-30 08:37:44');
INSERT INTO `apijson_user` VALUES (1514625918255, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[82002, 93793]', NULL, '2017-12-30 09:25:18');
INSERT INTO `apijson_user` VALUES (1514626163032, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', NULL, NULL, '2017-12-30 09:29:23');
INSERT INTO `apijson_user` VALUES (1514858422969, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[93793, 82056]', NULL, '2018-01-02 02:00:22');
INSERT INTO `apijson_user` VALUES (1515565976140, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[82003, 82021]', NULL, '2018-01-10 06:32:56');
INSERT INTO `apijson_user` VALUES (1518218350585, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', NULL, NULL, '2018-02-09 23:19:10');
INSERT INTO `apijson_user` VALUES (1519778917280, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', NULL, NULL, '2018-02-28 00:48:37');
INSERT INTO `apijson_user` VALUES (1520242280259, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[82002]', NULL, '2018-03-05 09:31:20');
INSERT INTO `apijson_user` VALUES (1521274648008, 0, 'Kiro', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', NULL, NULL, '2018-03-17 08:17:28');
INSERT INTO `apijson_user` VALUES (1521371722416, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', NULL, NULL, '2018-03-18 11:15:22');
INSERT INTO `apijson_user` VALUES (1521374327542, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', NULL, NULL, '2018-03-18 11:58:47');
INSERT INTO `apijson_user` VALUES (1523626157302, 1, 'Charlie_brown', '', 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[1523935772553, 93793]', NULL, '2018-04-13 13:29:17');
INSERT INTO `apijson_user` VALUES (1523935772553, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[1523626157302]', NULL, '2018-04-17 03:29:32');
INSERT INTO `apijson_user` VALUES (1524042900591, 1, '哈哈哈', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[82002, 82003]', NULL, '2018-04-18 09:15:00');
INSERT INTO `apijson_user` VALUES (1524298730523, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', NULL, '2018-04-21 08:18:50');
INSERT INTO `apijson_user` VALUES (1524878698882, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', NULL, NULL, '2018-04-28 01:24:58');
INSERT INTO `apijson_user` VALUES (1525677515673, 0, 'APIJSONUser', NULL, 'http://static.oschina.net/uploads/user/48/96289_50.jpg?t=1452751699000', '[82003, 82002, 38710]', NULL, '2018-05-07 07:18:35');
INSERT INTO `apijson_user` VALUES (1527495857924, 0, 'account', NULL, 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=2510057322,2452415311&fm=27&gp=0.jpg', '[1527821445610, 82012]', NULL, '2018-05-28 08:24:17');
INSERT INTO `apijson_user` VALUES (1527498229991, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[1499057230629]', NULL, '2018-05-28 09:03:50');
INSERT INTO `apijson_user` VALUES (1527821445610, 0, 'accountt', NULL, 'http://static.oschina.net/uploads/user/1332/2664107_50.jpg?t=1457405500000', '[1527495857924]', NULL, '2018-06-01 02:50:45');
INSERT INTO `apijson_user` VALUES (1528250827953, 1, 'limengt', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[1528264711016]', NULL, '2018-06-06 02:07:07');
INSERT INTO `apijson_user` VALUES (1528254173621, 1, 'A', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[82001, 38710]', NULL, '2018-06-06 03:02:53');
INSERT INTO `apijson_user` VALUES (1528255497767, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[82002]', NULL, '2018-06-06 03:24:57');
INSERT INTO `apijson_user` VALUES (1528264711016, 0, '梦', NULL, 'http://static.oschina.net/uploads/user/629/1258821_50.jpg?t=1378063141000', '[82021, 1528250827953]', NULL, '2018-06-06 05:58:31');
INSERT INTO `apijson_user` VALUES (1528339692804, 1, '568599', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[1528250827953, 1528264711016]', NULL, '2018-06-07 02:48:12');
INSERT INTO `apijson_user` VALUES (1528344980598, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', NULL, NULL, '2018-06-07 04:16:20');
INSERT INTO `apijson_user` VALUES (1528356470041, 0, 'aaaa', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[1528339692804]', NULL, '2018-06-07 07:27:50');
INSERT INTO `apijson_user` VALUES (1531969715979, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[82002, 82003, 82005]', NULL, '2018-07-19 03:08:35');
INSERT INTO `apijson_user` VALUES (1532188114543, 0, '宁旭', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', NULL, NULL, '2018-07-21 15:48:34');
INSERT INTO `apijson_user` VALUES (1532439021068, 0, 'huxiaofan', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[38710, 82002, 82003, 82006, 82021]', NULL, '2018-07-24 13:30:21');
INSERT INTO `apijson_user` VALUES (1533835176109, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[1532188114543]', NULL, '2018-08-09 17:19:36');
INSERT INTO `apijson_user` VALUES (1534926301956, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[82003, 82002, 82025]', NULL, '2018-08-22 08:25:01');
INSERT INTO `apijson_user` VALUES (1538504264944, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', NULL, NULL, '2018-10-02 18:17:44');
INSERT INTO `apijson_user` VALUES (1538504500574, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', NULL, NULL, '2018-10-02 18:21:40');
INSERT INTO `apijson_user` VALUES (1538987952996, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', NULL, NULL, '2018-10-08 08:39:13');
INSERT INTO `apijson_user` VALUES (1541583762603, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', NULL, NULL, '2018-11-07 09:42:42');
INSERT INTO `apijson_user` VALUES (1544276209348, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[82002, 38710]', NULL, '2018-12-08 13:36:49');
INSERT INTO `apijson_user` VALUES (1544503822963, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[93793, 82003]', NULL, '2018-12-11 04:50:22');
INSERT INTO `apijson_user` VALUES (1545707526805, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', NULL, NULL, '2018-12-25 03:12:06');
INSERT INTO `apijson_user` VALUES (1545895694424, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', NULL, NULL, '2018-12-27 07:28:14');
INSERT INTO `apijson_user` VALUES (1547177436600, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', NULL, NULL, '2019-01-11 03:30:36');
INSERT INTO `apijson_user` VALUES (1548068043688, 0, 'APIJSONUser', NULL, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', NULL, NULL, '2019-01-21 10:54:03');
COMMIT;

-- ----------------------------
-- Table structure for sys_config
-- ----------------------------
DROP TABLE IF EXISTS `sys_config`;
CREATE TABLE `sys_config` (
  `variable` varchar(128) NOT NULL,
  `value` varchar(128) DEFAULT NULL,
  `set_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `set_by` varchar(128) DEFAULT NULL,
  PRIMARY KEY (`variable`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of sys_config
-- ----------------------------
BEGIN;
INSERT INTO `sys_config` VALUES ('diagnostics.allow_i_s_tables', 'OFF', '2018-05-31 13:11:56', NULL);
INSERT INTO `sys_config` VALUES ('diagnostics.include_raw', 'OFF', '2018-05-31 13:11:56', NULL);
INSERT INTO `sys_config` VALUES ('ps_thread_trx_info.max_length', '65535', '2018-05-31 13:11:56', NULL);
INSERT INTO `sys_config` VALUES ('statement_performance_analyzer.limit', '100', '2018-05-31 13:11:56', NULL);
INSERT INTO `sys_config` VALUES ('statement_performance_analyzer.view', NULL, '2018-05-31 13:11:56', NULL);
INSERT INTO `sys_config` VALUES ('statement_truncate_len', '64', '2018-05-31 13:11:56', NULL);
COMMIT;

-- ----------------------------
-- View structure for host_summary
-- ----------------------------
DROP VIEW IF EXISTS `host_summary`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `host_summary` AS select if(isnull(`performance_schema`.`accounts`.`HOST`),'background',`performance_schema`.`accounts`.`HOST`) AS `host`,sum(`stmt`.`total`) AS `statements`,`sys`.`format_time`(sum(`stmt`.`total_latency`)) AS `statement_latency`,`sys`.`format_time`(ifnull((sum(`stmt`.`total_latency`) / nullif(sum(`stmt`.`total`),0)),0)) AS `statement_avg_latency`,sum(`stmt`.`full_scans`) AS `table_scans`,sum(`io`.`ios`) AS `file_ios`,`sys`.`format_time`(sum(`io`.`io_latency`)) AS `file_io_latency`,sum(`performance_schema`.`accounts`.`CURRENT_CONNECTIONS`) AS `current_connections`,sum(`performance_schema`.`accounts`.`TOTAL_CONNECTIONS`) AS `total_connections`,count(distinct `performance_schema`.`accounts`.`USER`) AS `unique_users`,`sys`.`format_bytes`(sum(`mem`.`current_allocated`)) AS `current_memory`,`sys`.`format_bytes`(sum(`mem`.`total_allocated`)) AS `total_memory_allocated` from (((`performance_schema`.`accounts` join `sys`.`x$host_summary_by_statement_latency` `stmt` on((`performance_schema`.`accounts`.`HOST` = `stmt`.`host`))) join `sys`.`x$host_summary_by_file_io` `io` on((`performance_schema`.`accounts`.`HOST` = `io`.`host`))) join `sys`.`x$memory_by_host_by_current_bytes` `mem` on((`performance_schema`.`accounts`.`HOST` = `mem`.`host`))) group by if(isnull(`performance_schema`.`accounts`.`HOST`),'background',`performance_schema`.`accounts`.`HOST`);

-- ----------------------------
-- View structure for host_summary_by_file_io
-- ----------------------------
DROP VIEW IF EXISTS `host_summary_by_file_io`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `host_summary_by_file_io` AS select if(isnull(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`),'background',`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`) AS `host`,sum(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`COUNT_STAR`) AS `ios`,`sys`.`format_time`(sum(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`)) AS `io_latency` from `performance_schema`.`events_waits_summary_by_host_by_event_name` where (`performance_schema`.`events_waits_summary_by_host_by_event_name`.`EVENT_NAME` like 'wait/io/file/%') group by if(isnull(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`),'background',`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`) order by sum(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`) desc;

-- ----------------------------
-- View structure for host_summary_by_file_io_type
-- ----------------------------
DROP VIEW IF EXISTS `host_summary_by_file_io_type`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `host_summary_by_file_io_type` AS select if(isnull(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`),'background',`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`) AS `host`,`performance_schema`.`events_waits_summary_by_host_by_event_name`.`EVENT_NAME` AS `event_name`,`performance_schema`.`events_waits_summary_by_host_by_event_name`.`COUNT_STAR` AS `total`,`sys`.`format_time`(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_time`(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency` from `performance_schema`.`events_waits_summary_by_host_by_event_name` where ((`performance_schema`.`events_waits_summary_by_host_by_event_name`.`EVENT_NAME` like 'wait/io/file%') and (`performance_schema`.`events_waits_summary_by_host_by_event_name`.`COUNT_STAR` > 0)) order by if(isnull(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`),'background',`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`),`performance_schema`.`events_waits_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` desc;

-- ----------------------------
-- View structure for host_summary_by_stages
-- ----------------------------
DROP VIEW IF EXISTS `host_summary_by_stages`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `host_summary_by_stages` AS select if(isnull(`performance_schema`.`events_stages_summary_by_host_by_event_name`.`HOST`),'background',`performance_schema`.`events_stages_summary_by_host_by_event_name`.`HOST`) AS `host`,`performance_schema`.`events_stages_summary_by_host_by_event_name`.`EVENT_NAME` AS `event_name`,`performance_schema`.`events_stages_summary_by_host_by_event_name`.`COUNT_STAR` AS `total`,`sys`.`format_time`(`performance_schema`.`events_stages_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_time`(`performance_schema`.`events_stages_summary_by_host_by_event_name`.`AVG_TIMER_WAIT`) AS `avg_latency` from `performance_schema`.`events_stages_summary_by_host_by_event_name` where (`performance_schema`.`events_stages_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` <> 0) order by if(isnull(`performance_schema`.`events_stages_summary_by_host_by_event_name`.`HOST`),'background',`performance_schema`.`events_stages_summary_by_host_by_event_name`.`HOST`),`performance_schema`.`events_stages_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` desc;

-- ----------------------------
-- View structure for host_summary_by_statement_latency
-- ----------------------------
DROP VIEW IF EXISTS `host_summary_by_statement_latency`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `host_summary_by_statement_latency` AS select if(isnull(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST`),'background',`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST`) AS `host`,sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`COUNT_STAR`) AS `total`,`sys`.`format_time`(sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`)) AS `total_latency`,`sys`.`format_time`(max(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`MAX_TIMER_WAIT`)) AS `max_latency`,`sys`.`format_time`(sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_LOCK_TIME`)) AS `lock_latency`,sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_ROWS_SENT`) AS `rows_sent`,sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_ROWS_EXAMINED`) AS `rows_examined`,sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_ROWS_AFFECTED`) AS `rows_affected`,(sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_NO_INDEX_USED`) + sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_NO_GOOD_INDEX_USED`)) AS `full_scans` from `performance_schema`.`events_statements_summary_by_host_by_event_name` group by if(isnull(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST`),'background',`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST`) order by sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`) desc;

-- ----------------------------
-- View structure for host_summary_by_statement_type
-- ----------------------------
DROP VIEW IF EXISTS `host_summary_by_statement_type`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `host_summary_by_statement_type` AS select if(isnull(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST`),'background',`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST`) AS `host`,substring_index(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`EVENT_NAME`,'/',-(1)) AS `statement`,`performance_schema`.`events_statements_summary_by_host_by_event_name`.`COUNT_STAR` AS `total`,`sys`.`format_time`(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_time`(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency`,`sys`.`format_time`(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_LOCK_TIME`) AS `lock_latency`,`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_ROWS_SENT` AS `rows_sent`,`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_ROWS_EXAMINED` AS `rows_examined`,`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_ROWS_AFFECTED` AS `rows_affected`,(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_NO_INDEX_USED` + `performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_NO_GOOD_INDEX_USED`) AS `full_scans` from `performance_schema`.`events_statements_summary_by_host_by_event_name` where (`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` <> 0) order by if(isnull(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST`),'background',`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST`),`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` desc;

-- ----------------------------
-- View structure for innodb_buffer_stats_by_schema
-- ----------------------------
DROP VIEW IF EXISTS `innodb_buffer_stats_by_schema`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `innodb_buffer_stats_by_schema` AS select if((locate('.',`ibp`.`TABLE_NAME`) = 0),'InnoDB System',replace(substring_index(`ibp`.`TABLE_NAME`,'.',1),'`','')) AS `object_schema`,`sys`.`format_bytes`(sum(if((`ibp`.`COMPRESSED_SIZE` = 0),16384,`ibp`.`COMPRESSED_SIZE`))) AS `allocated`,`sys`.`format_bytes`(sum(`ibp`.`DATA_SIZE`)) AS `data`,count(`ibp`.`PAGE_NUMBER`) AS `pages`,count(if((`ibp`.`IS_HASHED` = 'YES'),1,NULL)) AS `pages_hashed`,count(if((`ibp`.`IS_OLD` = 'YES'),1,NULL)) AS `pages_old`,round((sum(`ibp`.`NUMBER_RECORDS`) / count(distinct `ibp`.`INDEX_NAME`)),0) AS `rows_cached` from `information_schema`.`innodb_buffer_page` `ibp` where (`ibp`.`TABLE_NAME` is not null) group by `object_schema` order by sum(if((`ibp`.`COMPRESSED_SIZE` = 0),16384,`ibp`.`COMPRESSED_SIZE`)) desc;

-- ----------------------------
-- View structure for innodb_buffer_stats_by_table
-- ----------------------------
DROP VIEW IF EXISTS `innodb_buffer_stats_by_table`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `innodb_buffer_stats_by_table` AS select if((locate('.',`ibp`.`TABLE_NAME`) = 0),'InnoDB System',replace(substring_index(`ibp`.`TABLE_NAME`,'.',1),'`','')) AS `object_schema`,replace(substring_index(`ibp`.`TABLE_NAME`,'.',-(1)),'`','') AS `object_name`,`sys`.`format_bytes`(sum(if((`ibp`.`COMPRESSED_SIZE` = 0),16384,`ibp`.`COMPRESSED_SIZE`))) AS `allocated`,`sys`.`format_bytes`(sum(`ibp`.`DATA_SIZE`)) AS `data`,count(`ibp`.`PAGE_NUMBER`) AS `pages`,count(if((`ibp`.`IS_HASHED` = 'YES'),1,NULL)) AS `pages_hashed`,count(if((`ibp`.`IS_OLD` = 'YES'),1,NULL)) AS `pages_old`,round((sum(`ibp`.`NUMBER_RECORDS`) / count(distinct `ibp`.`INDEX_NAME`)),0) AS `rows_cached` from `information_schema`.`innodb_buffer_page` `ibp` where (`ibp`.`TABLE_NAME` is not null) group by `object_schema`,`object_name` order by sum(if((`ibp`.`COMPRESSED_SIZE` = 0),16384,`ibp`.`COMPRESSED_SIZE`)) desc;

-- ----------------------------
-- View structure for innodb_lock_waits
-- ----------------------------
DROP VIEW IF EXISTS `innodb_lock_waits`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `innodb_lock_waits` AS select `r`.`trx_wait_started` AS `wait_started`,timediff(now(),`r`.`trx_wait_started`) AS `wait_age`,timestampdiff(SECOND,`r`.`trx_wait_started`,now()) AS `wait_age_secs`,`rl`.`lock_table` AS `locked_table`,`rl`.`lock_index` AS `locked_index`,`rl`.`lock_type` AS `locked_type`,`r`.`trx_id` AS `waiting_trx_id`,`r`.`trx_started` AS `waiting_trx_started`,timediff(now(),`r`.`trx_started`) AS `waiting_trx_age`,`r`.`trx_rows_locked` AS `waiting_trx_rows_locked`,`r`.`trx_rows_modified` AS `waiting_trx_rows_modified`,`r`.`trx_mysql_thread_id` AS `waiting_pid`,`sys`.`format_statement`(`r`.`trx_query`) AS `waiting_query`,`rl`.`lock_id` AS `waiting_lock_id`,`rl`.`lock_mode` AS `waiting_lock_mode`,`b`.`trx_id` AS `blocking_trx_id`,`b`.`trx_mysql_thread_id` AS `blocking_pid`,`sys`.`format_statement`(`b`.`trx_query`) AS `blocking_query`,`bl`.`lock_id` AS `blocking_lock_id`,`bl`.`lock_mode` AS `blocking_lock_mode`,`b`.`trx_started` AS `blocking_trx_started`,timediff(now(),`b`.`trx_started`) AS `blocking_trx_age`,`b`.`trx_rows_locked` AS `blocking_trx_rows_locked`,`b`.`trx_rows_modified` AS `blocking_trx_rows_modified`,concat('KILL QUERY ',`b`.`trx_mysql_thread_id`) AS `sql_kill_blocking_query`,concat('KILL ',`b`.`trx_mysql_thread_id`) AS `sql_kill_blocking_connection` from ((((`information_schema`.`innodb_lock_waits` `w` join `information_schema`.`innodb_trx` `b` on((`b`.`trx_id` = `w`.`blocking_trx_id`))) join `information_schema`.`innodb_trx` `r` on((`r`.`trx_id` = `w`.`requesting_trx_id`))) join `information_schema`.`innodb_locks` `bl` on((`bl`.`lock_id` = `w`.`blocking_lock_id`))) join `information_schema`.`innodb_locks` `rl` on((`rl`.`lock_id` = `w`.`requested_lock_id`))) order by `r`.`trx_wait_started`;

-- ----------------------------
-- View structure for io_by_thread_by_latency
-- ----------------------------
DROP VIEW IF EXISTS `io_by_thread_by_latency`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `io_by_thread_by_latency` AS select if(isnull(`performance_schema`.`threads`.`PROCESSLIST_ID`),substring_index(`performance_schema`.`threads`.`NAME`,'/',-(1)),concat(`performance_schema`.`threads`.`PROCESSLIST_USER`,'@',`performance_schema`.`threads`.`PROCESSLIST_HOST`)) AS `user`,sum(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`COUNT_STAR`) AS `total`,`sys`.`format_time`(sum(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`SUM_TIMER_WAIT`)) AS `total_latency`,`sys`.`format_time`(min(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`MIN_TIMER_WAIT`)) AS `min_latency`,`sys`.`format_time`(avg(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`AVG_TIMER_WAIT`)) AS `avg_latency`,`sys`.`format_time`(max(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`MAX_TIMER_WAIT`)) AS `max_latency`,`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`THREAD_ID` AS `thread_id`,`performance_schema`.`threads`.`PROCESSLIST_ID` AS `processlist_id` from (`performance_schema`.`events_waits_summary_by_thread_by_event_name` left join `performance_schema`.`threads` on((`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`THREAD_ID` = `performance_schema`.`threads`.`THREAD_ID`))) where ((`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`EVENT_NAME` like 'wait/io/file/%') and (`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`SUM_TIMER_WAIT` > 0)) group by `performance_schema`.`events_waits_summary_by_thread_by_event_name`.`THREAD_ID`,`performance_schema`.`threads`.`PROCESSLIST_ID`,`user` order by sum(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`SUM_TIMER_WAIT`) desc;

-- ----------------------------
-- View structure for io_global_by_file_by_bytes
-- ----------------------------
DROP VIEW IF EXISTS `io_global_by_file_by_bytes`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `io_global_by_file_by_bytes` AS select `sys`.`format_path`(`performance_schema`.`file_summary_by_instance`.`FILE_NAME`) AS `file`,`performance_schema`.`file_summary_by_instance`.`COUNT_READ` AS `count_read`,`sys`.`format_bytes`(`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_READ`) AS `total_read`,`sys`.`format_bytes`(ifnull((`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_READ` / nullif(`performance_schema`.`file_summary_by_instance`.`COUNT_READ`,0)),0)) AS `avg_read`,`performance_schema`.`file_summary_by_instance`.`COUNT_WRITE` AS `count_write`,`sys`.`format_bytes`(`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_WRITE`) AS `total_written`,`sys`.`format_bytes`(ifnull((`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_WRITE` / nullif(`performance_schema`.`file_summary_by_instance`.`COUNT_WRITE`,0)),0.00)) AS `avg_write`,`sys`.`format_bytes`((`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_READ` + `performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_WRITE`)) AS `total`,ifnull(round((100 - ((`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_READ` / nullif((`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_READ` + `performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_WRITE`),0)) * 100)),2),0.00) AS `write_pct` from `performance_schema`.`file_summary_by_instance` order by (`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_READ` + `performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_WRITE`) desc;

-- ----------------------------
-- View structure for io_global_by_file_by_latency
-- ----------------------------
DROP VIEW IF EXISTS `io_global_by_file_by_latency`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `io_global_by_file_by_latency` AS select `sys`.`format_path`(`performance_schema`.`file_summary_by_instance`.`FILE_NAME`) AS `file`,`performance_schema`.`file_summary_by_instance`.`COUNT_STAR` AS `total`,`sys`.`format_time`(`performance_schema`.`file_summary_by_instance`.`SUM_TIMER_WAIT`) AS `total_latency`,`performance_schema`.`file_summary_by_instance`.`COUNT_READ` AS `count_read`,`sys`.`format_time`(`performance_schema`.`file_summary_by_instance`.`SUM_TIMER_READ`) AS `read_latency`,`performance_schema`.`file_summary_by_instance`.`COUNT_WRITE` AS `count_write`,`sys`.`format_time`(`performance_schema`.`file_summary_by_instance`.`SUM_TIMER_WRITE`) AS `write_latency`,`performance_schema`.`file_summary_by_instance`.`COUNT_MISC` AS `count_misc`,`sys`.`format_time`(`performance_schema`.`file_summary_by_instance`.`SUM_TIMER_MISC`) AS `misc_latency` from `performance_schema`.`file_summary_by_instance` order by `performance_schema`.`file_summary_by_instance`.`SUM_TIMER_WAIT` desc;

-- ----------------------------
-- View structure for io_global_by_wait_by_bytes
-- ----------------------------
DROP VIEW IF EXISTS `io_global_by_wait_by_bytes`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `io_global_by_wait_by_bytes` AS select substring_index(`performance_schema`.`file_summary_by_event_name`.`EVENT_NAME`,'/',-(2)) AS `event_name`,`performance_schema`.`file_summary_by_event_name`.`COUNT_STAR` AS `total`,`sys`.`format_time`(`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_time`(`performance_schema`.`file_summary_by_event_name`.`MIN_TIMER_WAIT`) AS `min_latency`,`sys`.`format_time`(`performance_schema`.`file_summary_by_event_name`.`AVG_TIMER_WAIT`) AS `avg_latency`,`sys`.`format_time`(`performance_schema`.`file_summary_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency`,`performance_schema`.`file_summary_by_event_name`.`COUNT_READ` AS `count_read`,`sys`.`format_bytes`(`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_READ`) AS `total_read`,`sys`.`format_bytes`(ifnull((`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_READ` / nullif(`performance_schema`.`file_summary_by_event_name`.`COUNT_READ`,0)),0)) AS `avg_read`,`performance_schema`.`file_summary_by_event_name`.`COUNT_WRITE` AS `count_write`,`sys`.`format_bytes`(`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_WRITE`) AS `total_written`,`sys`.`format_bytes`(ifnull((`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_WRITE` / nullif(`performance_schema`.`file_summary_by_event_name`.`COUNT_WRITE`,0)),0)) AS `avg_written`,`sys`.`format_bytes`((`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_WRITE` + `performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_READ`)) AS `total_requested` from `performance_schema`.`file_summary_by_event_name` where ((`performance_schema`.`file_summary_by_event_name`.`EVENT_NAME` like 'wait/io/file/%') and (`performance_schema`.`file_summary_by_event_name`.`COUNT_STAR` > 0)) order by (`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_WRITE` + `performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_READ`) desc;

-- ----------------------------
-- View structure for io_global_by_wait_by_latency
-- ----------------------------
DROP VIEW IF EXISTS `io_global_by_wait_by_latency`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `io_global_by_wait_by_latency` AS select substring_index(`performance_schema`.`file_summary_by_event_name`.`EVENT_NAME`,'/',-(2)) AS `event_name`,`performance_schema`.`file_summary_by_event_name`.`COUNT_STAR` AS `total`,`sys`.`format_time`(`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_time`(`performance_schema`.`file_summary_by_event_name`.`AVG_TIMER_WAIT`) AS `avg_latency`,`sys`.`format_time`(`performance_schema`.`file_summary_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency`,`sys`.`format_time`(`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_READ`) AS `read_latency`,`sys`.`format_time`(`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_WRITE`) AS `write_latency`,`sys`.`format_time`(`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_MISC`) AS `misc_latency`,`performance_schema`.`file_summary_by_event_name`.`COUNT_READ` AS `count_read`,`sys`.`format_bytes`(`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_READ`) AS `total_read`,`sys`.`format_bytes`(ifnull((`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_READ` / nullif(`performance_schema`.`file_summary_by_event_name`.`COUNT_READ`,0)),0)) AS `avg_read`,`performance_schema`.`file_summary_by_event_name`.`COUNT_WRITE` AS `count_write`,`sys`.`format_bytes`(`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_WRITE`) AS `total_written`,`sys`.`format_bytes`(ifnull((`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_WRITE` / nullif(`performance_schema`.`file_summary_by_event_name`.`COUNT_WRITE`,0)),0)) AS `avg_written` from `performance_schema`.`file_summary_by_event_name` where ((`performance_schema`.`file_summary_by_event_name`.`EVENT_NAME` like 'wait/io/file/%') and (`performance_schema`.`file_summary_by_event_name`.`COUNT_STAR` > 0)) order by `performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_WAIT` desc;

-- ----------------------------
-- View structure for latest_file_io
-- ----------------------------
DROP VIEW IF EXISTS `latest_file_io`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `latest_file_io` AS select if(isnull(`information_schema`.`processlist`.`ID`),concat(substring_index(`performance_schema`.`threads`.`NAME`,'/',-(1)),':',`performance_schema`.`events_waits_history_long`.`THREAD_ID`),concat(`information_schema`.`processlist`.`USER`,'@',`information_schema`.`processlist`.`HOST`,':',`information_schema`.`processlist`.`ID`)) AS `thread`,`sys`.`format_path`(`performance_schema`.`events_waits_history_long`.`OBJECT_NAME`) AS `file`,`sys`.`format_time`(`performance_schema`.`events_waits_history_long`.`TIMER_WAIT`) AS `latency`,`performance_schema`.`events_waits_history_long`.`OPERATION` AS `operation`,`sys`.`format_bytes`(`performance_schema`.`events_waits_history_long`.`NUMBER_OF_BYTES`) AS `requested` from ((`performance_schema`.`events_waits_history_long` join `performance_schema`.`threads` on((`performance_schema`.`events_waits_history_long`.`THREAD_ID` = `performance_schema`.`threads`.`THREAD_ID`))) left join `information_schema`.`processlist` on((`performance_schema`.`threads`.`PROCESSLIST_ID` = `information_schema`.`processlist`.`ID`))) where ((`performance_schema`.`events_waits_history_long`.`OBJECT_NAME` is not null) and (`performance_schema`.`events_waits_history_long`.`EVENT_NAME` like 'wait/io/file/%')) order by `performance_schema`.`events_waits_history_long`.`TIMER_START`;

-- ----------------------------
-- View structure for memory_by_host_by_current_bytes
-- ----------------------------
DROP VIEW IF EXISTS `memory_by_host_by_current_bytes`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `memory_by_host_by_current_bytes` AS select if(isnull(`performance_schema`.`memory_summary_by_host_by_event_name`.`HOST`),'background',`performance_schema`.`memory_summary_by_host_by_event_name`.`HOST`) AS `host`,sum(`performance_schema`.`memory_summary_by_host_by_event_name`.`CURRENT_COUNT_USED`) AS `current_count_used`,`sys`.`format_bytes`(sum(`performance_schema`.`memory_summary_by_host_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`)) AS `current_allocated`,`sys`.`format_bytes`(ifnull((sum(`performance_schema`.`memory_summary_by_host_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`) / nullif(sum(`performance_schema`.`memory_summary_by_host_by_event_name`.`CURRENT_COUNT_USED`),0)),0)) AS `current_avg_alloc`,`sys`.`format_bytes`(max(`performance_schema`.`memory_summary_by_host_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`)) AS `current_max_alloc`,`sys`.`format_bytes`(sum(`performance_schema`.`memory_summary_by_host_by_event_name`.`SUM_NUMBER_OF_BYTES_ALLOC`)) AS `total_allocated` from `performance_schema`.`memory_summary_by_host_by_event_name` group by if(isnull(`performance_schema`.`memory_summary_by_host_by_event_name`.`HOST`),'background',`performance_schema`.`memory_summary_by_host_by_event_name`.`HOST`) order by sum(`performance_schema`.`memory_summary_by_host_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`) desc;

-- ----------------------------
-- View structure for memory_by_thread_by_current_bytes
-- ----------------------------
DROP VIEW IF EXISTS `memory_by_thread_by_current_bytes`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `memory_by_thread_by_current_bytes` AS select `mt`.`THREAD_ID` AS `thread_id`,if((`t`.`NAME` = 'thread/sql/one_connection'),concat(`t`.`PROCESSLIST_USER`,'@',`t`.`PROCESSLIST_HOST`),replace(`t`.`NAME`,'thread/','')) AS `user`,sum(`mt`.`CURRENT_COUNT_USED`) AS `current_count_used`,`sys`.`format_bytes`(sum(`mt`.`CURRENT_NUMBER_OF_BYTES_USED`)) AS `current_allocated`,`sys`.`format_bytes`(ifnull((sum(`mt`.`CURRENT_NUMBER_OF_BYTES_USED`) / nullif(sum(`mt`.`CURRENT_COUNT_USED`),0)),0)) AS `current_avg_alloc`,`sys`.`format_bytes`(max(`mt`.`CURRENT_NUMBER_OF_BYTES_USED`)) AS `current_max_alloc`,`sys`.`format_bytes`(sum(`mt`.`SUM_NUMBER_OF_BYTES_ALLOC`)) AS `total_allocated` from (`performance_schema`.`memory_summary_by_thread_by_event_name` `mt` join `performance_schema`.`threads` `t` on((`mt`.`THREAD_ID` = `t`.`THREAD_ID`))) group by `mt`.`THREAD_ID`,if((`t`.`NAME` = 'thread/sql/one_connection'),concat(`t`.`PROCESSLIST_USER`,'@',`t`.`PROCESSLIST_HOST`),replace(`t`.`NAME`,'thread/','')) order by sum(`mt`.`CURRENT_NUMBER_OF_BYTES_USED`) desc;

-- ----------------------------
-- View structure for memory_by_user_by_current_bytes
-- ----------------------------
DROP VIEW IF EXISTS `memory_by_user_by_current_bytes`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `memory_by_user_by_current_bytes` AS select if(isnull(`performance_schema`.`memory_summary_by_user_by_event_name`.`USER`),'background',`performance_schema`.`memory_summary_by_user_by_event_name`.`USER`) AS `user`,sum(`performance_schema`.`memory_summary_by_user_by_event_name`.`CURRENT_COUNT_USED`) AS `current_count_used`,`sys`.`format_bytes`(sum(`performance_schema`.`memory_summary_by_user_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`)) AS `current_allocated`,`sys`.`format_bytes`(ifnull((sum(`performance_schema`.`memory_summary_by_user_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`) / nullif(sum(`performance_schema`.`memory_summary_by_user_by_event_name`.`CURRENT_COUNT_USED`),0)),0)) AS `current_avg_alloc`,`sys`.`format_bytes`(max(`performance_schema`.`memory_summary_by_user_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`)) AS `current_max_alloc`,`sys`.`format_bytes`(sum(`performance_schema`.`memory_summary_by_user_by_event_name`.`SUM_NUMBER_OF_BYTES_ALLOC`)) AS `total_allocated` from `performance_schema`.`memory_summary_by_user_by_event_name` group by if(isnull(`performance_schema`.`memory_summary_by_user_by_event_name`.`USER`),'background',`performance_schema`.`memory_summary_by_user_by_event_name`.`USER`) order by sum(`performance_schema`.`memory_summary_by_user_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`) desc;

-- ----------------------------
-- View structure for memory_global_by_current_bytes
-- ----------------------------
DROP VIEW IF EXISTS `memory_global_by_current_bytes`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `memory_global_by_current_bytes` AS select `performance_schema`.`memory_summary_global_by_event_name`.`EVENT_NAME` AS `event_name`,`performance_schema`.`memory_summary_global_by_event_name`.`CURRENT_COUNT_USED` AS `current_count`,`sys`.`format_bytes`(`performance_schema`.`memory_summary_global_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`) AS `current_alloc`,`sys`.`format_bytes`(ifnull((`performance_schema`.`memory_summary_global_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED` / nullif(`performance_schema`.`memory_summary_global_by_event_name`.`CURRENT_COUNT_USED`,0)),0)) AS `current_avg_alloc`,`performance_schema`.`memory_summary_global_by_event_name`.`HIGH_COUNT_USED` AS `high_count`,`sys`.`format_bytes`(`performance_schema`.`memory_summary_global_by_event_name`.`HIGH_NUMBER_OF_BYTES_USED`) AS `high_alloc`,`sys`.`format_bytes`(ifnull((`performance_schema`.`memory_summary_global_by_event_name`.`HIGH_NUMBER_OF_BYTES_USED` / nullif(`performance_schema`.`memory_summary_global_by_event_name`.`HIGH_COUNT_USED`,0)),0)) AS `high_avg_alloc` from `performance_schema`.`memory_summary_global_by_event_name` where (`performance_schema`.`memory_summary_global_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED` > 0) order by `performance_schema`.`memory_summary_global_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED` desc;

-- ----------------------------
-- View structure for memory_global_total
-- ----------------------------
DROP VIEW IF EXISTS `memory_global_total`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `memory_global_total` AS select `sys`.`format_bytes`(sum(`performance_schema`.`memory_summary_global_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`)) AS `total_allocated` from `performance_schema`.`memory_summary_global_by_event_name`;

-- ----------------------------
-- View structure for metrics
-- ----------------------------
DROP VIEW IF EXISTS `metrics`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `metrics` AS (select lower(`performance_schema`.`global_status`.`VARIABLE_NAME`) AS `Variable_name`,`performance_schema`.`global_status`.`VARIABLE_VALUE` AS `Variable_value`,'Global Status' AS `Type`,'YES' AS `Enabled` from `performance_schema`.`global_status`) union all (select `information_schema`.`INNODB_METRICS`.`NAME` AS `Variable_name`,`information_schema`.`INNODB_METRICS`.`COUNT` AS `Variable_value`,concat('InnoDB Metrics - ',`information_schema`.`INNODB_METRICS`.`SUBSYSTEM`) AS `Type`,if((`information_schema`.`INNODB_METRICS`.`STATUS` = 'enabled'),'YES','NO') AS `Enabled` from `information_schema`.`INNODB_METRICS` where (`information_schema`.`INNODB_METRICS`.`NAME` not in ('lock_row_lock_time','lock_row_lock_time_avg','lock_row_lock_time_max','lock_row_lock_waits','buffer_pool_reads','buffer_pool_read_requests','buffer_pool_write_requests','buffer_pool_wait_free','buffer_pool_read_ahead','buffer_pool_read_ahead_evicted','buffer_pool_pages_total','buffer_pool_pages_misc','buffer_pool_pages_data','buffer_pool_bytes_data','buffer_pool_pages_dirty','buffer_pool_bytes_dirty','buffer_pool_pages_free','buffer_pages_created','buffer_pages_written','buffer_pages_read','buffer_data_reads','buffer_data_written','file_num_open_files','os_log_bytes_written','os_log_fsyncs','os_log_pending_fsyncs','os_log_pending_writes','log_waits','log_write_requests','log_writes','innodb_dblwr_writes','innodb_dblwr_pages_written','innodb_page_size'))) union all (select 'memory_current_allocated' AS `Variable_name`,sum(`performance_schema`.`memory_summary_global_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`) AS `Variable_value`,'Performance Schema' AS `Type`,if(((select count(0) from `performance_schema`.`setup_instruments` where ((`performance_schema`.`setup_instruments`.`NAME` like 'memory/%') and (`performance_schema`.`setup_instruments`.`ENABLED` = 'YES'))) = 0),'NO',if(((select count(0) from `performance_schema`.`setup_instruments` where ((`performance_schema`.`setup_instruments`.`NAME` like 'memory/%') and (`performance_schema`.`setup_instruments`.`ENABLED` = 'YES'))) = (select count(0) from `performance_schema`.`setup_instruments` where (`performance_schema`.`setup_instruments`.`NAME` like 'memory/%'))),'YES','PARTIAL')) AS `Enabled` from `performance_schema`.`memory_summary_global_by_event_name`) union all (select 'memory_total_allocated' AS `Variable_name`,sum(`performance_schema`.`memory_summary_global_by_event_name`.`SUM_NUMBER_OF_BYTES_ALLOC`) AS `Variable_value`,'Performance Schema' AS `Type`,if(((select count(0) from `performance_schema`.`setup_instruments` where ((`performance_schema`.`setup_instruments`.`NAME` like 'memory/%') and (`performance_schema`.`setup_instruments`.`ENABLED` = 'YES'))) = 0),'NO',if(((select count(0) from `performance_schema`.`setup_instruments` where ((`performance_schema`.`setup_instruments`.`NAME` like 'memory/%') and (`performance_schema`.`setup_instruments`.`ENABLED` = 'YES'))) = (select count(0) from `performance_schema`.`setup_instruments` where (`performance_schema`.`setup_instruments`.`NAME` like 'memory/%'))),'YES','PARTIAL')) AS `Enabled` from `performance_schema`.`memory_summary_global_by_event_name`) union all (select 'NOW()' AS `Variable_name`,now(3) AS `Variable_value`,'System Time' AS `Type`,'YES' AS `Enabled`) union all (select 'UNIX_TIMESTAMP()' AS `Variable_name`,round(unix_timestamp(now(3)),3) AS `Variable_value`,'System Time' AS `Type`,'YES' AS `Enabled`) order by `Type`,`Variable_name`;

-- ----------------------------
-- View structure for processlist
-- ----------------------------
DROP VIEW IF EXISTS `processlist`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `processlist` AS select `pps`.`THREAD_ID` AS `thd_id`,`pps`.`PROCESSLIST_ID` AS `conn_id`,if((`pps`.`NAME` = 'thread/sql/one_connection'),concat(`pps`.`PROCESSLIST_USER`,'@',`pps`.`PROCESSLIST_HOST`),replace(`pps`.`NAME`,'thread/','')) AS `user`,`pps`.`PROCESSLIST_DB` AS `db`,`pps`.`PROCESSLIST_COMMAND` AS `command`,`pps`.`PROCESSLIST_STATE` AS `state`,`pps`.`PROCESSLIST_TIME` AS `time`,`sys`.`format_statement`(`pps`.`PROCESSLIST_INFO`) AS `current_statement`,if(isnull(`esc`.`END_EVENT_ID`),`sys`.`format_time`(`esc`.`TIMER_WAIT`),NULL) AS `statement_latency`,if(isnull(`esc`.`END_EVENT_ID`),round((100 * (`estc`.`WORK_COMPLETED` / `estc`.`WORK_ESTIMATED`)),2),NULL) AS `progress`,`sys`.`format_time`(`esc`.`LOCK_TIME`) AS `lock_latency`,`esc`.`ROWS_EXAMINED` AS `rows_examined`,`esc`.`ROWS_SENT` AS `rows_sent`,`esc`.`ROWS_AFFECTED` AS `rows_affected`,`esc`.`CREATED_TMP_TABLES` AS `tmp_tables`,`esc`.`CREATED_TMP_DISK_TABLES` AS `tmp_disk_tables`,if(((`esc`.`NO_GOOD_INDEX_USED` > 0) or (`esc`.`NO_INDEX_USED` > 0)),'YES','NO') AS `full_scan`,if((`esc`.`END_EVENT_ID` is not null),`sys`.`format_statement`(`esc`.`SQL_TEXT`),NULL) AS `last_statement`,if((`esc`.`END_EVENT_ID` is not null),`sys`.`format_time`(`esc`.`TIMER_WAIT`),NULL) AS `last_statement_latency`,`sys`.`format_bytes`(`mem`.`current_allocated`) AS `current_memory`,`ewc`.`EVENT_NAME` AS `last_wait`,if((isnull(`ewc`.`END_EVENT_ID`) and (`ewc`.`EVENT_NAME` is not null)),'Still Waiting',`sys`.`format_time`(`ewc`.`TIMER_WAIT`)) AS `last_wait_latency`,`ewc`.`SOURCE` AS `source`,`sys`.`format_time`(`etc`.`TIMER_WAIT`) AS `trx_latency`,`etc`.`STATE` AS `trx_state`,`etc`.`AUTOCOMMIT` AS `trx_autocommit`,`conattr_pid`.`ATTR_VALUE` AS `pid`,`conattr_progname`.`ATTR_VALUE` AS `program_name` from (((((((`performance_schema`.`threads` `pps` left join `performance_schema`.`events_waits_current` `ewc` on((`pps`.`THREAD_ID` = `ewc`.`THREAD_ID`))) left join `performance_schema`.`events_stages_current` `estc` on((`pps`.`THREAD_ID` = `estc`.`THREAD_ID`))) left join `performance_schema`.`events_statements_current` `esc` on((`pps`.`THREAD_ID` = `esc`.`THREAD_ID`))) left join `performance_schema`.`events_transactions_current` `etc` on((`pps`.`THREAD_ID` = `etc`.`THREAD_ID`))) left join `sys`.`x$memory_by_thread_by_current_bytes` `mem` on((`pps`.`THREAD_ID` = `mem`.`thread_id`))) left join `performance_schema`.`session_connect_attrs` `conattr_pid` on(((`conattr_pid`.`PROCESSLIST_ID` = `pps`.`PROCESSLIST_ID`) and (`conattr_pid`.`ATTR_NAME` = '_pid')))) left join `performance_schema`.`session_connect_attrs` `conattr_progname` on(((`conattr_progname`.`PROCESSLIST_ID` = `pps`.`PROCESSLIST_ID`) and (`conattr_progname`.`ATTR_NAME` = 'program_name')))) order by `pps`.`PROCESSLIST_TIME` desc,`last_wait_latency` desc;

-- ----------------------------
-- View structure for ps_check_lost_instrumentation
-- ----------------------------
DROP VIEW IF EXISTS `ps_check_lost_instrumentation`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `ps_check_lost_instrumentation` AS select `performance_schema`.`global_status`.`VARIABLE_NAME` AS `variable_name`,`performance_schema`.`global_status`.`VARIABLE_VALUE` AS `variable_value` from `performance_schema`.`global_status` where ((`performance_schema`.`global_status`.`VARIABLE_NAME` like 'perf%lost') and (`performance_schema`.`global_status`.`VARIABLE_VALUE` > 0));

-- ----------------------------
-- View structure for schema_auto_increment_columns
-- ----------------------------
DROP VIEW IF EXISTS `schema_auto_increment_columns`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `schema_auto_increment_columns` AS select `information_schema`.`COLUMNS`.`TABLE_SCHEMA` AS `table_schema`,`information_schema`.`COLUMNS`.`TABLE_NAME` AS `table_name`,`information_schema`.`COLUMNS`.`COLUMN_NAME` AS `column_name`,`information_schema`.`COLUMNS`.`DATA_TYPE` AS `data_type`,`information_schema`.`COLUMNS`.`COLUMN_TYPE` AS `column_type`,(locate('unsigned',`information_schema`.`COLUMNS`.`COLUMN_TYPE`) = 0) AS `is_signed`,(locate('unsigned',`information_schema`.`COLUMNS`.`COLUMN_TYPE`) > 0) AS `is_unsigned`,((case `information_schema`.`COLUMNS`.`DATA_TYPE` when 'tinyint' then 255 when 'smallint' then 65535 when 'mediumint' then 16777215 when 'int' then 4294967295 when 'bigint' then 18446744073709551615 end) >> if((locate('unsigned',`information_schema`.`COLUMNS`.`COLUMN_TYPE`) > 0),0,1)) AS `max_value`,`information_schema`.`TABLES`.`AUTO_INCREMENT` AS `auto_increment`,(`information_schema`.`TABLES`.`AUTO_INCREMENT` / ((case `information_schema`.`COLUMNS`.`DATA_TYPE` when 'tinyint' then 255 when 'smallint' then 65535 when 'mediumint' then 16777215 when 'int' then 4294967295 when 'bigint' then 18446744073709551615 end) >> if((locate('unsigned',`information_schema`.`COLUMNS`.`COLUMN_TYPE`) > 0),0,1))) AS `auto_increment_ratio` from (`INFORMATION_SCHEMA`.`COLUMNS` join `INFORMATION_SCHEMA`.`TABLES` on(((`information_schema`.`COLUMNS`.`TABLE_SCHEMA` = `information_schema`.`TABLES`.`TABLE_SCHEMA`) and (`information_schema`.`COLUMNS`.`TABLE_NAME` = `information_schema`.`TABLES`.`TABLE_NAME`)))) where ((`information_schema`.`COLUMNS`.`TABLE_SCHEMA` not in ('mysql','sys','INFORMATION_SCHEMA','performance_schema')) and (`information_schema`.`TABLES`.`TABLE_TYPE` = 'BASE TABLE') and (`information_schema`.`COLUMNS`.`EXTRA` = 'auto_increment')) order by (`information_schema`.`TABLES`.`AUTO_INCREMENT` / ((case `information_schema`.`COLUMNS`.`DATA_TYPE` when 'tinyint' then 255 when 'smallint' then 65535 when 'mediumint' then 16777215 when 'int' then 4294967295 when 'bigint' then 18446744073709551615 end) >> if((locate('unsigned',`information_schema`.`COLUMNS`.`COLUMN_TYPE`) > 0),0,1))) desc,((case `information_schema`.`COLUMNS`.`DATA_TYPE` when 'tinyint' then 255 when 'smallint' then 65535 when 'mediumint' then 16777215 when 'int' then 4294967295 when 'bigint' then 18446744073709551615 end) >> if((locate('unsigned',`information_schema`.`COLUMNS`.`COLUMN_TYPE`) > 0),0,1));

-- ----------------------------
-- View structure for schema_index_statistics
-- ----------------------------
DROP VIEW IF EXISTS `schema_index_statistics`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `schema_index_statistics` AS select `performance_schema`.`table_io_waits_summary_by_index_usage`.`OBJECT_SCHEMA` AS `table_schema`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`OBJECT_NAME` AS `table_name`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`INDEX_NAME` AS `index_name`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`COUNT_FETCH` AS `rows_selected`,`sys`.`format_time`(`performance_schema`.`table_io_waits_summary_by_index_usage`.`SUM_TIMER_FETCH`) AS `select_latency`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`COUNT_INSERT` AS `rows_inserted`,`sys`.`format_time`(`performance_schema`.`table_io_waits_summary_by_index_usage`.`SUM_TIMER_INSERT`) AS `insert_latency`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`COUNT_UPDATE` AS `rows_updated`,`sys`.`format_time`(`performance_schema`.`table_io_waits_summary_by_index_usage`.`SUM_TIMER_UPDATE`) AS `update_latency`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`COUNT_DELETE` AS `rows_deleted`,`sys`.`format_time`(`performance_schema`.`table_io_waits_summary_by_index_usage`.`SUM_TIMER_INSERT`) AS `delete_latency` from `performance_schema`.`table_io_waits_summary_by_index_usage` where (`performance_schema`.`table_io_waits_summary_by_index_usage`.`INDEX_NAME` is not null) order by `performance_schema`.`table_io_waits_summary_by_index_usage`.`SUM_TIMER_WAIT` desc;

-- ----------------------------
-- View structure for schema_object_overview
-- ----------------------------
DROP VIEW IF EXISTS `schema_object_overview`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `schema_object_overview` AS select `information_schema`.`routines`.`ROUTINE_SCHEMA` AS `db`,`information_schema`.`routines`.`ROUTINE_TYPE` AS `object_type`,count(0) AS `count` from `information_schema`.`routines` group by `information_schema`.`routines`.`ROUTINE_SCHEMA`,`information_schema`.`routines`.`ROUTINE_TYPE` union select `information_schema`.`tables`.`TABLE_SCHEMA` AS `TABLE_SCHEMA`,`information_schema`.`tables`.`TABLE_TYPE` AS `TABLE_TYPE`,count(0) AS `COUNT(*)` from `information_schema`.`tables` group by `information_schema`.`tables`.`TABLE_SCHEMA`,`information_schema`.`tables`.`TABLE_TYPE` union select `information_schema`.`statistics`.`TABLE_SCHEMA` AS `TABLE_SCHEMA`,concat('INDEX (',`information_schema`.`statistics`.`INDEX_TYPE`,')') AS `CONCAT('INDEX (', INDEX_TYPE, ')')`,count(0) AS `COUNT(*)` from `information_schema`.`statistics` group by `information_schema`.`statistics`.`TABLE_SCHEMA`,`information_schema`.`statistics`.`INDEX_TYPE` union select `information_schema`.`triggers`.`TRIGGER_SCHEMA` AS `TRIGGER_SCHEMA`,'TRIGGER' AS `TRIGGER`,count(0) AS `COUNT(*)` from `information_schema`.`triggers` group by `information_schema`.`triggers`.`TRIGGER_SCHEMA` union select `information_schema`.`events`.`EVENT_SCHEMA` AS `EVENT_SCHEMA`,'EVENT' AS `EVENT`,count(0) AS `COUNT(*)` from `information_schema`.`events` group by `information_schema`.`events`.`EVENT_SCHEMA` order by `db`,`object_type`;

-- ----------------------------
-- View structure for schema_redundant_indexes
-- ----------------------------
DROP VIEW IF EXISTS `schema_redundant_indexes`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `schema_redundant_indexes` AS select `redundant_keys`.`table_schema` AS `table_schema`,`redundant_keys`.`table_name` AS `table_name`,`redundant_keys`.`index_name` AS `redundant_index_name`,`redundant_keys`.`index_columns` AS `redundant_index_columns`,`redundant_keys`.`non_unique` AS `redundant_index_non_unique`,`dominant_keys`.`index_name` AS `dominant_index_name`,`dominant_keys`.`index_columns` AS `dominant_index_columns`,`dominant_keys`.`non_unique` AS `dominant_index_non_unique`,if((`redundant_keys`.`subpart_exists` or `dominant_keys`.`subpart_exists`),1,0) AS `subpart_exists`,concat('ALTER TABLE `',`redundant_keys`.`table_schema`,'`.`',`redundant_keys`.`table_name`,'` DROP INDEX `',`redundant_keys`.`index_name`,'`') AS `sql_drop_index` from (`sys`.`x$schema_flattened_keys` `redundant_keys` join `sys`.`x$schema_flattened_keys` `dominant_keys` on(((`redundant_keys`.`table_schema` = `dominant_keys`.`table_schema`) and (`redundant_keys`.`table_name` = `dominant_keys`.`table_name`)))) where ((`redundant_keys`.`index_name` <> `dominant_keys`.`index_name`) and (((`redundant_keys`.`index_columns` = `dominant_keys`.`index_columns`) and ((`redundant_keys`.`non_unique` > `dominant_keys`.`non_unique`) or ((`redundant_keys`.`non_unique` = `dominant_keys`.`non_unique`) and (if((`redundant_keys`.`index_name` = 'PRIMARY'),'',`redundant_keys`.`index_name`) > if((`dominant_keys`.`index_name` = 'PRIMARY'),'',`dominant_keys`.`index_name`))))) or ((locate(concat(`redundant_keys`.`index_columns`,','),`dominant_keys`.`index_columns`) = 1) and (`redundant_keys`.`non_unique` = 1)) or ((locate(concat(`dominant_keys`.`index_columns`,','),`redundant_keys`.`index_columns`) = 1) and (`dominant_keys`.`non_unique` = 0))));

-- ----------------------------
-- View structure for schema_tables_with_full_table_scans
-- ----------------------------
DROP VIEW IF EXISTS `schema_tables_with_full_table_scans`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `schema_tables_with_full_table_scans` AS select `performance_schema`.`table_io_waits_summary_by_index_usage`.`OBJECT_SCHEMA` AS `object_schema`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`OBJECT_NAME` AS `object_name`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`COUNT_READ` AS `rows_full_scanned`,`sys`.`format_time`(`performance_schema`.`table_io_waits_summary_by_index_usage`.`SUM_TIMER_WAIT`) AS `latency` from `performance_schema`.`table_io_waits_summary_by_index_usage` where (isnull(`performance_schema`.`table_io_waits_summary_by_index_usage`.`INDEX_NAME`) and (`performance_schema`.`table_io_waits_summary_by_index_usage`.`COUNT_READ` > 0)) order by `performance_schema`.`table_io_waits_summary_by_index_usage`.`COUNT_READ` desc;

-- ----------------------------
-- View structure for schema_table_lock_waits
-- ----------------------------
DROP VIEW IF EXISTS `schema_table_lock_waits`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `schema_table_lock_waits` AS select `g`.`OBJECT_SCHEMA` AS `object_schema`,`g`.`OBJECT_NAME` AS `object_name`,`pt`.`THREAD_ID` AS `waiting_thread_id`,`pt`.`PROCESSLIST_ID` AS `waiting_pid`,`sys`.`ps_thread_account`(`p`.`OWNER_THREAD_ID`) AS `waiting_account`,`p`.`LOCK_TYPE` AS `waiting_lock_type`,`p`.`LOCK_DURATION` AS `waiting_lock_duration`,`sys`.`format_statement`(`pt`.`PROCESSLIST_INFO`) AS `waiting_query`,`pt`.`PROCESSLIST_TIME` AS `waiting_query_secs`,`ps`.`ROWS_AFFECTED` AS `waiting_query_rows_affected`,`ps`.`ROWS_EXAMINED` AS `waiting_query_rows_examined`,`gt`.`THREAD_ID` AS `blocking_thread_id`,`gt`.`PROCESSLIST_ID` AS `blocking_pid`,`sys`.`ps_thread_account`(`g`.`OWNER_THREAD_ID`) AS `blocking_account`,`g`.`LOCK_TYPE` AS `blocking_lock_type`,`g`.`LOCK_DURATION` AS `blocking_lock_duration`,concat('KILL QUERY ',`gt`.`PROCESSLIST_ID`) AS `sql_kill_blocking_query`,concat('KILL ',`gt`.`PROCESSLIST_ID`) AS `sql_kill_blocking_connection` from (((((`performance_schema`.`metadata_locks` `g` join `performance_schema`.`metadata_locks` `p` on(((`g`.`OBJECT_TYPE` = `p`.`OBJECT_TYPE`) and (`g`.`OBJECT_SCHEMA` = `p`.`OBJECT_SCHEMA`) and (`g`.`OBJECT_NAME` = `p`.`OBJECT_NAME`) and (`g`.`LOCK_STATUS` = 'GRANTED') and (`p`.`LOCK_STATUS` = 'PENDING')))) join `performance_schema`.`threads` `gt` on((`g`.`OWNER_THREAD_ID` = `gt`.`THREAD_ID`))) join `performance_schema`.`threads` `pt` on((`p`.`OWNER_THREAD_ID` = `pt`.`THREAD_ID`))) left join `performance_schema`.`events_statements_current` `gs` on((`g`.`OWNER_THREAD_ID` = `gs`.`THREAD_ID`))) left join `performance_schema`.`events_statements_current` `ps` on((`p`.`OWNER_THREAD_ID` = `ps`.`THREAD_ID`))) where (`g`.`OBJECT_TYPE` = 'TABLE');

-- ----------------------------
-- View structure for schema_table_statistics
-- ----------------------------
DROP VIEW IF EXISTS `schema_table_statistics`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `schema_table_statistics` AS select `pst`.`OBJECT_SCHEMA` AS `table_schema`,`pst`.`OBJECT_NAME` AS `table_name`,`sys`.`format_time`(`pst`.`SUM_TIMER_WAIT`) AS `total_latency`,`pst`.`COUNT_FETCH` AS `rows_fetched`,`sys`.`format_time`(`pst`.`SUM_TIMER_FETCH`) AS `fetch_latency`,`pst`.`COUNT_INSERT` AS `rows_inserted`,`sys`.`format_time`(`pst`.`SUM_TIMER_INSERT`) AS `insert_latency`,`pst`.`COUNT_UPDATE` AS `rows_updated`,`sys`.`format_time`(`pst`.`SUM_TIMER_UPDATE`) AS `update_latency`,`pst`.`COUNT_DELETE` AS `rows_deleted`,`sys`.`format_time`(`pst`.`SUM_TIMER_DELETE`) AS `delete_latency`,`fsbi`.`count_read` AS `io_read_requests`,`sys`.`format_bytes`(`fsbi`.`sum_number_of_bytes_read`) AS `io_read`,`sys`.`format_time`(`fsbi`.`sum_timer_read`) AS `io_read_latency`,`fsbi`.`count_write` AS `io_write_requests`,`sys`.`format_bytes`(`fsbi`.`sum_number_of_bytes_write`) AS `io_write`,`sys`.`format_time`(`fsbi`.`sum_timer_write`) AS `io_write_latency`,`fsbi`.`count_misc` AS `io_misc_requests`,`sys`.`format_time`(`fsbi`.`sum_timer_misc`) AS `io_misc_latency` from (`performance_schema`.`table_io_waits_summary_by_table` `pst` left join `sys`.`x$ps_schema_table_statistics_io` `fsbi` on(((`pst`.`OBJECT_SCHEMA` = `fsbi`.`table_schema`) and (`pst`.`OBJECT_NAME` = `fsbi`.`table_name`)))) order by `pst`.`SUM_TIMER_WAIT` desc;

-- ----------------------------
-- View structure for schema_table_statistics_with_buffer
-- ----------------------------
DROP VIEW IF EXISTS `schema_table_statistics_with_buffer`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `schema_table_statistics_with_buffer` AS select `pst`.`OBJECT_SCHEMA` AS `table_schema`,`pst`.`OBJECT_NAME` AS `table_name`,`pst`.`COUNT_FETCH` AS `rows_fetched`,`sys`.`format_time`(`pst`.`SUM_TIMER_FETCH`) AS `fetch_latency`,`pst`.`COUNT_INSERT` AS `rows_inserted`,`sys`.`format_time`(`pst`.`SUM_TIMER_INSERT`) AS `insert_latency`,`pst`.`COUNT_UPDATE` AS `rows_updated`,`sys`.`format_time`(`pst`.`SUM_TIMER_UPDATE`) AS `update_latency`,`pst`.`COUNT_DELETE` AS `rows_deleted`,`sys`.`format_time`(`pst`.`SUM_TIMER_DELETE`) AS `delete_latency`,`fsbi`.`count_read` AS `io_read_requests`,`sys`.`format_bytes`(`fsbi`.`sum_number_of_bytes_read`) AS `io_read`,`sys`.`format_time`(`fsbi`.`sum_timer_read`) AS `io_read_latency`,`fsbi`.`count_write` AS `io_write_requests`,`sys`.`format_bytes`(`fsbi`.`sum_number_of_bytes_write`) AS `io_write`,`sys`.`format_time`(`fsbi`.`sum_timer_write`) AS `io_write_latency`,`fsbi`.`count_misc` AS `io_misc_requests`,`sys`.`format_time`(`fsbi`.`sum_timer_misc`) AS `io_misc_latency`,`sys`.`format_bytes`(`ibp`.`allocated`) AS `innodb_buffer_allocated`,`sys`.`format_bytes`(`ibp`.`data`) AS `innodb_buffer_data`,`sys`.`format_bytes`((`ibp`.`allocated` - `ibp`.`data`)) AS `innodb_buffer_free`,`ibp`.`pages` AS `innodb_buffer_pages`,`ibp`.`pages_hashed` AS `innodb_buffer_pages_hashed`,`ibp`.`pages_old` AS `innodb_buffer_pages_old`,`ibp`.`rows_cached` AS `innodb_buffer_rows_cached` from ((`performance_schema`.`table_io_waits_summary_by_table` `pst` left join `sys`.`x$ps_schema_table_statistics_io` `fsbi` on(((`pst`.`OBJECT_SCHEMA` = `fsbi`.`table_schema`) and (`pst`.`OBJECT_NAME` = `fsbi`.`table_name`)))) left join `sys`.`x$innodb_buffer_stats_by_table` `ibp` on(((`pst`.`OBJECT_SCHEMA` = `ibp`.`object_schema`) and (`pst`.`OBJECT_NAME` = `ibp`.`object_name`)))) order by `pst`.`SUM_TIMER_WAIT` desc;

-- ----------------------------
-- View structure for schema_unused_indexes
-- ----------------------------
DROP VIEW IF EXISTS `schema_unused_indexes`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `schema_unused_indexes` AS select `performance_schema`.`table_io_waits_summary_by_index_usage`.`OBJECT_SCHEMA` AS `object_schema`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`OBJECT_NAME` AS `object_name`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`INDEX_NAME` AS `index_name` from `performance_schema`.`table_io_waits_summary_by_index_usage` where ((`performance_schema`.`table_io_waits_summary_by_index_usage`.`INDEX_NAME` is not null) and (`performance_schema`.`table_io_waits_summary_by_index_usage`.`COUNT_STAR` = 0) and (`performance_schema`.`table_io_waits_summary_by_index_usage`.`OBJECT_SCHEMA` <> 'mysql') and (`performance_schema`.`table_io_waits_summary_by_index_usage`.`INDEX_NAME` <> 'PRIMARY')) order by `performance_schema`.`table_io_waits_summary_by_index_usage`.`OBJECT_SCHEMA`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`OBJECT_NAME`;

-- ----------------------------
-- View structure for session
-- ----------------------------
DROP VIEW IF EXISTS `session`;
CREATE ALGORITHM = UNDEFINED SQL SECURITY INVOKER VIEW `session` AS select `processlist`.`thd_id` AS `thd_id`,`processlist`.`conn_id` AS `conn_id`,`processlist`.`user` AS `user`,`processlist`.`db` AS `db`,`processlist`.`command` AS `command`,`processlist`.`state` AS `state`,`processlist`.`time` AS `time`,`processlist`.`current_statement` AS `current_statement`,`processlist`.`statement_latency` AS `statement_latency`,`processlist`.`progress` AS `progress`,`processlist`.`lock_latency` AS `lock_latency`,`processlist`.`rows_examined` AS `rows_examined`,`processlist`.`rows_sent` AS `rows_sent`,`processlist`.`rows_affected` AS `rows_affected`,`processlist`.`tmp_tables` AS `tmp_tables`,`processlist`.`tmp_disk_tables` AS `tmp_disk_tables`,`processlist`.`full_scan` AS `full_scan`,`processlist`.`last_statement` AS `last_statement`,`processlist`.`last_statement_latency` AS `last_statement_latency`,`processlist`.`current_memory` AS `current_memory`,`processlist`.`last_wait` AS `last_wait`,`processlist`.`last_wait_latency` AS `last_wait_latency`,`processlist`.`source` AS `source`,`processlist`.`trx_latency` AS `trx_latency`,`processlist`.`trx_state` AS `trx_state`,`processlist`.`trx_autocommit` AS `trx_autocommit`,`processlist`.`pid` AS `pid`,`processlist`.`program_name` AS `program_name` from `sys`.`processlist` where ((`processlist`.`conn_id` is not null) and (`processlist`.`command` <> 'Daemon'));

-- ----------------------------
-- View structure for session_ssl_status
-- ----------------------------
DROP VIEW IF EXISTS `session_ssl_status`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `session_ssl_status` AS select `sslver`.`THREAD_ID` AS `thread_id`,`sslver`.`VARIABLE_VALUE` AS `ssl_version`,`sslcip`.`VARIABLE_VALUE` AS `ssl_cipher`,`sslreuse`.`VARIABLE_VALUE` AS `ssl_sessions_reused` from ((`performance_schema`.`status_by_thread` `sslver` left join `performance_schema`.`status_by_thread` `sslcip` on(((`sslcip`.`THREAD_ID` = `sslver`.`THREAD_ID`) and (`sslcip`.`VARIABLE_NAME` = 'Ssl_cipher')))) left join `performance_schema`.`status_by_thread` `sslreuse` on(((`sslreuse`.`THREAD_ID` = `sslver`.`THREAD_ID`) and (`sslreuse`.`VARIABLE_NAME` = 'Ssl_sessions_reused')))) where (`sslver`.`VARIABLE_NAME` = 'Ssl_version');

-- ----------------------------
-- View structure for statements_with_errors_or_warnings
-- ----------------------------
DROP VIEW IF EXISTS `statements_with_errors_or_warnings`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `statements_with_errors_or_warnings` AS select `sys`.`format_statement`(`performance_schema`.`events_statements_summary_by_digest`.`DIGEST_TEXT`) AS `query`,`performance_schema`.`events_statements_summary_by_digest`.`SCHEMA_NAME` AS `db`,`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR` AS `exec_count`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_ERRORS` AS `errors`,(ifnull((`performance_schema`.`events_statements_summary_by_digest`.`SUM_ERRORS` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0)),0) * 100) AS `error_pct`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_WARNINGS` AS `warnings`,(ifnull((`performance_schema`.`events_statements_summary_by_digest`.`SUM_WARNINGS` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0)),0) * 100) AS `warning_pct`,`performance_schema`.`events_statements_summary_by_digest`.`FIRST_SEEN` AS `first_seen`,`performance_schema`.`events_statements_summary_by_digest`.`LAST_SEEN` AS `last_seen`,`performance_schema`.`events_statements_summary_by_digest`.`DIGEST` AS `digest` from `performance_schema`.`events_statements_summary_by_digest` where ((`performance_schema`.`events_statements_summary_by_digest`.`SUM_ERRORS` > 0) or (`performance_schema`.`events_statements_summary_by_digest`.`SUM_WARNINGS` > 0)) order by `performance_schema`.`events_statements_summary_by_digest`.`SUM_ERRORS` desc,`performance_schema`.`events_statements_summary_by_digest`.`SUM_WARNINGS` desc;

-- ----------------------------
-- View structure for statements_with_full_table_scans
-- ----------------------------
DROP VIEW IF EXISTS `statements_with_full_table_scans`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `statements_with_full_table_scans` AS select `sys`.`format_statement`(`performance_schema`.`events_statements_summary_by_digest`.`DIGEST_TEXT`) AS `query`,`performance_schema`.`events_statements_summary_by_digest`.`SCHEMA_NAME` AS `db`,`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR` AS `exec_count`,`sys`.`format_time`(`performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT`) AS `total_latency`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_INDEX_USED` AS `no_index_used_count`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_GOOD_INDEX_USED` AS `no_good_index_used_count`,round((ifnull((`performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_INDEX_USED` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0)),0) * 100),0) AS `no_index_used_pct`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_SENT` AS `rows_sent`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_EXAMINED` AS `rows_examined`,round((`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_SENT` / `performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`),0) AS `rows_sent_avg`,round((`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_EXAMINED` / `performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`),0) AS `rows_examined_avg`,`performance_schema`.`events_statements_summary_by_digest`.`FIRST_SEEN` AS `first_seen`,`performance_schema`.`events_statements_summary_by_digest`.`LAST_SEEN` AS `last_seen`,`performance_schema`.`events_statements_summary_by_digest`.`DIGEST` AS `digest` from `performance_schema`.`events_statements_summary_by_digest` where (((`performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_INDEX_USED` > 0) or (`performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_GOOD_INDEX_USED` > 0)) and (not((`performance_schema`.`events_statements_summary_by_digest`.`DIGEST_TEXT` like 'SHOW%')))) order by round((ifnull((`performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_INDEX_USED` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0)),0) * 100),0) desc,`sys`.`format_time`(`performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT`) desc;

-- ----------------------------
-- View structure for statements_with_runtimes_in_95th_percentile
-- ----------------------------
DROP VIEW IF EXISTS `statements_with_runtimes_in_95th_percentile`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `statements_with_runtimes_in_95th_percentile` AS select `sys`.`format_statement`(`stmts`.`DIGEST_TEXT`) AS `query`,`stmts`.`SCHEMA_NAME` AS `db`,if(((`stmts`.`SUM_NO_GOOD_INDEX_USED` > 0) or (`stmts`.`SUM_NO_INDEX_USED` > 0)),'*','') AS `full_scan`,`stmts`.`COUNT_STAR` AS `exec_count`,`stmts`.`SUM_ERRORS` AS `err_count`,`stmts`.`SUM_WARNINGS` AS `warn_count`,`sys`.`format_time`(`stmts`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_time`(`stmts`.`MAX_TIMER_WAIT`) AS `max_latency`,`sys`.`format_time`(`stmts`.`AVG_TIMER_WAIT`) AS `avg_latency`,`stmts`.`SUM_ROWS_SENT` AS `rows_sent`,round(ifnull((`stmts`.`SUM_ROWS_SENT` / nullif(`stmts`.`COUNT_STAR`,0)),0),0) AS `rows_sent_avg`,`stmts`.`SUM_ROWS_EXAMINED` AS `rows_examined`,round(ifnull((`stmts`.`SUM_ROWS_EXAMINED` / nullif(`stmts`.`COUNT_STAR`,0)),0),0) AS `rows_examined_avg`,`stmts`.`FIRST_SEEN` AS `first_seen`,`stmts`.`LAST_SEEN` AS `last_seen`,`stmts`.`DIGEST` AS `digest` from (`performance_schema`.`events_statements_summary_by_digest` `stmts` join `sys`.`x$ps_digest_95th_percentile_by_avg_us` `top_percentile` on((round((`stmts`.`AVG_TIMER_WAIT` / 1000000),0) >= `top_percentile`.`avg_us`))) order by `stmts`.`AVG_TIMER_WAIT` desc;

-- ----------------------------
-- View structure for statements_with_sorting
-- ----------------------------
DROP VIEW IF EXISTS `statements_with_sorting`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `statements_with_sorting` AS select `sys`.`format_statement`(`performance_schema`.`events_statements_summary_by_digest`.`DIGEST_TEXT`) AS `query`,`performance_schema`.`events_statements_summary_by_digest`.`SCHEMA_NAME` AS `db`,`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR` AS `exec_count`,`sys`.`format_time`(`performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT`) AS `total_latency`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_MERGE_PASSES` AS `sort_merge_passes`,round(ifnull((`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_MERGE_PASSES` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0)),0),0) AS `avg_sort_merges`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_SCAN` AS `sorts_using_scans`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_RANGE` AS `sort_using_range`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_ROWS` AS `rows_sorted`,round(ifnull((`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_ROWS` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0)),0),0) AS `avg_rows_sorted`,`performance_schema`.`events_statements_summary_by_digest`.`FIRST_SEEN` AS `first_seen`,`performance_schema`.`events_statements_summary_by_digest`.`LAST_SEEN` AS `last_seen`,`performance_schema`.`events_statements_summary_by_digest`.`DIGEST` AS `digest` from `performance_schema`.`events_statements_summary_by_digest` where (`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_ROWS` > 0) order by `performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT` desc;

-- ----------------------------
-- View structure for statements_with_temp_tables
-- ----------------------------
DROP VIEW IF EXISTS `statements_with_temp_tables`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `statements_with_temp_tables` AS select `sys`.`format_statement`(`performance_schema`.`events_statements_summary_by_digest`.`DIGEST_TEXT`) AS `query`,`performance_schema`.`events_statements_summary_by_digest`.`SCHEMA_NAME` AS `db`,`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR` AS `exec_count`,`sys`.`format_time`(`performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT`) AS `total_latency`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_TABLES` AS `memory_tmp_tables`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_DISK_TABLES` AS `disk_tmp_tables`,round(ifnull((`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_TABLES` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0)),0),0) AS `avg_tmp_tables_per_query`,round((ifnull((`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_DISK_TABLES` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_TABLES`,0)),0) * 100),0) AS `tmp_tables_to_disk_pct`,`performance_schema`.`events_statements_summary_by_digest`.`FIRST_SEEN` AS `first_seen`,`performance_schema`.`events_statements_summary_by_digest`.`LAST_SEEN` AS `last_seen`,`performance_schema`.`events_statements_summary_by_digest`.`DIGEST` AS `digest` from `performance_schema`.`events_statements_summary_by_digest` where (`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_TABLES` > 0) order by `performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_DISK_TABLES` desc,`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_TABLES` desc;

-- ----------------------------
-- View structure for statement_analysis
-- ----------------------------
DROP VIEW IF EXISTS `statement_analysis`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `statement_analysis` AS select `sys`.`format_statement`(`performance_schema`.`events_statements_summary_by_digest`.`DIGEST_TEXT`) AS `query`,`performance_schema`.`events_statements_summary_by_digest`.`SCHEMA_NAME` AS `db`,if(((`performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_GOOD_INDEX_USED` > 0) or (`performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_INDEX_USED` > 0)),'*','') AS `full_scan`,`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR` AS `exec_count`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_ERRORS` AS `err_count`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_WARNINGS` AS `warn_count`,`sys`.`format_time`(`performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_time`(`performance_schema`.`events_statements_summary_by_digest`.`MAX_TIMER_WAIT`) AS `max_latency`,`sys`.`format_time`(`performance_schema`.`events_statements_summary_by_digest`.`AVG_TIMER_WAIT`) AS `avg_latency`,`sys`.`format_time`(`performance_schema`.`events_statements_summary_by_digest`.`SUM_LOCK_TIME`) AS `lock_latency`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_SENT` AS `rows_sent`,round(ifnull((`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_SENT` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0)),0),0) AS `rows_sent_avg`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_EXAMINED` AS `rows_examined`,round(ifnull((`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_EXAMINED` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0)),0),0) AS `rows_examined_avg`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_AFFECTED` AS `rows_affected`,round(ifnull((`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_AFFECTED` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0)),0),0) AS `rows_affected_avg`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_TABLES` AS `tmp_tables`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_DISK_TABLES` AS `tmp_disk_tables`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_ROWS` AS `rows_sorted`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_MERGE_PASSES` AS `sort_merge_passes`,`performance_schema`.`events_statements_summary_by_digest`.`DIGEST` AS `digest`,`performance_schema`.`events_statements_summary_by_digest`.`FIRST_SEEN` AS `first_seen`,`performance_schema`.`events_statements_summary_by_digest`.`LAST_SEEN` AS `last_seen` from `performance_schema`.`events_statements_summary_by_digest` order by `performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT` desc;

-- ----------------------------
-- View structure for user_summary
-- ----------------------------
DROP VIEW IF EXISTS `user_summary`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `user_summary` AS select if(isnull(`performance_schema`.`accounts`.`USER`),'background',`performance_schema`.`accounts`.`USER`) AS `user`,sum(`stmt`.`total`) AS `statements`,`sys`.`format_time`(sum(`stmt`.`total_latency`)) AS `statement_latency`,`sys`.`format_time`(ifnull((sum(`stmt`.`total_latency`) / nullif(sum(`stmt`.`total`),0)),0)) AS `statement_avg_latency`,sum(`stmt`.`full_scans`) AS `table_scans`,sum(`io`.`ios`) AS `file_ios`,`sys`.`format_time`(sum(`io`.`io_latency`)) AS `file_io_latency`,sum(`performance_schema`.`accounts`.`CURRENT_CONNECTIONS`) AS `current_connections`,sum(`performance_schema`.`accounts`.`TOTAL_CONNECTIONS`) AS `total_connections`,count(distinct `performance_schema`.`accounts`.`HOST`) AS `unique_hosts`,`sys`.`format_bytes`(sum(`mem`.`current_allocated`)) AS `current_memory`,`sys`.`format_bytes`(sum(`mem`.`total_allocated`)) AS `total_memory_allocated` from (((`performance_schema`.`accounts` left join `sys`.`x$user_summary_by_statement_latency` `stmt` on((if(isnull(`performance_schema`.`accounts`.`USER`),'background',`performance_schema`.`accounts`.`USER`) = `stmt`.`user`))) left join `sys`.`x$user_summary_by_file_io` `io` on((if(isnull(`performance_schema`.`accounts`.`USER`),'background',`performance_schema`.`accounts`.`USER`) = `io`.`user`))) left join `sys`.`x$memory_by_user_by_current_bytes` `mem` on((if(isnull(`performance_schema`.`accounts`.`USER`),'background',`performance_schema`.`accounts`.`USER`) = `mem`.`user`))) group by if(isnull(`performance_schema`.`accounts`.`USER`),'background',`performance_schema`.`accounts`.`USER`) order by sum(`stmt`.`total_latency`) desc;

-- ----------------------------
-- View structure for user_summary_by_file_io
-- ----------------------------
DROP VIEW IF EXISTS `user_summary_by_file_io`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `user_summary_by_file_io` AS select if(isnull(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`),'background',`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`) AS `user`,sum(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`COUNT_STAR`) AS `ios`,`sys`.`format_time`(sum(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`)) AS `io_latency` from `performance_schema`.`events_waits_summary_by_user_by_event_name` where (`performance_schema`.`events_waits_summary_by_user_by_event_name`.`EVENT_NAME` like 'wait/io/file/%') group by if(isnull(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`),'background',`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`) order by sum(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`) desc;

-- ----------------------------
-- View structure for user_summary_by_file_io_type
-- ----------------------------
DROP VIEW IF EXISTS `user_summary_by_file_io_type`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `user_summary_by_file_io_type` AS select if(isnull(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`),'background',`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`) AS `user`,`performance_schema`.`events_waits_summary_by_user_by_event_name`.`EVENT_NAME` AS `event_name`,`performance_schema`.`events_waits_summary_by_user_by_event_name`.`COUNT_STAR` AS `total`,`sys`.`format_time`(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`) AS `latency`,`sys`.`format_time`(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency` from `performance_schema`.`events_waits_summary_by_user_by_event_name` where ((`performance_schema`.`events_waits_summary_by_user_by_event_name`.`EVENT_NAME` like 'wait/io/file%') and (`performance_schema`.`events_waits_summary_by_user_by_event_name`.`COUNT_STAR` > 0)) order by if(isnull(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`),'background',`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`),`performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` desc;

-- ----------------------------
-- View structure for user_summary_by_stages
-- ----------------------------
DROP VIEW IF EXISTS `user_summary_by_stages`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `user_summary_by_stages` AS select if(isnull(`performance_schema`.`events_stages_summary_by_user_by_event_name`.`USER`),'background',`performance_schema`.`events_stages_summary_by_user_by_event_name`.`USER`) AS `user`,`performance_schema`.`events_stages_summary_by_user_by_event_name`.`EVENT_NAME` AS `event_name`,`performance_schema`.`events_stages_summary_by_user_by_event_name`.`COUNT_STAR` AS `total`,`sys`.`format_time`(`performance_schema`.`events_stages_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_time`(`performance_schema`.`events_stages_summary_by_user_by_event_name`.`AVG_TIMER_WAIT`) AS `avg_latency` from `performance_schema`.`events_stages_summary_by_user_by_event_name` where (`performance_schema`.`events_stages_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` <> 0) order by if(isnull(`performance_schema`.`events_stages_summary_by_user_by_event_name`.`USER`),'background',`performance_schema`.`events_stages_summary_by_user_by_event_name`.`USER`),`performance_schema`.`events_stages_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` desc;

-- ----------------------------
-- View structure for user_summary_by_statement_latency
-- ----------------------------
DROP VIEW IF EXISTS `user_summary_by_statement_latency`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `user_summary_by_statement_latency` AS select if(isnull(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER`),'background',`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER`) AS `user`,sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`COUNT_STAR`) AS `total`,`sys`.`format_time`(sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`)) AS `total_latency`,`sys`.`format_time`(sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`MAX_TIMER_WAIT`)) AS `max_latency`,`sys`.`format_time`(sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_LOCK_TIME`)) AS `lock_latency`,sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_ROWS_SENT`) AS `rows_sent`,sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_ROWS_EXAMINED`) AS `rows_examined`,sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_ROWS_AFFECTED`) AS `rows_affected`,(sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_NO_INDEX_USED`) + sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_NO_GOOD_INDEX_USED`)) AS `full_scans` from `performance_schema`.`events_statements_summary_by_user_by_event_name` group by if(isnull(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER`),'background',`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER`) order by sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`) desc;

-- ----------------------------
-- View structure for user_summary_by_statement_type
-- ----------------------------
DROP VIEW IF EXISTS `user_summary_by_statement_type`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `user_summary_by_statement_type` AS select if(isnull(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER`),'background',`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER`) AS `user`,substring_index(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`EVENT_NAME`,'/',-(1)) AS `statement`,`performance_schema`.`events_statements_summary_by_user_by_event_name`.`COUNT_STAR` AS `total`,`sys`.`format_time`(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_time`(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency`,`sys`.`format_time`(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_LOCK_TIME`) AS `lock_latency`,`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_ROWS_SENT` AS `rows_sent`,`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_ROWS_EXAMINED` AS `rows_examined`,`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_ROWS_AFFECTED` AS `rows_affected`,(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_NO_INDEX_USED` + `performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_NO_GOOD_INDEX_USED`) AS `full_scans` from `performance_schema`.`events_statements_summary_by_user_by_event_name` where (`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` <> 0) order by if(isnull(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER`),'background',`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER`),`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` desc;

-- ----------------------------
-- View structure for version
-- ----------------------------
DROP VIEW IF EXISTS `version`;
CREATE ALGORITHM = UNDEFINED SQL SECURITY INVOKER VIEW `version` AS select '1.5.1' AS `sys_version`,version() AS `mysql_version`;

-- ----------------------------
-- View structure for waits_by_host_by_latency
-- ----------------------------
DROP VIEW IF EXISTS `waits_by_host_by_latency`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `waits_by_host_by_latency` AS select if(isnull(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`),'background',`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`) AS `host`,`performance_schema`.`events_waits_summary_by_host_by_event_name`.`EVENT_NAME` AS `event`,`performance_schema`.`events_waits_summary_by_host_by_event_name`.`COUNT_STAR` AS `total`,`sys`.`format_time`(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_time`(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`AVG_TIMER_WAIT`) AS `avg_latency`,`sys`.`format_time`(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency` from `performance_schema`.`events_waits_summary_by_host_by_event_name` where ((`performance_schema`.`events_waits_summary_by_host_by_event_name`.`EVENT_NAME` <> 'idle') and (`performance_schema`.`events_waits_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` > 0)) order by if(isnull(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`),'background',`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`),`performance_schema`.`events_waits_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` desc;

-- ----------------------------
-- View structure for waits_by_user_by_latency
-- ----------------------------
DROP VIEW IF EXISTS `waits_by_user_by_latency`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `waits_by_user_by_latency` AS select if(isnull(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`),'background',`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`) AS `user`,`performance_schema`.`events_waits_summary_by_user_by_event_name`.`EVENT_NAME` AS `event`,`performance_schema`.`events_waits_summary_by_user_by_event_name`.`COUNT_STAR` AS `total`,`sys`.`format_time`(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_time`(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`AVG_TIMER_WAIT`) AS `avg_latency`,`sys`.`format_time`(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency` from `performance_schema`.`events_waits_summary_by_user_by_event_name` where ((`performance_schema`.`events_waits_summary_by_user_by_event_name`.`EVENT_NAME` <> 'idle') and (`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER` is not null) and (`performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` > 0)) order by if(isnull(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`),'background',`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`),`performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` desc;

-- ----------------------------
-- View structure for waits_global_by_latency
-- ----------------------------
DROP VIEW IF EXISTS `waits_global_by_latency`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `waits_global_by_latency` AS select `performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME` AS `events`,`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR` AS `total`,`sys`.`format_time`(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_time`(`performance_schema`.`events_waits_summary_global_by_event_name`.`AVG_TIMER_WAIT`) AS `avg_latency`,`sys`.`format_time`(`performance_schema`.`events_waits_summary_global_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency` from `performance_schema`.`events_waits_summary_global_by_event_name` where ((`performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME` <> 'idle') and (`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT` > 0)) order by `performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT` desc;

-- ----------------------------
-- View structure for wait_classes_global_by_avg_latency
-- ----------------------------
DROP VIEW IF EXISTS `wait_classes_global_by_avg_latency`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `wait_classes_global_by_avg_latency` AS select substring_index(`performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME`,'/',3) AS `event_class`,sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR`) AS `total`,`sys`.`format_time`(cast(sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) as unsigned)) AS `total_latency`,`sys`.`format_time`(min(`performance_schema`.`events_waits_summary_global_by_event_name`.`MIN_TIMER_WAIT`)) AS `min_latency`,`sys`.`format_time`(ifnull((sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) / nullif(sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR`),0)),0)) AS `avg_latency`,`sys`.`format_time`(cast(max(`performance_schema`.`events_waits_summary_global_by_event_name`.`MAX_TIMER_WAIT`) as unsigned)) AS `max_latency` from `performance_schema`.`events_waits_summary_global_by_event_name` where ((`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT` > 0) and (`performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME` <> 'idle')) group by `event_class` order by ifnull((sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) / nullif(sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR`),0)),0) desc;

-- ----------------------------
-- View structure for wait_classes_global_by_latency
-- ----------------------------
DROP VIEW IF EXISTS `wait_classes_global_by_latency`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `wait_classes_global_by_latency` AS select substring_index(`performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME`,'/',3) AS `event_class`,sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR`) AS `total`,`sys`.`format_time`(sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`)) AS `total_latency`,`sys`.`format_time`(min(`performance_schema`.`events_waits_summary_global_by_event_name`.`MIN_TIMER_WAIT`)) AS `min_latency`,`sys`.`format_time`(ifnull((sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) / nullif(sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR`),0)),0)) AS `avg_latency`,`sys`.`format_time`(max(`performance_schema`.`events_waits_summary_global_by_event_name`.`MAX_TIMER_WAIT`)) AS `max_latency` from `performance_schema`.`events_waits_summary_global_by_event_name` where ((`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT` > 0) and (`performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME` <> 'idle')) group by substring_index(`performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME`,'/',3) order by sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) desc;

-- ----------------------------
-- View structure for x$host_summary
-- ----------------------------
DROP VIEW IF EXISTS `x$host_summary`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `x$host_summary` AS select if(isnull(`performance_schema`.`accounts`.`HOST`),'background',`performance_schema`.`accounts`.`HOST`) AS `host`,sum(`stmt`.`total`) AS `statements`,sum(`stmt`.`total_latency`) AS `statement_latency`,(sum(`stmt`.`total_latency`) / sum(`stmt`.`total`)) AS `statement_avg_latency`,sum(`stmt`.`full_scans`) AS `table_scans`,sum(`io`.`ios`) AS `file_ios`,sum(`io`.`io_latency`) AS `file_io_latency`,sum(`performance_schema`.`accounts`.`CURRENT_CONNECTIONS`) AS `current_connections`,sum(`performance_schema`.`accounts`.`TOTAL_CONNECTIONS`) AS `total_connections`,count(distinct `performance_schema`.`accounts`.`USER`) AS `unique_users`,sum(`mem`.`current_allocated`) AS `current_memory`,sum(`mem`.`total_allocated`) AS `total_memory_allocated` from (((`performance_schema`.`accounts` join `sys`.`x$host_summary_by_statement_latency` `stmt` on((`performance_schema`.`accounts`.`HOST` = `stmt`.`host`))) join `sys`.`x$host_summary_by_file_io` `io` on((`performance_schema`.`accounts`.`HOST` = `io`.`host`))) join `sys`.`x$memory_by_host_by_current_bytes` `mem` on((`performance_schema`.`accounts`.`HOST` = `mem`.`host`))) group by if(isnull(`performance_schema`.`accounts`.`HOST`),'background',`performance_schema`.`accounts`.`HOST`);

-- ----------------------------
-- View structure for x$host_summary_by_file_io
-- ----------------------------
DROP VIEW IF EXISTS `x$host_summary_by_file_io`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `x$host_summary_by_file_io` AS select if(isnull(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`),'background',`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`) AS `host`,sum(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`COUNT_STAR`) AS `ios`,sum(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`) AS `io_latency` from `performance_schema`.`events_waits_summary_by_host_by_event_name` where (`performance_schema`.`events_waits_summary_by_host_by_event_name`.`EVENT_NAME` like 'wait/io/file/%') group by if(isnull(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`),'background',`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`) order by sum(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`) desc;

-- ----------------------------
-- View structure for x$host_summary_by_file_io_type
-- ----------------------------
DROP VIEW IF EXISTS `x$host_summary_by_file_io_type`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `x$host_summary_by_file_io_type` AS select if(isnull(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`),'background',`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`) AS `host`,`performance_schema`.`events_waits_summary_by_host_by_event_name`.`EVENT_NAME` AS `event_name`,`performance_schema`.`events_waits_summary_by_host_by_event_name`.`COUNT_STAR` AS `total`,`performance_schema`.`events_waits_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` AS `total_latency`,`performance_schema`.`events_waits_summary_by_host_by_event_name`.`MAX_TIMER_WAIT` AS `max_latency` from `performance_schema`.`events_waits_summary_by_host_by_event_name` where ((`performance_schema`.`events_waits_summary_by_host_by_event_name`.`EVENT_NAME` like 'wait/io/file%') and (`performance_schema`.`events_waits_summary_by_host_by_event_name`.`COUNT_STAR` > 0)) order by if(isnull(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`),'background',`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`),`performance_schema`.`events_waits_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` desc;

-- ----------------------------
-- View structure for x$host_summary_by_stages
-- ----------------------------
DROP VIEW IF EXISTS `x$host_summary_by_stages`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `x$host_summary_by_stages` AS select if(isnull(`performance_schema`.`events_stages_summary_by_host_by_event_name`.`HOST`),'background',`performance_schema`.`events_stages_summary_by_host_by_event_name`.`HOST`) AS `host`,`performance_schema`.`events_stages_summary_by_host_by_event_name`.`EVENT_NAME` AS `event_name`,`performance_schema`.`events_stages_summary_by_host_by_event_name`.`COUNT_STAR` AS `total`,`performance_schema`.`events_stages_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` AS `total_latency`,`performance_schema`.`events_stages_summary_by_host_by_event_name`.`AVG_TIMER_WAIT` AS `avg_latency` from `performance_schema`.`events_stages_summary_by_host_by_event_name` where (`performance_schema`.`events_stages_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` <> 0) order by if(isnull(`performance_schema`.`events_stages_summary_by_host_by_event_name`.`HOST`),'background',`performance_schema`.`events_stages_summary_by_host_by_event_name`.`HOST`),`performance_schema`.`events_stages_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` desc;

-- ----------------------------
-- View structure for x$host_summary_by_statement_latency
-- ----------------------------
DROP VIEW IF EXISTS `x$host_summary_by_statement_latency`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `x$host_summary_by_statement_latency` AS select if(isnull(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST`),'background',`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST`) AS `host`,sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`COUNT_STAR`) AS `total`,sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,max(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency`,sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_LOCK_TIME`) AS `lock_latency`,sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_ROWS_SENT`) AS `rows_sent`,sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_ROWS_EXAMINED`) AS `rows_examined`,sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_ROWS_AFFECTED`) AS `rows_affected`,(sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_NO_INDEX_USED`) + sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_NO_GOOD_INDEX_USED`)) AS `full_scans` from `performance_schema`.`events_statements_summary_by_host_by_event_name` group by if(isnull(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST`),'background',`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST`) order by sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`) desc;

-- ----------------------------
-- View structure for x$host_summary_by_statement_type
-- ----------------------------
DROP VIEW IF EXISTS `x$host_summary_by_statement_type`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `x$host_summary_by_statement_type` AS select if(isnull(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST`),'background',`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST`) AS `host`,substring_index(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`EVENT_NAME`,'/',-(1)) AS `statement`,`performance_schema`.`events_statements_summary_by_host_by_event_name`.`COUNT_STAR` AS `total`,`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` AS `total_latency`,`performance_schema`.`events_statements_summary_by_host_by_event_name`.`MAX_TIMER_WAIT` AS `max_latency`,`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_LOCK_TIME` AS `lock_latency`,`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_ROWS_SENT` AS `rows_sent`,`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_ROWS_EXAMINED` AS `rows_examined`,`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_ROWS_AFFECTED` AS `rows_affected`,(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_NO_INDEX_USED` + `performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_NO_GOOD_INDEX_USED`) AS `full_scans` from `performance_schema`.`events_statements_summary_by_host_by_event_name` where (`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` <> 0) order by if(isnull(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST`),'background',`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST`),`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` desc;

-- ----------------------------
-- View structure for x$innodb_buffer_stats_by_schema
-- ----------------------------
DROP VIEW IF EXISTS `x$innodb_buffer_stats_by_schema`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `x$innodb_buffer_stats_by_schema` AS select if((locate('.',`ibp`.`TABLE_NAME`) = 0),'InnoDB System',replace(substring_index(`ibp`.`TABLE_NAME`,'.',1),'`','')) AS `object_schema`,sum(if((`ibp`.`COMPRESSED_SIZE` = 0),16384,`ibp`.`COMPRESSED_SIZE`)) AS `allocated`,sum(`ibp`.`DATA_SIZE`) AS `data`,count(`ibp`.`PAGE_NUMBER`) AS `pages`,count(if((`ibp`.`IS_HASHED` = 'YES'),1,NULL)) AS `pages_hashed`,count(if((`ibp`.`IS_OLD` = 'YES'),1,NULL)) AS `pages_old`,round(ifnull((sum(`ibp`.`NUMBER_RECORDS`) / nullif(count(distinct `ibp`.`INDEX_NAME`),0)),0),0) AS `rows_cached` from `information_schema`.`innodb_buffer_page` `ibp` where (`ibp`.`TABLE_NAME` is not null) group by `object_schema` order by sum(if((`ibp`.`COMPRESSED_SIZE` = 0),16384,`ibp`.`COMPRESSED_SIZE`)) desc;

-- ----------------------------
-- View structure for x$innodb_buffer_stats_by_table
-- ----------------------------
DROP VIEW IF EXISTS `x$innodb_buffer_stats_by_table`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `x$innodb_buffer_stats_by_table` AS select if((locate('.',`ibp`.`TABLE_NAME`) = 0),'InnoDB System',replace(substring_index(`ibp`.`TABLE_NAME`,'.',1),'`','')) AS `object_schema`,replace(substring_index(`ibp`.`TABLE_NAME`,'.',-(1)),'`','') AS `object_name`,sum(if((`ibp`.`COMPRESSED_SIZE` = 0),16384,`ibp`.`COMPRESSED_SIZE`)) AS `allocated`,sum(`ibp`.`DATA_SIZE`) AS `data`,count(`ibp`.`PAGE_NUMBER`) AS `pages`,count(if((`ibp`.`IS_HASHED` = 'YES'),1,NULL)) AS `pages_hashed`,count(if((`ibp`.`IS_OLD` = 'YES'),1,NULL)) AS `pages_old`,round(ifnull((sum(`ibp`.`NUMBER_RECORDS`) / nullif(count(distinct `ibp`.`INDEX_NAME`),0)),0),0) AS `rows_cached` from `information_schema`.`innodb_buffer_page` `ibp` where (`ibp`.`TABLE_NAME` is not null) group by `object_schema`,`object_name` order by sum(if((`ibp`.`COMPRESSED_SIZE` = 0),16384,`ibp`.`COMPRESSED_SIZE`)) desc;

-- ----------------------------
-- View structure for x$innodb_lock_waits
-- ----------------------------
DROP VIEW IF EXISTS `x$innodb_lock_waits`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `x$innodb_lock_waits` AS select `r`.`trx_wait_started` AS `wait_started`,timediff(now(),`r`.`trx_wait_started`) AS `wait_age`,timestampdiff(SECOND,`r`.`trx_wait_started`,now()) AS `wait_age_secs`,`rl`.`lock_table` AS `locked_table`,`rl`.`lock_index` AS `locked_index`,`rl`.`lock_type` AS `locked_type`,`r`.`trx_id` AS `waiting_trx_id`,`r`.`trx_started` AS `waiting_trx_started`,timediff(now(),`r`.`trx_started`) AS `waiting_trx_age`,`r`.`trx_rows_locked` AS `waiting_trx_rows_locked`,`r`.`trx_rows_modified` AS `waiting_trx_rows_modified`,`r`.`trx_mysql_thread_id` AS `waiting_pid`,`r`.`trx_query` AS `waiting_query`,`rl`.`lock_id` AS `waiting_lock_id`,`rl`.`lock_mode` AS `waiting_lock_mode`,`b`.`trx_id` AS `blocking_trx_id`,`b`.`trx_mysql_thread_id` AS `blocking_pid`,`b`.`trx_query` AS `blocking_query`,`bl`.`lock_id` AS `blocking_lock_id`,`bl`.`lock_mode` AS `blocking_lock_mode`,`b`.`trx_started` AS `blocking_trx_started`,timediff(now(),`b`.`trx_started`) AS `blocking_trx_age`,`b`.`trx_rows_locked` AS `blocking_trx_rows_locked`,`b`.`trx_rows_modified` AS `blocking_trx_rows_modified`,concat('KILL QUERY ',`b`.`trx_mysql_thread_id`) AS `sql_kill_blocking_query`,concat('KILL ',`b`.`trx_mysql_thread_id`) AS `sql_kill_blocking_connection` from ((((`information_schema`.`innodb_lock_waits` `w` join `information_schema`.`innodb_trx` `b` on((`b`.`trx_id` = `w`.`blocking_trx_id`))) join `information_schema`.`innodb_trx` `r` on((`r`.`trx_id` = `w`.`requesting_trx_id`))) join `information_schema`.`innodb_locks` `bl` on((`bl`.`lock_id` = `w`.`blocking_lock_id`))) join `information_schema`.`innodb_locks` `rl` on((`rl`.`lock_id` = `w`.`requested_lock_id`))) order by `r`.`trx_wait_started`;

-- ----------------------------
-- View structure for x$io_by_thread_by_latency
-- ----------------------------
DROP VIEW IF EXISTS `x$io_by_thread_by_latency`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `x$io_by_thread_by_latency` AS select if(isnull(`performance_schema`.`threads`.`PROCESSLIST_ID`),substring_index(`performance_schema`.`threads`.`NAME`,'/',-(1)),concat(`performance_schema`.`threads`.`PROCESSLIST_USER`,'@',`performance_schema`.`threads`.`PROCESSLIST_HOST`)) AS `user`,sum(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`COUNT_STAR`) AS `total`,sum(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,min(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`MIN_TIMER_WAIT`) AS `min_latency`,avg(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`AVG_TIMER_WAIT`) AS `avg_latency`,max(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency`,`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`THREAD_ID` AS `thread_id`,`performance_schema`.`threads`.`PROCESSLIST_ID` AS `processlist_id` from (`performance_schema`.`events_waits_summary_by_thread_by_event_name` left join `performance_schema`.`threads` on((`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`THREAD_ID` = `performance_schema`.`threads`.`THREAD_ID`))) where ((`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`EVENT_NAME` like 'wait/io/file/%') and (`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`SUM_TIMER_WAIT` > 0)) group by `performance_schema`.`events_waits_summary_by_thread_by_event_name`.`THREAD_ID`,`performance_schema`.`threads`.`PROCESSLIST_ID`,`user` order by sum(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`SUM_TIMER_WAIT`) desc;

-- ----------------------------
-- View structure for x$io_global_by_file_by_bytes
-- ----------------------------
DROP VIEW IF EXISTS `x$io_global_by_file_by_bytes`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `x$io_global_by_file_by_bytes` AS select `performance_schema`.`file_summary_by_instance`.`FILE_NAME` AS `file`,`performance_schema`.`file_summary_by_instance`.`COUNT_READ` AS `count_read`,`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_READ` AS `total_read`,ifnull((`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_READ` / nullif(`performance_schema`.`file_summary_by_instance`.`COUNT_READ`,0)),0) AS `avg_read`,`performance_schema`.`file_summary_by_instance`.`COUNT_WRITE` AS `count_write`,`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_WRITE` AS `total_written`,ifnull((`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_WRITE` / nullif(`performance_schema`.`file_summary_by_instance`.`COUNT_WRITE`,0)),0.00) AS `avg_write`,(`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_READ` + `performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_WRITE`) AS `total`,ifnull(round((100 - ((`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_READ` / nullif((`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_READ` + `performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_WRITE`),0)) * 100)),2),0.00) AS `write_pct` from `performance_schema`.`file_summary_by_instance` order by (`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_READ` + `performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_WRITE`) desc;

-- ----------------------------
-- View structure for x$io_global_by_file_by_latency
-- ----------------------------
DROP VIEW IF EXISTS `x$io_global_by_file_by_latency`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `x$io_global_by_file_by_latency` AS select `performance_schema`.`file_summary_by_instance`.`FILE_NAME` AS `file`,`performance_schema`.`file_summary_by_instance`.`COUNT_STAR` AS `total`,`performance_schema`.`file_summary_by_instance`.`SUM_TIMER_WAIT` AS `total_latency`,`performance_schema`.`file_summary_by_instance`.`COUNT_READ` AS `count_read`,`performance_schema`.`file_summary_by_instance`.`SUM_TIMER_READ` AS `read_latency`,`performance_schema`.`file_summary_by_instance`.`COUNT_WRITE` AS `count_write`,`performance_schema`.`file_summary_by_instance`.`SUM_TIMER_WRITE` AS `write_latency`,`performance_schema`.`file_summary_by_instance`.`COUNT_MISC` AS `count_misc`,`performance_schema`.`file_summary_by_instance`.`SUM_TIMER_MISC` AS `misc_latency` from `performance_schema`.`file_summary_by_instance` order by `performance_schema`.`file_summary_by_instance`.`SUM_TIMER_WAIT` desc;

-- ----------------------------
-- View structure for x$io_global_by_wait_by_bytes
-- ----------------------------
DROP VIEW IF EXISTS `x$io_global_by_wait_by_bytes`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `x$io_global_by_wait_by_bytes` AS select substring_index(`performance_schema`.`file_summary_by_event_name`.`EVENT_NAME`,'/',-(2)) AS `event_name`,`performance_schema`.`file_summary_by_event_name`.`COUNT_STAR` AS `total`,`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_WAIT` AS `total_latency`,`performance_schema`.`file_summary_by_event_name`.`MIN_TIMER_WAIT` AS `min_latency`,`performance_schema`.`file_summary_by_event_name`.`AVG_TIMER_WAIT` AS `avg_latency`,`performance_schema`.`file_summary_by_event_name`.`MAX_TIMER_WAIT` AS `max_latency`,`performance_schema`.`file_summary_by_event_name`.`COUNT_READ` AS `count_read`,`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_READ` AS `total_read`,ifnull((`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_READ` / nullif(`performance_schema`.`file_summary_by_event_name`.`COUNT_READ`,0)),0) AS `avg_read`,`performance_schema`.`file_summary_by_event_name`.`COUNT_WRITE` AS `count_write`,`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_WRITE` AS `total_written`,ifnull((`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_WRITE` / nullif(`performance_schema`.`file_summary_by_event_name`.`COUNT_WRITE`,0)),0) AS `avg_written`,(`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_WRITE` + `performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_READ`) AS `total_requested` from `performance_schema`.`file_summary_by_event_name` where ((`performance_schema`.`file_summary_by_event_name`.`EVENT_NAME` like 'wait/io/file/%') and (`performance_schema`.`file_summary_by_event_name`.`COUNT_STAR` > 0)) order by (`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_WRITE` + `performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_READ`) desc;

-- ----------------------------
-- View structure for x$io_global_by_wait_by_latency
-- ----------------------------
DROP VIEW IF EXISTS `x$io_global_by_wait_by_latency`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `x$io_global_by_wait_by_latency` AS select substring_index(`performance_schema`.`file_summary_by_event_name`.`EVENT_NAME`,'/',-(2)) AS `event_name`,`performance_schema`.`file_summary_by_event_name`.`COUNT_STAR` AS `total`,`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_WAIT` AS `total_latency`,`performance_schema`.`file_summary_by_event_name`.`AVG_TIMER_WAIT` AS `avg_latency`,`performance_schema`.`file_summary_by_event_name`.`MAX_TIMER_WAIT` AS `max_latency`,`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_READ` AS `read_latency`,`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_WRITE` AS `write_latency`,`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_MISC` AS `misc_latency`,`performance_schema`.`file_summary_by_event_name`.`COUNT_READ` AS `count_read`,`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_READ` AS `total_read`,ifnull((`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_READ` / nullif(`performance_schema`.`file_summary_by_event_name`.`COUNT_READ`,0)),0) AS `avg_read`,`performance_schema`.`file_summary_by_event_name`.`COUNT_WRITE` AS `count_write`,`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_WRITE` AS `total_written`,ifnull((`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_WRITE` / nullif(`performance_schema`.`file_summary_by_event_name`.`COUNT_WRITE`,0)),0) AS `avg_written` from `performance_schema`.`file_summary_by_event_name` where ((`performance_schema`.`file_summary_by_event_name`.`EVENT_NAME` like 'wait/io/file/%') and (`performance_schema`.`file_summary_by_event_name`.`COUNT_STAR` > 0)) order by `performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_WAIT` desc;

-- ----------------------------
-- View structure for x$latest_file_io
-- ----------------------------
DROP VIEW IF EXISTS `x$latest_file_io`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `x$latest_file_io` AS select if(isnull(`information_schema`.`processlist`.`ID`),concat(substring_index(`performance_schema`.`threads`.`NAME`,'/',-(1)),':',`performance_schema`.`events_waits_history_long`.`THREAD_ID`),concat(`information_schema`.`processlist`.`USER`,'@',`information_schema`.`processlist`.`HOST`,':',`information_schema`.`processlist`.`ID`)) AS `thread`,`performance_schema`.`events_waits_history_long`.`OBJECT_NAME` AS `file`,`performance_schema`.`events_waits_history_long`.`TIMER_WAIT` AS `latency`,`performance_schema`.`events_waits_history_long`.`OPERATION` AS `operation`,`performance_schema`.`events_waits_history_long`.`NUMBER_OF_BYTES` AS `requested` from ((`performance_schema`.`events_waits_history_long` join `performance_schema`.`threads` on((`performance_schema`.`events_waits_history_long`.`THREAD_ID` = `performance_schema`.`threads`.`THREAD_ID`))) left join `information_schema`.`processlist` on((`performance_schema`.`threads`.`PROCESSLIST_ID` = `information_schema`.`processlist`.`ID`))) where ((`performance_schema`.`events_waits_history_long`.`OBJECT_NAME` is not null) and (`performance_schema`.`events_waits_history_long`.`EVENT_NAME` like 'wait/io/file/%')) order by `performance_schema`.`events_waits_history_long`.`TIMER_START`;

-- ----------------------------
-- View structure for x$memory_by_host_by_current_bytes
-- ----------------------------
DROP VIEW IF EXISTS `x$memory_by_host_by_current_bytes`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `x$memory_by_host_by_current_bytes` AS select if(isnull(`performance_schema`.`memory_summary_by_host_by_event_name`.`HOST`),'background',`performance_schema`.`memory_summary_by_host_by_event_name`.`HOST`) AS `host`,sum(`performance_schema`.`memory_summary_by_host_by_event_name`.`CURRENT_COUNT_USED`) AS `current_count_used`,sum(`performance_schema`.`memory_summary_by_host_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`) AS `current_allocated`,ifnull((sum(`performance_schema`.`memory_summary_by_host_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`) / nullif(sum(`performance_schema`.`memory_summary_by_host_by_event_name`.`CURRENT_COUNT_USED`),0)),0) AS `current_avg_alloc`,max(`performance_schema`.`memory_summary_by_host_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`) AS `current_max_alloc`,sum(`performance_schema`.`memory_summary_by_host_by_event_name`.`SUM_NUMBER_OF_BYTES_ALLOC`) AS `total_allocated` from `performance_schema`.`memory_summary_by_host_by_event_name` group by if(isnull(`performance_schema`.`memory_summary_by_host_by_event_name`.`HOST`),'background',`performance_schema`.`memory_summary_by_host_by_event_name`.`HOST`) order by sum(`performance_schema`.`memory_summary_by_host_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`) desc;

-- ----------------------------
-- View structure for x$memory_by_thread_by_current_bytes
-- ----------------------------
DROP VIEW IF EXISTS `x$memory_by_thread_by_current_bytes`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `x$memory_by_thread_by_current_bytes` AS select `t`.`THREAD_ID` AS `thread_id`,if((`t`.`NAME` = 'thread/sql/one_connection'),concat(`t`.`PROCESSLIST_USER`,'@',`t`.`PROCESSLIST_HOST`),replace(`t`.`NAME`,'thread/','')) AS `user`,sum(`mt`.`CURRENT_COUNT_USED`) AS `current_count_used`,sum(`mt`.`CURRENT_NUMBER_OF_BYTES_USED`) AS `current_allocated`,ifnull((sum(`mt`.`CURRENT_NUMBER_OF_BYTES_USED`) / nullif(sum(`mt`.`CURRENT_COUNT_USED`),0)),0) AS `current_avg_alloc`,max(`mt`.`CURRENT_NUMBER_OF_BYTES_USED`) AS `current_max_alloc`,sum(`mt`.`SUM_NUMBER_OF_BYTES_ALLOC`) AS `total_allocated` from (`performance_schema`.`memory_summary_by_thread_by_event_name` `mt` join `performance_schema`.`threads` `t` on((`mt`.`THREAD_ID` = `t`.`THREAD_ID`))) group by `t`.`THREAD_ID`,if((`t`.`NAME` = 'thread/sql/one_connection'),concat(`t`.`PROCESSLIST_USER`,'@',`t`.`PROCESSLIST_HOST`),replace(`t`.`NAME`,'thread/','')) order by sum(`mt`.`CURRENT_NUMBER_OF_BYTES_USED`) desc;

-- ----------------------------
-- View structure for x$memory_by_user_by_current_bytes
-- ----------------------------
DROP VIEW IF EXISTS `x$memory_by_user_by_current_bytes`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `x$memory_by_user_by_current_bytes` AS select if(isnull(`performance_schema`.`memory_summary_by_user_by_event_name`.`USER`),'background',`performance_schema`.`memory_summary_by_user_by_event_name`.`USER`) AS `user`,sum(`performance_schema`.`memory_summary_by_user_by_event_name`.`CURRENT_COUNT_USED`) AS `current_count_used`,sum(`performance_schema`.`memory_summary_by_user_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`) AS `current_allocated`,ifnull((sum(`performance_schema`.`memory_summary_by_user_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`) / nullif(sum(`performance_schema`.`memory_summary_by_user_by_event_name`.`CURRENT_COUNT_USED`),0)),0) AS `current_avg_alloc`,max(`performance_schema`.`memory_summary_by_user_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`) AS `current_max_alloc`,sum(`performance_schema`.`memory_summary_by_user_by_event_name`.`SUM_NUMBER_OF_BYTES_ALLOC`) AS `total_allocated` from `performance_schema`.`memory_summary_by_user_by_event_name` group by if(isnull(`performance_schema`.`memory_summary_by_user_by_event_name`.`USER`),'background',`performance_schema`.`memory_summary_by_user_by_event_name`.`USER`) order by sum(`performance_schema`.`memory_summary_by_user_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`) desc;

-- ----------------------------
-- View structure for x$memory_global_by_current_bytes
-- ----------------------------
DROP VIEW IF EXISTS `x$memory_global_by_current_bytes`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `x$memory_global_by_current_bytes` AS select `performance_schema`.`memory_summary_global_by_event_name`.`EVENT_NAME` AS `event_name`,`performance_schema`.`memory_summary_global_by_event_name`.`CURRENT_COUNT_USED` AS `current_count`,`performance_schema`.`memory_summary_global_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED` AS `current_alloc`,ifnull((`performance_schema`.`memory_summary_global_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED` / nullif(`performance_schema`.`memory_summary_global_by_event_name`.`CURRENT_COUNT_USED`,0)),0) AS `current_avg_alloc`,`performance_schema`.`memory_summary_global_by_event_name`.`HIGH_COUNT_USED` AS `high_count`,`performance_schema`.`memory_summary_global_by_event_name`.`HIGH_NUMBER_OF_BYTES_USED` AS `high_alloc`,ifnull((`performance_schema`.`memory_summary_global_by_event_name`.`HIGH_NUMBER_OF_BYTES_USED` / nullif(`performance_schema`.`memory_summary_global_by_event_name`.`HIGH_COUNT_USED`,0)),0) AS `high_avg_alloc` from `performance_schema`.`memory_summary_global_by_event_name` where (`performance_schema`.`memory_summary_global_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED` > 0) order by `performance_schema`.`memory_summary_global_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED` desc;

-- ----------------------------
-- View structure for x$memory_global_total
-- ----------------------------
DROP VIEW IF EXISTS `x$memory_global_total`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `x$memory_global_total` AS select sum(`performance_schema`.`memory_summary_global_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`) AS `total_allocated` from `performance_schema`.`memory_summary_global_by_event_name`;

-- ----------------------------
-- View structure for x$processlist
-- ----------------------------
DROP VIEW IF EXISTS `x$processlist`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `x$processlist` AS select `pps`.`THREAD_ID` AS `thd_id`,`pps`.`PROCESSLIST_ID` AS `conn_id`,if((`pps`.`NAME` = 'thread/sql/one_connection'),concat(`pps`.`PROCESSLIST_USER`,'@',`pps`.`PROCESSLIST_HOST`),replace(`pps`.`NAME`,'thread/','')) AS `user`,`pps`.`PROCESSLIST_DB` AS `db`,`pps`.`PROCESSLIST_COMMAND` AS `command`,`pps`.`PROCESSLIST_STATE` AS `state`,`pps`.`PROCESSLIST_TIME` AS `time`,`pps`.`PROCESSLIST_INFO` AS `current_statement`,if(isnull(`esc`.`END_EVENT_ID`),`esc`.`TIMER_WAIT`,NULL) AS `statement_latency`,if(isnull(`esc`.`END_EVENT_ID`),round((100 * (`estc`.`WORK_COMPLETED` / `estc`.`WORK_ESTIMATED`)),2),NULL) AS `progress`,`esc`.`LOCK_TIME` AS `lock_latency`,`esc`.`ROWS_EXAMINED` AS `rows_examined`,`esc`.`ROWS_SENT` AS `rows_sent`,`esc`.`ROWS_AFFECTED` AS `rows_affected`,`esc`.`CREATED_TMP_TABLES` AS `tmp_tables`,`esc`.`CREATED_TMP_DISK_TABLES` AS `tmp_disk_tables`,if(((`esc`.`NO_GOOD_INDEX_USED` > 0) or (`esc`.`NO_INDEX_USED` > 0)),'YES','NO') AS `full_scan`,if((`esc`.`END_EVENT_ID` is not null),`esc`.`SQL_TEXT`,NULL) AS `last_statement`,if((`esc`.`END_EVENT_ID` is not null),`esc`.`TIMER_WAIT`,NULL) AS `last_statement_latency`,`mem`.`current_allocated` AS `current_memory`,`ewc`.`EVENT_NAME` AS `last_wait`,if((isnull(`ewc`.`END_EVENT_ID`) and (`ewc`.`EVENT_NAME` is not null)),'Still Waiting',`ewc`.`TIMER_WAIT`) AS `last_wait_latency`,`ewc`.`SOURCE` AS `source`,`etc`.`TIMER_WAIT` AS `trx_latency`,`etc`.`STATE` AS `trx_state`,`etc`.`AUTOCOMMIT` AS `trx_autocommit`,`conattr_pid`.`ATTR_VALUE` AS `pid`,`conattr_progname`.`ATTR_VALUE` AS `program_name` from (((((((`performance_schema`.`threads` `pps` left join `performance_schema`.`events_waits_current` `ewc` on((`pps`.`THREAD_ID` = `ewc`.`THREAD_ID`))) left join `performance_schema`.`events_stages_current` `estc` on((`pps`.`THREAD_ID` = `estc`.`THREAD_ID`))) left join `performance_schema`.`events_statements_current` `esc` on((`pps`.`THREAD_ID` = `esc`.`THREAD_ID`))) left join `performance_schema`.`events_transactions_current` `etc` on((`pps`.`THREAD_ID` = `etc`.`THREAD_ID`))) left join `sys`.`x$memory_by_thread_by_current_bytes` `mem` on((`pps`.`THREAD_ID` = `mem`.`thread_id`))) left join `performance_schema`.`session_connect_attrs` `conattr_pid` on(((`conattr_pid`.`PROCESSLIST_ID` = `pps`.`PROCESSLIST_ID`) and (`conattr_pid`.`ATTR_NAME` = '_pid')))) left join `performance_schema`.`session_connect_attrs` `conattr_progname` on(((`conattr_progname`.`PROCESSLIST_ID` = `pps`.`PROCESSLIST_ID`) and (`conattr_progname`.`ATTR_NAME` = 'program_name')))) order by `pps`.`PROCESSLIST_TIME` desc,`last_wait_latency` desc;

-- ----------------------------
-- View structure for x$ps_digest_95th_percentile_by_avg_us
-- ----------------------------
DROP VIEW IF EXISTS `x$ps_digest_95th_percentile_by_avg_us`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `x$ps_digest_95th_percentile_by_avg_us` AS select `s2`.`avg_us` AS `avg_us`,ifnull((sum(`s1`.`cnt`) / nullif((select count(0) from `performance_schema`.`events_statements_summary_by_digest`),0)),0) AS `percentile` from (`sys`.`x$ps_digest_avg_latency_distribution` `s1` join `sys`.`x$ps_digest_avg_latency_distribution` `s2` on((`s1`.`avg_us` <= `s2`.`avg_us`))) group by `s2`.`avg_us` having (ifnull((sum(`s1`.`cnt`) / nullif((select count(0) from `performance_schema`.`events_statements_summary_by_digest`),0)),0) > 0.95) order by `percentile` limit 1;

-- ----------------------------
-- View structure for x$ps_digest_avg_latency_distribution
-- ----------------------------
DROP VIEW IF EXISTS `x$ps_digest_avg_latency_distribution`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `x$ps_digest_avg_latency_distribution` AS select count(0) AS `cnt`,round((`performance_schema`.`events_statements_summary_by_digest`.`AVG_TIMER_WAIT` / 1000000),0) AS `avg_us` from `performance_schema`.`events_statements_summary_by_digest` group by `avg_us`;

-- ----------------------------
-- View structure for x$ps_schema_table_statistics_io
-- ----------------------------
DROP VIEW IF EXISTS `x$ps_schema_table_statistics_io`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `x$ps_schema_table_statistics_io` AS select `extract_schema_from_file_name`(`performance_schema`.`file_summary_by_instance`.`FILE_NAME`) AS `table_schema`,`extract_table_from_file_name`(`performance_schema`.`file_summary_by_instance`.`FILE_NAME`) AS `table_name`,sum(`performance_schema`.`file_summary_by_instance`.`COUNT_READ`) AS `count_read`,sum(`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_READ`) AS `sum_number_of_bytes_read`,sum(`performance_schema`.`file_summary_by_instance`.`SUM_TIMER_READ`) AS `sum_timer_read`,sum(`performance_schema`.`file_summary_by_instance`.`COUNT_WRITE`) AS `count_write`,sum(`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_WRITE`) AS `sum_number_of_bytes_write`,sum(`performance_schema`.`file_summary_by_instance`.`SUM_TIMER_WRITE`) AS `sum_timer_write`,sum(`performance_schema`.`file_summary_by_instance`.`COUNT_MISC`) AS `count_misc`,sum(`performance_schema`.`file_summary_by_instance`.`SUM_TIMER_MISC`) AS `sum_timer_misc` from `performance_schema`.`file_summary_by_instance` group by `table_schema`,`table_name`;

-- ----------------------------
-- View structure for x$schema_flattened_keys
-- ----------------------------
DROP VIEW IF EXISTS `x$schema_flattened_keys`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `x$schema_flattened_keys` AS select `information_schema`.`STATISTICS`.`TABLE_SCHEMA` AS `table_schema`,`information_schema`.`STATISTICS`.`TABLE_NAME` AS `table_name`,`information_schema`.`STATISTICS`.`INDEX_NAME` AS `index_name`,max(`information_schema`.`STATISTICS`.`NON_UNIQUE`) AS `non_unique`,max(if(isnull(`information_schema`.`STATISTICS`.`SUB_PART`),0,1)) AS `subpart_exists`,group_concat(`information_schema`.`STATISTICS`.`COLUMN_NAME` order by `information_schema`.`STATISTICS`.`SEQ_IN_INDEX` ASC separator ',') AS `index_columns` from `INFORMATION_SCHEMA`.`STATISTICS` where ((`information_schema`.`STATISTICS`.`INDEX_TYPE` = 'BTREE') and (`information_schema`.`STATISTICS`.`TABLE_SCHEMA` not in ('mysql','sys','INFORMATION_SCHEMA','PERFORMANCE_SCHEMA'))) group by `information_schema`.`STATISTICS`.`TABLE_SCHEMA`,`information_schema`.`STATISTICS`.`TABLE_NAME`,`information_schema`.`STATISTICS`.`INDEX_NAME`;

-- ----------------------------
-- View structure for x$schema_index_statistics
-- ----------------------------
DROP VIEW IF EXISTS `x$schema_index_statistics`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `x$schema_index_statistics` AS select `performance_schema`.`table_io_waits_summary_by_index_usage`.`OBJECT_SCHEMA` AS `table_schema`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`OBJECT_NAME` AS `table_name`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`INDEX_NAME` AS `index_name`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`COUNT_FETCH` AS `rows_selected`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`SUM_TIMER_FETCH` AS `select_latency`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`COUNT_INSERT` AS `rows_inserted`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`SUM_TIMER_INSERT` AS `insert_latency`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`COUNT_UPDATE` AS `rows_updated`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`SUM_TIMER_UPDATE` AS `update_latency`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`COUNT_DELETE` AS `rows_deleted`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`SUM_TIMER_INSERT` AS `delete_latency` from `performance_schema`.`table_io_waits_summary_by_index_usage` where (`performance_schema`.`table_io_waits_summary_by_index_usage`.`INDEX_NAME` is not null) order by `performance_schema`.`table_io_waits_summary_by_index_usage`.`SUM_TIMER_WAIT` desc;

-- ----------------------------
-- View structure for x$schema_tables_with_full_table_scans
-- ----------------------------
DROP VIEW IF EXISTS `x$schema_tables_with_full_table_scans`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `x$schema_tables_with_full_table_scans` AS select `performance_schema`.`table_io_waits_summary_by_index_usage`.`OBJECT_SCHEMA` AS `object_schema`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`OBJECT_NAME` AS `object_name`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`COUNT_READ` AS `rows_full_scanned`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`SUM_TIMER_WAIT` AS `latency` from `performance_schema`.`table_io_waits_summary_by_index_usage` where (isnull(`performance_schema`.`table_io_waits_summary_by_index_usage`.`INDEX_NAME`) and (`performance_schema`.`table_io_waits_summary_by_index_usage`.`COUNT_READ` > 0)) order by `performance_schema`.`table_io_waits_summary_by_index_usage`.`COUNT_READ` desc;

-- ----------------------------
-- View structure for x$schema_table_lock_waits
-- ----------------------------
DROP VIEW IF EXISTS `x$schema_table_lock_waits`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `x$schema_table_lock_waits` AS select `g`.`OBJECT_SCHEMA` AS `object_schema`,`g`.`OBJECT_NAME` AS `object_name`,`pt`.`THREAD_ID` AS `waiting_thread_id`,`pt`.`PROCESSLIST_ID` AS `waiting_pid`,`sys`.`ps_thread_account`(`p`.`OWNER_THREAD_ID`) AS `waiting_account`,`p`.`LOCK_TYPE` AS `waiting_lock_type`,`p`.`LOCK_DURATION` AS `waiting_lock_duration`,`pt`.`PROCESSLIST_INFO` AS `waiting_query`,`pt`.`PROCESSLIST_TIME` AS `waiting_query_secs`,`ps`.`ROWS_AFFECTED` AS `waiting_query_rows_affected`,`ps`.`ROWS_EXAMINED` AS `waiting_query_rows_examined`,`gt`.`THREAD_ID` AS `blocking_thread_id`,`gt`.`PROCESSLIST_ID` AS `blocking_pid`,`sys`.`ps_thread_account`(`g`.`OWNER_THREAD_ID`) AS `blocking_account`,`g`.`LOCK_TYPE` AS `blocking_lock_type`,`g`.`LOCK_DURATION` AS `blocking_lock_duration`,concat('KILL QUERY ',`gt`.`PROCESSLIST_ID`) AS `sql_kill_blocking_query`,concat('KILL ',`gt`.`PROCESSLIST_ID`) AS `sql_kill_blocking_connection` from (((((`performance_schema`.`metadata_locks` `g` join `performance_schema`.`metadata_locks` `p` on(((`g`.`OBJECT_TYPE` = `p`.`OBJECT_TYPE`) and (`g`.`OBJECT_SCHEMA` = `p`.`OBJECT_SCHEMA`) and (`g`.`OBJECT_NAME` = `p`.`OBJECT_NAME`) and (`g`.`LOCK_STATUS` = 'GRANTED') and (`p`.`LOCK_STATUS` = 'PENDING')))) join `performance_schema`.`threads` `gt` on((`g`.`OWNER_THREAD_ID` = `gt`.`THREAD_ID`))) join `performance_schema`.`threads` `pt` on((`p`.`OWNER_THREAD_ID` = `pt`.`THREAD_ID`))) left join `performance_schema`.`events_statements_current` `gs` on((`g`.`OWNER_THREAD_ID` = `gs`.`THREAD_ID`))) left join `performance_schema`.`events_statements_current` `ps` on((`p`.`OWNER_THREAD_ID` = `ps`.`THREAD_ID`))) where (`g`.`OBJECT_TYPE` = 'TABLE');

-- ----------------------------
-- View structure for x$schema_table_statistics
-- ----------------------------
DROP VIEW IF EXISTS `x$schema_table_statistics`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `x$schema_table_statistics` AS select `pst`.`OBJECT_SCHEMA` AS `table_schema`,`pst`.`OBJECT_NAME` AS `table_name`,`pst`.`SUM_TIMER_WAIT` AS `total_latency`,`pst`.`COUNT_FETCH` AS `rows_fetched`,`pst`.`SUM_TIMER_FETCH` AS `fetch_latency`,`pst`.`COUNT_INSERT` AS `rows_inserted`,`pst`.`SUM_TIMER_INSERT` AS `insert_latency`,`pst`.`COUNT_UPDATE` AS `rows_updated`,`pst`.`SUM_TIMER_UPDATE` AS `update_latency`,`pst`.`COUNT_DELETE` AS `rows_deleted`,`pst`.`SUM_TIMER_DELETE` AS `delete_latency`,`fsbi`.`count_read` AS `io_read_requests`,`fsbi`.`sum_number_of_bytes_read` AS `io_read`,`fsbi`.`sum_timer_read` AS `io_read_latency`,`fsbi`.`count_write` AS `io_write_requests`,`fsbi`.`sum_number_of_bytes_write` AS `io_write`,`fsbi`.`sum_timer_write` AS `io_write_latency`,`fsbi`.`count_misc` AS `io_misc_requests`,`fsbi`.`sum_timer_misc` AS `io_misc_latency` from (`performance_schema`.`table_io_waits_summary_by_table` `pst` left join `sys`.`x$ps_schema_table_statistics_io` `fsbi` on(((`pst`.`OBJECT_SCHEMA` = `fsbi`.`table_schema`) and (`pst`.`OBJECT_NAME` = `fsbi`.`table_name`)))) order by `pst`.`SUM_TIMER_WAIT` desc;

-- ----------------------------
-- View structure for x$schema_table_statistics_with_buffer
-- ----------------------------
DROP VIEW IF EXISTS `x$schema_table_statistics_with_buffer`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `x$schema_table_statistics_with_buffer` AS select `pst`.`OBJECT_SCHEMA` AS `table_schema`,`pst`.`OBJECT_NAME` AS `table_name`,`pst`.`COUNT_FETCH` AS `rows_fetched`,`pst`.`SUM_TIMER_FETCH` AS `fetch_latency`,`pst`.`COUNT_INSERT` AS `rows_inserted`,`pst`.`SUM_TIMER_INSERT` AS `insert_latency`,`pst`.`COUNT_UPDATE` AS `rows_updated`,`pst`.`SUM_TIMER_UPDATE` AS `update_latency`,`pst`.`COUNT_DELETE` AS `rows_deleted`,`pst`.`SUM_TIMER_DELETE` AS `delete_latency`,`fsbi`.`count_read` AS `io_read_requests`,`fsbi`.`sum_number_of_bytes_read` AS `io_read`,`fsbi`.`sum_timer_read` AS `io_read_latency`,`fsbi`.`count_write` AS `io_write_requests`,`fsbi`.`sum_number_of_bytes_write` AS `io_write`,`fsbi`.`sum_timer_write` AS `io_write_latency`,`fsbi`.`count_misc` AS `io_misc_requests`,`fsbi`.`sum_timer_misc` AS `io_misc_latency`,`ibp`.`allocated` AS `innodb_buffer_allocated`,`ibp`.`data` AS `innodb_buffer_data`,(`ibp`.`allocated` - `ibp`.`data`) AS `innodb_buffer_free`,`ibp`.`pages` AS `innodb_buffer_pages`,`ibp`.`pages_hashed` AS `innodb_buffer_pages_hashed`,`ibp`.`pages_old` AS `innodb_buffer_pages_old`,`ibp`.`rows_cached` AS `innodb_buffer_rows_cached` from ((`performance_schema`.`table_io_waits_summary_by_table` `pst` left join `sys`.`x$ps_schema_table_statistics_io` `fsbi` on(((`pst`.`OBJECT_SCHEMA` = `fsbi`.`table_schema`) and (`pst`.`OBJECT_NAME` = `fsbi`.`table_name`)))) left join `sys`.`x$innodb_buffer_stats_by_table` `ibp` on(((`pst`.`OBJECT_SCHEMA` = `ibp`.`object_schema`) and (`pst`.`OBJECT_NAME` = `ibp`.`object_name`)))) order by `pst`.`SUM_TIMER_WAIT` desc;

-- ----------------------------
-- View structure for x$session
-- ----------------------------
DROP VIEW IF EXISTS `x$session`;
CREATE ALGORITHM = UNDEFINED SQL SECURITY INVOKER VIEW `x$session` AS select `x$processlist`.`thd_id` AS `thd_id`,`x$processlist`.`conn_id` AS `conn_id`,`x$processlist`.`user` AS `user`,`x$processlist`.`db` AS `db`,`x$processlist`.`command` AS `command`,`x$processlist`.`state` AS `state`,`x$processlist`.`time` AS `time`,`x$processlist`.`current_statement` AS `current_statement`,`x$processlist`.`statement_latency` AS `statement_latency`,`x$processlist`.`progress` AS `progress`,`x$processlist`.`lock_latency` AS `lock_latency`,`x$processlist`.`rows_examined` AS `rows_examined`,`x$processlist`.`rows_sent` AS `rows_sent`,`x$processlist`.`rows_affected` AS `rows_affected`,`x$processlist`.`tmp_tables` AS `tmp_tables`,`x$processlist`.`tmp_disk_tables` AS `tmp_disk_tables`,`x$processlist`.`full_scan` AS `full_scan`,`x$processlist`.`last_statement` AS `last_statement`,`x$processlist`.`last_statement_latency` AS `last_statement_latency`,`x$processlist`.`current_memory` AS `current_memory`,`x$processlist`.`last_wait` AS `last_wait`,`x$processlist`.`last_wait_latency` AS `last_wait_latency`,`x$processlist`.`source` AS `source`,`x$processlist`.`trx_latency` AS `trx_latency`,`x$processlist`.`trx_state` AS `trx_state`,`x$processlist`.`trx_autocommit` AS `trx_autocommit`,`x$processlist`.`pid` AS `pid`,`x$processlist`.`program_name` AS `program_name` from `sys`.`x$processlist` where ((`x$processlist`.`conn_id` is not null) and (`x$processlist`.`command` <> 'Daemon'));

-- ----------------------------
-- View structure for x$statements_with_errors_or_warnings
-- ----------------------------
DROP VIEW IF EXISTS `x$statements_with_errors_or_warnings`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `x$statements_with_errors_or_warnings` AS select `performance_schema`.`events_statements_summary_by_digest`.`DIGEST_TEXT` AS `query`,`performance_schema`.`events_statements_summary_by_digest`.`SCHEMA_NAME` AS `db`,`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR` AS `exec_count`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_ERRORS` AS `errors`,(ifnull((`performance_schema`.`events_statements_summary_by_digest`.`SUM_ERRORS` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0)),0) * 100) AS `error_pct`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_WARNINGS` AS `warnings`,(ifnull((`performance_schema`.`events_statements_summary_by_digest`.`SUM_WARNINGS` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0)),0) * 100) AS `warning_pct`,`performance_schema`.`events_statements_summary_by_digest`.`FIRST_SEEN` AS `first_seen`,`performance_schema`.`events_statements_summary_by_digest`.`LAST_SEEN` AS `last_seen`,`performance_schema`.`events_statements_summary_by_digest`.`DIGEST` AS `digest` from `performance_schema`.`events_statements_summary_by_digest` where ((`performance_schema`.`events_statements_summary_by_digest`.`SUM_ERRORS` > 0) or (`performance_schema`.`events_statements_summary_by_digest`.`SUM_WARNINGS` > 0)) order by `performance_schema`.`events_statements_summary_by_digest`.`SUM_ERRORS` desc,`performance_schema`.`events_statements_summary_by_digest`.`SUM_WARNINGS` desc;

-- ----------------------------
-- View structure for x$statements_with_full_table_scans
-- ----------------------------
DROP VIEW IF EXISTS `x$statements_with_full_table_scans`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `x$statements_with_full_table_scans` AS select `performance_schema`.`events_statements_summary_by_digest`.`DIGEST_TEXT` AS `query`,`performance_schema`.`events_statements_summary_by_digest`.`SCHEMA_NAME` AS `db`,`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR` AS `exec_count`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT` AS `total_latency`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_INDEX_USED` AS `no_index_used_count`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_GOOD_INDEX_USED` AS `no_good_index_used_count`,round((ifnull((`performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_INDEX_USED` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0)),0) * 100),0) AS `no_index_used_pct`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_SENT` AS `rows_sent`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_EXAMINED` AS `rows_examined`,round((`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_SENT` / `performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`),0) AS `rows_sent_avg`,round((`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_EXAMINED` / `performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`),0) AS `rows_examined_avg`,`performance_schema`.`events_statements_summary_by_digest`.`FIRST_SEEN` AS `first_seen`,`performance_schema`.`events_statements_summary_by_digest`.`LAST_SEEN` AS `last_seen`,`performance_schema`.`events_statements_summary_by_digest`.`DIGEST` AS `digest` from `performance_schema`.`events_statements_summary_by_digest` where (((`performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_INDEX_USED` > 0) or (`performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_GOOD_INDEX_USED` > 0)) and (not((`performance_schema`.`events_statements_summary_by_digest`.`DIGEST_TEXT` like 'SHOW%')))) order by round((ifnull((`performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_INDEX_USED` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0)),0) * 100),0) desc,`performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT` desc;

-- ----------------------------
-- View structure for x$statements_with_runtimes_in_95th_percentile
-- ----------------------------
DROP VIEW IF EXISTS `x$statements_with_runtimes_in_95th_percentile`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `x$statements_with_runtimes_in_95th_percentile` AS select `stmts`.`DIGEST_TEXT` AS `query`,`stmts`.`SCHEMA_NAME` AS `db`,if(((`stmts`.`SUM_NO_GOOD_INDEX_USED` > 0) or (`stmts`.`SUM_NO_INDEX_USED` > 0)),'*','') AS `full_scan`,`stmts`.`COUNT_STAR` AS `exec_count`,`stmts`.`SUM_ERRORS` AS `err_count`,`stmts`.`SUM_WARNINGS` AS `warn_count`,`stmts`.`SUM_TIMER_WAIT` AS `total_latency`,`stmts`.`MAX_TIMER_WAIT` AS `max_latency`,`stmts`.`AVG_TIMER_WAIT` AS `avg_latency`,`stmts`.`SUM_ROWS_SENT` AS `rows_sent`,round(ifnull((`stmts`.`SUM_ROWS_SENT` / nullif(`stmts`.`COUNT_STAR`,0)),0),0) AS `rows_sent_avg`,`stmts`.`SUM_ROWS_EXAMINED` AS `rows_examined`,round(ifnull((`stmts`.`SUM_ROWS_EXAMINED` / nullif(`stmts`.`COUNT_STAR`,0)),0),0) AS `rows_examined_avg`,`stmts`.`FIRST_SEEN` AS `first_seen`,`stmts`.`LAST_SEEN` AS `last_seen`,`stmts`.`DIGEST` AS `digest` from (`performance_schema`.`events_statements_summary_by_digest` `stmts` join `sys`.`x$ps_digest_95th_percentile_by_avg_us` `top_percentile` on((round((`stmts`.`AVG_TIMER_WAIT` / 1000000),0) >= `top_percentile`.`avg_us`))) order by `stmts`.`AVG_TIMER_WAIT` desc;

-- ----------------------------
-- View structure for x$statements_with_sorting
-- ----------------------------
DROP VIEW IF EXISTS `x$statements_with_sorting`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `x$statements_with_sorting` AS select `performance_schema`.`events_statements_summary_by_digest`.`DIGEST_TEXT` AS `query`,`performance_schema`.`events_statements_summary_by_digest`.`SCHEMA_NAME` AS `db`,`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR` AS `exec_count`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT` AS `total_latency`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_MERGE_PASSES` AS `sort_merge_passes`,round(ifnull((`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_MERGE_PASSES` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0)),0),0) AS `avg_sort_merges`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_SCAN` AS `sorts_using_scans`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_RANGE` AS `sort_using_range`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_ROWS` AS `rows_sorted`,round(ifnull((`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_ROWS` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0)),0),0) AS `avg_rows_sorted`,`performance_schema`.`events_statements_summary_by_digest`.`FIRST_SEEN` AS `first_seen`,`performance_schema`.`events_statements_summary_by_digest`.`LAST_SEEN` AS `last_seen`,`performance_schema`.`events_statements_summary_by_digest`.`DIGEST` AS `digest` from `performance_schema`.`events_statements_summary_by_digest` where (`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_ROWS` > 0) order by `performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT` desc;

-- ----------------------------
-- View structure for x$statements_with_temp_tables
-- ----------------------------
DROP VIEW IF EXISTS `x$statements_with_temp_tables`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `x$statements_with_temp_tables` AS select `performance_schema`.`events_statements_summary_by_digest`.`DIGEST_TEXT` AS `query`,`performance_schema`.`events_statements_summary_by_digest`.`SCHEMA_NAME` AS `db`,`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR` AS `exec_count`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT` AS `total_latency`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_TABLES` AS `memory_tmp_tables`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_DISK_TABLES` AS `disk_tmp_tables`,round(ifnull((`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_TABLES` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0)),0),0) AS `avg_tmp_tables_per_query`,round((ifnull((`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_DISK_TABLES` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_TABLES`,0)),0) * 100),0) AS `tmp_tables_to_disk_pct`,`performance_schema`.`events_statements_summary_by_digest`.`FIRST_SEEN` AS `first_seen`,`performance_schema`.`events_statements_summary_by_digest`.`LAST_SEEN` AS `last_seen`,`performance_schema`.`events_statements_summary_by_digest`.`DIGEST` AS `digest` from `performance_schema`.`events_statements_summary_by_digest` where (`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_TABLES` > 0) order by `performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_DISK_TABLES` desc,`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_TABLES` desc;

-- ----------------------------
-- View structure for x$statement_analysis
-- ----------------------------
DROP VIEW IF EXISTS `x$statement_analysis`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `x$statement_analysis` AS select `performance_schema`.`events_statements_summary_by_digest`.`DIGEST_TEXT` AS `query`,`performance_schema`.`events_statements_summary_by_digest`.`SCHEMA_NAME` AS `db`,if(((`performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_GOOD_INDEX_USED` > 0) or (`performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_INDEX_USED` > 0)),'*','') AS `full_scan`,`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR` AS `exec_count`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_ERRORS` AS `err_count`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_WARNINGS` AS `warn_count`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT` AS `total_latency`,`performance_schema`.`events_statements_summary_by_digest`.`MAX_TIMER_WAIT` AS `max_latency`,`performance_schema`.`events_statements_summary_by_digest`.`AVG_TIMER_WAIT` AS `avg_latency`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_LOCK_TIME` AS `lock_latency`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_SENT` AS `rows_sent`,round(ifnull((`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_SENT` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0)),0),0) AS `rows_sent_avg`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_EXAMINED` AS `rows_examined`,round(ifnull((`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_EXAMINED` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0)),0),0) AS `rows_examined_avg`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_AFFECTED` AS `rows_affected`,round(ifnull((`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_AFFECTED` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0)),0),0) AS `rows_affected_avg`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_TABLES` AS `tmp_tables`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_DISK_TABLES` AS `tmp_disk_tables`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_ROWS` AS `rows_sorted`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_MERGE_PASSES` AS `sort_merge_passes`,`performance_schema`.`events_statements_summary_by_digest`.`DIGEST` AS `digest`,`performance_schema`.`events_statements_summary_by_digest`.`FIRST_SEEN` AS `first_seen`,`performance_schema`.`events_statements_summary_by_digest`.`LAST_SEEN` AS `last_seen` from `performance_schema`.`events_statements_summary_by_digest` order by `performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT` desc;

-- ----------------------------
-- View structure for x$user_summary
-- ----------------------------
DROP VIEW IF EXISTS `x$user_summary`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `x$user_summary` AS select if(isnull(`performance_schema`.`accounts`.`USER`),'background',`performance_schema`.`accounts`.`USER`) AS `user`,sum(`stmt`.`total`) AS `statements`,sum(`stmt`.`total_latency`) AS `statement_latency`,ifnull((sum(`stmt`.`total_latency`) / nullif(sum(`stmt`.`total`),0)),0) AS `statement_avg_latency`,sum(`stmt`.`full_scans`) AS `table_scans`,sum(`io`.`ios`) AS `file_ios`,sum(`io`.`io_latency`) AS `file_io_latency`,sum(`performance_schema`.`accounts`.`CURRENT_CONNECTIONS`) AS `current_connections`,sum(`performance_schema`.`accounts`.`TOTAL_CONNECTIONS`) AS `total_connections`,count(distinct `performance_schema`.`accounts`.`HOST`) AS `unique_hosts`,sum(`mem`.`current_allocated`) AS `current_memory`,sum(`mem`.`total_allocated`) AS `total_memory_allocated` from (((`performance_schema`.`accounts` left join `sys`.`x$user_summary_by_statement_latency` `stmt` on((if(isnull(`performance_schema`.`accounts`.`USER`),'background',`performance_schema`.`accounts`.`USER`) = `stmt`.`user`))) left join `sys`.`x$user_summary_by_file_io` `io` on((if(isnull(`performance_schema`.`accounts`.`USER`),'background',`performance_schema`.`accounts`.`USER`) = `io`.`user`))) left join `sys`.`x$memory_by_user_by_current_bytes` `mem` on((if(isnull(`performance_schema`.`accounts`.`USER`),'background',`performance_schema`.`accounts`.`USER`) = `mem`.`user`))) group by if(isnull(`performance_schema`.`accounts`.`USER`),'background',`performance_schema`.`accounts`.`USER`) order by sum(`stmt`.`total_latency`) desc;

-- ----------------------------
-- View structure for x$user_summary_by_file_io
-- ----------------------------
DROP VIEW IF EXISTS `x$user_summary_by_file_io`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `x$user_summary_by_file_io` AS select if(isnull(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`),'background',`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`) AS `user`,sum(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`COUNT_STAR`) AS `ios`,sum(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`) AS `io_latency` from `performance_schema`.`events_waits_summary_by_user_by_event_name` where (`performance_schema`.`events_waits_summary_by_user_by_event_name`.`EVENT_NAME` like 'wait/io/file/%') group by if(isnull(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`),'background',`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`) order by sum(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`) desc;

-- ----------------------------
-- View structure for x$user_summary_by_file_io_type
-- ----------------------------
DROP VIEW IF EXISTS `x$user_summary_by_file_io_type`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `x$user_summary_by_file_io_type` AS select if(isnull(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`),'background',`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`) AS `user`,`performance_schema`.`events_waits_summary_by_user_by_event_name`.`EVENT_NAME` AS `event_name`,`performance_schema`.`events_waits_summary_by_user_by_event_name`.`COUNT_STAR` AS `total`,`performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` AS `latency`,`performance_schema`.`events_waits_summary_by_user_by_event_name`.`MAX_TIMER_WAIT` AS `max_latency` from `performance_schema`.`events_waits_summary_by_user_by_event_name` where ((`performance_schema`.`events_waits_summary_by_user_by_event_name`.`EVENT_NAME` like 'wait/io/file%') and (`performance_schema`.`events_waits_summary_by_user_by_event_name`.`COUNT_STAR` > 0)) order by if(isnull(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`),'background',`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`),`performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` desc;

-- ----------------------------
-- View structure for x$user_summary_by_stages
-- ----------------------------
DROP VIEW IF EXISTS `x$user_summary_by_stages`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `x$user_summary_by_stages` AS select if(isnull(`performance_schema`.`events_stages_summary_by_user_by_event_name`.`USER`),'background',`performance_schema`.`events_stages_summary_by_user_by_event_name`.`USER`) AS `user`,`performance_schema`.`events_stages_summary_by_user_by_event_name`.`EVENT_NAME` AS `event_name`,`performance_schema`.`events_stages_summary_by_user_by_event_name`.`COUNT_STAR` AS `total`,`performance_schema`.`events_stages_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` AS `total_latency`,`performance_schema`.`events_stages_summary_by_user_by_event_name`.`AVG_TIMER_WAIT` AS `avg_latency` from `performance_schema`.`events_stages_summary_by_user_by_event_name` where (`performance_schema`.`events_stages_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` <> 0) order by if(isnull(`performance_schema`.`events_stages_summary_by_user_by_event_name`.`USER`),'background',`performance_schema`.`events_stages_summary_by_user_by_event_name`.`USER`),`performance_schema`.`events_stages_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` desc;

-- ----------------------------
-- View structure for x$user_summary_by_statement_latency
-- ----------------------------
DROP VIEW IF EXISTS `x$user_summary_by_statement_latency`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `x$user_summary_by_statement_latency` AS select if(isnull(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER`),'background',`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER`) AS `user`,sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`COUNT_STAR`) AS `total`,sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency`,sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_LOCK_TIME`) AS `lock_latency`,sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_ROWS_SENT`) AS `rows_sent`,sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_ROWS_EXAMINED`) AS `rows_examined`,sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_ROWS_AFFECTED`) AS `rows_affected`,(sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_NO_INDEX_USED`) + sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_NO_GOOD_INDEX_USED`)) AS `full_scans` from `performance_schema`.`events_statements_summary_by_user_by_event_name` group by if(isnull(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER`),'background',`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER`) order by sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`) desc;

-- ----------------------------
-- View structure for x$user_summary_by_statement_type
-- ----------------------------
DROP VIEW IF EXISTS `x$user_summary_by_statement_type`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `x$user_summary_by_statement_type` AS select if(isnull(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER`),'background',`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER`) AS `user`,substring_index(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`EVENT_NAME`,'/',-(1)) AS `statement`,`performance_schema`.`events_statements_summary_by_user_by_event_name`.`COUNT_STAR` AS `total`,`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` AS `total_latency`,`performance_schema`.`events_statements_summary_by_user_by_event_name`.`MAX_TIMER_WAIT` AS `max_latency`,`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_LOCK_TIME` AS `lock_latency`,`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_ROWS_SENT` AS `rows_sent`,`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_ROWS_EXAMINED` AS `rows_examined`,`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_ROWS_AFFECTED` AS `rows_affected`,(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_NO_INDEX_USED` + `performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_NO_GOOD_INDEX_USED`) AS `full_scans` from `performance_schema`.`events_statements_summary_by_user_by_event_name` where (`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` <> 0) order by if(isnull(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER`),'background',`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER`),`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` desc;

-- ----------------------------
-- View structure for x$waits_by_host_by_latency
-- ----------------------------
DROP VIEW IF EXISTS `x$waits_by_host_by_latency`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `x$waits_by_host_by_latency` AS select if(isnull(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`),'background',`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`) AS `host`,`performance_schema`.`events_waits_summary_by_host_by_event_name`.`EVENT_NAME` AS `event`,`performance_schema`.`events_waits_summary_by_host_by_event_name`.`COUNT_STAR` AS `total`,`performance_schema`.`events_waits_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` AS `total_latency`,`performance_schema`.`events_waits_summary_by_host_by_event_name`.`AVG_TIMER_WAIT` AS `avg_latency`,`performance_schema`.`events_waits_summary_by_host_by_event_name`.`MAX_TIMER_WAIT` AS `max_latency` from `performance_schema`.`events_waits_summary_by_host_by_event_name` where ((`performance_schema`.`events_waits_summary_by_host_by_event_name`.`EVENT_NAME` <> 'idle') and (`performance_schema`.`events_waits_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` > 0)) order by if(isnull(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`),'background',`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`),`performance_schema`.`events_waits_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` desc;

-- ----------------------------
-- View structure for x$waits_by_user_by_latency
-- ----------------------------
DROP VIEW IF EXISTS `x$waits_by_user_by_latency`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `x$waits_by_user_by_latency` AS select if(isnull(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`),'background',`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`) AS `user`,`performance_schema`.`events_waits_summary_by_user_by_event_name`.`EVENT_NAME` AS `event`,`performance_schema`.`events_waits_summary_by_user_by_event_name`.`COUNT_STAR` AS `total`,`performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` AS `total_latency`,`performance_schema`.`events_waits_summary_by_user_by_event_name`.`AVG_TIMER_WAIT` AS `avg_latency`,`performance_schema`.`events_waits_summary_by_user_by_event_name`.`MAX_TIMER_WAIT` AS `max_latency` from `performance_schema`.`events_waits_summary_by_user_by_event_name` where ((`performance_schema`.`events_waits_summary_by_user_by_event_name`.`EVENT_NAME` <> 'idle') and (`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER` is not null) and (`performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` > 0)) order by if(isnull(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`),'background',`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`),`performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` desc;

-- ----------------------------
-- View structure for x$waits_global_by_latency
-- ----------------------------
DROP VIEW IF EXISTS `x$waits_global_by_latency`;
CREATE ALGORITHM = MERGE SQL SECURITY INVOKER VIEW `x$waits_global_by_latency` AS select `performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME` AS `events`,`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR` AS `total`,`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT` AS `total_latency`,`performance_schema`.`events_waits_summary_global_by_event_name`.`AVG_TIMER_WAIT` AS `avg_latency`,`performance_schema`.`events_waits_summary_global_by_event_name`.`MAX_TIMER_WAIT` AS `max_latency` from `performance_schema`.`events_waits_summary_global_by_event_name` where ((`performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME` <> 'idle') and (`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT` > 0)) order by `performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT` desc;

-- ----------------------------
-- View structure for x$wait_classes_global_by_avg_latency
-- ----------------------------
DROP VIEW IF EXISTS `x$wait_classes_global_by_avg_latency`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `x$wait_classes_global_by_avg_latency` AS select substring_index(`performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME`,'/',3) AS `event_class`,sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR`) AS `total`,sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,min(`performance_schema`.`events_waits_summary_global_by_event_name`.`MIN_TIMER_WAIT`) AS `min_latency`,ifnull((sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) / nullif(sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR`),0)),0) AS `avg_latency`,max(`performance_schema`.`events_waits_summary_global_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency` from `performance_schema`.`events_waits_summary_global_by_event_name` where ((`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT` > 0) and (`performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME` <> 'idle')) group by `event_class` order by ifnull((sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) / nullif(sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR`),0)),0) desc;

-- ----------------------------
-- View structure for x$wait_classes_global_by_latency
-- ----------------------------
DROP VIEW IF EXISTS `x$wait_classes_global_by_latency`;
CREATE ALGORITHM = TEMPTABLE SQL SECURITY INVOKER VIEW `x$wait_classes_global_by_latency` AS select substring_index(`performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME`,'/',3) AS `event_class`,sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR`) AS `total`,sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,min(`performance_schema`.`events_waits_summary_global_by_event_name`.`MIN_TIMER_WAIT`) AS `min_latency`,ifnull((sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) / nullif(sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR`),0)),0) AS `avg_latency`,max(`performance_schema`.`events_waits_summary_global_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency` from `performance_schema`.`events_waits_summary_global_by_event_name` where ((`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT` > 0) and (`performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME` <> 'idle')) group by substring_index(`performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME`,'/',3) order by sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) desc;

-- ----------------------------
-- Procedure structure for create_synonym_db
-- ----------------------------
DROP PROCEDURE IF EXISTS `create_synonym_db`;
delimiter ;;
CREATE PROCEDURE `sys`.`create_synonym_db`(IN in_db_name VARCHAR(64),  IN in_synonym VARCHAR(64))
  MODIFIES SQL DATA 
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Takes a source database name and synonym name, and then creates the \n synonym database with views that point to all of the tables within\n the source database.\n \n Useful for creating a \"ps\" synonym for \"performance_schema\",\n or \"is\" instead of \"information_schema\", for example.\n \n Parameters\n \n in_db_name (VARCHAR(64)):\n The database name that you would like to create a synonym for.\n in_synonym (VARCHAR(64)):\n The database synonym name.\n \n Example\n \n mysql> SHOW DATABASES;\n +--------------------+\n | Database           |\n +--------------------+\n | information_schema |\n | mysql              |\n | performance_schema |\n | sys                |\n | test               |\n +--------------------+\n 5 rows in set (0.00 sec)\n \n mysql> CALL sys.create_synonym_db(\'performance_schema\', \'ps\');\n +---------------------------------------+\n | summary                               |\n +---------------------------------------+\n | Created 74 views in the `ps` database |\n +---------------------------------------+\n 1 row in set (8.57 sec)\n \n Query OK, 0 rows affected (8.57 sec)\n \n mysql> SHOW DATABASES;\n +--------------------+\n | Database           |\n +--------------------+\n | information_schema |\n | mysql              |\n | performance_schema |\n | ps                 |\n | sys                |\n | test               |\n +--------------------+\n 6 rows in set (0.00 sec)\n \n mysql> SHOW FULL TABLES FROM ps;\n +------------------------------------------------------+------------+\n | Tables_in_ps                                         | Table_type |\n +------------------------------------------------------+------------+\n | accounts                                             | VIEW       |\n | cond_instances                                       | VIEW       |\n | events_stages_current                                | VIEW       |\n | events_stages_history                                | VIEW       |\n ...\n '
BEGIN DECLARE v_done bool DEFAULT FALSE; DECLARE v_db_name_check VARCHAR(64); DECLARE v_db_err_msg TEXT; DECLARE v_table VARCHAR(64); DECLARE v_views_created INT DEFAULT 0;  DECLARE db_doesnt_exist CONDITION FOR SQLSTATE '42000'; DECLARE db_name_exists CONDITION FOR SQLSTATE 'HY000';  DECLARE c_table_names CURSOR FOR  SELECT TABLE_NAME  FROM INFORMATION_SCHEMA.TABLES  WHERE TABLE_SCHEMA = in_db_name;  DECLARE CONTINUE HANDLER FOR NOT FOUND SET v_done = TRUE;  SELECT SCHEMA_NAME INTO v_db_name_check FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = in_db_name;  IF v_db_name_check IS NULL THEN SET v_db_err_msg = CONCAT('Unknown database ', in_db_name); SIGNAL SQLSTATE 'HY000' SET MESSAGE_TEXT = v_db_err_msg; END IF;  SELECT SCHEMA_NAME INTO v_db_name_check FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = in_synonym;  IF v_db_name_check = in_synonym THEN SET v_db_err_msg = CONCAT('Can\'t create database ', in_synonym, '; database exists'); SIGNAL SQLSTATE 'HY000' SET MESSAGE_TEXT = v_db_err_msg; END IF;  SET @create_db_stmt := CONCAT('CREATE DATABASE ', sys.quote_identifier(in_synonym)); PREPARE create_db_stmt FROM @create_db_stmt; EXECUTE create_db_stmt; DEALLOCATE PREPARE create_db_stmt;  SET v_done = FALSE; OPEN c_table_names; c_table_names: LOOP FETCH c_table_names INTO v_table; IF v_done THEN LEAVE c_table_names; END IF;  SET @create_view_stmt = CONCAT( 'CREATE SQL SECURITY INVOKER VIEW ', sys.quote_identifier(in_synonym), '.', sys.quote_identifier(v_table), ' AS SELECT * FROM ', sys.quote_identifier(in_db_name), '.', sys.quote_identifier(v_table) ); PREPARE create_view_stmt FROM @create_view_stmt; EXECUTE create_view_stmt; DEALLOCATE PREPARE create_view_stmt;  SET v_views_created = v_views_created + 1; END LOOP; CLOSE c_table_names;  SELECT CONCAT( 'Created ', v_views_created, ' view', IF(v_views_created != 1, 's', ''), ' in the ', sys.quote_identifier(in_synonym), ' database' ) AS summary;  END
;;
delimiter ;

-- ----------------------------
-- Procedure structure for diagnostics
-- ----------------------------
DROP PROCEDURE IF EXISTS `diagnostics`;
delimiter ;;
CREATE PROCEDURE `sys`.`diagnostics`(IN in_max_runtime int unsigned, IN in_interval int unsigned, IN in_auto_config enum ('current', 'medium', 'full'))
  READS SQL DATA 
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Create a report of the current status of the server for diagnostics purposes. Data collected includes (some items depends on versions and settings):\n \n * The GLOBAL VARIABLES\n * Several sys schema views including metrics or equivalent (depending on version and settings)\n * Queries in the 95th percentile\n * Several ndbinfo views for MySQL Cluster\n * Replication (both master and slave) information.\n \n Some of the sys schema views are calculated as initial (optional), overall, delta:\n \n * The initial view is the content of the view at the start of this procedure.\n This output will be the same as the the start values used for the delta view.\n The initial view is included if @sys.diagnostics.include_raw = \'ON\'.\n * The overall view is the content of the view at the end of this procedure.\n This output is the same as the end values used for the delta view.\n The overall view is always included.\n * The delta view is the difference from the beginning to the end. Note that for min and max values\n they are simply the min or max value from the end view respectively, so does not necessarily reflect\n the minimum/maximum value in the monitored period.\n Note: except for the metrics views the delta is only calculation between the first and last outputs.\n \n Requires the SUPER privilege for \"SET sql_log_bin = 0;\".\n \n Versions supported:\n * MySQL 5.6: 5.6.10 and later\n * MySQL 5.7: 5.7.9 and later\n \n Parameters\n \n in_max_runtime (INT UNSIGNED):\n The maximum time to keep collecting data.\n Use NULL to get the default which is 60 seconds, otherwise enter a value greater than 0.\n in_interval (INT UNSIGNED):\n How long to sleep between data collections.\n Use NULL to get the default which is 30 seconds, otherwise enter a value greater than 0.\n in_auto_config (ENUM(\'current\', \'medium\', \'full\'))\n Automatically enable Performance Schema instruments and consumers.\n NOTE: The more that are enabled, the more impact on the performance.\n Supported values are:\n * current - use the current settings.\n * medium - enable some settings.\n * full - enables all settings. This will have a big impact on the\n performance - be careful using this option.\n If another setting the \'current\' is chosen, the current settings\n are restored at the end of the procedure.\n \n \n Configuration Options\n \n sys.diagnostics.allow_i_s_tables\n Specifies whether it is allowed to do table scan queries on information_schema.TABLES. This can be expensive if there\n are many tables. Set to \'ON\' to allow, \'OFF\' to not allow.\n Default is \'OFF\'.\n \n sys.diagnostics.include_raw\n Set to \'ON\' to include the raw data (e.g. the original output of \"SELECT * FROM sys.metrics\").\n Use this to get the initial values of the various views.\n Default is \'OFF\'.\n \n sys.statement_truncate_len\n How much of queries in the process list output to include.\n Default is 64.\n \n sys.debug\n Whether to provide debugging output.\n Default is \'OFF\'. Set to \'ON\' to include.\n \n \n Example\n \n To create a report and append it to the file diag.out:\n \n mysql> TEE diag.out;\n mysql> CALL sys.diagnostics(120, 30, \'current\');\n ...\n mysql> NOTEE;\n '
BEGIN DECLARE v_start, v_runtime, v_iter_start, v_sleep DECIMAL(20,2) DEFAULT 0.0; DECLARE v_has_innodb, v_has_ndb, v_has_ps, v_has_replication, v_has_ps_replication VARCHAR(8) CHARSET utf8 DEFAULT 'NO'; DECLARE v_this_thread_enabled, v_has_ps_vars, v_has_metrics ENUM('YES', 'NO'); DECLARE v_table_name, v_banner VARCHAR(64) CHARSET utf8; DECLARE v_sql_status_summary_select, v_sql_status_summary_delta, v_sql_status_summary_from, v_no_delta_names TEXT; DECLARE v_output_time, v_output_time_prev DECIMAL(20,3) UNSIGNED; DECLARE v_output_count, v_count, v_old_group_concat_max_len INT UNSIGNED DEFAULT 0; DECLARE v_status_summary_width TINYINT UNSIGNED DEFAULT 50; DECLARE v_done BOOLEAN DEFAULT FALSE; DECLARE c_ndbinfo CURSOR FOR SELECT TABLE_NAME FROM information_schema.TABLES WHERE TABLE_SCHEMA = 'ndbinfo' AND TABLE_NAME NOT IN ( 'blocks', 'config_params', 'dict_obj_types', 'disk_write_speed_base', 'memory_per_fragment', 'memoryusage', 'operations_per_fragment', 'threadblocks' ); DECLARE c_sysviews_w_delta CURSOR FOR SELECT table_name FROM tmp_sys_views_delta ORDER BY table_name;  DECLARE CONTINUE HANDLER FOR NOT FOUND SET v_done = TRUE;  SELECT INSTRUMENTED INTO v_this_thread_enabled FROM performance_schema.threads WHERE PROCESSLIST_ID = CONNECTION_ID(); IF (v_this_thread_enabled = 'YES') THEN CALL sys.ps_setup_disable_thread(CONNECTION_ID()); END IF;  IF (in_max_runtime < in_interval) THEN SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'in_max_runtime must be greater than or equal to in_interval'; END IF; IF (in_max_runtime = 0) THEN SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'in_max_runtime must be greater than 0'; END IF; IF (in_interval = 0) THEN SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'in_interval must be greater than 0'; END IF;  IF (@sys.diagnostics.allow_i_s_tables IS NULL) THEN SET @sys.diagnostics.allow_i_s_tables = sys.sys_get_config('diagnostics.allow_i_s_tables', 'OFF'); END IF; IF (@sys.diagnostics.include_raw IS NULL) THEN SET @sys.diagnostics.include_raw      = sys.sys_get_config('diagnostics.include_raw'     , 'OFF'); END IF; IF (@sys.debug IS NULL) THEN SET @sys.debug                        = sys.sys_get_config('debug'                       , 'OFF'); END IF; IF (@sys.statement_truncate_len IS NULL) THEN SET @sys.statement_truncate_len       = sys.sys_get_config('statement_truncate_len'      , '64' ); END IF;  SET @log_bin := @@sql_log_bin; IF (@log_bin = 1) THEN SET sql_log_bin = 0; END IF;  SET v_no_delta_names = CONCAT('s%{COUNT}.Variable_name NOT IN (', '''innodb_buffer_pool_pages_total'', ', '''innodb_page_size'', ', '''last_query_cost'', ', '''last_query_partial_plans'', ', '''qcache_total_blocks'', ', '''slave_last_heartbeat'', ', '''ssl_ctx_verify_depth'', ', '''ssl_ctx_verify_mode'', ', '''ssl_session_cache_size'', ', '''ssl_verify_depth'', ', '''ssl_verify_mode'', ', '''ssl_version'', ', '''buffer_flush_lsn_avg_rate'', ', '''buffer_flush_pct_for_dirty'', ', '''buffer_flush_pct_for_lsn'', ', '''buffer_pool_pages_total'', ', '''lock_row_lock_time_avg'', ', '''lock_row_lock_time_max'', ', '''innodb_page_size''', ')');  IF (in_auto_config <> 'current') THEN IF (@sys.debug = 'ON') THEN SELECT CONCAT('Updating Performance Schema configuration to ', in_auto_config) AS 'Debug'; END IF; CALL sys.ps_setup_save(0);  IF (in_auto_config = 'medium') THEN UPDATE performance_schema.setup_consumers SET ENABLED = 'YES' WHERE NAME NOT LIKE '%\_history%';  UPDATE performance_schema.setup_instruments SET ENABLED = 'YES', TIMED   = 'YES' WHERE NAME NOT LIKE 'wait/synch/%'; ELSEIF (in_auto_config = 'full') THEN UPDATE performance_schema.setup_consumers SET ENABLED = 'YES';  UPDATE performance_schema.setup_instruments SET ENABLED = 'YES', TIMED   = 'YES'; END IF;  UPDATE performance_schema.threads SET INSTRUMENTED = 'YES' WHERE PROCESSLIST_ID <> CONNECTION_ID(); END IF;  SET v_start        = UNIX_TIMESTAMP(NOW(2)), in_interval    = IFNULL(in_interval, 30), in_max_runtime = IFNULL(in_max_runtime, 60);  SET v_banner = REPEAT( '-', LEAST( GREATEST( 36, CHAR_LENGTH(VERSION()), CHAR_LENGTH(@@global.version_comment), CHAR_LENGTH(@@global.version_compile_os), CHAR_LENGTH(@@global.version_compile_machine), CHAR_LENGTH(@@global.socket), CHAR_LENGTH(@@global.datadir) ), 64 ) ); SELECT 'Hostname' AS 'Name', @@global.hostname AS 'Value' UNION ALL SELECT 'Port' AS 'Name', @@global.port AS 'Value' UNION ALL SELECT 'Socket' AS 'Name', @@global.socket AS 'Value' UNION ALL SELECT 'Datadir' AS 'Name', @@global.datadir AS 'Value' UNION ALL SELECT 'Server UUID' AS 'Name', @@global.server_uuid AS 'Value' UNION ALL SELECT REPEAT('-', 23) AS 'Name', v_banner AS 'Value' UNION ALL SELECT 'MySQL Version' AS 'Name', VERSION() AS 'Value' UNION ALL SELECT 'Sys Schema Version' AS 'Name', (SELECT sys_version FROM sys.version) AS 'Value' UNION ALL SELECT 'Version Comment' AS 'Name', @@global.version_comment AS 'Value' UNION ALL SELECT 'Version Compile OS' AS 'Name', @@global.version_compile_os AS 'Value' UNION ALL SELECT 'Version Compile Machine' AS 'Name', @@global.version_compile_machine AS 'Value' UNION ALL SELECT REPEAT('-', 23) AS 'Name', v_banner AS 'Value' UNION ALL SELECT 'UTC Time' AS 'Name', UTC_TIMESTAMP() AS 'Value' UNION ALL SELECT 'Local Time' AS 'Name', NOW() AS 'Value' UNION ALL SELECT 'Time Zone' AS 'Name', @@global.time_zone AS 'Value' UNION ALL SELECT 'System Time Zone' AS 'Name', @@global.system_time_zone AS 'Value' UNION ALL SELECT 'Time Zone Offset' AS 'Name', TIMEDIFF(NOW(), UTC_TIMESTAMP()) AS 'Value';  SET v_has_innodb         = IFNULL((SELECT SUPPORT FROM information_schema.ENGINES WHERE ENGINE = 'InnoDB'), 'NO'), v_has_ndb            = IFNULL((SELECT SUPPORT FROM information_schema.ENGINES WHERE ENGINE = 'NDBCluster'), 'NO'), v_has_ps             = IFNULL((SELECT SUPPORT FROM information_schema.ENGINES WHERE ENGINE = 'PERFORMANCE_SCHEMA'), 'NO'), v_has_ps_replication = IF(v_has_ps = 'YES' AND EXISTS(SELECT 1 FROM information_schema.TABLES WHERE TABLE_SCHEMA = 'performance_schema' AND TABLE_NAME = 'replication_applier_status'), 'YES', 'NO' ), v_has_replication    =  IF(v_has_ps_replication = 'YES', IF((SELECT COUNT(*) FROM performance_schema.replication_connection_status) > 0, 'YES', 'NO'), IF(@@master_info_repository = 'TABLE', IF((SELECT COUNT(*) FROM mysql.slave_master_info) > 0, 'YES', 'NO'), IF(@@relay_log_info_repository = 'TABLE', IF((SELECT COUNT(*) FROM mysql.slave_relay_log_info) > 0, 'YES', 'NO'), 'MAYBE')) ) , v_has_metrics        = IF(v_has_ps = 'YES' OR (sys.version_major() = 5 AND sys.version_minor() = 6), 'YES', 'NO'), v_has_ps_vars        = 'NO';   SET v_has_ps_vars = IF(@@global.show_compatibility_56, 'NO', 'YES');  SET v_has_ps_vars = 'YES';  IF (@sys.debug = 'ON') THEN SELECT v_has_innodb AS 'Has_InnoDB', v_has_ndb AS 'Has_NDBCluster', v_has_ps AS 'Has_Performance_Schema', v_has_ps_vars AS 'Has_P_S_SHOW_Variables', v_has_metrics AS 'Has_metrics', v_has_ps_replication 'AS Has_P_S_Replication', v_has_replication AS 'Has_Replication'; END IF;  IF (v_has_innodb IN ('DEFAULT', 'YES')) THEN SET @sys.diagnostics.sql = 'SHOW ENGINE InnoDB STATUS'; PREPARE stmt_innodb_status FROM @sys.diagnostics.sql; END IF;  IF (v_has_ps = 'YES') THEN SET @sys.diagnostics.sql = 'SHOW ENGINE PERFORMANCE_SCHEMA STATUS'; PREPARE stmt_ps_status FROM @sys.diagnostics.sql; END IF;  IF (v_has_ndb IN ('DEFAULT', 'YES')) THEN SET @sys.diagnostics.sql = 'SHOW ENGINE NDBCLUSTER STATUS'; PREPARE stmt_ndbcluster_status FROM @sys.diagnostics.sql; END IF;  SET @sys.diagnostics.sql_gen_query_template = 'SELECT CONCAT( ''SELECT '', GROUP_CONCAT( CASE WHEN (SUBSTRING(TABLE_NAME, 3), COLUMN_NAME) IN ( (''io_global_by_file_by_bytes'', ''total''), (''io_global_by_wait_by_bytes'', ''total_requested'') ) THEN CONCAT(''sys.format_bytes('', COLUMN_NAME, '') AS '', COLUMN_NAME) WHEN SUBSTRING(COLUMN_NAME, -8) = ''_latency'' THEN CONCAT(''sys.format_time('', COLUMN_NAME, '') AS '', COLUMN_NAME) WHEN SUBSTRING(COLUMN_NAME, -7) = ''_memory'' OR SUBSTRING(COLUMN_NAME, -17) = ''_memory_allocated'' OR ((SUBSTRING(COLUMN_NAME, -5) = ''_read'' OR SUBSTRING(COLUMN_NAME, -8) = ''_written'' OR SUBSTRING(COLUMN_NAME, -6) = ''_write'') AND SUBSTRING(COLUMN_NAME, 1, 6) <> ''COUNT_'') THEN CONCAT(''sys.format_bytes('', COLUMN_NAME, '') AS '', COLUMN_NAME) ELSE COLUMN_NAME END ORDER BY ORDINAL_POSITION SEPARATOR '',\n       '' ), ''\n  FROM tmp_'', SUBSTRING(TABLE_NAME FROM 3), ''_%{OUTPUT}'' ) AS Query INTO @sys.diagnostics.sql_select FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = ''sys'' AND TABLE_NAME = ? GROUP BY TABLE_NAME';  SET @sys.diagnostics.sql_gen_query_delta = 'SELECT CONCAT( ''SELECT '', GROUP_CONCAT( CASE WHEN FIND_IN_SET(COLUMN_NAME, diag.pk) THEN COLUMN_NAME WHEN diag.TABLE_NAME = ''io_global_by_file_by_bytes'' AND COLUMN_NAME = ''write_pct'' THEN CONCAT(''IFNULL(ROUND(100-(((e.total_read-IFNULL(s.total_read, 0))'', ''/NULLIF(((e.total_read-IFNULL(s.total_read, 0))+(e.total_written-IFNULL(s.total_written, 0))), 0))*100), 2), 0.00) AS '', COLUMN_NAME) WHEN (diag.TABLE_NAME, COLUMN_NAME) IN ( (''io_global_by_file_by_bytes'', ''total''), (''io_global_by_wait_by_bytes'', ''total_requested'') ) THEN CONCAT(''sys.format_bytes(e.'', COLUMN_NAME, ''-IFNULL(s.'', COLUMN_NAME, '', 0)) AS '', COLUMN_NAME) WHEN SUBSTRING(COLUMN_NAME, 1, 4) IN (''max_'', ''min_'') AND SUBSTRING(COLUMN_NAME, -8) = ''_latency'' THEN CONCAT(''sys.format_time(e.'', COLUMN_NAME, '') AS '', COLUMN_NAME) WHEN COLUMN_NAME = ''avg_latency'' THEN CONCAT(''sys.format_time((e.total_latency - IFNULL(s.total_latency, 0))'', ''/NULLIF(e.total - IFNULL(s.total, 0), 0)) AS '', COLUMN_NAME) WHEN SUBSTRING(COLUMN_NAME, -12) = ''_avg_latency'' THEN CONCAT(''sys.format_time((e.'', SUBSTRING(COLUMN_NAME FROM 1 FOR CHAR_LENGTH(COLUMN_NAME)-12), ''_latency - IFNULL(s.'', SUBSTRING(COLUMN_NAME FROM 1 FOR CHAR_LENGTH(COLUMN_NAME)-12), ''_latency, 0))'', ''/NULLIF(e.'', SUBSTRING(COLUMN_NAME FROM 1 FOR CHAR_LENGTH(COLUMN_NAME)-12), ''s - IFNULL(s.'', SUBSTRING(COLUMN_NAME FROM 1 FOR CHAR_LENGTH(COLUMN_NAME)-12), ''s, 0), 0)) AS '', COLUMN_NAME) WHEN SUBSTRING(COLUMN_NAME, -8) = ''_latency'' THEN CONCAT(''sys.format_time(e.'', COLUMN_NAME, '' - IFNULL(s.'', COLUMN_NAME, '', 0)) AS '', COLUMN_NAME) WHEN COLUMN_NAME IN (''avg_read'', ''avg_write'', ''avg_written'') THEN CONCAT(''sys.format_bytes(IFNULL((e.total_'', IF(COLUMN_NAME = ''avg_read'', ''read'', ''written''), ''-IFNULL(s.total_'', IF(COLUMN_NAME = ''avg_read'', ''read'', ''written''), '', 0))'', ''/NULLIF(e.count_'', IF(COLUMN_NAME = ''avg_read'', ''read'', ''write''), ''-IFNULL(s.count_'', IF(COLUMN_NAME = ''avg_read'', ''read'', ''write''), '', 0), 0), 0)) AS '', COLUMN_NAME) WHEN SUBSTRING(COLUMN_NAME, -7) = ''_memory'' OR SUBSTRING(COLUMN_NAME, -17) = ''_memory_allocated'' OR ((SUBSTRING(COLUMN_NAME, -5) = ''_read'' OR SUBSTRING(COLUMN_NAME, -8) = ''_written'' OR SUBSTRING(COLUMN_NAME, -6) = ''_write'') AND SUBSTRING(COLUMN_NAME, 1, 6) <> ''COUNT_'') THEN CONCAT(''sys.format_bytes(e.'', COLUMN_NAME, '' - IFNULL(s.'', COLUMN_NAME, '', 0)) AS '', COLUMN_NAME) ELSE CONCAT(''(e.'', COLUMN_NAME, '' - IFNULL(s.'', COLUMN_NAME, '', 0)) AS '', COLUMN_NAME) END ORDER BY ORDINAL_POSITION SEPARATOR '',\n       '' ), ''\n  FROM tmp_'', diag.TABLE_NAME, ''_end e LEFT OUTER JOIN tmp_'', diag.TABLE_NAME, ''_start s USING ('', diag.pk, '')'' ) AS Query INTO @sys.diagnostics.sql_select FROM tmp_sys_views_delta diag INNER JOIN information_schema.COLUMNS c ON c.TABLE_NAME = CONCAT(''x$'', diag.TABLE_NAME) WHERE c.TABLE_SCHEMA = ''sys'' AND diag.TABLE_NAME = ? GROUP BY diag.TABLE_NAME';  IF (v_has_ps = 'YES') THEN DROP TEMPORARY TABLE IF EXISTS tmp_sys_views_delta; CREATE TEMPORARY TABLE tmp_sys_views_delta ( TABLE_NAME varchar(64) NOT NULL, order_by text COMMENT 'ORDER BY clause for the initial and overall views', order_by_delta text COMMENT 'ORDER BY clause for the delta views', where_delta text COMMENT 'WHERE clause to use for delta views to only include rows with a "count" > 0', limit_rows int unsigned COMMENT 'The maximum number of rows to include for the view', pk varchar(128) COMMENT 'Used with the FIND_IN_SET() function so use comma separated list without whitespace', PRIMARY KEY (TABLE_NAME) );  IF (@sys.debug = 'ON') THEN SELECT 'Populating tmp_sys_views_delta' AS 'Debug'; END IF; INSERT INTO tmp_sys_views_delta VALUES ('host_summary'                       , '%{TABLE}.statement_latency DESC', '(e.statement_latency-IFNULL(s.statement_latency, 0)) DESC', '(e.statements - IFNULL(s.statements, 0)) > 0', NULL, 'host'), ('host_summary_by_file_io'            , '%{TABLE}.io_latency DESC', '(e.io_latency-IFNULL(s.io_latency, 0)) DESC', '(e.ios - IFNULL(s.ios, 0)) > 0', NULL, 'host'), ('host_summary_by_file_io_type'       , '%{TABLE}.host, %{TABLE}.total_latency DESC', 'e.host, (e.total_latency-IFNULL(s.total_latency, 0)) DESC', '(e.total - IFNULL(s.total, 0)) > 0', NULL, 'host,event_name'), ('host_summary_by_stages'             , '%{TABLE}.host, %{TABLE}.total_latency DESC', 'e.host, (e.total_latency-IFNULL(s.total_latency, 0)) DESC', '(e.total - IFNULL(s.total, 0)) > 0', NULL, 'host,event_name'), ('host_summary_by_statement_latency'  , '%{TABLE}.total_latency DESC', '(e.total_latency-IFNULL(s.total_latency, 0)) DESC', '(e.total - IFNULL(s.total, 0)) > 0', NULL, 'host'), ('host_summary_by_statement_type'     , '%{TABLE}.host, %{TABLE}.total_latency DESC', 'e.host, (e.total_latency-IFNULL(s.total_latency, 0)) DESC', '(e.total - IFNULL(s.total, 0)) > 0', NULL, 'host,statement'), ('io_by_thread_by_latency'            , '%{TABLE}.total_latency DESC', '(e.total_latency-IFNULL(s.total_latency, 0)) DESC', '(e.total - IFNULL(s.total, 0)) > 0', NULL, 'user,thread_id,processlist_id'), ('io_global_by_file_by_bytes'         , '%{TABLE}.total DESC', '(e.total-IFNULL(s.total, 0)) DESC', '(e.total - IFNULL(s.total, 0)) > 0', 100, 'file'), ('io_global_by_file_by_latency'       , '%{TABLE}.total_latency DESC', '(e.total_latency-IFNULL(s.total_latency, 0)) DESC', '(e.total - IFNULL(s.total, 0)) > 0', 100, 'file'), ('io_global_by_wait_by_bytes'         , '%{TABLE}.total_requested DESC', '(e.total_requested-IFNULL(s.total_requested, 0)) DESC', '(e.total - IFNULL(s.total, 0)) > 0', NULL, 'event_name'), ('io_global_by_wait_by_latency'       , '%{TABLE}.total_latency DESC', '(e.total_latency-IFNULL(s.total_latency, 0)) DESC', '(e.total - IFNULL(s.total, 0)) > 0', NULL, 'event_name'), ('schema_index_statistics'            , '(%{TABLE}.select_latency+%{TABLE}.insert_latency+%{TABLE}.update_latency+%{TABLE}.delete_latency) DESC', '((e.select_latency+e.insert_latency+e.update_latency+e.delete_latency)-IFNULL(s.select_latency+s.insert_latency+s.update_latency+s.delete_latency, 0)) DESC', '((e.rows_selected+e.insert_latency+e.rows_updated+e.rows_deleted)-IFNULL(s.rows_selected+s.rows_inserted+s.rows_updated+s.rows_deleted, 0)) > 0', 100, 'table_schema,table_name,index_name'), ('schema_table_statistics'            , '%{TABLE}.total_latency DESC', '(e.total_latency-IFNULL(s.total_latency, 0)) DESC', '(e.total_latency-IFNULL(s.total_latency, 0)) > 0', 100, 'table_schema,table_name'), ('schema_tables_with_full_table_scans', '%{TABLE}.rows_full_scanned DESC', '(e.rows_full_scanned-IFNULL(s.rows_full_scanned, 0)) DESC', '(e.rows_full_scanned-IFNULL(s.rows_full_scanned, 0)) > 0', 100, 'object_schema,object_name'), ('user_summary'                       , '%{TABLE}.statement_latency DESC', '(e.statement_latency-IFNULL(s.statement_latency, 0)) DESC', '(e.statements - IFNULL(s.statements, 0)) > 0', NULL, 'user'), ('user_summary_by_file_io'            , '%{TABLE}.io_latency DESC', '(e.io_latency-IFNULL(s.io_latency, 0)) DESC', '(e.ios - IFNULL(s.ios, 0)) > 0', NULL, 'user'), ('user_summary_by_file_io_type'       , '%{TABLE}.user, %{TABLE}.latency DESC', 'e.user, (e.latency-IFNULL(s.latency, 0)) DESC', '(e.total - IFNULL(s.total, 0)) > 0', NULL, 'user,event_name'), ('user_summary_by_stages'             , '%{TABLE}.user, %{TABLE}.total_latency DESC', 'e.user, (e.total_latency-IFNULL(s.total_latency, 0)) DESC', '(e.total - IFNULL(s.total, 0)) > 0', NULL, 'user,event_name'), ('user_summary_by_statement_latency'  , '%{TABLE}.total_latency DESC', '(e.total_latency-IFNULL(s.total_latency, 0)) DESC', '(e.total - IFNULL(s.total, 0)) > 0', NULL, 'user'), ('user_summary_by_statement_type'     , '%{TABLE}.user, %{TABLE}.total_latency DESC', 'e.user, (e.total_latency-IFNULL(s.total_latency, 0)) DESC', '(e.total - IFNULL(s.total, 0)) > 0', NULL, 'user,statement'), ('wait_classes_global_by_avg_latency' , 'IFNULL(%{TABLE}.total_latency / NULLIF(%{TABLE}.total, 0), 0) DESC', 'IFNULL((e.total_latency-IFNULL(s.total_latency, 0)) / NULLIF((e.total - IFNULL(s.total, 0)), 0), 0) DESC', '(e.total - IFNULL(s.total, 0)) > 0', NULL, 'event_class'), ('wait_classes_global_by_latency'     , '%{TABLE}.total_latency DESC', '(e.total_latency-IFNULL(s.total_latency, 0)) DESC', '(e.total - IFNULL(s.total, 0)) > 0', NULL, 'event_class'), ('waits_by_host_by_latency'           , '%{TABLE}.host, %{TABLE}.total_latency DESC', 'e.host, (e.total_latency-IFNULL(s.total_latency, 0)) DESC', '(e.total - IFNULL(s.total, 0)) > 0', NULL, 'host,event'), ('waits_by_user_by_latency'           , '%{TABLE}.user, %{TABLE}.total_latency DESC', 'e.user, (e.total_latency-IFNULL(s.total_latency, 0)) DESC', '(e.total - IFNULL(s.total, 0)) > 0', NULL, 'user,event'), ('waits_global_by_latency'            , '%{TABLE}.total_latency DESC', '(e.total_latency-IFNULL(s.total_latency, 0)) DESC', '(e.total - IFNULL(s.total, 0)) > 0', NULL, 'events') ; END IF;   SELECT '  =======================  Configuration  =======================  ' AS ''; SELECT 'GLOBAL VARIABLES' AS 'The following output is:'; IF (v_has_ps_vars = 'YES') THEN SELECT LOWER(VARIABLE_NAME) AS Variable_name, VARIABLE_VALUE AS Variable_value FROM performance_schema.global_variables ORDER BY VARIABLE_NAME; ELSE SELECT LOWER(VARIABLE_NAME) AS Variable_name, VARIABLE_VALUE AS Variable_value FROM information_schema.GLOBAL_VARIABLES ORDER BY VARIABLE_NAME; END IF;  IF (v_has_ps = 'YES') THEN SELECT 'Performance Schema Setup - Actors' AS 'The following output is:'; SELECT * FROM performance_schema.setup_actors;  SELECT 'Performance Schema Setup - Consumers' AS 'The following output is:'; SELECT NAME AS Consumer, ENABLED, sys.ps_is_consumer_enabled(NAME) AS COLLECTS FROM performance_schema.setup_consumers;  SELECT 'Performance Schema Setup - Instruments' AS 'The following output is:'; SELECT SUBSTRING_INDEX(NAME, '/', 2) AS 'InstrumentClass', ROUND(100*SUM(IF(ENABLED = 'YES', 1, 0))/COUNT(*), 2) AS 'EnabledPct', ROUND(100*SUM(IF(TIMED = 'YES', 1, 0))/COUNT(*), 2) AS 'TimedPct' FROM performance_schema.setup_instruments GROUP BY SUBSTRING_INDEX(NAME, '/', 2) ORDER BY SUBSTRING_INDEX(NAME, '/', 2);  SELECT 'Performance Schema Setup - Objects' AS 'The following output is:'; SELECT * FROM performance_schema.setup_objects;  SELECT 'Performance Schema Setup - Threads' AS 'The following output is:'; SELECT `TYPE` AS ThreadType, COUNT(*) AS 'Total', ROUND(100*SUM(IF(INSTRUMENTED = 'YES', 1, 0))/COUNT(*), 2) AS 'InstrumentedPct' FROM performance_schema.threads GROUP BY TYPE; END IF;   IF (v_has_replication = 'NO') THEN SELECT 'No Replication Configured' AS 'Replication Status'; ELSE SELECT CONCAT('Replication Configured: ', v_has_replication, ' - Performance Schema Replication Tables: ', v_has_ps_replication) AS 'Replication Status';  IF (v_has_ps_replication = 'YES') THEN SELECT 'Replication - Connection Configuration' AS 'The following output is:'; SELECT * FROM performance_schema.replication_connection_configuration ORDER BY CHANNEL_NAME ; END IF;  IF (v_has_ps_replication = 'YES') THEN SELECT 'Replication - Applier Configuration' AS 'The following output is:'; SELECT * FROM performance_schema.replication_applier_configuration ORDER BY CHANNEL_NAME; END IF;  IF (@@master_info_repository = 'TABLE') THEN SELECT 'Replication - Master Info Repository Configuration' AS 'The following output is:'; SELECT  Channel_name, Host, User_name, Port, Connect_retry, Enabled_ssl, Ssl_ca, Ssl_capath, Ssl_cert, Ssl_cipher, Ssl_key, Ssl_verify_server_cert, Heartbeat, Bind, Ignored_server_ids, Uuid, Retry_count, Ssl_crl, Ssl_crlpath, Tls_version, Enabled_auto_position FROM mysql.slave_master_info ORDER BY Channel_name ; END IF;  IF (@@relay_log_info_repository = 'TABLE') THEN SELECT 'Replication - Relay Log Repository Configuration' AS 'The following output is:'; SELECT  Channel_name, Sql_delay, Number_of_workers, Id FROM mysql.slave_relay_log_info ORDER BY Channel_name ; END IF; END IF;   IF (v_has_ndb IN ('DEFAULT', 'YES')) THEN SELECT 'Cluster Thread Blocks' AS 'The following output is:'; SELECT * FROM ndbinfo.threadblocks; END IF;  IF (v_has_ps = 'YES') THEN IF (@sys.diagnostics.include_raw = 'ON') THEN SELECT '  ========================  Initial Status  ========================  ' AS ''; END IF;  DROP TEMPORARY TABLE IF EXISTS tmp_digests_start; CALL sys.statement_performance_analyzer('create_tmp', 'tmp_digests_start', NULL); CALL sys.statement_performance_analyzer('snapshot', NULL, NULL); CALL sys.statement_performance_analyzer('save', 'tmp_digests_start', NULL);  IF (@sys.diagnostics.include_raw = 'ON') THEN SET @sys.diagnostics.sql = REPLACE(@sys.diagnostics.sql_gen_query_template, '%{OUTPUT}', 'start'); IF (@sys.debug = 'ON') THEN SELECT 'The following query will be used to generate the query for each sys view' AS 'Debug'; SELECT @sys.diagnostics.sql AS 'Debug'; END IF; PREPARE stmt_gen_query FROM @sys.diagnostics.sql; END IF; SET v_done = FALSE; OPEN c_sysviews_w_delta; c_sysviews_w_delta_loop: LOOP FETCH c_sysviews_w_delta INTO v_table_name; IF v_done THEN LEAVE c_sysviews_w_delta_loop; END IF;  IF (@sys.debug = 'ON') THEN SELECT CONCAT('The following queries are for storing the initial content of ', v_table_name) AS 'Debug'; END IF;  CALL sys.execute_prepared_stmt(CONCAT('DROP TEMPORARY TABLE IF EXISTS `tmp_', v_table_name, '_start`')); CALL sys.execute_prepared_stmt(CONCAT('CREATE TEMPORARY TABLE `tmp_', v_table_name, '_start` SELECT * FROM `sys`.`x$', v_table_name, '`'));  IF (@sys.diagnostics.include_raw = 'ON') THEN SET @sys.diagnostics.table_name = CONCAT('x$', v_table_name); EXECUTE stmt_gen_query USING @sys.diagnostics.table_name; SELECT CONCAT(@sys.diagnostics.sql_select, IF(order_by IS NOT NULL, CONCAT('\n ORDER BY ', REPLACE(order_by, '%{TABLE}', CONCAT('tmp_', v_table_name, '_start'))), ''), IF(limit_rows IS NOT NULL, CONCAT('\n LIMIT ', limit_rows), '') ) INTO @sys.diagnostics.sql_select FROM tmp_sys_views_delta WHERE TABLE_NAME = v_table_name; SELECT CONCAT('Initial ', v_table_name) AS 'The following output is:'; CALL sys.execute_prepared_stmt(@sys.diagnostics.sql_select); END IF; END LOOP; CLOSE c_sysviews_w_delta;  IF (@sys.diagnostics.include_raw = 'ON') THEN DEALLOCATE PREPARE stmt_gen_query; END IF; END IF;  SET v_sql_status_summary_select = 'SELECT Variable_name', v_sql_status_summary_delta  = '', v_sql_status_summary_from   = '';  REPEAT  SET v_output_count = v_output_count + 1; IF (v_output_count > 1) THEN SET v_sleep = in_interval-(UNIX_TIMESTAMP(NOW(2))-v_iter_start); SELECT NOW() AS 'Time', CONCAT('Going to sleep for ', v_sleep, ' seconds. Please do not interrupt') AS 'The following output is:'; DO SLEEP(in_interval); END IF; SET v_iter_start = UNIX_TIMESTAMP(NOW(2));  SELECT NOW(), CONCAT('Iteration Number ', IFNULL(v_output_count, 'NULL')) AS 'The following output is:';  IF (@@log_bin = 1) THEN SELECT 'SHOW MASTER STATUS' AS 'The following output is:'; SHOW MASTER STATUS; END IF;  IF (v_has_replication <> 'NO') THEN SELECT 'SHOW SLAVE STATUS' AS 'The following output is:'; SHOW SLAVE STATUS;  IF (v_has_ps_replication = 'YES') THEN SELECT 'Replication Connection Status' AS 'The following output is:'; SELECT * FROM performance_schema.replication_connection_status;  SELECT 'Replication Applier Status' AS 'The following output is:'; SELECT * FROM performance_schema.replication_applier_status ORDER BY CHANNEL_NAME;  SELECT 'Replication Applier Status - Coordinator' AS 'The following output is:'; SELECT * FROM performance_schema.replication_applier_status_by_coordinator ORDER BY CHANNEL_NAME;  SELECT 'Replication Applier Status - Worker' AS 'The following output is:'; SELECT * FROM performance_schema.replication_applier_status_by_worker ORDER BY CHANNEL_NAME, WORKER_ID; END IF;  IF (@@master_info_repository = 'TABLE') THEN SELECT 'Replication - Master Log Status' AS 'The following output is:'; SELECT Master_log_name, Master_log_pos FROM mysql.slave_master_info; END IF;  IF (@@relay_log_info_repository = 'TABLE') THEN SELECT 'Replication - Relay Log Status' AS 'The following output is:'; SELECT sys.format_path(Relay_log_name) AS Relay_log_name, Relay_log_pos, Master_log_name, Master_log_pos FROM mysql.slave_relay_log_info;  SELECT 'Replication - Worker Status' AS 'The following output is:'; SELECT Id, sys.format_path(Relay_log_name) AS Relay_log_name, Relay_log_pos, Master_log_name, Master_log_pos, sys.format_path(Checkpoint_relay_log_name) AS Checkpoint_relay_log_name, Checkpoint_relay_log_pos, Checkpoint_master_log_name, Checkpoint_master_log_pos, Checkpoint_seqno, Checkpoint_group_size, HEX(Checkpoint_group_bitmap) AS Checkpoint_group_bitmap , Channel_name FROM mysql.slave_worker_info ORDER BY  Channel_name, Id; END IF; END IF;  SET v_table_name = CONCAT('tmp_metrics_', v_output_count); CALL sys.execute_prepared_stmt(CONCAT('DROP TEMPORARY TABLE IF EXISTS ', v_table_name));  CALL sys.execute_prepared_stmt(CONCAT('CREATE TEMPORARY TABLE ', v_table_name, ' ( Variable_name VARCHAR(193) NOT NULL, Variable_value VARCHAR(1024), Type VARCHAR(225) NOT NULL, Enabled ENUM(''YES'', ''NO'', ''PARTIAL'') NOT NULL, PRIMARY KEY (Type, Variable_name) ) ENGINE = InnoDB DEFAULT CHARSET=utf8'));  IF (v_has_metrics) THEN SET @sys.diagnostics.sql = CONCAT( 'INSERT INTO ', v_table_name, ' SELECT Variable_name, REPLACE(Variable_value, ''\n'', ''\\\\n'') AS Variable_value, Type, Enabled FROM sys.metrics' ); ELSE SET @sys.diagnostics.sql = CONCAT( 'INSERT INTO ', v_table_name, '(SELECT LOWER(VARIABLE_NAME) AS Variable_name, REPLACE(VARIABLE_VALUE, ''\n'', ''\\\\n'') AS Variable_value, ''Global Status'' AS Type, ''YES'' AS Enabled FROM performance_schema.global_status ) UNION ALL ( SELECT NAME AS Variable_name, COUNT AS Variable_value, CONCAT(''InnoDB Metrics - '', SUBSYSTEM) AS Type, IF(STATUS = ''enabled'', ''YES'', ''NO'') AS Enabled FROM information_schema.INNODB_METRICS WHERE NAME NOT IN ( ''lock_row_lock_time'', ''lock_row_lock_time_avg'', ''lock_row_lock_time_max'', ''lock_row_lock_waits'', ''buffer_pool_reads'', ''buffer_pool_read_requests'', ''buffer_pool_write_requests'', ''buffer_pool_wait_free'', ''buffer_pool_read_ahead'', ''buffer_pool_read_ahead_evicted'', ''buffer_pool_pages_total'', ''buffer_pool_pages_misc'', ''buffer_pool_pages_data'', ''buffer_pool_bytes_data'', ''buffer_pool_pages_dirty'', ''buffer_pool_bytes_dirty'', ''buffer_pool_pages_free'', ''buffer_pages_created'', ''buffer_pages_written'', ''buffer_pages_read'', ''buffer_data_reads'', ''buffer_data_written'', ''file_num_open_files'', ''os_log_bytes_written'', ''os_log_fsyncs'', ''os_log_pending_fsyncs'', ''os_log_pending_writes'', ''log_waits'', ''log_write_requests'', ''log_writes'', ''innodb_dblwr_writes'', ''innodb_dblwr_pages_written'', ''innodb_page_size'') ) UNION ALL ( SELECT ''NOW()'' AS Variable_name, NOW(3) AS Variable_value, ''System Time'' AS Type, ''YES'' AS Enabled ) UNION ALL ( SELECT ''UNIX_TIMESTAMP()'' AS Variable_name, ROUND(UNIX_TIMESTAMP(NOW(3)), 3) AS Variable_value, ''System Time'' AS Type, ''YES'' AS Enabled ) ORDER BY Type, Variable_name;' ); END IF; CALL sys.execute_prepared_stmt(@sys.diagnostics.sql);  CALL sys.execute_prepared_stmt( CONCAT('(SELECT Variable_value INTO @sys.diagnostics.output_time FROM ', v_table_name, ' WHERE Type = ''System Time'' AND Variable_name = ''UNIX_TIMESTAMP()'')') ); SET v_output_time = @sys.diagnostics.output_time;  SET v_sql_status_summary_select = CONCAT(v_sql_status_summary_select, ', CONCAT( LEFT(s', v_output_count, '.Variable_value, ', v_status_summary_width, '), IF(', REPLACE(v_no_delta_names, '%{COUNT}', v_output_count), ' AND s', v_output_count, '.Variable_value REGEXP ''^[0-9]+(\\\\.[0-9]+)?$'', CONCAT('' ('', ROUND(s', v_output_count, '.Variable_value/', v_output_time, ', 2), ''/sec)''), '''') ) AS ''Output ', v_output_count, ''''), v_sql_status_summary_from   = CONCAT(v_sql_status_summary_from, ' ', IF(v_output_count = 1, '  FROM ', '       INNER JOIN '), v_table_name, ' s', v_output_count, IF (v_output_count = 1, '', ' USING (Type, Variable_name)')); IF (v_output_count > 1) THEN SET v_sql_status_summary_delta  = CONCAT(v_sql_status_summary_delta, ', IF(', REPLACE(v_no_delta_names, '%{COUNT}', v_output_count), ' AND s', (v_output_count-1), '.Variable_value REGEXP ''^[0-9]+(\\\\.[0-9]+)?$'' AND s', v_output_count, '.Variable_value REGEXP ''^[0-9]+(\\\\.[0-9]+)?$'', CONCAT(IF(s', (v_output_count-1), '.Variable_value REGEXP ''^[0-9]+\\\\.[0-9]+$'' OR s', v_output_count, '.Variable_value REGEXP ''^[0-9]+\\\\.[0-9]+$'', ROUND((s', v_output_count, '.Variable_value-s', (v_output_count-1), '.Variable_value), 2), (s', v_output_count, '.Variable_value-s', (v_output_count-1), '.Variable_value) ), '' ('', ROUND((s', v_output_count, '.Variable_value-s', (v_output_count-1), '.Variable_value)/(', v_output_time, '-', v_output_time_prev, '), 2), ''/sec)'' ), '''' ) AS ''Delta (', (v_output_count-1), ' -> ', v_output_count, ')'''); END IF;  SET v_output_time_prev = v_output_time;  IF (@sys.diagnostics.include_raw = 'ON') THEN IF (v_has_metrics) THEN SELECT 'SELECT * FROM sys.metrics' AS 'The following output is:'; ELSE SELECT 'sys.metrics equivalent' AS 'The following output is:'; END IF; CALL sys.execute_prepared_stmt(CONCAT('SELECT Type, Variable_name, Enabled, Variable_value FROM ', v_table_name, ' ORDER BY Type, Variable_name')); END IF;  IF (v_has_innodb IN ('DEFAULT', 'YES')) THEN SELECT 'SHOW ENGINE INNODB STATUS' AS 'The following output is:'; EXECUTE stmt_innodb_status; SELECT 'InnoDB - Transactions' AS 'The following output is:'; SELECT * FROM information_schema.INNODB_TRX; END IF;  IF (v_has_ndb IN ('DEFAULT', 'YES')) THEN SELECT 'SHOW ENGINE NDBCLUSTER STATUS' AS 'The following output is:'; EXECUTE stmt_ndbcluster_status;  SELECT 'ndbinfo.memoryusage' AS 'The following output is:'; SELECT node_id, memory_type, sys.format_bytes(used) AS used, used_pages, sys.format_bytes(total) AS total, total_pages, ROUND(100*(used/total), 2) AS 'Used %' FROM ndbinfo.memoryusage;  SET v_done = FALSE; OPEN c_ndbinfo; c_ndbinfo_loop: LOOP FETCH c_ndbinfo INTO v_table_name; IF v_done THEN LEAVE c_ndbinfo_loop; END IF;  SELECT CONCAT('SELECT * FROM ndbinfo.', v_table_name) AS 'The following output is:'; CALL sys.execute_prepared_stmt(CONCAT('SELECT * FROM `ndbinfo`.`', v_table_name, '`')); END LOOP; CLOSE c_ndbinfo;  SELECT * FROM information_schema.FILES; END IF;  SELECT 'SELECT * FROM sys.processlist' AS 'The following output is:'; SELECT processlist.* FROM sys.processlist;  IF (v_has_ps = 'YES') THEN IF (sys.ps_is_consumer_enabled('events_waits_history_long') = 'YES') THEN SELECT 'SELECT * FROM sys.latest_file_io' AS 'The following output is:'; SELECT * FROM sys.latest_file_io; END IF;  IF (EXISTS(SELECT 1 FROM performance_schema.setup_instruments WHERE NAME LIKE 'memory/%' AND ENABLED = 'YES')) THEN SELECT 'SELECT * FROM sys.memory_by_host_by_current_bytes' AS 'The following output is:'; SELECT * FROM sys.memory_by_host_by_current_bytes;  SELECT 'SELECT * FROM sys.memory_by_thread_by_current_bytes' AS 'The following output is:'; SELECT * FROM sys.memory_by_thread_by_current_bytes;  SELECT 'SELECT * FROM sys.memory_by_user_by_current_bytes' AS 'The following output is:'; SELECT * FROM sys.memory_by_user_by_current_bytes;  SELECT 'SELECT * FROM sys.memory_global_by_current_bytes' AS 'The following output is:'; SELECT * FROM sys.memory_global_by_current_bytes; END IF; END IF;  SET v_runtime = (UNIX_TIMESTAMP(NOW(2)) - v_start); UNTIL (v_runtime + in_interval >= in_max_runtime) END REPEAT;  IF (v_has_ps = 'YES') THEN SELECT 'SHOW ENGINE PERFORMANCE_SCHEMA STATUS' AS 'The following output is:'; EXECUTE stmt_ps_status; END IF;  IF (v_has_innodb IN ('DEFAULT', 'YES')) THEN DEALLOCATE PREPARE stmt_innodb_status; END IF; IF (v_has_ps = 'YES') THEN DEALLOCATE PREPARE stmt_ps_status; END IF; IF (v_has_ndb IN ('DEFAULT', 'YES')) THEN DEALLOCATE PREPARE stmt_ndbcluster_status; END IF;   SELECT '  ============================  Schema Information  ============================  ' AS '';  SELECT COUNT(*) AS 'Total Number of Tables' FROM information_schema.TABLES;  IF (@sys.diagnostics.allow_i_s_tables = 'ON') THEN SELECT 'Storage Engine Usage' AS 'The following output is:'; SELECT ENGINE, COUNT(*) AS NUM_TABLES, sys.format_bytes(SUM(DATA_LENGTH)) AS DATA_LENGTH, sys.format_bytes(SUM(INDEX_LENGTH)) AS INDEX_LENGTH, sys.format_bytes(SUM(DATA_LENGTH+INDEX_LENGTH)) AS TOTAL FROM information_schema.TABLES GROUP BY ENGINE;  SELECT 'Schema Object Overview' AS 'The following output is:'; SELECT * FROM sys.schema_object_overview;  SELECT 'Tables without a PRIMARY KEY' AS 'The following output is:'; SELECT TABLES.TABLE_SCHEMA, ENGINE, COUNT(*) AS NumTables FROM information_schema.TABLES LEFT OUTER JOIN information_schema.STATISTICS ON STATISTICS.TABLE_SCHEMA = TABLES.TABLE_SCHEMA AND STATISTICS.TABLE_NAME = TABLES.TABLE_NAME AND STATISTICS.INDEX_NAME = 'PRIMARY' WHERE STATISTICS.TABLE_NAME IS NULL AND TABLES.TABLE_SCHEMA NOT IN ('mysql', 'information_schema', 'performance_schema', 'sys') AND TABLES.TABLE_TYPE = 'BASE TABLE' GROUP BY TABLES.TABLE_SCHEMA, ENGINE; END IF;  IF (v_has_ps = 'YES') THEN SELECT 'Unused Indexes' AS 'The following output is:'; SELECT object_schema, COUNT(*) AS NumUnusedIndexes FROM performance_schema.table_io_waits_summary_by_index_usage  WHERE index_name IS NOT NULL AND count_star = 0 AND object_schema NOT IN ('mysql', 'sys') AND index_name != 'PRIMARY' GROUP BY object_schema; END IF;  IF (v_has_ps = 'YES') THEN SELECT '  =========================  Overall Status  =========================  ' AS '';  SELECT 'CALL sys.ps_statement_avg_latency_histogram()' AS 'The following output is:'; CALL sys.ps_statement_avg_latency_histogram();  CALL sys.statement_performance_analyzer('snapshot', NULL, NULL); CALL sys.statement_performance_analyzer('overall', NULL, 'with_runtimes_in_95th_percentile');  SET @sys.diagnostics.sql = REPLACE(@sys.diagnostics.sql_gen_query_template, '%{OUTPUT}', 'end'); IF (@sys.debug = 'ON') THEN SELECT 'The following query will be used to generate the query for each sys view' AS 'Debug'; SELECT @sys.diagnostics.sql AS 'Debug'; END IF; PREPARE stmt_gen_query FROM @sys.diagnostics.sql;  SET v_done = FALSE; OPEN c_sysviews_w_delta; c_sysviews_w_delta_loop: LOOP FETCH c_sysviews_w_delta INTO v_table_name; IF v_done THEN LEAVE c_sysviews_w_delta_loop; END IF;  IF (@sys.debug = 'ON') THEN SELECT CONCAT('The following queries are for storing the final content of ', v_table_name) AS 'Debug'; END IF;  CALL sys.execute_prepared_stmt(CONCAT('DROP TEMPORARY TABLE IF EXISTS `tmp_', v_table_name, '_end`')); CALL sys.execute_prepared_stmt(CONCAT('CREATE TEMPORARY TABLE `tmp_', v_table_name, '_end` SELECT * FROM `sys`.`x$', v_table_name, '`'));  IF (@sys.diagnostics.include_raw = 'ON') THEN SET @sys.diagnostics.table_name = CONCAT('x$', v_table_name); EXECUTE stmt_gen_query USING @sys.diagnostics.table_name; SELECT CONCAT(@sys.diagnostics.sql_select, IF(order_by IS NOT NULL, CONCAT('\n ORDER BY ', REPLACE(order_by, '%{TABLE}', CONCAT('tmp_', v_table_name, '_end'))), ''), IF(limit_rows IS NOT NULL, CONCAT('\n LIMIT ', limit_rows), '') ) INTO @sys.diagnostics.sql_select FROM tmp_sys_views_delta WHERE TABLE_NAME = v_table_name; SELECT CONCAT('Overall ', v_table_name) AS 'The following output is:'; CALL sys.execute_prepared_stmt(@sys.diagnostics.sql_select); END IF; END LOOP; CLOSE c_sysviews_w_delta;  DEALLOCATE PREPARE stmt_gen_query;   SELECT '  ======================  Delta Status  ======================  ' AS '';  CALL sys.statement_performance_analyzer('delta', 'tmp_digests_start', 'with_runtimes_in_95th_percentile'); CALL sys.statement_performance_analyzer('cleanup', NULL, NULL);  DROP TEMPORARY TABLE tmp_digests_start;  IF (@sys.debug = 'ON') THEN SELECT 'The following query will be used to generate the query for each sys view delta' AS 'Debug'; SELECT @sys.diagnostics.sql_gen_query_delta AS 'Debug'; END IF; PREPARE stmt_gen_query_delta FROM @sys.diagnostics.sql_gen_query_delta;  SET v_old_group_concat_max_len = @@session.group_concat_max_len; SET @@session.group_concat_max_len = 2048; SET v_done = FALSE; OPEN c_sysviews_w_delta; c_sysviews_w_delta_loop: LOOP FETCH c_sysviews_w_delta INTO v_table_name; IF v_done THEN LEAVE c_sysviews_w_delta_loop; END IF;  SET @sys.diagnostics.table_name = v_table_name; EXECUTE stmt_gen_query_delta USING @sys.diagnostics.table_name; SELECT CONCAT(@sys.diagnostics.sql_select, IF(where_delta IS NOT NULL, CONCAT('\n WHERE ', where_delta), ''), IF(order_by_delta IS NOT NULL, CONCAT('\n ORDER BY ', order_by_delta), ''), IF(limit_rows IS NOT NULL, CONCAT('\n LIMIT ', limit_rows), '') ) INTO @sys.diagnostics.sql_select FROM tmp_sys_views_delta WHERE TABLE_NAME = v_table_name;  SELECT CONCAT('Delta ', v_table_name) AS 'The following output is:'; CALL sys.execute_prepared_stmt(@sys.diagnostics.sql_select);  CALL sys.execute_prepared_stmt(CONCAT('DROP TEMPORARY TABLE `tmp_', v_table_name, '_end`')); CALL sys.execute_prepared_stmt(CONCAT('DROP TEMPORARY TABLE `tmp_', v_table_name, '_start`')); END LOOP; CLOSE c_sysviews_w_delta; SET @@session.group_concat_max_len = v_old_group_concat_max_len;  DEALLOCATE PREPARE stmt_gen_query_delta; DROP TEMPORARY TABLE tmp_sys_views_delta; END IF;  IF (v_has_metrics) THEN SELECT 'SELECT * FROM sys.metrics' AS 'The following output is:'; ELSE SELECT 'sys.metrics equivalent' AS 'The following output is:'; END IF; CALL sys.execute_prepared_stmt( CONCAT(v_sql_status_summary_select, v_sql_status_summary_delta, ', Type, s1.Enabled', v_sql_status_summary_from, ' ORDER BY Type, Variable_name' ) );  SET v_count = 0; WHILE (v_count < v_output_count) DO SET v_count = v_count + 1; SET v_table_name = CONCAT('tmp_metrics_', v_count); CALL sys.execute_prepared_stmt(CONCAT('DROP TEMPORARY TABLE IF EXISTS ', v_table_name)); END WHILE;  IF (in_auto_config <> 'current') THEN CALL sys.ps_setup_reload_saved(); SET sql_log_bin = @log_bin; END IF;  SET @sys.diagnostics.output_time            = NULL, @sys.diagnostics.sql                    = NULL, @sys.diagnostics.sql_gen_query_delta    = NULL, @sys.diagnostics.sql_gen_query_template = NULL, @sys.diagnostics.sql_select             = NULL, @sys.diagnostics.table_name             = NULL;  IF (v_this_thread_enabled = 'YES') THEN CALL sys.ps_setup_enable_thread(CONNECTION_ID()); END IF;  IF (@log_bin = 1) THEN SET sql_log_bin = @log_bin; END IF; END
;;
delimiter ;

-- ----------------------------
-- Procedure structure for execute_prepared_stmt
-- ----------------------------
DROP PROCEDURE IF EXISTS `execute_prepared_stmt`;
delimiter ;;
CREATE PROCEDURE `sys`.`execute_prepared_stmt`(IN in_query longtext CHARACTER SET UTF8)
  READS SQL DATA 
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Takes the query in the argument and executes it using a prepared statement. The prepared statement is deallocated,\n so the procedure is mainly useful for executing one off dynamically created queries.\n \n The sys_execute_prepared_stmt prepared statement name is used for the query and is required not to exist.\n \n \n Parameters\n \n in_query (longtext CHARACTER SET UTF8):\n The query to execute.\n \n \n Configuration Options\n \n sys.debug\n Whether to provide debugging output.\n Default is \'OFF\'. Set to \'ON\' to include.\n \n \n Example\n \n mysql> CALL sys.execute_prepared_stmt(\'SELECT * FROM sys.sys_config\');\n +------------------------+-------+---------------------+--------+\n | variable               | value | set_time            | set_by |\n +------------------------+-------+---------------------+--------+\n | statement_truncate_len | 64    | 2015-06-30 13:06:00 | NULL   |\n +------------------------+-------+---------------------+--------+\n 1 row in set (0.00 sec)\n \n Query OK, 0 rows affected (0.00 sec)\n '
BEGIN IF (@sys.debug IS NULL) THEN SET @sys.debug = sys.sys_get_config('debug', 'OFF'); END IF;  IF (in_query IS NULL OR LENGTH(in_query) < 4) THEN SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = "The @sys.execute_prepared_stmt.sql must contain a query"; END IF;  SET @sys.execute_prepared_stmt.sql = in_query;  IF (@sys.debug = 'ON') THEN SELECT @sys.execute_prepared_stmt.sql AS 'Debug'; END IF; PREPARE sys_execute_prepared_stmt FROM @sys.execute_prepared_stmt.sql; EXECUTE sys_execute_prepared_stmt; DEALLOCATE PREPARE sys_execute_prepared_stmt;  SET @sys.execute_prepared_stmt.sql = NULL; END
;;
delimiter ;

-- ----------------------------
-- Function structure for extract_schema_from_file_name
-- ----------------------------
DROP FUNCTION IF EXISTS `extract_schema_from_file_name`;
delimiter ;;
CREATE FUNCTION `sys`.`extract_schema_from_file_name`(path VARCHAR(512))
 RETURNS varchar(64) CHARSET utf8
  NO SQL 
  DETERMINISTIC
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Takes a raw file path, and attempts to extract the schema name from it.\n \n Useful for when interacting with Performance Schema data \n concerning IO statistics, for example.\n \n Currently relies on the fact that a table data file will be within a \n specified database directory (will not work with partitions or tables\n that specify an individual DATA_DIRECTORY).\n \n Parameters\n \n path (VARCHAR(512)):\n The full file path to a data file to extract the schema name from.\n \n Returns\n \n VARCHAR(64)\n \n Example\n \n mysql> SELECT sys.extract_schema_from_file_name(\'/var/lib/mysql/employees/employee.ibd\');\n +----------------------------------------------------------------------------+\n | sys.extract_schema_from_file_name(\'/var/lib/mysql/employees/employee.ibd\') |\n +----------------------------------------------------------------------------+\n | employees                                                                  |\n +----------------------------------------------------------------------------+\n 1 row in set (0.00 sec)\n '
BEGIN RETURN LEFT(SUBSTRING_INDEX(SUBSTRING_INDEX(REPLACE(path, '\\', '/'), '/', -2), '/', 1), 64); END
;;
delimiter ;

-- ----------------------------
-- Function structure for extract_table_from_file_name
-- ----------------------------
DROP FUNCTION IF EXISTS `extract_table_from_file_name`;
delimiter ;;
CREATE FUNCTION `sys`.`extract_table_from_file_name`(path VARCHAR(512))
 RETURNS varchar(64) CHARSET utf8
  NO SQL 
  DETERMINISTIC
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Takes a raw file path, and extracts the table name from it.\n \n Useful for when interacting with Performance Schema data \n concerning IO statistics, for example.\n \n Parameters\n \n path (VARCHAR(512)):\n The full file path to a data file to extract the table name from.\n \n Returns\n \n VARCHAR(64)\n \n Example\n \n mysql> SELECT sys.extract_table_from_file_name(\'/var/lib/mysql/employees/employee.ibd\');\n +---------------------------------------------------------------------------+\n | sys.extract_table_from_file_name(\'/var/lib/mysql/employees/employee.ibd\') |\n +---------------------------------------------------------------------------+\n | employee                                                                  |\n +---------------------------------------------------------------------------+\n 1 row in set (0.02 sec)\n '
BEGIN RETURN LEFT(SUBSTRING_INDEX(REPLACE(SUBSTRING_INDEX(REPLACE(path, '\\', '/'), '/', -1), '@0024', '$'), '.', 1), 64); END
;;
delimiter ;

-- ----------------------------
-- Function structure for format_bytes
-- ----------------------------
DROP FUNCTION IF EXISTS `format_bytes`;
delimiter ;;
CREATE FUNCTION `sys`.`format_bytes`(bytes TEXT)
 RETURNS text CHARSET utf8
  NO SQL 
  DETERMINISTIC
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Takes a raw bytes value, and converts it to a human readable format.\n \n Parameters\n \n bytes (TEXT):\n A raw bytes value.\n \n Returns\n \n TEXT\n \n Example\n \n mysql> SELECT sys.format_bytes(2348723492723746) AS size;\n +----------+\n | size     |\n +----------+\n | 2.09 PiB |\n +----------+\n 1 row in set (0.00 sec)\n \n mysql> SELECT sys.format_bytes(2348723492723) AS size;\n +----------+\n | size     |\n +----------+\n | 2.14 TiB |\n +----------+\n 1 row in set (0.00 sec)\n \n mysql> SELECT sys.format_bytes(23487234) AS size;\n +-----------+\n | size      |\n +-----------+\n | 22.40 MiB |\n +-----------+\n 1 row in set (0.00 sec)\n '
BEGIN IF bytes IS NULL THEN RETURN NULL; ELSEIF bytes >= 1125899906842624 THEN RETURN CONCAT(ROUND(bytes / 1125899906842624, 2), ' PiB'); ELSEIF bytes >= 1099511627776 THEN RETURN CONCAT(ROUND(bytes / 1099511627776, 2), ' TiB'); ELSEIF bytes >= 1073741824 THEN RETURN CONCAT(ROUND(bytes / 1073741824, 2), ' GiB'); ELSEIF bytes >= 1048576 THEN RETURN CONCAT(ROUND(bytes / 1048576, 2), ' MiB'); ELSEIF bytes >= 1024 THEN RETURN CONCAT(ROUND(bytes / 1024, 2), ' KiB'); ELSE RETURN CONCAT(ROUND(bytes, 0), ' bytes'); END IF; END
;;
delimiter ;

-- ----------------------------
-- Function structure for format_path
-- ----------------------------
DROP FUNCTION IF EXISTS `format_path`;
delimiter ;;
CREATE FUNCTION `sys`.`format_path`(in_path VARCHAR(512))
 RETURNS varchar(512) CHARSET utf8
  NO SQL 
  DETERMINISTIC
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Takes a raw path value, and strips out the datadir or tmpdir\n replacing with @@datadir and @@tmpdir respectively. \n \n Also normalizes the paths across operating systems, so backslashes\n on Windows are converted to forward slashes\n \n Parameters\n \n path (VARCHAR(512)):\n The raw file path value to format.\n \n Returns\n \n VARCHAR(512) CHARSET UTF8\n \n Example\n \n mysql> select @@datadir;\n +-----------------------------------------------+\n | @@datadir                                     |\n +-----------------------------------------------+\n | /Users/mark/sandboxes/SmallTree/AMaster/data/ |\n +-----------------------------------------------+\n 1 row in set (0.06 sec)\n \n mysql> select format_path(\'/Users/mark/sandboxes/SmallTree/AMaster/data/mysql/proc.MYD\') AS path;\n +--------------------------+\n | path                     |\n +--------------------------+\n | @@datadir/mysql/proc.MYD |\n +--------------------------+\n 1 row in set (0.03 sec)\n '
BEGIN DECLARE v_path VARCHAR(512); DECLARE v_undo_dir VARCHAR(1024);  DECLARE path_separator CHAR(1) DEFAULT '/';  IF @@global.version_compile_os LIKE 'win%' THEN SET path_separator = '\\'; END IF;  IF in_path LIKE '/private/%' THEN SET v_path = REPLACE(in_path, '/private', ''); ELSE SET v_path = in_path; END IF;  SET v_undo_dir = IFNULL((SELECT VARIABLE_VALUE FROM performance_schema.global_variables WHERE VARIABLE_NAME = 'innodb_undo_directory'), '');  IF v_path IS NULL THEN RETURN NULL; ELSEIF v_path LIKE CONCAT(@@global.datadir, IF(SUBSTRING(@@global.datadir, -1) = path_separator, '%', CONCAT(path_separator, '%'))) ESCAPE '|' THEN SET v_path = REPLACE(v_path, @@global.datadir, CONCAT('@@datadir', IF(SUBSTRING(@@global.datadir, -1) = path_separator, path_separator, ''))); ELSEIF v_path LIKE CONCAT(@@global.tmpdir, IF(SUBSTRING(@@global.tmpdir, -1) = path_separator, '%', CONCAT(path_separator, '%'))) ESCAPE '|' THEN SET v_path = REPLACE(v_path, @@global.tmpdir, CONCAT('@@tmpdir', IF(SUBSTRING(@@global.tmpdir, -1) = path_separator, path_separator, ''))); ELSEIF v_path LIKE CONCAT(@@global.slave_load_tmpdir, IF(SUBSTRING(@@global.slave_load_tmpdir, -1) = path_separator, '%', CONCAT(path_separator, '%'))) ESCAPE '|' THEN SET v_path = REPLACE(v_path, @@global.slave_load_tmpdir, CONCAT('@@slave_load_tmpdir', IF(SUBSTRING(@@global.slave_load_tmpdir, -1) = path_separator, path_separator, ''))); ELSEIF v_path LIKE CONCAT(@@global.innodb_data_home_dir, IF(SUBSTRING(@@global.innodb_data_home_dir, -1) = path_separator, '%', CONCAT(path_separator, '%'))) ESCAPE '|' THEN SET v_path = REPLACE(v_path, @@global.innodb_data_home_dir, CONCAT('@@innodb_data_home_dir', IF(SUBSTRING(@@global.innodb_data_home_dir, -1) = path_separator, path_separator, ''))); ELSEIF v_path LIKE CONCAT(@@global.innodb_log_group_home_dir, IF(SUBSTRING(@@global.innodb_log_group_home_dir, -1) = path_separator, '%', CONCAT(path_separator, '%'))) ESCAPE '|' THEN SET v_path = REPLACE(v_path, @@global.innodb_log_group_home_dir, CONCAT('@@innodb_log_group_home_dir', IF(SUBSTRING(@@global.innodb_log_group_home_dir, -1) = path_separator, path_separator, ''))); ELSEIF v_path LIKE CONCAT(v_undo_dir, IF(SUBSTRING(v_undo_dir, -1) = path_separator, '%', CONCAT(path_separator, '%'))) ESCAPE '|' THEN SET v_path = REPLACE(v_path, v_undo_dir, CONCAT('@@innodb_undo_directory', IF(SUBSTRING(v_undo_dir, -1) = path_separator, path_separator, ''))); ELSEIF v_path LIKE CONCAT(@@global.basedir, IF(SUBSTRING(@@global.basedir, -1) = path_separator, '%', CONCAT(path_separator, '%'))) ESCAPE '|' THEN SET v_path = REPLACE(v_path, @@global.basedir, CONCAT('@@basedir', IF(SUBSTRING(@@global.basedir, -1) = path_separator, path_separator, ''))); END IF;  RETURN v_path; END
;;
delimiter ;

-- ----------------------------
-- Function structure for format_statement
-- ----------------------------
DROP FUNCTION IF EXISTS `format_statement`;
delimiter ;;
CREATE FUNCTION `sys`.`format_statement`(statement LONGTEXT)
 RETURNS longtext CHARSET utf8
  NO SQL 
  DETERMINISTIC
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Formats a normalized statement, truncating it if it is > 64 characters long by default.\n \n To configure the length to truncate the statement to by default, update the `statement_truncate_len`\n variable with `sys_config` table to a different value. Alternatively, to change it just for just \n your particular session, use `SET @sys.statement_truncate_len := <some new value>`.\n \n Useful for printing statement related data from Performance Schema from \n the command line.\n \n Parameters\n \n statement (LONGTEXT): \n The statement to format.\n \n Returns\n \n LONGTEXT\n \n Example\n \n mysql> SELECT sys.format_statement(digest_text)\n ->   FROM performance_schema.events_statements_summary_by_digest\n ->  ORDER by sum_timer_wait DESC limit 5;\n +-------------------------------------------------------------------+\n | sys.format_statement(digest_text)                                 |\n +-------------------------------------------------------------------+\n | CREATE SQL SECURITY INVOKER VI ... KE ? AND `variable_value` > ?  |\n | CREATE SQL SECURITY INVOKER VI ... ait` IS NOT NULL , `esc` . ... |\n | CREATE SQL SECURITY INVOKER VI ... ait` IS NOT NULL , `sys` . ... |\n | CREATE SQL SECURITY INVOKER VI ...  , `compressed_size` ) ) DESC  |\n | CREATE SQL SECURITY INVOKER VI ... LIKE ? ORDER BY `timer_start`  |\n +-------------------------------------------------------------------+\n 5 rows in set (0.00 sec)\n '
BEGIN IF @sys.statement_truncate_len IS NULL THEN SET @sys.statement_truncate_len = sys_get_config('statement_truncate_len', 64); END IF;  IF CHAR_LENGTH(statement) > @sys.statement_truncate_len THEN RETURN REPLACE(CONCAT(LEFT(statement, (@sys.statement_truncate_len/2)-2), ' ... ', RIGHT(statement, (@sys.statement_truncate_len/2)-2)), '\n', ' '); ELSE  RETURN REPLACE(statement, '\n', ' '); END IF; END
;;
delimiter ;

-- ----------------------------
-- Function structure for format_time
-- ----------------------------
DROP FUNCTION IF EXISTS `format_time`;
delimiter ;;
CREATE FUNCTION `sys`.`format_time`(picoseconds TEXT)
 RETURNS text CHARSET utf8
  NO SQL 
  DETERMINISTIC
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Takes a raw picoseconds value, and converts it to a human readable form.\n \n Picoseconds are the precision that all latency values are printed in \n within Performance Schema, however are not user friendly when wanting\n to scan output from the command line.\n \n Parameters\n \n picoseconds (TEXT): \n The raw picoseconds value to convert.\n \n Returns\n \n TEXT\n \n Example\n \n mysql> select format_time([REDACTED]);\n +------------------------------+\n | format_time([REDACTED]) |\n +------------------------------+\n | 00:05:42                     |\n +------------------------------+\n 1 row in set (0.00 sec)\n \n mysql> select format_time(342342342);\n +------------------------+\n | format_time(342342342) |\n +------------------------+\n | 342.34 us              |\n +------------------------+\n 1 row in set (0.00 sec)\n \n mysql> select format_time(34234);\n +--------------------+\n | format_time(34234) |\n +--------------------+\n | 34.23 ns           |\n +--------------------+\n 1 row in set (0.00 sec)\n '
BEGIN IF picoseconds IS NULL THEN RETURN NULL; ELSEIF picoseconds >= 604800000000000000 THEN RETURN CONCAT(ROUND(picoseconds / 604800000000000000, 2), ' w'); ELSEIF picoseconds >= 86400000000000000 THEN RETURN CONCAT(ROUND(picoseconds / 86400000000000000, 2), ' d'); ELSEIF picoseconds >= 3600000000000000 THEN RETURN CONCAT(ROUND(picoseconds / 3600000000000000, 2), ' h'); ELSEIF picoseconds >= 60000000000000 THEN RETURN CONCAT(ROUND(picoseconds / 60000000000000, 2), ' m'); ELSEIF picoseconds >= 1000000000000 THEN RETURN CONCAT(ROUND(picoseconds / 1000000000000, 2), ' s'); ELSEIF picoseconds >= 1000000000 THEN RETURN CONCAT(ROUND(picoseconds / 1000000000, 2), ' ms'); ELSEIF picoseconds >= 1000000 THEN RETURN CONCAT(ROUND(picoseconds / 1000000, 2), ' us'); ELSEIF picoseconds >= 1000 THEN RETURN CONCAT(ROUND(picoseconds / 1000, 2), ' ns'); ELSE RETURN CONCAT(picoseconds, ' ps'); END IF; END
;;
delimiter ;

-- ----------------------------
-- Function structure for list_add
-- ----------------------------
DROP FUNCTION IF EXISTS `list_add`;
delimiter ;;
CREATE FUNCTION `sys`.`list_add`(in_list TEXT, in_add_value TEXT)
 RETURNS text CHARSET utf8
  DETERMINISTIC
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Takes a list, and a value to add to the list, and returns the resulting list.\n \n Useful for altering certain session variables, like sql_mode or optimizer_switch for instance.\n \n Parameters\n \n in_list (TEXT):\n The comma separated list to add a value to\n \n in_add_value (TEXT):\n The value to add to the input list\n \n Returns\n \n TEXT\n \n Example\n \n mysql> select @@sql_mode;\n +-----------------------------------------------------------------------------------+\n | @@sql_mode                                                                        |\n +-----------------------------------------------------------------------------------+\n | ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |\n +-----------------------------------------------------------------------------------+\n 1 row in set (0.00 sec)\n \n mysql> set sql_mode = sys.list_add(@@sql_mode, \'ANSI_QUOTES\');\n Query OK, 0 rows affected (0.06 sec)\n \n mysql> select @@sql_mode;\n +-----------------------------------------------------------------------------------------------+\n | @@sql_mode                                                                                    |\n +-----------------------------------------------------------------------------------------------+\n | ANSI_QUOTES,ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |\n +-----------------------------------------------------------------------------------------------+\n 1 row in set (0.00 sec)\n \n '
BEGIN  IF (in_add_value IS NULL) THEN SIGNAL SQLSTATE '02200' SET MESSAGE_TEXT = 'Function sys.list_add: in_add_value input variable should not be NULL', MYSQL_ERRNO = 1138; END IF;  IF (in_list IS NULL OR LENGTH(in_list) = 0) THEN RETURN in_add_value; END IF;  RETURN (SELECT CONCAT(TRIM(BOTH ',' FROM TRIM(in_list)), ',', in_add_value));  END
;;
delimiter ;

-- ----------------------------
-- Function structure for list_drop
-- ----------------------------
DROP FUNCTION IF EXISTS `list_drop`;
delimiter ;;
CREATE FUNCTION `sys`.`list_drop`(in_list TEXT, in_drop_value TEXT)
 RETURNS text CHARSET utf8
  DETERMINISTIC
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Takes a list, and a value to attempt to remove from the list, and returns the resulting list.\n \n Useful for altering certain session variables, like sql_mode or optimizer_switch for instance.\n \n Parameters\n \n in_list (TEXT):\n The comma separated list to drop a value from\n \n in_drop_value (TEXT):\n The value to drop from the input list\n \n Returns\n \n TEXT\n \n Example\n \n mysql> select @@sql_mode;\n +-----------------------------------------------------------------------------------------------+\n | @@sql_mode                                                                                    |\n +-----------------------------------------------------------------------------------------------+\n | ANSI_QUOTES,ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |\n +-----------------------------------------------------------------------------------------------+\n 1 row in set (0.00 sec)\n \n mysql> set sql_mode = sys.list_drop(@@sql_mode, \'ONLY_FULL_GROUP_BY\');\n Query OK, 0 rows affected (0.03 sec)\n \n mysql> select @@sql_mode;\n +----------------------------------------------------------------------------+\n | @@sql_mode                                                                 |\n +----------------------------------------------------------------------------+\n | ANSI_QUOTES,STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |\n +----------------------------------------------------------------------------+\n 1 row in set (0.00 sec)\n \n '
BEGIN  IF (in_drop_value IS NULL) THEN SIGNAL SQLSTATE '02200' SET MESSAGE_TEXT = 'Function sys.list_drop: in_drop_value input variable should not be NULL', MYSQL_ERRNO = 1138; END IF;  IF (in_list IS NULL OR LENGTH(in_list) = 0) THEN RETURN in_list; END IF;  RETURN (SELECT TRIM(BOTH ',' FROM REPLACE(REPLACE(CONCAT(',', in_list), CONCAT(',', in_drop_value), ''), CONCAT(', ', in_drop_value), '')));  END
;;
delimiter ;

-- ----------------------------
-- Function structure for ps_is_account_enabled
-- ----------------------------
DROP FUNCTION IF EXISTS `ps_is_account_enabled`;
delimiter ;;
CREATE FUNCTION `sys`.`ps_is_account_enabled`(in_host VARCHAR(60),  in_user VARCHAR(32))
 RETURNS enum('YES','NO') CHARSET utf8
  READS SQL DATA 
  DETERMINISTIC
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Determines whether instrumentation of an account is enabled \n within Performance Schema.\n \n Parameters\n \n in_host VARCHAR(60): \n The hostname of the account to check.\n in_user VARCHAR(32):\n The username of the account to check.\n \n Returns\n \n ENUM(\'YES\', \'NO\', \'PARTIAL\')\n \n Example\n \n mysql> SELECT sys.ps_is_account_enabled(\'localhost\', \'root\');\n +------------------------------------------------+\n | sys.ps_is_account_enabled(\'localhost\', \'root\') |\n +------------------------------------------------+\n | YES                                            |\n +------------------------------------------------+\n 1 row in set (0.01 sec)\n '
BEGIN RETURN IF(EXISTS(SELECT 1 FROM performance_schema.setup_actors WHERE (`HOST` = '%' OR in_host LIKE `HOST`) AND (`USER` = '%' OR `USER` = in_user) AND (`ENABLED` = 'YES') ), 'YES', 'NO' ); END
;;
delimiter ;

-- ----------------------------
-- Function structure for ps_is_consumer_enabled
-- ----------------------------
DROP FUNCTION IF EXISTS `ps_is_consumer_enabled`;
delimiter ;;
CREATE FUNCTION `sys`.`ps_is_consumer_enabled`(in_consumer varchar(64))
 RETURNS enum('YES','NO') CHARSET utf8
  READS SQL DATA 
  DETERMINISTIC
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Determines whether a consumer is enabled (taking the consumer hierarchy into consideration)\n within the Performance Schema.\n \n Parameters\n \n in_consumer VARCHAR(64): \n The name of the consumer to check.\n \n Returns\n \n ENUM(\'YES\', \'NO\')\n \n Example\n \n mysql> SELECT sys.ps_is_consumer_enabled(\'events_stages_history\');\n +-----------------------------------------------------+\n | sys.ps_is_consumer_enabled(\'events_stages_history\') |\n +-----------------------------------------------------+\n | NO                                                  |\n +-----------------------------------------------------+\n 1 row in set (0.00 sec)\n '
BEGIN RETURN ( SELECT (CASE WHEN c.NAME = 'global_instrumentation' THEN c.ENABLED WHEN c.NAME = 'thread_instrumentation' THEN IF(cg.ENABLED = 'YES' AND c.ENABLED = 'YES', 'YES', 'NO') WHEN c.NAME LIKE '%\_digest'           THEN IF(cg.ENABLED = 'YES' AND c.ENABLED = 'YES', 'YES', 'NO') WHEN c.NAME LIKE '%\_current'          THEN IF(cg.ENABLED = 'YES' AND ct.ENABLED = 'YES' AND c.ENABLED = 'YES', 'YES', 'NO') ELSE IF(cg.ENABLED = 'YES' AND ct.ENABLED = 'YES' AND c.ENABLED = 'YES' AND ( SELECT cc.ENABLED FROM performance_schema.setup_consumers cc WHERE NAME = CONCAT(SUBSTRING_INDEX(c.NAME, '_', 2), '_current') ) = 'YES', 'YES', 'NO') END) AS IsEnabled FROM performance_schema.setup_consumers c INNER JOIN performance_schema.setup_consumers cg INNER JOIN performance_schema.setup_consumers ct WHERE cg.NAME       = 'global_instrumentation' AND ct.NAME   = 'thread_instrumentation' AND c.NAME    = in_consumer ); END
;;
delimiter ;

-- ----------------------------
-- Function structure for ps_is_instrument_default_enabled
-- ----------------------------
DROP FUNCTION IF EXISTS `ps_is_instrument_default_enabled`;
delimiter ;;
CREATE FUNCTION `sys`.`ps_is_instrument_default_enabled`(in_instrument VARCHAR(128))
 RETURNS enum('YES','NO') CHARSET utf8
  READS SQL DATA 
  DETERMINISTIC
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Returns whether an instrument is enabled by default in this version of MySQL.\n \n Parameters\n \n in_instrument VARCHAR(128): \n The instrument to check.\n \n Returns\n \n ENUM(\'YES\', \'NO\')\n \n Example\n \n mysql> SELECT sys.ps_is_instrument_default_enabled(\'statement/sql/select\');\n +--------------------------------------------------------------+\n | sys.ps_is_instrument_default_enabled(\'statement/sql/select\') |\n +--------------------------------------------------------------+\n | YES                                                          |\n +--------------------------------------------------------------+\n 1 row in set (0.00 sec)\n '
BEGIN DECLARE v_enabled ENUM('YES', 'NO');  SET v_enabled = IF(in_instrument LIKE 'wait/io/file/%' OR in_instrument LIKE 'wait/io/table/%' OR in_instrument LIKE 'statement/%' OR in_instrument LIKE 'memory/performance_schema/%' OR in_instrument IN ('wait/lock/table/sql/handler', 'idle')  OR in_instrument LIKE 'stage/innodb/%' OR in_instrument = 'stage/sql/copy to tmp table'  , 'YES', 'NO' );  RETURN v_enabled; END
;;
delimiter ;

-- ----------------------------
-- Function structure for ps_is_instrument_default_timed
-- ----------------------------
DROP FUNCTION IF EXISTS `ps_is_instrument_default_timed`;
delimiter ;;
CREATE FUNCTION `sys`.`ps_is_instrument_default_timed`(in_instrument VARCHAR(128))
 RETURNS enum('YES','NO') CHARSET utf8
  READS SQL DATA 
  DETERMINISTIC
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Returns whether an instrument is timed by default in this version of MySQL.\n \n Parameters\n \n in_instrument VARCHAR(128): \n The instrument to check.\n \n Returns\n \n ENUM(\'YES\', \'NO\')\n \n Example\n \n mysql> SELECT sys.ps_is_instrument_default_timed(\'statement/sql/select\');\n +------------------------------------------------------------+\n | sys.ps_is_instrument_default_timed(\'statement/sql/select\') |\n +------------------------------------------------------------+\n | YES                                                        |\n +------------------------------------------------------------+\n 1 row in set (0.00 sec)\n '
BEGIN DECLARE v_timed ENUM('YES', 'NO');  SET v_timed = IF(in_instrument LIKE 'wait/io/file/%' OR in_instrument LIKE 'wait/io/table/%' OR in_instrument LIKE 'statement/%' OR in_instrument IN ('wait/lock/table/sql/handler', 'idle')  OR in_instrument LIKE 'stage/innodb/%' OR in_instrument = 'stage/sql/copy to tmp table'  , 'YES', 'NO' );  RETURN v_timed; END
;;
delimiter ;

-- ----------------------------
-- Function structure for ps_is_thread_instrumented
-- ----------------------------
DROP FUNCTION IF EXISTS `ps_is_thread_instrumented`;
delimiter ;;
CREATE FUNCTION `sys`.`ps_is_thread_instrumented`(in_connection_id BIGINT UNSIGNED)
 RETURNS enum('YES','NO','UNKNOWN') CHARSET utf8
  READS SQL DATA 
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Checks whether the provided connection id is instrumented within Performance Schema.\n \n Parameters\n \n in_connection_id (BIGINT UNSIGNED):\n The id of the connection to check.\n \n Returns\n \n ENUM(\'YES\', \'NO\', \'UNKNOWN\')\n \n Example\n \n mysql> SELECT sys.ps_is_thread_instrumented(CONNECTION_ID());\n +------------------------------------------------+\n | sys.ps_is_thread_instrumented(CONNECTION_ID()) |\n +------------------------------------------------+\n | YES                                            |\n +------------------------------------------------+\n '
BEGIN DECLARE v_enabled ENUM('YES', 'NO', 'UNKNOWN');  IF (in_connection_id IS NULL) THEN RETURN NULL; END IF;  SELECT INSTRUMENTED INTO v_enabled FROM performance_schema.threads  WHERE PROCESSLIST_ID = in_connection_id;  IF (v_enabled IS NULL) THEN RETURN 'UNKNOWN'; ELSE RETURN v_enabled; END IF; END
;;
delimiter ;

-- ----------------------------
-- Procedure structure for ps_setup_disable_background_threads
-- ----------------------------
DROP PROCEDURE IF EXISTS `ps_setup_disable_background_threads`;
delimiter ;;
CREATE PROCEDURE `sys`.`ps_setup_disable_background_threads`()
  MODIFIES SQL DATA 
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Disable all background thread instrumentation within Performance Schema.\n \n Parameters\n \n None.\n \n Example\n \n mysql> CALL sys.ps_setup_disable_background_threads();\n +--------------------------------+\n | summary                        |\n +--------------------------------+\n | Disabled 18 background threads |\n +--------------------------------+\n 1 row in set (0.00 sec)\n '
BEGIN UPDATE performance_schema.threads SET instrumented = 'NO' WHERE type = 'BACKGROUND';  SELECT CONCAT('Disabled ', @rows := ROW_COUNT(), ' background thread', IF(@rows != 1, 's', '')) AS summary; END
;;
delimiter ;

-- ----------------------------
-- Procedure structure for ps_setup_disable_consumer
-- ----------------------------
DROP PROCEDURE IF EXISTS `ps_setup_disable_consumer`;
delimiter ;;
CREATE PROCEDURE `sys`.`ps_setup_disable_consumer`(IN consumer VARCHAR(128))
  MODIFIES SQL DATA 
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Disables consumers within Performance Schema \n matching the input pattern.\n \n Parameters\n \n consumer (VARCHAR(128)):\n A LIKE pattern match (using \"%consumer%\") of consumers to disable\n \n Example\n \n To disable all consumers:\n \n mysql> CALL sys.ps_setup_disable_consumer(\'\');\n +--------------------------+\n | summary                  |\n +--------------------------+\n | Disabled 15 consumers    |\n +--------------------------+\n 1 row in set (0.02 sec)\n \n To disable just the event_stage consumers:\n \n mysql> CALL sys.ps_setup_disable_comsumers(\'stage\');\n +------------------------+\n | summary                |\n +------------------------+\n | Disabled 3 consumers   |\n +------------------------+\n 1 row in set (0.00 sec)\n '
BEGIN UPDATE performance_schema.setup_consumers SET enabled = 'NO' WHERE name LIKE CONCAT('%', consumer, '%');  SELECT CONCAT('Disabled ', @rows := ROW_COUNT(), ' consumer', IF(@rows != 1, 's', '')) AS summary; END
;;
delimiter ;

-- ----------------------------
-- Procedure structure for ps_setup_disable_instrument
-- ----------------------------
DROP PROCEDURE IF EXISTS `ps_setup_disable_instrument`;
delimiter ;;
CREATE PROCEDURE `sys`.`ps_setup_disable_instrument`(IN in_pattern VARCHAR(128))
  MODIFIES SQL DATA 
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Disables instruments within Performance Schema \n matching the input pattern.\n \n Parameters\n \n in_pattern (VARCHAR(128)):\n A LIKE pattern match (using \"%in_pattern%\") of events to disable\n \n Example\n \n To disable all mutex instruments:\n \n mysql> CALL sys.ps_setup_disable_instrument(\'wait/synch/mutex\');\n +--------------------------+\n | summary                  |\n +--------------------------+\n | Disabled 155 instruments |\n +--------------------------+\n 1 row in set (0.02 sec)\n \n To disable just a specific TCP/IP based network IO instrument:\n \n mysql> CALL sys.ps_setup_disable_instrument(\'wait/io/socket/sql/server_tcpip_socket\');\n +------------------------+\n | summary                |\n +------------------------+\n | Disabled 1 instruments |\n +------------------------+\n 1 row in set (0.00 sec)\n \n To disable all instruments:\n \n mysql> CALL sys.ps_setup_disable_instrument(\'\');\n +--------------------------+\n | summary                  |\n +--------------------------+\n | Disabled 547 instruments |\n +--------------------------+\n 1 row in set (0.01 sec)\n '
BEGIN UPDATE performance_schema.setup_instruments SET enabled = 'NO', timed = 'NO' WHERE name LIKE CONCAT('%', in_pattern, '%');  SELECT CONCAT('Disabled ', @rows := ROW_COUNT(), ' instrument', IF(@rows != 1, 's', '')) AS summary; END
;;
delimiter ;

-- ----------------------------
-- Procedure structure for ps_setup_disable_thread
-- ----------------------------
DROP PROCEDURE IF EXISTS `ps_setup_disable_thread`;
delimiter ;;
CREATE PROCEDURE `sys`.`ps_setup_disable_thread`(IN in_connection_id BIGINT)
  MODIFIES SQL DATA 
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Disable the given connection/thread in Performance Schema.\n \n Parameters\n \n in_connection_id (BIGINT):\n The connection ID (PROCESSLIST_ID from performance_schema.threads\n or the ID shown within SHOW PROCESSLIST)\n \n Example\n \n mysql> CALL sys.ps_setup_disable_thread(3);\n +-------------------+\n | summary           |\n +-------------------+\n | Disabled 1 thread |\n +-------------------+\n 1 row in set (0.01 sec)\n \n To disable the current connection:\n \n mysql> CALL sys.ps_setup_disable_thread(CONNECTION_ID());\n +-------------------+\n | summary           |\n +-------------------+\n | Disabled 1 thread |\n +-------------------+\n 1 row in set (0.00 sec)\n '
BEGIN UPDATE performance_schema.threads SET instrumented = 'NO' WHERE processlist_id = in_connection_id;  SELECT CONCAT('Disabled ', @rows := ROW_COUNT(), ' thread', IF(@rows != 1, 's', '')) AS summary; END
;;
delimiter ;

-- ----------------------------
-- Procedure structure for ps_setup_enable_background_threads
-- ----------------------------
DROP PROCEDURE IF EXISTS `ps_setup_enable_background_threads`;
delimiter ;;
CREATE PROCEDURE `sys`.`ps_setup_enable_background_threads`()
  MODIFIES SQL DATA 
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Enable all background thread instrumentation within Performance Schema.\n \n Parameters\n \n None.\n \n Example\n \n mysql> CALL sys.ps_setup_enable_background_threads();\n +-------------------------------+\n | summary                       |\n +-------------------------------+\n | Enabled 18 background threads |\n +-------------------------------+\n 1 row in set (0.00 sec)\n '
BEGIN UPDATE performance_schema.threads SET instrumented = 'YES' WHERE type = 'BACKGROUND';  SELECT CONCAT('Enabled ', @rows := ROW_COUNT(), ' background thread', IF(@rows != 1, 's', '')) AS summary; END
;;
delimiter ;

-- ----------------------------
-- Procedure structure for ps_setup_enable_consumer
-- ----------------------------
DROP PROCEDURE IF EXISTS `ps_setup_enable_consumer`;
delimiter ;;
CREATE PROCEDURE `sys`.`ps_setup_enable_consumer`(IN consumer VARCHAR(128))
  MODIFIES SQL DATA 
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Enables consumers within Performance Schema \n matching the input pattern.\n \n Parameters\n \n consumer (VARCHAR(128)):\n A LIKE pattern match (using \"%consumer%\") of consumers to enable\n \n Example\n \n To enable all consumers:\n \n mysql> CALL sys.ps_setup_enable_consumer(\'\');\n +-------------------------+\n | summary                 |\n +-------------------------+\n | Enabled 10 consumers    |\n +-------------------------+\n 1 row in set (0.02 sec)\n \n Query OK, 0 rows affected (0.02 sec)\n \n To enable just \"waits\" consumers:\n \n mysql> CALL sys.ps_setup_enable_consumer(\'waits\');\n +-----------------------+\n | summary               |\n +-----------------------+\n | Enabled 3 consumers   |\n +-----------------------+\n 1 row in set (0.00 sec)\n \n Query OK, 0 rows affected (0.00 sec)\n '
BEGIN UPDATE performance_schema.setup_consumers SET enabled = 'YES' WHERE name LIKE CONCAT('%', consumer, '%');  SELECT CONCAT('Enabled ', @rows := ROW_COUNT(), ' consumer', IF(@rows != 1, 's', '')) AS summary; END
;;
delimiter ;

-- ----------------------------
-- Procedure structure for ps_setup_enable_instrument
-- ----------------------------
DROP PROCEDURE IF EXISTS `ps_setup_enable_instrument`;
delimiter ;;
CREATE PROCEDURE `sys`.`ps_setup_enable_instrument`(IN in_pattern VARCHAR(128))
  MODIFIES SQL DATA 
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Enables instruments within Performance Schema \n matching the input pattern.\n \n Parameters\n \n in_pattern (VARCHAR(128)):\n A LIKE pattern match (using \"%in_pattern%\") of events to enable\n \n Example\n \n To enable all mutex instruments:\n \n mysql> CALL sys.ps_setup_enable_instrument(\'wait/synch/mutex\');\n +-------------------------+\n | summary                 |\n +-------------------------+\n | Enabled 155 instruments |\n +-------------------------+\n 1 row in set (0.02 sec)\n \n Query OK, 0 rows affected (0.02 sec)\n \n To enable just a specific TCP/IP based network IO instrument:\n \n mysql> CALL sys.ps_setup_enable_instrument(\'wait/io/socket/sql/server_tcpip_socket\');\n +-----------------------+\n | summary               |\n +-----------------------+\n | Enabled 1 instruments |\n +-----------------------+\n 1 row in set (0.00 sec)\n \n Query OK, 0 rows affected (0.00 sec)\n \n To enable all instruments:\n \n mysql> CALL sys.ps_setup_enable_instrument(\'\');\n +-------------------------+\n | summary                 |\n +-------------------------+\n | Enabled 547 instruments |\n +-------------------------+\n 1 row in set (0.01 sec)\n \n Query OK, 0 rows affected (0.01 sec)\n '
BEGIN UPDATE performance_schema.setup_instruments SET enabled = 'YES', timed = 'YES' WHERE name LIKE CONCAT('%', in_pattern, '%');  SELECT CONCAT('Enabled ', @rows := ROW_COUNT(), ' instrument', IF(@rows != 1, 's', '')) AS summary; END
;;
delimiter ;

-- ----------------------------
-- Procedure structure for ps_setup_enable_thread
-- ----------------------------
DROP PROCEDURE IF EXISTS `ps_setup_enable_thread`;
delimiter ;;
CREATE PROCEDURE `sys`.`ps_setup_enable_thread`(IN in_connection_id BIGINT)
  MODIFIES SQL DATA 
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Enable the given connection/thread in Performance Schema.\n \n Parameters\n \n in_connection_id (BIGINT):\n The connection ID (PROCESSLIST_ID from performance_schema.threads\n or the ID shown within SHOW PROCESSLIST)\n \n Example\n \n mysql> CALL sys.ps_setup_enable_thread(3);\n +------------------+\n | summary          |\n +------------------+\n | Enabled 1 thread |\n +------------------+\n 1 row in set (0.01 sec)\n \n To enable the current connection:\n \n mysql> CALL sys.ps_setup_enable_thread(CONNECTION_ID());\n +------------------+\n | summary          |\n +------------------+\n | Enabled 1 thread |\n +------------------+\n 1 row in set (0.00 sec)\n '
BEGIN UPDATE performance_schema.threads SET instrumented = 'YES' WHERE processlist_id = in_connection_id;  SELECT CONCAT('Enabled ', @rows := ROW_COUNT(), ' thread', IF(@rows != 1, 's', '')) AS summary; END
;;
delimiter ;

-- ----------------------------
-- Procedure structure for ps_setup_reload_saved
-- ----------------------------
DROP PROCEDURE IF EXISTS `ps_setup_reload_saved`;
delimiter ;;
CREATE PROCEDURE `sys`.`ps_setup_reload_saved`()
  MODIFIES SQL DATA 
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Reloads a saved Performance Schema configuration,\n so that you can alter the setup for debugging purposes, \n but restore it to a previous state.\n \n Use the companion procedure - ps_setup_save(), to \n save a configuration.\n \n Requires the SUPER privilege for \"SET sql_log_bin = 0;\".\n \n Parameters\n \n None.\n \n Example\n \n mysql> CALL sys.ps_setup_save();\n Query OK, 0 rows affected (0.08 sec)\n \n mysql> UPDATE performance_schema.setup_instruments SET enabled = \'YES\', timed = \'YES\';\n Query OK, 547 rows affected (0.40 sec)\n Rows matched: 784  Changed: 547  Warnings: 0\n \n /* Run some tests that need more detailed instrumentation here */\n \n mysql> CALL sys.ps_setup_reload_saved();\n Query OK, 0 rows affected (0.32 sec)\n '
BEGIN DECLARE v_done bool DEFAULT FALSE; DECLARE v_lock_result INT; DECLARE v_lock_used_by BIGINT; DECLARE v_signal_message TEXT; DECLARE EXIT HANDLER FOR SQLEXCEPTION BEGIN SIGNAL SQLSTATE VALUE '90001' SET MESSAGE_TEXT = 'An error occurred, was sys.ps_setup_save() run before this procedure?'; END;  SET @log_bin := @@sql_log_bin; SET sql_log_bin = 0;  SELECT IS_USED_LOCK('sys.ps_setup_save') INTO v_lock_used_by;  IF (v_lock_used_by != CONNECTION_ID()) THEN SET v_signal_message = CONCAT('The sys.ps_setup_save lock is currently owned by ', v_lock_used_by); SIGNAL SQLSTATE VALUE '90002' SET MESSAGE_TEXT = v_signal_message; END IF;  DELETE FROM performance_schema.setup_actors; INSERT INTO performance_schema.setup_actors SELECT * FROM tmp_setup_actors;  BEGIN DECLARE v_name varchar(64); DECLARE v_enabled enum('YES', 'NO'); DECLARE c_consumers CURSOR FOR SELECT NAME, ENABLED FROM tmp_setup_consumers; DECLARE CONTINUE HANDLER FOR NOT FOUND SET v_done = TRUE;  SET v_done = FALSE; OPEN c_consumers; c_consumers_loop: LOOP FETCH c_consumers INTO v_name, v_enabled; IF v_done THEN LEAVE c_consumers_loop; END IF;  UPDATE performance_schema.setup_consumers SET ENABLED = v_enabled WHERE NAME = v_name; END LOOP; CLOSE c_consumers; END;  UPDATE performance_schema.setup_instruments INNER JOIN tmp_setup_instruments USING (NAME) SET performance_schema.setup_instruments.ENABLED = tmp_setup_instruments.ENABLED, performance_schema.setup_instruments.TIMED   = tmp_setup_instruments.TIMED; BEGIN DECLARE v_thread_id bigint unsigned; DECLARE v_instrumented enum('YES', 'NO'); DECLARE c_threads CURSOR FOR SELECT THREAD_ID, INSTRUMENTED FROM tmp_threads; DECLARE CONTINUE HANDLER FOR NOT FOUND SET v_done = TRUE;  SET v_done = FALSE; OPEN c_threads; c_threads_loop: LOOP FETCH c_threads INTO v_thread_id, v_instrumented; IF v_done THEN LEAVE c_threads_loop; END IF;  UPDATE performance_schema.threads SET INSTRUMENTED = v_instrumented WHERE THREAD_ID = v_thread_id; END LOOP; CLOSE c_threads; END;  UPDATE performance_schema.threads SET INSTRUMENTED = IF(PROCESSLIST_USER IS NOT NULL, sys.ps_is_account_enabled(PROCESSLIST_HOST, PROCESSLIST_USER), 'YES') WHERE THREAD_ID NOT IN (SELECT THREAD_ID FROM tmp_threads);  DROP TEMPORARY TABLE tmp_setup_actors; DROP TEMPORARY TABLE tmp_setup_consumers; DROP TEMPORARY TABLE tmp_setup_instruments; DROP TEMPORARY TABLE tmp_threads;  SELECT RELEASE_LOCK('sys.ps_setup_save') INTO v_lock_result;  SET sql_log_bin = @log_bin;  END
;;
delimiter ;

-- ----------------------------
-- Procedure structure for ps_setup_reset_to_default
-- ----------------------------
DROP PROCEDURE IF EXISTS `ps_setup_reset_to_default`;
delimiter ;;
CREATE PROCEDURE `sys`.`ps_setup_reset_to_default`(IN in_verbose BOOLEAN)
  MODIFIES SQL DATA 
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Resets the Performance Schema setup to the default settings.\n \n Parameters\n \n in_verbose (BOOLEAN):\n Whether to print each setup stage (including the SQL) whilst running.\n \n Example\n \n mysql> CALL sys.ps_setup_reset_to_default(true)\\G\n *************************** 1. row ***************************\n status: Resetting: setup_actors\n DELETE\n FROM performance_schema.setup_actors\n WHERE NOT (HOST = \'%\' AND USER = \'%\' AND ROLE = \'%\')\n 1 row in set (0.00 sec)\n \n *************************** 1. row ***************************\n status: Resetting: setup_actors\n INSERT IGNORE INTO performance_schema.setup_actors\n VALUES (\'%\', \'%\', \'%\')\n 1 row in set (0.00 sec)\n ...\n \n mysql> CALL sys.ps_setup_reset_to_default(false)\\G\n Query OK, 0 rows affected (0.00 sec)\n '
BEGIN SET @query = 'DELETE FROM performance_schema.setup_actors WHERE NOT (HOST = ''%'' AND USER = ''%'' AND ROLE = ''%'')';  IF (in_verbose) THEN SELECT CONCAT('Resetting: setup_actors\n', REPLACE(@query, '  ', '')) AS status; END IF;  PREPARE reset_stmt FROM @query; EXECUTE reset_stmt; DEALLOCATE PREPARE reset_stmt;  SET @query = 'INSERT IGNORE INTO performance_schema.setup_actors VALUES (''%'', ''%'', ''%'', ''YES'', ''YES'')';  IF (in_verbose) THEN SELECT CONCAT('Resetting: setup_actors\n', REPLACE(@query, '  ', '')) AS status; END IF;  PREPARE reset_stmt FROM @query; EXECUTE reset_stmt; DEALLOCATE PREPARE reset_stmt;  SET @query = 'UPDATE performance_schema.setup_instruments SET ENABLED = sys.ps_is_instrument_default_enabled(NAME), TIMED   = sys.ps_is_instrument_default_timed(NAME)';  IF (in_verbose) THEN SELECT CONCAT('Resetting: setup_instruments\n', REPLACE(@query, '  ', '')) AS status; END IF;  PREPARE reset_stmt FROM @query; EXECUTE reset_stmt; DEALLOCATE PREPARE reset_stmt;  SET @query = 'UPDATE performance_schema.setup_consumers SET ENABLED = IF(NAME IN (''events_statements_current'', ''events_transactions_current'', ''global_instrumentation'', ''thread_instrumentation'', ''statements_digest''), ''YES'', ''NO'')';  IF (in_verbose) THEN SELECT CONCAT('Resetting: setup_consumers\n', REPLACE(@query, '  ', '')) AS status; END IF;  PREPARE reset_stmt FROM @query; EXECUTE reset_stmt; DEALLOCATE PREPARE reset_stmt;  SET @query = 'DELETE FROM performance_schema.setup_objects WHERE NOT (OBJECT_TYPE IN (''EVENT'', ''FUNCTION'', ''PROCEDURE'', ''TABLE'', ''TRIGGER'') AND OBJECT_NAME = ''%''  AND (OBJECT_SCHEMA = ''mysql''              AND ENABLED = ''NO''  AND TIMED = ''NO'' ) OR (OBJECT_SCHEMA = ''performance_schema'' AND ENABLED = ''NO''  AND TIMED = ''NO'' ) OR (OBJECT_SCHEMA = ''information_schema'' AND ENABLED = ''NO''  AND TIMED = ''NO'' ) OR (OBJECT_SCHEMA = ''%''                  AND ENABLED = ''YES'' AND TIMED = ''YES''))';  IF (in_verbose) THEN SELECT CONCAT('Resetting: setup_objects\n', REPLACE(@query, '  ', '')) AS status; END IF;  PREPARE reset_stmt FROM @query; EXECUTE reset_stmt; DEALLOCATE PREPARE reset_stmt;  SET @query = 'INSERT IGNORE INTO performance_schema.setup_objects VALUES (''EVENT''    , ''mysql''             , ''%'', ''NO'' , ''NO'' ), (''EVENT''    , ''performance_schema'', ''%'', ''NO'' , ''NO'' ), (''EVENT''    , ''information_schema'', ''%'', ''NO'' , ''NO'' ), (''EVENT''    , ''%''                 , ''%'', ''YES'', ''YES''), (''FUNCTION'' , ''mysql''             , ''%'', ''NO'' , ''NO'' ), (''FUNCTION'' , ''performance_schema'', ''%'', ''NO'' , ''NO'' ), (''FUNCTION'' , ''information_schema'', ''%'', ''NO'' , ''NO'' ), (''FUNCTION'' , ''%''                 , ''%'', ''YES'', ''YES''), (''PROCEDURE'', ''mysql''             , ''%'', ''NO'' , ''NO'' ), (''PROCEDURE'', ''performance_schema'', ''%'', ''NO'' , ''NO'' ), (''PROCEDURE'', ''information_schema'', ''%'', ''NO'' , ''NO'' ), (''PROCEDURE'', ''%''                 , ''%'', ''YES'', ''YES''), (''TABLE''    , ''mysql''             , ''%'', ''NO'' , ''NO'' ), (''TABLE''    , ''performance_schema'', ''%'', ''NO'' , ''NO'' ), (''TABLE''    , ''information_schema'', ''%'', ''NO'' , ''NO'' ), (''TABLE''    , ''%''                 , ''%'', ''YES'', ''YES''), (''TRIGGER''  , ''mysql''             , ''%'', ''NO'' , ''NO'' ), (''TRIGGER''  , ''performance_schema'', ''%'', ''NO'' , ''NO'' ), (''TRIGGER''  , ''information_schema'', ''%'', ''NO'' , ''NO'' ), (''TRIGGER''  , ''%''                 , ''%'', ''YES'', ''YES'')';  IF (in_verbose) THEN SELECT CONCAT('Resetting: setup_objects\n', REPLACE(@query, '  ', '')) AS status; END IF;  PREPARE reset_stmt FROM @query; EXECUTE reset_stmt; DEALLOCATE PREPARE reset_stmt;  SET @query = 'UPDATE performance_schema.threads SET INSTRUMENTED = ''YES''';  IF (in_verbose) THEN SELECT CONCAT('Resetting: threads\n', REPLACE(@query, '  ', '')) AS status; END IF;  PREPARE reset_stmt FROM @query; EXECUTE reset_stmt; DEALLOCATE PREPARE reset_stmt; END
;;
delimiter ;

-- ----------------------------
-- Procedure structure for ps_setup_save
-- ----------------------------
DROP PROCEDURE IF EXISTS `ps_setup_save`;
delimiter ;;
CREATE PROCEDURE `sys`.`ps_setup_save`(IN in_timeout INT)
  MODIFIES SQL DATA 
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Saves the current configuration of Performance Schema, \n so that you can alter the setup for debugging purposes, \n but restore it to a previous state.\n \n Use the companion procedure - ps_setup_reload_saved(), to \n restore the saved config.\n \n The named lock \"sys.ps_setup_save\" is taken before the\n current configuration is saved. If the attempt to get the named\n lock times out, an error occurs.\n \n The lock is released after the settings have been restored by\n calling ps_setup_reload_saved().\n \n Requires the SUPER privilege for \"SET sql_log_bin = 0;\".\n \n Parameters\n \n in_timeout INT\n The timeout in seconds used when trying to obtain the lock.\n A negative timeout means infinite timeout.\n \n Example\n \n mysql> CALL sys.ps_setup_save(-1);\n Query OK, 0 rows affected (0.08 sec)\n \n mysql> UPDATE performance_schema.setup_instruments \n ->    SET enabled = \'YES\', timed = \'YES\';\n Query OK, 547 rows affected (0.40 sec)\n Rows matched: 784  Changed: 547  Warnings: 0\n \n /* Run some tests that need more detailed instrumentation here */\n \n mysql> CALL sys.ps_setup_reload_saved();\n Query OK, 0 rows affected (0.32 sec)\n '
BEGIN DECLARE v_lock_result INT;  SET @log_bin := @@sql_log_bin; SET sql_log_bin = 0;  SELECT GET_LOCK('sys.ps_setup_save', in_timeout) INTO v_lock_result;  IF v_lock_result THEN DROP TEMPORARY TABLE IF EXISTS tmp_setup_actors; DROP TEMPORARY TABLE IF EXISTS tmp_setup_consumers; DROP TEMPORARY TABLE IF EXISTS tmp_setup_instruments; DROP TEMPORARY TABLE IF EXISTS tmp_threads;  CREATE TEMPORARY TABLE tmp_setup_actors LIKE performance_schema.setup_actors; CREATE TEMPORARY TABLE tmp_setup_consumers LIKE performance_schema.setup_consumers; CREATE TEMPORARY TABLE tmp_setup_instruments LIKE performance_schema.setup_instruments; CREATE TEMPORARY TABLE tmp_threads (THREAD_ID bigint unsigned NOT NULL PRIMARY KEY, INSTRUMENTED enum('YES','NO') NOT NULL);  INSERT INTO tmp_setup_actors SELECT * FROM performance_schema.setup_actors; INSERT INTO tmp_setup_consumers SELECT * FROM performance_schema.setup_consumers; INSERT INTO tmp_setup_instruments SELECT * FROM performance_schema.setup_instruments; INSERT INTO tmp_threads SELECT THREAD_ID, INSTRUMENTED FROM performance_schema.threads; ELSE SIGNAL SQLSTATE VALUE '90000' SET MESSAGE_TEXT = 'Could not lock the sys.ps_setup_save user lock, another thread has a saved configuration'; END IF;  SET sql_log_bin = @log_bin; END
;;
delimiter ;

-- ----------------------------
-- Procedure structure for ps_setup_show_disabled
-- ----------------------------
DROP PROCEDURE IF EXISTS `ps_setup_show_disabled`;
delimiter ;;
CREATE PROCEDURE `sys`.`ps_setup_show_disabled`(IN in_show_instruments BOOLEAN, IN in_show_threads BOOLEAN)
  READS SQL DATA 
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Shows all currently disable Performance Schema configuration.\n \n Disabled users is only available for MySQL 5.7.6 and later.\n In earlier versions it was only possible to enable users.\n \n Parameters\n \n in_show_instruments (BOOLEAN):\n Whether to print disabled instruments (can print many items)\n \n in_show_threads (BOOLEAN):\n Whether to print disabled threads\n \n Example\n \n mysql> CALL sys.ps_setup_show_disabled(TRUE, TRUE);\n +----------------------------+\n | performance_schema_enabled |\n +----------------------------+\n |                          1 |\n +----------------------------+\n 1 row in set (0.00 sec)\n \n +--------------------+\n | disabled_users     |\n +--------------------+\n | \'mark\'@\'localhost\' |\n +--------------------+\n 1 row in set (0.00 sec)\n \n +-------------+----------------------+---------+-------+\n | object_type | objects              | enabled | timed |\n +-------------+----------------------+---------+-------+\n | EVENT       | mysql.%              | NO      | NO    |\n | EVENT       | performance_schema.% | NO      | NO    |\n | EVENT       | information_schema.% | NO      | NO    |\n | FUNCTION    | mysql.%              | NO      | NO    |\n | FUNCTION    | performance_schema.% | NO      | NO    |\n | FUNCTION    | information_schema.% | NO      | NO    |\n | PROCEDURE   | mysql.%              | NO      | NO    |\n | PROCEDURE   | performance_schema.% | NO      | NO    |\n | PROCEDURE   | information_schema.% | NO      | NO    |\n | TABLE       | mysql.%              | NO      | NO    |\n | TABLE       | performance_schema.% | NO      | NO    |\n | TABLE       | information_schema.% | NO      | NO    |\n | TRIGGER     | mysql.%              | NO      | NO    |\n | TRIGGER     | performance_schema.% | NO      | NO    |\n | TRIGGER     | information_schema.% | NO      | NO    |\n +-------------+----------------------+---------+-------+\n 15 rows in set (0.00 sec)\n \n +----------------------------------+\n | disabled_consumers               |\n +----------------------------------+\n | events_stages_current            |\n | events_stages_history            |\n | events_stages_history_long       |\n | events_statements_history        |\n | events_statements_history_long   |\n | events_transactions_history      |\n | events_transactions_history_long |\n | events_waits_current             |\n | events_waits_history             |\n | events_waits_history_long        |\n +----------------------------------+\n 10 rows in set (0.00 sec)\n \n Empty set (0.00 sec)\n \n +---------------------------------------------------------------------------------------+-------+\n | disabled_instruments                                                                  | timed |\n +---------------------------------------------------------------------------------------+-------+\n | wait/synch/mutex/sql/TC_LOG_MMAP::LOCK_tc                                             | NO    |\n | wait/synch/mutex/sql/LOCK_des_key_file                                                | NO    |\n | wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_commit                                       | NO    |\n ...\n | memory/sql/servers_cache                                                              | NO    |\n | memory/sql/udf_mem                                                                    | NO    |\n | wait/lock/metadata/sql/mdl                                                            | NO    |\n +---------------------------------------------------------------------------------------+-------+\n 547 rows in set (0.00 sec)\n \n Query OK, 0 rows affected (0.01 sec)\n '
BEGIN SELECT @@performance_schema AS performance_schema_enabled;   SELECT CONCAT('\'', user, '\'@\'', host, '\'') AS disabled_users FROM performance_schema.setup_actors WHERE enabled = 'NO' ORDER BY disabled_users;   SELECT object_type, CONCAT(object_schema, '.', object_name) AS objects, enabled, timed FROM performance_schema.setup_objects WHERE enabled = 'NO' ORDER BY object_type, objects;  SELECT name AS disabled_consumers FROM performance_schema.setup_consumers WHERE enabled = 'NO' ORDER BY disabled_consumers;  IF (in_show_threads) THEN SELECT IF(name = 'thread/sql/one_connection',  CONCAT(processlist_user, '@', processlist_host),  REPLACE(name, 'thread/', '')) AS disabled_threads, TYPE AS thread_type FROM performance_schema.threads WHERE INSTRUMENTED = 'NO' ORDER BY disabled_threads; END IF;  IF (in_show_instruments) THEN SELECT name AS disabled_instruments, timed FROM performance_schema.setup_instruments WHERE enabled = 'NO' ORDER BY disabled_instruments; END IF; END
;;
delimiter ;

-- ----------------------------
-- Procedure structure for ps_setup_show_disabled_consumers
-- ----------------------------
DROP PROCEDURE IF EXISTS `ps_setup_show_disabled_consumers`;
delimiter ;;
CREATE PROCEDURE `sys`.`ps_setup_show_disabled_consumers`()
  READS SQL DATA 
  DETERMINISTIC
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Shows all currently disabled consumers.\n \n Parameters\n \n None\n \n Example\n \n mysql> CALL sys.ps_setup_show_disabled_consumers();\n \n +---------------------------+\n | disabled_consumers        |\n +---------------------------+\n | events_statements_current |\n | global_instrumentation    |\n | thread_instrumentation    |\n | statements_digest         |\n +---------------------------+\n 4 rows in set (0.05 sec)\n '
BEGIN SELECT name AS disabled_consumers FROM performance_schema.setup_consumers WHERE enabled = 'NO' ORDER BY disabled_consumers; END
;;
delimiter ;

-- ----------------------------
-- Procedure structure for ps_setup_show_disabled_instruments
-- ----------------------------
DROP PROCEDURE IF EXISTS `ps_setup_show_disabled_instruments`;
delimiter ;;
CREATE PROCEDURE `sys`.`ps_setup_show_disabled_instruments`()
  READS SQL DATA 
  DETERMINISTIC
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Shows all currently disabled instruments.\n \n Parameters\n \n None\n \n Example\n \n mysql> CALL sys.ps_setup_show_disabled_instruments();\n '
BEGIN SELECT name AS disabled_instruments, timed FROM performance_schema.setup_instruments WHERE enabled = 'NO' ORDER BY disabled_instruments; END
;;
delimiter ;

-- ----------------------------
-- Procedure structure for ps_setup_show_enabled
-- ----------------------------
DROP PROCEDURE IF EXISTS `ps_setup_show_enabled`;
delimiter ;;
CREATE PROCEDURE `sys`.`ps_setup_show_enabled`(IN in_show_instruments BOOLEAN, IN in_show_threads BOOLEAN)
  READS SQL DATA 
  DETERMINISTIC
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Shows all currently enabled Performance Schema configuration.\n \n Parameters\n \n in_show_instruments (BOOLEAN):\n Whether to print enabled instruments (can print many items)\n \n in_show_threads (BOOLEAN):\n Whether to print enabled threads\n \n Example\n \n mysql> CALL sys.ps_setup_show_enabled(TRUE, TRUE);\n +----------------------------+\n | performance_schema_enabled |\n +----------------------------+\n |                          1 |\n +----------------------------+\n 1 row in set (0.00 sec)\n \n +---------------+\n | enabled_users |\n +---------------+\n | \'%\'@\'%\'       |\n +---------------+\n 1 row in set (0.01 sec)\n \n +-------------+---------+---------+-------+\n | object_type | objects | enabled | timed |\n +-------------+---------+---------+-------+\n | EVENT       | %.%     | YES     | YES   |\n | FUNCTION    | %.%     | YES     | YES   |\n | PROCEDURE   | %.%     | YES     | YES   |\n | TABLE       | %.%     | YES     | YES   |\n | TRIGGER     | %.%     | YES     | YES   |\n +-------------+---------+---------+-------+\n 5 rows in set (0.01 sec)\n \n +---------------------------+\n | enabled_consumers         |\n +---------------------------+\n | events_statements_current |\n | global_instrumentation    |\n | thread_instrumentation    |\n | statements_digest         |\n +---------------------------+\n 4 rows in set (0.05 sec)\n \n +---------------------------------+-------------+\n | enabled_threads                 | thread_type |\n +---------------------------------+-------------+\n | sql/main                        | BACKGROUND  |\n | sql/thread_timer_notifier       | BACKGROUND  |\n | innodb/io_ibuf_thread           | BACKGROUND  |\n | innodb/io_log_thread            | BACKGROUND  |\n | innodb/io_read_thread           | BACKGROUND  |\n | innodb/io_read_thread           | BACKGROUND  |\n | innodb/io_write_thread          | BACKGROUND  |\n | innodb/io_write_thread          | BACKGROUND  |\n | innodb/page_cleaner_thread      | BACKGROUND  |\n | innodb/srv_lock_timeout_thread  | BACKGROUND  |\n | innodb/srv_error_monitor_thread | BACKGROUND  |\n | innodb/srv_monitor_thread       | BACKGROUND  |\n | innodb/srv_master_thread        | BACKGROUND  |\n | innodb/srv_purge_thread         | BACKGROUND  |\n | innodb/srv_worker_thread        | BACKGROUND  |\n | innodb/srv_worker_thread        | BACKGROUND  |\n | innodb/srv_worker_thread        | BACKGROUND  |\n | innodb/buf_dump_thread          | BACKGROUND  |\n | innodb/dict_stats_thread        | BACKGROUND  |\n | sql/signal_handler              | BACKGROUND  |\n | sql/compress_gtid_table         | FOREGROUND  |\n | root@localhost                  | FOREGROUND  |\n +---------------------------------+-------------+\n 22 rows in set (0.01 sec)\n \n +-------------------------------------+-------+\n | enabled_instruments                 | timed |\n +-------------------------------------+-------+\n | wait/io/file/sql/map                | YES   |\n | wait/io/file/sql/binlog             | YES   |\n ...\n | statement/com/Error                 | YES   |\n | statement/com/                      | YES   |\n | idle                                | YES   |\n +-------------------------------------+-------+\n 210 rows in set (0.08 sec)\n \n Query OK, 0 rows affected (0.89 sec)\n '
BEGIN SELECT @@performance_schema AS performance_schema_enabled;  SELECT CONCAT('\'', user, '\'@\'', host, '\'') AS enabled_users FROM performance_schema.setup_actors  WHERE enabled = 'YES'  ORDER BY enabled_users;  SELECT object_type, CONCAT(object_schema, '.', object_name) AS objects, enabled, timed FROM performance_schema.setup_objects WHERE enabled = 'YES' ORDER BY object_type, objects;  SELECT name AS enabled_consumers FROM performance_schema.setup_consumers WHERE enabled = 'YES' ORDER BY enabled_consumers;  IF (in_show_threads) THEN SELECT IF(name = 'thread/sql/one_connection',  CONCAT(processlist_user, '@', processlist_host),  REPLACE(name, 'thread/', '')) AS enabled_threads, TYPE AS thread_type FROM performance_schema.threads WHERE INSTRUMENTED = 'YES' ORDER BY enabled_threads; END IF;  IF (in_show_instruments) THEN SELECT name AS enabled_instruments, timed FROM performance_schema.setup_instruments WHERE enabled = 'YES' ORDER BY enabled_instruments; END IF; END
;;
delimiter ;

-- ----------------------------
-- Procedure structure for ps_setup_show_enabled_consumers
-- ----------------------------
DROP PROCEDURE IF EXISTS `ps_setup_show_enabled_consumers`;
delimiter ;;
CREATE PROCEDURE `sys`.`ps_setup_show_enabled_consumers`()
  READS SQL DATA 
  DETERMINISTIC
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Shows all currently enabled consumers.\n \n Parameters\n \n None\n \n Example\n \n mysql> CALL sys.ps_setup_show_enabled_consumers();\n \n +---------------------------+\n | enabled_consumers         |\n +---------------------------+\n | events_statements_current |\n | global_instrumentation    |\n | thread_instrumentation    |\n | statements_digest         |\n +---------------------------+\n 4 rows in set (0.05 sec)\n '
BEGIN SELECT name AS enabled_consumers FROM performance_schema.setup_consumers WHERE enabled = 'YES' ORDER BY enabled_consumers; END
;;
delimiter ;

-- ----------------------------
-- Procedure structure for ps_setup_show_enabled_instruments
-- ----------------------------
DROP PROCEDURE IF EXISTS `ps_setup_show_enabled_instruments`;
delimiter ;;
CREATE PROCEDURE `sys`.`ps_setup_show_enabled_instruments`()
  READS SQL DATA 
  DETERMINISTIC
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Shows all currently enabled instruments.\n \n Parameters\n \n None\n \n Example\n \n mysql> CALL sys.ps_setup_show_enabled_instruments();\n '
BEGIN SELECT name AS enabled_instruments, timed FROM performance_schema.setup_instruments WHERE enabled = 'YES' ORDER BY enabled_instruments; END
;;
delimiter ;

-- ----------------------------
-- Procedure structure for ps_statement_avg_latency_histogram
-- ----------------------------
DROP PROCEDURE IF EXISTS `ps_statement_avg_latency_histogram`;
delimiter ;;
CREATE PROCEDURE `sys`.`ps_statement_avg_latency_histogram`()
  READS SQL DATA 
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Outputs a textual histogram graph of the average latency values\n across all normalized queries tracked within the Performance Schema\n events_statements_summary_by_digest table.\n \n Can be used to show a very high level picture of what kind of \n latency distribution statements running within this instance have.\n \n Parameters\n \n None.\n \n Example\n \n mysql> CALL sys.ps_statement_avg_latency_histogram()\\G\n *************************** 1. row ***************************\n Performance Schema Statement Digest Average Latency Histogram:\n \n . = 1 unit\n * = 2 units\n # = 3 units\n \n (0 - 38ms)     240 | ################################################################################\n (38 - 77ms)    38  | ......................................\n (77 - 115ms)   3   | ...\n (115 - 154ms)  62  | *******************************\n (154 - 192ms)  3   | ...\n (192 - 231ms)  0   |\n (231 - 269ms)  0   |\n (269 - 307ms)  0   |\n (307 - 346ms)  0   |\n (346 - 384ms)  1   | .\n (384 - 423ms)  1   | .\n (423 - 461ms)  0   |\n (461 - 499ms)  0   |\n (499 - 538ms)  0   |\n (538 - 576ms)  0   |\n (576 - 615ms)  1   | .\n \n Total Statements: 350; Buckets: 16; Bucket Size: 38 ms;\n '
BEGIN SELECT CONCAT('\n', '\n  . = 1 unit', '\n  * = 2 units', '\n  # = 3 units\n', @label := CONCAT(@label_inner := CONCAT('\n(0 - ', ROUND((@bucket_size := (SELECT ROUND((MAX(avg_us) - MIN(avg_us)) / (@buckets := 16)) AS size FROM sys.x$ps_digest_avg_latency_distribution)) / (@unit_div := 1000)), (@unit := 'ms'), ')'), REPEAT(' ', (@max_label_size := ((1 + LENGTH(ROUND((@bucket_size * 15) / @unit_div)) + 3 + LENGTH(ROUND(@bucket_size * 16) / @unit_div)) + 1)) - LENGTH(@label_inner)), @count_in_bucket := IFNULL((SELECT SUM(cnt) FROM sys.x$ps_digest_avg_latency_distribution AS b1  WHERE b1.avg_us <= @bucket_size), 0)), REPEAT(' ', (@max_label_len := (@max_label_size + LENGTH((@total_queries := (SELECT SUM(cnt) FROM sys.x$ps_digest_avg_latency_distribution)))) + 1) - LENGTH(@label)), '| ', IFNULL(REPEAT(IF(@count_in_bucket < (@one_unit := 40), '.', IF(@count_in_bucket < (@two_unit := 80), '*', '#')),  	             IF(@count_in_bucket < @one_unit, @count_in_bucket, 	             	IF(@count_in_bucket < @two_unit, @count_in_bucket / 2, @count_in_bucket / 3))), ''),  @label := CONCAT(@label_inner := CONCAT('\n(', ROUND(@bucket_size / @unit_div), ' - ', ROUND((@bucket_size * 2) / @unit_div), @unit, ')'), REPEAT(' ', @max_label_size - LENGTH(@label_inner)), @count_in_bucket := IFNULL((SELECT SUM(cnt) FROM sys.x$ps_digest_avg_latency_distribution AS b1  WHERE b1.avg_us > @bucket_size AND b1.avg_us <= @bucket_size * 2), 0)), REPEAT(' ', @max_label_len - LENGTH(@label)), '| ', IFNULL(REPEAT(IF(@count_in_bucket < @one_unit, '.', IF(@count_in_bucket < @two_unit, '*', '#')),  	             IF(@count_in_bucket < @one_unit, @count_in_bucket, 	             	IF(@count_in_bucket < @two_unit, @count_in_bucket / 2, @count_in_bucket / 3))), ''), @label := CONCAT(@label_inner := CONCAT('\n(', ROUND((@bucket_size * 2) / @unit_div), ' - ', ROUND((@bucket_size * 3) / @unit_div), @unit, ')'), REPEAT(' ', @max_label_size - LENGTH(@label_inner)), @count_in_bucket := IFNULL((SELECT SUM(cnt) FROM sys.x$ps_digest_avg_latency_distribution AS b1  WHERE b1.avg_us > @bucket_size * 2 AND b1.avg_us <= @bucket_size * 3), 0)), REPEAT(' ', @max_label_len - LENGTH(@label)), '| ', IFNULL(REPEAT(IF(@count_in_bucket < @one_unit, '.', IF(@count_in_bucket < @two_unit, '*', '#')),  	             IF(@count_in_bucket < @one_unit, @count_in_bucket, 	             	IF(@count_in_bucket < @two_unit, @count_in_bucket / 2, @count_in_bucket / 3))), ''), @label := CONCAT(@label_inner := CONCAT('\n(', ROUND((@bucket_size * 3) / @unit_div), ' - ', ROUND((@bucket_size * 4) / @unit_div), @unit, ')'), REPEAT(' ', @max_label_size - LENGTH(@label_inner)), @count_in_bucket := IFNULL((SELECT SUM(cnt) FROM sys.x$ps_digest_avg_latency_distribution AS b1  WHERE b1.avg_us > @bucket_size * 3 AND b1.avg_us <= @bucket_size * 4), 0)), REPEAT(' ', @max_label_len - LENGTH(@label)), '| ', IFNULL(REPEAT(IF(@count_in_bucket < @one_unit, '.', IF(@count_in_bucket < @two_unit, '*', '#')),  	             IF(@count_in_bucket < @one_unit, @count_in_bucket, 	             	IF(@count_in_bucket < @two_unit, @count_in_bucket / 2, @count_in_bucket / 3))), ''), @label := CONCAT(@label_inner := CONCAT('\n(', ROUND((@bucket_size * 4) / @unit_div), ' - ', ROUND((@bucket_size * 5) / @unit_div), @unit, ')'), REPEAT(' ', @max_label_size - LENGTH(@label_inner)), @count_in_bucket := IFNULL((SELECT SUM(cnt) FROM sys.x$ps_digest_avg_latency_distribution AS b1  WHERE b1.avg_us > @bucket_size * 4 AND b1.avg_us <= @bucket_size * 5), 0)), REPEAT(' ', @max_label_len - LENGTH(@label)), '| ', IFNULL(REPEAT(IF(@count_in_bucket < @one_unit, '.', IF(@count_in_bucket < @two_unit, '*', '#')),  	             IF(@count_in_bucket < @one_unit, @count_in_bucket, 	             	IF(@count_in_bucket < @two_unit, @count_in_bucket / 2, @count_in_bucket / 3))), ''), @label := CONCAT(@label_inner := CONCAT('\n(', ROUND((@bucket_size * 5) / @unit_div), ' - ', ROUND((@bucket_size * 6) / @unit_div), @unit, ')'), REPEAT(' ', @max_label_size - LENGTH(@label_inner)), @count_in_bucket := IFNULL((SELECT SUM(cnt) FROM sys.x$ps_digest_avg_latency_distribution AS b1  WHERE b1.avg_us > @bucket_size * 5 AND b1.avg_us <= @bucket_size * 6), 0)), REPEAT(' ', @max_label_len - LENGTH(@label)), '| ', IFNULL(REPEAT(IF(@count_in_bucket < @one_unit, '.', IF(@count_in_bucket < @two_unit, '*', '#')),  	             IF(@count_in_bucket < @one_unit, @count_in_bucket, 	             	IF(@count_in_bucket < @two_unit, @count_in_bucket / 2, @count_in_bucket / 3))), ''), @label := CONCAT(@label_inner := CONCAT('\n(', ROUND((@bucket_size * 6) / @unit_div), ' - ', ROUND((@bucket_size * 7) / @unit_div), @unit, ')'), REPEAT(' ', @max_label_size - LENGTH(@label_inner)), @count_in_bucket := IFNULL((SELECT SUM(cnt) FROM sys.x$ps_digest_avg_latency_distribution AS b1  WHERE b1.avg_us > @bucket_size * 6 AND b1.avg_us <= @bucket_size * 7), 0)), REPEAT(' ', @max_label_len - LENGTH(@label)), '| ', IFNULL(REPEAT(IF(@count_in_bucket < @one_unit, '.', IF(@count_in_bucket < @two_unit, '*', '#')),  	             IF(@count_in_bucket < @one_unit, @count_in_bucket, 	             	IF(@count_in_bucket < @two_unit, @count_in_bucket / 2, @count_in_bucket / 3))), ''), @label := CONCAT(@label_inner := CONCAT('\n(', ROUND((@bucket_size * 7) / @unit_div), ' - ', ROUND((@bucket_size * 8) / @unit_div), @unit, ')'), REPEAT(' ', @max_label_size - LENGTH(@label_inner)), @count_in_bucket := IFNULL((SELECT SUM(cnt) FROM sys.x$ps_digest_avg_latency_distribution AS b1  WHERE b1.avg_us > @bucket_size * 7 AND b1.avg_us <= @bucket_size * 8), 0)), REPEAT(' ', @max_label_len - LENGTH(@label)), '| ', IFNULL(REPEAT(IF(@count_in_bucket < @one_unit, '.', IF(@count_in_bucket < @two_unit, '*', '#')),  	             IF(@count_in_bucket < @one_unit, @count_in_bucket, 	             	IF(@count_in_bucket < @two_unit, @count_in_bucket / 2, @count_in_bucket / 3))), ''), @label := CONCAT(@label_inner := CONCAT('\n(', ROUND((@bucket_size * 8) / @unit_div), ' - ', ROUND((@bucket_size * 9) / @unit_div), @unit, ')'), REPEAT(' ', @max_label_size - LENGTH(@label_inner)), @count_in_bucket := IFNULL((SELECT SUM(cnt) FROM sys.x$ps_digest_avg_latency_distribution AS b1  WHERE b1.avg_us > @bucket_size * 8 AND b1.avg_us <= @bucket_size * 9), 0)), REPEAT(' ', @max_label_len - LENGTH(@label)), '| ', IFNULL(REPEAT(IF(@count_in_bucket < @one_unit, '.', IF(@count_in_bucket < @two_unit, '*', '#')),  	             IF(@count_in_bucket < @one_unit, @count_in_bucket, 	             	IF(@count_in_bucket < @two_unit, @count_in_bucket / 2, @count_in_bucket / 3))), ''), @label := CONCAT(@label_inner := CONCAT('\n(', ROUND((@bucket_size * 9) / @unit_div), ' - ', ROUND((@bucket_size * 10) / @unit_div), @unit, ')'), REPEAT(' ', @max_label_size - LENGTH(@label_inner)), @count_in_bucket := IFNULL((SELECT SUM(cnt) FROM sys.x$ps_digest_avg_latency_distribution AS b1  WHERE b1.avg_us > @bucket_size * 9 AND b1.avg_us <= @bucket_size * 10), 0)), REPEAT(' ', @max_label_len - LENGTH(@label)), '| ', IFNULL(REPEAT(IF(@count_in_bucket < @one_unit, '.', IF(@count_in_bucket < @two_unit, '*', '#')),  	             IF(@count_in_bucket < @one_unit, @count_in_bucket, 	             	IF(@count_in_bucket < @two_unit, @count_in_bucket / 2, @count_in_bucket / 3))), ''), @label := CONCAT(@label_inner := CONCAT('\n(', ROUND((@bucket_size * 10) / @unit_div), ' - ', ROUND((@bucket_size * 11) / @unit_div), @unit, ')'), REPEAT(' ', @max_label_size - LENGTH(@label_inner)), @count_in_bucket := IFNULL((SELECT SUM(cnt) FROM sys.x$ps_digest_avg_latency_distribution AS b1  WHERE b1.avg_us > @bucket_size * 10 AND b1.avg_us <= @bucket_size * 11), 0)), REPEAT(' ', @max_label_len - LENGTH(@label)), '| ', IFNULL(REPEAT(IF(@count_in_bucket < @one_unit, '.', IF(@count_in_bucket < @two_unit, '*', '#')),  	             IF(@count_in_bucket < @one_unit, @count_in_bucket, 	             	IF(@count_in_bucket < @two_unit, @count_in_bucket / 2, @count_in_bucket / 3))), ''), @label := CONCAT(@label_inner := CONCAT('\n(', ROUND((@bucket_size * 11) / @unit_div), ' - ', ROUND((@bucket_size * 12) / @unit_div), @unit, ')'), REPEAT(' ', @max_label_size - LENGTH(@label_inner)), @count_in_bucket := IFNULL((SELECT SUM(cnt) FROM sys.x$ps_digest_avg_latency_distribution AS b1  WHERE b1.avg_us > @bucket_size * 11 AND b1.avg_us <= @bucket_size * 12), 0)), REPEAT(' ', @max_label_len - LENGTH(@label)), '| ', IFNULL(REPEAT(IF(@count_in_bucket < @one_unit, '.', IF(@count_in_bucket < @two_unit, '*', '#')),  	             IF(@count_in_bucket < @one_unit, @count_in_bucket, 	             	IF(@count_in_bucket < @two_unit, @count_in_bucket / 2, @count_in_bucket / 3))), ''), @label := CONCAT(@label_inner := CONCAT('\n(', ROUND((@bucket_size * 12) / @unit_div), ' - ', ROUND((@bucket_size * 13) / @unit_div), @unit, ')'), REPEAT(' ', @max_label_size - LENGTH(@label_inner)), @count_in_bucket := IFNULL((SELECT SUM(cnt) FROM sys.x$ps_digest_avg_latency_distribution AS b1  WHERE b1.avg_us > @bucket_size * 12 AND b1.avg_us <= @bucket_size * 13), 0)), REPEAT(' ', @max_label_len - LENGTH(@label)), '| ', IFNULL(REPEAT(IF(@count_in_bucket < @one_unit, '.', IF(@count_in_bucket < @two_unit, '*', '#')),  	             IF(@count_in_bucket < @one_unit, @count_in_bucket, 	             	IF(@count_in_bucket < @two_unit, @count_in_bucket / 2, @count_in_bucket / 3))), ''), @label := CONCAT(@label_inner := CONCAT('\n(', ROUND((@bucket_size * 13) / @unit_div), ' - ', ROUND((@bucket_size * 14) / @unit_div), @unit, ')'), REPEAT(' ', @max_label_size - LENGTH(@label_inner)), @count_in_bucket := IFNULL((SELECT SUM(cnt) FROM sys.x$ps_digest_avg_latency_distribution AS b1  WHERE b1.avg_us > @bucket_size * 13 AND b1.avg_us <= @bucket_size * 14), 0)), REPEAT(' ', @max_label_len - LENGTH(@label)), '| ', IFNULL(REPEAT(IF(@count_in_bucket < @one_unit, '.', IF(@count_in_bucket < @two_unit, '*', '#')),  	             IF(@count_in_bucket < @one_unit, @count_in_bucket, 	             	IF(@count_in_bucket < @two_unit, @count_in_bucket / 2, @count_in_bucket / 3))), ''), @label := CONCAT(@label_inner := CONCAT('\n(', ROUND((@bucket_size * 14) / @unit_div), ' - ', ROUND((@bucket_size * 15) / @unit_div), @unit, ')'), REPEAT(' ', @max_label_size - LENGTH(@label_inner)), @count_in_bucket := IFNULL((SELECT SUM(cnt) FROM sys.x$ps_digest_avg_latency_distribution AS b1  WHERE b1.avg_us > @bucket_size * 14 AND b1.avg_us <= @bucket_size * 15), 0)), REPEAT(' ', @max_label_len - LENGTH(@label)), '| ', IFNULL(REPEAT(IF(@count_in_bucket < @one_unit, '.', IF(@count_in_bucket < @two_unit, '*', '#')),  	             IF(@count_in_bucket < @one_unit, @count_in_bucket, 	             	IF(@count_in_bucket < @two_unit, @count_in_bucket / 2, @count_in_bucket / 3))), ''), @label := CONCAT(@label_inner := CONCAT('\n(', ROUND((@bucket_size * 15) / @unit_div), ' - ', ROUND((@bucket_size * 16) / @unit_div), @unit, ')'), REPEAT(' ', @max_label_size - LENGTH(@label_inner)), @count_in_bucket := IFNULL((SELECT SUM(cnt) FROM sys.x$ps_digest_avg_latency_distribution AS b1  WHERE b1.avg_us > @bucket_size * 15 AND b1.avg_us <= @bucket_size * 16), 0)), REPEAT(' ', @max_label_len - LENGTH(@label)), '| ', IFNULL(REPEAT(IF(@count_in_bucket < @one_unit, '.', IF(@count_in_bucket < @two_unit, '*', '#')),  	             IF(@count_in_bucket < @one_unit, @count_in_bucket, 	             	IF(@count_in_bucket < @two_unit, @count_in_bucket / 2, @count_in_bucket / 3))), ''),  '\n\n  Total Statements: ', @total_queries, '; Buckets: ', @buckets , '; Bucket Size: ', ROUND(@bucket_size / @unit_div) , ' ', @unit, ';\n'  ) AS `Performance Schema Statement Digest Average Latency Histogram`;  END
;;
delimiter ;

-- ----------------------------
-- Function structure for ps_thread_account
-- ----------------------------
DROP FUNCTION IF EXISTS `ps_thread_account`;
delimiter ;;
CREATE FUNCTION `sys`.`ps_thread_account`(in_thread_id BIGINT UNSIGNED)
 RETURNS text CHARSET utf8
  READS SQL DATA 
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Return the user@host account for the given Performance Schema thread id.\n \n Parameters\n \n in_thread_id (BIGINT UNSIGNED):\n The id of the thread to return the account for.\n \n Example\n \n mysql> select thread_id, processlist_user, processlist_host from performance_schema.threads where type = \'foreground\';\n +-----------+------------------+------------------+\n | thread_id | processlist_user | processlist_host |\n +-----------+------------------+------------------+\n |        23 | NULL             | NULL             |\n |        30 | root             | localhost        |\n |        31 | msandbox         | localhost        |\n |        32 | msandbox         | localhost        |\n +-----------+------------------+------------------+\n 4 rows in set (0.00 sec)\n \n mysql> select sys.ps_thread_account(31);\n +---------------------------+\n | sys.ps_thread_account(31) |\n +---------------------------+\n | msandbox@localhost        |\n +---------------------------+\n 1 row in set (0.00 sec)\n '
BEGIN RETURN (SELECT IF( type = 'FOREGROUND', CONCAT(processlist_user, '@', processlist_host), type ) AS account FROM `performance_schema`.`threads` WHERE thread_id = in_thread_id); END
;;
delimiter ;

-- ----------------------------
-- Function structure for ps_thread_id
-- ----------------------------
DROP FUNCTION IF EXISTS `ps_thread_id`;
delimiter ;;
CREATE FUNCTION `sys`.`ps_thread_id`(in_connection_id BIGINT UNSIGNED)
 RETURNS bigint(20) unsigned
  READS SQL DATA 
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Return the Performance Schema THREAD_ID for the specified connection ID.\n \n Parameters\n \n in_connection_id (BIGINT UNSIGNED):\n The id of the connection to return the thread id for. If NULL, the current\n connection thread id is returned.\n \n Example\n \n mysql> SELECT sys.ps_thread_id(79);\n +----------------------+\n | sys.ps_thread_id(79) |\n +----------------------+\n |                   98 |\n +----------------------+\n 1 row in set (0.00 sec)\n \n mysql> SELECT sys.ps_thread_id(CONNECTION_ID());\n +-----------------------------------+\n | sys.ps_thread_id(CONNECTION_ID()) |\n +-----------------------------------+\n |                                98 |\n +-----------------------------------+\n 1 row in set (0.00 sec)\n '
BEGIN RETURN (SELECT THREAD_ID FROM `performance_schema`.`threads` WHERE PROCESSLIST_ID = IFNULL(in_connection_id, CONNECTION_ID()) ); END
;;
delimiter ;

-- ----------------------------
-- Function structure for ps_thread_stack
-- ----------------------------
DROP FUNCTION IF EXISTS `ps_thread_stack`;
delimiter ;;
CREATE FUNCTION `sys`.`ps_thread_stack`(thd_id BIGINT UNSIGNED, debug BOOLEAN)
 RETURNS longtext CHARSET latin1
  READS SQL DATA 
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Outputs a JSON formatted stack of all statements, stages and events\n within Performance Schema for the specified thread.\n \n Parameters\n \n thd_id (BIGINT UNSIGNED):\n The id of the thread to trace. This should match the thread_id\n column from the performance_schema.threads table.\n in_verbose (BOOLEAN):\n Include file:lineno information in the events.\n \n Example\n \n (line separation added for output)\n \n mysql> SELECT sys.ps_thread_stack(37, FALSE) AS thread_stack\\G\n *************************** 1. row ***************************\n thread_stack: {\"rankdir\": \"LR\",\"nodesep\": \"0.10\",\"stack_created\": \"2014-02-19 13:39:03\",\n \"mysql_version\": \"5.7.3-m13\",\"mysql_user\": \"root@localhost\",\"events\": \n [{\"nesting_event_id\": \"0\", \"event_id\": \"10\", \"timer_wait\": 256.35, \"event_info\": \n \"sql/select\", \"wait_info\": \"select @@version_comment limit 1\\nerrors: 0\\nwarnings: 0\\nlock time:\n ...\n '
BEGIN  DECLARE json_objects LONGTEXT;   UPDATE performance_schema.threads SET instrumented = 'NO' WHERE processlist_id = CONNECTION_ID();   SET SESSION group_concat_max_len=@@global.max_allowed_packet;  SELECT GROUP_CONCAT(CONCAT( '{' , CONCAT_WS( ', ' , CONCAT('"nesting_event_id": "', IF(nesting_event_id IS NULL, '0', nesting_event_id), '"') , CONCAT('"event_id": "', event_id, '"') , CONCAT( '"timer_wait": ', ROUND(timer_wait/1000000, 2))   , CONCAT( '"event_info": "' , CASE WHEN event_name NOT LIKE 'wait/io%' THEN REPLACE(SUBSTRING_INDEX(event_name, '/', -2), '\\', '\\\\') WHEN event_name NOT LIKE 'wait/io/file%' OR event_name NOT LIKE 'wait/io/socket%' THEN REPLACE(SUBSTRING_INDEX(event_name, '/', -4), '\\', '\\\\') ELSE event_name END , '"' ) , CONCAT( '"wait_info": "', IFNULL(wait_info, ''), '"') , CONCAT( '"source": "', IF(true AND event_name LIKE 'wait%', IFNULL(wait_info, ''), ''), '"') , CASE  WHEN event_name LIKE 'wait/io/file%'      THEN '"event_type": "io/file"' WHEN event_name LIKE 'wait/io/table%'     THEN '"event_type": "io/table"' WHEN event_name LIKE 'wait/io/socket%'    THEN '"event_type": "io/socket"' WHEN event_name LIKE 'wait/synch/mutex%'  THEN '"event_type": "synch/mutex"' WHEN event_name LIKE 'wait/synch/cond%'   THEN '"event_type": "synch/cond"' WHEN event_name LIKE 'wait/synch/rwlock%' THEN '"event_type": "synch/rwlock"' WHEN event_name LIKE 'wait/lock%'         THEN '"event_type": "lock"' WHEN event_name LIKE 'statement/%'        THEN '"event_type": "stmt"' WHEN event_name LIKE 'stage/%'            THEN '"event_type": "stage"' WHEN event_name LIKE '%idle%'             THEN '"event_type": "idle"' ELSE ''  END                    ) , '}' ) ORDER BY event_id ASC SEPARATOR ',') event INTO json_objects FROM (  (SELECT thread_id, event_id, event_name, timer_wait, timer_start, nesting_event_id,  CONCAT(sql_text, '\\n', 'errors: ', errors, '\\n', 'warnings: ', warnings, '\\n', 'lock time: ', ROUND(lock_time/1000000, 2),'us\\n', 'rows affected: ', rows_affected, '\\n', 'rows sent: ', rows_sent, '\\n', 'rows examined: ', rows_examined, '\\n', 'tmp tables: ', created_tmp_tables, '\\n', 'tmp disk tables: ', created_tmp_disk_tables, '\\n', 'select scan: ', select_scan, '\\n', 'select full join: ', select_full_join, '\\n', 'select full range join: ', select_full_range_join, '\\n', 'select range: ', select_range, '\\n', 'select range check: ', select_range_check, '\\n',  'sort merge passes: ', sort_merge_passes, '\\n', 'sort rows: ', sort_rows, '\\n', 'sort range: ', sort_range, '\\n', 'sort scan: ', sort_scan, '\\n', 'no index used: ', IF(no_index_used, 'TRUE', 'FALSE'), '\\n', 'no good index used: ', IF(no_good_index_used, 'TRUE', 'FALSE'), '\\n' ) AS wait_info FROM performance_schema.events_statements_history_long WHERE thread_id = thd_id) UNION  (SELECT thread_id, event_id, event_name, timer_wait, timer_start, nesting_event_id, null AS wait_info FROM performance_schema.events_stages_history_long WHERE thread_id = thd_id)  UNION  (SELECT thread_id, event_id,  CONCAT(event_name ,  IF(event_name NOT LIKE 'wait/synch/mutex%', IFNULL(CONCAT(' - ', operation), ''), ''),  IF(number_of_bytes IS NOT NULL, CONCAT(' ', number_of_bytes, ' bytes'), ''), IF(event_name LIKE 'wait/io/file%', '\\n', ''), IF(object_schema IS NOT NULL, CONCAT('\\nObject: ', object_schema, '.'), ''),  IF(object_name IS NOT NULL,  IF (event_name LIKE 'wait/io/socket%', CONCAT(IF (object_name LIKE ':0%', @@socket, object_name)), object_name), ''),  IF(index_name IS NOT NULL, CONCAT(' Index: ', index_name), ''), '\\n' ) AS event_name, timer_wait, timer_start, nesting_event_id, source AS wait_info FROM performance_schema.events_waits_history_long WHERE thread_id = thd_id)) events  ORDER BY event_id;  RETURN CONCAT('{',  CONCAT_WS(',',  '"rankdir": "LR"', '"nodesep": "0.10"', CONCAT('"stack_created": "', NOW(), '"'), CONCAT('"mysql_version": "', VERSION(), '"'), CONCAT('"mysql_user": "', CURRENT_USER(), '"'), CONCAT('"events": [', IFNULL(json_objects,''), ']') ), '}');  END
;;
delimiter ;

-- ----------------------------
-- Function structure for ps_thread_trx_info
-- ----------------------------
DROP FUNCTION IF EXISTS `ps_thread_trx_info`;
delimiter ;;
CREATE FUNCTION `sys`.`ps_thread_trx_info`(in_thread_id BIGINT UNSIGNED)
 RETURNS longtext CHARSET utf8
  READS SQL DATA 
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Returns a JSON object with info on the given threads current transaction, \n and the statements it has already executed, derived from the\n performance_schema.events_transactions_current and\n performance_schema.events_statements_history tables (so the consumers \n for these also have to be enabled within Performance Schema to get full\n data in the object).\n \n When the output exceeds the default truncation length (65535), a JSON error\n object is returned, such as:\n \n { \"error\": \"Trx info truncated: Row 6 was cut by GROUP_CONCAT()\" }\n \n Similar error objects are returned for other warnings/and exceptions raised\n when calling the function.\n \n The max length of the output of this function can be controlled with the\n ps_thread_trx_info.max_length variable set via sys_config, or the\n @sys.ps_thread_trx_info.max_length user variable, as appropriate.\n \n Parameters\n \n in_thread_id (BIGINT UNSIGNED):\n The id of the thread to return the transaction info for.\n \n Example\n \n SELECT sys.ps_thread_trx_info(48)\\G\n *************************** 1. row ***************************\n sys.ps_thread_trx_info(48): [\n {\n \"time\": \"790.70 us\",\n \"state\": \"COMMITTED\",\n \"mode\": \"READ WRITE\",\n \"autocommitted\": \"NO\",\n \"gtid\": \"AUTOMATIC\",\n \"isolation\": \"REPEATABLE READ\",\n \"statements_executed\": [\n {\n \"sql_text\": \"INSERT INTO info VALUES (1, \'foo\')\",\n \"time\": \"471.02 us\",\n \"schema\": \"trx\",\n \"rows_examined\": 0,\n \"rows_affected\": 1,\n \"rows_sent\": 0,\n \"tmp_tables\": 0,\n \"tmp_disk_tables\": 0,\n \"sort_rows\": 0,\n \"sort_merge_passes\": 0\n },\n {\n \"sql_text\": \"COMMIT\",\n \"time\": \"254.42 us\",\n \"schema\": \"trx\",\n \"rows_examined\": 0,\n \"rows_affected\": 0,\n \"rows_sent\": 0,\n \"tmp_tables\": 0,\n \"tmp_disk_tables\": 0,\n \"sort_rows\": 0,\n \"sort_merge_passes\": 0\n }\n ]\n },\n {\n \"time\": \"426.20 us\",\n \"state\": \"COMMITTED\",\n \"mode\": \"READ WRITE\",\n \"autocommitted\": \"NO\",\n \"gtid\": \"AUTOMATIC\",\n \"isolation\": \"REPEATABLE READ\",\n \"statements_executed\": [\n {\n \"sql_text\": \"INSERT INTO info VALUES (2, \'bar\')\",\n \"time\": \"107.33 us\",\n \"schema\": \"trx\",\n \"rows_examined\": 0,\n \"rows_affected\": 1,\n \"rows_sent\": 0,\n \"tmp_tables\": 0,\n \"tmp_disk_tables\": 0,\n \"sort_rows\": 0,\n \"sort_merge_passes\": 0\n },\n {\n \"sql_text\": \"COMMIT\",\n \"time\": \"213.23 us\",\n \"schema\": \"trx\",\n \"rows_examined\": 0,\n \"rows_affected\": 0,\n \"rows_sent\": 0,\n \"tmp_tables\": 0,\n \"tmp_disk_tables\": 0,\n \"sort_rows\": 0,\n \"sort_merge_passes\": 0\n }\n ]\n }\n ]\n 1 row in set (0.03 sec)\n '
BEGIN DECLARE v_output LONGTEXT DEFAULT '{}'; DECLARE v_msg_text TEXT DEFAULT ''; DECLARE v_signal_msg TEXT DEFAULT ''; DECLARE v_mysql_errno INT; DECLARE v_max_output_len BIGINT; DECLARE EXIT HANDLER FOR SQLWARNING, SQLEXCEPTION BEGIN GET DIAGNOSTICS CONDITION 1 v_msg_text = MESSAGE_TEXT, v_mysql_errno = MYSQL_ERRNO;  IF v_mysql_errno = 1260 THEN SET v_signal_msg = CONCAT('{ "error": "Trx info truncated: ', v_msg_text, '" }'); ELSE SET v_signal_msg = CONCAT('{ "error": "', v_msg_text, '" }'); END IF;  RETURN v_signal_msg; END;  IF (@sys.ps_thread_trx_info.max_length IS NULL) THEN SET @sys.ps_thread_trx_info.max_length = sys.sys_get_config('ps_thread_trx_info.max_length', 65535); END IF;  IF (@sys.ps_thread_trx_info.max_length != @@session.group_concat_max_len) THEN SET @old_group_concat_max_len = @@session.group_concat_max_len; SET v_max_output_len = (@sys.ps_thread_trx_info.max_length - 5); SET SESSION group_concat_max_len = v_max_output_len; END IF;  SET v_output = ( SELECT CONCAT('[', IFNULL(GROUP_CONCAT(trx_info ORDER BY event_id), ''), '\n]') AS trx_info FROM (SELECT trxi.thread_id,  trxi.event_id, GROUP_CONCAT( IFNULL( CONCAT('\n  {\n', '    "time": "', IFNULL(sys.format_time(trxi.timer_wait), ''), '",\n', '    "state": "', IFNULL(trxi.state, ''), '",\n', '    "mode": "', IFNULL(trxi.access_mode, ''), '",\n', '    "autocommitted": "', IFNULL(trxi.autocommit, ''), '",\n', '    "gtid": "', IFNULL(trxi.gtid, ''), '",\n', '    "isolation": "', IFNULL(trxi.isolation_level, ''), '",\n', '    "statements_executed": [', IFNULL(s.stmts, ''), IF(s.stmts IS NULL, ' ]\n', '\n    ]\n'), '  }' ),  '')  ORDER BY event_id) AS trx_info  FROM ( (SELECT thread_id, event_id, timer_wait, state,access_mode, autocommit, gtid, isolation_level FROM performance_schema.events_transactions_current WHERE thread_id = in_thread_id AND end_event_id IS NULL) UNION (SELECT thread_id, event_id, timer_wait, state,access_mode, autocommit, gtid, isolation_level FROM performance_schema.events_transactions_history WHERE thread_id = in_thread_id) ) AS trxi LEFT JOIN (SELECT thread_id, nesting_event_id, GROUP_CONCAT( IFNULL( CONCAT('\n      {\n', '        "sql_text": "', IFNULL(sys.format_statement(REPLACE(sql_text, '\\', '\\\\')), ''), '",\n', '        "time": "', IFNULL(sys.format_time(timer_wait), ''), '",\n', '        "schema": "', IFNULL(current_schema, ''), '",\n', '        "rows_examined": ', IFNULL(rows_examined, ''), ',\n', '        "rows_affected": ', IFNULL(rows_affected, ''), ',\n', '        "rows_sent": ', IFNULL(rows_sent, ''), ',\n', '        "tmp_tables": ', IFNULL(created_tmp_tables, ''), ',\n', '        "tmp_disk_tables": ', IFNULL(created_tmp_disk_tables, ''), ',\n', '        "sort_rows": ', IFNULL(sort_rows, ''), ',\n', '        "sort_merge_passes": ', IFNULL(sort_merge_passes, ''), '\n', '      }'), '') ORDER BY event_id) AS stmts FROM performance_schema.events_statements_history WHERE sql_text IS NOT NULL AND thread_id = in_thread_id GROUP BY thread_id, nesting_event_id ) AS s  ON trxi.thread_id = s.thread_id  AND trxi.event_id = s.nesting_event_id WHERE trxi.thread_id = in_thread_id GROUP BY trxi.thread_id, trxi.event_id ) trxs GROUP BY thread_id );  IF (@old_group_concat_max_len IS NOT NULL) THEN SET SESSION group_concat_max_len = @old_group_concat_max_len; END IF;  RETURN v_output; END
;;
delimiter ;

-- ----------------------------
-- Procedure structure for ps_trace_statement_digest
-- ----------------------------
DROP PROCEDURE IF EXISTS `ps_trace_statement_digest`;
delimiter ;;
CREATE PROCEDURE `sys`.`ps_trace_statement_digest`(IN in_digest VARCHAR(32), IN in_runtime INT,  IN in_interval DECIMAL(2,2), IN in_start_fresh BOOLEAN, IN in_auto_enable BOOLEAN)
  MODIFIES SQL DATA 
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Traces all instrumentation within Performance Schema for a specific\n Statement Digest. \n \n When finding a statement of interest within the \n performance_schema.events_statements_summary_by_digest table, feed\n the DIGEST MD5 value in to this procedure, set how long to poll for, \n and at what interval to poll, and it will generate a report of all \n statistics tracked within Performance Schema for that digest for the\n interval.\n \n It will also attempt to generate an EXPLAIN for the longest running \n example of the digest during the interval. Note this may fail, as:\n \n * Performance Schema truncates long SQL_TEXT values (and hence the \n EXPLAIN will fail due to parse errors)\n * the default schema is sys (so tables that are not fully qualified\n in the query may not be found)\n * some queries such as SHOW are not supported in EXPLAIN.\n \n When the EXPLAIN fails, the error will be ignored and no EXPLAIN\n output generated.\n \n Requires the SUPER privilege for \"SET sql_log_bin = 0;\".\n \n Parameters\n \n in_digest (VARCHAR(32)):\n The statement digest identifier you would like to analyze\n in_runtime (INT):\n The number of seconds to run analysis for\n in_interval (DECIMAL(2,2)):\n The interval (in seconds, may be fractional) at which to try\n and take snapshots\n in_start_fresh (BOOLEAN):\n Whether to TRUNCATE the events_statements_history_long and\n events_stages_history_long tables before starting\n in_auto_enable (BOOLEAN):\n Whether to automatically turn on required consumers\n \n Example\n \n mysql> call ps_trace_statement_digest(\'891ec6860f98ba46d89dd20b0c03652c\', 10, 0.1, true, true);\n +--------------------+\n | SUMMARY STATISTICS |\n +--------------------+\n | SUMMARY STATISTICS |\n +--------------------+\n 1 row in set (9.11 sec)\n \n +------------+-----------+-----------+-----------+---------------+------------+------------+\n | executions | exec_time | lock_time | rows_sent | rows_examined | tmp_tables | full_scans |\n +------------+-----------+-----------+-----------+---------------+------------+------------+\n |         21 | 4.11 ms   | 2.00 ms   |         0 |            21 |          0 |          0 |\n +------------+-----------+-----------+-----------+---------------+------------+------------+\n 1 row in set (9.11 sec)\n \n +------------------------------------------+-------+-----------+\n | event_name                               | count | latency   |\n +------------------------------------------+-------+-----------+\n | stage/sql/checking query cache for query |    16 | 724.37 us |\n | stage/sql/statistics                     |    16 | 546.92 us |\n | stage/sql/freeing items                  |    18 | 520.11 us |\n | stage/sql/init                           |    51 | 466.80 us |\n ...\n | stage/sql/cleaning up                    |    18 | 11.92 us  |\n | stage/sql/executing                      |    16 | 6.95 us   |\n +------------------------------------------+-------+-----------+\n 17 rows in set (9.12 sec)\n \n +---------------------------+\n | LONGEST RUNNING STATEMENT |\n +---------------------------+\n | LONGEST RUNNING STATEMENT |\n +---------------------------+\n 1 row in set (9.16 sec)\n \n +-----------+-----------+-----------+-----------+---------------+------------+-----------+\n | thread_id | exec_time | lock_time | rows_sent | rows_examined | tmp_tables | full_scan |\n +-----------+-----------+-----------+-----------+---------------+------------+-----------+\n |    166646 | 618.43 us | 1.00 ms   |         0 |             1 |          0 |         0 |\n +-----------+-----------+-----------+-----------+---------------+------------+-----------+\n 1 row in set (9.16 sec)\n \n // Truncated for clarity...\n +-----------------------------------------------------------------+\n | sql_text                                                        |\n +-----------------------------------------------------------------+\n | select hibeventhe0_.id as id1382_, hibeventhe0_.createdTime ... |\n +-----------------------------------------------------------------+\n 1 row in set (9.17 sec)\n \n +------------------------------------------+-----------+\n | event_name                               | latency   |\n +------------------------------------------+-----------+\n | stage/sql/init                           | 8.61 us   |\n | stage/sql/Waiting for query cache lock   | 453.23 us |\n | stage/sql/init                           | 331.07 ns |\n | stage/sql/checking query cache for query | 43.04 us  |\n ...\n | stage/sql/freeing items                  | 30.46 us  |\n | stage/sql/cleaning up                    | 662.13 ns |\n +------------------------------------------+-----------+\n 18 rows in set (9.23 sec)\n \n +----+-------------+--------------+-------+---------------+-----------+---------+-------------+------+-------+\n | id | select_type | table        | type  | possible_keys | key       | key_len | ref         | rows | Extra |\n +----+-------------+--------------+-------+---------------+-----------+---------+-------------+------+-------+\n |  1 | SIMPLE      | hibeventhe0_ | const | fixedTime     | fixedTime | 775     | const,const |    1 | NULL  |\n +----+-------------+--------------+-------+---------------+-----------+---------+-------------+------+-------+\n 1 row in set (9.27 sec)\n \n Query OK, 0 rows affected (9.28 sec)\n '
BEGIN  DECLARE v_start_fresh BOOLEAN DEFAULT false; DECLARE v_auto_enable BOOLEAN DEFAULT false; DECLARE v_explain     BOOLEAN DEFAULT true; DECLARE v_this_thread_enabed ENUM('YES', 'NO'); DECLARE v_runtime INT DEFAULT 0; DECLARE v_start INT DEFAULT 0; DECLARE v_found_stmts INT;  SET @log_bin := @@sql_log_bin; SET sql_log_bin = 0;  SELECT INSTRUMENTED INTO v_this_thread_enabed FROM performance_schema.threads WHERE PROCESSLIST_ID = CONNECTION_ID(); CALL sys.ps_setup_disable_thread(CONNECTION_ID());  DROP TEMPORARY TABLE IF EXISTS stmt_trace; CREATE TEMPORARY TABLE stmt_trace ( thread_id BIGINT UNSIGNED, timer_start BIGINT UNSIGNED, event_id BIGINT UNSIGNED, sql_text longtext, timer_wait BIGINT UNSIGNED, lock_time BIGINT UNSIGNED, errors BIGINT UNSIGNED, mysql_errno INT, rows_sent BIGINT UNSIGNED, rows_affected BIGINT UNSIGNED, rows_examined BIGINT UNSIGNED, created_tmp_tables BIGINT UNSIGNED, created_tmp_disk_tables BIGINT UNSIGNED, no_index_used BIGINT UNSIGNED, PRIMARY KEY (thread_id, timer_start) );  DROP TEMPORARY TABLE IF EXISTS stmt_stages; CREATE TEMPORARY TABLE stmt_stages ( event_id BIGINT UNSIGNED, stmt_id BIGINT UNSIGNED, event_name VARCHAR(128), timer_wait BIGINT UNSIGNED, PRIMARY KEY (event_id) );  SET v_start_fresh = in_start_fresh; IF v_start_fresh THEN TRUNCATE TABLE performance_schema.events_statements_history_long; TRUNCATE TABLE performance_schema.events_stages_history_long; END IF;  SET v_auto_enable = in_auto_enable; IF v_auto_enable THEN CALL sys.ps_setup_save(0);  UPDATE performance_schema.threads SET INSTRUMENTED = IF(PROCESSLIST_ID IS NOT NULL, 'YES', 'NO');  UPDATE performance_schema.setup_consumers SET ENABLED = 'YES' WHERE NAME NOT LIKE '%\_history' AND NAME NOT LIKE 'events_wait%' AND NAME NOT LIKE 'events_transactions%' AND NAME <> 'statements_digest';  UPDATE performance_schema.setup_instruments SET ENABLED = 'YES', TIMED   = 'YES' WHERE NAME LIKE 'statement/%' OR NAME LIKE 'stage/%'; END IF;  WHILE v_runtime < in_runtime DO SELECT UNIX_TIMESTAMP() INTO v_start;  INSERT IGNORE INTO stmt_trace SELECT thread_id, timer_start, event_id, sql_text, timer_wait, lock_time, errors, mysql_errno,  rows_sent, rows_affected, rows_examined, created_tmp_tables, created_tmp_disk_tables, no_index_used FROM performance_schema.events_statements_history_long WHERE digest = in_digest;  INSERT IGNORE INTO stmt_stages SELECT stages.event_id, stmt_trace.event_id, stages.event_name, stages.timer_wait FROM performance_schema.events_stages_history_long AS stages JOIN stmt_trace ON stages.nesting_event_id = stmt_trace.event_id;  SELECT SLEEP(in_interval) INTO @sleep; SET v_runtime = v_runtime + (UNIX_TIMESTAMP() - v_start); END WHILE;  SELECT "SUMMARY STATISTICS";  SELECT COUNT(*) executions, sys.format_time(SUM(timer_wait)) AS exec_time, sys.format_time(SUM(lock_time)) AS lock_time, SUM(rows_sent) AS rows_sent, SUM(rows_affected) AS rows_affected, SUM(rows_examined) AS rows_examined, SUM(created_tmp_tables) AS tmp_tables, SUM(no_index_used) AS full_scans FROM stmt_trace;  SELECT event_name, COUNT(*) as count, sys.format_time(SUM(timer_wait)) as latency FROM stmt_stages GROUP BY event_name ORDER BY SUM(timer_wait) DESC;  SELECT "LONGEST RUNNING STATEMENT";  SELECT thread_id, sys.format_time(timer_wait) AS exec_time, sys.format_time(lock_time) AS lock_time, rows_sent, rows_affected, rows_examined, created_tmp_tables AS tmp_tables, no_index_used AS full_scan FROM stmt_trace ORDER BY timer_wait DESC LIMIT 1;  SELECT sql_text FROM stmt_trace ORDER BY timer_wait DESC LIMIT 1;  SELECT sql_text, event_id INTO @sql, @sql_id FROM stmt_trace ORDER BY timer_wait DESC LIMIT 1;  IF (@sql_id IS NOT NULL) THEN SELECT event_name, sys.format_time(timer_wait) as latency FROM stmt_stages WHERE stmt_id = @sql_id ORDER BY event_id; END IF;  DROP TEMPORARY TABLE stmt_trace; DROP TEMPORARY TABLE stmt_stages;  IF (@sql IS NOT NULL) THEN SET @stmt := CONCAT("EXPLAIN FORMAT=JSON ", @sql); BEGIN DECLARE CONTINUE HANDLER FOR 1064, 1146 SET v_explain = false;  PREPARE explain_stmt FROM @stmt; END;  IF (v_explain) THEN EXECUTE explain_stmt; DEALLOCATE PREPARE explain_stmt; END IF; END IF;  IF v_auto_enable THEN CALL sys.ps_setup_reload_saved(); END IF; IF (v_this_thread_enabed = 'YES') THEN CALL sys.ps_setup_enable_thread(CONNECTION_ID()); END IF;  SET sql_log_bin = @log_bin; END
;;
delimiter ;

-- ----------------------------
-- Procedure structure for ps_trace_thread
-- ----------------------------
DROP PROCEDURE IF EXISTS `ps_trace_thread`;
delimiter ;;
CREATE PROCEDURE `sys`.`ps_trace_thread`(IN in_thread_id BIGINT UNSIGNED, IN in_outfile VARCHAR(255), IN in_max_runtime DECIMAL(20,2), IN in_interval DECIMAL(20,2), IN in_start_fresh BOOLEAN, IN in_auto_setup BOOLEAN, IN in_debug BOOLEAN)
  MODIFIES SQL DATA 
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Dumps all data within Performance Schema for an instrumented thread,\n to create a DOT formatted graph file. \n \n Each resultset returned from the procedure should be used for a complete graph\n \n Requires the SUPER privilege for \"SET sql_log_bin = 0;\".\n \n Parameters\n \n in_thread_id (BIGINT UNSIGNED):\n The thread that you would like a stack trace for\n in_outfile  (VARCHAR(255)):\n The filename the dot file will be written to\n in_max_runtime (DECIMAL(20,2)):\n The maximum time to keep collecting data.\n Use NULL to get the default which is 60 seconds.\n in_interval (DECIMAL(20,2)): \n How long to sleep between data collections. \n Use NULL to get the default which is 1 second.\n in_start_fresh (BOOLEAN):\n Whether to reset all Performance Schema data before tracing.\n in_auto_setup (BOOLEAN):\n Whether to disable all other threads and enable all consumers/instruments. \n This will also reset the settings at the end of the run.\n in_debug (BOOLEAN):\n Whether you would like to include file:lineno in the graph\n \n Example\n \n mysql> CALL sys.ps_trace_thread(25, CONCAT(\'/tmp/stack-\', REPLACE(NOW(), \' \', \'-\'), \'.dot\'), NULL, NULL, TRUE, TRUE, TRUE);\n +-------------------+\n | summary           |\n +-------------------+\n | Disabled 1 thread |\n +-------------------+\n 1 row in set (0.00 sec)\n \n +---------------------------------------------+\n | Info                                        |\n +---------------------------------------------+\n | Data collection starting for THREAD_ID = 25 |\n +---------------------------------------------+\n 1 row in set (0.03 sec)\n \n +-----------------------------------------------------------+\n | Info                                                      |\n +-----------------------------------------------------------+\n | Stack trace written to /tmp/stack-2014-02-16-21:18:41.dot |\n +-----------------------------------------------------------+\n 1 row in set (60.07 sec)\n \n +-------------------------------------------------------------------+\n | Convert to PDF                                                    |\n +-------------------------------------------------------------------+\n | dot -Tpdf -o /tmp/stack_25.pdf /tmp/stack-2014-02-16-21:18:41.dot |\n +-------------------------------------------------------------------+\n 1 row in set (60.07 sec)\n \n +-------------------------------------------------------------------+\n | Convert to PNG                                                    |\n +-------------------------------------------------------------------+\n | dot -Tpng -o /tmp/stack_25.png /tmp/stack-2014-02-16-21:18:41.dot |\n +-------------------------------------------------------------------+\n 1 row in set (60.07 sec)\n \n +------------------+\n | summary          |\n +------------------+\n | Enabled 1 thread |\n +------------------+\n 1 row in set (60.32 sec)\n '
BEGIN DECLARE v_done bool DEFAULT FALSE; DECLARE v_start, v_runtime DECIMAL(20,2) DEFAULT 0.0; DECLARE v_min_event_id bigint unsigned DEFAULT 0; DECLARE v_this_thread_enabed ENUM('YES', 'NO'); DECLARE v_event longtext; DECLARE c_stack CURSOR FOR SELECT CONCAT(IF(nesting_event_id IS NOT NULL, CONCAT(nesting_event_id, ' -> '), ''),  event_id, '; ', event_id, ' [label="', '(', sys.format_time(timer_wait), ') ', IF (event_name NOT LIKE 'wait/io%',  SUBSTRING_INDEX(event_name, '/', -2),  IF (event_name NOT LIKE 'wait/io/file%' OR event_name NOT LIKE 'wait/io/socket%', SUBSTRING_INDEX(event_name, '/', -4), event_name) ), IF (event_name LIKE 'transaction', IFNULL(CONCAT('\\n', wait_info), ''), ''), IF (event_name LIKE 'statement/%', IFNULL(CONCAT('\\n', wait_info), ''), ''), IF (in_debug AND event_name LIKE 'wait%', wait_info, ''), '", ',  CASE WHEN event_name LIKE 'wait/io/file%' THEN  'shape=box, style=filled, color=red' WHEN event_name LIKE 'wait/io/table%' THEN  'shape=box, style=filled, color=green' WHEN event_name LIKE 'wait/io/socket%' THEN 'shape=box, style=filled, color=yellow' WHEN event_name LIKE 'wait/synch/mutex%' THEN 'style=filled, color=lightskyblue' WHEN event_name LIKE 'wait/synch/cond%' THEN 'style=filled, color=darkseagreen3' WHEN event_name LIKE 'wait/synch/rwlock%' THEN 'style=filled, color=orchid' WHEN event_name LIKE 'wait/synch/sxlock%' THEN 'style=filled, color=palevioletred'  WHEN event_name LIKE 'wait/lock%' THEN 'shape=box, style=filled, color=tan' WHEN event_name LIKE 'statement/%' THEN CONCAT('shape=box, style=bold', CASE WHEN event_name LIKE 'statement/com/%' THEN ' style=filled, color=darkseagreen' ELSE IF((timer_wait/1000000000000) > @@long_query_time,  ' style=filled, color=red',  ' style=filled, color=lightblue') END ) WHEN event_name LIKE 'transaction' THEN 'shape=box, style=filled, color=lightblue3' WHEN event_name LIKE 'stage/%' THEN 'style=filled, color=slategray3' WHEN event_name LIKE '%idle%' THEN 'shape=box, style=filled, color=firebrick3' ELSE '' END, '];\n' ) event, event_id FROM ( (SELECT thread_id, event_id, event_name, timer_wait, timer_start, nesting_event_id, CONCAT('trx_id: ',  IFNULL(trx_id, ''), '\\n', 'gtid: ', IFNULL(gtid, ''), '\\n', 'state: ', state, '\\n', 'mode: ', access_mode, '\\n', 'isolation: ', isolation_level, '\\n', 'autocommit: ', autocommit, '\\n', 'savepoints: ', number_of_savepoints, '\\n' ) AS wait_info FROM performance_schema.events_transactions_history_long WHERE thread_id = in_thread_id AND event_id > v_min_event_id) UNION (SELECT thread_id, event_id, event_name, timer_wait, timer_start, nesting_event_id,  CONCAT('statement: ', sql_text, '\\n', 'errors: ', errors, '\\n', 'warnings: ', warnings, '\\n', 'lock time: ', sys.format_time(lock_time),'\\n', 'rows affected: ', rows_affected, '\\n', 'rows sent: ', rows_sent, '\\n', 'rows examined: ', rows_examined, '\\n', 'tmp tables: ', created_tmp_tables, '\\n', 'tmp disk tables: ', created_tmp_disk_tables, '\\n' 'select scan: ', select_scan, '\\n', 'select full join: ', select_full_join, '\\n', 'select full range join: ', select_full_range_join, '\\n', 'select range: ', select_range, '\\n', 'select range check: ', select_range_check, '\\n',  'sort merge passes: ', sort_merge_passes, '\\n', 'sort rows: ', sort_rows, '\\n', 'sort range: ', sort_range, '\\n', 'sort scan: ', sort_scan, '\\n', 'no index used: ', IF(no_index_used, 'TRUE', 'FALSE'), '\\n', 'no good index used: ', IF(no_good_index_used, 'TRUE', 'FALSE'), '\\n' ) AS wait_info FROM performance_schema.events_statements_history_long WHERE thread_id = in_thread_id AND event_id > v_min_event_id) UNION (SELECT thread_id, event_id, event_name, timer_wait, timer_start, nesting_event_id, null AS wait_info FROM performance_schema.events_stages_history_long  WHERE thread_id = in_thread_id AND event_id > v_min_event_id) UNION  (SELECT thread_id, event_id,  CONCAT(event_name,  IF(event_name NOT LIKE 'wait/synch/mutex%', IFNULL(CONCAT(' - ', operation), ''), ''),  IF(number_of_bytes IS NOT NULL, CONCAT(' ', number_of_bytes, ' bytes'), ''), IF(event_name LIKE 'wait/io/file%', '\\n', ''), IF(object_schema IS NOT NULL, CONCAT('\\nObject: ', object_schema, '.'), ''),  IF(object_name IS NOT NULL,  IF (event_name LIKE 'wait/io/socket%', CONCAT('\\n', IF (object_name LIKE ':0%', @@socket, object_name)), object_name), '' ), IF(index_name IS NOT NULL, CONCAT(' Index: ', index_name), ''), '\\n' ) AS event_name, timer_wait, timer_start, nesting_event_id, source AS wait_info FROM performance_schema.events_waits_history_long WHERE thread_id = in_thread_id AND event_id > v_min_event_id) ) events  ORDER BY event_id; DECLARE CONTINUE HANDLER FOR NOT FOUND SET v_done = TRUE;  SET @log_bin := @@sql_log_bin; SET sql_log_bin = 0;  SELECT INSTRUMENTED INTO v_this_thread_enabed FROM performance_schema.threads WHERE PROCESSLIST_ID = CONNECTION_ID(); CALL sys.ps_setup_disable_thread(CONNECTION_ID());  IF (in_auto_setup) THEN CALL sys.ps_setup_save(0);  DELETE FROM performance_schema.setup_actors;  UPDATE performance_schema.threads SET INSTRUMENTED = IF(THREAD_ID = in_thread_id, 'YES', 'NO');  UPDATE performance_schema.setup_consumers SET ENABLED = 'YES' WHERE NAME NOT LIKE '%\_history';  UPDATE performance_schema.setup_instruments SET ENABLED = 'YES', TIMED   = 'YES'; END IF;  IF (in_start_fresh) THEN TRUNCATE performance_schema.events_transactions_history_long; TRUNCATE performance_schema.events_statements_history_long; TRUNCATE performance_schema.events_stages_history_long; TRUNCATE performance_schema.events_waits_history_long; END IF;  DROP TEMPORARY TABLE IF EXISTS tmp_events; CREATE TEMPORARY TABLE tmp_events ( event_id bigint unsigned NOT NULL, event longblob, PRIMARY KEY (event_id) );  INSERT INTO tmp_events VALUES (0, CONCAT('digraph events { rankdir=LR; nodesep=0.10;\n', '// Stack created .....: ', NOW(), '\n', '// MySQL version .....: ', VERSION(), '\n', '// MySQL hostname ....: ', @@hostname, '\n', '// MySQL port ........: ', @@port, '\n', '// MySQL socket ......: ', @@socket, '\n', '// MySQL user ........: ', CURRENT_USER(), '\n'));  SELECT CONCAT('Data collection starting for THREAD_ID = ', in_thread_id) AS 'Info';  SET v_min_event_id = 0, v_start        = UNIX_TIMESTAMP(), in_interval    = IFNULL(in_interval, 1.00), in_max_runtime = IFNULL(in_max_runtime, 60.00);  WHILE (v_runtime < in_max_runtime AND (SELECT INSTRUMENTED FROM performance_schema.threads WHERE THREAD_ID = in_thread_id) = 'YES') DO SET v_done = FALSE; OPEN c_stack; c_stack_loop: LOOP FETCH c_stack INTO v_event, v_min_event_id; IF v_done THEN LEAVE c_stack_loop; END IF;  IF (LENGTH(v_event) > 0) THEN INSERT INTO tmp_events VALUES (v_min_event_id, v_event); END IF; END LOOP; CLOSE c_stack;  SELECT SLEEP(in_interval) INTO @sleep; SET v_runtime = (UNIX_TIMESTAMP() - v_start); END WHILE;  INSERT INTO tmp_events VALUES (v_min_event_id+1, '}');  SET @query = CONCAT('SELECT event FROM tmp_events ORDER BY event_id INTO OUTFILE ''', in_outfile, ''' FIELDS ESCAPED BY '''' LINES TERMINATED BY '''''); PREPARE stmt_output FROM @query; EXECUTE stmt_output; DEALLOCATE PREPARE stmt_output;  SELECT CONCAT('Stack trace written to ', in_outfile) AS 'Info'; SELECT CONCAT('dot -Tpdf -o /tmp/stack_', in_thread_id, '.pdf ', in_outfile) AS 'Convert to PDF'; SELECT CONCAT('dot -Tpng -o /tmp/stack_', in_thread_id, '.png ', in_outfile) AS 'Convert to PNG'; DROP TEMPORARY TABLE tmp_events;  IF (in_auto_setup) THEN CALL sys.ps_setup_reload_saved(); END IF; IF (v_this_thread_enabed = 'YES') THEN CALL sys.ps_setup_enable_thread(CONNECTION_ID()); END IF;  SET sql_log_bin = @log_bin; END
;;
delimiter ;

-- ----------------------------
-- Procedure structure for ps_truncate_all_tables
-- ----------------------------
DROP PROCEDURE IF EXISTS `ps_truncate_all_tables`;
delimiter ;;
CREATE PROCEDURE `sys`.`ps_truncate_all_tables`(IN in_verbose BOOLEAN)
  MODIFIES SQL DATA 
  DETERMINISTIC
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Truncates all summary tables within Performance Schema, \n resetting all aggregated instrumentation as a snapshot.\n \n Parameters\n \n in_verbose (BOOLEAN):\n Whether to print each TRUNCATE statement before running\n \n Example\n \n mysql> CALL sys.ps_truncate_all_tables(false);\n +---------------------+\n | summary             |\n +---------------------+\n | Truncated 44 tables |\n +---------------------+\n 1 row in set (0.10 sec)\n \n Query OK, 0 rows affected (0.10 sec)\n '
BEGIN DECLARE v_done INT DEFAULT FALSE; DECLARE v_total_tables INT DEFAULT 0; DECLARE v_ps_table VARCHAR(64); DECLARE ps_tables CURSOR FOR SELECT table_name  FROM INFORMATION_SCHEMA.TABLES  WHERE table_schema = 'performance_schema'  AND (table_name LIKE '%summary%'  OR table_name LIKE '%history%'); DECLARE CONTINUE HANDLER FOR NOT FOUND SET v_done = TRUE;  OPEN ps_tables;  ps_tables_loop: LOOP FETCH ps_tables INTO v_ps_table; IF v_done THEN LEAVE ps_tables_loop; END IF;  SET @truncate_stmt := CONCAT('TRUNCATE TABLE performance_schema.', v_ps_table); IF in_verbose THEN SELECT CONCAT('Running: ', @truncate_stmt) AS status; END IF;  PREPARE truncate_stmt FROM @truncate_stmt; EXECUTE truncate_stmt; DEALLOCATE PREPARE truncate_stmt;  SET v_total_tables = v_total_tables + 1; END LOOP;  CLOSE ps_tables;  SELECT CONCAT('Truncated ', v_total_tables, ' tables') AS summary;  END
;;
delimiter ;

-- ----------------------------
-- Function structure for quote_identifier
-- ----------------------------
DROP FUNCTION IF EXISTS `quote_identifier`;
delimiter ;;
CREATE FUNCTION `sys`.`quote_identifier`(in_identifier TEXT)
 RETURNS text CHARSET utf8
  NO SQL 
  DETERMINISTIC
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Takes an unquoted identifier (schema name, table name, etc.) and\n returns the identifier quoted with backticks.\n \n Parameters\n \n in_identifier (TEXT):\n The identifier to quote.\n \n Returns\n \n TEXT\n \n Example\n \n mysql> SELECT sys.quote_identifier(\'my_identifier\') AS Identifier;\n +-----------------+\n | Identifier      |\n +-----------------+\n | `my_identifier` |\n +-----------------+\n 1 row in set (0.00 sec)\n \n mysql> SELECT sys.quote_identifier(\'my`idenfier\') AS Identifier;\n +----------------+\n | Identifier     |\n +----------------+\n | `my``idenfier` |\n +----------------+\n 1 row in set (0.00 sec)\n '
BEGIN RETURN CONCAT('`', REPLACE(in_identifier, '`', '``'), '`'); END
;;
delimiter ;

-- ----------------------------
-- Procedure structure for statement_performance_analyzer
-- ----------------------------
DROP PROCEDURE IF EXISTS `statement_performance_analyzer`;
delimiter ;;
CREATE PROCEDURE `sys`.`statement_performance_analyzer`(IN in_action ENUM('snapshot', 'overall', 'delta', 'create_table', 'create_tmp', 'save', 'cleanup'), IN in_table VARCHAR(129), IN in_views SET ('with_runtimes_in_95th_percentile', 'analysis', 'with_errors_or_warnings', 'with_full_table_scans', 'with_sorting', 'with_temp_tables', 'custom'))
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Create a report of the statements running on the server.\n \n The views are calculated based on the overall and/or delta activity.\n \n Requires the SUPER privilege for \"SET sql_log_bin = 0;\".\n \n Parameters\n \n in_action (ENUM(\'snapshot\', \'overall\', \'delta\', \'create_tmp\', \'create_table\', \'save\', \'cleanup\')):\n The action to take. Supported actions are:\n * snapshot      Store a snapshot. The default is to make a snapshot of the current content of\n performance_schema.events_statements_summary_by_digest, but by setting in_table\n this can be overwritten to copy the content of the specified table.\n The snapshot is stored in the sys.tmp_digests temporary table.\n * overall       Generate analyzis based on the content specified by in_table. For the overall analyzis,\n in_table can be NOW() to use a fresh snapshot. This will overwrite an existing snapshot.\n Use NULL for in_table to use the existing snapshot. If in_table IS NULL and no snapshot\n exists, a new will be created.\n See also in_views and @sys.statement_performance_analyzer.limit.\n * delta         Generate a delta analysis. The delta will be calculated between the reference table in\n in_table and the snapshot. An existing snapshot must exist.\n The action uses the sys.tmp_digests_delta temporary table.\n See also in_views and @sys.statement_performance_analyzer.limit.\n * create_table  Create a regular table suitable for storing the snapshot for later use, e.g. for\n calculating deltas.\n * create_tmp    Create a temporary table suitable for storing the snapshot for later use, e.g. for\n calculating deltas.\n * save          Save the snapshot in the table specified by in_table. The table must exists and have\n the correct structure.\n If no snapshot exists, a new is created.\n * cleanup       Remove the temporary tables used for the snapshot and delta.\n \n in_table (VARCHAR(129)):\n The table argument used for some actions. Use the format \'db1.t1\' or \'t1\' without using any backticks (`)\n for quoting. Periods (.) are not supported in the database and table names.\n \n The meaning of the table for each action supporting the argument is:\n \n * snapshot      The snapshot is created based on the specified table. Set to NULL or NOW() to use\n the current content of performance_schema.events_statements_summary_by_digest.\n * overall       The table with the content to create the overall analyzis for. The following values\n can be used:\n - A table name - use the content of that table.\n - NOW()        - create a fresh snapshot and overwrite the existing snapshot.\n - NULL         - use the last stored snapshot.\n * delta         The table name is mandatory and specified the reference view to compare the currently\n stored snapshot against. If no snapshot exists, a new will be created.\n * create_table  The name of the regular table to create.\n * create_tmp    The name of the temporary table to create.\n * save          The name of the table to save the currently stored snapshot into.\n \n in_views (SET (\'with_runtimes_in_95th_percentile\', \'analysis\', \'with_errors_or_warnings\',\n \'with_full_table_scans\', \'with_sorting\', \'with_temp_tables\', \'custom\'))\n Which views to include:  * with_runtimes_in_95th_percentile  Based on the sys.statements_with_runtimes_in_95th_percentile view * analysis                          Based on the sys.statement_analysis view * with_errors_or_warnings           Based on the sys.statements_with_errors_or_warnings view * with_full_table_scans             Based on the sys.statements_with_full_table_scans view * with_sorting                      Based on the sys.statements_with_sorting view * with_temp_tables                  Based on the sys.statements_with_temp_tables view * custom                            Use a custom view. This view must be specified in @sys.statement_performance_analyzer.view to an existing view or a query  Default is to include all except \'custom\'.   Configuration Options  sys.statement_performance_analyzer.limit The maximum number of rows to include for the views that does not have a built-in limit (e.g. the 95th percentile view). If not set the limit is 100.  sys.statement_performance_analyzer.view Used together with the \'custom\' view. If the value contains a space, it is considered a query, otherwise it must be an existing view querying the performance_schema.events_statements_summary_by_digest table. There cannot be any limit clause including in the query or view definition if @sys.statement_performance_analyzer.limit > 0. If specifying a view, use the same format as for in_table.  sys.debug Whether to provide debugging output. Default is \'OFF\'. Set to \'ON\' to include.   Example  To create a report with the queries in the 95th percentile since last truncate of performance_schema.events_statements_summary_by_digest and the delta for a 1 minute period:  1. Create a temporary table to store the initial snapshot. 2. Create the initial snapshot. 3. Save the initial snapshot in the temporary table. 4. Wait one minute. 5. Create a new snapshot. 6. Perform analyzis based on the new snapshot. 7. Perform analyzis based on the delta between the initial and new snapshots.  mysql> CALL sys.statement_performance_analyzer(\'create_tmp\', \'mydb.tmp_digests_ini\', NULL); Query OK, 0 rows affected (0.08 sec)  mysql> CALL sys.statement_performance_analyzer(\'snapshot\', NULL, NULL); Query OK, 0 rows affected (0.02 sec)  mysql> CALL sys.statement_performance_analyzer(\'save\', \'mydb.tmp_digests_ini\', NULL); Query OK, 0 rows affected (0.00 sec)  mysql> DO SLEEP(60); Query OK, 0 rows affected (1 min 0.00 sec)  mysql> CALL sys.statement_performance_analyzer(\'snapshot\', NULL, NULL); Query OK, 0 rows affected (0.02 sec)  mysql> CALL sys.statement_performance_analyzer(\'overall\', NULL, \'with_runtimes_in_95th_percentile\'); +-----------------------------------------+ | Next Output                             | +-----------------------------------------+ | Queries with Runtime in 95th Percentile | +-----------------------------------------+ 1 row in set (0.05 sec)  ...  mysql> CALL sys.statement_performance_analyzer(\'delta\', \'mydb.tmp_digests_ini\', \'with_runtimes_in_95th_percentile\'); +-----------------------------------------+ | Next Output                             | +-----------------------------------------+ | Queries with Runtime in 95th Percentile | +-----------------------------------------+ 1 row in set (0.03 sec)  ...   To create an overall report of the 95th percentile queries and the top 10 queries with full table scans:  mysql> CALL sys.statement_performance_analyzer(\'snapshot\', NULL, NULL); Query OK, 0 rows affected (0.01 sec)                                     mysql> SET @sys.statement_performance_analyzer.limit = 10; Query OK, 0 rows affected (0.00 sec)            mysql> CALL sys.statement_performance_analyzer(\'overall\', NULL, \'with_runtimes_in_95th_percentile,with_full_table_scans\'); +-----------------------------------------+ | Next Output                             | +-----------------------------------------+ | Queries with Runtime in 95th Percentile | +-----------------------------------------+ 1 row in set (0.01 sec)  ...  +-------------------------------------+ | Next Output                         | +-------------------------------------+ | Top 10 Queries with Full Table Scan | +-------------------------------------+ 1 row in set (0.09 sec)  ...   Use a custom view showing the top 10 query sorted by total execution time refreshing the view every minute using the watch command in Linux.  mysql> CREATE OR REPLACE VIEW mydb.my_statements AS -> SELECT sys.format_statement(DIGEST_TEXT) AS query, ->        SCHEMA_NAME AS db, ->        COUNT_STAR AS exec_count, ->        sys.format_time(SUM_TIMER_WAIT) AS total_latency, ->        sys.format_time(AVG_TIMER_WAIT) AS avg_latency, ->        ROUND(IFNULL(SUM_ROWS_SENT / NULLIF(COUNT_STAR, 0), 0)) AS rows_sent_avg, ->        ROUND(IFNULL(SUM_ROWS_EXAMINED / NULLIF(COUNT_STAR, 0), 0)) AS rows_examined_avg, ->        ROUND(IFNULL(SUM_ROWS_AFFECTED / NULLIF(COUNT_STAR, 0), 0)) AS rows_affected_avg, ->        DIGEST AS digest ->   FROM performance_schema.events_statements_summary_by_digest -> ORDER BY SUM_TIMER_WAIT DESC; Query OK, 0 rows affected (0.01 sec)  mysql> CALL sys.statement_performance_analyzer(\'create_table\', \'mydb.digests_prev\', NULL); Query OK, 0 rows affected (0.10 sec)  shell$ watch -n 60 \"mysql sys --table -e \" > SET @sys.statement_performance_analyzer.view = \'mydb.my_statements\'; > SET @sys.statement_performance_analyzer.limit = 10; > CALL statement_performance_analyzer(\'snapshot\', NULL, NULL); > CALL statement_performance_analyzer(\'delta\', \'mydb.digests_prev\', \'custom\'); > CALL statement_performance_analyzer(\'save\', \'mydb.digests_prev\', NULL); > \"\"  Every 60.0s: mysql sys --table -e \"                                                                                                   ...  Mon Dec 22 10:58:51 2014  +----------------------------------+ | Next Output                      | +----------------------------------+ | Top 10 Queries Using Custom View | +----------------------------------+ +-------------------+-------+------------+---------------+-------------+---------------+-------------------+-------------------+----------------------------------+ | query             | db    | exec_count | total_latency | avg_latency | rows_sent_avg | rows_examined_avg | rows_affected_avg | digest                           | +-------------------+-------+------------+---------------+-------------+---------------+-------------------+-------------------+----------------------------------+ ... '
BEGIN DECLARE v_table_exists, v_tmp_digests_table_exists, v_custom_view_exists ENUM('', 'BASE TABLE', 'VIEW', 'TEMPORARY') DEFAULT ''; DECLARE v_this_thread_enabled ENUM('YES', 'NO'); DECLARE v_force_new_snapshot BOOLEAN DEFAULT FALSE; DECLARE v_digests_table VARCHAR(133); DECLARE v_quoted_table, v_quoted_custom_view VARCHAR(133) DEFAULT ''; DECLARE v_table_db, v_table_name, v_custom_db, v_custom_name VARCHAR(64); DECLARE v_digest_table_template, v_checksum_ref, v_checksum_table text; DECLARE v_sql longtext; DECLARE v_error_msg VARCHAR(128);   SELECT INSTRUMENTED INTO v_this_thread_enabled FROM performance_schema.threads WHERE PROCESSLIST_ID = CONNECTION_ID(); IF (v_this_thread_enabled = 'YES') THEN CALL sys.ps_setup_disable_thread(CONNECTION_ID()); END IF;  SET @log_bin := @@sql_log_bin; IF (@log_bin = 1) THEN SET sql_log_bin = 0; END IF;   IF (@sys.statement_performance_analyzer.limit IS NULL) THEN SET @sys.statement_performance_analyzer.limit = sys.sys_get_config('statement_performance_analyzer.limit', '100'); END IF; IF (@sys.debug IS NULL) THEN SET @sys.debug                                = sys.sys_get_config('debug'                               , 'OFF'); END IF;   IF (in_table = 'NOW()') THEN SET v_force_new_snapshot = TRUE, in_table             = NULL; ELSEIF (in_table IS NOT NULL) THEN IF (NOT INSTR(in_table, '.')) THEN SET v_table_db   = DATABASE(), v_table_name = in_table; ELSE SET v_table_db   = SUBSTRING_INDEX(in_table, '.', 1); SET v_table_name = SUBSTRING(in_table, CHAR_LENGTH(v_table_db)+2); END IF;  SET v_quoted_table = CONCAT('`', v_table_db, '`.`', v_table_name, '`');  IF (@sys.debug = 'ON') THEN SELECT CONCAT('in_table is: db = ''', v_table_db, ''', table = ''', v_table_name, '''') AS 'Debug'; END IF;  IF (v_table_db = DATABASE() AND (v_table_name = 'tmp_digests' OR v_table_name = 'tmp_digests_delta')) THEN SET v_error_msg = CONCAT('Invalid value for in_table: ', v_quoted_table, ' is reserved table name.'); SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = v_error_msg; END IF;  CALL sys.table_exists(v_table_db, v_table_name, v_table_exists); IF (@sys.debug = 'ON') THEN SELECT CONCAT('v_table_exists = ', v_table_exists) AS 'Debug'; END IF;  IF (v_table_exists = 'BASE TABLE') THEN SET v_checksum_ref = ( SELECT GROUP_CONCAT(CONCAT(COLUMN_NAME, COLUMN_TYPE) ORDER BY ORDINAL_POSITION) AS Checksum FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = 'performance_schema' AND TABLE_NAME = 'events_statements_summary_by_digest' ), v_checksum_table = ( SELECT GROUP_CONCAT(CONCAT(COLUMN_NAME, COLUMN_TYPE) ORDER BY ORDINAL_POSITION) AS Checksum FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = v_table_db AND TABLE_NAME = v_table_name );  IF (v_checksum_ref <> v_checksum_table) THEN SET v_error_msg = CONCAT('The table ', IF(CHAR_LENGTH(v_quoted_table) > 93, CONCAT('...', SUBSTRING(v_quoted_table, -90)), v_quoted_table), ' has the wrong definition.'); SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = v_error_msg; END IF; END IF; END IF;   IF (in_views IS NULL OR in_views = '') THEN SET in_views = 'with_runtimes_in_95th_percentile,analysis,with_errors_or_warnings,with_full_table_scans,with_sorting,with_temp_tables'; END IF;   CALL sys.table_exists(DATABASE(), 'tmp_digests', v_tmp_digests_table_exists); IF (@sys.debug = 'ON') THEN SELECT CONCAT('v_tmp_digests_table_exists = ', v_tmp_digests_table_exists) AS 'Debug'; END IF;  CASE WHEN in_action IN ('snapshot', 'overall') THEN IF (in_table IS NOT NULL) THEN IF (NOT v_table_exists IN ('TEMPORARY', 'BASE TABLE')) THEN SET v_error_msg = CONCAT('The ', in_action, ' action requires in_table to be NULL, NOW() or specify an existing table.', ' The table ', IF(CHAR_LENGTH(v_quoted_table) > 16, CONCAT('...', SUBSTRING(v_quoted_table, -13)), v_quoted_table), ' does not exist.'); SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = v_error_msg; END IF; END IF;  WHEN in_action IN ('delta', 'save') THEN IF (v_table_exists NOT IN ('TEMPORARY', 'BASE TABLE')) THEN SET v_error_msg = CONCAT('The ', in_action, ' action requires in_table to be an existing table.', IF(in_table IS NOT NULL, CONCAT(' The table ', IF(CHAR_LENGTH(v_quoted_table) > 39, CONCAT('...', SUBSTRING(v_quoted_table, -36)), v_quoted_table), ' does not exist.'), '')); SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = v_error_msg; END IF;  IF (in_action = 'delta' AND v_tmp_digests_table_exists <> 'TEMPORARY') THEN SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'An existing snapshot generated with the statement_performance_analyzer() must exist.'; END IF; WHEN in_action = 'create_tmp' THEN IF (v_table_exists = 'TEMPORARY') THEN SET v_error_msg = CONCAT('Cannot create the table ', IF(CHAR_LENGTH(v_quoted_table) > 72, CONCAT('...', SUBSTRING(v_quoted_table, -69)), v_quoted_table), ' as it already exists.'); SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = v_error_msg; END IF;  WHEN in_action = 'create_table' THEN IF (v_table_exists <> '') THEN SET v_error_msg = CONCAT('Cannot create the table ', IF(CHAR_LENGTH(v_quoted_table) > 52, CONCAT('...', SUBSTRING(v_quoted_table, -49)), v_quoted_table), ' as it already exists', IF(v_table_exists = 'TEMPORARY', ' as a temporary table.', '.')); SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = v_error_msg; END IF;  WHEN in_action = 'cleanup' THEN DO (SELECT 1); ELSE SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'Unknown action. Supported actions are: cleanup, create_table, create_tmp, delta, overall, save, snapshot'; END CASE;  SET v_digest_table_template = 'CREATE %{TEMPORARY}TABLE %{TABLE_NAME} ( `SCHEMA_NAME` varchar(64) DEFAULT NULL, `DIGEST` varchar(32) DEFAULT NULL, `DIGEST_TEXT` longtext, `COUNT_STAR` bigint(20) unsigned NOT NULL, `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL, `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL, `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL, `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL, `SUM_LOCK_TIME` bigint(20) unsigned NOT NULL, `SUM_ERRORS` bigint(20) unsigned NOT NULL, `SUM_WARNINGS` bigint(20) unsigned NOT NULL, `SUM_ROWS_AFFECTED` bigint(20) unsigned NOT NULL, `SUM_ROWS_SENT` bigint(20) unsigned NOT NULL, `SUM_ROWS_EXAMINED` bigint(20) unsigned NOT NULL, `SUM_CREATED_TMP_DISK_TABLES` bigint(20) unsigned NOT NULL, `SUM_CREATED_TMP_TABLES` bigint(20) unsigned NOT NULL, `SUM_SELECT_FULL_JOIN` bigint(20) unsigned NOT NULL, `SUM_SELECT_FULL_RANGE_JOIN` bigint(20) unsigned NOT NULL, `SUM_SELECT_RANGE` bigint(20) unsigned NOT NULL, `SUM_SELECT_RANGE_CHECK` bigint(20) unsigned NOT NULL, `SUM_SELECT_SCAN` bigint(20) unsigned NOT NULL, `SUM_SORT_MERGE_PASSES` bigint(20) unsigned NOT NULL, `SUM_SORT_RANGE` bigint(20) unsigned NOT NULL, `SUM_SORT_ROWS` bigint(20) unsigned NOT NULL, `SUM_SORT_SCAN` bigint(20) unsigned NOT NULL, `SUM_NO_INDEX_USED` bigint(20) unsigned NOT NULL, `SUM_NO_GOOD_INDEX_USED` bigint(20) unsigned NOT NULL, `FIRST_SEEN` timestamp NULL DEFAULT NULL, `LAST_SEEN` timestamp NULL DEFAULT NULL, INDEX (SCHEMA_NAME, DIGEST) ) DEFAULT CHARSET=utf8';  IF (v_force_new_snapshot OR in_action = 'snapshot' OR (in_action = 'overall' AND in_table IS NULL) OR (in_action = 'save' AND v_tmp_digests_table_exists <> 'TEMPORARY') ) THEN IF (v_tmp_digests_table_exists = 'TEMPORARY') THEN IF (@sys.debug = 'ON') THEN SELECT 'DROP TEMPORARY TABLE IF EXISTS tmp_digests' AS 'Debug'; END IF; DROP TEMPORARY TABLE IF EXISTS tmp_digests; END IF; CALL sys.execute_prepared_stmt(REPLACE(REPLACE(v_digest_table_template, '%{TEMPORARY}', 'TEMPORARY '), '%{TABLE_NAME}', 'tmp_digests'));  SET v_sql = CONCAT('INSERT INTO tmp_digests SELECT * FROM ', IF(in_table IS NULL OR in_action = 'save', 'performance_schema.events_statements_summary_by_digest', v_quoted_table)); CALL sys.execute_prepared_stmt(v_sql); END IF;  IF (in_action IN ('create_table', 'create_tmp')) THEN IF (in_action = 'create_table') THEN CALL sys.execute_prepared_stmt(REPLACE(REPLACE(v_digest_table_template, '%{TEMPORARY}', ''), '%{TABLE_NAME}', v_quoted_table)); ELSE CALL sys.execute_prepared_stmt(REPLACE(REPLACE(v_digest_table_template, '%{TEMPORARY}', 'TEMPORARY '), '%{TABLE_NAME}', v_quoted_table)); END IF; ELSEIF (in_action = 'save') THEN CALL sys.execute_prepared_stmt(CONCAT('DELETE FROM ', v_quoted_table)); CALL sys.execute_prepared_stmt(CONCAT('INSERT INTO ', v_quoted_table, ' SELECT * FROM tmp_digests')); ELSEIF (in_action = 'cleanup') THEN DROP TEMPORARY TABLE IF EXISTS sys.tmp_digests; DROP TEMPORARY TABLE IF EXISTS sys.tmp_digests_delta; ELSEIF (in_action IN ('overall', 'delta')) THEN IF (in_action = 'overall') THEN IF (in_table IS NULL) THEN SET v_digests_table = 'tmp_digests'; ELSE SET v_digests_table = v_quoted_table; END IF; ELSE SET v_digests_table = 'tmp_digests_delta'; DROP TEMPORARY TABLE IF EXISTS tmp_digests_delta; CREATE TEMPORARY TABLE tmp_digests_delta LIKE tmp_digests; SET v_sql = CONCAT('INSERT INTO tmp_digests_delta SELECT `d_end`.`SCHEMA_NAME`, `d_end`.`DIGEST`, `d_end`.`DIGEST_TEXT`, `d_end`.`COUNT_STAR`-IFNULL(`d_start`.`COUNT_STAR`, 0) AS ''COUNT_STAR'', `d_end`.`SUM_TIMER_WAIT`-IFNULL(`d_start`.`SUM_TIMER_WAIT`, 0) AS ''SUM_TIMER_WAIT'', `d_end`.`MIN_TIMER_WAIT` AS ''MIN_TIMER_WAIT'', IFNULL((`d_end`.`SUM_TIMER_WAIT`-IFNULL(`d_start`.`SUM_TIMER_WAIT`, 0))/NULLIF(`d_end`.`COUNT_STAR`-IFNULL(`d_start`.`COUNT_STAR`, 0), 0), 0) AS ''AVG_TIMER_WAIT'', `d_end`.`MAX_TIMER_WAIT` AS ''MAX_TIMER_WAIT'', `d_end`.`SUM_LOCK_TIME`-IFNULL(`d_start`.`SUM_LOCK_TIME`, 0) AS ''SUM_LOCK_TIME'', `d_end`.`SUM_ERRORS`-IFNULL(`d_start`.`SUM_ERRORS`, 0) AS ''SUM_ERRORS'', `d_end`.`SUM_WARNINGS`-IFNULL(`d_start`.`SUM_WARNINGS`, 0) AS ''SUM_WARNINGS'', `d_end`.`SUM_ROWS_AFFECTED`-IFNULL(`d_start`.`SUM_ROWS_AFFECTED`, 0) AS ''SUM_ROWS_AFFECTED'', `d_end`.`SUM_ROWS_SENT`-IFNULL(`d_start`.`SUM_ROWS_SENT`, 0) AS ''SUM_ROWS_SENT'', `d_end`.`SUM_ROWS_EXAMINED`-IFNULL(`d_start`.`SUM_ROWS_EXAMINED`, 0) AS ''SUM_ROWS_EXAMINED'', `d_end`.`SUM_CREATED_TMP_DISK_TABLES`-IFNULL(`d_start`.`SUM_CREATED_TMP_DISK_TABLES`, 0) AS ''SUM_CREATED_TMP_DISK_TABLES'', `d_end`.`SUM_CREATED_TMP_TABLES`-IFNULL(`d_start`.`SUM_CREATED_TMP_TABLES`, 0) AS ''SUM_CREATED_TMP_TABLES'', `d_end`.`SUM_SELECT_FULL_JOIN`-IFNULL(`d_start`.`SUM_SELECT_FULL_JOIN`, 0) AS ''SUM_SELECT_FULL_JOIN'', `d_end`.`SUM_SELECT_FULL_RANGE_JOIN`-IFNULL(`d_start`.`SUM_SELECT_FULL_RANGE_JOIN`, 0) AS ''SUM_SELECT_FULL_RANGE_JOIN'', `d_end`.`SUM_SELECT_RANGE`-IFNULL(`d_start`.`SUM_SELECT_RANGE`, 0) AS ''SUM_SELECT_RANGE'', `d_end`.`SUM_SELECT_RANGE_CHECK`-IFNULL(`d_start`.`SUM_SELECT_RANGE_CHECK`, 0) AS ''SUM_SELECT_RANGE_CHECK'', `d_end`.`SUM_SELECT_SCAN`-IFNULL(`d_start`.`SUM_SELECT_SCAN`, 0) AS ''SUM_SELECT_SCAN'', `d_end`.`SUM_SORT_MERGE_PASSES`-IFNULL(`d_start`.`SUM_SORT_MERGE_PASSES`, 0) AS ''SUM_SORT_MERGE_PASSES'', `d_end`.`SUM_SORT_RANGE`-IFNULL(`d_start`.`SUM_SORT_RANGE`, 0) AS ''SUM_SORT_RANGE'', `d_end`.`SUM_SORT_ROWS`-IFNULL(`d_start`.`SUM_SORT_ROWS`, 0) AS ''SUM_SORT_ROWS'', `d_end`.`SUM_SORT_SCAN`-IFNULL(`d_start`.`SUM_SORT_SCAN`, 0) AS ''SUM_SORT_SCAN'', `d_end`.`SUM_NO_INDEX_USED`-IFNULL(`d_start`.`SUM_NO_INDEX_USED`, 0) AS ''SUM_NO_INDEX_USED'', `d_end`.`SUM_NO_GOOD_INDEX_USED`-IFNULL(`d_start`.`SUM_NO_GOOD_INDEX_USED`, 0) AS ''SUM_NO_GOOD_INDEX_USED'', `d_end`.`FIRST_SEEN`, `d_end`.`LAST_SEEN` FROM tmp_digests d_end LEFT OUTER JOIN ', v_quoted_table, ' d_start ON `d_start`.`DIGEST` = `d_end`.`DIGEST` AND (`d_start`.`SCHEMA_NAME` = `d_end`.`SCHEMA_NAME` OR (`d_start`.`SCHEMA_NAME` IS NULL AND `d_end`.`SCHEMA_NAME` IS NULL) ) WHERE `d_end`.`COUNT_STAR`-IFNULL(`d_start`.`COUNT_STAR`, 0) > 0'); CALL sys.execute_prepared_stmt(v_sql); END IF;  IF (FIND_IN_SET('with_runtimes_in_95th_percentile', in_views)) THEN SELECT 'Queries with Runtime in 95th Percentile' AS 'Next Output';  DROP TEMPORARY TABLE IF EXISTS tmp_digest_avg_latency_distribution1; DROP TEMPORARY TABLE IF EXISTS tmp_digest_avg_latency_distribution2; DROP TEMPORARY TABLE IF EXISTS tmp_digest_95th_percentile_by_avg_us;  CREATE TEMPORARY TABLE tmp_digest_avg_latency_distribution1 ( cnt bigint unsigned NOT NULL, avg_us decimal(21,0) NOT NULL, PRIMARY KEY (avg_us) ) ENGINE=InnoDB;  SET v_sql = CONCAT('INSERT INTO tmp_digest_avg_latency_distribution1 SELECT COUNT(*) cnt,  ROUND(avg_timer_wait/1000000) AS avg_us FROM ', v_digests_table, ' GROUP BY avg_us'); CALL sys.execute_prepared_stmt(v_sql);  CREATE TEMPORARY TABLE tmp_digest_avg_latency_distribution2 LIKE tmp_digest_avg_latency_distribution1; INSERT INTO tmp_digest_avg_latency_distribution2 SELECT * FROM tmp_digest_avg_latency_distribution1;  CREATE TEMPORARY TABLE tmp_digest_95th_percentile_by_avg_us ( avg_us decimal(21,0) NOT NULL, percentile decimal(46,4) NOT NULL, PRIMARY KEY (avg_us) ) ENGINE=InnoDB;  SET v_sql = CONCAT('INSERT INTO tmp_digest_95th_percentile_by_avg_us SELECT s2.avg_us avg_us, IFNULL(SUM(s1.cnt)/NULLIF((SELECT COUNT(*) FROM ', v_digests_table, '), 0), 0) percentile FROM tmp_digest_avg_latency_distribution1 AS s1 JOIN tmp_digest_avg_latency_distribution2 AS s2 ON s1.avg_us <= s2.avg_us GROUP BY s2.avg_us HAVING percentile > 0.95 ORDER BY percentile LIMIT 1'); CALL sys.execute_prepared_stmt(v_sql);  SET v_sql = REPLACE( REPLACE( (SELECT VIEW_DEFINITION FROM information_schema.VIEWS WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'statements_with_runtimes_in_95th_percentile' ), '`performance_schema`.`events_statements_summary_by_digest`', v_digests_table ), 'sys.x$ps_digest_95th_percentile_by_avg_us', '`sys`.`x$ps_digest_95th_percentile_by_avg_us`' ); CALL sys.execute_prepared_stmt(v_sql);  DROP TEMPORARY TABLE tmp_digest_avg_latency_distribution1; DROP TEMPORARY TABLE tmp_digest_avg_latency_distribution2; DROP TEMPORARY TABLE tmp_digest_95th_percentile_by_avg_us; END IF;  IF (FIND_IN_SET('analysis', in_views)) THEN SELECT CONCAT('Top ', @sys.statement_performance_analyzer.limit, ' Queries Ordered by Total Latency') AS 'Next Output'; SET v_sql = REPLACE( (SELECT VIEW_DEFINITION FROM information_schema.VIEWS WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'statement_analysis' ), '`performance_schema`.`events_statements_summary_by_digest`', v_digests_table ); IF (@sys.statement_performance_analyzer.limit > 0) THEN SET v_sql = CONCAT(v_sql, ' LIMIT ', @sys.statement_performance_analyzer.limit); END IF; CALL sys.execute_prepared_stmt(v_sql); END IF;  IF (FIND_IN_SET('with_errors_or_warnings', in_views)) THEN SELECT CONCAT('Top ', @sys.statement_performance_analyzer.limit, ' Queries with Errors') AS 'Next Output'; SET v_sql = REPLACE( (SELECT VIEW_DEFINITION FROM information_schema.VIEWS WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'statements_with_errors_or_warnings' ), '`performance_schema`.`events_statements_summary_by_digest`', v_digests_table ); IF (@sys.statement_performance_analyzer.limit > 0) THEN SET v_sql = CONCAT(v_sql, ' LIMIT ', @sys.statement_performance_analyzer.limit); END IF; CALL sys.execute_prepared_stmt(v_sql); END IF;  IF (FIND_IN_SET('with_full_table_scans', in_views)) THEN SELECT CONCAT('Top ', @sys.statement_performance_analyzer.limit, ' Queries with Full Table Scan') AS 'Next Output'; SET v_sql = REPLACE( (SELECT VIEW_DEFINITION FROM information_schema.VIEWS WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'statements_with_full_table_scans' ), '`performance_schema`.`events_statements_summary_by_digest`', v_digests_table ); IF (@sys.statement_performance_analyzer.limit > 0) THEN SET v_sql = CONCAT(v_sql, ' LIMIT ', @sys.statement_performance_analyzer.limit); END IF; CALL sys.execute_prepared_stmt(v_sql); END IF;  IF (FIND_IN_SET('with_sorting', in_views)) THEN SELECT CONCAT('Top ', @sys.statement_performance_analyzer.limit, ' Queries with Sorting') AS 'Next Output'; SET v_sql = REPLACE( (SELECT VIEW_DEFINITION FROM information_schema.VIEWS WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'statements_with_sorting' ), '`performance_schema`.`events_statements_summary_by_digest`', v_digests_table ); IF (@sys.statement_performance_analyzer.limit > 0) THEN SET v_sql = CONCAT(v_sql, ' LIMIT ', @sys.statement_performance_analyzer.limit); END IF; CALL sys.execute_prepared_stmt(v_sql); END IF;  IF (FIND_IN_SET('with_temp_tables', in_views)) THEN SELECT CONCAT('Top ', @sys.statement_performance_analyzer.limit, ' Queries with Internal Temporary Tables') AS 'Next Output'; SET v_sql = REPLACE( (SELECT VIEW_DEFINITION FROM information_schema.VIEWS WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'statements_with_temp_tables' ), '`performance_schema`.`events_statements_summary_by_digest`', v_digests_table ); IF (@sys.statement_performance_analyzer.limit > 0) THEN SET v_sql = CONCAT(v_sql, ' LIMIT ', @sys.statement_performance_analyzer.limit); END IF; CALL sys.execute_prepared_stmt(v_sql); END IF;  IF (FIND_IN_SET('custom', in_views)) THEN SELECT CONCAT('Top ', @sys.statement_performance_analyzer.limit, ' Queries Using Custom View') AS 'Next Output';  IF (@sys.statement_performance_analyzer.view IS NULL) THEN SET @sys.statement_performance_analyzer.view = sys.sys_get_config('statement_performance_analyzer.view', NULL); END IF; IF (@sys.statement_performance_analyzer.view IS NULL) THEN SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The @sys.statement_performance_analyzer.view user variable must be set with the view or query to use.'; END IF;  IF (NOT INSTR(@sys.statement_performance_analyzer.view, ' ')) THEN IF (NOT INSTR(@sys.statement_performance_analyzer.view, '.')) THEN SET v_custom_db   = DATABASE(), v_custom_name = @sys.statement_performance_analyzer.view; ELSE SET v_custom_db   = SUBSTRING_INDEX(@sys.statement_performance_analyzer.view, '.', 1); SET v_custom_name = SUBSTRING(@sys.statement_performance_analyzer.view, CHAR_LENGTH(v_custom_db)+2); END IF;  CALL sys.table_exists(v_custom_db, v_custom_name, v_custom_view_exists); IF (v_custom_view_exists <> 'VIEW') THEN SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The @sys.statement_performance_analyzer.view user variable is set but specified neither an existing view nor a query.'; END IF;  SET v_sql = REPLACE( (SELECT VIEW_DEFINITION FROM information_schema.VIEWS WHERE TABLE_SCHEMA = v_custom_db AND TABLE_NAME = v_custom_name ), '`performance_schema`.`events_statements_summary_by_digest`', v_digests_table ); ELSE SET v_sql = REPLACE(@sys.statement_performance_analyzer.view, '`performance_schema`.`events_statements_summary_by_digest`', v_digests_table); END IF;  IF (@sys.statement_performance_analyzer.limit > 0) THEN SET v_sql = CONCAT(v_sql, ' LIMIT ', @sys.statement_performance_analyzer.limit); END IF;  CALL sys.execute_prepared_stmt(v_sql); END IF; END IF;  IF (v_this_thread_enabled = 'YES') THEN CALL sys.ps_setup_enable_thread(CONNECTION_ID()); END IF;  IF (@log_bin = 1) THEN SET sql_log_bin = @log_bin; END IF; END
;;
delimiter ;

-- ----------------------------
-- Function structure for sys_get_config
-- ----------------------------
DROP FUNCTION IF EXISTS `sys_get_config`;
delimiter ;;
CREATE FUNCTION `sys`.`sys_get_config`(in_variable_name VARCHAR(128), in_default_value VARCHAR(128))
 RETURNS varchar(128) CHARSET utf8
  READS SQL DATA 
  DETERMINISTIC
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Returns the value for the requested variable using the following logic:\n \n 1. If the option exists in sys.sys_config return the value from there.\n 2. Else fall back on the provided default value.\n \n Notes for using sys_get_config():\n \n * If the default value argument to sys_get_config() is NULL and case 2. is reached, NULL is returned.\n It is then expected that the caller is able to handle NULL for the given configuration option.\n * The convention is to name the user variables @sys.<name of variable>. It is <name of variable> that\n is stored in the sys_config table and is what is expected as the argument to sys_get_config().\n * If you want to check whether the configuration option has already been set and if not assign with\n the return value of sys_get_config() you can use IFNULL(...) (see example below). However this should\n not be done inside a loop (e.g. for each row in a result set) as for repeated calls where assignment\n is only needed in the first iteration using IFNULL(...) is expected to be significantly slower than\n using an IF (...) THEN ... END IF; block (see example below).\n \n Parameters\n \n in_variable_name (VARCHAR(128)):\n The name of the config option to return the value for.\n \n in_default_value (VARCHAR(128)):\n The default value to return if the variable does not exist in sys.sys_config.\n \n Returns\n \n VARCHAR(128)\n \n Example\n \n mysql> SELECT sys.sys_get_config(\'statement_truncate_len\', 128) AS Value;\n +-------+\n | Value |\n +-------+\n | 64    |\n +-------+\n 1 row in set (0.00 sec)\n \n mysql> SET @sys.statement_truncate_len = IFNULL(@sys.statement_truncate_len, sys.sys_get_config(\'statement_truncate_len\', 64));\n Query OK, 0 rows affected (0.00 sec)\n \n IF (@sys.statement_truncate_len IS NULL) THEN\n SET @sys.statement_truncate_len = sys.sys_get_config(\'statement_truncate_len\', 64);\n END IF;\n '
BEGIN DECLARE v_value VARCHAR(128) DEFAULT NULL;  SET v_value = (SELECT value FROM sys.sys_config WHERE variable = in_variable_name);  IF (v_value IS NULL) THEN SET v_value = in_default_value; END IF;  RETURN v_value; END
;;
delimiter ;

-- ----------------------------
-- Procedure structure for table_exists
-- ----------------------------
DROP PROCEDURE IF EXISTS `table_exists`;
delimiter ;;
CREATE PROCEDURE `sys`.`table_exists`(IN in_db VARCHAR(64), IN in_table VARCHAR(64), OUT out_exists ENUM('', 'BASE TABLE', 'VIEW', 'TEMPORARY'))
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Tests whether the table specified in in_db and in_table exists either as a regular\n table, or as a temporary table. The returned value corresponds to the table that\n will be used, so if there\'s both a temporary and a permanent table with the given\n name, then \'TEMPORARY\' will be returned.\n \n Parameters\n \n in_db (VARCHAR(64)):\n The database name to check for the existance of the table in.\n \n in_table (VARCHAR(64)):\n The name of the table to check the existance of.\n \n out_exists ENUM(\'\', \'BASE TABLE\', \'VIEW\', \'TEMPORARY\'):\n The return value: whether the table exists. The value is one of:\n * \'\'           - the table does not exist neither as a base table, view, nor temporary table.\n * \'BASE TABLE\' - the table name exists as a permanent base table table.\n * \'VIEW\'       - the table name exists as a view.\n * \'TEMPORARY\'  - the table name exists as a temporary table.\n \n Example\n \n mysql> CREATE DATABASE db1;\n Query OK, 1 row affected (0.07 sec)\n \n mysql> use db1;\n Database changed\n mysql> CREATE TABLE t1 (id INT PRIMARY KEY);\n Query OK, 0 rows affected (0.08 sec)\n \n mysql> CREATE TABLE t2 (id INT PRIMARY KEY);\n Query OK, 0 rows affected (0.08 sec)\n \n mysql> CREATE view v_t1 AS SELECT * FROM t1;\n Query OK, 0 rows affected (0.00 sec)\n \n mysql> CREATE TEMPORARY TABLE t1 (id INT PRIMARY KEY);\n Query OK, 0 rows affected (0.00 sec)\n \n mysql> CALL sys.table_exists(\'db1\', \'t1\', @exists); SELECT @exists;\n Query OK, 0 rows affected (0.00 sec)\n \n +------------+\n | @exists    |\n +------------+\n | TEMPORARY  |\n +------------+\n 1 row in set (0.00 sec)\n \n mysql> CALL sys.table_exists(\'db1\', \'t2\', @exists); SELECT @exists;\n Query OK, 0 rows affected (0.00 sec)\n \n +------------+\n | @exists    |\n +------------+\n | BASE TABLE |\n +------------+\n 1 row in set (0.01 sec)\n \n mysql> CALL sys.table_exists(\'db1\', \'v_t1\', @exists); SELECT @exists;\n Query OK, 0 rows affected (0.00 sec)\n \n +---------+\n | @exists |\n +---------+\n | VIEW    |\n +---------+\n 1 row in set (0.00 sec)\n \n mysql> CALL sys.table_exists(\'db1\', \'t3\', @exists); SELECT @exists;\n Query OK, 0 rows affected (0.01 sec)\n \n +---------+\n | @exists |\n +---------+\n |         |\n +---------+\n 1 row in set (0.00 sec)\n '
BEGIN DECLARE v_error BOOLEAN DEFAULT FALSE; DECLARE CONTINUE HANDLER FOR 1050 SET v_error = TRUE; DECLARE CONTINUE HANDLER FOR 1146 SET v_error = TRUE;  SET out_exists = '';  IF (EXISTS(SELECT 1 FROM information_schema.TABLES WHERE TABLE_SCHEMA = in_db AND TABLE_NAME = in_table)) THEN SET @sys.tmp.table_exists.SQL = CONCAT('CREATE TEMPORARY TABLE `', in_db, '`.`', in_table, '` (id INT PRIMARY KEY)'); PREPARE stmt_create_table FROM @sys.tmp.table_exists.SQL; EXECUTE stmt_create_table; DEALLOCATE PREPARE stmt_create_table; IF (v_error) THEN SET out_exists = 'TEMPORARY'; ELSE SET @sys.tmp.table_exists.SQL = CONCAT('DROP TEMPORARY TABLE `', in_db, '`.`', in_table, '`'); PREPARE stmt_drop_table FROM @sys.tmp.table_exists.SQL; EXECUTE stmt_drop_table; DEALLOCATE PREPARE stmt_drop_table; SET out_exists = (SELECT TABLE_TYPE FROM information_schema.TABLES WHERE TABLE_SCHEMA = in_db AND TABLE_NAME = in_table); END IF; ELSE SET @sys.tmp.table_exists.SQL = CONCAT('SELECT COUNT(*) FROM `', in_db, '`.`', in_table, '`'); PREPARE stmt_select FROM @sys.tmp.table_exists.SQL; IF (NOT v_error) THEN DEALLOCATE PREPARE stmt_select; SET out_exists = 'TEMPORARY'; END IF; END IF; END
;;
delimiter ;

-- ----------------------------
-- Function structure for version_major
-- ----------------------------
DROP FUNCTION IF EXISTS `version_major`;
delimiter ;;
CREATE FUNCTION `sys`.`version_major`()
 RETURNS tinyint(3) unsigned
  NO SQL 
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Returns the major version of MySQL Server.\n \n Returns\n \n TINYINT UNSIGNED\n \n Example\n \n mysql> SELECT VERSION(), sys.version_major();\n +--------------------------------------+---------------------+\n | VERSION()                            | sys.version_major() |\n +--------------------------------------+---------------------+\n | 5.7.9-enterprise-commercial-advanced | 5                   |\n +--------------------------------------+---------------------+\n 1 row in set (0.00 sec)\n '
BEGIN RETURN SUBSTRING_INDEX(SUBSTRING_INDEX(VERSION(), '-', 1), '.', 1); END
;;
delimiter ;

-- ----------------------------
-- Function structure for version_minor
-- ----------------------------
DROP FUNCTION IF EXISTS `version_minor`;
delimiter ;;
CREATE FUNCTION `sys`.`version_minor`()
 RETURNS tinyint(3) unsigned
  NO SQL 
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Returns the minor (release series) version of MySQL Server.\n \n Returns\n \n TINYINT UNSIGNED\n \n Example\n \n mysql> SELECT VERSION(), sys.server_minor();\n +--------------------------------------+---------------------+\n | VERSION()                            | sys.version_minor() |\n +--------------------------------------+---------------------+\n | 5.7.9-enterprise-commercial-advanced | 7                   |\n +--------------------------------------+---------------------+\n 1 row in set (0.00 sec)\n '
BEGIN RETURN SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSTRING_INDEX(VERSION(), '-', 1), '.', 2), '.', -1); END
;;
delimiter ;

-- ----------------------------
-- Function structure for version_patch
-- ----------------------------
DROP FUNCTION IF EXISTS `version_patch`;
delimiter ;;
CREATE FUNCTION `sys`.`version_patch`()
 RETURNS tinyint(3) unsigned
  NO SQL 
  SQL SECURITY INVOKER
  COMMENT '\n Description\n \n Returns the patch release version of MySQL Server.\n \n Returns\n \n TINYINT UNSIGNED\n \n Example\n \n mysql> SELECT VERSION(), sys.version_patch();\n +--------------------------------------+---------------------+\n | VERSION()                            | sys.version_patch() |\n +--------------------------------------+---------------------+\n | 5.7.9-enterprise-commercial-advanced | 9                   |\n +--------------------------------------+---------------------+\n 1 row in set (0.00 sec)\n '
BEGIN RETURN SUBSTRING_INDEX(SUBSTRING_INDEX(VERSION(), '-', 1), '.', -1); END
;;
delimiter ;

-- ----------------------------
-- Triggers structure for table sys_config
-- ----------------------------
DROP TRIGGER IF EXISTS `sys_config_insert_set_user`;
delimiter ;;
CREATE TRIGGER `sys_config_insert_set_user` BEFORE INSERT ON `sys_config` FOR EACH ROW BEGIN IF @sys.ignore_sys_config_triggers != true AND NEW.set_by IS NULL THEN SET NEW.set_by = USER(); END IF; END
;;
delimiter ;

-- ----------------------------
-- Triggers structure for table sys_config
-- ----------------------------
DROP TRIGGER IF EXISTS `sys_config_update_set_user`;
delimiter ;;
CREATE TRIGGER `sys_config_update_set_user` BEFORE UPDATE ON `sys_config` FOR EACH ROW BEGIN IF @sys.ignore_sys_config_triggers != true AND NEW.set_by IS NULL THEN SET NEW.set_by = USER(); END IF; END
;;
delimiter ;

SET FOREIGN_KEY_CHECKS = 1;
