--
-- Host: localhost    Database: mysql
-- ------------------------------------------------------


--
-- Table structure for table `columns_priv`
--

CREATE TABLE `columns_priv` (
  `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
  `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `User` char(32) COLLATE utf8_bin NOT NULL DEFAULT '',
  `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `Column_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
  PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column privileges';

--
-- Dumping data for table `columns_priv`
--


--
-- Table structure for table `db`
--

CREATE TABLE `db` (
  `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
  `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `User` char(32) COLLATE utf8_bin NOT NULL DEFAULT '',
  `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  PRIMARY KEY (`Host`,`Db`,`User`),
  KEY `User` (`User`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database privileges';

--
-- Dumping data for table `db`
--

INSERT INTO `db` VALUES ('localhost','performance_schema','mysql.session','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'),('localhost','sys','mysql.sys','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','Y'),('localhost','db_kum','ktmksu','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y'),('localhost','db_ktmksu','ktm','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y'),('localhost','db_ktm','ktmnew','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y'),('localhost','db_admission','admissionksu','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y'),('localhost','db_job2','job2','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y'),('localhost','db_service','service','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y'),('localhost','db_farm','adminfarm','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y'),('localhost','db_api','apiksu','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y'),('localhost','db_register','register','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y'),('localhost','db_kpm','adminkpm','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y'),('localhost','db_u2t','adminu2t','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y'),('localhost','db_dc','admindc','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y'),('localhost','db_U2T','adminu2tksu','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y'),('localhost','db_admissionksu','admissionnew','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');

--
-- Table structure for table `engine_cost`
--

CREATE TABLE `engine_cost` (
  `engine_name` varchar(64) NOT NULL,
  `device_type` int(11) NOT NULL,
  `cost_name` varchar(64) NOT NULL,
  `cost_value` float DEFAULT NULL,
  `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `comment` varchar(1024) DEFAULT NULL,
  PRIMARY KEY (`cost_name`,`engine_name`,`device_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0;

--
-- Dumping data for table `engine_cost`
--

INSERT INTO `engine_cost` VALUES ('default',0,'io_block_read_cost',NULL,'2020-08-25 04:48:45',NULL),('default',0,'memory_block_read_cost',NULL,'2020-08-25 04:48:45',NULL);

--
-- Table structure for table `event`
--

CREATE TABLE `event` (
  `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
  `name` char(64) NOT NULL DEFAULT '',
  `body` longblob NOT NULL,
  `definer` char(93) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
  `execute_at` datetime DEFAULT NULL,
  `interval_value` int(11) DEFAULT NULL,
  `interval_field` enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') DEFAULT NULL,
  `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `last_executed` datetime DEFAULT NULL,
  `starts` datetime DEFAULT NULL,
  `ends` datetime DEFAULT NULL,
  `status` enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') NOT NULL DEFAULT 'ENABLED',
  `on_completion` enum('DROP','PRESERVE') NOT NULL DEFAULT 'DROP',
  `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NOT NULL DEFAULT '',
  `comment` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
  `originator` int(10) unsigned NOT NULL,
  `time_zone` char(64) CHARACTER SET latin1 NOT NULL DEFAULT 'SYSTEM',
  `character_set_client` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `collation_connection` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `body_utf8` longblob,
  PRIMARY KEY (`db`,`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Events';

--
-- Dumping data for table `event`
--


--
-- Table structure for table `func`
--

CREATE TABLE `func` (
  `name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `ret` tinyint(1) NOT NULL DEFAULT '0',
  `dl` char(128) COLLATE utf8_bin NOT NULL DEFAULT '',
  `type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL,
  PRIMARY KEY (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User defined functions';

--
-- Dumping data for table `func`
--


--
-- Table structure for table `gtid_executed`
--

CREATE TABLE IF NOT EXISTS `gtid_executed` (
  `source_uuid` char(36) NOT NULL COMMENT 'uuid of the source where the transaction was originally executed.',
  `interval_start` bigint(20) NOT NULL COMMENT 'First number of interval.',
  `interval_end` bigint(20) NOT NULL COMMENT 'Last number of interval.',
  PRIMARY KEY (`source_uuid`,`interval_start`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 STATS_PERSISTENT=0;

--
-- Table structure for table `help_category`
--

CREATE TABLE `help_category` (
  `help_category_id` smallint(5) unsigned NOT NULL,
  `name` char(64) NOT NULL,
  `parent_category_id` smallint(5) unsigned DEFAULT NULL,
  `url` text NOT NULL,
  PRIMARY KEY (`help_category_id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='help categories';

--
-- Dumping data for table `help_category`
--

INSERT INTO `help_category` VALUES (0,'Contents',0,''),(1,'Help Metadata',0,''),(2,'Data Types',0,''),(3,'Administration',0,''),(4,'Procedures',0,''),(5,'Language Structure',0,''),(6,'Geographic Features',0,''),(7,'MBR',6,''),(8,'WKT',6,''),(9,'Functions',0,''),(10,'Comparison Operators',9,''),(11,'Logical Operators',9,''),(12,'Control Flow Functions',9,''),(13,'Numeric Functions',9,''),(14,'Date and Time Functions',9,''),(15,'String Functions',9,''),(16,'Bit Functions',9,''),(17,'Encryption Functions',9,''),(18,'Locking Functions',9,''),(19,'Information Functions',9,''),(20,'Spatial Functions',9,''),(21,'WKT Functions',20,''),(22,'WKB Functions',20,''),(23,'Geometry Constructors',20,''),(24,'Geometry Property Functions',20,''),(25,'Point Property Functions',20,''),(26,'LineString Property Functions',20,''),(27,'Polygon Property Functions',20,''),(28,'GeometryCollection Property Functions',20,''),(29,'Geometry Relation Functions',20,''),(30,'MBR Functions',20,''),(31,'GROUP BY Functions and Modifiers',9,''),(32,'Miscellaneous Functions',9,''),(33,'Data Definition',0,''),(34,'Data Manipulation',0,''),(35,'Transactions',0,''),(36,'Compound Statements',0,''),(37,'Account Management',0,''),(38,'Table Maintenance',0,''),(39,'User-Defined Functions',0,''),(40,'Plugins',0,''),(41,'Utility',0,''),(42,'Storage Engines',0,'');

--
-- Table structure for table `help_keyword`
--

CREATE TABLE `help_keyword` (
  `help_keyword_id` int(10) unsigned NOT NULL,
  `name` char(64) NOT NULL,
  PRIMARY KEY (`help_keyword_id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='help keywords';

--
-- Dumping data for table `help_keyword`
--



--
-- Table structure for table `help_relation`
--

CREATE TABLE `help_relation` (
  `help_topic_id` int(10) unsigned NOT NULL,
  `help_keyword_id` int(10) unsigned NOT NULL,
  PRIMARY KEY (`help_keyword_id`,`help_topic_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='keyword-topic relation';

--
-- Dumping data for table `help_relation`
--

INSERT INTO `help_relation` VALUES (0,0),(1,1),(2,2),(471,2),(486,2),(487,2),(494,2),(497,2),(498,2),(505,2),(506,2),(527,2),(532,2),(563,2),(581,2),(582,2),(2,3),(505,3),(2,4),(527,4),(532,4),(579,4),(580,4),(3,5),(656,5),(4,6),(4,7),(492,7),(502,7),(503,7),(514,7),(515,7),(533,7),(601,7),(613,7),(632,7),(633,7),(5,8),(647,8),(648,8),(650,8),(651,8),(5,9),(648,9),(5,10),(229,10),(648,10),(649,10),(651,10),(5,11),(550,11),(554,11),(651,11),(6,12),(7,12),(6,13),(7,13),(9,14),(10,14),(9,15),(229,15),(9,16),(9,17),(13,17),(15,17),(16,17),(18,17),(19,17),(232,17),(9,18),(13,18),(15,18),(16,18),(18,18),(19,18),(11,19),(12,20),(12,21),(13,22),(13,23),(232,23),(593,23),(15,24),(16,25),(16,26),(505,26),(16,27),(17,28),(232,28),(593,28),(18,29),(19,30),(19,31),(19,32),(593,32),(21,33),(122,33),(124,33),(232,33),(23,34),(158,34),(24,35),(156,35),(232,35),(26,36),(28,36),(486,36),(487,36),(494,36),(497,36),(498,36),(505,36),(530,36),(531,36),(533,36),(598,36),(599,36),(601,36),(605,36),(26,37),(28,37),(26,38),(27,39),(27,40),(177,40),(232,40),(28,41),(28,42),(28,43),(37,44),(37,45),(46,46),(494,46),(495,46),(507,46),(46,47),(486,47),(487,47),(488,47),(489,47),(490,47),(491,47),(492,47),(493,47),(494,47),(495,47),(496,47),(581,47),(584,47),(46,48),(497,48),(498,48),(499,48),(500,48),(501,48),(502,48),(503,48),(504,48),(505,48),(507,48),(508,48),(509,48),(582,48),(593,48),(601,48),(609,48),(610,48),(611,48),(612,48),(613,48),(614,48),(616,48),(46,49),(494,49),(500,49),(505,49),(513,49),(535,49),(601,49),(627,49),(647,49),(650,49),(46,50),(494,50),(505,50),(506,50),(527,50),(46,51),(494,51),(505,51),(517,51),(521,51),(522,51),(588,51),(589,51),(590,51),(591,51),(592,51),(601,51),(614,51),(641,51),(47,52),(72,52),(48,53),(49,54),(50,55),(51,56),(52,57),(53,58),(54,59),(68,59),(54,60),(55,60),(55,61),(59,61),(62,61),(64,61),(67,61),(225,61),(227,61),(497,61),(498,61),(499,61),(582,61),(56,62),(494,62),(57,63),(58,64),(59,64),(229,64),(533,64),(604,64),(607,64),(608,64),(627,64),(637,64),(60,65),(124,65),(499,65),(581,65),(582,65),(61,66),(62,66),(63,66),(64,66),(63,67),(64,67),(506,67),(65,68),(66,69),(69,70),(70,71),(71,72),(73,73),(564,73),(73,74),(564,74),(73,75),(547,75),(561,75),(564,75),(565,75),(568,75),(569,75),(571,75),(73,76),(564,76),(565,76),(73,77),(564,77),(74,78),(497,78),(498,78),(499,78),(510,78),(511,78),(512,78),(516,78),(517,78),(520,78),(565,78),(581,78),(582,78),(583,78),(75,79),(76,80),(77,81),(78,82),(79,82),(80,83),(81,84),(82,85),(83,86),(102,86),(84,87),(85,88),(86,89),(87,90),(88,91),(89,92),(90,93),(91,94),(92,95),(93,96),(94,97),(95,98),(96,99),(97,100),(98,101),(99,102),(100,103),(101,104),(102,105),(103,106),(104,107),(105,108),(106,109),(107,110),(108,111),(109,112),(110,113),(111,114),(112,115),(113,116),(494,116),(522,116),(114,117),(115,118),(116,119),(117,120),(118,121),(119,122),(120,123),(121,124),(123,125),(124,126),(124,127),(126,127),(124,128),(127,128),(124,129),(124,130),(124,131),(124,132),(136,132),(124,133),(124,134),(124,135),(143,135),(124,136),(124,137),(144,137),(124,138),(150,138),(124,139),(172,139),(124,140),(125,141),(128,142),(129,143),(130,144),(131,145),(132,146),(133,147),(134,148),(135,149),(137,150),(138,151),(139,152),(140,153),(141,154),(142,155),(145,156),(146,157),(147,158),(148,159),(149,160),(151,161),(152,162),(153,163),(154,164),(155,165),(156,166),(158,166),(207,166),(489,166),(502,166),(503,166),(514,166),(515,166),(593,166),(594,166),(601,166),(612,166),(624,166),(625,166),(157,167),(159,168),(160,169),(161,170),(162,171),(163,172),(164,173),(165,174),(166,175),(167,176),(168,177),(169,178),(170,179),(171,180),(173,181),(174,182),(175,183),(176,184),(178,185),(179,186),(180,187),(181,188),(182,189),(183,190),(184,191),(185,192),(186,193),(653,193),(654,193),(655,193),(187,194),(188,195),(189,196),(527,196),(528,196),(529,196),(190,197),(191,198),(192,199),(535,199),(193,200),(194,201),(195,202),(196,203),(197,204),(198,205),(199,206),(200,207),(201,208),(202,209),(203,210),(204,211),(205,212),(206,213),(569,213),(207,214),(530,214),(531,214),(532,214),(208,215),(209,216),(535,216),(210,217),(211,218),(212,219),(213,220),(225,220),(601,220),(607,220),(608,220),(213,221),(214,222),(215,223),(216,224),(217,225),(218,226),(219,227),(219,228),(524,228),(533,228),(601,228),(604,228),(607,228),(608,228),(627,228),(637,228),(219,229),(219,230),(219,231),(220,232),(221,233),(222,234),(223,235),(224,236),(226,237),(227,238),(228,239),(229,240),(229,241),(229,242),(229,243),(533,243),(229,244),(494,244),(500,244),(505,244),(581,244),(582,244),(584,244),(648,244),(230,245),(232,245),(548,245),(549,245),(602,245),(603,245),(648,245),(231,246),(231,247),(232,247),(232,248),(232,249),(653,249),(654,249),(655,249),(232,250),(233,251),(234,252),(235,253),(236,254),(237,255),(238,256),(239,257),(240,258),(241,259),(242,260),(243,261),(244,262),(245,263),(246,264),(247,265),(248,266),(249,267),(250,268),(251,269),(494,269),(504,269),(555,269),(581,269),(582,269),(584,269),(587,269),(252,270),(253,271),(253,272),(254,273),(255,274),(256,275),(257,276),(258,277),(259,278),(260,279),(261,280),(262,281),(263,282),(264,283),(598,283),(599,283),(265,284),(266,285),(601,285),(606,285),(267,286),(268,287),(488,287),(499,287),(269,288),(486,288),(487,288),(497,288),(498,288),(504,288),(510,288),(511,288),(601,288),(609,288),(610,288),(270,289),(271,290),(272,291),(578,291),(273,292),(486,292),(487,292),(497,292),(498,292),(510,292),(511,292),(601,292),(609,292),(610,292),(274,293),(275,294),(276,295),(504,295),(555,295),(581,295),(582,295),(583,295),(585,295),(616,295),(277,296),(278,297),(278,298),(279,299),(279,300),(280,301),(280,302),(281,303),(281,304),(282,305),(282,306),(283,307),(283,308),(284,309),(285,310),(285,311),(286,312),(286,313),(287,314),(287,315),(288,316),(288,317),(289,318),(289,319),(290,320),(290,321),(291,322),(291,323),(292,324),(293,325),(293,326),(294,327),(294,328),(295,329),(295,330),(296,331),(296,332),(297,333),(297,334),(298,335),(298,336),(299,337),(299,338),(300,339),(301,340),(301,341),(302,342),(302,343),(303,344),(303,345),(304,346),(304,347),(305,348),(305,349),(306,350),(306,351),(307,352),(307,353),(308,354),(309,355),(309,356),(310,357),(311,358),(312,359),(313,360),(314,361),(315,362),(316,363),(317,364),(317,365),(318,366),(318,367),(319,368),(319,369),(320,370),(320,371),(321,372),(322,373),(323,374),(324,375),(325,376),(326,377),(327,378),(328,379),(329,380),(330,381),(331,382),(332,383),(333,384),(334,385),(335,386),(336,387),(337,388),(338,389),(339,390),(340,391),(341,392),(342,393),(343,394),(344,395),(345,396),(346,397),(347,398),(348,399),(349,400),(350,401),(351,402),(352,403),(353,404),(354,405),(355,406),(356,407),(357,408),(358,409),(358,410),(359,411),(360,412),(361,413),(362,414),(363,415),(364,416),(365,417),(366,418),(367,419),(368,420),(369,421),(370,422),(371,423),(372,424),(373,425),(374,426),(375,427),(376,428),(377,429),(378,430),(379,431),(380,432),(381,433),(382,434),(383,435),(384,436),(385,437),(386,438),(387,439),(388,440),(389,441),(390,442),(391,443),(392,444),(393,445),(394,446),(395,447),(396,448),(397,449),(398,450),(399,451),(400,452),(401,453),(402,454),(403,455),(404,456),(405,457),(406,458),(407,459),(408,460),(409,461),(410,462),(411,463),(412,464),(413,465),(414,466),(415,467),(416,468),(417,469),(418,469),(417,470),(417,471),(418,472),(418,473),(418,474),(419,475),(420,476),(421,477),(422,478),(423,479),(424,480),(425,481),(426,482),(427,483),(428,484),(429,485),(430,486),(431,487),(432,488),(433,489),(434,490),(435,491),(436,492),(437,493),(438,494),(439,495),(440,496),(441,497),(442,498),(443,499),(444,500),(445,501),(446,502),(447,503),(448,504),(449,505),(450,506),(451,507),(451,508),(456,508),(457,508),(460,508),(461,508),(466,508),(533,508),(536,508),(452,509),(453,510),(454,511),(455,512),(456,512),(622,512),(645,512),(457,513),(533,513),(457,514),(494,514),(505,514),(524,514),(530,514),(531,514),(533,514),(537,514),(581,514),(582,514),(584,514),(457,515),(533,515),(653,515),(654,515),(655,515),(457,516),(457,517),(494,517),(524,517),(533,517),(537,517),(457,518),(458,519),(459,520),(460,521),(461,522),(462,523),(463,524),(464,525),(465,526),(466,527),(467,528),(468,529),(469,530),(470,531),(472,532),(473,533),(474,534),(475,535),(476,536),(477,537),(478,538),(479,539),(480,540),(481,541),(482,542),(483,543),(484,544),(485,545),(527,545),(532,545),(486,546),(487,546),(494,546),(497,546),(498,546),(505,546),(486,547),(487,547),(494,547),(504,547),(505,547),(530,547),(486,548),(487,548),(494,548),(505,548),(486,549),(487,549),(486,550),(487,550),(494,550),(497,550),(498,550),(505,550),(506,550),(527,550),(530,550),(531,550),(532,550),(533,550),(537,550),(538,550),(539,550),(540,550),(541,550),(551,550),(579,550),(580,550),(587,550),(597,550),(598,550),(599,550),(600,550),(601,550),(605,550),(486,551),(487,551),(494,551),(589,551),(488,552),(494,552),(499,552),(500,552),(505,552),(507,552),(488,553),(499,553),(488,554),(499,554),(488,555),(494,555),(499,555),(488,556),(499,556),(525,556),(571,556),(488,557),(494,557),(499,557),(488,558),(499,558),(512,558),(611,558),(488,559),(499,559),(506,559),(535,559),(488,560),(499,560),(488,561),(494,561),(521,561),(585,561),(488,562),(499,562),(488,563),(499,563),(554,563),(555,563),(556,563),(638,563),(639,563),(651,563),(490,564),(491,565),(501,565),(507,565),(533,565),(491,566),(501,566),(507,566),(493,567),(504,567),(493,568),(504,568),(516,568),(494,569),(494,570),(494,571),(588,571),(494,572),(494,573),(505,573),(494,574),(552,574),(553,574),(494,575),(505,575),(589,575),(494,576),(505,576),(590,576),(494,577),(494,578),(505,578),(530,578),(601,578),(607,578),(608,578),(494,579),(494,580),(505,580),(649,580),(653,580),(654,580),(655,580),(494,581),(505,581),(494,582),(505,582),(494,583),(494,584),(495,584),(510,584),(511,584),(512,584),(513,584),(514,584),(515,584),(516,584),(517,584),(518,584),(519,584),(520,584),(559,584),(560,584),(583,584),(594,584),(494,585),(494,586),(495,586),(505,586),(507,586),(518,586),(601,586),(620,586),(648,586),(494,587),(494,588),(505,588),(526,588),(494,589),(504,589),(505,589),(506,589),(494,590),(500,590),(505,590),(494,591),(530,591),(494,592),(505,592),(494,593),(601,593),(627,593),(494,594),(505,594),(494,595),(533,595),(545,595),(581,595),(582,595),(648,595),(494,596),(505,596),(494,597),(505,597),(494,598),(494,599),(591,599),(494,600),(505,600),(494,601),(500,601),(505,601),(494,602),(505,602),(524,602),(527,602),(530,602),(532,602),(533,602),(535,602),(647,602),(650,602),(494,603),(494,604),(494,605),(494,606),(494,607),(494,608),(592,608),(494,609),(505,609),(494,610),(500,610),(494,611),(505,611),(494,612),(505,612),(494,613),(505,613),(494,614),(495,614),(507,614),(518,614),(494,615),(494,616),(536,616),(494,617),(495,618),(507,618),(495,619),(507,619),(495,620),(507,620),(496,621),(509,621),(520,621),(497,622),(498,622),(499,622),(510,622),(511,622),(512,622),(516,622),(517,622),(520,622),(581,622),(582,622),(583,622),(499,623),(499,624),(499,625),(499,626),(500,627),(504,628),(504,629),(504,630),(504,631),(504,632),(505,633),(506,633),(505,634),(505,635),(506,635),(517,635),(520,635),(505,636),(505,637),(505,638),(530,638),(505,639),(506,639),(524,639),(505,640),(505,641),(505,642),(601,642),(607,642),(608,642),(634,642),(642,642),(505,643),(505,644),(601,644),(505,645),(505,646),(505,647),(505,648),(505,649),(505,650),(506,650),(505,651),(505,652),(505,653),(506,653),(584,653),(505,654),(505,655),(506,656),(517,656),(520,656),(506,657),(527,657),(533,657),(537,657),(507,658),(507,659),(507,660),(507,661),(507,662),(507,663),(535,663),(657,663),(508,664),(519,664),(601,664),(517,665),(523,666),(524,667),(526,667),(533,667),(537,667),(604,667),(637,667),(524,668),(527,668),(530,668),(531,668),(532,668),(537,668),(545,668),(524,669),(589,669),(592,669),(524,670),(535,670),(558,670),(524,671),(526,671),(537,671),(607,671),(608,671),(627,671),(526,672),(572,672),(526,673),(577,673),(526,674),(526,675),(526,676),(575,676),(601,676),(629,676),(526,677),(526,678),(538,678),(539,678),(540,678),(541,678),(545,678),(546,678),(547,678),(648,678),(527,679),(529,679),(532,679),(527,680),(527,681),(533,681),(527,682),(530,682),(531,682),(533,682),(535,682),(537,682),(650,682),(527,683),(532,683),(533,683),(650,683),(527,684),(528,684),(532,684),(533,684),(653,684),(654,684),(655,684),(530,685),(531,685),(530,686),(530,687),(530,688),(601,688),(607,688),(608,688),(530,689),(531,689),(530,690),(531,690),(530,691),(650,691),(530,692),(531,692),(545,692),(588,692),(591,692),(592,692),(648,692),(530,693),(530,694),(530,695),(531,696),(581,696),(582,696),(584,696),(531,697),(533,698),(536,698),(554,698),(584,698),(586,698),(647,698),(650,698),(533,699),(535,699),(545,699),(581,699),(582,699),(533,700),(533,701),(533,702),(552,702),(554,702),(555,702),(556,702),(573,702),(576,702),(577,702),(587,702),(601,702),(637,702),(639,702),(648,702),(653,702),(654,702),(655,702),(533,703),(533,704),(535,704),(533,705),(533,706),(533,707),(533,708),(533,709),(533,710),(533,711),(533,712),(533,713),(533,714),(533,715),(535,715),(534,716),(535,717),(535,718),(535,719),(535,720),(535,721),(538,722),(539,722),(540,722),(541,722),(538,723),(539,723),(540,723),(541,723),(547,723),(561,723),(538,724),(539,724),(540,724),(541,724),(538,725),(539,725),(540,725),(541,725),(547,725),(538,726),(539,726),(540,726),(541,726),(547,726),(538,727),(539,727),(540,727),(541,727),(546,727),(547,727),(538,728),(539,728),(540,728),(541,728),(542,728),(543,728),(544,728),(547,728),(538,729),(539,729),(540,729),(541,729),(542,729),(543,729),(544,729),(547,729),(538,730),(539,730),(540,730),(541,730),(547,730),(538,731),(539,731),(540,731),(541,731),(547,731),(555,731),(538,732),(539,732),(540,732),(541,732),(546,732),(538,733),(539,733),(540,733),(541,733),(538,734),(539,734),(540,734),(541,734),(545,734),(546,734),(547,734),(542,735),(543,735),(544,735),(542,736),(543,736),(544,736),(548,736),(549,736),(552,736),(545,737),(601,737),(629,737),(642,737),(648,737),(545,738),(581,738),(582,738),(546,739),(546,740),(597,740),(640,740),(644,740),(546,741),(546,742),(546,743),(546,744),(546,745),(597,745),(640,745),(644,745),(546,746),(547,747),(557,747),(559,747),(560,747),(547,748),(547,749),(548,750),(549,750),(548,751),(549,751),(601,751),(602,751),(603,751),(648,751),(548,752),(549,752),(550,752),(552,752),(602,752),(603,752),(628,752),(651,752),(548,753),(549,753),(551,754),(552,755),(554,755),(555,755),(556,755),(637,755),(639,755),(648,755),(552,756),(552,757),(552,758),(552,759),(552,760),(552,761),(552,762),(552,763),(552,764),(552,765),(552,766),(552,767),(552,768),(552,769),(552,770),(552,771),(552,772),(552,773),(552,774),(552,775),(552,776),(552,777),(552,778),(553,779),(553,780),(553,781),(553,782),(553,783),(553,784),(553,785),(553,786),(553,787),(584,787),(555,788),(555,789),(556,789),(555,790),(555,791),(555,792),(555,793),(555,794),(556,794),(556,795),(558,796),(584,796),(559,797),(560,797),(563,798),(573,798),(576,798),(577,798),(565,799),(566,800),(567,801),(568,802),(569,803),(570,804),(571,805),(573,806),(574,807),(576,808),(577,809),(577,810),(577,811),(578,812),(579,812),(580,812),(578,813),(579,813),(580,813),(578,814),(579,814),(580,814),(578,815),(579,815),(580,815),(578,816),(579,816),(580,816),(578,817),(579,817),(580,817),(578,818),(579,818),(580,818),(578,819),(578,820),(578,821),(579,821),(580,821),(578,822),(579,822),(580,822),(578,823),(578,824),(578,825),(579,825),(580,825),(578,826),(579,826),(580,826),(578,827),(579,827),(580,827),(579,828),(579,829),(580,829),(580,830),(581,831),(582,831),(581,832),(582,832),(584,832),(581,833),(582,833),(581,834),(582,834),(584,834),(581,835),(582,835),(584,835),(581,836),(582,836),(584,836),(581,837),(582,837),(584,837),(581,838),(582,838),(584,838),(581,839),(582,839),(581,840),(582,840),(584,840),(581,841),(582,841),(584,841),(581,842),(582,842),(584,842),(581,843),(582,843),(584,843),(584,844),(584,845),(584,846),(586,846),(584,847),(584,848),(586,848),(584,849),(586,849),(631,849),(648,849),(584,850),(584,851),(584,852),(584,853),(652,853),(584,854),(584,855),(586,856),(586,857),(588,858),(591,858),(592,858),(648,858),(589,859),(589,860),(592,861),(653,861),(654,861),(655,861),(592,862),(593,863),(593,864),(593,865),(593,866),(595,867),(595,868),(596,868),(601,868),(596,869),(597,870),(600,871),(601,872),(618,872),(619,872),(601,873),(621,873),(601,874),(622,874),(601,875),(626,875),(601,876),(638,876),(648,876),(601,877),(601,878),(620,878),(601,879),(634,879),(601,880),(618,880),(619,880),(601,881),(602,881),(603,881),(604,881),(605,881),(606,881),(607,881),(608,881),(609,881),(610,881),(611,881),(612,881),(613,881),(614,881),(616,881),(618,881),(619,881),(620,881),(621,881),(622,881),(623,881),(624,881),(625,881),(626,881),(627,881),(628,881),(629,881),(630,881),(631,881),(632,881),(633,881),(634,881),(635,881),(636,881),(637,881),(638,881),(639,881),(640,881),(641,881),(642,881),(643,881),(644,881),(645,881),(601,882),(620,882),(625,882),(628,882),(633,882),(639,882),(640,882),(641,882),(648,882),(601,883),(643,883),(601,884),(644,884),(601,885),(645,885),(604,886),(646,886),(604,887),(623,887),(637,887),(621,888),(624,889),(632,889),(630,890),(635,891),(636,892),(637,893),(648,894),(648,895),(648,896),(648,897),(648,898),(648,899),(648,900),(648,901),(649,902),(650,903),(653,904),(654,904),(655,904),(653,905),(654,905),(655,905),(653,906),(654,906),(655,906),(653,907),(654,907),(655,907);

--
-- Table structure for table `help_topic`
--

CREATE TABLE `help_topic` (
  `help_topic_id` int(10) unsigned NOT NULL,
  `name` char(64) NOT NULL,
  `help_category_id` smallint(5) unsigned NOT NULL,
  `description` text NOT NULL,
  `example` text NOT NULL,
  `url` text NOT NULL,
  PRIMARY KEY (`help_topic_id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='help topics';

--
-- Dumping data for table `help_topic`
--



--
-- Table structure for table `innodb_index_stats`
--

CREATE TABLE `innodb_index_stats` (
  `database_name` varchar(64) COLLATE utf8_bin NOT NULL,
  `table_name` varchar(199) COLLATE utf8_bin NOT NULL,
  `index_name` varchar(64) COLLATE utf8_bin NOT NULL,
  `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `stat_name` varchar(64) COLLATE utf8_bin NOT NULL,
  `stat_value` bigint(20) unsigned NOT NULL,
  `sample_size` bigint(20) unsigned DEFAULT NULL,
  `stat_description` varchar(1024) COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`database_name`,`table_name`,`index_name`,`stat_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0;

--
-- Dumping data for table `innodb_index_stats`
--

INSERT INTO `innodb_index_stats` VALUES ('db_U2T','tb_act','PRIMARY','2021-01-29 08:33:43','n_diff_pfx01',4,1,'act_id'),('db_U2T','tb_act','PRIMARY','2021-01-29 08:33:43','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_U2T','tb_act','PRIMARY','2021-01-29 08:33:43','size',1,NULL,'Number of pages in the index'),('db_U2T','tb_change','PRIMARY','2021-02-26 04:33:10','n_diff_pfx01',75,4,'c_id'),('db_U2T','tb_change','PRIMARY','2021-02-26 04:33:10','n_leaf_pages',4,NULL,'Number of leaf pages in the index'),('db_U2T','tb_change','PRIMARY','2021-02-26 04:33:10','size',5,NULL,'Number of pages in the index'),('db_U2T','tb_dan','PRIMARY','2021-02-19 09:25:13','n_diff_pfx01',5,1,'dan_id'),('db_U2T','tb_dan','PRIMARY','2021-02-19 09:25:13','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_U2T','tb_dan','PRIMARY','2021-02-19 09:25:13','size',1,NULL,'Number of pages in the index'),('db_U2T','tb_distric','PRIMARY','2021-01-29 08:33:34','n_diff_pfx01',25,1,'dist_id'),('db_U2T','tb_distric','PRIMARY','2021-01-29 08:33:34','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_U2T','tb_distric','PRIMARY','2021-01-29 08:33:34','size',1,NULL,'Number of pages in the index'),('db_U2T','tb_exit','PRIMARY','2021-01-29 08:33:34','n_diff_pfx01',5,1,'ex_id'),('db_U2T','tb_exit','PRIMARY','2021-01-29 08:33:34','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_U2T','tb_exit','PRIMARY','2021-01-29 08:33:34','size',1,NULL,'Number of pages in the index'),('db_U2T','tb_info_local','PRIMARY','2021-01-29 08:33:34','n_diff_pfx01',0,1,'info_local_id'),('db_U2T','tb_info_local','PRIMARY','2021-01-29 08:33:34','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_U2T','tb_info_local','PRIMARY','2021-01-29 08:33:34','size',1,NULL,'Number of pages in the index'),('db_U2T','tb_leave','PRIMARY','2021-01-29 08:33:34','n_diff_pfx01',0,1,'leave_id'),('db_U2T','tb_leave','PRIMARY','2021-01-29 08:33:34','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_U2T','tb_leave','PRIMARY','2021-01-29 08:33:34','size',1,NULL,'Number of pages in the index'),('db_U2T','tb_list_student','PRIMARY','2021-01-29 08:33:34','n_diff_pfx01',39,1,'list_id'),('db_U2T','tb_list_student','PRIMARY','2021-01-29 08:33:34','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_U2T','tb_list_student','PRIMARY','2021-01-29 08:33:34','size',1,NULL,'Number of pages in the index'),('db_U2T','tb_local','PRIMARY','2021-01-29 08:33:34','n_diff_pfx01',20,1,'local_id'),('db_U2T','tb_local','PRIMARY','2021-01-29 08:33:34','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_U2T','tb_local','PRIMARY','2021-01-29 08:33:34','size',1,NULL,'Number of pages in the index'),('db_U2T','tb_mem_report','PRIMARY','2021-02-19 09:27:27','n_diff_pfx01',0,1,'mr_id'),('db_U2T','tb_mem_report','PRIMARY','2021-02-19 09:27:27','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_U2T','tb_mem_report','PRIMARY','2021-02-19 09:27:27','size',1,NULL,'Number of pages in the index'),('db_U2T','tb_member','PRIMARY','2021-02-08 09:17:19','n_diff_pfx01',407,9,'m_id'),('db_U2T','tb_member','PRIMARY','2021-02-08 09:17:19','n_leaf_pages',9,NULL,'Number of leaf pages in the index'),('db_U2T','tb_member','PRIMARY','2021-02-08 09:17:19','size',10,NULL,'Number of pages in the index'),('db_U2T','tb_member_report','PRIMARY','2021-02-20 20:20:38','n_diff_pfx01',2,1,'m_id'),('db_U2T','tb_member_report','PRIMARY','2021-02-20 20:20:38','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_U2T','tb_member_report','PRIMARY','2021-02-20 20:20:38','size',1,NULL,'Number of pages in the index'),('db_U2T','tb_project','PRIMARY','2021-01-29 08:33:34','n_diff_pfx01',0,1,'pro_id'),('db_U2T','tb_project','PRIMARY','2021-01-29 08:33:34','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_U2T','tb_project','PRIMARY','2021-01-29 08:33:34','size',1,NULL,'Number of pages in the index'),('db_U2T','tb_report','PRIMARY','2021-02-19 09:25:20','n_diff_pfx01',0,1,'rep_id'),('db_U2T','tb_report','PRIMARY','2021-02-19 09:25:20','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_U2T','tb_report','PRIMARY','2021-02-19 09:25:20','size',1,NULL,'Number of pages in the index'),('db_U2T','tb_report_status','PRIMARY','2021-02-19 09:25:25','n_diff_pfx01',1560,5,'rs_id'),('db_U2T','tb_report_status','PRIMARY','2021-02-19 09:25:25','n_leaf_pages',5,NULL,'Number of leaf pages in the index'),('db_U2T','tb_report_status','PRIMARY','2021-02-19 09:25:25','size',6,NULL,'Number of pages in the index'),('db_U2T','tb_report_text','PRIMARY','2021-02-19 09:25:10','n_diff_pfx01',78,1,'rep_text_id'),('db_U2T','tb_report_text','PRIMARY','2021-02-19 09:25:10','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_U2T','tb_report_text','PRIMARY','2021-02-19 09:25:10','size',1,NULL,'Number of pages in the index'),('db_U2T','tb_user','PRIMARY','2021-01-29 08:33:39','n_diff_pfx01',11,1,'user_id'),('db_U2T','tb_user','PRIMARY','2021-01-29 08:33:39','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_U2T','tb_user','PRIMARY','2021-01-29 08:33:39','size',1,NULL,'Number of pages in the index'),('db_U2T','tb_work','PRIMARY','2021-02-25 02:56:17','n_diff_pfx01',4037,20,'work_id'),('db_U2T','tb_work','PRIMARY','2021-02-25 02:56:17','n_leaf_pages',108,NULL,'Number of leaf pages in the index'),('db_U2T','tb_work','PRIMARY','2021-02-25 02:56:17','size',161,NULL,'Number of pages in the index'),('db_U2T','tb_work_student','GEN_CLUST_INDEX','2021-01-29 08:33:31','n_diff_pfx01',0,1,'DB_ROW_ID'),('db_U2T','tb_work_student','GEN_CLUST_INDEX','2021-01-29 08:33:31','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_U2T','tb_work_student','GEN_CLUST_INDEX','2021-01-29 08:33:31','size',1,NULL,'Number of pages in the index'),('db_admission','admiss_apps','PRIMARY','2021-06-18 08:45:35','n_diff_pfx01',6627,20,'ID_APP'),('db_admission','admiss_apps','PRIMARY','2021-06-18 08:45:35','n_leaf_pages',203,NULL,'Number of leaf pages in the index'),('db_admission','admiss_apps','PRIMARY','2021-06-18 08:45:35','size',289,NULL,'Number of pages in the index'),('db_admission','admiss_degree','PRIMARY','2020-09-26 14:22:33','n_diff_pfx01',3,1,'DEGREE_ID'),('db_admission','admiss_degree','PRIMARY','2020-09-26 14:22:33','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','admiss_degree','PRIMARY','2020-09-26 14:22:33','size',1,NULL,'Number of pages in the index'),('db_admission','admiss_enroll','PRIMARY','2021-06-14 09:08:14','n_diff_pfx01',1725,20,'ID_Enroll'),('db_admission','admiss_enroll','PRIMARY','2021-06-14 09:08:14','n_leaf_pages',70,NULL,'Number of leaf pages in the index'),('db_admission','admiss_enroll','PRIMARY','2021-06-14 09:08:14','size',97,NULL,'Number of pages in the index'),('db_admission','admiss_fac','PRIMARY','2020-09-26 14:22:33','n_diff_pfx01',6,1,'FAC_ID'),('db_admission','admiss_fac','PRIMARY','2020-09-26 14:22:33','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','admiss_fac','PRIMARY','2020-09-26 14:22:33','size',1,NULL,'Number of pages in the index'),('db_admission','admiss_level','PRIMARY','2021-03-02 14:54:52','n_diff_pfx01',6,1,'LEVEL_ID'),('db_admission','admiss_level','PRIMARY','2021-03-02 14:54:52','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','admiss_level','PRIMARY','2021-03-02 14:54:52','size',1,NULL,'Number of pages in the index'),('db_admission','admiss_news','PRIMARY','2021-05-09 09:45:23','n_diff_pfx01',17,3,'NEWS_ID'),('db_admission','admiss_news','PRIMARY','2021-05-09 09:45:23','n_leaf_pages',3,NULL,'Number of leaf pages in the index'),('db_admission','admiss_news','PRIMARY','2021-05-09 09:45:23','size',4,NULL,'Number of pages in the index'),('db_admission','admiss_output','PRIMARY','2020-09-26 14:22:34','n_diff_pfx01',3,1,'OUTPUT_GROUP_ID'),('db_admission','admiss_output','PRIMARY','2020-09-26 14:22:34','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','admiss_output','PRIMARY','2020-09-26 14:22:34','size',1,NULL,'Number of pages in the index'),('db_admission','admiss_plan','PRIMARY','2020-09-26 14:22:34','n_diff_pfx01',0,1,'PROGRAM_CODE'),('db_admission','admiss_plan','PRIMARY','2020-09-26 14:22:34','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','admiss_plan','PRIMARY','2020-09-26 14:22:34','size',1,NULL,'Number of pages in the index'),('db_admission','admiss_prodetail','PRIMARY','2020-10-07 03:55:47','n_diff_pfx01',75,8,'PROGRAM_CODE'),('db_admission','admiss_prodetail','PRIMARY','2020-10-07 03:55:47','n_leaf_pages',145,NULL,'Number of leaf pages in the index'),('db_admission','admiss_prodetail','PRIMARY','2020-10-07 03:55:47','size',161,NULL,'Number of pages in the index'),('db_admission','admiss_program','PRIMARY','2020-12-07 08:06:23','n_diff_pfx01',94,4,'PROGRAM_CODE'),('db_admission','admiss_program','PRIMARY','2020-12-07 08:06:23','n_leaf_pages',4,NULL,'Number of leaf pages in the index'),('db_admission','admiss_program','PRIMARY','2020-12-07 08:06:23','size',5,NULL,'Number of pages in the index'),('db_admission','admiss_round','PRIMARY','2020-09-26 14:22:35','n_diff_pfx01',5,1,'ROUND_ID'),('db_admission','admiss_round','PRIMARY','2020-09-26 14:22:35','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','admiss_round','PRIMARY','2020-09-26 14:22:35','size',1,NULL,'Number of pages in the index'),('db_admission','admiss_stdprofile','PRIMARY','2021-05-23 17:09:13','n_diff_pfx01',5952,20,'CITIZEN_ID'),('db_admission','admiss_stdprofile','PRIMARY','2021-05-23 17:09:13','n_leaf_pages',241,NULL,'Number of leaf pages in the index'),('db_admission','admiss_stdprofile','PRIMARY','2021-05-23 17:09:13','size',285,NULL,'Number of pages in the index'),('db_admission','admiss_teacher','PRIMARY','2020-09-26 14:22:35','n_diff_pfx01',534,5,'USERNAME_LOGIN'),('db_admission','admiss_teacher','PRIMARY','2020-09-26 14:22:35','n_leaf_pages',5,NULL,'Number of leaf pages in the index'),('db_admission','admiss_teacher','PRIMARY','2020-09-26 14:22:35','size',6,NULL,'Number of pages in the index'),('db_admission','admiss_teacher_pro','PRIMARY','2020-09-30 08:34:54','n_diff_pfx01',366,1,'TPID'),('db_admission','admiss_teacher_pro','PRIMARY','2020-09-30 08:34:54','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','admiss_teacher_pro','PRIMARY','2020-09-30 08:34:54','size',1,NULL,'Number of pages in the index'),('db_admission','admission64_admin','PRIMARY','2021-03-04 20:46:21','n_diff_pfx01',0,1,'a_id'),('db_admission','admission64_admin','PRIMARY','2021-03-04 20:46:21','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','admission64_admin','PRIMARY','2021-03-04 20:46:21','size',1,NULL,'Number of pages in the index'),('db_admission','tb_apps','PRIMARY','2023-09-29 11:59:30','n_diff_pfx01',18,1,'ID_APP'),('db_admission','tb_apps','PRIMARY','2023-09-29 11:59:30','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','tb_apps','PRIMARY','2023-09-29 11:59:30','size',1,NULL,'Number of pages in the index'),('db_admission','tb_enroll','PRIMARY','2022-11-24 07:37:37','n_diff_pfx01',1710,20,'CITIZEN_ID'),('db_admission','tb_enroll','PRIMARY','2022-11-24 07:37:37','n_leaf_pages',68,NULL,'Number of leaf pages in the index'),('db_admission','tb_enroll','PRIMARY','2022-11-24 07:37:37','size',97,NULL,'Number of pages in the index'),('db_admission','tb_enrollup','PRIMARY','2022-11-24 07:35:39','n_diff_pfx01',1240,11,'CITIZEN_ID'),('db_admission','tb_enrollup','PRIMARY','2022-11-24 07:35:39','n_leaf_pages',11,NULL,'Number of leaf pages in the index'),('db_admission','tb_enrollup','PRIMARY','2022-11-24 07:35:39','size',12,NULL,'Number of pages in the index'),('db_admission','tb_faculty','PRIMARY','2021-09-13 06:50:02','n_diff_pfx01',6,1,'FAC_ID'),('db_admission','tb_faculty','PRIMARY','2021-09-13 06:50:02','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','tb_faculty','PRIMARY','2021-09-13 06:50:02','size',1,NULL,'Number of pages in the index'),('db_admission','tb_level','PRIMARY','2021-09-13 06:50:32','n_diff_pfx01',6,1,'LEVEL_ID'),('db_admission','tb_level','PRIMARY','2021-09-13 06:50:32','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','tb_level','PRIMARY','2021-09-13 06:50:32','size',1,NULL,'Number of pages in the index'),('db_admission','tb_payback','PRIMARY','2022-02-11 03:45:23','n_diff_pfx01',421,6,'PAYID'),('db_admission','tb_payback','PRIMARY','2022-02-11 03:45:23','n_leaf_pages',6,NULL,'Number of leaf pages in the index'),('db_admission','tb_payback','PRIMARY','2022-02-11 03:45:23','size',7,NULL,'Number of pages in the index'),('db_admission','tb_program','PRIMARY','2023-09-20 08:20:02','n_diff_pfx01',112,4,'PROGRAM_CODE'),('db_admission','tb_program','PRIMARY','2023-09-20 08:20:02','n_leaf_pages',4,NULL,'Number of leaf pages in the index'),('db_admission','tb_program','PRIMARY','2023-09-20 08:20:02','size',5,NULL,'Number of pages in the index'),('db_admission','tb_programไม่เอา','PRIMARY','2021-09-13 06:46:04','n_diff_pfx01',94,3,'PROGRAM_CODE'),('db_admission','tb_programไม่เอา','PRIMARY','2021-09-13 06:46:04','n_leaf_pages',3,NULL,'Number of leaf pages in the index'),('db_admission','tb_programไม่เอา','PRIMARY','2021-09-13 06:46:04','size',4,NULL,'Number of pages in the index'),('db_admission','tb_round','PRIMARY','2023-09-18 08:44:36','n_diff_pfx01',13,1,'ROUND_ID'),('db_admission','tb_round','PRIMARY','2023-09-18 08:44:36','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','tb_round','PRIMARY','2023-09-18 08:44:36','size',1,NULL,'Number of pages in the index'),('db_admission','tb_stdprofile','PRIMARY','2023-09-30 05:19:13','n_diff_pfx01',21,1,'CITIZEN_ID'),('db_admission','tb_stdprofile','PRIMARY','2023-09-30 05:19:13','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','tb_stdprofile','PRIMARY','2023-09-30 05:19:13','size',1,NULL,'Number of pages in the index'),('db_admission','tb_teacher','PRIMARY','2021-09-22 10:37:11','n_diff_pfx01',534,5,'USERNAME_LOGIN'),('db_admission','tb_teacher','PRIMARY','2021-09-22 10:37:11','n_leaf_pages',5,NULL,'Number of leaf pages in the index'),('db_admission','tb_teacher','PRIMARY','2021-09-22 10:37:11','size',6,NULL,'Number of pages in the index'),('db_admission','wp_actionscheduler_actions','PRIMARY','2021-09-13 08:30:00','n_diff_pfx01',35,1,'action_id'),('db_admission','wp_actionscheduler_actions','PRIMARY','2021-09-13 08:30:00','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_actionscheduler_actions','PRIMARY','2021-09-13 08:30:00','size',1,NULL,'Number of pages in the index'),('db_admission','wp_actionscheduler_actions','args','2021-09-13 08:30:00','n_diff_pfx01',9,1,'args'),('db_admission','wp_actionscheduler_actions','args','2021-09-13 08:30:00','n_diff_pfx02',35,1,'args,action_id'),('db_admission','wp_actionscheduler_actions','args','2021-09-13 08:30:00','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_actionscheduler_actions','args','2021-09-13 08:30:00','size',1,NULL,'Number of pages in the index'),('db_admission','wp_actionscheduler_actions','claim_id','2021-09-13 08:30:00','n_diff_pfx01',1,1,'claim_id'),('db_admission','wp_actionscheduler_actions','claim_id','2021-09-13 08:30:00','n_diff_pfx02',35,1,'claim_id,action_id'),('db_admission','wp_actionscheduler_actions','claim_id','2021-09-13 08:30:00','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_actionscheduler_actions','claim_id','2021-09-13 08:30:00','size',1,NULL,'Number of pages in the index'),('db_admission','wp_actionscheduler_actions','claim_id_status_scheduled_date_gmt','2021-09-13 08:30:00','n_diff_pfx01',1,1,'claim_id'),('db_admission','wp_actionscheduler_actions','claim_id_status_scheduled_date_gmt','2021-09-13 08:30:00','n_diff_pfx02',2,1,'claim_id,status'),('db_admission','wp_actionscheduler_actions','claim_id_status_scheduled_date_gmt','2021-09-13 08:30:00','n_diff_pfx03',28,1,'claim_id,status,scheduled_date_gmt'),('db_admission','wp_actionscheduler_actions','claim_id_status_scheduled_date_gmt','2021-09-13 08:30:00','n_diff_pfx04',35,1,'claim_id,status,scheduled_date_gmt,action_id'),('db_admission','wp_actionscheduler_actions','claim_id_status_scheduled_date_gmt','2021-09-13 08:30:00','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_actionscheduler_actions','claim_id_status_scheduled_date_gmt','2021-09-13 08:30:00','size',1,NULL,'Number of pages in the index'),('db_admission','wp_actionscheduler_actions','group_id','2021-09-13 08:30:00','n_diff_pfx01',3,1,'group_id'),('db_admission','wp_actionscheduler_actions','group_id','2021-09-13 08:30:00','n_diff_pfx02',35,1,'group_id,action_id'),('db_admission','wp_actionscheduler_actions','group_id','2021-09-13 08:30:00','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_actionscheduler_actions','group_id','2021-09-13 08:30:00','size',1,NULL,'Number of pages in the index'),('db_admission','wp_actionscheduler_actions','hook','2021-09-13 08:30:00','n_diff_pfx01',9,1,'hook'),('db_admission','wp_actionscheduler_actions','hook','2021-09-13 08:30:00','n_diff_pfx02',35,1,'hook,action_id'),('db_admission','wp_actionscheduler_actions','hook','2021-09-13 08:30:00','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_actionscheduler_actions','hook','2021-09-13 08:30:00','size',1,NULL,'Number of pages in the index'),('db_admission','wp_actionscheduler_actions','last_attempt_gmt','2021-09-13 08:30:00','n_diff_pfx01',26,1,'last_attempt_gmt'),('db_admission','wp_actionscheduler_actions','last_attempt_gmt','2021-09-13 08:30:00','n_diff_pfx02',35,1,'last_attempt_gmt,action_id'),('db_admission','wp_actionscheduler_actions','last_attempt_gmt','2021-09-13 08:30:00','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_actionscheduler_actions','last_attempt_gmt','2021-09-13 08:30:00','size',1,NULL,'Number of pages in the index'),('db_admission','wp_actionscheduler_actions','scheduled_date_gmt','2021-09-13 08:30:00','n_diff_pfx01',28,1,'scheduled_date_gmt'),('db_admission','wp_actionscheduler_actions','scheduled_date_gmt','2021-09-13 08:30:00','n_diff_pfx02',35,1,'scheduled_date_gmt,action_id'),('db_admission','wp_actionscheduler_actions','scheduled_date_gmt','2021-09-13 08:30:00','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_actionscheduler_actions','scheduled_date_gmt','2021-09-13 08:30:00','size',1,NULL,'Number of pages in the index'),('db_admission','wp_actionscheduler_actions','status','2021-09-13 08:30:00','n_diff_pfx01',2,1,'status'),('db_admission','wp_actionscheduler_actions','status','2021-09-13 08:30:00','n_diff_pfx02',35,1,'status,action_id'),('db_admission','wp_actionscheduler_actions','status','2021-09-13 08:30:00','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_actionscheduler_actions','status','2021-09-13 08:30:00','size',1,NULL,'Number of pages in the index'),('db_admission','wp_actionscheduler_claims','PRIMARY','2021-09-13 08:29:49','n_diff_pfx01',0,1,'claim_id'),('db_admission','wp_actionscheduler_claims','PRIMARY','2021-09-13 08:29:49','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_actionscheduler_claims','PRIMARY','2021-09-13 08:29:49','size',1,NULL,'Number of pages in the index'),('db_admission','wp_actionscheduler_claims','date_created_gmt','2021-09-13 08:29:49','n_diff_pfx01',0,1,'date_created_gmt'),('db_admission','wp_actionscheduler_claims','date_created_gmt','2021-09-13 08:29:49','n_diff_pfx02',0,1,'date_created_gmt,claim_id'),('db_admission','wp_actionscheduler_claims','date_created_gmt','2021-09-13 08:29:49','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_actionscheduler_claims','date_created_gmt','2021-09-13 08:29:49','size',1,NULL,'Number of pages in the index'),('db_admission','wp_actionscheduler_groups','PRIMARY','2021-09-13 08:29:49','n_diff_pfx01',3,1,'group_id'),('db_admission','wp_actionscheduler_groups','PRIMARY','2021-09-13 08:29:49','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_actionscheduler_groups','PRIMARY','2021-09-13 08:29:49','size',1,NULL,'Number of pages in the index'),('db_admission','wp_actionscheduler_groups','slug','2021-09-13 08:29:49','n_diff_pfx01',3,1,'slug'),('db_admission','wp_actionscheduler_groups','slug','2021-09-13 08:29:49','n_diff_pfx02',3,1,'slug,group_id'),('db_admission','wp_actionscheduler_groups','slug','2021-09-13 08:29:49','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_actionscheduler_groups','slug','2021-09-13 08:29:49','size',1,NULL,'Number of pages in the index'),('db_admission','wp_actionscheduler_logs','PRIMARY','2021-09-13 08:29:50','n_diff_pfx01',91,1,'log_id'),('db_admission','wp_actionscheduler_logs','PRIMARY','2021-09-13 08:29:50','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_actionscheduler_logs','PRIMARY','2021-09-13 08:29:50','size',1,NULL,'Number of pages in the index'),('db_admission','wp_actionscheduler_logs','action_id','2021-09-13 08:29:50','n_diff_pfx01',35,1,'action_id'),('db_admission','wp_actionscheduler_logs','action_id','2021-09-13 08:29:50','n_diff_pfx02',91,1,'action_id,log_id'),('db_admission','wp_actionscheduler_logs','action_id','2021-09-13 08:29:50','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_actionscheduler_logs','action_id','2021-09-13 08:29:50','size',1,NULL,'Number of pages in the index'),('db_admission','wp_actionscheduler_logs','log_date_gmt','2021-09-13 08:29:50','n_diff_pfx01',33,1,'log_date_gmt'),('db_admission','wp_actionscheduler_logs','log_date_gmt','2021-09-13 08:29:50','n_diff_pfx02',91,1,'log_date_gmt,log_id'),('db_admission','wp_actionscheduler_logs','log_date_gmt','2021-09-13 08:29:50','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_actionscheduler_logs','log_date_gmt','2021-09-13 08:29:50','size',1,NULL,'Number of pages in the index'),('db_admission','wp_aioseo_notifications','PRIMARY','2021-09-13 08:29:49','n_diff_pfx01',0,1,'id'),('db_admission','wp_aioseo_notifications','PRIMARY','2021-09-13 08:29:49','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_aioseo_notifications','PRIMARY','2021-09-13 08:29:49','size',1,NULL,'Number of pages in the index'),('db_admission','wp_aioseo_notifications','ndx_aioseo_notifications_dates','2021-09-13 08:29:49','n_diff_pfx01',0,1,'start'),('db_admission','wp_aioseo_notifications','ndx_aioseo_notifications_dates','2021-09-13 08:29:49','n_diff_pfx02',0,1,'start,end'),('db_admission','wp_aioseo_notifications','ndx_aioseo_notifications_dates','2021-09-13 08:29:49','n_diff_pfx03',0,1,'start,end,id'),('db_admission','wp_aioseo_notifications','ndx_aioseo_notifications_dates','2021-09-13 08:29:49','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_aioseo_notifications','ndx_aioseo_notifications_dates','2021-09-13 08:29:49','size',1,NULL,'Number of pages in the index'),('db_admission','wp_aioseo_notifications','ndx_aioseo_notifications_dismissed','2021-09-13 08:29:49','n_diff_pfx01',0,1,'dismissed'),('db_admission','wp_aioseo_notifications','ndx_aioseo_notifications_dismissed','2021-09-13 08:29:49','n_diff_pfx02',0,1,'dismissed,id'),('db_admission','wp_aioseo_notifications','ndx_aioseo_notifications_dismissed','2021-09-13 08:29:49','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_aioseo_notifications','ndx_aioseo_notifications_dismissed','2021-09-13 08:29:49','size',1,NULL,'Number of pages in the index'),('db_admission','wp_aioseo_notifications','ndx_aioseo_notifications_slug','2021-09-13 08:29:49','n_diff_pfx01',0,1,'slug'),('db_admission','wp_aioseo_notifications','ndx_aioseo_notifications_slug','2021-09-13 08:29:49','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_aioseo_notifications','ndx_aioseo_notifications_slug','2021-09-13 08:29:49','size',1,NULL,'Number of pages in the index'),('db_admission','wp_aioseo_notifications','ndx_aioseo_notifications_type','2021-09-13 08:29:49','n_diff_pfx01',0,1,'type'),('db_admission','wp_aioseo_notifications','ndx_aioseo_notifications_type','2021-09-13 08:29:49','n_diff_pfx02',0,1,'type,id'),('db_admission','wp_aioseo_notifications','ndx_aioseo_notifications_type','2021-09-13 08:29:49','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_aioseo_notifications','ndx_aioseo_notifications_type','2021-09-13 08:29:49','size',1,NULL,'Number of pages in the index'),('db_admission','wp_aioseo_posts','PRIMARY','2021-09-13 08:29:50','n_diff_pfx01',41,7,'id'),('db_admission','wp_aioseo_posts','PRIMARY','2021-09-13 08:29:50','n_leaf_pages',7,NULL,'Number of leaf pages in the index'),('db_admission','wp_aioseo_posts','PRIMARY','2021-09-13 08:29:50','size',8,NULL,'Number of pages in the index'),('db_admission','wp_aioseo_posts','ndx_aioseo_posts_post_id','2021-09-13 08:29:50','n_diff_pfx01',41,1,'post_id'),('db_admission','wp_aioseo_posts','ndx_aioseo_posts_post_id','2021-09-13 08:29:50','n_diff_pfx02',41,1,'post_id,id'),('db_admission','wp_aioseo_posts','ndx_aioseo_posts_post_id','2021-09-13 08:29:50','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_aioseo_posts','ndx_aioseo_posts_post_id','2021-09-13 08:29:50','size',1,NULL,'Number of pages in the index'),('db_admission','wp_commentmeta','PRIMARY','2021-09-13 08:29:50','n_diff_pfx01',0,1,'meta_id'),('db_admission','wp_commentmeta','PRIMARY','2021-09-13 08:29:50','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_commentmeta','PRIMARY','2021-09-13 08:29:50','size',1,NULL,'Number of pages in the index'),('db_admission','wp_commentmeta','comment_id','2021-09-13 08:29:50','n_diff_pfx01',0,1,'comment_id'),('db_admission','wp_commentmeta','comment_id','2021-09-13 08:29:50','n_diff_pfx02',0,1,'comment_id,meta_id'),('db_admission','wp_commentmeta','comment_id','2021-09-13 08:29:50','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_commentmeta','comment_id','2021-09-13 08:29:50','size',1,NULL,'Number of pages in the index'),('db_admission','wp_commentmeta','meta_key','2021-09-13 08:29:50','n_diff_pfx01',0,1,'meta_key'),('db_admission','wp_commentmeta','meta_key','2021-09-13 08:29:50','n_diff_pfx02',0,1,'meta_key,meta_id'),('db_admission','wp_commentmeta','meta_key','2021-09-13 08:29:50','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_commentmeta','meta_key','2021-09-13 08:29:50','size',1,NULL,'Number of pages in the index'),('db_admission','wp_comments','PRIMARY','2024-04-18 20:34:13','n_diff_pfx01',1625,20,'comment_ID'),('db_admission','wp_comments','PRIMARY','2024-04-18 20:34:13','n_leaf_pages',224,NULL,'Number of leaf pages in the index'),('db_admission','wp_comments','PRIMARY','2024-04-18 20:34:13','size',289,NULL,'Number of pages in the index'),('db_admission','wp_comments','comment_approved_date_gmt','2024-04-18 20:34:13','n_diff_pfx01',1,3,'comment_approved'),('db_admission','wp_comments','comment_approved_date_gmt','2024-04-18 20:34:13','n_diff_pfx02',1650,3,'comment_approved,comment_date_gmt'),('db_admission','wp_comments','comment_approved_date_gmt','2024-04-18 20:34:13','n_diff_pfx03',1651,3,'comment_approved,comment_date_gmt,comment_ID'),('db_admission','wp_comments','comment_approved_date_gmt','2024-04-18 20:34:13','n_leaf_pages',3,NULL,'Number of leaf pages in the index'),('db_admission','wp_comments','comment_approved_date_gmt','2024-04-18 20:34:13','size',4,NULL,'Number of pages in the index'),('db_admission','wp_comments','comment_author_email','2024-04-18 20:34:13','n_diff_pfx01',995,4,'comment_author_email'),('db_admission','wp_comments','comment_author_email','2024-04-18 20:34:13','n_diff_pfx02',1651,4,'comment_author_email,comment_ID'),('db_admission','wp_comments','comment_author_email','2024-04-18 20:34:13','n_leaf_pages',4,NULL,'Number of leaf pages in the index'),('db_admission','wp_comments','comment_author_email','2024-04-18 20:34:13','size',5,NULL,'Number of pages in the index'),('db_admission','wp_comments','comment_date_gmt','2024-04-18 20:34:13','n_diff_pfx01',1650,3,'comment_date_gmt'),('db_admission','wp_comments','comment_date_gmt','2024-04-18 20:34:13','n_diff_pfx02',1651,3,'comment_date_gmt,comment_ID'),('db_admission','wp_comments','comment_date_gmt','2024-04-18 20:34:13','n_leaf_pages',3,NULL,'Number of leaf pages in the index'),('db_admission','wp_comments','comment_date_gmt','2024-04-18 20:34:13','size',4,NULL,'Number of pages in the index'),('db_admission','wp_comments','comment_parent','2024-04-18 20:34:13','n_diff_pfx01',1,3,'comment_parent'),('db_admission','wp_comments','comment_parent','2024-04-18 20:34:13','n_diff_pfx02',1651,3,'comment_parent,comment_ID'),('db_admission','wp_comments','comment_parent','2024-04-18 20:34:13','n_leaf_pages',3,NULL,'Number of leaf pages in the index'),('db_admission','wp_comments','comment_parent','2024-04-18 20:34:13','size',4,NULL,'Number of pages in the index'),('db_admission','wp_comments','comment_post_ID','2024-04-18 20:34:13','n_diff_pfx01',38,3,'comment_post_ID'),('db_admission','wp_comments','comment_post_ID','2024-04-18 20:34:13','n_diff_pfx02',1651,3,'comment_post_ID,comment_ID'),('db_admission','wp_comments','comment_post_ID','2024-04-18 20:34:13','n_leaf_pages',3,NULL,'Number of leaf pages in the index'),('db_admission','wp_comments','comment_post_ID','2024-04-18 20:34:13','size',4,NULL,'Number of pages in the index'),('db_admission','wp_frmt_form_entry','PRIMARY','2021-09-13 08:29:50','n_diff_pfx01',0,1,'entry_id'),('db_admission','wp_frmt_form_entry','PRIMARY','2021-09-13 08:29:50','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_frmt_form_entry','PRIMARY','2021-09-13 08:29:50','size',1,NULL,'Number of pages in the index'),('db_admission','wp_frmt_form_entry','entry_form_id','2021-09-13 08:29:50','n_diff_pfx01',0,1,'form_id'),('db_admission','wp_frmt_form_entry','entry_form_id','2021-09-13 08:29:50','n_diff_pfx02',0,1,'form_id,entry_id'),('db_admission','wp_frmt_form_entry','entry_form_id','2021-09-13 08:29:50','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_frmt_form_entry','entry_form_id','2021-09-13 08:29:50','size',1,NULL,'Number of pages in the index'),('db_admission','wp_frmt_form_entry','entry_is_spam','2021-09-13 08:29:50','n_diff_pfx01',0,1,'is_spam'),('db_admission','wp_frmt_form_entry','entry_is_spam','2021-09-13 08:29:50','n_diff_pfx02',0,1,'is_spam,entry_id'),('db_admission','wp_frmt_form_entry','entry_is_spam','2021-09-13 08:29:50','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_frmt_form_entry','entry_is_spam','2021-09-13 08:29:50','size',1,NULL,'Number of pages in the index'),('db_admission','wp_frmt_form_entry','entry_type','2021-09-13 08:29:50','n_diff_pfx01',0,1,'entry_type'),('db_admission','wp_frmt_form_entry','entry_type','2021-09-13 08:29:50','n_diff_pfx02',0,1,'entry_type,entry_id'),('db_admission','wp_frmt_form_entry','entry_type','2021-09-13 08:29:50','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_frmt_form_entry','entry_type','2021-09-13 08:29:50','size',1,NULL,'Number of pages in the index'),('db_admission','wp_frmt_form_entry_meta','PRIMARY','2021-09-13 08:29:50','n_diff_pfx01',0,1,'meta_id'),('db_admission','wp_frmt_form_entry_meta','PRIMARY','2021-09-13 08:29:50','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_frmt_form_entry_meta','PRIMARY','2021-09-13 08:29:50','size',1,NULL,'Number of pages in the index'),('db_admission','wp_frmt_form_entry_meta','meta_entry_id','2021-09-13 08:29:50','n_diff_pfx01',0,1,'entry_id'),('db_admission','wp_frmt_form_entry_meta','meta_entry_id','2021-09-13 08:29:50','n_diff_pfx02',0,1,'entry_id,meta_id'),('db_admission','wp_frmt_form_entry_meta','meta_entry_id','2021-09-13 08:29:50','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_frmt_form_entry_meta','meta_entry_id','2021-09-13 08:29:50','size',1,NULL,'Number of pages in the index'),('db_admission','wp_frmt_form_entry_meta','meta_key','2021-09-13 08:29:50','n_diff_pfx01',0,1,'meta_key'),('db_admission','wp_frmt_form_entry_meta','meta_key','2021-09-13 08:29:50','n_diff_pfx02',0,1,'meta_key,meta_id'),('db_admission','wp_frmt_form_entry_meta','meta_key','2021-09-13 08:29:50','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_frmt_form_entry_meta','meta_key','2021-09-13 08:29:50','size',1,NULL,'Number of pages in the index'),('db_admission','wp_frmt_form_entry_meta','meta_key_object','2021-09-13 08:29:50','n_diff_pfx01',0,1,'entry_id'),('db_admission','wp_frmt_form_entry_meta','meta_key_object','2021-09-13 08:29:50','n_diff_pfx02',0,1,'entry_id,meta_key'),('db_admission','wp_frmt_form_entry_meta','meta_key_object','2021-09-13 08:29:50','n_diff_pfx03',0,1,'entry_id,meta_key,meta_id'),('db_admission','wp_frmt_form_entry_meta','meta_key_object','2021-09-13 08:29:50','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_frmt_form_entry_meta','meta_key_object','2021-09-13 08:29:50','size',1,NULL,'Number of pages in the index'),('db_admission','wp_frmt_form_views','PRIMARY','2021-09-13 08:29:50','n_diff_pfx01',0,1,'view_id'),('db_admission','wp_frmt_form_views','PRIMARY','2021-09-13 08:29:50','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_frmt_form_views','PRIMARY','2021-09-13 08:29:50','size',1,NULL,'Number of pages in the index'),('db_admission','wp_frmt_form_views','view_form_id','2021-09-13 08:29:50','n_diff_pfx01',0,1,'form_id'),('db_admission','wp_frmt_form_views','view_form_id','2021-09-13 08:29:50','n_diff_pfx02',0,1,'form_id,view_id'),('db_admission','wp_frmt_form_views','view_form_id','2021-09-13 08:29:50','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_frmt_form_views','view_form_id','2021-09-13 08:29:50','size',1,NULL,'Number of pages in the index'),('db_admission','wp_frmt_form_views','view_form_object','2021-09-13 08:29:50','n_diff_pfx01',0,1,'form_id'),('db_admission','wp_frmt_form_views','view_form_object','2021-09-13 08:29:50','n_diff_pfx02',0,1,'form_id,view_id'),('db_admission','wp_frmt_form_views','view_form_object','2021-09-13 08:29:50','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_frmt_form_views','view_form_object','2021-09-13 08:29:50','size',1,NULL,'Number of pages in the index'),('db_admission','wp_frmt_form_views','view_form_object_ip','2021-09-13 08:29:50','n_diff_pfx01',0,1,'form_id'),('db_admission','wp_frmt_form_views','view_form_object_ip','2021-09-13 08:29:50','n_diff_pfx02',0,1,'form_id,view_id'),('db_admission','wp_frmt_form_views','view_form_object_ip','2021-09-13 08:29:50','n_diff_pfx03',0,1,'form_id,view_id,ip'),('db_admission','wp_frmt_form_views','view_form_object_ip','2021-09-13 08:29:50','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_frmt_form_views','view_form_object_ip','2021-09-13 08:29:50','size',1,NULL,'Number of pages in the index'),('db_admission','wp_frmt_form_views','view_ip','2021-09-13 08:29:50','n_diff_pfx01',0,1,'ip'),('db_admission','wp_frmt_form_views','view_ip','2021-09-13 08:29:50','n_diff_pfx02',0,1,'ip,view_id'),('db_admission','wp_frmt_form_views','view_ip','2021-09-13 08:29:50','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_frmt_form_views','view_ip','2021-09-13 08:29:50','size',1,NULL,'Number of pages in the index'),('db_admission','wp_links','PRIMARY','2021-09-13 08:29:50','n_diff_pfx01',0,1,'link_id'),('db_admission','wp_links','PRIMARY','2021-09-13 08:29:50','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_links','PRIMARY','2021-09-13 08:29:50','size',1,NULL,'Number of pages in the index'),('db_admission','wp_links','link_visible','2021-09-13 08:29:50','n_diff_pfx01',0,1,'link_visible'),('db_admission','wp_links','link_visible','2021-09-13 08:29:50','n_diff_pfx02',0,1,'link_visible,link_id'),('db_admission','wp_links','link_visible','2021-09-13 08:29:50','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_links','link_visible','2021-09-13 08:29:50','size',1,NULL,'Number of pages in the index'),('db_admission','wp_nextend2_image_storage','PRIMARY','2024-04-25 09:19:49','n_diff_pfx01',37,1,'id'),('db_admission','wp_nextend2_image_storage','PRIMARY','2024-04-25 09:19:49','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_nextend2_image_storage','PRIMARY','2024-04-25 09:19:49','size',1,NULL,'Number of pages in the index'),('db_admission','wp_nextend2_image_storage','hash','2024-04-25 09:19:49','n_diff_pfx01',37,1,'hash'),('db_admission','wp_nextend2_image_storage','hash','2024-04-25 09:19:49','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_nextend2_image_storage','hash','2024-04-25 09:19:49','size',1,NULL,'Number of pages in the index'),('db_admission','wp_nextend2_section_storage','PRIMARY','2024-05-17 06:35:35','n_diff_pfx01',6,1,'id'),('db_admission','wp_nextend2_section_storage','PRIMARY','2024-05-17 06:35:35','n_leaf_pages',2,NULL,'Number of leaf pages in the index'),('db_admission','wp_nextend2_section_storage','PRIMARY','2024-05-17 06:35:35','size',3,NULL,'Number of pages in the index'),('db_admission','wp_nextend2_section_storage','application','2024-05-17 06:35:35','n_diff_pfx01',2,1,'application'),('db_admission','wp_nextend2_section_storage','application','2024-05-17 06:35:35','n_diff_pfx02',3,1,'application,section'),('db_admission','wp_nextend2_section_storage','application','2024-05-17 06:35:35','n_diff_pfx03',6,1,'application,section,referencekey'),('db_admission','wp_nextend2_section_storage','application','2024-05-17 06:35:35','n_diff_pfx04',6,1,'application,section,referencekey,id'),('db_admission','wp_nextend2_section_storage','application','2024-05-17 06:35:35','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_nextend2_section_storage','application','2024-05-17 06:35:35','size',1,NULL,'Number of pages in the index'),('db_admission','wp_nextend2_section_storage','application_2','2024-05-17 06:35:35','n_diff_pfx01',2,1,'application'),('db_admission','wp_nextend2_section_storage','application_2','2024-05-17 06:35:35','n_diff_pfx02',3,1,'application,section'),('db_admission','wp_nextend2_section_storage','application_2','2024-05-17 06:35:35','n_diff_pfx03',6,1,'application,section,id'),('db_admission','wp_nextend2_section_storage','application_2','2024-05-17 06:35:35','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_nextend2_section_storage','application_2','2024-05-17 06:35:35','size',1,NULL,'Number of pages in the index'),('db_admission','wp_nextend2_section_storage','editable','2024-05-17 06:35:35','n_diff_pfx01',1,1,'editable'),('db_admission','wp_nextend2_section_storage','editable','2024-05-17 06:35:35','n_diff_pfx02',6,1,'editable,id'),('db_admission','wp_nextend2_section_storage','editable','2024-05-17 06:35:35','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_nextend2_section_storage','editable','2024-05-17 06:35:35','size',1,NULL,'Number of pages in the index'),('db_admission','wp_nextend2_section_storage','system','2024-05-17 06:35:35','n_diff_pfx01',1,1,'system'),('db_admission','wp_nextend2_section_storage','system','2024-05-17 06:35:35','n_diff_pfx02',6,1,'system,id'),('db_admission','wp_nextend2_section_storage','system','2024-05-17 06:35:35','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_nextend2_section_storage','system','2024-05-17 06:35:35','size',1,NULL,'Number of pages in the index'),('db_admission','wp_nextend2_smartslider3_generators','PRIMARY','2021-09-13 08:29:50','n_diff_pfx01',0,1,'id'),('db_admission','wp_nextend2_smartslider3_generators','PRIMARY','2021-09-13 08:29:50','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_nextend2_smartslider3_generators','PRIMARY','2021-09-13 08:29:50','size',1,NULL,'Number of pages in the index'),('db_admission','wp_nextend2_smartslider3_sliders','PRIMARY','2021-09-13 08:29:50','n_diff_pfx01',0,1,'id'),('db_admission','wp_nextend2_smartslider3_sliders','PRIMARY','2021-09-13 08:29:50','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_nextend2_smartslider3_sliders','PRIMARY','2021-09-13 08:29:50','size',1,NULL,'Number of pages in the index'),('db_admission','wp_nextend2_smartslider3_sliders','status','2021-09-13 08:29:50','n_diff_pfx01',0,1,'status'),('db_admission','wp_nextend2_smartslider3_sliders','status','2021-09-13 08:29:50','n_diff_pfx02',0,1,'status,id'),('db_admission','wp_nextend2_smartslider3_sliders','status','2021-09-13 08:29:50','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_nextend2_smartslider3_sliders','status','2021-09-13 08:29:50','size',1,NULL,'Number of pages in the index'),('db_admission','wp_nextend2_smartslider3_sliders','time','2021-09-13 08:29:50','n_diff_pfx01',0,1,'time'),('db_admission','wp_nextend2_smartslider3_sliders','time','2021-09-13 08:29:50','n_diff_pfx02',0,1,'time,id'),('db_admission','wp_nextend2_smartslider3_sliders','time','2021-09-13 08:29:50','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_nextend2_smartslider3_sliders','time','2021-09-13 08:29:50','size',1,NULL,'Number of pages in the index'),('db_admission','wp_nextend2_smartslider3_sliders_xref','PRIMARY','2021-09-13 08:29:50','n_diff_pfx01',0,1,'group_id'),('db_admission','wp_nextend2_smartslider3_sliders_xref','PRIMARY','2021-09-13 08:29:50','n_diff_pfx02',0,1,'group_id,slider_id'),('db_admission','wp_nextend2_smartslider3_sliders_xref','PRIMARY','2021-09-13 08:29:50','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_nextend2_smartslider3_sliders_xref','PRIMARY','2021-09-13 08:29:50','size',1,NULL,'Number of pages in the index'),('db_admission','wp_nextend2_smartslider3_sliders_xref','ordering','2021-09-13 08:29:50','n_diff_pfx01',0,1,'ordering'),('db_admission','wp_nextend2_smartslider3_sliders_xref','ordering','2021-09-13 08:29:50','n_diff_pfx02',0,1,'ordering,group_id'),('db_admission','wp_nextend2_smartslider3_sliders_xref','ordering','2021-09-13 08:29:50','n_diff_pfx03',0,1,'ordering,group_id,slider_id'),('db_admission','wp_nextend2_smartslider3_sliders_xref','ordering','2021-09-13 08:29:50','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_nextend2_smartslider3_sliders_xref','ordering','2021-09-13 08:29:50','size',1,NULL,'Number of pages in the index'),('db_admission','wp_nextend2_smartslider3_slides','PRIMARY','2024-04-30 08:04:39','n_diff_pfx01',6,1,'id'),('db_admission','wp_nextend2_smartslider3_slides','PRIMARY','2024-04-30 08:04:39','n_leaf_pages',2,NULL,'Number of leaf pages in the index'),('db_admission','wp_nextend2_smartslider3_slides','PRIMARY','2024-04-30 08:04:39','size',3,NULL,'Number of pages in the index'),('db_admission','wp_nextend2_smartslider3_slides','generator_id','2024-04-30 08:04:39','n_diff_pfx01',1,1,'generator_id'),('db_admission','wp_nextend2_smartslider3_slides','generator_id','2024-04-30 08:04:39','n_diff_pfx02',6,1,'generator_id,id'),('db_admission','wp_nextend2_smartslider3_slides','generator_id','2024-04-30 08:04:39','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_nextend2_smartslider3_slides','generator_id','2024-04-30 08:04:39','size',1,NULL,'Number of pages in the index'),('db_admission','wp_nextend2_smartslider3_slides','ordering','2024-04-30 08:04:39','n_diff_pfx01',4,1,'ordering'),('db_admission','wp_nextend2_smartslider3_slides','ordering','2024-04-30 08:04:39','n_diff_pfx02',6,1,'ordering,id'),('db_admission','wp_nextend2_smartslider3_slides','ordering','2024-04-30 08:04:39','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_nextend2_smartslider3_slides','ordering','2024-04-30 08:04:39','size',1,NULL,'Number of pages in the index'),('db_admission','wp_nextend2_smartslider3_slides','publish_down','2024-04-30 08:04:39','n_diff_pfx01',1,1,'publish_down'),('db_admission','wp_nextend2_smartslider3_slides','publish_down','2024-04-30 08:04:39','n_diff_pfx02',6,1,'publish_down,id'),('db_admission','wp_nextend2_smartslider3_slides','publish_down','2024-04-30 08:04:39','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_nextend2_smartslider3_slides','publish_down','2024-04-30 08:04:39','size',1,NULL,'Number of pages in the index'),('db_admission','wp_nextend2_smartslider3_slides','publish_up','2024-04-30 08:04:39','n_diff_pfx01',1,1,'publish_up'),('db_admission','wp_nextend2_smartslider3_slides','publish_up','2024-04-30 08:04:39','n_diff_pfx02',6,1,'publish_up,id'),('db_admission','wp_nextend2_smartslider3_slides','publish_up','2024-04-30 08:04:39','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_nextend2_smartslider3_slides','publish_up','2024-04-30 08:04:39','size',1,NULL,'Number of pages in the index'),('db_admission','wp_nextend2_smartslider3_slides','published','2024-04-30 08:04:39','n_diff_pfx01',2,1,'published'),('db_admission','wp_nextend2_smartslider3_slides','published','2024-04-30 08:04:39','n_diff_pfx02',6,1,'published,id'),('db_admission','wp_nextend2_smartslider3_slides','published','2024-04-30 08:04:39','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_nextend2_smartslider3_slides','published','2024-04-30 08:04:39','size',1,NULL,'Number of pages in the index'),('db_admission','wp_nextend2_smartslider3_slides','slider','2024-04-30 08:04:39','n_diff_pfx01',2,1,'slider'),('db_admission','wp_nextend2_smartslider3_slides','slider','2024-04-30 08:04:39','n_diff_pfx02',6,1,'slider,id'),('db_admission','wp_nextend2_smartslider3_slides','slider','2024-04-30 08:04:39','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_nextend2_smartslider3_slides','slider','2024-04-30 08:04:39','size',1,NULL,'Number of pages in the index'),('db_admission','wp_nextend2_smartslider3_slides','thumbnail','2024-04-30 08:04:39','n_diff_pfx01',6,1,'thumbnail'),('db_admission','wp_nextend2_smartslider3_slides','thumbnail','2024-04-30 08:04:39','n_diff_pfx02',6,1,'thumbnail,id'),('db_admission','wp_nextend2_smartslider3_slides','thumbnail','2024-04-30 08:04:39','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_nextend2_smartslider3_slides','thumbnail','2024-04-30 08:04:39','size',1,NULL,'Number of pages in the index'),('db_admission','wp_options','PRIMARY','2024-05-17 16:51:46','n_diff_pfx01',233,7,'option_id'),('db_admission','wp_options','PRIMARY','2024-05-17 16:51:46','n_leaf_pages',86,NULL,'Number of leaf pages in the index'),('db_admission','wp_options','PRIMARY','2024-05-17 16:51:46','size',137,NULL,'Number of pages in the index'),('db_admission','wp_options','autoload','2024-05-17 16:51:46','n_diff_pfx01',2,1,'autoload'),('db_admission','wp_options','autoload','2024-05-17 16:51:46','n_diff_pfx02',240,1,'autoload,option_id'),('db_admission','wp_options','autoload','2024-05-17 16:51:46','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_options','autoload','2024-05-17 16:51:46','size',1,NULL,'Number of pages in the index'),('db_admission','wp_options','option_name','2024-05-17 16:51:46','n_diff_pfx01',240,1,'option_name'),('db_admission','wp_options','option_name','2024-05-17 16:51:46','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_options','option_name','2024-05-17 16:51:46','size',1,NULL,'Number of pages in the index'),('db_admission','wp_postmeta','PRIMARY','2024-01-26 11:07:24','n_diff_pfx01',19050,20,'meta_id'),('db_admission','wp_postmeta','PRIMARY','2024-01-26 11:07:24','n_leaf_pages',252,NULL,'Number of leaf pages in the index'),('db_admission','wp_postmeta','PRIMARY','2024-01-26 11:07:24','size',289,NULL,'Number of pages in the index'),('db_admission','wp_postmeta','meta_key','2024-01-26 11:07:24','n_diff_pfx01',184,20,'meta_key'),('db_admission','wp_postmeta','meta_key','2024-01-26 11:07:24','n_diff_pfx02',17302,20,'meta_key,meta_id'),('db_admission','wp_postmeta','meta_key','2024-01-26 11:07:24','n_leaf_pages',40,NULL,'Number of leaf pages in the index'),('db_admission','wp_postmeta','meta_key','2024-01-26 11:07:24','size',97,NULL,'Number of pages in the index'),('db_admission','wp_postmeta','post_id','2024-01-26 11:07:24','n_diff_pfx01',4939,29,'post_id'),('db_admission','wp_postmeta','post_id','2024-01-26 11:07:24','n_diff_pfx02',17275,29,'post_id,meta_id'),('db_admission','wp_postmeta','post_id','2024-01-26 11:07:24','n_leaf_pages',29,NULL,'Number of leaf pages in the index'),('db_admission','wp_postmeta','post_id','2024-01-26 11:07:24','size',30,NULL,'Number of pages in the index'),('db_admission','wp_posts','PRIMARY','2024-05-07 07:49:17','n_diff_pfx01',4595,20,'ID'),('db_admission','wp_posts','PRIMARY','2024-05-07 07:49:17','n_leaf_pages',4604,NULL,'Number of leaf pages in the index'),('db_admission','wp_posts','PRIMARY','2024-05-07 07:49:17','size',5275,NULL,'Number of pages in the index'),('db_admission','wp_posts','post_author','2024-05-07 07:49:17','n_diff_pfx01',25,9,'post_author'),('db_admission','wp_posts','post_author','2024-05-07 07:49:17','n_diff_pfx02',5783,9,'post_author,ID'),('db_admission','wp_posts','post_author','2024-05-07 07:49:17','n_leaf_pages',9,NULL,'Number of leaf pages in the index'),('db_admission','wp_posts','post_author','2024-05-07 07:49:17','size',10,NULL,'Number of pages in the index'),('db_admission','wp_posts','post_name','2024-05-07 07:49:17','n_diff_pfx01',3376,36,'post_name'),('db_admission','wp_posts','post_name','2024-05-07 07:49:17','n_diff_pfx02',5783,36,'post_name,ID'),('db_admission','wp_posts','post_name','2024-05-07 07:49:17','n_leaf_pages',36,NULL,'Number of leaf pages in the index'),('db_admission','wp_posts','post_name','2024-05-07 07:49:17','size',94,NULL,'Number of pages in the index'),('db_admission','wp_posts','post_parent','2024-05-07 07:49:17','n_diff_pfx01',237,12,'post_parent'),('db_admission','wp_posts','post_parent','2024-05-07 07:49:17','n_diff_pfx02',5783,12,'post_parent,ID'),('db_admission','wp_posts','post_parent','2024-05-07 07:49:17','n_leaf_pages',12,NULL,'Number of leaf pages in the index'),('db_admission','wp_posts','post_parent','2024-05-07 07:49:17','size',13,NULL,'Number of pages in the index'),('db_admission','wp_posts','type_status_date','2024-05-07 07:49:17','n_diff_pfx01',9,16,'post_type'),('db_admission','wp_posts','type_status_date','2024-05-07 07:49:17','n_diff_pfx02',14,16,'post_type,post_status'),('db_admission','wp_posts','type_status_date','2024-05-07 07:49:17','n_diff_pfx03',5212,16,'post_type,post_status,post_date'),('db_admission','wp_posts','type_status_date','2024-05-07 07:49:17','n_diff_pfx04',5783,16,'post_type,post_status,post_date,ID'),('db_admission','wp_posts','type_status_date','2024-05-07 07:49:17','n_leaf_pages',16,NULL,'Number of leaf pages in the index'),('db_admission','wp_posts','type_status_date','2024-05-07 07:49:17','size',17,NULL,'Number of pages in the index'),('db_admission','wp_term_relationships','PRIMARY','2024-02-22 09:42:31','n_diff_pfx01',210,2,'object_id'),('db_admission','wp_term_relationships','PRIMARY','2024-02-22 09:42:31','n_diff_pfx02',526,2,'object_id,term_taxonomy_id'),('db_admission','wp_term_relationships','PRIMARY','2024-02-22 09:42:31','n_leaf_pages',2,NULL,'Number of leaf pages in the index'),('db_admission','wp_term_relationships','PRIMARY','2024-02-22 09:42:31','size',3,NULL,'Number of pages in the index'),('db_admission','wp_term_relationships','term_taxonomy_id','2024-02-22 09:42:31','n_diff_pfx01',101,1,'term_taxonomy_id'),('db_admission','wp_term_relationships','term_taxonomy_id','2024-02-22 09:42:31','n_diff_pfx02',526,1,'term_taxonomy_id,object_id'),('db_admission','wp_term_relationships','term_taxonomy_id','2024-02-22 09:42:31','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_term_relationships','term_taxonomy_id','2024-02-22 09:42:31','size',1,NULL,'Number of pages in the index'),('db_admission','wp_term_taxonomy','PRIMARY','2021-11-11 08:21:50','n_diff_pfx01',93,1,'term_taxonomy_id'),('db_admission','wp_term_taxonomy','PRIMARY','2021-11-11 08:21:50','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_term_taxonomy','PRIMARY','2021-11-11 08:21:50','size',1,NULL,'Number of pages in the index'),('db_admission','wp_term_taxonomy','taxonomy','2021-11-11 08:21:50','n_diff_pfx01',3,1,'taxonomy'),('db_admission','wp_term_taxonomy','taxonomy','2021-11-11 08:21:50','n_diff_pfx02',93,1,'taxonomy,term_taxonomy_id'),('db_admission','wp_term_taxonomy','taxonomy','2021-11-11 08:21:50','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_term_taxonomy','taxonomy','2021-11-11 08:21:50','size',1,NULL,'Number of pages in the index'),('db_admission','wp_term_taxonomy','term_id_taxonomy','2021-11-11 08:21:50','n_diff_pfx01',93,1,'term_id'),('db_admission','wp_term_taxonomy','term_id_taxonomy','2021-11-11 08:21:50','n_diff_pfx02',93,1,'term_id,taxonomy'),('db_admission','wp_term_taxonomy','term_id_taxonomy','2021-11-11 08:21:50','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_term_taxonomy','term_id_taxonomy','2021-11-11 08:21:50','size',1,NULL,'Number of pages in the index'),('db_admission','wp_termmeta','PRIMARY','2021-09-13 08:29:51','n_diff_pfx01',0,1,'meta_id'),('db_admission','wp_termmeta','PRIMARY','2021-09-13 08:29:51','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_termmeta','PRIMARY','2021-09-13 08:29:51','size',1,NULL,'Number of pages in the index'),('db_admission','wp_termmeta','meta_key','2021-09-13 08:29:51','n_diff_pfx01',0,1,'meta_key'),('db_admission','wp_termmeta','meta_key','2021-09-13 08:29:51','n_diff_pfx02',0,1,'meta_key,meta_id'),('db_admission','wp_termmeta','meta_key','2021-09-13 08:29:51','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_termmeta','meta_key','2021-09-13 08:29:51','size',1,NULL,'Number of pages in the index'),('db_admission','wp_termmeta','term_id','2021-09-13 08:29:51','n_diff_pfx01',0,1,'term_id'),('db_admission','wp_termmeta','term_id','2021-09-13 08:29:51','n_diff_pfx02',0,1,'term_id,meta_id'),('db_admission','wp_termmeta','term_id','2021-09-13 08:29:51','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_termmeta','term_id','2021-09-13 08:29:51','size',1,NULL,'Number of pages in the index'),('db_admission','wp_terms','PRIMARY','2021-11-11 08:21:50','n_diff_pfx01',93,1,'term_id'),('db_admission','wp_terms','PRIMARY','2021-11-11 08:21:50','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_terms','PRIMARY','2021-11-11 08:21:50','size',1,NULL,'Number of pages in the index'),('db_admission','wp_terms','name','2021-11-11 08:21:50','n_diff_pfx01',92,1,'name'),('db_admission','wp_terms','name','2021-11-11 08:21:50','n_diff_pfx02',93,1,'name,term_id'),('db_admission','wp_terms','name','2021-11-11 08:21:50','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_terms','name','2021-11-11 08:21:50','size',1,NULL,'Number of pages in the index'),('db_admission','wp_terms','slug','2021-11-11 08:21:50','n_diff_pfx01',93,1,'slug'),('db_admission','wp_terms','slug','2021-11-11 08:21:50','n_diff_pfx02',93,1,'slug,term_id'),('db_admission','wp_terms','slug','2021-11-11 08:21:50','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_terms','slug','2021-11-11 08:21:50','size',1,NULL,'Number of pages in the index'),('db_admission','wp_usermeta','PRIMARY','2023-02-22 15:03:48','n_diff_pfx01',507,3,'umeta_id'),('db_admission','wp_usermeta','PRIMARY','2023-02-22 15:03:48','n_leaf_pages',3,NULL,'Number of leaf pages in the index'),('db_admission','wp_usermeta','PRIMARY','2023-02-22 15:03:48','size',4,NULL,'Number of pages in the index'),('db_admission','wp_usermeta','meta_key','2023-02-22 15:03:48','n_diff_pfx01',44,1,'meta_key'),('db_admission','wp_usermeta','meta_key','2023-02-22 15:03:48','n_diff_pfx02',507,1,'meta_key,umeta_id'),('db_admission','wp_usermeta','meta_key','2023-02-22 15:03:48','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_usermeta','meta_key','2023-02-22 15:03:48','size',1,NULL,'Number of pages in the index'),('db_admission','wp_usermeta','user_id','2023-02-22 15:03:48','n_diff_pfx01',28,1,'user_id'),('db_admission','wp_usermeta','user_id','2023-02-22 15:03:48','n_diff_pfx02',507,1,'user_id,umeta_id'),('db_admission','wp_usermeta','user_id','2023-02-22 15:03:48','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_usermeta','user_id','2023-02-22 15:03:48','size',1,NULL,'Number of pages in the index'),('db_admission','wp_users','PRIMARY','2023-02-22 15:02:43','n_diff_pfx01',28,1,'ID'),('db_admission','wp_users','PRIMARY','2023-02-22 15:02:43','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_users','PRIMARY','2023-02-22 15:02:43','size',1,NULL,'Number of pages in the index'),('db_admission','wp_users','user_email','2023-02-22 15:02:43','n_diff_pfx01',28,1,'user_email'),('db_admission','wp_users','user_email','2023-02-22 15:02:43','n_diff_pfx02',28,1,'user_email,ID'),('db_admission','wp_users','user_email','2023-02-22 15:02:43','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_users','user_email','2023-02-22 15:02:43','size',1,NULL,'Number of pages in the index'),('db_admission','wp_users','user_login_key','2023-02-22 15:02:43','n_diff_pfx01',28,1,'user_login'),('db_admission','wp_users','user_login_key','2023-02-22 15:02:43','n_diff_pfx02',28,1,'user_login,ID'),('db_admission','wp_users','user_login_key','2023-02-22 15:02:43','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_users','user_login_key','2023-02-22 15:02:43','size',1,NULL,'Number of pages in the index'),('db_admission','wp_users','user_nicename','2023-02-22 15:02:43','n_diff_pfx01',28,1,'user_nicename'),('db_admission','wp_users','user_nicename','2023-02-22 15:02:43','n_diff_pfx02',28,1,'user_nicename,ID'),('db_admission','wp_users','user_nicename','2023-02-22 15:02:43','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_users','user_nicename','2023-02-22 15:02:43','size',1,NULL,'Number of pages in the index'),('db_admission','wp_wpforms_tasks_meta','PRIMARY','2021-09-13 08:29:59','n_diff_pfx01',7,1,'id'),('db_admission','wp_wpforms_tasks_meta','PRIMARY','2021-09-13 08:29:59','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admission','wp_wpforms_tasks_meta','PRIMARY','2021-09-13 08:29:59','size',1,NULL,'Number of pages in the index'),('db_admissionksu','tb_academic_year','PRIMARY','2023-10-03 02:48:24','n_diff_pfx01',2,1,'ACADEMIC_YEAR'),('db_admissionksu','tb_academic_year','PRIMARY','2023-10-03 02:48:24','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admissionksu','tb_academic_year','PRIMARY','2023-10-03 02:48:24','size',1,NULL,'Number of pages in the index'),('db_admissionksu','tb_apps','PRIMARY','2024-03-08 08:09:13','n_diff_pfx01',8859,20,'ID_APP'),('db_admissionksu','tb_apps','PRIMARY','2024-03-08 08:09:13','n_leaf_pages',184,NULL,'Number of leaf pages in the index'),('db_admissionksu','tb_apps','PRIMARY','2024-03-08 08:09:13','size',225,NULL,'Number of pages in the index'),('db_admissionksu','tb_enroll','PRIMARY','2024-05-17 04:45:22','n_diff_pfx01',1548,20,'CITIZEN_ID'),('db_admissionksu','tb_enroll','PRIMARY','2024-05-17 04:45:22','n_leaf_pages',79,NULL,'Number of leaf pages in the index'),('db_admissionksu','tb_enroll','PRIMARY','2024-05-17 04:45:22','size',97,NULL,'Number of pages in the index'),('db_admissionksu','tb_enrollup','PRIMARY','2024-05-04 10:39:05','n_diff_pfx01',1448,19,'CITIZEN_ID'),('db_admissionksu','tb_enrollup','PRIMARY','2024-05-04 10:39:05','n_leaf_pages',19,NULL,'Number of leaf pages in the index'),('db_admissionksu','tb_enrollup','PRIMARY','2024-05-04 10:39:05','size',20,NULL,'Number of pages in the index'),('db_admissionksu','tb_faculty','PRIMARY','2022-11-19 22:51:31','n_diff_pfx01',6,1,'FAC_ID'),('db_admissionksu','tb_faculty','PRIMARY','2022-11-19 22:51:31','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admissionksu','tb_faculty','PRIMARY','2022-11-19 22:51:31','size',1,NULL,'Number of pages in the index'),('db_admissionksu','tb_interview_group_program','PRIMARY','2023-12-11 03:54:45','n_diff_pfx01',17,1,'GROUP_PRO_ID'),('db_admissionksu','tb_interview_group_program','PRIMARY','2023-12-11 03:54:45','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admissionksu','tb_interview_group_program','PRIMARY','2023-12-11 03:54:45','size',1,NULL,'Number of pages in the index'),('db_admissionksu','tb_interview_member','PRIMARY','2023-10-06 07:25:09','n_diff_pfx01',254,1,'MEMBER_ID'),('db_admissionksu','tb_interview_member','PRIMARY','2023-10-06 07:25:09','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admissionksu','tb_interview_member','PRIMARY','2023-10-06 07:25:09','size',1,NULL,'Number of pages in the index'),('db_admissionksu','tb_interview_member_group','PRIMARY','2024-05-13 03:29:04','n_diff_pfx01',3534,12,'MEMBER_GROUP_ID'),('db_admissionksu','tb_interview_member_group','PRIMARY','2024-05-13 03:29:04','n_leaf_pages',12,NULL,'Number of leaf pages in the index'),('db_admissionksu','tb_interview_member_group','PRIMARY','2024-05-13 03:29:04','size',13,NULL,'Number of pages in the index'),('db_admissionksu','tb_interview_qrcode_program','PRIMARY','2024-04-24 02:36:11','n_diff_pfx01',847,7,'IV_QRCODE_PROGRAM'),('db_admissionksu','tb_interview_qrcode_program','PRIMARY','2024-04-24 02:36:11','n_leaf_pages',7,NULL,'Number of leaf pages in the index'),('db_admissionksu','tb_interview_qrcode_program','PRIMARY','2024-04-24 02:36:11','size',8,NULL,'Number of pages in the index'),('db_admissionksu','tb_interview_std_status','PRIMARY','2024-04-05 09:00:10','n_diff_pfx01',6495,20,'STD_STATUS_ID'),('db_admissionksu','tb_interview_std_status','PRIMARY','2024-04-05 09:00:10','n_leaf_pages',47,NULL,'Number of leaf pages in the index'),('db_admissionksu','tb_interview_std_status','PRIMARY','2024-04-05 09:00:10','size',97,NULL,'Number of pages in the index'),('db_admissionksu','tb_interview_submit_result','PRIMARY','2024-04-05 07:24:01','n_diff_pfx01',386,2,'IV_RESULT_ID'),('db_admissionksu','tb_interview_submit_result','PRIMARY','2024-04-05 07:24:01','n_leaf_pages',2,NULL,'Number of leaf pages in the index'),('db_admissionksu','tb_interview_submit_result','PRIMARY','2024-04-05 07:24:01','size',3,NULL,'Number of pages in the index'),('db_admissionksu','tb_level','PRIMARY','2023-09-28 06:42:42','n_diff_pfx01',6,1,'LEVEL_ID'),('db_admissionksu','tb_level','PRIMARY','2023-09-28 06:42:42','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admissionksu','tb_level','PRIMARY','2023-09-28 06:42:42','size',1,NULL,'Number of pages in the index'),('db_admissionksu','tb_pay_registration_fee','PRIMARY','2023-10-31 03:41:18','n_diff_pfx01',418,3,'PAY_REGISTRATION_ID'),('db_admissionksu','tb_pay_registration_fee','PRIMARY','2023-10-31 03:41:18','n_leaf_pages',3,NULL,'Number of leaf pages in the index'),('db_admissionksu','tb_pay_registration_fee','PRIMARY','2023-10-31 03:41:18','size',4,NULL,'Number of pages in the index'),('db_admissionksu','tb_payback','PRIMARY','2022-09-15 07:56:25','n_diff_pfx01',421,8,'PAYID'),('db_admissionksu','tb_payback','PRIMARY','2022-09-15 07:56:25','n_leaf_pages',8,NULL,'Number of leaf pages in the index'),('db_admissionksu','tb_payback','PRIMARY','2022-09-15 07:56:25','size',9,NULL,'Number of pages in the index'),('db_admissionksu','tb_program','PRIMARY','2023-10-02 04:16:07','n_diff_pfx01',111,4,'PROGRAM_CODE'),('db_admissionksu','tb_program','PRIMARY','2023-10-02 04:16:07','n_leaf_pages',4,NULL,'Number of leaf pages in the index'),('db_admissionksu','tb_program','PRIMARY','2023-10-02 04:16:07','size',5,NULL,'Number of pages in the index'),('db_admissionksu','tb_quota','PRIMARY','2023-09-20 05:11:29','n_diff_pfx01',16,2,'quotaId'),('db_admissionksu','tb_quota','PRIMARY','2023-09-20 05:11:29','n_leaf_pages',2,NULL,'Number of leaf pages in the index'),('db_admissionksu','tb_quota','PRIMARY','2023-09-20 05:11:29','size',3,NULL,'Number of pages in the index'),('db_admissionksu','tb_quota_fac','PRIMARY','2023-09-05 07:05:39','n_diff_pfx01',31,1,'quotaFacId'),('db_admissionksu','tb_quota_fac','PRIMARY','2023-09-05 07:05:39','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admissionksu','tb_quota_fac','PRIMARY','2023-09-05 07:05:39','size',1,NULL,'Number of pages in the index'),('db_admissionksu','tb_rec_rounds','PRIMARY','2023-09-06 04:02:18','n_diff_pfx01',6,1,'recRoundsId'),('db_admissionksu','tb_rec_rounds','PRIMARY','2023-09-06 04:02:18','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admissionksu','tb_rec_rounds','PRIMARY','2023-09-06 04:02:18','size',1,NULL,'Number of pages in the index'),('db_admissionksu','tb_round','PRIMARY','2023-12-13 00:15:49','n_diff_pfx01',15,1,'ROUND_ID'),('db_admissionksu','tb_round','PRIMARY','2023-12-13 00:15:49','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admissionksu','tb_round','PRIMARY','2023-12-13 00:15:49','size',1,NULL,'Number of pages in the index'),('db_admissionksu','tb_school','PRIMARY','2023-09-01 10:08:15','n_diff_pfx01',1091,8,'schoold'),('db_admissionksu','tb_school','PRIMARY','2023-09-01 10:08:15','n_leaf_pages',8,NULL,'Number of leaf pages in the index'),('db_admissionksu','tb_school','PRIMARY','2023-09-01 10:08:15','size',9,NULL,'Number of pages in the index'),('db_admissionksu','tb_stdprofile','PRIMARY','2024-03-08 10:42:58','n_diff_pfx01',6649,20,'CITIZEN_ID'),('db_admissionksu','tb_stdprofile','PRIMARY','2024-03-08 10:42:58','n_leaf_pages',291,NULL,'Number of leaf pages in the index'),('db_admissionksu','tb_stdprofile','PRIMARY','2024-03-08 10:42:58','size',385,NULL,'Number of pages in the index'),('db_admissionksu','tb_teacher','PRIMARY','2022-09-15 07:56:18','n_diff_pfx01',535,5,'USERNAME_LOGIN'),('db_admissionksu','tb_teacher','PRIMARY','2022-09-15 07:56:18','n_leaf_pages',5,NULL,'Number of leaf pages in the index'),('db_admissionksu','tb_teacher','PRIMARY','2022-09-15 07:56:18','size',6,NULL,'Number of pages in the index'),('db_admissionksu','tbl_login','PRIMARY','2023-05-11 00:21:26','n_diff_pfx01',5,1,'user_id'),('db_admissionksu','tbl_login','PRIMARY','2023-05-11 00:21:26','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_admissionksu','tbl_login','PRIMARY','2023-05-11 00:21:26','size',1,NULL,'Number of pages in the index'),('db_dc','admins','GEN_CLUST_INDEX','2021-01-27 03:47:24','n_diff_pfx01',0,1,'DB_ROW_ID'),('db_dc','admins','GEN_CLUST_INDEX','2021-01-27 03:47:24','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','admins','GEN_CLUST_INDEX','2021-01-27 03:47:24','size',1,NULL,'Number of pages in the index'),('db_dc','answer','GEN_CLUST_INDEX','2021-01-27 03:47:24','n_diff_pfx01',0,1,'DB_ROW_ID'),('db_dc','answer','GEN_CLUST_INDEX','2021-01-27 03:47:24','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','answer','GEN_CLUST_INDEX','2021-01-27 03:47:24','size',1,NULL,'Number of pages in the index'),('db_dc','dc_cert63','PRIMARY','2021-05-30 16:36:05','n_diff_pfx01',485,7,'id'),('db_dc','dc_cert63','PRIMARY','2021-05-30 16:36:05','n_leaf_pages',7,NULL,'Number of leaf pages in the index'),('db_dc','dc_cert63','PRIMARY','2021-05-30 16:36:05','size',8,NULL,'Number of pages in the index'),('db_dc','exam_code','PRIMARY','2021-01-27 03:47:37','n_diff_pfx01',5,1,'id'),('db_dc','exam_code','PRIMARY','2021-01-27 03:47:37','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','exam_code','PRIMARY','2021-01-27 03:47:37','size',1,NULL,'Number of pages in the index'),('db_dc','history','PRIMARY','2021-01-27 03:47:26','n_diff_pfx01',2994,15,'hisid'),('db_dc','history','PRIMARY','2021-01-27 03:47:26','n_leaf_pages',15,NULL,'Number of leaf pages in the index'),('db_dc','history','PRIMARY','2021-01-27 03:47:26','size',16,NULL,'Number of pages in the index'),('db_dc','options','PRIMARY','2021-01-27 03:47:27','n_diff_pfx01',544,5,'option_id'),('db_dc','options','PRIMARY','2021-01-27 03:47:27','n_leaf_pages',5,NULL,'Number of leaf pages in the index'),('db_dc','options','PRIMARY','2021-01-27 03:47:27','size',6,NULL,'Number of pages in the index'),('db_dc','question','PRIMARY','2021-01-27 03:47:27','n_diff_pfx01',136,3,'question_id'),('db_dc','question','PRIMARY','2021-01-27 03:47:27','n_leaf_pages',3,NULL,'Number of leaf pages in the index'),('db_dc','question','PRIMARY','2021-01-27 03:47:27','size',4,NULL,'Number of pages in the index'),('db_dc','quiz','PRIMARY','2021-01-27 03:47:29','n_diff_pfx01',2,1,'quiz_id'),('db_dc','quiz','PRIMARY','2021-01-27 03:47:29','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','quiz','PRIMARY','2021-01-27 03:47:29','size',1,NULL,'Number of pages in the index'),('db_dc','std63','PRIMARY','2021-03-22 16:19:19','n_diff_pfx01',1018,17,'STDID'),('db_dc','std63','PRIMARY','2021-03-22 16:19:19','n_leaf_pages',17,NULL,'Number of leaf pages in the index'),('db_dc','std63','PRIMARY','2021-03-22 16:19:19','size',18,NULL,'Number of pages in the index'),('db_dc','tb_profile','PRIMARY','2022-01-11 13:11:33','n_diff_pfx01',1,1,'pid'),('db_dc','tb_profile','PRIMARY','2022-01-11 13:11:33','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','tb_profile','PRIMARY','2022-01-11 13:11:33','size',1,NULL,'Number of pages in the index'),('db_dc','tb_resvote','PRIMARY','2022-01-14 03:34:39','n_diff_pfx01',18,1,'vid'),('db_dc','tb_resvote','PRIMARY','2022-01-14 03:34:39','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','tb_resvote','PRIMARY','2022-01-14 03:34:39','size',1,NULL,'Number of pages in the index'),('db_dc','tb_users','PRIMARY','2022-01-11 13:24:46','n_diff_pfx01',1,1,'id'),('db_dc','tb_users','PRIMARY','2022-01-11 13:24:46','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','tb_users','PRIMARY','2022-01-11 13:24:46','size',1,NULL,'Number of pages in the index'),('db_dc','users','PRIMARY','2021-01-27 03:47:29','n_diff_pfx01',1160,20,'CITIZEN_ID'),('db_dc','users','PRIMARY','2021-01-27 03:47:29','n_leaf_pages',35,NULL,'Number of leaf pages in the index'),('db_dc','users','PRIMARY','2021-01-27 03:47:29','size',97,NULL,'Number of pages in the index'),('db_dc','wp_commentmeta','PRIMARY','2021-01-31 03:34:11','n_diff_pfx01',10,1,'meta_id'),('db_dc','wp_commentmeta','PRIMARY','2021-01-31 03:34:11','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_commentmeta','PRIMARY','2021-01-31 03:34:11','size',1,NULL,'Number of pages in the index'),('db_dc','wp_commentmeta','comment_id','2021-01-31 03:34:11','n_diff_pfx01',4,1,'comment_id'),('db_dc','wp_commentmeta','comment_id','2021-01-31 03:34:11','n_diff_pfx02',10,1,'comment_id,meta_id'),('db_dc','wp_commentmeta','comment_id','2021-01-31 03:34:11','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_commentmeta','comment_id','2021-01-31 03:34:11','size',1,NULL,'Number of pages in the index'),('db_dc','wp_commentmeta','meta_key','2021-01-31 03:34:11','n_diff_pfx01',3,1,'meta_key'),('db_dc','wp_commentmeta','meta_key','2021-01-31 03:34:11','n_diff_pfx02',10,1,'meta_key,meta_id'),('db_dc','wp_commentmeta','meta_key','2021-01-31 03:34:11','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_commentmeta','meta_key','2021-01-31 03:34:11','size',1,NULL,'Number of pages in the index'),('db_dc','wp_comments','PRIMARY','2021-07-10 07:20:07','n_diff_pfx01',6,1,'comment_ID'),('db_dc','wp_comments','PRIMARY','2021-07-10 07:20:07','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_comments','PRIMARY','2021-07-10 07:20:07','size',1,NULL,'Number of pages in the index'),('db_dc','wp_comments','comment_approved_date_gmt','2021-07-10 07:20:07','n_diff_pfx01',4,1,'comment_approved'),('db_dc','wp_comments','comment_approved_date_gmt','2021-07-10 07:20:07','n_diff_pfx02',6,1,'comment_approved,comment_date_gmt'),('db_dc','wp_comments','comment_approved_date_gmt','2021-07-10 07:20:07','n_diff_pfx03',6,1,'comment_approved,comment_date_gmt,comment_ID'),('db_dc','wp_comments','comment_approved_date_gmt','2021-07-10 07:20:07','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_comments','comment_approved_date_gmt','2021-07-10 07:20:07','size',1,NULL,'Number of pages in the index'),('db_dc','wp_comments','comment_author_email','2021-07-10 07:20:07','n_diff_pfx01',1,1,'comment_author_email'),('db_dc','wp_comments','comment_author_email','2021-07-10 07:20:07','n_diff_pfx02',6,1,'comment_author_email,comment_ID'),('db_dc','wp_comments','comment_author_email','2021-07-10 07:20:07','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_comments','comment_author_email','2021-07-10 07:20:07','size',1,NULL,'Number of pages in the index'),('db_dc','wp_comments','comment_date_gmt','2021-07-10 07:20:07','n_diff_pfx01',5,1,'comment_date_gmt'),('db_dc','wp_comments','comment_date_gmt','2021-07-10 07:20:07','n_diff_pfx02',6,1,'comment_date_gmt,comment_ID'),('db_dc','wp_comments','comment_date_gmt','2021-07-10 07:20:07','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_comments','comment_date_gmt','2021-07-10 07:20:07','size',1,NULL,'Number of pages in the index'),('db_dc','wp_comments','comment_parent','2021-07-10 07:20:07','n_diff_pfx01',1,1,'comment_parent'),('db_dc','wp_comments','comment_parent','2021-07-10 07:20:07','n_diff_pfx02',6,1,'comment_parent,comment_ID'),('db_dc','wp_comments','comment_parent','2021-07-10 07:20:07','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_comments','comment_parent','2021-07-10 07:20:07','size',1,NULL,'Number of pages in the index'),('db_dc','wp_comments','comment_post_ID','2021-07-10 07:20:07','n_diff_pfx01',5,1,'comment_post_ID'),('db_dc','wp_comments','comment_post_ID','2021-07-10 07:20:07','n_diff_pfx02',6,1,'comment_post_ID,comment_ID'),('db_dc','wp_comments','comment_post_ID','2021-07-10 07:20:07','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_comments','comment_post_ID','2021-07-10 07:20:07','size',1,NULL,'Number of pages in the index'),('db_dc','wp_links','PRIMARY','2021-01-27 03:47:29','n_diff_pfx01',0,1,'link_id'),('db_dc','wp_links','PRIMARY','2021-01-27 03:47:29','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_links','PRIMARY','2021-01-27 03:47:29','size',1,NULL,'Number of pages in the index'),('db_dc','wp_links','link_visible','2021-01-27 03:47:29','n_diff_pfx01',0,1,'link_visible'),('db_dc','wp_links','link_visible','2021-01-27 03:47:29','n_diff_pfx02',0,1,'link_visible,link_id'),('db_dc','wp_links','link_visible','2021-01-27 03:47:29','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_links','link_visible','2021-01-27 03:47:29','size',1,NULL,'Number of pages in the index'),('db_dc','wp_options','PRIMARY','2022-01-18 03:25:22','n_diff_pfx01',265,4,'option_id'),('db_dc','wp_options','PRIMARY','2022-01-18 03:25:22','n_leaf_pages',19,NULL,'Number of leaf pages in the index'),('db_dc','wp_options','PRIMARY','2022-01-18 03:25:22','size',69,NULL,'Number of pages in the index'),('db_dc','wp_options','autoload','2022-01-18 03:25:22','n_diff_pfx01',2,1,'autoload'),('db_dc','wp_options','autoload','2022-01-18 03:25:22','n_diff_pfx02',265,1,'autoload,option_id'),('db_dc','wp_options','autoload','2022-01-18 03:25:22','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_options','autoload','2022-01-18 03:25:22','size',1,NULL,'Number of pages in the index'),('db_dc','wp_options','option_name','2022-01-18 03:25:22','n_diff_pfx01',265,1,'option_name'),('db_dc','wp_options','option_name','2022-01-18 03:25:22','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_options','option_name','2022-01-18 03:25:22','size',1,NULL,'Number of pages in the index'),('db_dc','wp_postmeta','PRIMARY','2021-01-27 03:47:36','n_diff_pfx01',3561,20,'meta_id'),('db_dc','wp_postmeta','PRIMARY','2021-01-27 03:47:36','n_leaf_pages',20,NULL,'Number of leaf pages in the index'),('db_dc','wp_postmeta','PRIMARY','2021-01-27 03:47:36','size',21,NULL,'Number of pages in the index'),('db_dc','wp_postmeta','meta_key','2021-01-27 03:47:36','n_diff_pfx01',110,9,'meta_key'),('db_dc','wp_postmeta','meta_key','2021-01-27 03:47:36','n_diff_pfx02',3581,9,'meta_key,meta_id'),('db_dc','wp_postmeta','meta_key','2021-01-27 03:47:36','n_leaf_pages',9,NULL,'Number of leaf pages in the index'),('db_dc','wp_postmeta','meta_key','2021-01-27 03:47:36','size',10,NULL,'Number of pages in the index'),('db_dc','wp_postmeta','post_id','2021-01-27 03:47:36','n_diff_pfx01',443,8,'post_id'),('db_dc','wp_postmeta','post_id','2021-01-27 03:47:36','n_diff_pfx02',3581,8,'post_id,meta_id'),('db_dc','wp_postmeta','post_id','2021-01-27 03:47:36','n_leaf_pages',8,NULL,'Number of leaf pages in the index'),('db_dc','wp_postmeta','post_id','2021-01-27 03:47:36','size',9,NULL,'Number of pages in the index'),('db_dc','wp_posts','PRIMARY','2021-08-03 11:12:34','n_diff_pfx01',458,20,'ID'),('db_dc','wp_posts','PRIMARY','2021-08-03 11:12:34','n_leaf_pages',315,NULL,'Number of leaf pages in the index'),('db_dc','wp_posts','PRIMARY','2021-08-03 11:12:34','size',412,NULL,'Number of pages in the index'),('db_dc','wp_posts','post_author','2021-08-03 11:12:34','n_diff_pfx01',17,1,'post_author'),('db_dc','wp_posts','post_author','2021-08-03 11:12:34','n_diff_pfx02',547,1,'post_author,ID'),('db_dc','wp_posts','post_author','2021-08-03 11:12:34','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_posts','post_author','2021-08-03 11:12:34','size',1,NULL,'Number of pages in the index'),('db_dc','wp_posts','post_name','2021-08-03 11:12:34','n_diff_pfx01',300,2,'post_name'),('db_dc','wp_posts','post_name','2021-08-03 11:12:34','n_diff_pfx02',547,2,'post_name,ID'),('db_dc','wp_posts','post_name','2021-08-03 11:12:34','n_leaf_pages',2,NULL,'Number of leaf pages in the index'),('db_dc','wp_posts','post_name','2021-08-03 11:12:34','size',3,NULL,'Number of pages in the index'),('db_dc','wp_posts','post_parent','2021-08-03 11:12:34','n_diff_pfx01',37,1,'post_parent'),('db_dc','wp_posts','post_parent','2021-08-03 11:12:34','n_diff_pfx02',547,1,'post_parent,ID'),('db_dc','wp_posts','post_parent','2021-08-03 11:12:34','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_posts','post_parent','2021-08-03 11:12:34','size',1,NULL,'Number of pages in the index'),('db_dc','wp_posts','type_status_date','2021-08-03 11:12:34','n_diff_pfx01',20,2,'post_type'),('db_dc','wp_posts','type_status_date','2021-08-03 11:12:34','n_diff_pfx02',22,2,'post_type,post_status'),('db_dc','wp_posts','type_status_date','2021-08-03 11:12:34','n_diff_pfx03',496,2,'post_type,post_status,post_date'),('db_dc','wp_posts','type_status_date','2021-08-03 11:12:34','n_diff_pfx04',547,2,'post_type,post_status,post_date,ID'),('db_dc','wp_posts','type_status_date','2021-08-03 11:12:34','n_leaf_pages',2,NULL,'Number of leaf pages in the index'),('db_dc','wp_posts','type_status_date','2021-08-03 11:12:34','size',3,NULL,'Number of pages in the index'),('db_dc','wp_social_users','GEN_CLUST_INDEX','2021-06-07 10:15:40','n_diff_pfx01',12,1,'DB_ROW_ID'),('db_dc','wp_social_users','GEN_CLUST_INDEX','2021-06-07 10:15:40','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_social_users','GEN_CLUST_INDEX','2021-06-07 10:15:40','size',1,NULL,'Number of pages in the index'),('db_dc','wp_social_users','ID','2021-06-07 10:15:40','n_diff_pfx01',12,1,'ID'),('db_dc','wp_social_users','ID','2021-06-07 10:15:40','n_diff_pfx02',12,1,'ID,type'),('db_dc','wp_social_users','ID','2021-06-07 10:15:40','n_diff_pfx03',12,1,'ID,type,DB_ROW_ID'),('db_dc','wp_social_users','ID','2021-06-07 10:15:40','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_social_users','ID','2021-06-07 10:15:40','size',1,NULL,'Number of pages in the index'),('db_dc','wp_social_users','identifier','2021-06-07 10:15:40','n_diff_pfx01',12,1,'identifier'),('db_dc','wp_social_users','identifier','2021-06-07 10:15:40','n_diff_pfx02',12,1,'identifier,DB_ROW_ID'),('db_dc','wp_social_users','identifier','2021-06-07 10:15:40','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_social_users','identifier','2021-06-07 10:15:40','size',1,NULL,'Number of pages in the index'),('db_dc','wp_term_relationships','PRIMARY','2021-07-14 13:09:28','n_diff_pfx01',29,1,'object_id'),('db_dc','wp_term_relationships','PRIMARY','2021-07-14 13:09:28','n_diff_pfx02',52,1,'object_id,term_taxonomy_id'),('db_dc','wp_term_relationships','PRIMARY','2021-07-14 13:09:28','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_term_relationships','PRIMARY','2021-07-14 13:09:28','size',1,NULL,'Number of pages in the index'),('db_dc','wp_term_relationships','term_taxonomy_id','2021-07-14 13:09:28','n_diff_pfx01',28,1,'term_taxonomy_id'),('db_dc','wp_term_relationships','term_taxonomy_id','2021-07-14 13:09:28','n_diff_pfx02',52,1,'term_taxonomy_id,object_id'),('db_dc','wp_term_relationships','term_taxonomy_id','2021-07-14 13:09:28','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_term_relationships','term_taxonomy_id','2021-07-14 13:09:28','size',1,NULL,'Number of pages in the index'),('db_dc','wp_term_taxonomy','PRIMARY','2021-06-04 15:01:46','n_diff_pfx01',29,1,'term_taxonomy_id'),('db_dc','wp_term_taxonomy','PRIMARY','2021-06-04 15:01:46','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_term_taxonomy','PRIMARY','2021-06-04 15:01:46','size',1,NULL,'Number of pages in the index'),('db_dc','wp_term_taxonomy','taxonomy','2021-06-04 15:01:46','n_diff_pfx01',7,1,'taxonomy'),('db_dc','wp_term_taxonomy','taxonomy','2021-06-04 15:01:46','n_diff_pfx02',29,1,'taxonomy,term_taxonomy_id'),('db_dc','wp_term_taxonomy','taxonomy','2021-06-04 15:01:46','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_term_taxonomy','taxonomy','2021-06-04 15:01:46','size',1,NULL,'Number of pages in the index'),('db_dc','wp_term_taxonomy','term_id_taxonomy','2021-06-04 15:01:46','n_diff_pfx01',29,1,'term_id'),('db_dc','wp_term_taxonomy','term_id_taxonomy','2021-06-04 15:01:46','n_diff_pfx02',29,1,'term_id,taxonomy'),('db_dc','wp_term_taxonomy','term_id_taxonomy','2021-06-04 15:01:46','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_term_taxonomy','term_id_taxonomy','2021-06-04 15:01:46','size',1,NULL,'Number of pages in the index'),('db_dc','wp_termmeta','PRIMARY','2021-01-27 03:47:37','n_diff_pfx01',0,1,'meta_id'),('db_dc','wp_termmeta','PRIMARY','2021-01-27 03:47:37','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_termmeta','PRIMARY','2021-01-27 03:47:37','size',1,NULL,'Number of pages in the index'),('db_dc','wp_termmeta','meta_key','2021-01-27 03:47:37','n_diff_pfx01',0,1,'meta_key'),('db_dc','wp_termmeta','meta_key','2021-01-27 03:47:37','n_diff_pfx02',0,1,'meta_key,meta_id'),('db_dc','wp_termmeta','meta_key','2021-01-27 03:47:37','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_termmeta','meta_key','2021-01-27 03:47:37','size',1,NULL,'Number of pages in the index'),('db_dc','wp_termmeta','term_id','2021-01-27 03:47:37','n_diff_pfx01',0,1,'term_id'),('db_dc','wp_termmeta','term_id','2021-01-27 03:47:37','n_diff_pfx02',0,1,'term_id,meta_id'),('db_dc','wp_termmeta','term_id','2021-01-27 03:47:37','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_termmeta','term_id','2021-01-27 03:47:37','size',1,NULL,'Number of pages in the index'),('db_dc','wp_terms','PRIMARY','2021-06-04 15:01:46','n_diff_pfx01',29,1,'term_id'),('db_dc','wp_terms','PRIMARY','2021-06-04 15:01:46','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_terms','PRIMARY','2021-06-04 15:01:46','size',1,NULL,'Number of pages in the index'),('db_dc','wp_terms','name','2021-06-04 15:01:46','n_diff_pfx01',29,1,'name'),('db_dc','wp_terms','name','2021-06-04 15:01:46','n_diff_pfx02',29,1,'name,term_id'),('db_dc','wp_terms','name','2021-06-04 15:01:46','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_terms','name','2021-06-04 15:01:46','size',1,NULL,'Number of pages in the index'),('db_dc','wp_terms','slug','2021-06-04 15:01:46','n_diff_pfx01',29,1,'slug'),('db_dc','wp_terms','slug','2021-06-04 15:01:46','n_diff_pfx02',29,1,'slug,term_id'),('db_dc','wp_terms','slug','2021-06-04 15:01:46','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_terms','slug','2021-06-04 15:01:46','size',1,NULL,'Number of pages in the index'),('db_dc','wp_tutor_earnings','PRIMARY','2021-01-27 03:47:37','n_diff_pfx01',0,1,'earning_id'),('db_dc','wp_tutor_earnings','PRIMARY','2021-01-27 03:47:37','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_tutor_earnings','PRIMARY','2021-01-27 03:47:37','size',1,NULL,'Number of pages in the index'),('db_dc','wp_tutor_quiz_attempt_answers','PRIMARY','2021-03-16 15:38:17','n_diff_pfx01',4,1,'attempt_answer_id'),('db_dc','wp_tutor_quiz_attempt_answers','PRIMARY','2021-03-16 15:38:17','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_tutor_quiz_attempt_answers','PRIMARY','2021-03-16 15:38:17','size',1,NULL,'Number of pages in the index'),('db_dc','wp_tutor_quiz_attempts','PRIMARY','2021-03-16 15:37:51','n_diff_pfx01',2,1,'attempt_id'),('db_dc','wp_tutor_quiz_attempts','PRIMARY','2021-03-16 15:37:51','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_tutor_quiz_attempts','PRIMARY','2021-03-16 15:37:51','size',1,NULL,'Number of pages in the index'),('db_dc','wp_tutor_quiz_question_answers','PRIMARY','2021-03-16 15:33:56','n_diff_pfx01',39,1,'answer_id'),('db_dc','wp_tutor_quiz_question_answers','PRIMARY','2021-03-16 15:33:56','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_tutor_quiz_question_answers','PRIMARY','2021-03-16 15:33:56','size',1,NULL,'Number of pages in the index'),('db_dc','wp_tutor_quiz_questions','PRIMARY','2021-03-16 15:33:25','n_diff_pfx01',11,1,'question_id'),('db_dc','wp_tutor_quiz_questions','PRIMARY','2021-03-16 15:33:25','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_tutor_quiz_questions','PRIMARY','2021-03-16 15:33:25','size',1,NULL,'Number of pages in the index'),('db_dc','wp_tutor_withdraws','PRIMARY','2021-01-27 03:47:38','n_diff_pfx01',0,1,'withdraw_id'),('db_dc','wp_tutor_withdraws','PRIMARY','2021-01-27 03:47:38','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_tutor_withdraws','PRIMARY','2021-01-27 03:47:38','size',1,NULL,'Number of pages in the index'),('db_dc','wp_usermeta','PRIMARY','2021-06-22 07:56:41','n_diff_pfx01',458,4,'umeta_id'),('db_dc','wp_usermeta','PRIMARY','2021-06-22 07:56:41','n_leaf_pages',5,NULL,'Number of leaf pages in the index'),('db_dc','wp_usermeta','PRIMARY','2021-06-22 07:56:41','size',6,NULL,'Number of pages in the index'),('db_dc','wp_usermeta','meta_key','2021-06-22 07:56:41','n_diff_pfx01',102,1,'meta_key'),('db_dc','wp_usermeta','meta_key','2021-06-22 07:56:41','n_diff_pfx02',458,1,'meta_key,umeta_id'),('db_dc','wp_usermeta','meta_key','2021-06-22 07:56:41','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_usermeta','meta_key','2021-06-22 07:56:41','size',1,NULL,'Number of pages in the index'),('db_dc','wp_usermeta','user_id','2021-06-22 07:56:41','n_diff_pfx01',20,1,'user_id'),('db_dc','wp_usermeta','user_id','2021-06-22 07:56:41','n_diff_pfx02',458,1,'user_id,umeta_id'),('db_dc','wp_usermeta','user_id','2021-06-22 07:56:41','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_usermeta','user_id','2021-06-22 07:56:41','size',1,NULL,'Number of pages in the index'),('db_dc','wp_users','PRIMARY','2021-06-07 10:15:40','n_diff_pfx01',17,1,'ID'),('db_dc','wp_users','PRIMARY','2021-06-07 10:15:40','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_users','PRIMARY','2021-06-07 10:15:40','size',1,NULL,'Number of pages in the index'),('db_dc','wp_users','user_email','2021-06-07 10:15:40','n_diff_pfx01',17,1,'user_email'),('db_dc','wp_users','user_email','2021-06-07 10:15:40','n_diff_pfx02',17,1,'user_email,ID'),('db_dc','wp_users','user_email','2021-06-07 10:15:40','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_users','user_email','2021-06-07 10:15:40','size',1,NULL,'Number of pages in the index'),('db_dc','wp_users','user_login_key','2021-06-07 10:15:40','n_diff_pfx01',17,1,'user_login'),('db_dc','wp_users','user_login_key','2021-06-07 10:15:40','n_diff_pfx02',17,1,'user_login,ID'),('db_dc','wp_users','user_login_key','2021-06-07 10:15:40','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_users','user_login_key','2021-06-07 10:15:40','size',1,NULL,'Number of pages in the index'),('db_dc','wp_users','user_nicename','2021-06-07 10:15:40','n_diff_pfx01',17,1,'user_nicename'),('db_dc','wp_users','user_nicename','2021-06-07 10:15:40','n_diff_pfx02',17,1,'user_nicename,ID'),('db_dc','wp_users','user_nicename','2021-06-07 10:15:40','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_users','user_nicename','2021-06-07 10:15:40','size',1,NULL,'Number of pages in the index'),('db_dc','wp_yoast_indexable','PRIMARY','2021-01-27 03:47:39','n_diff_pfx01',203,7,'id'),('db_dc','wp_yoast_indexable','PRIMARY','2021-01-27 03:47:39','n_leaf_pages',7,NULL,'Number of leaf pages in the index'),('db_dc','wp_yoast_indexable','PRIMARY','2021-01-27 03:47:39','size',8,NULL,'Number of pages in the index'),('db_dc','wp_yoast_indexable','object_id_and_type','2021-01-27 03:47:39','n_diff_pfx01',193,1,'object_id'),('db_dc','wp_yoast_indexable','object_id_and_type','2021-01-27 03:47:39','n_diff_pfx02',200,1,'object_id,object_type'),('db_dc','wp_yoast_indexable','object_id_and_type','2021-01-27 03:47:39','n_diff_pfx03',203,1,'object_id,object_type,id'),('db_dc','wp_yoast_indexable','object_id_and_type','2021-01-27 03:47:39','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_yoast_indexable','object_id_and_type','2021-01-27 03:47:39','size',1,NULL,'Number of pages in the index'),('db_dc','wp_yoast_indexable','object_type_and_sub_type','2021-01-27 03:47:39','n_diff_pfx01',7,1,'object_type'),('db_dc','wp_yoast_indexable','object_type_and_sub_type','2021-01-27 03:47:39','n_diff_pfx02',25,1,'object_type,object_sub_type'),('db_dc','wp_yoast_indexable','object_type_and_sub_type','2021-01-27 03:47:39','n_diff_pfx03',203,1,'object_type,object_sub_type,id'),('db_dc','wp_yoast_indexable','object_type_and_sub_type','2021-01-27 03:47:39','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_yoast_indexable','object_type_and_sub_type','2021-01-27 03:47:39','size',1,NULL,'Number of pages in the index'),('db_dc','wp_yoast_indexable','permalink_hash_and_object_type','2021-01-27 03:47:39','n_diff_pfx01',198,1,'permalink_hash'),('db_dc','wp_yoast_indexable','permalink_hash_and_object_type','2021-01-27 03:47:39','n_diff_pfx02',201,1,'permalink_hash,object_type'),('db_dc','wp_yoast_indexable','permalink_hash_and_object_type','2021-01-27 03:47:39','n_diff_pfx03',203,1,'permalink_hash,object_type,id'),('db_dc','wp_yoast_indexable','permalink_hash_and_object_type','2021-01-27 03:47:39','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_yoast_indexable','permalink_hash_and_object_type','2021-01-27 03:47:39','size',1,NULL,'Number of pages in the index'),('db_dc','wp_yoast_indexable','prominent_words','2021-01-27 03:47:39','n_diff_pfx01',1,1,'prominent_words_version'),('db_dc','wp_yoast_indexable','prominent_words','2021-01-27 03:47:39','n_diff_pfx02',7,1,'prominent_words_version,object_type'),('db_dc','wp_yoast_indexable','prominent_words','2021-01-27 03:47:39','n_diff_pfx03',25,1,'prominent_words_version,object_type,object_sub_type'),('db_dc','wp_yoast_indexable','prominent_words','2021-01-27 03:47:39','n_diff_pfx04',32,1,'prominent_words_version,object_type,object_sub_type,post_status'),('db_dc','wp_yoast_indexable','prominent_words','2021-01-27 03:47:39','n_diff_pfx05',203,1,'prominent_words_version,object_type,object_sub_type,post_status,id'),('db_dc','wp_yoast_indexable','prominent_words','2021-01-27 03:47:39','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_yoast_indexable','prominent_words','2021-01-27 03:47:39','size',1,NULL,'Number of pages in the index'),('db_dc','wp_yoast_indexable','subpages','2021-01-27 03:47:39','n_diff_pfx01',18,1,'post_parent'),('db_dc','wp_yoast_indexable','subpages','2021-01-27 03:47:39','n_diff_pfx02',23,1,'post_parent,object_type'),('db_dc','wp_yoast_indexable','subpages','2021-01-27 03:47:39','n_diff_pfx03',29,1,'post_parent,object_type,post_status'),('db_dc','wp_yoast_indexable','subpages','2021-01-27 03:47:39','n_diff_pfx04',200,1,'post_parent,object_type,post_status,object_id'),('db_dc','wp_yoast_indexable','subpages','2021-01-27 03:47:39','n_diff_pfx05',203,1,'post_parent,object_type,post_status,object_id,id'),('db_dc','wp_yoast_indexable','subpages','2021-01-27 03:47:39','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_yoast_indexable','subpages','2021-01-27 03:47:39','size',1,NULL,'Number of pages in the index'),('db_dc','wp_yoast_indexable_hierarchy','PRIMARY','2021-01-27 03:47:39','n_diff_pfx01',118,1,'indexable_id'),('db_dc','wp_yoast_indexable_hierarchy','PRIMARY','2021-01-27 03:47:39','n_diff_pfx02',196,1,'indexable_id,ancestor_id'),('db_dc','wp_yoast_indexable_hierarchy','PRIMARY','2021-01-27 03:47:39','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_yoast_indexable_hierarchy','PRIMARY','2021-01-27 03:47:39','size',1,NULL,'Number of pages in the index'),('db_dc','wp_yoast_indexable_hierarchy','ancestor_id','2021-01-27 03:47:39','n_diff_pfx01',18,1,'ancestor_id'),('db_dc','wp_yoast_indexable_hierarchy','ancestor_id','2021-01-27 03:47:39','n_diff_pfx02',196,1,'ancestor_id,indexable_id'),('db_dc','wp_yoast_indexable_hierarchy','ancestor_id','2021-01-27 03:47:39','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_yoast_indexable_hierarchy','ancestor_id','2021-01-27 03:47:39','size',1,NULL,'Number of pages in the index'),('db_dc','wp_yoast_indexable_hierarchy','depth','2021-01-27 03:47:39','n_diff_pfx01',2,1,'depth'),('db_dc','wp_yoast_indexable_hierarchy','depth','2021-01-27 03:47:39','n_diff_pfx02',196,1,'depth,indexable_id'),('db_dc','wp_yoast_indexable_hierarchy','depth','2021-01-27 03:47:39','n_diff_pfx03',196,1,'depth,indexable_id,ancestor_id'),('db_dc','wp_yoast_indexable_hierarchy','depth','2021-01-27 03:47:39','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_yoast_indexable_hierarchy','depth','2021-01-27 03:47:39','size',1,NULL,'Number of pages in the index'),('db_dc','wp_yoast_indexable_hierarchy','indexable_id','2021-01-27 03:47:39','n_diff_pfx01',118,1,'indexable_id'),('db_dc','wp_yoast_indexable_hierarchy','indexable_id','2021-01-27 03:47:39','n_diff_pfx02',196,1,'indexable_id,ancestor_id'),('db_dc','wp_yoast_indexable_hierarchy','indexable_id','2021-01-27 03:47:39','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_yoast_indexable_hierarchy','indexable_id','2021-01-27 03:47:39','size',1,NULL,'Number of pages in the index'),('db_dc','wp_yoast_migrations','PRIMARY','2021-01-27 03:47:40','n_diff_pfx01',18,1,'id'),('db_dc','wp_yoast_migrations','PRIMARY','2021-01-27 03:47:40','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_yoast_migrations','PRIMARY','2021-01-27 03:47:40','size',1,NULL,'Number of pages in the index'),('db_dc','wp_yoast_migrations','wp_yoast_migrations_version','2021-01-27 03:47:40','n_diff_pfx01',18,1,'version'),('db_dc','wp_yoast_migrations','wp_yoast_migrations_version','2021-01-27 03:47:40','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_yoast_migrations','wp_yoast_migrations_version','2021-01-27 03:47:40','size',1,NULL,'Number of pages in the index'),('db_dc','wp_yoast_primary_term','PRIMARY','2021-01-27 03:47:40','n_diff_pfx01',16,1,'id'),('db_dc','wp_yoast_primary_term','PRIMARY','2021-01-27 03:47:40','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_yoast_primary_term','PRIMARY','2021-01-27 03:47:40','size',1,NULL,'Number of pages in the index'),('db_dc','wp_yoast_primary_term','post_taxonomy','2021-01-27 03:47:40','n_diff_pfx01',16,1,'post_id'),('db_dc','wp_yoast_primary_term','post_taxonomy','2021-01-27 03:47:40','n_diff_pfx02',16,1,'post_id,taxonomy'),('db_dc','wp_yoast_primary_term','post_taxonomy','2021-01-27 03:47:40','n_diff_pfx03',16,1,'post_id,taxonomy,id'),('db_dc','wp_yoast_primary_term','post_taxonomy','2021-01-27 03:47:40','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_yoast_primary_term','post_taxonomy','2021-01-27 03:47:40','size',1,NULL,'Number of pages in the index'),('db_dc','wp_yoast_primary_term','post_term','2021-01-27 03:47:40','n_diff_pfx01',16,1,'post_id'),('db_dc','wp_yoast_primary_term','post_term','2021-01-27 03:47:40','n_diff_pfx02',16,1,'post_id,term_id'),('db_dc','wp_yoast_primary_term','post_term','2021-01-27 03:47:40','n_diff_pfx03',16,1,'post_id,term_id,id'),('db_dc','wp_yoast_primary_term','post_term','2021-01-27 03:47:40','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_yoast_primary_term','post_term','2021-01-27 03:47:40','size',1,NULL,'Number of pages in the index'),('db_dc','wp_yoast_seo_links','PRIMARY','2021-01-27 03:47:41','n_diff_pfx01',183,3,'id'),('db_dc','wp_yoast_seo_links','PRIMARY','2021-01-27 03:47:41','n_leaf_pages',3,NULL,'Number of leaf pages in the index'),('db_dc','wp_yoast_seo_links','PRIMARY','2021-01-27 03:47:41','size',4,NULL,'Number of pages in the index'),('db_dc','wp_yoast_seo_links','indexable_link_direction','2021-01-27 03:47:41','n_diff_pfx01',28,1,'indexable_id'),('db_dc','wp_yoast_seo_links','indexable_link_direction','2021-01-27 03:47:41','n_diff_pfx02',46,1,'indexable_id,type'),('db_dc','wp_yoast_seo_links','indexable_link_direction','2021-01-27 03:47:41','n_diff_pfx03',183,1,'indexable_id,type,id'),('db_dc','wp_yoast_seo_links','indexable_link_direction','2021-01-27 03:47:41','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_yoast_seo_links','indexable_link_direction','2021-01-27 03:47:41','size',1,NULL,'Number of pages in the index'),('db_dc','wp_yoast_seo_links','link_direction','2021-01-27 03:47:41','n_diff_pfx01',28,1,'post_id'),('db_dc','wp_yoast_seo_links','link_direction','2021-01-27 03:47:41','n_diff_pfx02',46,1,'post_id,type'),('db_dc','wp_yoast_seo_links','link_direction','2021-01-27 03:47:41','n_diff_pfx03',183,1,'post_id,type,id'),('db_dc','wp_yoast_seo_links','link_direction','2021-01-27 03:47:41','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_yoast_seo_links','link_direction','2021-01-27 03:47:41','size',1,NULL,'Number of pages in the index'),('db_dc','wp_yoast_seo_meta','object_id','2021-01-27 03:47:43','n_diff_pfx01',17,1,'object_id'),('db_dc','wp_yoast_seo_meta','object_id','2021-01-27 03:47:43','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_dc','wp_yoast_seo_meta','object_id','2021-01-27 03:47:43','size',1,NULL,'Number of pages in the index'),('db_farm','tb_animals','PRIMARY','2020-10-28 08:49:55','n_diff_pfx01',0,1,'anm_id'),('db_farm','tb_animals','PRIMARY','2020-10-28 08:49:55','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_farm','tb_animals','PRIMARY','2020-10-28 08:49:55','size',1,NULL,'Number of pages in the index'),('db_farm','tb_animals_spicies','PRIMARY','2020-10-28 09:00:33','n_diff_pfx01',6,1,'anm_spicies_id'),('db_farm','tb_animals_spicies','PRIMARY','2020-10-28 09:00:33','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_farm','tb_animals_spicies','PRIMARY','2020-10-28 09:00:33','size',1,NULL,'Number of pages in the index'),('db_farm','tb_animals_type','PRIMARY','2020-10-28 08:41:52','n_diff_pfx01',4,1,'anm_type_id'),('db_farm','tb_animals_type','PRIMARY','2020-10-28 08:41:52','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_farm','tb_animals_type','PRIMARY','2020-10-28 08:41:52','size',1,NULL,'Number of pages in the index'),('db_farm','tb_cost_type','PRIMARY','2020-10-28 08:41:42','n_diff_pfx01',3,1,'cost_type_id'),('db_farm','tb_cost_type','PRIMARY','2020-10-28 08:41:42','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_farm','tb_cost_type','PRIMARY','2020-10-28 08:41:42','size',1,NULL,'Number of pages in the index'),('db_farm','tb_group_news','PRIMARY','2020-11-02 09:56:47','n_diff_pfx01',4,1,'group_news_id'),('db_farm','tb_group_news','PRIMARY','2020-11-02 09:56:47','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_farm','tb_group_news','PRIMARY','2020-11-02 09:56:47','size',1,NULL,'Number of pages in the index'),('db_farm','tb_income_type','PRIMARY','2020-10-28 08:41:41','n_diff_pfx01',0,1,'inc_type_id'),('db_farm','tb_income_type','PRIMARY','2020-10-28 08:41:41','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_farm','tb_income_type','PRIMARY','2020-10-28 08:41:41','size',1,NULL,'Number of pages in the index'),('db_farm','tb_news','PRIMARY','2020-11-02 09:57:08','n_diff_pfx01',0,1,'news_id'),('db_farm','tb_news','PRIMARY','2020-11-02 09:57:08','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_farm','tb_news','PRIMARY','2020-11-02 09:57:08','size',1,NULL,'Number of pages in the index'),('db_farm','tb_picture','PRIMARY','2020-11-02 09:56:50','n_diff_pfx01',37,1,'pic_id'),('db_farm','tb_picture','PRIMARY','2020-11-02 09:56:50','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_farm','tb_picture','PRIMARY','2020-11-02 09:56:50','size',1,NULL,'Number of pages in the index'),('db_farm','tb_product','PRIMARY','2020-11-03 09:23:50','n_diff_pfx01',9,1,'pro_id'),('db_farm','tb_product','PRIMARY','2020-11-03 09:23:50','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_farm','tb_product','PRIMARY','2020-11-03 09:23:50','size',1,NULL,'Number of pages in the index'),('db_farm','tb_product_category','PRIMARY','2020-11-03 09:23:52','n_diff_pfx01',9,1,'pro_cate_id'),('db_farm','tb_product_category','PRIMARY','2020-11-03 09:23:52','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_farm','tb_product_category','PRIMARY','2020-11-03 09:23:52','size',1,NULL,'Number of pages in the index'),('db_farm','tb_state_type','PRIMARY','2020-10-28 08:46:13','n_diff_pfx01',5,1,'state_type_id'),('db_farm','tb_state_type','PRIMARY','2020-10-28 08:46:13','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_farm','tb_state_type','PRIMARY','2020-10-28 08:46:13','size',1,NULL,'Number of pages in the index'),('db_farm','tb_statement','PRIMARY','2021-07-30 03:29:20','n_diff_pfx01',0,1,'s_id'),('db_farm','tb_statement','PRIMARY','2021-07-30 03:29:20','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_farm','tb_statement','PRIMARY','2021-07-30 03:29:20','size',1,NULL,'Number of pages in the index'),('db_job2','tb_act','PRIMARY','2021-01-14 01:46:00','n_diff_pfx01',852,19,'act_id'),('db_job2','tb_act','PRIMARY','2021-01-14 01:46:00','n_leaf_pages',19,NULL,'Number of leaf pages in the index'),('db_job2','tb_act','PRIMARY','2021-01-14 01:46:00','size',20,NULL,'Number of pages in the index'),('db_job2','tb_act_youth','PRIMARY','2021-01-14 01:46:00','n_diff_pfx01',0,1,'act_id'),('db_job2','tb_act_youth','PRIMARY','2021-01-14 01:46:00','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_job2','tb_act_youth','PRIMARY','2021-01-14 01:46:00','size',1,NULL,'Number of pages in the index'),('db_job2','tb_change','PRIMARY','2021-01-14 01:46:01','n_diff_pfx01',6546,20,'c_id'),('db_job2','tb_change','PRIMARY','2021-01-14 01:46:01','n_leaf_pages',167,NULL,'Number of leaf pages in the index'),('db_job2','tb_change','PRIMARY','2021-01-14 01:46:01','size',225,NULL,'Number of pages in the index'),('db_job2','tb_distric','PRIMARY','2021-01-14 01:46:01','n_diff_pfx01',25,1,'dist_id'),('db_job2','tb_distric','PRIMARY','2021-01-14 01:46:01','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_job2','tb_distric','PRIMARY','2021-01-14 01:46:01','size',1,NULL,'Number of pages in the index'),('db_job2','tb_exit','PRIMARY','2021-01-14 01:46:01','n_diff_pfx01',152,3,'ex_id'),('db_job2','tb_exit','PRIMARY','2021-01-14 01:46:01','n_leaf_pages',3,NULL,'Number of leaf pages in the index'),('db_job2','tb_exit','PRIMARY','2021-01-14 01:46:01','size',4,NULL,'Number of pages in the index'),('db_job2','tb_info_local','PRIMARY','2021-01-14 01:46:01','n_diff_pfx01',105,3,'info_local_id'),('db_job2','tb_info_local','PRIMARY','2021-01-14 01:46:01','n_leaf_pages',3,NULL,'Number of leaf pages in the index'),('db_job2','tb_info_local','PRIMARY','2021-01-14 01:46:01','size',4,NULL,'Number of pages in the index'),('db_job2','tb_leave','PRIMARY','2021-01-14 01:46:02','n_diff_pfx01',186,3,'leave_id'),('db_job2','tb_leave','PRIMARY','2021-01-14 01:46:02','n_leaf_pages',3,NULL,'Number of leaf pages in the index'),('db_job2','tb_leave','PRIMARY','2021-01-14 01:46:02','size',4,NULL,'Number of pages in the index'),('db_job2','tb_local','PRIMARY','2021-01-14 01:46:02','n_diff_pfx01',187,3,'local_id'),('db_job2','tb_local','PRIMARY','2021-01-14 01:46:02','n_leaf_pages',3,NULL,'Number of leaf pages in the index'),('db_job2','tb_local','PRIMARY','2021-01-14 01:46:02','size',4,NULL,'Number of pages in the index'),('db_job2','tb_member','PRIMARY','2021-01-14 01:46:04','n_diff_pfx01',1454,20,'m_id'),('db_job2','tb_member','PRIMARY','2021-01-14 01:46:04','n_leaf_pages',127,NULL,'Number of leaf pages in the index'),('db_job2','tb_member','PRIMARY','2021-01-14 01:46:04','size',161,NULL,'Number of pages in the index'),('db_job2','tb_project','PRIMARY','2021-01-14 01:46:05','n_diff_pfx01',77,7,'pro_id'),('db_job2','tb_project','PRIMARY','2021-01-14 01:46:05','n_leaf_pages',7,NULL,'Number of leaf pages in the index'),('db_job2','tb_project','PRIMARY','2021-01-14 01:46:05','size',8,NULL,'Number of pages in the index'),('db_job2','tb_project_youth','PRIMARY','2021-01-14 01:46:02','n_diff_pfx01',0,1,'pro_id'),('db_job2','tb_project_youth','PRIMARY','2021-01-14 01:46:02','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_job2','tb_project_youth','PRIMARY','2021-01-14 01:46:02','size',1,NULL,'Number of pages in the index'),('db_job2','tb_user','PRIMARY','2021-01-14 01:46:06','n_diff_pfx01',12,1,'user_id'),('db_job2','tb_user','PRIMARY','2021-01-14 01:46:06','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_job2','tb_user','PRIMARY','2021-01-14 01:46:06','size',1,NULL,'Number of pages in the index'),('db_job2','tb_work','PRIMARY','2021-01-14 01:46:09','n_diff_pfx01',54103,20,'work_id'),('db_job2','tb_work','PRIMARY','2021-01-14 01:46:09','n_leaf_pages',659,NULL,'Number of leaf pages in the index'),('db_job2','tb_work','PRIMARY','2021-01-14 01:46:09','size',673,NULL,'Number of pages in the index'),('db_job2','tbusers','PRIMARY','2021-01-14 01:46:11','n_diff_pfx01',689,6,'id'),('db_job2','tbusers','PRIMARY','2021-01-14 01:46:11','n_leaf_pages',6,NULL,'Number of leaf pages in the index'),('db_job2','tbusers','PRIMARY','2021-01-14 01:46:11','size',7,NULL,'Number of pages in the index'),('db_ktm','ksu_employee','PRIMARY','2020-08-25 08:58:51','n_diff_pfx01',573,7,'emid'),('db_ktm','ksu_employee','PRIMARY','2020-08-25 08:58:51','n_leaf_pages',7,NULL,'Number of leaf pages in the index'),('db_ktm','ksu_employee','PRIMARY','2020-08-25 08:58:51','size',8,NULL,'Number of pages in the index'),('db_ktm','ksu_org1','PRIMARY','2020-08-25 08:58:35','n_diff_pfx01',17,1,'org1_id'),('db_ktm','ksu_org1','PRIMARY','2020-08-25 08:58:35','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_ktm','ksu_org1','PRIMARY','2020-08-25 08:58:35','size',1,NULL,'Number of pages in the index'),('db_ktm','ksu_org2','PRIMARY','2020-08-25 08:58:35','n_diff_pfx01',76,1,'org2_id'),('db_ktm','ksu_org2','PRIMARY','2020-08-25 08:58:35','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_ktm','ksu_org2','PRIMARY','2020-08-25 08:58:35','size',1,NULL,'Number of pages in the index'),('db_ktm','ksu_time','PRIMARY','2021-01-22 01:01:15','n_diff_pfx01',68620,20,'tid'),('db_ktm','ksu_time','PRIMARY','2021-01-22 01:01:15','n_leaf_pages',3277,NULL,'Number of leaf pages in the index'),('db_ktm','ksu_time','PRIMARY','2021-01-22 01:01:15','size',3749,NULL,'Number of pages in the index'),('db_register','admin','PRIMARY','2020-10-05 02:27:53','n_diff_pfx01',2,1,'aid'),('db_register','admin','PRIMARY','2020-10-05 02:27:53','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_register','admin','PRIMARY','2020-10-05 02:27:53','size',1,NULL,'Number of pages in the index'),('db_register','ckmon','PRIMARY','2020-10-05 02:28:04','n_diff_pfx01',8,1,'mnid'),('db_register','ckmon','PRIMARY','2020-10-05 02:28:04','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_register','ckmon','PRIMARY','2020-10-05 02:28:04','size',1,NULL,'Number of pages in the index'),('db_register','login','PRIMARY','2020-10-05 02:27:54','n_diff_pfx01',2,1,'ID'),('db_register','login','PRIMARY','2020-10-05 02:27:54','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_register','login','PRIMARY','2020-10-05 02:27:54','size',1,NULL,'Number of pages in the index'),('db_register','member','PRIMARY','2020-10-05 02:27:57','n_diff_pfx01',804,20,'mid'),('db_register','member','PRIMARY','2020-10-05 02:27:57','n_leaf_pages',20,NULL,'Number of leaf pages in the index'),('db_register','member','PRIMARY','2020-10-05 02:27:57','size',21,NULL,'Number of pages in the index'),('db_register','setup','PRIMARY','2020-10-05 02:27:53','n_diff_pfx01',1,1,'sid'),('db_register','setup','PRIMARY','2020-10-05 02:27:53','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_register','setup','PRIMARY','2020-10-05 02:27:53','size',1,NULL,'Number of pages in the index'),('db_service','com_admin','PRIMARY','2020-10-09 04:14:04','n_diff_pfx01',6,1,'admin_id'),('db_service','com_admin','PRIMARY','2020-10-09 04:14:04','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_service','com_admin','PRIMARY','2020-10-09 04:14:04','size',1,NULL,'Number of pages in the index'),('db_service','com_agencys','GEN_CLUST_INDEX','2020-10-05 03:46:17','n_diff_pfx01',15,1,'DB_ROW_ID'),('db_service','com_agencys','GEN_CLUST_INDEX','2020-10-05 03:46:17','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_service','com_agencys','GEN_CLUST_INDEX','2020-10-05 03:46:17','size',1,NULL,'Number of pages in the index'),('db_service','com_agencys_2','GEN_CLUST_INDEX','2020-09-25 04:48:51','n_diff_pfx01',0,1,'DB_ROW_ID'),('db_service','com_agencys_2','GEN_CLUST_INDEX','2020-09-25 04:48:51','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_service','com_agencys_2','GEN_CLUST_INDEX','2020-09-25 04:48:51','size',1,NULL,'Number of pages in the index'),('db_service','com_agencys_3','GEN_CLUST_INDEX','2020-09-25 04:50:12','n_diff_pfx01',0,1,'DB_ROW_ID'),('db_service','com_agencys_3','GEN_CLUST_INDEX','2020-09-25 04:50:12','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_service','com_agencys_3','GEN_CLUST_INDEX','2020-09-25 04:50:12','size',1,NULL,'Number of pages in the index'),('db_service','com_member','PRIMARY','2020-09-23 06:15:40','n_diff_pfx01',0,1,'mid'),('db_service','com_member','PRIMARY','2020-09-23 06:15:40','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('db_service','com_member','PRIMARY','2020-09-23 06:15:40','size',1,NULL,'Number of pages in the index'),('mysql','gtid_executed','PRIMARY','2020-08-25 04:48:45','n_diff_pfx01',0,1,'source_uuid'),('mysql','gtid_executed','PRIMARY','2020-08-25 04:48:45','n_diff_pfx02',0,1,'source_uuid,interval_start'),('mysql','gtid_executed','PRIMARY','2020-08-25 04:48:45','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('mysql','gtid_executed','PRIMARY','2020-08-25 04:48:45','size',1,NULL,'Number of pages in the index'),('sys','sys_config','PRIMARY','2020-08-25 04:48:46','n_diff_pfx01',2,1,'variable'),('sys','sys_config','PRIMARY','2020-08-25 04:48:46','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('sys','sys_config','PRIMARY','2020-08-25 04:48:46','size',1,NULL,'Number of pages in the index');

--
-- Table structure for table `innodb_table_stats`
--

CREATE TABLE `innodb_table_stats` (
  `database_name` varchar(64) COLLATE utf8_bin NOT NULL,
  `table_name` varchar(199) COLLATE utf8_bin NOT NULL,
  `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `n_rows` bigint(20) unsigned NOT NULL,
  `clustered_index_size` bigint(20) unsigned NOT NULL,
  `sum_of_other_index_sizes` bigint(20) unsigned NOT NULL,
  PRIMARY KEY (`database_name`,`table_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0;

--
-- Dumping data for table `innodb_table_stats`
--

INSERT INTO `innodb_table_stats` VALUES ('db_U2T','tb_act','2021-01-29 08:33:43',4,1,0),('db_U2T','tb_change','2021-02-26 04:33:10',75,5,0),('db_U2T','tb_dan','2021-02-19 09:25:13',5,1,0),('db_U2T','tb_distric','2021-01-29 08:33:34',25,1,0),('db_U2T','tb_exit','2021-01-29 08:33:34',5,1,0),('db_U2T','tb_info_local','2021-01-29 08:33:34',0,1,0),('db_U2T','tb_leave','2021-01-29 08:33:34',0,1,0),('db_U2T','tb_list_student','2021-01-29 08:33:34',39,1,0),('db_U2T','tb_local','2021-01-29 08:33:34',20,1,0),('db_U2T','tb_mem_report','2021-02-19 09:27:27',0,1,0),('db_U2T','tb_member','2021-02-08 09:17:19',407,10,0),('db_U2T','tb_member_report','2021-02-20 20:20:38',2,1,0),('db_U2T','tb_project','2021-01-29 08:33:34',0,1,0),('db_U2T','tb_report','2021-02-19 09:25:20',0,1,0),('db_U2T','tb_report_status','2021-02-19 09:25:25',1560,6,0),('db_U2T','tb_report_text','2021-02-19 09:25:10',78,1,0),('db_U2T','tb_user','2021-01-29 08:33:39',11,1,0),('db_U2T','tb_work','2021-02-25 02:56:17',4037,161,0),('db_U2T','tb_work_student','2021-01-29 08:33:31',0,1,0),('db_admission','admiss_apps','2021-06-18 08:45:35',6627,289,0),('db_admission','admiss_degree','2020-09-26 14:22:33',3,1,0),('db_admission','admiss_enroll','2021-06-14 09:08:14',1725,97,0),('db_admission','admiss_fac','2020-09-26 14:22:33',6,1,0),('db_admission','admiss_level','2021-03-02 14:54:52',6,1,0),('db_admission','admiss_news','2021-05-09 09:45:23',17,4,0),('db_admission','admiss_output','2020-09-26 14:22:34',3,1,0),('db_admission','admiss_plan','2020-09-26 14:22:34',0,1,0),('db_admission','admiss_prodetail','2020-10-07 03:55:47',75,161,0),('db_admission','admiss_program','2020-12-07 08:06:23',94,5,0),('db_admission','admiss_round','2020-09-26 14:22:35',5,1,0),('db_admission','admiss_stdprofile','2021-05-23 17:09:13',5952,285,0),('db_admission','admiss_teacher','2020-09-26 14:22:35',534,6,0),('db_admission','admiss_teacher_pro','2020-09-30 08:34:54',366,1,0),('db_admission','admission64_admin','2021-03-04 20:46:21',0,1,0),('db_admission','tb_apps','2023-09-29 11:59:30',18,1,0),('db_admission','tb_enroll','2022-11-24 07:37:37',1710,97,0),('db_admission','tb_enrollup','2022-11-24 07:35:39',1240,12,0),('db_admission','tb_faculty','2021-09-13 06:50:02',6,1,0),('db_admission','tb_level','2021-09-13 06:50:32',6,1,0),('db_admission','tb_payback','2022-02-11 03:45:23',421,7,0),('db_admission','tb_program','2023-09-20 08:20:02',112,5,0),('db_admission','tb_programไม่เอา','2021-09-13 06:46:04',94,4,0),('db_admission','tb_round','2023-09-18 08:44:36',13,1,0),('db_admission','tb_stdprofile','2023-09-30 05:19:13',21,1,0),('db_admission','tb_teacher','2021-09-22 10:37:11',534,6,0),('db_admission','wp_actionscheduler_actions','2021-09-13 08:30:00',35,1,8),('db_admission','wp_actionscheduler_claims','2021-09-13 08:29:49',0,1,1),('db_admission','wp_actionscheduler_groups','2021-09-13 08:29:49',3,1,1),('db_admission','wp_actionscheduler_logs','2021-09-13 08:29:50',91,1,2),('db_admission','wp_aioseo_notifications','2021-09-13 08:29:49',0,1,4),('db_admission','wp_aioseo_posts','2021-09-13 08:29:50',41,8,1),('db_admission','wp_commentmeta','2021-09-13 08:29:50',0,1,2),('db_admission','wp_comments','2024-04-18 20:34:13',1625,289,21),('db_admission','wp_frmt_form_entry','2021-09-13 08:29:50',0,1,3),('db_admission','wp_frmt_form_entry_meta','2021-09-13 08:29:50',0,1,3),('db_admission','wp_frmt_form_views','2021-09-13 08:29:50',0,1,4),('db_admission','wp_links','2021-09-13 08:29:50',0,1,1),('db_admission','wp_nextend2_image_storage','2024-04-25 09:19:49',37,1,1),('db_admission','wp_nextend2_section_storage','2024-05-17 06:35:35',6,3,4),('db_admission','wp_nextend2_smartslider3_generators','2021-09-13 08:29:50',0,1,0),('db_admission','wp_nextend2_smartslider3_sliders','2021-09-13 08:29:50',0,1,2),('db_admission','wp_nextend2_smartslider3_sliders_xref','2021-09-13 08:29:50',0,1,1),('db_admission','wp_nextend2_smartslider3_slides','2024-04-30 08:04:39',6,3,7),('db_admission','wp_options','2024-05-17 16:51:46',233,137,2),('db_admission','wp_postmeta','2024-01-26 11:07:24',19050,289,127),('db_admission','wp_posts','2024-05-07 07:49:17',4595,5275,134),('db_admission','wp_term_relationships','2024-02-22 09:42:31',526,3,1),('db_admission','wp_term_taxonomy','2021-11-11 08:21:50',93,1,2),('db_admission','wp_termmeta','2021-09-13 08:29:51',0,1,2),('db_admission','wp_terms','2021-11-11 08:21:50',93,1,2),('db_admission','wp_usermeta','2023-02-22 15:03:48',507,4,2),('db_admission','wp_users','2023-02-22 15:02:43',28,1,3),('db_admission','wp_wpforms_tasks_meta','2021-09-13 08:29:59',7,1,0),('db_admissionksu','tb_academic_year','2023-10-03 02:48:24',2,1,0),('db_admissionksu','tb_apps','2024-03-08 08:09:13',8859,225,0),('db_admissionksu','tb_enroll','2024-05-17 04:45:22',1548,97,0),('db_admissionksu','tb_enrollup','2024-05-04 10:39:05',1448,20,0),('db_admissionksu','tb_faculty','2022-11-19 22:51:31',6,1,0),('db_admissionksu','tb_interview_group_program','2023-12-11 03:54:45',17,1,0),('db_admissionksu','tb_interview_member','2023-10-06 07:25:09',254,1,0),('db_admissionksu','tb_interview_member_group','2024-05-13 03:29:04',3534,13,0),('db_admissionksu','tb_interview_qrcode_program','2024-04-24 02:36:11',847,8,0),('db_admissionksu','tb_interview_std_status','2024-04-05 09:00:10',6495,97,0),('db_admissionksu','tb_interview_submit_result','2024-04-05 07:24:01',386,3,0),('db_admissionksu','tb_level','2023-09-28 06:42:42',6,1,0),('db_admissionksu','tb_pay_registration_fee','2023-10-31 03:41:18',418,4,0),('db_admissionksu','tb_payback','2022-09-15 07:56:25',421,9,0),('db_admissionksu','tb_program','2023-10-02 04:16:07',111,5,0),('db_admissionksu','tb_quota','2023-09-20 05:11:29',16,3,0),('db_admissionksu','tb_quota_fac','2023-09-05 07:05:39',31,1,0),('db_admissionksu','tb_rec_rounds','2023-09-06 04:02:18',6,1,0),('db_admissionksu','tb_round','2023-12-13 00:15:49',15,1,0),('db_admissionksu','tb_school','2023-09-01 10:08:15',1091,9,0),('db_admissionksu','tb_stdprofile','2024-03-08 10:42:58',6649,385,0),('db_admissionksu','tb_teacher','2022-09-15 07:56:18',535,6,0),('db_admissionksu','tbl_login','2023-05-11 00:21:26',5,1,0),('db_dc','admins','2021-01-27 03:47:24',0,1,0),('db_dc','answer','2021-01-27 03:47:24',0,1,0),('db_dc','dc_cert63','2021-05-30 16:36:05',485,8,0),('db_dc','exam_code','2021-01-27 03:47:37',5,1,0),('db_dc','history','2021-01-27 03:47:26',2994,16,0),('db_dc','options','2021-01-27 03:47:27',544,6,0),('db_dc','question','2021-01-27 03:47:27',136,4,0),('db_dc','quiz','2021-01-27 03:47:29',2,1,0),('db_dc','std63','2021-03-22 16:19:19',1018,18,0),('db_dc','tb_profile','2022-01-11 13:11:33',1,1,0),('db_dc','tb_resvote','2022-01-14 03:34:39',18,1,0),('db_dc','tb_users','2022-01-11 13:24:46',1,1,0),('db_dc','users','2021-01-27 03:47:29',1160,97,0),('db_dc','wp_commentmeta','2021-01-31 03:34:11',10,1,2),('db_dc','wp_comments','2021-07-10 07:20:07',6,1,5),('db_dc','wp_links','2021-01-27 03:47:29',0,1,1),('db_dc','wp_options','2022-01-18 03:25:22',265,69,2),('db_dc','wp_postmeta','2021-01-27 03:47:36',3561,21,19),('db_dc','wp_posts','2021-08-03 11:12:34',458,412,8),('db_dc','wp_social_users','2021-06-07 10:15:40',12,1,2),('db_dc','wp_term_relationships','2021-07-14 13:09:28',52,1,1),('db_dc','wp_term_taxonomy','2021-06-04 15:01:46',29,1,2),('db_dc','wp_termmeta','2021-01-27 03:47:37',0,1,2),('db_dc','wp_terms','2021-06-04 15:01:46',29,1,2),('db_dc','wp_tutor_earnings','2021-01-27 03:47:37',0,1,0),('db_dc','wp_tutor_quiz_attempt_answers','2021-03-16 15:38:17',4,1,0),('db_dc','wp_tutor_quiz_attempts','2021-03-16 15:37:51',2,1,0),('db_dc','wp_tutor_quiz_question_answers','2021-03-16 15:33:56',39,1,0),('db_dc','wp_tutor_quiz_questions','2021-03-16 15:33:25',11,1,0),('db_dc','wp_tutor_withdraws','2021-01-27 03:47:38',0,1,0),('db_dc','wp_usermeta','2021-06-22 07:56:41',458,6,2),('db_dc','wp_users','2021-06-07 10:15:40',17,1,3),('db_dc','wp_yoast_indexable','2021-01-27 03:47:39',203,8,5),('db_dc','wp_yoast_indexable_hierarchy','2021-01-27 03:47:39',196,1,3),('db_dc','wp_yoast_migrations','2021-01-27 03:47:40',18,1,1),('db_dc','wp_yoast_primary_term','2021-01-27 03:47:40',16,1,2),('db_dc','wp_yoast_seo_links','2021-01-27 03:47:41',183,4,2),('db_dc','wp_yoast_seo_meta','2021-01-27 03:47:43',17,1,0),('db_farm','tb_animals','2020-10-28 08:49:55',0,1,0),('db_farm','tb_animals_spicies','2020-10-28 09:00:33',6,1,0),('db_farm','tb_animals_type','2020-10-28 08:41:52',4,1,0),('db_farm','tb_cost_type','2020-10-28 08:41:42',3,1,0),('db_farm','tb_group_news','2020-11-02 09:56:47',4,1,0),('db_farm','tb_income_type','2020-10-28 08:41:41',0,1,0),('db_farm','tb_news','2020-11-02 09:57:08',0,1,0),('db_farm','tb_picture','2020-11-02 09:56:50',37,1,0),('db_farm','tb_product','2020-11-03 09:23:50',9,1,0),('db_farm','tb_product_category','2020-11-03 09:23:52',9,1,0),('db_farm','tb_state_type','2020-10-28 08:46:13',5,1,0),('db_farm','tb_statement','2021-07-30 03:29:20',0,1,0),('db_job2','tb_act','2021-01-14 01:46:00',852,20,0),('db_job2','tb_act_youth','2021-01-14 01:46:00',0,1,0),('db_job2','tb_change','2021-01-14 01:46:01',6546,225,0),('db_job2','tb_distric','2021-01-14 01:46:01',25,1,0),('db_job2','tb_exit','2021-01-14 01:46:01',152,4,0),('db_job2','tb_info_local','2021-01-14 01:46:01',105,4,0),('db_job2','tb_leave','2021-01-14 01:46:02',186,4,0),('db_job2','tb_local','2021-01-14 01:46:02',187,4,0),('db_job2','tb_member','2021-01-14 01:46:04',1454,161,0),('db_job2','tb_project','2021-01-14 01:46:05',77,8,0),('db_job2','tb_project_youth','2021-01-14 01:46:02',0,1,0),('db_job2','tb_user','2021-01-14 01:46:06',12,1,0),('db_job2','tb_work','2021-01-14 01:46:09',54103,673,0),('db_job2','tbusers','2021-01-14 01:46:11',689,7,0),('db_ktm','ksu_employee','2020-08-25 08:58:51',573,8,0),('db_ktm','ksu_org1','2020-08-25 08:58:35',17,1,0),('db_ktm','ksu_org2','2020-08-25 08:58:35',76,1,0),('db_ktm','ksu_time','2021-01-22 01:01:15',68620,3749,0),('db_register','admin','2020-10-05 02:27:53',2,1,0),('db_register','ckmon','2020-10-05 02:28:04',8,1,0),('db_register','login','2020-10-05 02:27:54',2,1,0),('db_register','member','2020-10-05 02:27:57',804,21,0),('db_register','setup','2020-10-05 02:27:53',1,1,0),('db_service','com_admin','2020-10-09 04:14:04',6,1,0),('db_service','com_agencys','2020-10-05 03:46:17',15,1,0),('db_service','com_agencys_2','2020-09-25 04:48:51',0,1,0),('db_service','com_agencys_3','2020-09-25 04:50:12',0,1,0),('db_service','com_member','2020-09-23 06:15:40',0,1,0),('mysql','gtid_executed','2020-08-25 04:48:45',0,1,0),('sys','sys_config','2020-08-25 04:48:46',2,1,0);

--
-- Table structure for table `ndb_binlog_index`
--

CREATE TABLE `ndb_binlog_index` (
  `Position` bigint(20) unsigned NOT NULL,
  `File` varchar(255) NOT NULL,
  `epoch` bigint(20) unsigned NOT NULL,
  `inserts` int(10) unsigned NOT NULL,
  `updates` int(10) unsigned NOT NULL,
  `deletes` int(10) unsigned NOT NULL,
  `schemaops` int(10) unsigned NOT NULL,
  `orig_server_id` int(10) unsigned NOT NULL,
  `orig_epoch` bigint(20) unsigned NOT NULL,
  `gci` int(10) unsigned NOT NULL,
  `next_position` bigint(20) unsigned NOT NULL,
  `next_file` varchar(255) NOT NULL,
  PRIMARY KEY (`epoch`,`orig_server_id`,`orig_epoch`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `ndb_binlog_index`
--


--
-- Table structure for table `plugin`
--

CREATE TABLE `plugin` (
  `name` varchar(64) NOT NULL DEFAULT '',
  `dl` varchar(128) NOT NULL DEFAULT '',
  PRIMARY KEY (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='MySQL plugins';

--
-- Dumping data for table `plugin`
--


--
-- Table structure for table `proc`
--

CREATE TABLE `proc` (
  `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
  `name` char(64) NOT NULL DEFAULT '',
  `type` enum('FUNCTION','PROCEDURE') NOT NULL,
  `specific_name` char(64) NOT NULL DEFAULT '',
  `language` enum('SQL') NOT NULL DEFAULT 'SQL',
  `sql_data_access` enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') NOT NULL DEFAULT 'CONTAINS_SQL',
  `is_deterministic` enum('YES','NO') NOT NULL DEFAULT 'NO',
  `security_type` enum('INVOKER','DEFINER') NOT NULL DEFAULT 'DEFINER',
  `param_list` blob NOT NULL,
  `returns` longblob NOT NULL,
  `body` longblob NOT NULL,
  `definer` char(93) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
  `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NOT NULL DEFAULT '',
  `comment` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `character_set_client` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `collation_connection` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `body_utf8` longblob,
  PRIMARY KEY (`db`,`name`,`type`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Stored Procedures';

--
-- Dumping data for table `proc`
--

INSERT INTO `proc` VALUES ('sys','extract_schema_from_file_name','FUNCTION','extract_schema_from_file_name','SQL','NO_SQL','YES','INVOKER',_binary ' path VARCHAR(512) ',_binary 'varchar(64) CHARSET utf8',_binary 'BEGIN RETURN LEFT(SUBSTRING_INDEX(SUBSTRING_INDEX(REPLACE(path, \'\\\\\', \'/\'), \'/\', -2), \'/\', 1), 64); END','mysql.sys@localhost','2020-08-25 04:48:46','2020-08-25 04:48:46','','\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary 'BEGIN RETURN LEFT(SUBSTRING_INDEX(SUBSTRING_INDEX(REPLACE(path, \'\\\', \'/\'), \'/\', -2), \'/\', 1), 64); END'),('sys','extract_table_from_file_name','FUNCTION','extract_table_from_file_name','SQL','NO_SQL','YES','INVOKER',_binary ' path VARCHAR(512) ',_binary 'varchar(64) CHARSET utf8',_binary 'BEGIN RETURN LEFT(SUBSTRING_INDEX(REPLACE(SUBSTRING_INDEX(REPLACE(path, \'\\\\\', \'/\'), \'/\', -1), \'@0024\', \'$\'), \'.\', 1), 64); END','mysql.sys@localhost','2020-08-25 04:48:46','2020-08-25 04:48:46','','\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary 'BEGIN RETURN LEFT(SUBSTRING_INDEX(REPLACE(SUBSTRING_INDEX(REPLACE(path, \'\\\', \'/\'), \'/\', -1), \'@0024\', \'$\'), \'.\', 1), 64); END'),('sys','format_bytes','FUNCTION','format_bytes','SQL','NO_SQL','YES','INVOKER',_binary ' bytes TEXT ',_binary 'text CHARSET utf8',_binary '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','mysql.sys@localhost','2020-08-25 04:48:46','2020-08-25 04:48:46','','\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary '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'),('sys','format_path','FUNCTION','format_path','SQL','NO_SQL','YES','INVOKER',_binary ' in_path VARCHAR(512) ',_binary 'varchar(512) CHARSET utf8',_binary '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','mysql.sys@localhost','2020-08-25 04:48:46','2020-08-25 04:48:46','','\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary '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'),('sys','format_statement','FUNCTION','format_statement','SQL','NO_SQL','YES','INVOKER',_binary ' statement LONGTEXT ',_binary 'longtext CHARSET utf8',_binary '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','mysql.sys@localhost','2020-08-25 04:48:46','2020-08-25 04:48:46','','\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary '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'),('sys','format_time','FUNCTION','format_time','SQL','NO_SQL','YES','INVOKER',_binary ' picoseconds TEXT ',_binary 'text CHARSET utf8',_binary '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','mysql.sys@localhost','2020-08-25 04:48:46','2020-08-25 04:48:46','','\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(342342342342345);\n +------------------------------+\n | format_time(342342342342345) |\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary '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'),('sys','list_add','FUNCTION','list_add','SQL','CONTAINS_SQL','YES','INVOKER',_binary ' in_list TEXT, in_add_value TEXT ',_binary 'text CHARSET utf8',_binary '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','mysql.sys@localhost','2020-08-25 04:48:46','2020-08-25 04:48:46','','\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary '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'),('sys','list_drop','FUNCTION','list_drop','SQL','CONTAINS_SQL','YES','INVOKER',_binary ' in_list TEXT, in_drop_value TEXT ',_binary 'text CHARSET utf8',_binary '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','mysql.sys@localhost','2020-08-25 04:48:46','2020-08-25 04:48:46','','\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary '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'),('sys','ps_is_account_enabled','FUNCTION','ps_is_account_enabled','SQL','READS_SQL_DATA','YES','INVOKER',_binary ' in_host VARCHAR(60),  in_user VARCHAR(32) ',_binary 'enum(\'YES\',\'NO\') CHARSET utf8',_binary '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','mysql.sys@localhost','2020-08-25 04:48:46','2020-08-25 04:48:46','','\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary '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'),('sys','ps_is_consumer_enabled','FUNCTION','ps_is_consumer_enabled','SQL','READS_SQL_DATA','YES','INVOKER',_binary ' in_consumer varchar(64) ',_binary 'enum(\'YES\',\'NO\') CHARSET utf8',_binary 'BEGIN DECLARE v_is_enabled ENUM(\'YES\', \'NO\') DEFAULT NULL; DECLARE v_error_msg VARCHAR(128);  IF (in_consumer IS NULL) THEN RETURN NULL; END IF;  SET v_is_enabled = ( 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 );  IF (v_is_enabled IS NOT NULL) THEN RETURN v_is_enabled; ELSE SET v_error_msg = CONCAT(\'Invalid argument error: \', in_consumer, \' in function sys.ps_is_consumer_enabled.\'); SIGNAL SQLSTATE \'HY000\' SET MESSAGE_TEXT = v_error_msg, MYSQL_ERRNO  = 3047; END IF; END','mysql.sys@localhost','2020-08-25 04:48:46','2020-08-25 04:48:46','','\n Description\n \n Determines whether a consumer is enabled (taking the consumer hierarchy into consideration)\n within the Performance Schema.\n \n An exception with errno 3047 is thrown if an unknown consumer name is passed to the function.\n A consumer name of NULL returns NULL.\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary 'BEGIN DECLARE v_is_enabled ENUM(\'YES\', \'NO\') DEFAULT NULL; DECLARE v_error_msg VARCHAR(128);  IF (in_consumer IS NULL) THEN RETURN NULL; END IF;  SET v_is_enabled = ( 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 );  IF (v_is_enabled IS NOT NULL) THEN RETURN v_is_enabled; ELSE SET v_error_msg = CONCAT(\'Invalid argument error: \', in_consumer, \' in function sys.ps_is_consumer_enabled.\'); SIGNAL SQLSTATE \'HY000\' SET MESSAGE_TEXT = v_error_msg, MYSQL_ERRNO  = 3047; END IF; END'),('sys','ps_is_instrument_default_enabled','FUNCTION','ps_is_instrument_default_enabled','SQL','READS_SQL_DATA','YES','INVOKER',_binary ' in_instrument VARCHAR(128) ',_binary 'enum(\'YES\',\'NO\') CHARSET utf8',_binary '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','mysql.sys@localhost','2020-08-25 04:48:46','2020-08-25 04:48:46','','\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary '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'),('sys','ps_is_instrument_default_timed','FUNCTION','ps_is_instrument_default_timed','SQL','READS_SQL_DATA','YES','INVOKER',_binary ' in_instrument VARCHAR(128) ',_binary 'enum(\'YES\',\'NO\') CHARSET utf8',_binary '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','mysql.sys@localhost','2020-08-25 04:48:46','2020-08-25 04:48:46','','\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary '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'),('sys','ps_is_thread_instrumented','FUNCTION','ps_is_thread_instrumented','SQL','READS_SQL_DATA','NO','INVOKER',_binary ' in_connection_id BIGINT UNSIGNED ',_binary 'enum(\'YES\',\'NO\',\'UNKNOWN\') CHARSET utf8',_binary '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','mysql.sys@localhost','2020-08-25 04:48:46','2020-08-25 04:48:46','','\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary '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'),('sys','ps_thread_id','FUNCTION','ps_thread_id','SQL','READS_SQL_DATA','NO','INVOKER',_binary ' in_connection_id BIGINT UNSIGNED ',_binary 'bigint(20) unsigned',_binary 'BEGIN RETURN (SELECT THREAD_ID FROM `performance_schema`.`threads` WHERE PROCESSLIST_ID = IFNULL(in_connection_id, CONNECTION_ID()) ); END','mysql.sys@localhost','2020-08-25 04:48:46','2020-08-25 04:48:46','','\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary 'BEGIN RETURN (SELECT THREAD_ID FROM `performance_schema`.`threads` WHERE PROCESSLIST_ID = IFNULL(in_connection_id, CONNECTION_ID()) ); END'),('sys','ps_thread_account','FUNCTION','ps_thread_account','SQL','READS_SQL_DATA','NO','INVOKER',_binary ' in_thread_id BIGINT UNSIGNED ',_binary 'text CHARSET utf8',_binary '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','mysql.sys@localhost','2020-08-25 04:48:46','2020-08-25 04:48:46','','\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary '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'),('sys','ps_thread_stack','FUNCTION','ps_thread_stack','SQL','READS_SQL_DATA','NO','INVOKER',_binary ' thd_id BIGINT UNSIGNED, debug BOOLEAN ',_binary 'longtext CHARSET latin1',_binary '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','mysql.sys@localhost','2020-08-25 04:48:46','2020-08-25 04:48:46','','\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary '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'),('sys','ps_thread_trx_info','FUNCTION','ps_thread_trx_info','SQL','READS_SQL_DATA','NO','INVOKER',_binary ' in_thread_id BIGINT UNSIGNED ',_binary 'longtext CHARSET utf8',_binary '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','mysql.sys@localhost','2020-08-25 04:48:46','2020-08-25 04:48:46','','\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary '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'),('sys','quote_identifier','FUNCTION','quote_identifier','SQL','NO_SQL','YES','INVOKER',_binary 'in_identifier TEXT',_binary 'text CHARSET utf8',_binary 'BEGIN RETURN CONCAT(\'`\', REPLACE(in_identifier, \'`\', \'``\'), \'`\'); END','mysql.sys@localhost','2020-08-25 04:48:46','2020-08-25 04:48:46','','\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary 'BEGIN RETURN CONCAT(\'`\', REPLACE(in_identifier, \'`\', \'``\'), \'`\'); END'),('sys','sys_get_config','FUNCTION','sys_get_config','SQL','READS_SQL_DATA','YES','INVOKER',_binary ' in_variable_name VARCHAR(128), in_default_value VARCHAR(128) ',_binary 'varchar(128) CHARSET utf8',_binary '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','mysql.sys@localhost','2020-08-25 04:48:46','2020-08-25 04:48:46','','\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary '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'),('sys','version_major','FUNCTION','version_major','SQL','NO_SQL','NO','INVOKER','',_binary 'tinyint(3) unsigned',_binary 'BEGIN RETURN SUBSTRING_INDEX(SUBSTRING_INDEX(VERSION(), \'-\', 1), \'.\', 1); END','mysql.sys@localhost','2020-08-25 04:48:46','2020-08-25 04:48:46','','\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary 'BEGIN RETURN SUBSTRING_INDEX(SUBSTRING_INDEX(VERSION(), \'-\', 1), \'.\', 1); END'),('sys','version_minor','FUNCTION','version_minor','SQL','NO_SQL','NO','INVOKER','',_binary 'tinyint(3) unsigned',_binary 'BEGIN RETURN SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSTRING_INDEX(VERSION(), \'-\', 1), \'.\', 2), \'.\', -1); END','mysql.sys@localhost','2020-08-25 04:48:46','2020-08-25 04:48:46','','\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary 'BEGIN RETURN SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSTRING_INDEX(VERSION(), \'-\', 1), \'.\', 2), \'.\', -1); END'),('sys','version_patch','FUNCTION','version_patch','SQL','NO_SQL','NO','INVOKER','',_binary 'tinyint(3) unsigned',_binary 'BEGIN RETURN SUBSTRING_INDEX(SUBSTRING_INDEX(VERSION(), \'-\', 1), \'.\', -1); END','mysql.sys@localhost','2020-08-25 04:48:46','2020-08-25 04:48:46','','\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary 'BEGIN RETURN SUBSTRING_INDEX(SUBSTRING_INDEX(VERSION(), \'-\', 1), \'.\', -1); END'),('sys','create_synonym_db','PROCEDURE','create_synonym_db','SQL','MODIFIES_SQL_DATA','NO','INVOKER',_binary ' IN in_db_name VARCHAR(64),  IN in_synonym VARCHAR(64) ','',_binary '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','mysql.sys@localhost','2020-08-25 04:48:47','2020-08-25 04:48:47','','\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary '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'),('sys','execute_prepared_stmt','PROCEDURE','execute_prepared_stmt','SQL','READS_SQL_DATA','NO','INVOKER',_binary ' IN in_query longtext CHARACTER SET UTF8 ','',_binary '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','mysql.sys@localhost','2020-08-25 04:48:47','2020-08-25 04:48:47','','\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary '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'),('sys','diagnostics','PROCEDURE','diagnostics','SQL','READS_SQL_DATA','NO','INVOKER',_binary ' IN in_max_runtime int unsigned, IN in_interval int unsigned, IN in_auto_config enum (\'current\', \'medium\', \'full\') ','',_binary '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 COLUMN_NAME LIKE \'\'%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 COLUMN_NAME LIKE \'\'%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, \'`\'));  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 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','mysql.sys@localhost','2020-08-25 04:48:47','2020-08-25 04:48:47','','\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary '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 COLUMN_NAME LIKE \'%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 COLUMN_NAME LIKE \'%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, \'`\'));  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 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'),('sys','ps_statement_avg_latency_histogram','PROCEDURE','ps_statement_avg_latency_histogram','SQL','READS_SQL_DATA','NO','INVOKER','','',_binary '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','mysql.sys@localhost','2020-08-25 04:48:47','2020-08-25 04:48:47','','\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary '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'),('sys','ps_trace_statement_digest','PROCEDURE','ps_trace_statement_digest','SQL','MODIFIES_SQL_DATA','NO','INVOKER',_binary ' 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 ','',_binary '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','mysql.sys@localhost','2020-08-25 04:48:47','2020-08-25 04:48:47','','\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary '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'),('sys','ps_trace_thread','PROCEDURE','ps_trace_thread','SQL','MODIFIES_SQL_DATA','NO','INVOKER',_binary ' 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 ','',_binary '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','mysql.sys@localhost','2020-08-25 04:48:47','2020-08-25 04:48:47','','\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary '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'),('sys','ps_setup_disable_background_threads','PROCEDURE','ps_setup_disable_background_threads','SQL','MODIFIES_SQL_DATA','NO','INVOKER','','',_binary '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','mysql.sys@localhost','2020-08-25 04:48:47','2020-08-25 04:48:47','','\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary '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'),('sys','ps_setup_disable_consumer','PROCEDURE','ps_setup_disable_consumer','SQL','MODIFIES_SQL_DATA','NO','INVOKER',_binary ' IN consumer VARCHAR(128) ','',_binary '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','mysql.sys@localhost','2020-08-25 04:48:47','2020-08-25 04:48:47','','\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary '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'),('sys','ps_setup_disable_instrument','PROCEDURE','ps_setup_disable_instrument','SQL','MODIFIES_SQL_DATA','NO','INVOKER',_binary ' IN in_pattern VARCHAR(128) ','',_binary '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','mysql.sys@localhost','2020-08-25 04:48:47','2020-08-25 04:48:47','','\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary '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'),('sys','ps_setup_disable_thread','PROCEDURE','ps_setup_disable_thread','SQL','MODIFIES_SQL_DATA','NO','INVOKER',_binary ' IN in_connection_id BIGINT ','',_binary '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','mysql.sys@localhost','2020-08-25 04:48:47','2020-08-25 04:48:47','','\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary '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'),('sys','ps_setup_enable_background_threads','PROCEDURE','ps_setup_enable_background_threads','SQL','MODIFIES_SQL_DATA','NO','INVOKER','','',_binary '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','mysql.sys@localhost','2020-08-25 04:48:47','2020-08-25 04:48:47','','\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary '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'),('sys','ps_setup_enable_consumer','PROCEDURE','ps_setup_enable_consumer','SQL','MODIFIES_SQL_DATA','NO','INVOKER',_binary ' IN consumer VARCHAR(128) ','',_binary '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','mysql.sys@localhost','2020-08-25 04:48:47','2020-08-25 04:48:47','','\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary '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'),('sys','ps_setup_enable_instrument','PROCEDURE','ps_setup_enable_instrument','SQL','MODIFIES_SQL_DATA','NO','INVOKER',_binary ' IN in_pattern VARCHAR(128) ','',_binary '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','mysql.sys@localhost','2020-08-25 04:48:47','2020-08-25 04:48:47','','\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary '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'),('sys','ps_setup_enable_thread','PROCEDURE','ps_setup_enable_thread','SQL','MODIFIES_SQL_DATA','NO','INVOKER',_binary ' IN in_connection_id BIGINT ','',_binary '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','mysql.sys@localhost','2020-08-25 04:48:47','2020-08-25 04:48:47','','\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary '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'),('sys','ps_setup_reload_saved','PROCEDURE','ps_setup_reload_saved','SQL','MODIFIES_SQL_DATA','NO','INVOKER','','',_binary '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','mysql.sys@localhost','2020-08-25 04:48:47','2020-08-25 04:48:47','','\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary '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'),('sys','ps_setup_reset_to_default','PROCEDURE','ps_setup_reset_to_default','SQL','MODIFIES_SQL_DATA','NO','INVOKER',_binary ' IN in_verbose BOOLEAN ','',_binary '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','mysql.sys@localhost','2020-08-25 04:48:47','2020-08-25 04:48:47','','\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary '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'),('sys','ps_setup_save','PROCEDURE','ps_setup_save','SQL','MODIFIES_SQL_DATA','NO','INVOKER',_binary ' IN in_timeout INT ','',_binary '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 SELECT * FROM performance_schema.setup_actors LIMIT 0; 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','mysql.sys@localhost','2020-08-25 04:48:47','2020-08-25 04:48:47','','\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary '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 SELECT * FROM performance_schema.setup_actors LIMIT 0; 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'),('sys','ps_setup_show_disabled','PROCEDURE','ps_setup_show_disabled','SQL','READS_SQL_DATA','NO','INVOKER',_binary ' IN in_show_instruments BOOLEAN, IN in_show_threads BOOLEAN ','',_binary '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','mysql.sys@localhost','2020-08-25 04:48:47','2020-08-25 04:48:47','','\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary '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'),('sys','ps_setup_show_disabled_consumers','PROCEDURE','ps_setup_show_disabled_consumers','SQL','READS_SQL_DATA','YES','INVOKER','','',_binary 'BEGIN SELECT name AS disabled_consumers FROM performance_schema.setup_consumers WHERE enabled = \'NO\' ORDER BY disabled_consumers; END','mysql.sys@localhost','2020-08-25 04:48:47','2020-08-25 04:48:47','','\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary 'BEGIN SELECT name AS disabled_consumers FROM performance_schema.setup_consumers WHERE enabled = \'NO\' ORDER BY disabled_consumers; END'),('sys','ps_setup_show_disabled_instruments','PROCEDURE','ps_setup_show_disabled_instruments','SQL','READS_SQL_DATA','YES','INVOKER','','',_binary 'BEGIN SELECT name AS disabled_instruments, timed FROM performance_schema.setup_instruments WHERE enabled = \'NO\' ORDER BY disabled_instruments; END','mysql.sys@localhost','2020-08-25 04:48:47','2020-08-25 04:48:47','','\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary 'BEGIN SELECT name AS disabled_instruments, timed FROM performance_schema.setup_instruments WHERE enabled = \'NO\' ORDER BY disabled_instruments; END'),('sys','ps_setup_show_enabled','PROCEDURE','ps_setup_show_enabled','SQL','READS_SQL_DATA','YES','INVOKER',_binary ' IN in_show_instruments BOOLEAN, IN in_show_threads BOOLEAN ','',_binary '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','mysql.sys@localhost','2020-08-25 04:48:47','2020-08-25 04:48:47','','\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary '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'),('sys','ps_setup_show_enabled_consumers','PROCEDURE','ps_setup_show_enabled_consumers','SQL','READS_SQL_DATA','YES','INVOKER','','',_binary 'BEGIN SELECT name AS enabled_consumers FROM performance_schema.setup_consumers WHERE enabled = \'YES\' ORDER BY enabled_consumers; END','mysql.sys@localhost','2020-08-25 04:48:47','2020-08-25 04:48:47','','\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary 'BEGIN SELECT name AS enabled_consumers FROM performance_schema.setup_consumers WHERE enabled = \'YES\' ORDER BY enabled_consumers; END'),('sys','ps_setup_show_enabled_instruments','PROCEDURE','ps_setup_show_enabled_instruments','SQL','READS_SQL_DATA','YES','INVOKER','','',_binary 'BEGIN SELECT name AS enabled_instruments, timed FROM performance_schema.setup_instruments WHERE enabled = \'YES\' ORDER BY enabled_instruments; END','mysql.sys@localhost','2020-08-25 04:48:47','2020-08-25 04:48:47','','\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary 'BEGIN SELECT name AS enabled_instruments, timed FROM performance_schema.setup_instruments WHERE enabled = \'YES\' ORDER BY enabled_instruments; END'),('sys','ps_truncate_all_tables','PROCEDURE','ps_truncate_all_tables','SQL','MODIFIES_SQL_DATA','YES','INVOKER',_binary ' IN in_verbose BOOLEAN ','',_binary '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','mysql.sys@localhost','2020-08-25 04:48:47','2020-08-25 04:48:47','','\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary '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'),('sys','statement_performance_analyzer','PROCEDURE','statement_performance_analyzer','SQL','CONTAINS_SQL','NO','INVOKER',_binary ' 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\') ','',_binary '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','mysql.sys@localhost','2020-08-25 04:48:47','2020-08-25 04:48:47','','\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                           | +-------------------+-------+------------+---------------+-------------+---------------+-------------------+-------------------+----------------------------------+ ... ','utf8','utf8_general_ci','utf8_general_ci',_binary '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'),('sys','table_exists','PROCEDURE','table_exists','SQL','CONTAINS_SQL','NO','INVOKER',_binary ' IN in_db VARCHAR(64), IN in_table VARCHAR(64), OUT out_exists ENUM(\'\', \'BASE TABLE\', \'VIEW\', \'TEMPORARY\') ','',_binary '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','mysql.sys@localhost','2020-08-25 04:48:47','2020-08-25 04:48:47','','\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 ','utf8','utf8_general_ci','utf8_general_ci',_binary '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');

--
-- Table structure for table `procs_priv`
--

CREATE TABLE `procs_priv` (
  `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
  `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `User` char(32) COLLATE utf8_bin NOT NULL DEFAULT '',
  `Routine_name` char(64) CHARACTER SET utf8 NOT NULL DEFAULT '',
  `Routine_type` enum('FUNCTION','PROCEDURE') COLLATE utf8_bin NOT NULL,
  `Grantor` char(93) COLLATE utf8_bin NOT NULL DEFAULT '',
  `Proc_priv` set('Execute','Alter Routine','Grant') CHARACTER SET utf8 NOT NULL DEFAULT '',
  `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`),
  KEY `Grantor` (`Grantor`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Procedure privileges';

--
-- Dumping data for table `procs_priv`
--


--
-- Table structure for table `proxies_priv`
--

CREATE TABLE `proxies_priv` (
  `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
  `User` char(32) COLLATE utf8_bin NOT NULL DEFAULT '',
  `Proxied_host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
  `Proxied_user` char(32) COLLATE utf8_bin NOT NULL DEFAULT '',
  `With_grant` tinyint(1) NOT NULL DEFAULT '0',
  `Grantor` char(93) COLLATE utf8_bin NOT NULL DEFAULT '',
  `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`Host`,`User`,`Proxied_host`,`Proxied_user`),
  KEY `Grantor` (`Grantor`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User proxy privileges';

--
-- Dumping data for table `proxies_priv`
--

INSERT INTO `proxies_priv` VALUES ('localhost','root','','',1,'boot@connecting host','0000-00-00 00:00:00');

--
-- Table structure for table `server_cost`
--

CREATE TABLE `server_cost` (
  `cost_name` varchar(64) NOT NULL,
  `cost_value` float DEFAULT NULL,
  `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `comment` varchar(1024) DEFAULT NULL,
  PRIMARY KEY (`cost_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0;

--
-- Dumping data for table `server_cost`
--

INSERT INTO `server_cost` VALUES ('disk_temptable_create_cost',NULL,'2020-08-25 04:48:45',NULL),('disk_temptable_row_cost',NULL,'2020-08-25 04:48:45',NULL),('key_compare_cost',NULL,'2020-08-25 04:48:45',NULL),('memory_temptable_create_cost',NULL,'2020-08-25 04:48:45',NULL),('memory_temptable_row_cost',NULL,'2020-08-25 04:48:45',NULL),('row_evaluate_cost',NULL,'2020-08-25 04:48:45',NULL);

--
-- Table structure for table `servers`
--

CREATE TABLE `servers` (
  `Server_name` char(64) NOT NULL DEFAULT '',
  `Host` char(64) NOT NULL DEFAULT '',
  `Db` char(64) NOT NULL DEFAULT '',
  `Username` char(64) NOT NULL DEFAULT '',
  `Password` char(64) NOT NULL DEFAULT '',
  `Port` int(4) NOT NULL DEFAULT '0',
  `Socket` char(64) NOT NULL DEFAULT '',
  `Wrapper` char(64) NOT NULL DEFAULT '',
  `Owner` char(64) NOT NULL DEFAULT '',
  PRIMARY KEY (`Server_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='MySQL Foreign Servers table';

--
-- Dumping data for table `servers`
--


--
-- Table structure for table `slave_master_info`
--

CREATE TABLE IF NOT EXISTS `slave_master_info` (
  `Number_of_lines` int(10) unsigned NOT NULL COMMENT 'Number of lines in the file.',
  `Master_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'The name of the master binary log currently being read from the master.',
  `Master_log_pos` bigint(20) unsigned NOT NULL COMMENT 'The master log position of the last read event.',
  `Host` char(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT 'The host name of the master.',
  `User_name` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The user name used to connect to the master.',
  `User_password` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The password used to connect to the master.',
  `Port` int(10) unsigned NOT NULL COMMENT 'The network port used to connect to the master.',
  `Connect_retry` int(10) unsigned NOT NULL COMMENT 'The period (in seconds) that the slave will wait before trying to reconnect to the master.',
  `Enabled_ssl` tinyint(1) NOT NULL COMMENT 'Indicates whether the server supports SSL connections.',
  `Ssl_ca` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The file used for the Certificate Authority (CA) certificate.',
  `Ssl_capath` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The path to the Certificate Authority (CA) certificates.',
  `Ssl_cert` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The name of the SSL certificate file.',
  `Ssl_cipher` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The name of the cipher in use for the SSL connection.',
  `Ssl_key` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The name of the SSL key file.',
  `Ssl_verify_server_cert` tinyint(1) NOT NULL COMMENT 'Whether to verify the server certificate.',
  `Heartbeat` float NOT NULL,
  `Bind` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'Displays which interface is employed when connecting to the MySQL server',
  `Ignored_server_ids` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The number of server IDs to be ignored, followed by the actual server IDs',
  `Uuid` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The master server uuid.',
  `Retry_count` bigint(20) unsigned NOT NULL COMMENT 'Number of reconnect attempts, to the master, before giving up.',
  `Ssl_crl` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The file used for the Certificate Revocation List (CRL)',
  `Ssl_crlpath` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The path used for Certificate Revocation List (CRL) files',
  `Enabled_auto_position` tinyint(1) NOT NULL COMMENT 'Indicates whether GTIDs will be used to retrieve events from the master.',
  `Channel_name` char(64) NOT NULL COMMENT 'The channel on which the slave is connected to a source. Used in Multisource Replication',
  `Tls_version` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'Tls version',
  PRIMARY KEY (`Channel_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='Master Information';

--
-- Table structure for table `slave_relay_log_info`
--

CREATE TABLE IF NOT EXISTS `slave_relay_log_info` (
  `Number_of_lines` int(10) unsigned NOT NULL COMMENT 'Number of lines in the file or rows in the table. Used to version table definitions.',
  `Relay_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'The name of the current relay log file.',
  `Relay_log_pos` bigint(20) unsigned NOT NULL COMMENT 'The relay log position of the last executed event.',
  `Master_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'The name of the master binary log file from which the events in the relay log file were read.',
  `Master_log_pos` bigint(20) unsigned NOT NULL COMMENT 'The master log position of the last executed event.',
  `Sql_delay` int(11) NOT NULL COMMENT 'The number of seconds that the slave must lag behind the master.',
  `Number_of_workers` int(10) unsigned NOT NULL,
  `Id` int(10) unsigned NOT NULL COMMENT 'Internal Id that uniquely identifies this record.',
  `Channel_name` char(64) NOT NULL COMMENT 'The channel on which the slave is connected to a source. Used in Multisource Replication',
  PRIMARY KEY (`Channel_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='Relay Log Information';

--
-- Table structure for table `slave_worker_info`
--

CREATE TABLE `slave_worker_info` (
  `Id` int(10) unsigned NOT NULL,
  `Relay_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `Relay_log_pos` bigint(20) unsigned NOT NULL,
  `Master_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `Master_log_pos` bigint(20) unsigned NOT NULL,
  `Checkpoint_relay_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `Checkpoint_relay_log_pos` bigint(20) unsigned NOT NULL,
  `Checkpoint_master_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `Checkpoint_master_log_pos` bigint(20) unsigned NOT NULL,
  `Checkpoint_seqno` int(10) unsigned NOT NULL,
  `Checkpoint_group_size` int(10) unsigned NOT NULL,
  `Checkpoint_group_bitmap` blob NOT NULL,
  `Channel_name` char(64) NOT NULL COMMENT 'The channel on which the slave is connected to a source. Used in Multisource Replication',
  PRIMARY KEY (`Channel_name`,`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='Worker Information';

--
-- Dumping data for table `slave_worker_info`
--


--
-- Table structure for table `tables_priv`
--

CREATE TABLE `tables_priv` (
  `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
  `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `User` char(32) COLLATE utf8_bin NOT NULL DEFAULT '',
  `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `Grantor` char(93) COLLATE utf8_bin NOT NULL DEFAULT '',
  `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') CHARACTER SET utf8 NOT NULL DEFAULT '',
  `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
  PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`),
  KEY `Grantor` (`Grantor`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table privileges';

--
-- Dumping data for table `tables_priv`
--

INSERT INTO `tables_priv` VALUES ('localhost','mysql','mysql.session','user','boot@connecting host','0000-00-00 00:00:00','Select',''),('localhost','sys','mysql.sys','sys_config','root@localhost','2020-08-25 04:48:46','Select','');

--
-- Table structure for table `time_zone`
--

CREATE TABLE `time_zone` (
  `Time_zone_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `Use_leap_seconds` enum('Y','N') NOT NULL DEFAULT 'N',
  PRIMARY KEY (`Time_zone_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='Time zones';

--
-- Dumping data for table `time_zone`
--


--
-- Table structure for table `time_zone_leap_second`
--

CREATE TABLE `time_zone_leap_second` (
  `Transition_time` bigint(20) NOT NULL,
  `Correction` int(11) NOT NULL,
  PRIMARY KEY (`Transition_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='Leap seconds information for time zones';

--
-- Dumping data for table `time_zone_leap_second`
--


--
-- Table structure for table `time_zone_name`
--

CREATE TABLE `time_zone_name` (
  `Name` char(64) NOT NULL,
  `Time_zone_id` int(10) unsigned NOT NULL,
  PRIMARY KEY (`Name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='Time zone names';

--
-- Dumping data for table `time_zone_name`
--


--
-- Table structure for table `time_zone_transition`
--

CREATE TABLE `time_zone_transition` (
  `Time_zone_id` int(10) unsigned NOT NULL,
  `Transition_time` bigint(20) NOT NULL,
  `Transition_type_id` int(10) unsigned NOT NULL,
  PRIMARY KEY (`Time_zone_id`,`Transition_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='Time zone transitions';

--
-- Dumping data for table `time_zone_transition`
--


--
-- Table structure for table `time_zone_transition_type`
--

CREATE TABLE `time_zone_transition_type` (
  `Time_zone_id` int(10) unsigned NOT NULL,
  `Transition_type_id` int(10) unsigned NOT NULL,
  `Offset` int(11) NOT NULL DEFAULT '0',
  `Is_DST` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `Abbreviation` char(8) NOT NULL DEFAULT '',
  PRIMARY KEY (`Time_zone_id`,`Transition_type_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='Time zone transition types';

--
-- Dumping data for table `time_zone_transition_type`
--


--
-- Table structure for table `user`
--

CREATE TABLE `user` (
  `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
  `User` char(32) COLLATE utf8_bin NOT NULL DEFAULT '',
  `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `Reload_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `Shutdown_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `Process_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `File_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `Show_db_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `Super_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `Repl_slave_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `Repl_client_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `Create_user_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `Create_tablespace_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 NOT NULL DEFAULT '',
  `ssl_cipher` blob NOT NULL,
  `x509_issuer` blob NOT NULL,
  `x509_subject` blob NOT NULL,
  `max_questions` int(11) unsigned NOT NULL DEFAULT '0',
  `max_updates` int(11) unsigned NOT NULL DEFAULT '0',
  `max_connections` int(11) unsigned NOT NULL DEFAULT '0',
  `max_user_connections` int(11) unsigned NOT NULL DEFAULT '0',
  `plugin` char(64) COLLATE utf8_bin NOT NULL DEFAULT 'mysql_native_password',
  `authentication_string` text COLLATE utf8_bin,
  `password_expired` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  `password_last_changed` timestamp NULL DEFAULT NULL,
  `password_lifetime` smallint(5) unsigned DEFAULT NULL,
  `account_locked` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
  PRIMARY KEY (`Host`,`User`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges';

--
-- Dumping data for table `user`
--

INSERT INTO `user` VALUES ('localhost','root','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'mysql_native_password','*BCFF100CC9154DFC8F59B2BAF3B5F053ED6BE7C1','N','2020-08-25 04:48:47',NULL,'N'),('localhost','mysql.session','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0,0,'mysql_native_password','*THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE','N','2020-08-25 04:48:46',NULL,'Y'),('localhost','mysql.sys','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0,0,'mysql_native_password','*THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE','N','2020-08-25 04:48:46',NULL,'Y'),('localhost','debian-sys-maint','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'mysql_native_password','*73A555D2E485631DBC81AE2EDFDA05053E40FF52','N','2020-08-25 04:48:47',NULL,'N'),('localhost','ktmksu','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0,0,'mysql_native_password','*3CD57443849F5D3A28ACD94C7D772A0175B31829','N','2020-08-25 07:57:36',NULL,'N'),('localhost','ktm','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0,0,'mysql_native_password','*3CD57443849F5D3A28ACD94C7D772A0175B31829','N','2020-08-25 08:53:26',NULL,'N'),('localhost','ktmnew','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0,0,'mysql_native_password','*3CD57443849F5D3A28ACD94C7D772A0175B31829','N','2020-08-25 08:57:54',NULL,'N'),('localhost','admissionksu','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0,0,'mysql_native_password','*57F3E91DB2D00E4F84B0131F314C97F1FD55CD62','N','2020-08-29 02:00:49',NULL,'N'),('localhost','job2','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0,0,'mysql_native_password','*FB5B2E92ED19F12E8FA6F82AE5BCD28E69E3DF98','N','2020-08-29 02:44:38',NULL,'N'),('localhost','service','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0,0,'mysql_native_password','*1C8A40850651C1C86E6950BA8C90FA2E9377B8E4','N','2020-09-15 02:11:47',NULL,'N'),('localhost','adminfarm','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0,0,'mysql_native_password','*7F26001431FF5BD2DE8E9ECC12063E42167388A0','N','2020-09-24 02:48:51',NULL,'N'),('localhost','apiksu','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0,0,'mysql_native_password','*F9CFC4A2CCF7EFACF57607DBD56B060E4F5BE9F4','N','2020-09-24 02:49:38',NULL,'N'),('localhost','register','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0,0,'mysql_native_password','*5F944C4CAB4FA82702FD967F321F05E12A675125','N','2020-10-01 06:30:03',NULL,'N'),('localhost','adminkpm','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0,0,'mysql_native_password','*ED4FD300A29BB0EFB562E798F8B9679ADF85D2D9','N','2020-10-14 07:00:20',NULL,'N'),('localhost','adminu2t','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0,0,'mysql_native_password','*C9B1E262C991C3B489668D1CC1DA5ADAAE930273','N','2021-01-27 03:29:04',NULL,'N'),('localhost','admindc','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0,0,'mysql_native_password','*17E6BFBDCA0259E3AE3000841D349F4A299DB124','N','2021-01-27 03:37:00',NULL,'N'),('localhost','adminu2tksu','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0,0,'mysql_native_password','*D86722036A3B340D41F29824E76A001DA9E75069','N','2021-01-29 01:54:02',NULL,'N'),('localhost','admissionnew','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0,0,'mysql_native_password','*38A5C7367823B2F2E0A1CFD46319A1BB6267FC63','N','2022-09-15 07:03:50',NULL,'N');

--
-- Dumping events for database 'mysql'
--

--
-- Dumping routines for database 'mysql'
--

--
-- Table structure for table `general_log`
--

CREATE TABLE IF NOT EXISTS `general_log` (
  `event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
  `user_host` mediumtext NOT NULL,
  `thread_id` bigint(21) unsigned NOT NULL,
  `server_id` int(10) unsigned NOT NULL,
  `command_type` varchar(64) NOT NULL,
  `argument` mediumblob NOT NULL
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='General log';

--
-- Table structure for table `slow_log`
--

CREATE TABLE IF NOT EXISTS `slow_log` (
  `start_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
  `user_host` mediumtext NOT NULL,
  `query_time` time(6) NOT NULL,
  `lock_time` time(6) NOT NULL,
  `rows_sent` int(11) NOT NULL,
  `rows_examined` int(11) NOT NULL,
  `db` varchar(512) NOT NULL,
  `last_insert_id` int(11) NOT NULL,
  `insert_id` int(11) NOT NULL,
  `server_id` int(10) unsigned NOT NULL,
  `sql_text` mediumblob NOT NULL,
  `thread_id` bigint(21) unsigned NOT NULL
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log';


