File tree Expand file tree Collapse file tree 7 files changed +19
-82
lines changed
invalid_group_by_reference/mysql
valid_group_by_reference/mysql Expand file tree Collapse file tree 7 files changed +19
-82
lines changed Original file line number Diff line number Diff line change @@ -10,72 +10,12 @@ services:
10
10
MYSQL_ROOT_PASSWORD : mysecretpassword
11
11
MYSQL_ROOT_HOST : ' %'
12
12
13
- mysql5 :
14
- image : " mysql/mysql-server:5.7"
15
- ports :
16
- - " 3305:3306"
17
- restart : always
18
- environment :
19
- MYSQL_DATABASE : dinotest
20
- MYSQL_ROOT_PASSWORD : mysecretpassword
21
- MYSQL_ROOT_HOST : ' %'
22
- profiles :
23
- - mysql
24
-
25
13
postgresql :
26
- image : " postgres:15 "
14
+ image : " postgres:16 "
27
15
ports :
28
16
- " 5432:5432"
29
17
restart : always
30
18
environment :
31
19
POSTGRES_DB : postgres
32
20
POSTGRES_PASSWORD : mysecretpassword
33
21
POSTGRES_USER : postgres
34
-
35
- postgresql14 :
36
- image : " postgres:14"
37
- ports :
38
- - " 5414:5432"
39
- restart : always
40
- environment :
41
- POSTGRES_DB : postgres
42
- POSTGRES_PASSWORD : mysecretpassword
43
- POSTGRES_USER : postgres
44
- profiles :
45
- - postgres
46
-
47
- postgresql13 :
48
- image : " postgres:13"
49
- ports :
50
- - " 5413:5432"
51
- restart : always
52
- environment :
53
- POSTGRES_DB : postgres
54
- POSTGRES_PASSWORD : mysecretpassword
55
- POSTGRES_USER : postgres
56
- profiles :
57
- - postgres
58
-
59
- postgresql12 :
60
- image : " postgres:12"
61
- ports :
62
- - " 5412:5432"
63
- restart : always
64
- environment :
65
- POSTGRES_DB : postgres
66
- POSTGRES_PASSWORD : mysecretpassword
67
- POSTGRES_USER : postgres
68
- profiles :
69
- - postgres
70
-
71
- postgresql11 :
72
- image : " postgres:11"
73
- ports :
74
- - " 5411:5432"
75
- restart : always
76
- environment :
77
- POSTGRES_DB : postgres
78
- POSTGRES_PASSWORD : mysecretpassword
79
- POSTGRES_USER : postgres
80
- profiles :
81
- - postgres
Original file line number Diff line number Diff line change @@ -131,11 +131,11 @@ func TestReplay(t *testing.T) {
131
131
c .SQL [i ].Database = & config.Database {
132
132
URI : uri ,
133
133
}
134
- // case config.EngineMySQL:
135
- // uri := local.MySQL(t, files)
136
- // c.SQL[i].Database = &config.Database{
137
- // URI: uri,
138
- // }
134
+ case config .EngineMySQL :
135
+ uri := local .MySQL (t , files )
136
+ c .SQL [i ].Database = & config.Database {
137
+ URI : uri ,
138
+ }
139
139
default :
140
140
// pass
141
141
}
@@ -146,9 +146,9 @@ func TestReplay(t *testing.T) {
146
146
if len (os .Getenv ("POSTGRESQL_SERVER_URI" )) == 0 {
147
147
return false
148
148
}
149
- // if len(os.Getenv("MYSQL_SERVER_URI")) == 0 {
150
- // return false
151
- // }
149
+ if len (os .Getenv ("MYSQL_SERVER_URI" )) == 0 {
150
+ return false
151
+ }
152
152
return true
153
153
},
154
154
},
Original file line number Diff line number Diff line change 1
- CREATE TABLE authors (
2
- id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
3
- name text NOT NULL ,
4
- bio text ,
5
- UNIQUE(name)
6
- );
7
-
8
1
-- name: ListAuthors :many
9
2
SELECT *
10
3
FROM authors
Original file line number Diff line number Diff line change
1
+ CREATE TABLE authors (
2
+ id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
3
+ name text NOT NULL ,
4
+ bio text
5
+ );
Original file line number Diff line number Diff line change 5
5
"path" : " go" ,
6
6
"engine" : " mysql" ,
7
7
"name" : " querytest" ,
8
- "schema" : " query .sql" ,
8
+ "schema" : " schema .sql" ,
9
9
"queries" : " query.sql"
10
10
}
11
11
]
Original file line number Diff line number Diff line change 1
1
# package querytest
2
- query.sql:11 :10: column reference "invalid_reference" not found
2
+ query.sql:4 :10: column reference "invalid_reference" not found
Original file line number Diff line number Diff line change 1
1
CREATE TABLE authors (
2
- id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
3
- name VARCHAR (10 ) NOT NULL ,
4
- bio text ,
5
- UNIQUE(name)
2
+ id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
3
+ name VARCHAR (10 ) NOT NULL ,
4
+ bio text
6
5
);
7
6
8
7
CREATE TABLE IF NOT EXISTS weather_metrics
You can’t perform that action at this time.
0 commit comments