Skip to content

Commit 6cfcdd3

Browse files
author
James Cor
committed
fix more tests
1 parent cc3e577 commit 6cfcdd3

File tree

2 files changed

+28
-20
lines changed

2 files changed

+28
-20
lines changed

enginetest/queries/queries.go

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10218,26 +10218,6 @@ from typestable`,
1021810218
{" └─ name: "},
1021910219
},
1022010220
},
10221-
10222-
// check that string timestamps preserve trailing 0s
10223-
{
10224-
Query: "select unix_timestamp('2001-02-03 12:34:56.10');",
10225-
Expected: []sql.Row{
10226-
{"981228896.10"},
10227-
},
10228-
},
10229-
{
10230-
Query: "select unix_timestamp('2001-02-03 12:34:56.000000');",
10231-
Expected: []sql.Row{
10232-
{"981228896.000000"},
10233-
},
10234-
},
10235-
{
10236-
Query: "select unix_timestamp('2001-02-03 12:34:56.1234567');",
10237-
Expected: []sql.Row{
10238-
{"981228896.123457"},
10239-
},
10240-
},
1024110221
}
1024210222

1024310223
var KeylessQueries = []QueryTest{

enginetest/queries/script_queries.go

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5128,6 +5128,34 @@ CREATE TABLE tab3 (
51285128
},
51295129
},
51305130
},
5131+
{
5132+
Dialect: "mysql",
5133+
Name: "UNIX_TIMESTAMP function preserves trailing 0s",
5134+
SetUpScript: []string{
5135+
"SET time_zone = '+07:00';",
5136+
},
5137+
Assertions: []ScriptTestAssertion{
5138+
{
5139+
Query: "select unix_timestamp('2001-02-03 12:34:56.10');",
5140+
Expected: []sql.Row{
5141+
{"981178496.10"},
5142+
},
5143+
},
5144+
{
5145+
Query: "select unix_timestamp('2001-02-03 12:34:56.000000');",
5146+
Expected: []sql.Row{
5147+
{"981178496.000000"},
5148+
},
5149+
},
5150+
{
5151+
Query: "select unix_timestamp('2001-02-03 12:34:56.1234567');",
5152+
Expected: []sql.Row{
5153+
{"981178496.123457"},
5154+
},
5155+
},
5156+
},
5157+
},
5158+
51315159
{
51325160
Name: "Querying existing view that references non-existing table",
51335161
SetUpScript: []string{

0 commit comments

Comments
 (0)