Skip to content

Conversation

@zddr
Copy link
Contributor

@zddr zddr commented May 14, 2025

What problem does this PR solve?

not allow drop user admin@%

but should allow drop user admin@'xxx.xxx.xxx'

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:
Only treat admin@% and root@% as system users.

Release note

Only treat admin@% and root@% as system users.

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@zddr
Copy link
Contributor Author

zddr commented May 14, 2025

run buildall

@Thearas
Copy link
Contributor

Thearas commented May 14, 2025

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

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	27105	5070	5053	5053
q2	2078	282	189	189
q3	10570	1264	716	716
q4	10277	1009	543	543
q5	9253	2468	2383	2383
q6	192	165	135	135
q7	936	743	631	631
q8	9317	1300	1102	1102
q9	6803	5138	5127	5127
q10	6822	2329	1930	1930
q11	479	289	281	281
q12	361	351	212	212
q13	17781	3676	3102	3102
q14	242	231	209	209
q15	531	496	491	491
q16	445	430	377	377
q17	595	861	355	355
q18	7806	7302	7162	7162
q19	1529	991	557	557
q20	330	349	234	234
q21	4128	3391	2476	2476
q22	1028	1015	983	983
Total cold run time: 118608 ms
Total hot run time: 34248 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5154	5077	5028	5028
q2	241	323	238	238
q3	2190	2708	2260	2260
q4	1418	1931	1480	1480
q5	4573	4394	4337	4337
q6	206	171	126	126
q7	1954	1963	1851	1851
q8	2593	2619	2469	2469
q9	7281	7157	7132	7132
q10	3045	3184	2733	2733
q11	569	513	499	499
q12	678	762	585	585
q13	3532	4008	3244	3244
q14	270	307	276	276
q15	531	481	484	481
q16	450	510	434	434
q17	1146	1547	1368	1368
q18	7723	7615	7272	7272
q19	825	807	920	807
q20	1950	2007	1883	1883
q21	4981	4669	4610	4610
q22	1054	1038	964	964
Total cold run time: 52364 ms
Total hot run time: 50077 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 186927 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 9d5ddb166c3789053169119b3ccf30640ce2ddc1, data reload: false

query1	1020	472	485	472
query2	6571	1830	1798	1798
query3	6742	231	219	219
query4	26198	23319	22960	22960
query5	4320	622	467	467
query6	302	199	198	198
query7	4628	490	295	295
query8	294	256	246	246
query9	8594	2671	2691	2671
query10	468	356	277	277
query11	15449	15058	14939	14939
query12	156	110	109	109
query13	1645	548	404	404
query14	8762	6146	6048	6048
query15	224	191	183	183
query16	7129	663	459	459
query17	952	730	594	594
query18	1972	406	309	309
query19	207	188	168	168
query20	127	117	116	116
query21	215	131	110	110
query22	4081	4195	4032	4032
query23	34221	33221	33454	33221
query24	8521	2361	2409	2361
query25	543	457	390	390
query26	1226	274	155	155
query27	2751	505	346	346
query28	4327	2167	2141	2141
query29	780	571	446	446
query30	282	214	185	185
query31	995	821	759	759
query32	78	64	61	61
query33	552	358	321	321
query34	816	869	541	541
query35	800	815	737	737
query36	958	984	893	893
query37	117	103	76	76
query38	4183	4169	4066	4066
query39	1513	1416	1430	1416
query40	216	123	106	106
query41	58	60	54	54
query42	131	109	109	109
query43	517	511	461	461
query44	1338	836	839	836
query45	175	175	167	167
query46	865	1041	652	652
query47	1752	1790	1729	1729
query48	391	426	309	309
query49	769	550	425	425
query50	677	685	415	415
query51	4119	4234	4076	4076
query52	124	117	104	104
query53	229	263	192	192
query54	588	586	516	516
query55	90	83	84	83
query56	306	302	305	302
query57	1134	1147	1094	1094
query58	272	266	270	266
query59	2641	2655	2653	2653
query60	326	328	317	317
query61	132	129	154	129
query62	814	724	671	671
query63	228	193	198	193
query64	4493	1153	723	723
query65	4303	4259	4274	4259
query66	1157	413	310	310
query67	15806	15677	15431	15431
query68	8960	912	537	537
query69	489	311	271	271
query70	1203	1137	1111	1111
query71	451	331	298	298
query72	5656	4703	4762	4703
query73	723	624	365	365
query74	8932	9129	9004	9004
query75	4262	3281	2755	2755
query76	3634	1210	781	781
query77	836	405	303	303
query78	10155	10229	9313	9313
query79	2716	819	597	597
query80	644	520	456	456
query81	473	258	298	258
query82	459	133	100	100
query83	296	266	237	237
query84	292	107	88	88
query85	808	355	326	326
query86	360	312	285	285
query87	4406	4480	4347	4347
query88	3221	2326	2325	2325
query89	470	316	289	289
query90	1934	208	207	207
query91	138	151	114	114
query92	75	61	62	61
query93	2089	934	592	592
query94	674	408	302	302
query95	387	301	287	287
query96	498	573	284	284
query97	3283	3269	3081	3081
query98	245	200	204	200
query99	1470	1382	1279	1279
Total cold run time: 276609 ms
Total hot run time: 186927 ms

@doris-robot
Copy link

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

query1	0.04	0.04	0.04
query2	0.13	0.10	0.11
query3	0.26	0.19	0.19
query4	1.59	0.20	0.11
query5	0.58	0.55	0.57
query6	1.18	0.73	0.73
query7	0.03	0.01	0.02
query8	0.05	0.04	0.04
query9	0.59	0.55	0.52
query10	0.58	0.58	0.57
query11	0.16	0.10	0.12
query12	0.16	0.12	0.12
query13	0.62	0.61	0.59
query14	0.80	0.81	0.81
query15	0.88	0.86	0.88
query16	0.40	0.39	0.39
query17	1.04	1.10	1.08
query18	0.24	0.21	0.21
query19	1.96	1.83	1.91
query20	0.02	0.01	0.01
query21	15.42	0.92	0.58
query22	0.76	1.11	0.78
query23	14.85	1.44	0.61
query24	7.28	1.40	0.44
query25	0.46	0.15	0.22
query26	0.67	0.16	0.13
query27	0.05	0.05	0.04
query28	9.11	0.92	0.45
query29	12.58	4.11	3.33
query30	0.25	0.09	0.06
query31	2.82	0.61	0.39
query32	3.24	0.56	0.48
query33	3.04	3.13	3.08
query34	15.92	5.09	4.51
query35	4.54	4.54	4.51
query36	0.69	0.51	0.49
query37	0.09	0.06	0.06
query38	0.05	0.04	0.03
query39	0.04	0.02	0.03
query40	0.17	0.14	0.13
query41	0.08	0.02	0.02
query42	0.04	0.02	0.03
query43	0.04	0.03	0.03
Total cold run time: 103.5 s
Total hot run time: 29.2 s


public boolean isRootUser() {
return user.equals(Auth.ROOT_USER);
return this.equals(ROOT);
Copy link
Contributor

Choose a reason for hiding this comment

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

so root@192.168.0.1 cannot do anything if it has no privilege?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

  1. if only has one default user root@%, user login from 192.168.0.1,will have root priv
  2. if create a user root@192.168.0.1,then login from 192.168.0.1,will have no priv

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label May 14, 2025
@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

@morningman
Copy link
Contributor

Better update the document

@morrySnow morrySnow merged commit f2b348b into apache:master Jun 13, 2025
36 checks passed
github-actions bot pushed a commit that referenced this pull request Jun 25, 2025
### What problem does this PR solve?

not allow drop user `admin@%`

but should allow drop user `admin@'xxx.xxx.xxx'`

### Release note
Only treat admin@% and root@% as system users.
github-actions bot pushed a commit that referenced this pull request Jun 25, 2025
### What problem does this PR solve?

not allow drop user `admin@%`

but should allow drop user `admin@'xxx.xxx.xxx'`

### Release note
Only treat admin@% and root@% as system users.
github-actions bot pushed a commit that referenced this pull request Jun 25, 2025
### What problem does this PR solve?

not allow drop user `admin@%`

but should allow drop user `admin@'xxx.xxx.xxx'`

### Release note
Only treat admin@% and root@% as system users.
morrySnow pushed a commit that referenced this pull request Jun 26, 2025
…50904 (#52281)

Cherry-picked from #50904

Co-authored-by: zhangdong <zhangdong@selectdb.com>
yiguolei pushed a commit that referenced this pull request Jun 28, 2025
…50904 (#52283)

Cherry-picked from #50904

Co-authored-by: zhangdong <zhangdong@selectdb.com>
dataroaring pushed a commit that referenced this pull request Jun 30, 2025
…50904 (#52282)

Cherry-picked from #50904

Co-authored-by: zhangdong <zhangdong@selectdb.com>
koarz pushed a commit to koarz/doris that referenced this pull request Jul 3, 2025
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.

7 participants