Adding an enginetest to prevent regression

This commit is contained in:
Jason Fulghum
2022-08-26 14:05:26 -07:00
parent ed71542d22
commit 06af2191d3

View File

@@ -328,6 +328,24 @@ var DoltRevisionDbScripts = []queries.ScriptTest{
// DoltScripts are script tests specific to Dolt (not the engine in general), e.g. by involving Dolt functions. Break
// this slice into others with good names as it grows.
var DoltScripts = []queries.ScriptTest{
{
Name: "test null filtering in secondary indexes (https://github.com/dolthub/dolt/issues/4199)",
SetUpScript: []string{
"create table t (a int primary key auto_increment, d datetime, index index1 (d));",
"insert into t (d) values (NOW()), (NOW());",
"insert into t (d) values (NULL), (NULL);",
},
Assertions: []queries.ScriptTestAssertion{
{
Query: "select count(*) from t where d is not null",
Expected: []sql.Row{{2}},
},
{
Query: "select count(*) from t where d is null",
Expected: []sql.Row{{2}},
},
},
},
{
Name: "test backticks in index name (https://github.com/dolthub/dolt/issues/3776)",
SetUpScript: []string{