Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

infoschema, sessionctx: add support for mysqldump from 8.0 #10829

Merged
merged 13 commits into from Jun 26, 2019
Merged

infoschema, sessionctx: add support for mysqldump from 8.0 #10829

merged 13 commits into from Jun 26, 2019

Conversation

morgo
Copy link
Contributor

@morgo morgo commented Jun 17, 2019

What problem does this PR solve?

Fixes #10804

What is changed and how it works?

Problem 1

The mysqldump client in MySQL 8.0 issues an SQL command to the server to stop caching data dictionary stats (a new feature of MySQL 8.0):

/*!80000 SET SESSION information_schema_stats_expiry=0 */

This is backward compatible for MySQL, since it uses the conditional version syntax to only work in 8.0 and above. At least currently in TiDB, the conditional version syntax is ignored, and thus this statement attempts to execute, resulting in an error preventing backup:

morgo@ryzen:~/sandboxes/msb_8_0_16$ ./my sqldump --port=4000 -h 127.0.0.1 -uroot -p test
Enter password: 
mysqldump: Couldn't execute '/*!80000 SET SESSION information_schema_stats_expiry=0 */': Unknown system variable 'information_schema_stats_expiry' (1193)

Problem 2

The mysqldump client queries the table information_schema.column_statistics to retrieve histogram information. This PR provides an empty table of the correct structure, which seems to satisfy the dump client.

Check List

Tests

  • Unit testing (infoschema)
  • Integration test (testing both setting this variable and the version-specific syntax together)
  • Manual test with 8.0 client

Code changes

  • Has exported variable/fields change

Side effects

  • Increased code complexity

Related changes

  • May need to cherry-pick to the release branch

Required for compatibility with mysqldump from MySQL 8.0.
Fixes #10804
@morgo
Copy link
Contributor Author

morgo commented Jun 17, 2019

@SunRunAway PTAL

@codecov
Copy link

codecov bot commented Jun 17, 2019

Codecov Report

Merging #10829 into master will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##            master    #10829   +/-   ##
=========================================
  Coverage   80.901%   80.901%           
=========================================
  Files          418       418           
  Lines        89450     89450           
=========================================
  Hits         72366     72366           
  Misses       11853     11853           
  Partials      5231      5231

@SunRunAway
Copy link
Contributor

Another error occured,

mysqldump -h127.0.0.1 -P5000 -uroot test
-- MySQL dump 10.13  Distrib 8.0.15, for osx10.14 (x86_64)
--
-- Host: 127.0.0.1    Database: test
-- ------------------------------------------------------
-- Server version	8.0.15

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
 SET NAMES utf8mb4 ;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `t`
--

DROP TABLE IF EXISTS `t`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
 SET character_set_client = utf8mb4 ;
CREATE TABLE `t` (
  `id` int(11) DEFAULT NULL,
  `cnt` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `t`
--

LOCK TABLES `t` WRITE;
/*!40000 ALTER TABLE `t` DISABLE KEYS */;
INSERT INTO `t` VALUES (4,1),(3,2),(1,4),(2,2),(1,1),(1,5),(2,6),(2,1),(1,3),(3,4),(4,5),(3,6);
/*!40000 ALTER TABLE `t` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `t1`
--

DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
 SET character_set_client = utf8mb4 ;
CREATE TABLE `t1` (
  `id` int(11) DEFAULT NULL,
  `sex` char(1) COLLATE utf8mb4_general_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `t1`
--

LOCK TABLES `t1` WRITE;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
INSERT INTO `t1` VALUES (1,'F'),(2,'F'),(3,'F'),(3,'M'),(4,'M'),(5,'M'),(6,'F');
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2019-06-18 10:32:25
[sunrunaway:~]$ mysqldump -h127.0.0.1 -P4000 -uroot test
-- MySQL dump 10.13  Distrib 8.0.15, for osx10.14 (x86_64)
--
-- Host: 127.0.0.1    Database: test
-- ------------------------------------------------------
-- Server version	5.7.25-TiDB-None

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
 SET NAMES utf8mb4 ;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `t`
--

DROP TABLE IF EXISTS `t`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
 SET character_set_client = utf8mb4 ;
CREATE TABLE `t` (
  `id` int(11) DEFAULT NULL,
  `cnt` int(11) DEFAULT NULL,
  KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `t`
--

LOCK TABLES `t` WRITE;
/*!40000 ALTER TABLE `t` DISABLE KEYS */;
INSERT INTO `t` VALUES (4,1),(3,2),(1,4),(2,2),(1,1),(1,5),(2,6),(2,1),(4,1),(3,2),(1,4),(2,2),(1,1),(1,5),(2,6),(2,1),(4,1),(3,2),(1,4),(2,2),(1,1),(1,5),(2,6),(2,1);
/*!40000 ALTER TABLE `t` ENABLE KEYS */;
UNLOCK TABLES;
mysqldump: Couldn't execute 'SELECT COLUMN_NAME,                       JSON_EXTRACT(HISTOGRAM, '$."number-of-buckets-specified"')                FROM information_schema.COLUMN_STATISTICS                WHERE SCHEMA_NAME = 'test' AND TABLE_NAME = 't';': Table 'information_schema.COLUMN_STATISTICS' doesn't exist (1146)

@morgo
Copy link
Contributor Author

morgo commented Jun 18, 2019

(Editing my previous comment - I was looking at the wrong schema).

I think we can fix this by creating a new empty information_schema table. I will take a look at it.

@morgo morgo changed the title sessionctx: add information_schema_stats_expiry infoschema, sessionctx: add support for mysqldump from 8.0 Jun 18, 2019
@morgo
Copy link
Contributor Author

morgo commented Jun 18, 2019

@SunRunAway PTAL again. Thanks :-)

SunRunAway
SunRunAway previously approved these changes Jun 19, 2019
Copy link
Contributor

@SunRunAway SunRunAway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zz-jason
Copy link
Member

for problem 2:

The mysqldump client queries the table information_schema.column_statistics to retrieve histogram information. This PR provides an empty table of the correct structure, which seems to satisfy the dump client.

Seems information_schema.column_statistics is a View created based on table mysql.column_statistics:

MySQL(root@localhost:information_schema) > show create view column_statistics\G
*************************** 1. row ***************************
                View: COLUMN_STATISTICS
         Create View: CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `COLUMN_STATISTICS` AS select `mysql`.`column_statistics`.`schema_name` AS `SCHEMA_NAME`,`mysql`.`column_statistics`.`table_name` AS `TABLE_NAME`,`mysql`.`column_statistics`.`column_name` AS `COLUMN_NAME`,`mysql`.`column_statistics`.`histogram` AS `HISTOGRAM` from `mysql`.`column_statistics` where can_access_table(`mysql`.`column_statistics`.`schema_name`,`mysql`.`column_statistics`.`table_name`)
character_set_client: utf8
collation_connection: utf8_general_ci
1 row in set (0.00 sec)

MySQL(root@localhost:information_schema) > desc column_statistics;
+-------------+-------------+------+-----+---------+-------+
| Field       | Type        | Null | Key | Default | Extra |
+-------------+-------------+------+-----+---------+-------+
| SCHEMA_NAME | varchar(64) | NO   |     | NULL    |       |
| TABLE_NAME  | varchar(64) | NO   |     | NULL    |       |
| COLUMN_NAME | varchar(64) | NO   |     | NULL    |       |
| HISTOGRAM   | json        | NO   |     | NULL    |       |
+-------------+-------------+------+-----+---------+-------+
4 rows in set (0.01 sec)

An ideal fix on TiDB is to return the result from mysql.histograms? @lamxTyler PTAL

@alivxxx
Copy link
Contributor

alivxxx commented Jun 19, 2019

Yes, an ideal fix is to format the tidb stats.

@morgo
Copy link
Contributor Author

morgo commented Jun 19, 2019

Seems information_schema.column_statistics is a View created based on table mysql.column_statistics:

In MySQL 8.0 information_schema is implemented as views on mysql.* tables; except the MySQL tables are hidden. You can't see them or read from them directly unless you use a debug binary.

I will take a look to see if it makes sense to map to mysql.histograms.

@morgo
Copy link
Contributor Author

morgo commented Jun 19, 2019

I took a look at populating the histograms table. For some background context:

  • Histograms are a MySQL 8.0 feature
  • (Differing from TiDB) they are not automatically generated or automatically updated. You have to specify you want a histogram on a particular column:
ANALYZE TABLE t1 UPDATE HISTOGRAM ON b WITH 1024 BUCKETS;
+---------+-----------+----------+----------------------------------------------+
| Table   | Op        | Msg_type | Msg_text                                     |
+---------+-----------+----------+----------------------------------------------+
| test.t1 | histogram | status   | Histogram statistics created for column 'b'. |
+---------+-----------+----------+----------------------------------------------+
1 row in set (1.28 sec)

The histogram is then visible in information_schema.column_statistics. It is not present on SHOW CREATE TABLE:

mysql [localhost:8016] {msandbox} (test) > show create table t1\G
*************************** 1. row ***************************
       Table: t1
Create Table: CREATE TABLE `t1` (
  `a` int(11) NOT NULL AUTO_INCREMENT,
  `b` int(11) NOT NULL,
  PRIMARY KEY (`a`)
) ENGINE=InnoDB AUTO_INCREMENT=131056 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
1 row in set (0.02 sec)

mysql [localhost:8016] {msandbox} (test) > SELECT * FROM information_schema.column_statistics;
+-------------+------------+-------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| SCHEMA_NAME | TABLE_NAME | COLUMN_NAME | HISTOGRAM                                                                                                                                                                                                                                       |
+-------------+------------+-------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| test        | t1         | b           | {"buckets": [[1, 0.25], [2, 0.5], [3, 1.0]], "data-type": "int", "null-values": 0.0, "collation-id": 8, "last-updated": "2019-06-19 15:32:02.612772", "sampling-rate": 1.0, "histogram-type": "singleton", "number-of-buckets-specified": 1024} |
+-------------+------------+-------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql [localhost:8016] {msandbox} (test) > update t1 set b = floor(rand()*5000);
Query OK, 65524 rows affected (6.49 sec)
Rows matched: 65536  Changed: 65524  Warnings: 0

mysql [localhost:8016] {msandbox} (test) > ANALYZE TABLE t1 UPDATE HISTOGRAM ON b WITH 1024 BUCKETS;
+---------+-----------+----------+----------------------------------------------+
| Table   | Op        | Msg_type | Msg_text                                     |
+---------+-----------+----------+----------------------------------------------+
| test.t1 | histogram | status   | Histogram statistics created for column 'b'. |
+---------+-----------+----------+----------------------------------------------+
1 row in set (1.25 sec)

mysql [localhost:8016] {msandbox} (test) > SELECT * FROM information_schema.column_statistics\G
*************************** 1. row ***************************
SCHEMA_NAME: test
 TABLE_NAME: t1
COLUMN_NAME: b
  HISTOGRAM: {"buckets": [[0, 4, 0.0010223388671875, 5], [5, 9, 0.0019073486328125, 5], [10, 15, 0.002960205078125, 6], [16, 19, 0.003875732421875, 4], [20, 23, 0.0048370361328125, 4], [24, 29, 0.0059356689453125, 6], [30, 35, 0.0068359375, 6], [36, 40, 0.00787353515625, 5], [41, 45, 0.00885009765625, 5], [46, 50, 0.0097808837890625, 5], [51, 55, 0.01068115234375, 5], [56, 60, 0.0117645263671875, 5], [61, 65, 0.012603759765625, 5], [66, 69, 0.0137786865234375, 4], [70, 73, 0.014678955078125, 4], [74, 76, 0.01556396484375, 3], [77, 82, 0.016693115234375, 6], [83, 86, 0.0174713134765625, 4], [87, 91, 0.018524169921875, 5], [92, 96, 0.0195159912109375, 5], [97, 101, 0.02056884765625, 5], [102, 106, 0.021514892578125, 5], [107, 110, 0.0224609375, 4], [111, 115, 0.0234527587890625, 5], [116, 120, 0.0244293212890625, 5], [121, 123, 0.025299072265625, 3], [124, 127, 0.0263519287109375, 4], [128, 132, 0.0274200439453125, 5], [133, 137, 0.0283966064453125, 5], [138, 141, 0.029296875, 4], [142, 146, 0.03033447265625, 5], [147, 150, 0.0310821533203125, 4], [151, 155, 0.0322418212890625, 5], [156, 160, 0.033172607421875, 5], [161, 165, 0.034210205078125, 5], [166, 170, 0.0351104736328125, 5], [171, 175, 0.0361480712890625, 5], [176, 179, 0.037017822265625, 4], [180, 184, 0.0380401611328125, 5], [185, 190, 0.0391387939453125, 6], [191, 195, 0.040069580078125, 5], [196, 199, 0.0410308837890625, 4], [200, 204, 0.0419464111328125, 5], [205, 209, 0.0429534912109375, 5], [210, 214, 0.0439300537109375, 5], [215, 218, 0.044921875, 4], [219, 224, 0.04595947265625, 6], [225, 229, 0.0469512939453125, 5], [230, 235, 0.047882080078125, 6], [236, 239, 0.048797607421875, 4], [240, 244, 0.0498809814453125, 5], [245, 248, 0.05084228515625, 4], [249, 253, 0.0517730712890625, 5], [254, 258, 0.0528106689453125, 5], [259, 263, 0.053680419921875, 5], [264, 267, 0.0546417236328125, 4], [268, 272, 0.055572509765625, 5], [273, 277, 0.0566253662109375, 5], [278, 281, 0.0575714111328125, 4], [282, 286, 0.0586700439453125, 5], [287, 290, 0.0596466064453125, 4], [291, 295, 0.0606231689453125, 5], [296, 299, 0.061431884765625, 4], [300, 305, 0.06256103515625, 6], [306, 309, 0.06353759765625, 4], [310, 315, 0.0645751953125, 6], [316, 319, 0.0655059814453125, 4], [320, 324, 0.0664215087890625, 5], [325, 330, 0.0675201416015625, 6], [331, 334, 0.06829833984375, 4], [335, 339, 0.069366455078125, 5], [340, 343, 0.070281982421875, 4], [344, 348, 0.071319580078125, 5], [349, 353, 0.072265625, 5], [354, 359, 0.0732269287109375, 6], [360, 364, 0.074127197265625, 5], [365, 369, 0.0752105712890625, 5], [370, 375, 0.076263427734375, 6], [376, 380, 0.077239990234375, 5], [381, 384, 0.078155517578125, 4], [385, 389, 0.0791015625, 5], [390, 394, 0.08001708984375, 5], [395, 399, 0.0810546875, 5], [400, 404, 0.0820159912109375, 5], [405, 409, 0.08294677734375, 5], [410, 413, 0.08392333984375, 4], [414, 418, 0.08489990234375, 5], [419, 423, 0.0859222412109375, 5], [424, 427, 0.0868988037109375, 4], [428, 432, 0.087890625, 5], [433, 436, 0.0889129638671875, 4], [437, 441, 0.0898284912109375, 5], [442, 446, 0.0907440185546875, 5], [447, 451, 0.0918121337890625, 5], [452, 455, 0.0926666259765625, 4], [456, 459, 0.093780517578125, 4], [460, 464, 0.09466552734375, 5], [465, 470, 0.095703125, 6], [471, 475, 0.096710205078125, 5], [476, 480, 0.09771728515625, 5], [481, 485, 0.09869384765625, 5], [486, 489, 0.099578857421875, 4], [490, 494, 0.10052490234375, 5], [495, 499, 0.101531982421875, 5], [500, 504, 0.10260009765625, 5], [505, 508, 0.103515625, 4], [509, 513, 0.1045684814453125, 5], [514, 518, 0.10546875, 5], [519, 523, 0.1065673828125, 5], [524, 528, 0.1074371337890625, 5], [529, 533, 0.1084136962890625, 5], [534, 538, 0.10943603515625, 5], [539, 542, 0.1103668212890625, 4], [543, 546, 0.111358642578125, 4], [547, 550, 0.112335205078125, 4], [551, 554, 0.1132049560546875, 4], [555, 560, 0.11419677734375, 6], [561, 565, 0.115325927734375, 5], [566, 569, 0.11627197265625, 4], [570, 574, 0.1172637939453125, 5], [575, 578, 0.1182403564453125, 4], [579, 583, 0.1191558837890625, 5], [584, 588, 0.1201171875, 5], [589, 593, 0.1212310791015625, 5], [594, 597, 0.12213134765625, 4], [598, 602, 0.123138427734375, 5], [603, 607, 0.124053955078125, 5], [608, 611, 0.125, 4], [612, 616, 0.126007080078125, 5], [617, 620, 0.1270294189453125, 4], [621, 625, 0.1279449462890625, 5], [626, 630, 0.128936767578125, 5], [631, 634, 0.12982177734375, 4], [635, 639, 0.1309967041015625, 5], [640, 643, 0.1319122314453125, 4], [644, 648, 0.13287353515625, 5], [649, 652, 0.1337127685546875, 4], [653, 658, 0.13482666015625, 6], [659, 663, 0.135772705078125, 5], [664, 668, 0.136688232421875, 5], [669, 674, 0.137664794921875, 6], [675, 680, 0.1386871337890625, 6], [681, 686, 0.13970947265625, 6], [687, 691, 0.1407012939453125, 5], [692, 695, 0.1415557861328125, 4], [696, 701, 0.1425628662109375, 6], [702, 707, 0.1435394287109375, 6], [708, 711, 0.1445465087890625, 4], [712, 716, 0.1454315185546875, 5], [717, 720, 0.1463775634765625, 4], [721, 727, 0.147491455078125, 7], [728, 731, 0.1483306884765625, 4], [732, 736, 0.14947509765625, 5], [737, 741, 0.1504364013671875, 5], [742, 746, 0.1513519287109375, 5], [747, 751, 0.1523895263671875, 5], [752, 756, 0.153350830078125, 5], [757, 762, 0.154327392578125, 6], [763, 767, 0.1552886962890625, 5], [768, 772, 0.1561737060546875, 5], [773, 778, 0.15728759765625, 6], [779, 783, 0.15826416015625, 5], [784, 788, 0.159088134765625, 5], [789, 793, 0.1601715087890625, 5], [794, 798, 0.1610260009765625, 5], [799, 803, 0.16204833984375, 5], [804, 809, 0.163055419921875, 6], [810, 814, 0.1640167236328125, 5], [815, 818, 0.1650238037109375, 4], [819, 822, 0.16595458984375, 4], [823, 827, 0.167083740234375, 5], [828, 831, 0.167938232421875, 4], [832, 835, 0.1688995361328125, 4], [836, 839, 0.1698455810546875, 4], [840, 844, 0.1708526611328125, 5], [845, 848, 0.1717987060546875, 4], [849, 854, 0.1728973388671875, 6], [855, 858, 0.173858642578125, 4], [859, 865, 0.1748809814453125, 7], [866, 869, 0.175872802734375, 4], [870, 873, 0.17681884765625, 4], [874, 877, 0.177734375, 4], [878, 882, 0.178802490234375, 5], [883, 887, 0.179718017578125, 5], [888, 892, 0.1805877685546875, 5], [893, 897, 0.1816558837890625, 5], [898, 901, 0.182586669921875, 4], [902, 906, 0.1835784912109375, 5], [907, 911, 0.18475341796875, 5], [912, 915, 0.185546875, 4], [916, 920, 0.1865386962890625, 5], [921, 924, 0.1874542236328125, 4], [925, 929, 0.1884613037109375, 5], [930, 934, 0.1894683837890625, 5], [935, 939, 0.1903839111328125, 5], [940, 945, 0.191436767578125, 6], [946, 950, 0.192413330078125, 5], [951, 955, 0.19329833984375, 5], [956, 960, 0.1943511962890625, 5], [961, 965, 0.195281982421875, 5], [966, 971, 0.1962738037109375, 6], [972, 976, 0.197235107421875, 5], [977, 981, 0.198211669921875, 5], [982, 986, 0.1992340087890625, 5], [987, 990, 0.2002105712890625, 4], [991, 996, 0.2012786865234375, 6], [997, 1000, 0.2021026611328125, 4], [1001, 1006, 0.2031097412109375, 6], [1007, 1011, 0.2041778564453125, 5], [1012, 1016, 0.2051544189453125, 5], [1017, 1021, 0.2061309814453125, 5], [1022, 1026, 0.2071380615234375, 5], [1027, 1031, 0.2080078125, 5], [1032, 1036, 0.2090301513671875, 5], [1037, 1041, 0.2100372314453125, 5], [1042, 1046, 0.2110443115234375, 5], [1047, 1050, 0.2118377685546875, 4], [1051, 1055, 0.212921142578125, 5], [1056, 1059, 0.2137908935546875, 4], [1060, 1064, 0.214752197265625, 5], [1065, 1069, 0.2158660888671875, 5], [1070, 1074, 0.2168121337890625, 5], [1075, 1080, 0.2178192138671875, 6], [1081, 1084, 0.21881103515625, 4], [1085, 1089, 0.21966552734375, 5], [1090, 1094, 0.2207794189453125, 5], [1095, 1098, 0.2215423583984375, 4], [1099, 1103, 0.2227020263671875, 5], [1104, 1109, 0.2236328125, 6], [1110, 1114, 0.22467041015625, 5], [1115, 1118, 0.225738525390625, 4], [1119, 1122, 0.2265625, 4], [1123, 1127, 0.2274932861328125, 5], [1128, 1131, 0.228485107421875, 4], [1132, 1137, 0.2295684814453125, 6], [1138, 1142, 0.2305755615234375, 5], [1143, 1146, 0.231414794921875, 4], [1147, 1152, 0.23248291015625, 6], [1153, 1156, 0.23333740234375, 4], [1157, 1161, 0.2342987060546875, 5], [1162, 1166, 0.23541259765625, 5], [1167, 1171, 0.2363433837890625, 5], [1172, 1175, 0.2373046875, 4], [1176, 1179, 0.2382659912109375, 4], [1180, 1185, 0.2392425537109375, 6], [1186, 1190, 0.2403717041015625, 5], [1191, 1194, 0.2412567138671875, 4], [1195, 1198, 0.2420806884765625, 4], [1199, 1204, 0.2432098388671875, 6], [1205, 1209, 0.2441253662109375, 5], [1210, 1214, 0.24517822265625, 5], [1215, 1218, 0.246063232421875, 4], [1219, 1223, 0.2470855712890625, 5], [1224, 1228, 0.2480010986328125, 5], [1229, 1233, 0.2490386962890625, 5], [1234, 1238, 0.2499847412109375, 5], [1239, 1243, 0.251007080078125, 5], [1244, 1247, 0.251922607421875, 4], [1248, 1252, 0.25286865234375, 5], [1253, 1258, 0.253997802734375, 6], [1259, 1263, 0.25494384765625, 5], [1264, 1267, 0.2557525634765625, 4], [1268, 1272, 0.2569732666015625, 5], [1273, 1276, 0.2578277587890625, 4], [1277, 1281, 0.2587738037109375, 5], [1282, 1286, 0.2598114013671875, 5], [1287, 1291, 0.2607269287109375, 5], [1292, 1296, 0.26171875, 5], [1297, 1300, 0.262603759765625, 4], [1301, 1305, 0.2636566162109375, 5], [1306, 1311, 0.2646942138671875, 6], [1312, 1316, 0.2657623291015625, 5], [1317, 1320, 0.2665863037109375, 4], [1321, 1324, 0.2674713134765625, 4], [1325, 1329, 0.26861572265625, 5], [1330, 1334, 0.269439697265625, 5], [1335, 1340, 0.2705535888671875, 6], [1341, 1345, 0.2715606689453125, 5], [1346, 1349, 0.2724609375, 4], [1350, 1354, 0.2733612060546875, 5], [1355, 1359, 0.27447509765625, 5], [1360, 1363, 0.2753753662109375, 4], [1364, 1369, 0.2764892578125, 6], [1370, 1373, 0.2773895263671875, 4], [1374, 1377, 0.278289794921875, 4], [1378, 1383, 0.279296875, 6], [1384, 1388, 0.28033447265625, 5], [1389, 1393, 0.2812347412109375, 5], [1394, 1399, 0.282196044921875, 6], [1400, 1404, 0.283111572265625, 5], [1405, 1408, 0.2840576171875, 4], [1409, 1413, 0.285125732421875, 5], [1414, 1417, 0.2861480712890625, 4], [1418, 1422, 0.2871246337890625, 5], [1423, 1427, 0.2879638671875, 5], [1428, 1432, 0.2889862060546875, 5], [1433, 1437, 0.290008544921875, 5], [1438, 1442, 0.2909088134765625, 5], [1443, 1447, 0.2920379638671875, 5], [1448, 1451, 0.29296875, 4], [1452, 1455, 0.2939605712890625, 4], [1456, 1461, 0.29486083984375, 6], [1462, 1466, 0.2958984375, 5], [1467, 1470, 0.296844482421875, 4], [1471, 1474, 0.2978363037109375, 4], [1475, 1479, 0.2989044189453125, 5], [1480, 1483, 0.2998046875, 4], [1484, 1488, 0.3007354736328125, 5], [1489, 1493, 0.3017730712890625, 5], [1494, 1498, 0.30279541015625, 5], [1499, 1504, 0.3038177490234375, 6], [1505, 1509, 0.304779052734375, 5], [1510, 1513, 0.3056640625, 4], [1514, 1518, 0.306671142578125, 5], [1519, 1522, 0.3076019287109375, 4], [1523, 1527, 0.3085479736328125, 5], [1528, 1532, 0.30963134765625, 5], [1533, 1537, 0.310638427734375, 5], [1538, 1541, 0.311553955078125, 4], [1542, 1546, 0.3125, 5], [1547, 1551, 0.3135528564453125, 5], [1552, 1556, 0.3144073486328125, 5], [1557, 1560, 0.315338134765625, 4], [1561, 1565, 0.31634521484375, 5], [1566, 1569, 0.3173065185546875, 4], [1570, 1575, 0.3183441162109375, 6], [1576, 1581, 0.31939697265625, 6], [1582, 1585, 0.32037353515625, 4], [1586, 1590, 0.3212738037109375, 5], [1591, 1594, 0.322235107421875, 4], [1595, 1600, 0.3231658935546875, 6], [1601, 1605, 0.32421875, 5], [1606, 1610, 0.3253173828125, 5], [1611, 1613, 0.326171875, 3], [1614, 1618, 0.3271026611328125, 5], [1619, 1623, 0.328033447265625, 5], [1624, 1628, 0.3291168212890625, 5], [1629, 1634, 0.33013916015625, 6], [1635, 1639, 0.331146240234375, 5], [1640, 1643, 0.3320770263671875, 4], [1644, 1648, 0.3329620361328125, 5], [1649, 1654, 0.333984375, 6], [1655, 1658, 0.3348388671875, 4], [1659, 1663, 0.3358917236328125, 5], [1664, 1668, 0.3369293212890625, 5], [1669, 1673, 0.3378143310546875, 5], [1674, 1678, 0.3388671875, 5], [1679, 1682, 0.3397979736328125, 4], [1683, 1687, 0.34088134765625, 5], [1688, 1692, 0.3419036865234375, 5], [1693, 1696, 0.3426971435546875, 4], [1697, 1701, 0.343780517578125, 5], [1702, 1707, 0.34466552734375, 6], [1708, 1712, 0.3457489013671875, 5], [1713, 1718, 0.3466796875, 6], [1719, 1722, 0.347625732421875, 4], [1723, 1728, 0.34857177734375, 6], [1729, 1733, 0.349639892578125, 5], [1734, 1739, 0.3506317138671875, 6], [1740, 1744, 0.351531982421875, 5], [1745, 1749, 0.352447509765625, 5], [1750, 1753, 0.353424072265625, 4], [1754, 1757, 0.3545379638671875, 4], [1758, 1762, 0.355499267578125, 5], [1763, 1767, 0.3564300537109375, 5], [1768, 1773, 0.3574676513671875, 6], [1774, 1777, 0.3583221435546875, 4], [1778, 1781, 0.3592987060546875, 4], [1782, 1785, 0.3602752685546875, 4], [1786, 1790, 0.3612518310546875, 5], [1791, 1795, 0.3623809814453125, 5], [1796, 1800, 0.3633270263671875, 5], [1801, 1806, 0.3642730712890625, 6], [1807, 1811, 0.3651885986328125, 5], [1812, 1815, 0.3661956787109375, 4], [1816, 1820, 0.3671417236328125, 5], [1821, 1826, 0.368194580078125, 6], [1827, 1830, 0.3690948486328125, 4], [1831, 1835, 0.370025634765625, 5], [1836, 1840, 0.3711090087890625, 5], [1841, 1845, 0.3719940185546875, 5], [1846, 1850, 0.37298583984375, 5], [1851, 1856, 0.3741455078125, 6], [1857, 1861, 0.3750152587890625, 5], [1862, 1867, 0.376007080078125, 6], [1868, 1872, 0.376922607421875, 5], [1873, 1877, 0.377899169921875, 5], [1878, 1883, 0.3789520263671875, 6], [1884, 1888, 0.3798370361328125, 5], [1889, 1893, 0.3809356689453125, 5], [1894, 1897, 0.3817138671875, 4], [1898, 1902, 0.3828125, 5], [1903, 1907, 0.383819580078125, 5], [1908, 1911, 0.384735107421875, 4], [1912, 1917, 0.3857879638671875, 6], [1918, 1922, 0.386749267578125, 5], [1923, 1927, 0.3877410888671875, 5], [1928, 1931, 0.38873291015625, 4], [1932, 1936, 0.38958740234375, 5], [1937, 1943, 0.390716552734375, 7], [1944, 1948, 0.3916168212890625, 5], [1949, 1953, 0.3925628662109375, 5], [1954, 1959, 0.393585205078125, 6], [1960, 1964, 0.3945159912109375, 5], [1965, 1969, 0.395538330078125, 5], [1970, 1973, 0.3965301513671875, 4], [1974, 1979, 0.397491455078125, 6], [1980, 1983, 0.3983917236328125, 4], [1984, 1989, 0.3994293212890625, 6], [1990, 1993, 0.4004058837890625, 4], [1994, 1998, 0.4013519287109375, 5], [1999, 2004, 0.4024658203125, 6], [2005, 2009, 0.4033203125, 5], [2010, 2014, 0.4044036865234375, 5], [2015, 2018, 0.4053802490234375, 4], [2019, 2022, 0.4063568115234375, 4], [2023, 2026, 0.407257080078125, 4], [2027, 2031, 0.408294677734375, 5], [2032, 2035, 0.4093170166015625, 4], [2036, 2040, 0.41015625, 5], [2041, 2045, 0.4111785888671875, 5], [2046, 2050, 0.4121246337890625, 5], [2051, 2053, 0.41314697265625, 3], [2054, 2057, 0.4139862060546875, 4], [2058, 2062, 0.4149322509765625, 5], [2063, 2068, 0.416107177734375, 6], [2069, 2072, 0.416961669921875, 4], [2073, 2078, 0.417877197265625, 6], [2079, 2082, 0.4189300537109375, 4], [2083, 2088, 0.419952392578125, 6], [2089, 2093, 0.4209442138671875, 5], [2094, 2098, 0.421905517578125, 5], [2099, 2103, 0.42279052734375, 5], [2104, 2109, 0.4238128662109375, 6], [2110, 2113, 0.42474365234375, 4], [2114, 2117, 0.425689697265625, 4], [2118, 2122, 0.4266815185546875, 5], [2123, 2128, 0.427734375, 6], [2129, 2134, 0.4287872314453125, 6], [2135, 2139, 0.4297027587890625, 5], [2140, 2144, 0.43072509765625, 5], [2145, 2149, 0.431640625, 5], [2150, 2154, 0.432708740234375, 5], [2155, 2159, 0.4336700439453125, 5], [2160, 2164, 0.434661865234375, 5], [2165, 2169, 0.4354248046875, 5], [2170, 2175, 0.436492919921875, 6], [2176, 2181, 0.4375762939453125, 6], [2182, 2186, 0.438507080078125, 5], [2187, 2190, 0.4393768310546875, 4], [2191, 2195, 0.440460205078125, 5], [2196, 2201, 0.4414215087890625, 6], [2202, 2206, 0.4423980712890625, 5], [2207, 2211, 0.4433135986328125, 5], [2212, 2217, 0.44439697265625, 6], [2218, 2221, 0.4452056884765625, 4], [2222, 2226, 0.4462432861328125, 5], [2227, 2230, 0.4472198486328125, 4], [2231, 2235, 0.4482879638671875, 5], [2236, 2240, 0.4492340087890625, 5], [2241, 2245, 0.45013427734375, 5], [2246, 2250, 0.4512176513671875, 5], [2251, 2255, 0.4521636962890625, 5], [2256, 2259, 0.453125, 4], [2260, 2263, 0.4539947509765625, 4], [2264, 2267, 0.45501708984375, 4], [2268, 2272, 0.4561004638671875, 5], [2273, 2277, 0.4571533203125, 5], [2278, 2281, 0.457977294921875, 4], [2282, 2285, 0.4589080810546875, 4], [2286, 2291, 0.4600067138671875, 6], [2292, 2296, 0.4609375, 5], [2297, 2301, 0.4619598388671875, 5], [2302, 2305, 0.462890625, 4], [2306, 2310, 0.4638214111328125, 5], [2311, 2315, 0.46490478515625, 5], [2316, 2320, 0.4659271240234375, 5], [2321, 2323, 0.466705322265625, 3], [2324, 2327, 0.467926025390625, 4], [2328, 2331, 0.4687042236328125, 4], [2332, 2335, 0.4696807861328125, 4], [2336, 2340, 0.470611572265625, 5], [2341, 2346, 0.4717254638671875, 6], [2347, 2349, 0.472564697265625, 3], [2350, 2354, 0.4736480712890625, 5], [2355, 2359, 0.474609375, 5], [2360, 2363, 0.4755859375, 4], [2364, 2369, 0.4766082763671875, 6], [2370, 2374, 0.4775390625, 5], [2375, 2379, 0.478546142578125, 5], [2380, 2384, 0.4795684814453125, 5], [2385, 2388, 0.4803924560546875, 4], [2389, 2393, 0.4813995361328125, 5], [2394, 2398, 0.4824371337890625, 5], [2399, 2403, 0.483428955078125, 5], [2404, 2408, 0.4844512939453125, 5], [2409, 2412, 0.4853057861328125, 4], [2413, 2416, 0.4862518310546875, 4], [2417, 2421, 0.48736572265625, 5], [2422, 2425, 0.488250732421875, 4], [2426, 2429, 0.4891815185546875, 4], [2430, 2435, 0.4902191162109375, 6], [2436, 2441, 0.4911346435546875, 6], [2442, 2445, 0.4921112060546875, 4], [2446, 2450, 0.4931793212890625, 5], [2451, 2455, 0.4942626953125, 5], [2456, 2460, 0.4951019287109375, 5], [2461, 2465, 0.49609375, 5], [2466, 2470, 0.497161865234375, 5], [2471, 2474, 0.497955322265625, 4], [2475, 2479, 0.4990997314453125, 5], [2480, 2484, 0.49993896484375, 5], [2485, 2489, 0.5009613037109375, 5], [2490, 2494, 0.50201416015625, 5], [2495, 2498, 0.5029296875, 4], [2499, 2504, 0.5038909912109375, 6], [2505, 2510, 0.5048370361328125, 6], [2511, 2516, 0.5058746337890625, 6], [2517, 2521, 0.5068359375, 5], [2522, 2525, 0.5077972412109375, 4], [2526, 2530, 0.5088043212890625, 5], [2531, 2535, 0.5098419189453125, 5], [2536, 2540, 0.5107574462890625, 5], [2541, 2545, 0.5117645263671875, 5], [2546, 2551, 0.5127105712890625, 6], [2552, 2557, 0.513702392578125, 6], [2558, 2562, 0.514617919921875, 5], [2563, 2567, 0.5156402587890625, 5], [2568, 2573, 0.5167236328125, 6], [2574, 2577, 0.517578125, 4], [2578, 2581, 0.5185089111328125, 4], [2582, 2586, 0.519561767578125, 5], [2587, 2591, 0.5205078125, 5], [2592, 2596, 0.5214996337890625, 5], [2597, 2600, 0.5223541259765625, 4], [2601, 2606, 0.5235748291015625, 6], [2607, 2611, 0.5244293212890625, 5], [2612, 2615, 0.5252685546875, 4], [2616, 2619, 0.5262603759765625, 4], [2620, 2624, 0.5274658203125, 5], [2625, 2629, 0.5283050537109375, 5], [2630, 2633, 0.52935791015625, 4], [2634, 2638, 0.530364990234375, 5], [2639, 2642, 0.5311737060546875, 4], [2643, 2648, 0.5323333740234375, 6], [2649, 2653, 0.533233642578125, 5], [2654, 2658, 0.5342864990234375, 5], [2659, 2662, 0.535125732421875, 4], [2663, 2668, 0.5361328125, 6], [2669, 2672, 0.5371551513671875, 4], [2673, 2677, 0.538116455078125, 5], [2678, 2683, 0.539031982421875, 6], [2684, 2689, 0.5401611328125, 6], [2690, 2694, 0.541046142578125, 5], [2695, 2698, 0.54193115234375, 4], [2699, 2704, 0.5430145263671875, 6], [2705, 2709, 0.5438690185546875, 5], [2710, 2714, 0.54486083984375, 5], [2715, 2721, 0.5458984375, 7], [2722, 2726, 0.546844482421875, 5], [2727, 2731, 0.547821044921875, 5], [2732, 2735, 0.54888916015625, 4], [2736, 2740, 0.5498809814453125, 5], [2741, 2744, 0.5507049560546875, 4], [2745, 2749, 0.5517730712890625, 5], [2750, 2754, 0.552703857421875, 5], [2755, 2758, 0.5536346435546875, 4], [2759, 2762, 0.554656982421875, 4], [2763, 2768, 0.5557403564453125, 6], [2769, 2773, 0.55670166015625, 5], [2774, 2778, 0.5577239990234375, 5], [2779, 2783, 0.5586090087890625, 5], [2784, 2787, 0.5594635009765625, 4], [2788, 2793, 0.560638427734375, 6], [2794, 2798, 0.56158447265625, 5], [2799, 2802, 0.562530517578125, 4], [2803, 2806, 0.56341552734375, 4], [2807, 2812, 0.5644989013671875, 6], [2813, 2817, 0.565582275390625, 5], [2818, 2822, 0.5664215087890625, 5], [2823, 2827, 0.5674591064453125, 5], [2828, 2832, 0.56842041015625, 5], [2833, 2836, 0.5692291259765625, 4], [2837, 2841, 0.5703125, 5], [2842, 2847, 0.571319580078125, 6], [2848, 2852, 0.572296142578125, 5], [2853, 2856, 0.573211669921875, 4], [2857, 2860, 0.5741729736328125, 4], [2861, 2865, 0.575103759765625, 5], [2866, 2869, 0.5760650634765625, 4], [2870, 2874, 0.5771942138671875, 5], [2875, 2878, 0.5780181884765625, 4], [2879, 2883, 0.579132080078125, 5], [2884, 2889, 0.5800933837890625, 6], [2890, 2894, 0.581146240234375, 5], [2895, 2898, 0.5821533203125, 4], [2899, 2903, 0.5829925537109375, 5], [2904, 2909, 0.584014892578125, 6], [2910, 2914, 0.584930419921875, 5], [2915, 2919, 0.5859222412109375, 5], [2920, 2925, 0.5869140625, 6], [2926, 2929, 0.5877685546875, 4], [2930, 2934, 0.5888519287109375, 5], [2935, 2939, 0.58984375, 5], [2940, 2944, 0.590789794921875, 5], [2945, 2949, 0.591705322265625, 5], [2950, 2954, 0.5927581787109375, 5], [2955, 2959, 0.593841552734375, 5], [2960, 2963, 0.594757080078125, 4], [2964, 2967, 0.5955657958984375, 4], [2968, 2972, 0.5967254638671875, 5], [2973, 2976, 0.5975799560546875, 4], [2977, 2981, 0.598541259765625, 5], [2982, 2986, 0.5995941162109375, 5], [2987, 2990, 0.6005401611328125, 4], [2991, 2995, 0.60150146484375, 5], [2996, 3000, 0.602508544921875, 5], [3001, 3005, 0.603515625, 5], [3006, 3010, 0.6044921875, 5], [3011, 3015, 0.605560302734375, 5], [3016, 3020, 0.60638427734375, 5], [3021, 3025, 0.607574462890625, 5], [3026, 3028, 0.608306884765625, 3], [3029, 3034, 0.609375, 6], [3035, 3038, 0.610260009765625, 4], [3039, 3043, 0.611358642578125, 5], [3044, 3047, 0.612274169921875, 4], [3048, 3053, 0.61328125, 6], [3054, 3058, 0.6141815185546875, 5], [3059, 3063, 0.61517333984375, 5], [3064, 3069, 0.616302490234375, 6], [3070, 3073, 0.6172332763671875, 4], [3074, 3077, 0.618072509765625, 4], [3078, 3082, 0.6190338134765625, 5], [3083, 3088, 0.6201324462890625, 6], [3089, 3092, 0.6209716796875, 4], [3093, 3097, 0.62200927734375, 5], [3098, 3102, 0.62298583984375, 5], [3103, 3107, 0.623992919921875, 5], [3108, 3113, 0.625030517578125, 6], [3114, 3118, 0.6259918212890625, 5], [3119, 3123, 0.626983642578125, 5], [3124, 3128, 0.6279449462890625, 5], [3129, 3132, 0.62884521484375, 4], [3133, 3138, 0.6299285888671875, 6], [3139, 3142, 0.63079833984375, 4], [3143, 3148, 0.6318817138671875, 6], [3149, 3153, 0.632904052734375, 5], [3154, 3159, 0.63385009765625, 6], [3160, 3165, 0.6348724365234375, 6], [3166, 3170, 0.6356964111328125, 5], [3171, 3175, 0.6367645263671875, 5], [3176, 3181, 0.6377105712890625, 6], [3182, 3184, 0.638580322265625, 3], [3185, 3190, 0.6395721435546875, 6], [3191, 3195, 0.6405792236328125, 5], [3196, 3200, 0.641571044921875, 5], [3201, 3205, 0.6427154541015625, 5], [3206, 3211, 0.643646240234375, 6], [3212, 3215, 0.644500732421875, 4], [3216, 3222, 0.64556884765625, 7], [3223, 3226, 0.6464691162109375, 4], [3227, 3230, 0.6474761962890625, 4], [3231, 3234, 0.648406982421875, 4], [3235, 3240, 0.649505615234375, 6], [3241, 3245, 0.650421142578125, 5], [3246, 3250, 0.6513671875, 5], [3251, 3256, 0.6524200439453125, 6], [3257, 3261, 0.6534881591796875, 5], [3262, 3265, 0.654327392578125, 4], [3266, 3270, 0.6552581787109375, 5], [3271, 3275, 0.6562347412109375, 5], [3276, 3280, 0.6572265625, 5], [3281, 3284, 0.65826416015625, 4], [3285, 3288, 0.6590728759765625, 4], [3289, 3294, 0.6601715087890625, 6], [3295, 3299, 0.66119384765625, 5], [3300, 3302, 0.6620635986328125, 3], [3303, 3308, 0.6632080078125, 6], [3309, 3312, 0.6641387939453125, 4], [3313, 3317, 0.6651458740234375, 5], [3318, 3321, 0.666015625, 4], [3322, 3326, 0.6670379638671875, 5], [3327, 3330, 0.66790771484375, 4], [3331, 3336, 0.6689300537109375, 6], [3337, 3340, 0.669921875, 4], [3341, 3344, 0.6708984375, 4], [3345, 3349, 0.6719207763671875, 5], [3350, 3354, 0.6729888916015625, 5], [3355, 3359, 0.67388916015625, 5], [3360, 3364, 0.6748199462890625, 5], [3365, 3370, 0.675872802734375, 6], [3371, 3375, 0.6768341064453125, 5], [3376, 3379, 0.6776580810546875, 4], [3380, 3385, 0.6787872314453125, 6], [3386, 3390, 0.67974853515625, 5], [3391, 3395, 0.6807098388671875, 5], [3396, 3400, 0.6817474365234375, 5], [3401, 3405, 0.68267822265625, 5], [3406, 3409, 0.6834869384765625, 4], [3410, 3415, 0.684539794921875, 6], [3416, 3419, 0.6854705810546875, 4], [3420, 3425, 0.6865692138671875, 6], [3426, 3430, 0.68756103515625, 5], [3431, 3435, 0.6885528564453125, 5], [3436, 3439, 0.68939208984375, 4], [3440, 3444, 0.690399169921875, 5], [3445, 3449, 0.6912689208984375, 5], [3450, 3454, 0.69244384765625, 5], [3455, 3459, 0.6934356689453125, 5], [3460, 3463, 0.6943511962890625, 4], [3464, 3468, 0.6952667236328125, 5], [3469, 3473, 0.696319580078125, 5], [3474, 3477, 0.6972503662109375, 4], [3478, 3482, 0.6983184814453125, 5], [3483, 3487, 0.6992340087890625, 5], [3488, 3493, 0.7001953125, 6], [3494, 3497, 0.7012481689453125, 4], [3498, 3502, 0.7020416259765625, 5], [3503, 3508, 0.7031707763671875, 6], [3509, 3512, 0.7041015625, 4], [3513, 3517, 0.705078125, 5], [3518, 3521, 0.706024169921875, 4], [3522, 3526, 0.7069244384765625, 5], [3527, 3532, 0.7080841064453125, 6], [3533, 3537, 0.70904541015625, 5], [3538, 3541, 0.70989990234375, 4], [3542, 3546, 0.710968017578125, 5], [3547, 3550, 0.7118682861328125, 4], [3551, 3555, 0.7128448486328125, 5], [3556, 3560, 0.7139129638671875, 5], [3561, 3564, 0.71484375, 4], [3565, 3570, 0.715850830078125, 6], [3571, 3575, 0.716766357421875, 5], [3576, 3579, 0.7176361083984375, 4], [3580, 3585, 0.71881103515625, 6], [3586, 3590, 0.7197723388671875, 5], [3591, 3595, 0.7207183837890625, 5], [3596, 3600, 0.721710205078125, 5], [3601, 3605, 0.7225494384765625, 5], [3606, 3610, 0.72369384765625, 5], [3611, 3615, 0.7245941162109375, 5], [3616, 3620, 0.7256622314453125, 5], [3621, 3625, 0.7266082763671875, 5], [3626, 3630, 0.727569580078125, 5], [3631, 3634, 0.72857666015625, 4], [3635, 3638, 0.7294464111328125, 4], [3639, 3643, 0.7304534912109375, 5], [3644, 3647, 0.731353759765625, 4], [3648, 3653, 0.7324981689453125, 6], [3654, 3657, 0.7334442138671875, 4], [3658, 3662, 0.7343597412109375, 5], [3663, 3667, 0.7354583740234375, 5], [3668, 3671, 0.7363433837890625, 4], [3672, 3676, 0.737335205078125, 5], [3677, 3681, 0.7382965087890625, 5], [3682, 3686, 0.7392425537109375, 5], [3687, 3691, 0.7400970458984375, 5], [3692, 3697, 0.7413177490234375, 6], [3698, 3701, 0.74224853515625, 4], [3702, 3706, 0.743255615234375, 5], [3707, 3710, 0.7440948486328125, 4], [3711, 3715, 0.74517822265625, 5], [3716, 3721, 0.7461395263671875, 6], [3722, 3725, 0.7470245361328125, 4], [3726, 3731, 0.7480621337890625, 6], [3732, 3735, 0.7489471435546875, 4], [3736, 3739, 0.749908447265625, 4], [3740, 3745, 0.7509307861328125, 6], [3746, 3750, 0.7518768310546875, 5], [3751, 3755, 0.7529296875, 5], [3756, 3760, 0.75396728515625, 5], [3761, 3765, 0.7549285888671875, 5], [3766, 3770, 0.75592041015625, 5], [3771, 3776, 0.756805419921875, 6], [3777, 3782, 0.7578277587890625, 6], [3783, 3787, 0.7587890625, 5], [3788, 3791, 0.759674072265625, 4], [3792, 3796, 0.760711669921875, 5], [3797, 3801, 0.7617645263671875, 5], [3802, 3806, 0.7628173828125, 5], [3807, 3810, 0.7635650634765625, 4], [3811, 3815, 0.7645111083984375, 5], [3816, 3820, 0.765655517578125, 5], [3821, 3825, 0.76654052734375, 5], [3826, 3830, 0.7677001953125, 5], [3831, 3835, 0.7686614990234375, 5], [3836, 3839, 0.7695159912109375, 4], [3840, 3844, 0.7704620361328125, 5], [3845, 3848, 0.7714691162109375, 4], [3849, 3854, 0.77252197265625, 6], [3855, 3858, 0.773468017578125, 4], [3859, 3862, 0.7743072509765625, 4], [3863, 3866, 0.77532958984375, 4], [3867, 3871, 0.776275634765625, 5], [3872, 3876, 0.7772674560546875, 5], [3877, 3880, 0.77838134765625, 4], [3881, 3884, 0.7794036865234375, 4], [3885, 3889, 0.780242919921875, 5], [3890, 3894, 0.78118896484375, 5], [3895, 3900, 0.7823486328125, 6], [3901, 3904, 0.7832489013671875, 4], [3905, 3909, 0.7841796875, 5], [3910, 3913, 0.785064697265625, 4], [3914, 3919, 0.7861785888671875, 6], [3920, 3923, 0.7869873046875, 4], [3924, 3928, 0.7880096435546875, 5], [3929, 3934, 0.7890167236328125, 6], [3935, 3939, 0.790069580078125, 5], [3940, 3944, 0.7910308837890625, 5], [3945, 3949, 0.7919921875, 5], [3950, 3954, 0.792877197265625, 5], [3955, 3959, 0.79388427734375, 5], [3960, 3964, 0.7949371337890625, 5], [3965, 3969, 0.7960052490234375, 5], [3970, 3973, 0.7968292236328125, 4], [3974, 3980, 0.7978515625, 7], [3981, 3985, 0.7988739013671875, 5], [3986, 3990, 0.7998504638671875, 5], [3991, 3996, 0.800872802734375, 6], [3997, 4001, 0.8017578125, 5], [4002, 4006, 0.8026580810546875, 5], [4007, 4012, 0.803680419921875, 6], [4013, 4017, 0.80462646484375, 5], [4018, 4022, 0.8058013916015625, 5], [4023, 4027, 0.8067169189453125, 5], [4028, 4031, 0.8076324462890625, 4], [4032, 4035, 0.8084869384765625, 4], [4036, 4040, 0.8095703125, 5], [4041, 4045, 0.810638427734375, 5], [4046, 4049, 0.81146240234375, 4], [4050, 4053, 0.812408447265625, 4], [4054, 4058, 0.8133392333984375, 5], [4059, 4063, 0.81451416015625, 5], [4064, 4068, 0.81549072265625, 5], [4069, 4073, 0.8163604736328125, 5], [4074, 4078, 0.8173675537109375, 5], [4079, 4083, 0.8183746337890625, 5], [4084, 4088, 0.8193359375, 5], [4089, 4093, 0.820281982421875, 5], [4094, 4098, 0.821258544921875, 5], [4099, 4104, 0.8223114013671875, 6], [4105, 4109, 0.8233184814453125, 5], [4110, 4114, 0.824249267578125, 5], [4115, 4118, 0.8252105712890625, 4], [4119, 4124, 0.826263427734375, 6], [4125, 4128, 0.8271026611328125, 4], [4129, 4133, 0.8281402587890625, 5], [4134, 4137, 0.8291015625, 4], [4138, 4142, 0.8301239013671875, 5], [4143, 4147, 0.8310546875, 5], [4148, 4152, 0.8320159912109375, 5], [4153, 4158, 0.833099365234375, 6], [4159, 4162, 0.833984375, 4], [4163, 4167, 0.8349609375, 5], [4168, 4172, 0.836029052734375, 5], [4173, 4177, 0.8368988037109375, 5], [4178, 4182, 0.837890625, 5], [4183, 4186, 0.838836669921875, 4], [4187, 4191, 0.83978271484375, 5], [4192, 4196, 0.8408966064453125, 5], [4197, 4201, 0.8419036865234375, 5], [4202, 4205, 0.8427886962890625, 4], [4206, 4211, 0.8438568115234375, 6], [4212, 4216, 0.844757080078125, 5], [4217, 4221, 0.8458404541015625, 5], [4222, 4225, 0.8465576171875, 4], [4226, 4230, 0.847625732421875, 5], [4231, 4235, 0.8486175537109375, 5], [4236, 4240, 0.849609375, 5], [4241, 4245, 0.85052490234375, 5], [4246, 4250, 0.8516693115234375, 5], [4251, 4254, 0.8525390625, 4], [4255, 4258, 0.8535003662109375, 4], [4259, 4263, 0.8543701171875, 5], [4264, 4268, 0.855499267578125, 5], [4269, 4273, 0.8564300537109375, 5], [4274, 4278, 0.8574676513671875, 5], [4279, 4284, 0.858489990234375, 6], [4285, 4288, 0.8594970703125, 4], [4289, 4293, 0.860382080078125, 5], [4294, 4299, 0.8614501953125, 6], [4300, 4303, 0.862335205078125, 4], [4304, 4308, 0.863311767578125, 5], [4309, 4313, 0.864288330078125, 5], [4314, 4318, 0.8652191162109375, 5], [4319, 4323, 0.866302490234375, 5], [4324, 4328, 0.8672027587890625, 5], [4329, 4333, 0.8681640625, 5], [4334, 4339, 0.86920166015625, 6], [4340, 4344, 0.8701019287109375, 5], [4345, 4349, 0.871063232421875, 5], [4350, 4355, 0.872039794921875, 6], [4356, 4360, 0.8730926513671875, 5], [4361, 4364, 0.87396240234375, 4], [4365, 4368, 0.8749237060546875, 4], [4369, 4373, 0.8759613037109375, 5], [4374, 4377, 0.87689208984375, 4], [4378, 4382, 0.8779754638671875, 5], [4383, 4387, 0.8789520263671875, 5], [4388, 4392, 0.87982177734375, 5], [4393, 4398, 0.880828857421875, 6], [4399, 4402, 0.8817596435546875, 4], [4403, 4408, 0.8829193115234375, 6], [4409, 4413, 0.883880615234375, 5], [4414, 4417, 0.884735107421875, 4], [4418, 4421, 0.8856964111328125, 4], [4422, 4426, 0.886810302734375, 5], [4427, 4431, 0.8876953125, 5], [4432, 4436, 0.8886871337890625, 5], [4437, 4441, 0.8896636962890625, 5], [4442, 4447, 0.8907318115234375, 6], [4448, 4451, 0.8916015625, 4], [4452, 4456, 0.892578125, 5], [4457, 4462, 0.89361572265625, 6], [4463, 4466, 0.8946380615234375, 4], [4467, 4471, 0.895477294921875, 5], [4472, 4476, 0.8966064453125, 5], [4477, 4480, 0.8974761962890625, 4], [4481, 4485, 0.8984832763671875, 5], [4486, 4490, 0.899444580078125, 5], [4491, 4495, 0.9004974365234375, 5], [4496, 4499, 0.9013824462890625, 4], [4500, 4504, 0.9024200439453125, 5], [4505, 4507, 0.903167724609375, 3], [4508, 4512, 0.9043121337890625, 5], [4513, 4518, 0.9053192138671875, 6], [4519, 4523, 0.9062347412109375, 5], [4524, 4528, 0.9072113037109375, 5], [4529, 4533, 0.908233642578125, 5], [4534, 4538, 0.909271240234375, 5], [4539, 4542, 0.910247802734375, 4], [4543, 4547, 0.911224365234375, 5], [4548, 4551, 0.912109375, 4], [4552, 4556, 0.91302490234375, 5], [4557, 4561, 0.9140625, 5], [4562, 4567, 0.9150848388671875, 6], [4568, 4571, 0.9159393310546875, 4], [4572, 4577, 0.916961669921875, 6], [4578, 4582, 0.91790771484375, 5], [4583, 4587, 0.9190521240234375, 5], [4588, 4592, 0.919921875, 5], [4593, 4597, 0.9209136962890625, 5], [4598, 4602, 0.9218597412109375, 5], [4603, 4607, 0.922821044921875, 5], [4608, 4613, 0.9239349365234375, 6], [4614, 4617, 0.9247589111328125, 4], [4618, 4622, 0.92578125, 5], [4623, 4627, 0.92669677734375, 5], [4628, 4632, 0.927764892578125, 5], [4633, 4637, 0.9287109375, 5], [4638, 4642, 0.9296417236328125, 5], [4643, 4647, 0.9305877685546875, 5], [4648, 4652, 0.9315643310546875, 5], [4653, 4657, 0.932586669921875, 5], [4658, 4661, 0.933563232421875, 4], [4662, 4665, 0.9345245361328125, 4], [4666, 4669, 0.9354248046875, 4], [4670, 4674, 0.9364471435546875, 5], [4675, 4679, 0.9374542236328125, 5], [4680, 4684, 0.938568115234375, 5], [4685, 4689, 0.939361572265625, 5], [4690, 4693, 0.94049072265625, 4], [4694, 4698, 0.941436767578125, 5], [4699, 4703, 0.94244384765625, 5], [4704, 4708, 0.9434967041015625, 5], [4709, 4712, 0.944305419921875, 4], [4713, 4717, 0.9453582763671875, 5], [4718, 4722, 0.94622802734375, 5], [4723, 4729, 0.947265625, 7], [4730, 4734, 0.9481964111328125, 5], [4735, 4739, 0.94921875, 5], [4740, 4745, 0.9502410888671875, 6], [4746, 4749, 0.951171875, 4], [4750, 4755, 0.952239990234375, 6], [4756, 4760, 0.953094482421875, 5], [4761, 4766, 0.954193115234375, 6], [4767, 4772, 0.9551544189453125, 6], [4773, 4776, 0.9559326171875, 4], [4777, 4781, 0.9570159912109375, 5], [4782, 4786, 0.9580078125, 5], [4787, 4791, 0.95892333984375, 5], [4792, 4796, 0.9598846435546875, 5], [4797, 4801, 0.960968017578125, 5], [4802, 4805, 0.9618682861328125, 4], [4806, 4810, 0.962860107421875, 5], [4811, 4816, 0.963958740234375, 6], [4817, 4821, 0.9647674560546875, 5], [4822, 4826, 0.96588134765625, 5], [4827, 4830, 0.9668121337890625, 4], [4831, 4835, 0.9676666259765625, 5], [4836, 4841, 0.96881103515625, 6], [4842, 4847, 0.9698028564453125, 6], [4848, 4852, 0.9707489013671875, 5], [4853, 4857, 0.971649169921875, 5], [4858, 4863, 0.9726715087890625, 6], [4864, 4868, 0.9736328125, 5], [4869, 4872, 0.9744873046875, 4], [4873, 4877, 0.975677490234375, 5], [4878, 4882, 0.9765777587890625, 5], [4883, 4887, 0.97760009765625, 5], [4888, 4891, 0.9786224365234375, 4], [4892, 4896, 0.9795684814453125, 5], [4897, 4901, 0.98052978515625, 5], [4902, 4906, 0.98138427734375, 5], [4907, 4911, 0.982452392578125, 5], [4912, 4915, 0.9835662841796875, 4], [4916, 4919, 0.9843597412109375, 4], [4920, 4924, 0.985382080078125, 5], [4925, 4929, 0.98626708984375, 5], [4930, 4934, 0.9872589111328125, 5], [4935, 4940, 0.988189697265625, 6], [4941, 4944, 0.9892120361328125, 4], [4945, 4949, 0.99029541015625, 5], [4950, 4954, 0.991302490234375, 5], [4955, 4958, 0.9920806884765625, 4], [4959, 4963, 0.993072509765625, 5], [4964, 4968, 0.9940948486328125, 5], [4969, 4972, 0.9950103759765625, 4], [4973, 4977, 0.9961700439453125, 5], [4978, 4983, 0.9971466064453125, 6], [4984, 4987, 0.9979705810546875, 4], [4988, 4993, 0.99896240234375, 6], [4994, 4999, 1.0, 6]], "data-type": "int", "null-values": 0.0, "collation-id": 8, "last-updated": "2019-06-19 15:42:56.868641", "sampling-rate": 1.0, "histogram-type": "equi-height", "number-of-buckets-specified": 1024}
1 row in set (0.01 sec)

How mysqldump uses information_schema.column_statistics

mysqldump queries for the presence of histograms on the schema+table. It only needs to know the column the histogram is on and the number of buckets:

SELECT COLUMN_NAME, JSON_EXTRACT(HISTOGRAM, '$."number-of-buckets-specified"')                FROM information_schema.COLUMN_STATISTICS WHERE SCHEMA_NAME = 'test' AND TABLE_NAME = 't1';

It uses this information to write the following to the dump file:

/*!80002 ANALYZE TABLE `t1` UPDATE HISTOGRAM ON `b` WITH 1024 BUCKETS */;

This statement is a parse error in TiDB, so if the information_schema table was made accurate, there would be a problem restoring dump files because the version specific hint is ignored by TiDB:

tidb> /*!80002 ANALYZE TABLE `t1` UPDATE HISTOGRAM ON `b` WITH 1024 BUCKETS */;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 72 near "UPDATE HISTOGRAM ON `b` WITH 1024 BUCKETS */" 

My recommendation

  • We keep the results of information_schema.column_statistics as empty for now.
  • We add ANALYZE TABLE .. UPDATE HISTOGRAM as valid syntax (it would prevent a mysqldump import in the case someone uses MySQL 8.0 + histograms).
  • We can then decide if we then update information_schema.column_statistics to match MySQL. Since TiDB has a histogram for each column already (and mysql has to explicitly be told to add one) it will slow down mysqldump restore times, since each histogram will be individually updated after restoring a table.

@morgo
Copy link
Contributor Author

morgo commented Jun 20, 2019

@zz-jason @lamxTyler @SunRunAway PTAL again

Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zz-jason zz-jason added the status/LGT1 Indicates that a PR has LGTM 1. label Jun 26, 2019
@zz-jason
Copy link
Member

/run-all-tests

Copy link
Contributor

@alivxxx alivxxx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alivxxx
Copy link
Contributor

alivxxx commented Jun 26, 2019

/run-unit-test

@alivxxx alivxxx added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jun 26, 2019
Copy link
Contributor

@SunRunAway SunRunAway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@SunRunAway
Copy link
Contributor

/run-all-tests

@SunRunAway
Copy link
Contributor

/run-all-tests

@SunRunAway SunRunAway added the status/LGT3 The PR has already had 3 LGTM. label Jun 26, 2019
@SunRunAway
Copy link
Contributor

/run-all-tests

@SunRunAway SunRunAway merged commit cf5f42b into pingcap:master Jun 26, 2019
@morgo morgo deleted the stats-expiry branch July 23, 2019 04:05
@sre-bot sre-bot added the contribution This PR is from a community contributor. label Dec 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution This PR is from a community contributor. status/LGT2 Indicates that a PR has LGTM 2. status/LGT3 The PR has already had 3 LGTM. type/compatibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mysqldump 8.0 does not work
5 participants