Skip to content

Conversation

morrySnow
Copy link
Contributor

multi statement support by PR #3050.
But there is a minor issue in implementation.

as MySQL dev doc say in
https://dev.mysql.com/doc/dev/mysql-server/latest/page_protocol_command_phase_sp.html#sect_protocol_command_phase_sp_multi_statement

server should only process multi statement
when client set CLIENT_MULTI_STATEMENTS.
When client not set CLIENT_MULTI_STATEMENTS, server should treat query as single statement.

but Doris do slightly different with MySQL server. Doris always treat query as multi statement, but only return multi result when client set CLIENT_MULTI_STATEMENTS. When client do not set CLIENT_MULTI_STATEMENTS, Doris will return the last statement result only.

@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@morrySnow
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

TPC-H: Total hot run time: 39743 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 86884f6065bf4322b8fe66bc03a80becb3ed607f, data reload: false

------ Round 1 ----------------------------------
q1	18301	4446	4409	4409
q2	2665	194	203	194
q3	11657	1123	1098	1098
q4	10277	851	750	750
q5	7942	2695	2637	2637
q6	219	134	141	134
q7	950	599	616	599
q8	9224	2079	2037	2037
q9	9007	6533	6460	6460
q10	8800	3738	3709	3709
q11	438	242	237	237
q12	400	235	234	234
q13	17835	2998	2964	2964
q14	261	222	213	213
q15	513	477	477	477
q16	481	373	374	373
q17	936	727	625	625
q18	8013	7512	7416	7416
q19	2850	1411	1434	1411
q20	653	322	339	322
q21	4977	3113	3165	3113
q22	408	343	331	331
Total cold run time: 116807 ms
Total hot run time: 39743 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4368	4238	4222	4222
q2	368	272	262	262
q3	2961	2739	2715	2715
q4	1833	1593	1606	1593
q5	5249	5275	5273	5273
q6	217	128	129	128
q7	2138	1766	1683	1683
q8	3182	3317	3275	3275
q9	8342	8295	8313	8295
q10	3897	3649	3710	3649
q11	557	483	482	482
q12	781	596	620	596
q13	17370	2994	2983	2983
q14	300	265	266	265
q15	520	480	484	480
q16	471	419	415	415
q17	1755	1463	1459	1459
q18	7568	7376	7240	7240
q19	1673	1640	1524	1524
q20	1971	1771	1798	1771
q21	4930	4770	4699	4699
q22	611	545	547	545
Total cold run time: 71062 ms
Total hot run time: 53554 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 173269 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 86884f6065bf4322b8fe66bc03a80becb3ed607f, data reload: false

query1	916	392	383	383
query2	6434	2448	2355	2355
query3	6641	205	204	204
query4	18802	17221	17444	17221
query5	4170	479	493	479
query6	256	169	168	168
query7	4593	301	297	297
query8	311	281	292	281
query9	8574	2478	2443	2443
query10	610	294	269	269
query11	10727	9986	10026	9986
query12	135	82	86	82
query13	1633	395	364	364
query14	10243	7235	7459	7235
query15	257	183	192	183
query16	8060	295	274	274
query17	1866	542	541	541
query18	1827	267	276	267
query19	193	153	156	153
query20	91	83	85	83
query21	210	133	120	120
query22	4360	4036	4044	4036
query23	33704	32979	33011	32979
query24	11473	2834	2829	2829
query25	644	378	355	355
query26	1679	157	160	157
query27	2867	318	325	318
query28	7460	2083	2076	2076
query29	1014	607	607	607
query30	292	152	148	148
query31	958	739	750	739
query32	93	52	53	52
query33	769	287	282	282
query34	995	473	473	473
query35	736	633	593	593
query36	1090	924	954	924
query37	213	76	71	71
query38	2868	2755	2775	2755
query39	854	798	792	792
query40	283	129	123	123
query41	58	51	51	51
query42	121	95	103	95
query43	598	547	538	538
query44	1189	726	732	726
query45	196	160	159	159
query46	1051	723	713	713
query47	1872	1764	1768	1764
query48	367	290	298	290
query49	1228	413	406	406
query50	772	400	394	394
query51	6893	6877	6857	6857
query52	106	92	92	92
query53	354	289	293	289
query54	975	460	443	443
query55	75	73	74	73
query56	283	266	263	263
query57	1148	1019	1050	1019
query58	255	241	247	241
query59	3424	3326	3109	3109
query60	300	265	266	265
query61	90	94	92	92
query62	658	445	448	445
query63	315	284	288	284
query64	9896	2278	1748	1748
query65	3168	3207	3109	3109
query66	1319	335	327	327
query67	15438	14919	14956	14919
query68	4809	550	550	550
query69	469	321	293	293
query70	1136	1126	1124	1124
query71	420	272	266	266
query72	7049	5376	5617	5376
query73	739	332	328	328
query74	6037	5527	5501	5501
query75	3456	2637	2634	2634
query76	2876	896	964	896
query77	430	291	296	291
query78	10391	9926	9824	9824
query79	2508	528	535	528
query80	1994	481	467	467
query81	577	219	226	219
query82	754	157	105	105
query83	313	176	179	176
query84	270	93	90	90
query85	1979	277	271	271
query86	479	302	320	302
query87	3243	3103	3101	3101
query88	4457	2447	2435	2435
query89	471	387	379	379
query90	1794	192	195	192
query91	129	99	103	99
query92	64	52	53	52
query93	2021	519	516	516
query94	1184	193	192	192
query95	411	315	324	315
query96	598	280	269	269
query97	3271	3032	3032	3032
query98	228	199	200	199
query99	1165	842	839	839
Total cold run time: 276772 ms
Total hot run time: 173269 ms

@doris-robot
Copy link

ClickBench: Total hot run time: 30.88 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 86884f6065bf4322b8fe66bc03a80becb3ed607f, data reload: false

query1	0.04	0.04	0.04
query2	0.07	0.05	0.04
query3	0.22	0.05	0.05
query4	1.69	0.08	0.08
query5	0.51	0.49	0.50
query6	1.13	0.73	0.72
query7	0.02	0.01	0.02
query8	0.04	0.03	0.04
query9	0.53	0.48	0.50
query10	0.53	0.54	0.55
query11	0.15	0.12	0.12
query12	0.15	0.12	0.12
query13	0.60	0.58	0.58
query14	0.76	0.78	0.79
query15	0.83	0.82	0.82
query16	0.37	0.37	0.36
query17	1.02	1.01	1.03
query18	0.23	0.25	0.23
query19	1.90	1.77	1.77
query20	0.01	0.01	0.01
query21	15.43	0.67	0.66
query22	3.71	8.28	2.11
query23	18.28	1.40	1.28
query24	2.15	0.22	0.24
query25	0.17	0.08	0.08
query26	0.26	0.17	0.17
query27	0.07	0.07	0.08
query28	13.19	1.01	1.00
query29	12.64	3.31	3.26
query30	0.26	0.06	0.06
query31	2.86	0.40	0.38
query32	3.28	0.46	0.47
query33	2.89	2.88	2.89
query34	16.99	4.50	4.44
query35	4.51	4.50	4.49
query36	0.65	0.46	0.48
query37	0.18	0.15	0.15
query38	0.16	0.15	0.14
query39	0.05	0.04	0.04
query40	0.17	0.13	0.14
query41	0.10	0.04	0.05
query42	0.06	0.04	0.05
query43	0.04	0.04	0.04
Total cold run time: 108.9 s
Total hot run time: 30.88 s

@morrySnow
Copy link
Contributor Author

run p0

… been set

multi statement support by PR apache#3050.
But there is a minor issue in implementation.

as MySQL dev doc say in
https://dev.mysql.com/doc/dev/mysql-server/latest/page_protocol_command_phase_sp.html#sect_protocol_command_phase_sp_multi_statement

server should only process multi statement
when client set CLIENT_MULTI_STATEMENTS.
When client not set CLIENT_MULTI_STATEMENTS, server should treat
query as single statement.

but Doris do slightly different with MySQL server.
Doris always treat query as multi statement, but only return multi
result when client set CLIENT_MULTI_STATEMENTS. When client do not set
CLIENT_MULTI_STATEMENTS, Doris will return the last statement result
only.
@morrySnow
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

TPC-H: Total hot run time: 40466 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit bfc4191d9b054beb950fdbbd407ec3ec02b2e1b9, data reload: false

------ Round 1 ----------------------------------
q1	17599	4995	4305	4305
q2	2013	196	203	196
q3	10447	1128	1110	1110
q4	10184	788	826	788
q5	7509	2692	2607	2607
q6	221	135	135	135
q7	960	609	621	609
q8	9247	2076	2076	2076
q9	9099	6523	6478	6478
q10	9006	3992	3758	3758
q11	451	238	248	238
q12	461	233	227	227
q13	17775	2988	2972	2972
q14	268	226	215	215
q15	532	482	485	482
q16	505	381	370	370
q17	974	736	705	705
q18	7991	7465	7336	7336
q19	7657	1517	1381	1381
q20	666	327	333	327
q21	4881	3811	3933	3811
q22	405	348	340	340
Total cold run time: 118851 ms
Total hot run time: 40466 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4447	4229	4281	4229
q2	367	265	275	265
q3	3167	2905	2960	2905
q4	1994	1693	1703	1693
q5	5506	5515	5476	5476
q6	230	131	136	131
q7	2321	1821	1783	1783
q8	3314	3407	3443	3407
q9	8741	8888	8769	8769
q10	4083	3705	3819	3705
q11	628	503	485	485
q12	838	644	653	644
q13	15954	3169	3185	3169
q14	296	285	275	275
q15	525	505	485	485
q16	499	432	429	429
q17	1838	1516	1472	1472
q18	8105	8006	7863	7863
q19	1829	1685	1528	1528
q20	3141	1908	1855	1855
q21	5113	4936	4727	4727
q22	642	568	553	553
Total cold run time: 73578 ms
Total hot run time: 55848 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 174590 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit bfc4191d9b054beb950fdbbd407ec3ec02b2e1b9, data reload: false

query1	921	398	384	384
query2	6453	2419	2420	2419
query3	6624	203	201	201
query4	19636	17335	17454	17335
query5	3611	475	468	468
query6	240	156	158	156
query7	4568	300	285	285
query8	297	278	290	278
query9	8768	2437	2415	2415
query10	560	307	267	267
query11	10442	10127	10112	10112
query12	115	93	82	82
query13	1653	398	363	363
query14	10168	7636	7585	7585
query15	231	189	195	189
query16	7733	272	262	262
query17	1894	529	525	525
query18	1940	275	271	271
query19	195	167	146	146
query20	91	82	81	81
query21	211	134	126	126
query22	4264	4059	3998	3998
query23	33838	33857	33647	33647
query24	10688	2766	2896	2766
query25	586	382	417	382
query26	724	158	159	158
query27	2300	319	318	318
query28	5769	2159	2157	2157
query29	870	637	624	624
query30	246	151	156	151
query31	1005	752	758	752
query32	87	50	53	50
query33	682	289	280	280
query34	864	480	484	480
query35	753	654	642	642
query36	1110	983	963	963
query37	150	74	77	74
query38	3026	2895	2849	2849
query39	927	825	820	820
query40	226	125	128	125
query41	53	56	53	53
query42	112	107	102	102
query43	621	571	549	549
query44	1050	726	716	716
query45	195	159	167	159
query46	1076	738	684	684
query47	1887	1797	1764	1764
query48	361	295	289	289
query49	834	400	411	400
query50	773	383	383	383
query51	6870	6759	6638	6638
query52	102	87	90	87
query53	358	282	286	282
query54	851	442	433	433
query55	75	72	71	71
query56	285	261	255	255
query57	1131	1063	1054	1054
query58	273	247	254	247
query59	3496	3216	3210	3210
query60	290	270	266	266
query61	95	91	96	91
query62	602	431	459	431
query63	314	284	296	284
query64	8461	2184	1731	1731
query65	3136	3114	3133	3114
query66	736	324	331	324
query67	15398	15053	14962	14962
query68	4481	535	537	535
query69	525	415	367	367
query70	1185	1106	1135	1106
query71	382	281	276	276
query72	7146	5321	5360	5321
query73	732	323	326	323
query74	5874	5503	5506	5503
query75	3343	2629	2688	2629
query76	2094	952	919	919
query77	441	301	300	300
query78	10467	9920	9882	9882
query79	2114	512	510	510
query80	1523	474	460	460
query81	567	219	221	219
query82	664	100	99	99
query83	235	174	167	167
query84	240	85	87	85
query85	1663	287	270	270
query86	490	320	307	307
query87	3279	3112	3100	3100
query88	3846	2444	2432	2432
query89	480	370	378	370
query90	1714	188	186	186
query91	131	99	104	99
query92	61	50	51	50
query93	2329	500	489	489
query94	1151	189	187	187
query95	416	307	312	307
query96	603	279	268	268
query97	3172	3031	3052	3031
query98	214	199	197	197
query99	1217	869	831	831
Total cold run time: 266680 ms
Total hot run time: 174590 ms

@doris-robot
Copy link

ClickBench: Total hot run time: 30.51 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit bfc4191d9b054beb950fdbbd407ec3ec02b2e1b9, data reload: false

query1	0.04	0.04	0.02
query2	0.08	0.04	0.03
query3	0.21	0.05	0.05
query4	1.68	0.07	0.07
query5	0.49	0.47	0.47
query6	1.14	0.72	0.72
query7	0.01	0.01	0.01
query8	0.05	0.04	0.04
query9	0.53	0.49	0.49
query10	0.54	0.54	0.54
query11	0.15	0.11	0.11
query12	0.15	0.12	0.12
query13	0.60	0.59	0.59
query14	0.76	0.78	0.81
query15	0.83	0.81	0.81
query16	0.37	0.37	0.35
query17	0.96	0.97	1.01
query18	0.22	0.23	0.26
query19	1.87	1.68	1.70
query20	0.01	0.01	0.01
query21	15.44	0.65	0.66
query22	4.30	6.89	1.88
query23	18.31	1.47	1.38
query24	2.15	0.23	0.22
query25	0.15	0.08	0.08
query26	0.27	0.18	0.17
query27	0.08	0.08	0.08
query28	13.20	1.03	0.99
query29	12.62	3.30	3.27
query30	0.25	0.06	0.05
query31	2.86	0.40	0.40
query32	3.27	0.47	0.47
query33	2.90	2.94	2.93
query34	17.10	4.46	4.39
query35	4.47	4.42	4.48
query36	0.65	0.48	0.47
query37	0.18	0.15	0.15
query38	0.15	0.14	0.15
query39	0.04	0.03	0.04
query40	0.17	0.13	0.14
query41	0.09	0.04	0.04
query42	0.05	0.04	0.05
query43	0.04	0.05	0.04
Total cold run time: 109.43 s
Total hot run time: 30.51 s

@morrySnow
Copy link
Contributor Author

run feut

@morrySnow
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

TPC-H: Total hot run time: 39788 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 48e35e9007236c1a49641cdc559bc9a6a0bdd729, data reload: false

------ Round 1 ----------------------------------
q1	18024	4458	4429	4429
q2	2318	185	190	185
q3	10461	1177	1042	1042
q4	10194	713	805	713
q5	7494	2662	2743	2662
q6	219	136	132	132
q7	945	596	599	596
q8	9220	2066	2061	2061
q9	8966	6462	6488	6462
q10	9060	3724	3743	3724
q11	474	235	235	235
q12	464	233	222	222
q13	17761	2962	2974	2962
q14	276	235	232	232
q15	520	476	464	464
q16	509	369	363	363
q17	961	661	723	661
q18	8066	7468	7383	7383
q19	3165	1414	1538	1414
q20	644	328	309	309
q21	5052	3208	3875	3208
q22	400	342	329	329
Total cold run time: 115193 ms
Total hot run time: 39788 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4421	4258	4263	4258
q2	371	267	271	267
q3	2925	2721	2713	2713
q4	1883	1567	1563	1563
q5	5224	5259	5249	5249
q6	222	128	133	128
q7	2146	1778	1743	1743
q8	3220	3327	3309	3309
q9	8302	8316	8388	8316
q10	3848	3643	3697	3643
q11	566	506	487	487
q12	793	594	620	594
q13	17388	2973	2990	2973
q14	291	254	258	254
q15	514	473	474	473
q16	461	405	411	405
q17	1794	1469	1473	1469
q18	7618	7479	7459	7459
q19	4591	1629	1661	1629
q20	1998	1784	1772	1772
q21	4835	4682	4764	4682
q22	643	536	534	534
Total cold run time: 74054 ms
Total hot run time: 53920 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 172513 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 48e35e9007236c1a49641cdc559bc9a6a0bdd729, data reload: false

query1	915	371	367	367
query2	6456	2318	2359	2318
query3	6642	195	202	195
query4	20814	17266	17410	17266
query5	4166	460	455	455
query6	250	165	161	161
query7	4593	290	285	285
query8	296	284	267	267
query9	8591	2458	2439	2439
query10	599	298	264	264
query11	10387	10027	10108	10027
query12	124	81	82	81
query13	1665	372	384	372
query14	9340	7608	7414	7414
query15	246	187	189	187
query16	7734	274	273	273
query17	1891	552	534	534
query18	1940	290	281	281
query19	201	165	155	155
query20	88	83	83	83
query21	211	132	131	131
query22	4282	3986	4095	3986
query23	33690	33055	33038	33038
query24	11199	2798	2768	2768
query25	622	381	372	372
query26	1397	151	147	147
query27	2968	310	326	310
query28	7294	2090	2082	2082
query29	946	616	599	599
query30	287	149	155	149
query31	970	735	747	735
query32	90	52	54	52
query33	780	280	274	274
query34	967	461	466	461
query35	739	621	640	621
query36	1102	930	951	930
query37	157	73	68	68
query38	2829	2808	2718	2718
query39	856	810	824	810
query40	207	126	126	126
query41	53	54	50	50
query42	114	94	99	94
query43	569	529	542	529
query44	1198	718	736	718
query45	190	167	167	167
query46	1075	722	707	707
query47	1849	1851	1791	1791
query48	368	316	288	288
query49	1092	406	400	400
query50	769	394	392	392
query51	6892	6706	6700	6700
query52	96	93	91	91
query53	370	291	281	281
query54	857	454	466	454
query55	77	74	73	73
query56	300	262	261	261
query57	1141	1074	1063	1063
query58	258	265	243	243
query59	3638	3357	2999	2999
query60	321	266	267	266
query61	92	93	96	93
query62	668	439	453	439
query63	320	284	281	281
query64	8976	2288	1780	1780
query65	3163	3250	3121	3121
query66	1197	332	344	332
query67	15423	14757	14808	14757
query68	4565	533	538	533
query69	459	297	300	297
query70	1181	1073	1106	1073
query71	403	274	262	262
query72	7625	5097	5928	5097
query73	741	322	324	322
query74	5866	5469	5534	5469
query75	3427	2625	2626	2625
query76	2582	941	898	898
query77	460	291	312	291
query78	10206	9919	9766	9766
query79	2544	509	505	505
query80	1328	477	520	477
query81	609	222	220	220
query82	760	104	100	100
query83	266	174	167	167
query84	258	87	90	87
query85	1678	288	271	271
query86	492	335	344	335
query87	3287	3050	3075	3050
query88	3959	2457	2460	2457
query89	471	379	379	379
query90	1765	204	190	190
query91	131	100	105	100
query92	66	51	54	51
query93	1857	500	493	493
query94	1159	185	183	183
query95	401	316	316	316
query96	585	271	273	271
query97	3225	3073	3029	3029
query98	223	201	197	197
query99	1181	848	831	831
Total cold run time: 273357 ms
Total hot run time: 172513 ms

@doris-robot
Copy link

ClickBench: Total hot run time: 31.1 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 48e35e9007236c1a49641cdc559bc9a6a0bdd729, data reload: false

query1	0.03	0.03	0.04
query2	0.08	0.04	0.04
query3	0.22	0.05	0.05
query4	1.68	0.07	0.07
query5	0.50	0.47	0.47
query6	1.13	0.72	0.72
query7	0.02	0.01	0.02
query8	0.05	0.04	0.04
query9	0.54	0.50	0.49
query10	0.53	0.55	0.52
query11	0.15	0.10	0.11
query12	0.14	0.12	0.12
query13	0.60	0.58	0.58
query14	0.75	0.81	0.78
query15	0.82	0.80	0.80
query16	0.37	0.34	0.35
query17	0.97	0.99	0.96
query18	0.21	0.24	0.24
query19	1.77	1.66	1.71
query20	0.01	0.01	0.01
query21	15.44	0.65	0.64
query22	3.92	6.67	2.61
query23	18.27	1.37	1.29
query24	2.12	0.22	0.23
query25	0.16	0.08	0.09
query26	0.27	0.18	0.17
query27	0.08	0.09	0.08
query28	13.22	1.03	1.00
query29	12.64	3.32	3.32
query30	0.25	0.06	0.05
query31	2.86	0.38	0.39
query32	3.29	0.47	0.46
query33	2.87	2.87	2.93
query34	17.14	4.45	4.40
query35	4.51	4.53	4.46
query36	0.65	0.46	0.47
query37	0.19	0.15	0.15
query38	0.15	0.14	0.15
query39	0.04	0.04	0.03
query40	0.18	0.15	0.14
query41	0.09	0.04	0.04
query42	0.04	0.04	0.05
query43	0.05	0.04	0.04
Total cold run time: 109 s
Total hot run time: 31.1 s

@morrySnow
Copy link
Contributor Author

run p0

Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Jun 26, 2024
Copy link
Contributor

PR approved by at least one committer and no changes requested.

Copy link
Contributor

PR approved by anyone and no changes requested.

@morrySnow morrySnow merged commit 8160c12 into apache:master Jun 26, 2024
@morrySnow morrySnow deleted the fix_multi_stmt branch June 26, 2024 06:26
morrySnow added a commit to morrySnow/incubator-doris that referenced this pull request Jun 27, 2024
… been set (apache#36759)

multi statement support by PR apache#3050.
But there is a minor issue in implementation.

as MySQL dev doc say in

https://dev.mysql.com/doc/dev/mysql-server/latest/page_protocol_command_phase_sp.html#sect_protocol_command_phase_sp_multi_statement

server should only process multi statement
when client set CLIENT_MULTI_STATEMENTS.
When client not set CLIENT_MULTI_STATEMENTS, server should treat query
as single statement.

but Doris do slightly different with MySQL server. Doris always treat
query as multi statement, but only return multi result when client set
CLIENT_MULTI_STATEMENTS. When client do not set CLIENT_MULTI_STATEMENTS,
Doris will return the last statement result only.

---------

Co-authored-by: Mingyu Chen <[email protected]>
morrySnow added a commit that referenced this pull request Jun 27, 2024
… been set (#36759) (#36924)

pick from master #36759

multi statement support by PR #3050.
But there is a minor issue in implementation.

as MySQL dev doc say in


https://dev.mysql.com/doc/dev/mysql-server/latest/page_protocol_command_phase_sp.html#sect_protocol_command_phase_sp_multi_statement

server should only process multi statement
when client set CLIENT_MULTI_STATEMENTS.
When client not set CLIENT_MULTI_STATEMENTS, server should treat query
as single statement.

but Doris do slightly different with MySQL server. Doris always treat
query as multi statement, but only return multi result when client set
CLIENT_MULTI_STATEMENTS. When client do not set CLIENT_MULTI_STATEMENTS,
Doris will return the last statement result only.

---------

Co-authored-by: Mingyu Chen <[email protected]>
morrySnow added a commit that referenced this pull request Jun 27, 2024
… been set (#36759) (#36919)

pick from master #36759

multi statement support by PR #3050.
But there is a minor issue in implementation.

as MySQL dev doc say in


https://dev.mysql.com/doc/dev/mysql-server/latest/page_protocol_command_phase_sp.html#sect_protocol_command_phase_sp_multi_statement

server should only process multi statement
when client set CLIENT_MULTI_STATEMENTS.
When client not set CLIENT_MULTI_STATEMENTS, server should treat query
as single statement.

but Doris do slightly different with MySQL server. Doris always treat
query as multi statement, but only return multi result when client set
CLIENT_MULTI_STATEMENTS. When client do not set CLIENT_MULTI_STATEMENTS,
Doris will return the last statement result only.

Co-authored-by: Mingyu Chen <[email protected]>
dataroaring pushed a commit that referenced this pull request Jun 28, 2024
… been set (#36759)

multi statement support by PR #3050.
But there is a minor issue in implementation.

as MySQL dev doc say in

https://dev.mysql.com/doc/dev/mysql-server/latest/page_protocol_command_phase_sp.html#sect_protocol_command_phase_sp_multi_statement

server should only process multi statement
when client set CLIENT_MULTI_STATEMENTS.
When client not set CLIENT_MULTI_STATEMENTS, server should treat query
as single statement.

but Doris do slightly different with MySQL server. Doris always treat
query as multi statement, but only return multi result when client set
CLIENT_MULTI_STATEMENTS. When client do not set CLIENT_MULTI_STATEMENTS,
Doris will return the last statement result only.

---------

Co-authored-by: Mingyu Chen <[email protected]>
@xiaokang xiaokang mentioned this pull request Jul 14, 2024
mongo360 pushed a commit to mongo360/doris that referenced this pull request Aug 16, 2024
… been set (apache#36759) (apache#36924)

pick from master apache#36759

multi statement support by PR apache#3050.
But there is a minor issue in implementation.

as MySQL dev doc say in

https://dev.mysql.com/doc/dev/mysql-server/latest/page_protocol_command_phase_sp.html#sect_protocol_command_phase_sp_multi_statement

server should only process multi statement
when client set CLIENT_MULTI_STATEMENTS.
When client not set CLIENT_MULTI_STATEMENTS, server should treat query
as single statement.

but Doris do slightly different with MySQL server. Doris always treat
query as multi statement, but only return multi result when client set
CLIENT_MULTI_STATEMENTS. When client do not set CLIENT_MULTI_STATEMENTS,
Doris will return the last statement result only.

---------

Co-authored-by: Mingyu Chen <[email protected]>
@T-M-L-C
Copy link

T-M-L-C commented Oct 8, 2024

@morrySnow 咨询个问题:对于HTTP场景, jdbc url中需要怎么配置才能支持多个查询SQL返回多个查询结果呢?

@morrySnow
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants