11parallel : true
22tests :
3- - name : persist global variable before server startup
4- skip : " MySQL-specific behavior not applicable to Doltgres (sqlserver.global persisted config / max_connections)"
5- repos :
6- - name : repo1
7- with_files :
8- - name : " repo1/.dolt/config.json"
9- contents : |
10- {"sqlserver.global.max_connections":"1000"}
11- server :
12- args : []
13- dynamic_port : repo1
14- connections :
15- - on : repo1
16- queries :
17- - query : " select current_setting('max_connections') as max_connections"
18- result :
19- columns : ["max_connections"]
20- rows : [["1000"]]
21- - name : invalid persisted global variable name throws warning on server startup, but does not crash
22- skip : " MySQL-specific behavior not applicable to Doltgres (sqlserver.global persisted config)"
23- repos :
24- - name : repo1
25- with_files :
26- - name : " repo1/.dolt/config.json"
27- contents : |
28- {"sqlserver.global.unknown":"1000"}
29- server :
30- args : []
31- dynamic_port : repo1
32- log_matches :
33- - " persisted system variable unknown was not loaded since its definition does not exist."
34- connections :
35- - on : repo1
36- - name : invalid persisted global variable value throws warning on server startup, but does not crash
37- skip : " MySQL-specific behavior not applicable to Doltgres (sqlserver.global persisted config / max_connections)"
38- repos :
39- - name : repo1
40- with_files :
41- - name : " repo1/.dolt/config.json"
42- contents : |
43- {"sqlserver.global.max_connections":"string"}
44- server :
45- args : []
46- dynamic_port : repo1
47- log_matches :
48- - " error: failed to load persisted global variables: key: 'max_connections'; strconv.ParseInt: parsing \" string\" : invalid syntax"
49- connections :
50- - on : repo1
51- - name : persisted global variable in server
52- skip : " MySQL-specific behavior not applicable to Doltgres (SET PERSIST / max_connections)"
53- repos :
54- - name : repo1
55- server :
56- args : []
57- dynamic_port : repo1
58- connections :
59- - on : repo1
60- queries :
61- - exec : " SET PERSIST max_connections = 1000"
62- - query : " select current_setting('max_connections') as max_connections"
63- result :
64- columns : ["max_connections"]
65- rows : [["1000"]]
66- restart_server : {}
67- - on : repo1
68- queries :
69- - query : " select current_setting('max_connections') as max_connections"
70- result :
71- columns : ["max_connections"]
72- rows : [["1000"]]
73- - name : dolt_replicate_heads is global variable
74- skip : " MySQL-specific @@GLOBAL/@@SESSION system-variable semantics not applicable to Doltgres"
75- repos :
76- - name : repo1
77- server :
78- args : []
79- dynamic_port : repo1
80- connections :
81- - on : repo1
82- queries :
83- - exec : " SET dolt_replicate_heads = 'main'"
84- - query : " select current_setting('dolt_replicate_heads') as dolt_replicate_heads"
85- result :
86- columns : ["dolt_replicate_heads"]
87- rows : [["main"]]
88- - on : repo1
89- queries :
90- - query : " select current_setting('dolt_replicate_heads') as dolt_replicate_heads"
91- result :
92- columns : ["dolt_replicate_heads"]
93- rows : [["main"]]
94- - name : dolt_replicate_all_heads is global variable
95- skip : " MySQL-specific @@GLOBAL/@@SESSION system-variable semantics not applicable to Doltgres"
96- repos :
97- - name : repo1
98- server :
99- args : []
100- dynamic_port : repo1
101- connections :
102- - on : repo1
103- queries :
104- - exec : " SET dolt_replicate_all_heads = 1"
105- - query : " select current_setting('dolt_replicate_all_heads') as dolt_replicate_all_heads"
106- result :
107- columns : ["dolt_replicate_all_heads"]
108- rows : [["1"]]
109- - on : repo1
110- queries :
111- - query : " select current_setting('dolt_replicate_all_heads') as dolt_replicate_all_heads"
112- result :
113- columns : ["dolt_replicate_all_heads"]
114- rows : [["1"]]
1153- name : dolt_transaction_commit is global variable
116- skip : " MySQL-specific @@GLOBAL/@@SESSION system-variable semantics not applicable to Doltgres "
4+ skip : " dolt_transaction_commit not being respected after being set "
1175 repos :
1186 - name : repo1
1197 server :
@@ -132,61 +20,14 @@ tests:
13220 - query : " select count(*) from dolt_log"
13321 result :
13422 columns : ["count"]
135- rows : [["1 "]]
23+ rows : [["2 "]]
13624 - exec : " create table tmp (i int)"
13725 - query : " select count(*) from dolt_log"
13826 result :
13927 columns : ["count"]
140- rows : [["2"]]
141- - name : persist only global variable during server session
142- skip : " MySQL-specific behavior not applicable to Doltgres (SET PERSIST / SET PERSIST_ONLY / max_connections)"
143- repos :
144- - name : repo1
145- server :
146- args : []
147- dynamic_port : repo1
148- connections :
149- - on : repo1
150- queries :
151- - exec : " SET PERSIST max_connections = 1000"
152- - exec : " SET PERSIST_ONLY max_connections = 7777"
153- - query : " select current_setting('max_connections') as max_connections"
154- result :
155- columns : ["max_connections"]
156- rows : [["1000"]]
157- restart_server : {}
158- - on : repo1
159- queries :
160- - query : " select current_setting('max_connections') as max_connections"
161- result :
162- columns : ["max_connections"]
163- rows : [["7777"]]
164- - name : persist invalid global variable name during server session
165- skip : " MySQL-specific behavior not applicable to Doltgres (SET PERSIST)"
166- repos :
167- - name : repo1
168- server :
169- args : []
170- dynamic_port : repo1
171- connections :
172- - on : repo1
173- queries :
174- - exec : " SET PERSIST unknown = 1000"
175- error_match : " Unknown system variable"
176- - name : persist invalid global variable value during server session
177- skip : " MySQL-specific behavior not applicable to Doltgres (SET PERSIST / max_connections)"
178- repos :
179- - name : repo1
180- server :
181- args : []
182- dynamic_port : repo1
183- connections :
184- - on : repo1
185- queries :
186- - exec : " SET PERSIST max_connections = 'string'"
187- error_match : " Variable 'max_connections' can't be set to the value of 'string'"
28+ rows : [["3"]]
18829- name : set max_connections with yaml config
189- skip : " MySQL-specific behavior not applicable to Doltgres (max_connections listener config) "
30+ skip : " need to adapt to doltgres listener"
19031 repos :
19132 - name : repo1
19233 with_files :
@@ -205,76 +46,8 @@ tests:
20546 result :
20647 columns : ["max_connections"]
20748 rows : [["999"]]
208- - name : persistence behavior
209- skip : " MySQL-specific behavior not applicable to Doltgres (max_connections default)"
210- repos :
211- - name : repo1
212- server :
213- args : []
214- dynamic_port : repo1
215- connections :
216- - on : repo1
217- queries :
218- - query : " select current_setting('max_connections') as max_connections"
219- result :
220- columns : ["max_connections"]
221- rows : [["151"]]
222- - name : persisted global variable defined on the command line
223- skip : " MySQL-specific behavior not applicable to Doltgres (no --max-connections CLI flag)"
224- repos :
225- - name : repo1
226- server :
227- args : []
228- dynamic_port : repo1
229- connections :
230- - on : repo1
231- queries :
232- - query : " select current_setting('max_connections') as max_connections"
233- result :
234- columns : ["max_connections"]
235- rows : [["555"]]
236- - name : " @@global.dolt_log_level behavior"
237- skip : " MySQL-specific @@GLOBAL system-variable / log-level semantics not applicable to Doltgres"
238- repos :
239- - name : repo1
240- with_files :
241- - name : " server.yaml"
242- contents : |
243- log_level: warning
244- - name : " server-info.yaml"
245- contents : |
246- log_level: info
247- server :
248- args : ["--config", "server.yaml"]
249- dynamic_port : repo1
250- log_matches :
251- - " Starting query"
252- connections :
253- - on : repo1
254- queries :
255- - query : " select current_setting('dolt_log_level') as dolt_log_level"
256- result :
257- columns : ["dolt_log_level"]
258- rows : [["warning"]]
259- - exec : " set dolt_log_level = 'trace'"
260- - query : " select 2+2 as sum"
261- result :
262- columns : ["sum"]
263- rows : [["4"]]
264- - query : " select current_setting('dolt_log_level') as dolt_log_level"
265- result :
266- columns : ["dolt_log_level"]
267- rows : [["trace"]]
268- restart_server :
269- args : ["--config", "server-info.yaml"]
270- - on : repo1
271- queries :
272- - query : " select current_setting('dolt_log_level') as dolt_log_level"
273- result :
274- columns : ["dolt_log_level"]
275- rows : [["info"]]
276- - name : " @@global.dolt_auto_gc_enabled default"
277- skip : " MySQL-specific @@GLOBAL system-variable semantics not applicable to Doltgres"
49+ - name : " dolt_auto_gc_enabled default"
50+ skip : " default not set yet"
27851 repos :
27952 - name : repo1
28053 server :
@@ -290,7 +63,7 @@ tests:
29063 - exec : " SET dolt_auto_gc_enabled = 0"
29164 error_match : " Variable 'dolt_auto_gc_enabled' is a read only variable"
29265- name : " @@global.dolt_auto_gc_enabled true"
293- skip : " MySQL-specific @@GLOBAL system-variable semantics not applicable to Doltgres "
66+ skip : " config field not supported yet "
29467 repos :
29568 - name : repo1
29669 with_files :
@@ -310,7 +83,7 @@ tests:
31083 columns : ["dolt_auto_gc_enabled"]
31184 rows : [["1"]]
31285- name : " @@global.dolt_auto_gc_enabled false"
313- skip : " MySQL-specific @@GLOBAL system-variable semantics not applicable to Doltgres "
86+ skip : " config field not supported yet "
31487 repos :
31588 - name : repo1
31689 with_files :
@@ -329,28 +102,8 @@ tests:
329102 result :
330103 columns : ["dolt_auto_gc_enabled"]
331104 rows : [["0"]]
332- - name : system variables in config.yaml can be read in show variables
333- skip : " MySQL-specific system-variable / secure_file_priv / max_connections semantics not applicable to Doltgres"
334- repos :
335- - name : repo1
336- with_files :
337- - name : " config.yaml"
338- contents : |
339- system_variables:
340- secure_file_priv: "/dev/null"
341- max_connections: 1000
342- server :
343- args : ["--config", "config.yaml"]
344- dynamic_port : repo1
345- connections :
346- - on : repo1
347- queries :
348- - query : " select current_setting('secure_file_priv') as secure_file_priv, current_setting('max_connections') as max_connections"
349- result :
350- columns : ["secure_file_priv", "max_connections"]
351- rows : [["/dev/null", "1000"]]
352105- name : secure_file_priv set to /dev/null prevents loading files
353- skip : " MySQL-specific LOAD_FILE / LOAD DATA / secure_file_priv behavior has no Postgres equivalent "
106+ skip : " field / feature needs to be supported "
354107 repos :
355108 - name : repo1
356109 with_files :
@@ -377,36 +130,3 @@ tests:
377130 error_match : " LOAD DATA is unable to open file: The MySQL server is running with the --secure-file-priv option so it cannot execute this statement"
378131 - exec : " load data infile \" /config.yaml\" into table loaded"
379132 error_match : " LOAD DATA is unable to open file: The MySQL server is running with the --secure-file-priv option so it cannot execute this statement"
380- - name : secure_file_priv set to empty strings allows loading files
381- skip : " MySQL-specific LOAD_FILE / LOAD DATA / secure_file_priv behavior has no Postgres equivalent"
382- repos :
383- - name : repo1
384- with_files :
385- - name : " config.yaml"
386- contents : |
387- system_variables:
388- secure_file_priv: ""
389- - name : " repo1/known_contents"
390- contents : |
391- system_variables:
392- secure_file_priv: ""
393- server :
394- args : ["--config", "config.yaml"]
395- dynamic_port : repo1
396- connections :
397- - on : repo1
398- queries :
399- - query : " select LOAD_FILE('known_contents') as load_file"
400- result :
401- columns : ["load_file"]
402- rows : [["system_variables:\n secure_file_priv: \"\"\n"]]
403- - query : " select LOAD_FILE('./.dolt/../known_contents') as load_file"
404- result :
405- columns : ["load_file"]
406- rows : [["system_variables:\n secure_file_priv: \"\"\n"]]
407- - exec : " create table loaded (contents text)"
408- - exec : " load data infile \" known_contents\" into table loaded lines terminated by \"\\ 0\" "
409- - query : " select contents from loaded"
410- result :
411- columns : ["contents"]
412- rows : [["system_variables:\n secure_file_priv: \"\"\n"]]
0 commit comments