To measure Dolt's SQL correctness, we test each release of Dolt against a SQL testing suite called sqllogictest. This suite consists of 5.9 million SQL queries and their results, using the results returned by MySQL as a reference. Many of these are randomly generated queries that exercise very complex logic a human would have a hard time reasoning about. They give us greater confidence that the query engine produces correct results for any query, as opposed to just the ones we and our customers have thought to try so far. These tests have exposed many bugs in query execution logic before customers discovered them.
Here's an example of a query run by this test suite:
SELECT pk FROM tab1 WHERE ((((col3 >0AND ((col0 >=7AND col0 <=2)AND (col0 <=4OR col4 <5.82OR col3 >7) AND col0 >=4) AND col0 <0) AND ((col1 >7.76))))) OR ((col1 >7.23OR (col0 <=3) OR (col4 >=2.72OR col1 >=8.63) OR (col3 >=3AND col3 <=4)) AND ((col0 <2ANDcol3 <0AND (col1 <6.30AND col4 >=7.2)) AND (((col3 <5AND col4IN (SELECT col1 FROM tab1 WHERE ((col3 >=7AND col3 <=6) OR col0 <0OR col1 >=0.64OR col3 <=7AND (col3 >=8) AND ((col3 <=6) AND((col0 =1AND col3 ISNULL)) OR col0 >7OR col3 IN (8,1,7,4) OR col3>7AND col3 >=5AND (col3 <0) OR col0 >3AND col4 >1.21AND col0<4OR ((col4 >9.30)) AND ((col3 >=5AND col3 <=7))) AND col0 <=5OR ((col0 >=1AND col4 ISNULLAND col0 >5AND (col0 <3) OR col4 <=8.86AND (col3 >0) AND col3 =8)) OR col3 >=1OR (col3 <4OR (col3=7OR (col1 >=4.84AND col1 <=5.61)) OR col3 >=5AND ((col3 <4)AND ((col3 >9)) OR (col0 <3) AND (((col0 ISNULL))) AND (col0 <4))AND ((col4 IN (0.79)))) OR (col4 =6.26AND col1 >=5.64) OR col1 ISNULLAND col0 <1)))) AND ((((col3 <9) OR ((col0 ISNULL) OR (((col1>=8.40AND col1 <=0.30) AND col3 ISNULLOR (col0 <=7OR ((col3 >4))) AND col0 =6)) OR col3 <6AND (((((((col1 >4.8)) OR col0 <9OR(col3 =1))) AND col4 >=4.12))) OR (((col1 >1.58AND col0 <7))) AND(col1 <8.60) AND ((col0 >1OR col0 >1AND ((col3 >=2AND col3 <=0) AND col0 <=0) OR ((col0 >=8)) AND (((col3 >=8AND col3 <=8) ORcol0 >4OR col3 =8)) AND col1 >5.10) AND ((col0 <7OR (col0 <6OR(col3 <0OR col4 >=9.51AND (col3 ISNULLAND col1 <9.41AND col1 =1.9AND col0 >1AND col3 <9OR (col4 ISNULL) OR col1 =0.5AND(col0 >=3) OR col4 =9.25OR ((col1 >0.26)) AND col4 <8.25AND(col0 >=2) AND col3 ISNULLAND (col1 >3.52) OR (((col4 <7.24)) ANDcol1 ISNULL) OR col0 >3) AND col3 >=4AND col4 >=2.5AND col0 >=0OR (col3 >3AND col3 >=3) AND col0 =1OR col1 <=8.9AND col1 >9.66OR (col3 >9) AND col0 >0AND col3 >=0AND ((col4 >8.39))))AND (col1 ISNULL)))))) AND col1 <=2.0OR col4 <1.8AND (col4 =6.59AND col3 IN (3,9,0))))) OR col4 <=4.25OR ((col3 =5))) OR (((col0 >0)) AND col0 >6AND (col4 >=6.56)))
Here are Dolt's sqllogictest results for version 1.43.13. Tests that did not run could not complete due to a timeout earlier in the run.
Results
Count
ok
5937457
Correctness Percentage
100.0
Function Coverage
We also measure the coverage of the functions in the SQL engine. This is a measure of how many of the supported MySQL functions are also supported by Dolt.
Here are Dolt's function coverage results for version 1.43.6.
Supported
Total
Percent Coverage
316
431
73
Skipped Engine Tests
Here are the total number of tests skipped by the engine for version 1.43.6. These are edge cases that we know are failing for one reason or another, but haven't been able to fix yet.
In general, these tests are more difficult to fix compared to SQLLogicTests. These are tests we discovered during development that emphasize blind spots in SQLLogicTests. Additionally, these tests are unique and do not overlap in coverage (unlike SQLLogicTests).