Skip to content

Commit 64b227e

Browse files
NataliaIvakinaHunternesspontusmelkerenetapopovaJoelBergstrand
authored
Cherry-picks for the 5.24 release (#179)
Co-authored-by: Therese Magnusson <[email protected]> Co-authored-by: Pontus Melke <[email protected]> Co-authored-by: Reneta Popova <[email protected]> Co-authored-by: JoelBergstrand <[email protected]>
1 parent 1751c65 commit 64b227e

File tree

2 files changed

+326
-3
lines changed

2 files changed

+326
-3
lines changed

modules/ROOT/pages/changelogs.adoc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
:description: This page lists all changes to status codes per Neo4j version.
22
= Changes to status codes per Neo4j version
33

4+
== Neo4j 5.24
5+
6+
**New:**
7+
8+
[source, status codes, role="noheader"]
9+
-----
10+
Neo.ClientNotification.Statement.RedundantOptionalProcedure
11+
Neo.ClientNotification.Statement.RedundantOptionalSubquery
12+
Neo.ClientNotification.Security.AuthProviderNotDefined
13+
Neo.ClientNotification.Security.ExternalAuthNotEnabled
14+
Neo.ClientNotification.Statement.AggregationSkippedNull
15+
-----
16+
417
== Neo4j 5.23
518

619
From version 5.23, Neo4j has a new GqlStatusObject API in addition to the existing Notification API.

modules/ROOT/pages/notifications/all-notifications.adoc

Lines changed: 313 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,6 +1154,61 @@ If you plan to create that property key in the future, no change is needed.
11541154
======
11551155
=====
11561156

1157+
[#_neo_clientnotification_statement_AggregationSkippedNull]
1158+
=== Aggregation skipped null
1159+
1160+
.Notification details
1161+
[cols="<1s,<4"]
1162+
|===
1163+
|Neo4j code
1164+
m|Neo.ClientNotification.Statement.AggregationSkippedNull
1165+
|Title
1166+
a|The query contains an aggregation function that skips null values.
1167+
|Description
1168+
|The query contains an aggregation function that skips null values.
1169+
|Category
1170+
m|UNRECOGNIZED
1171+
|GQLSTATUS code
1172+
m|01G11
1173+
|Status description
1174+
a|warn: null value eliminated in set function.
1175+
|Classification
1176+
m|UNRECOGNIZED
1177+
|SeverityLevel
1178+
m|WARNING
1179+
|===
1180+
1181+
.Aggregation skipping a NULL value
1182+
[.tabbed-example]
1183+
=====
1184+
[.include-with-neo4j-code]
1185+
======
1186+
Query::
1187+
1188+
[source,cypher]
1189+
----
1190+
UNWIND [1, NULL, 2] AS i RETURN count(i) AS sum
1191+
----
1192+
Description of the returned code::
1193+
The query contains an aggregation function that skips null values.
1194+
======
1195+
[.include-with-GQLSTATUS-code]
1196+
======
1197+
Query::
1198+
+
1199+
[source,cypher]
1200+
----
1201+
UNWIND [1, NULL, 2] AS i RETURN count(i) AS sum
1202+
----
1203+
1204+
Returned GQLSTATUS code::
1205+
01G11
1206+
1207+
Returned status description::
1208+
warn: null value eliminated in set function.
1209+
======
1210+
=====
1211+
11571212
[#_unsupported_notifications]
11581213
== `UNSUPPORTED` category
11591214

@@ -2726,6 +2781,107 @@ Use `DATABASE *` without the parameter to revoke the privilege on all databases.
27262781
======
27272782
=====
27282783

2784+
[#_neo_clientnotification_security_authprovidernotdefined]
2785+
=== AuthProviderNotDefined
2786+
2787+
.Notification details
2788+
[cols="<1s,<4"]
2789+
|===
2790+
|Code
2791+
m|Neo.ClientNotification.Security.AuthProviderNotDefined
2792+
|Title
2793+
a|The auth provider is not defined.
2794+
|Description
2795+
a|The auth provider `<provider>` is not defined in the configuration.
2796+
Verify that the spelling is correct or define `<provider>` in the configuration.
2797+
|Severity
2798+
m|INFORMATION
2799+
|Category
2800+
m|SECURITY
2801+
|===
2802+
2803+
.Create a user with an auth provider that is not defined in the configuration
2804+
====
2805+
Command::
2806+
+
2807+
[source, cypher]
2808+
----
2809+
CREATE USER foo SET AUTH 'unknownProvider' { SET ID 'idString' }
2810+
----
2811+
2812+
Description of the returned code::
2813+
The auth provider `unknownProvider` is not defined in the configuration.
2814+
Verify that the spelling is correct or define `unknownProvider` in the configuration.
2815+
2816+
Suggestions for improvement::
2817+
Make sure that the given provider is correct, or replace it if not.
2818+
If it is correct, make sure to add it as a known auth provider in one or both of `dbms.security.authentication_providers` and `dbms.security.authorization_providers`.
2819+
====
2820+
2821+
.Alter a user to add an auth provider that is not defined in the configuration
2822+
====
2823+
Command::
2824+
+
2825+
[source, cypher]
2826+
----
2827+
ALTER USER foo SET AUTH 'unknownProvider' { SET ID 'idString' }
2828+
----
2829+
2830+
Description of the returned code::
2831+
The auth provider `unknownProvider` is not defined in the configuration.
2832+
Verify that the spelling is correct or define `unknownProvider` in the configuration.
2833+
2834+
Suggestions for improvement::
2835+
Make sure that the given provider is correct, or replace it if not.
2836+
If it is correct, make sure to add it as a known auth provider in one or both of `dbms.security.authentication_providers` and `dbms.security.authorization_providers`.
2837+
====
2838+
2839+
[#_neo_clientnotification_security_externalauthnotenabled]
2840+
=== ExternalAuthNotEnabled
2841+
2842+
.Notification details
2843+
[cols="<1s,<4"]
2844+
|===
2845+
|Code
2846+
m|Neo.ClientNotification.Security.ExternalAuthNotEnabled
2847+
|Title
2848+
a|External auth for user is not enabled.
2849+
|Description
2850+
a|Use setting `dbms.security.require_local_user` to enable external auth.
2851+
|Severity
2852+
m|WARNING
2853+
|Category
2854+
m|SECURITY
2855+
|===
2856+
2857+
.Create a user with an external auth provider when linked users are not enabled
2858+
====
2859+
Command::
2860+
+
2861+
[source, cypher]
2862+
----
2863+
CREATE USER foo SET AUTH 'exampleProvider' { SET ID 'idString' }
2864+
----
2865+
2866+
Suggestions for improvement::
2867+
Enable linked users through the `dbms.security.require_local_user` setting.
2868+
Until enabled, the new external auth will be ignored, and current external auth behaviors will continue to apply.
2869+
====
2870+
2871+
.Alter a user to add an external auth provider when linked users are not enabled
2872+
====
2873+
Command::
2874+
+
2875+
[source, cypher]
2876+
----
2877+
ALTER USER foo SET AUTH 'exampleProvider' { SET ID 'idString' }
2878+
----
2879+
2880+
Suggestions for improvement::
2881+
Enable linked users through the `dbms.security.require_local_user` setting.
2882+
Until enabled, the new external auth will be ignored, and current external auth behaviors will continue to apply.
2883+
====
2884+
27292885
[#_topology_notifications]
27302886
== `TOPOLOGY` category
27312887

@@ -3544,6 +3700,161 @@ RETURN *
35443700
======
35453701
=====
35463702

3703+
[#_neo_clientnotification_statement_redundantoptionalprocedure]
3704+
=== Redundant optional procedure
3705+
3706+
.Notification details
3707+
[cols="<1s,<4"]
3708+
|===
3709+
|Neo4j code
3710+
m|Neo.ClientNotification.Statement.RedundantOptionalProcedure
3711+
|Title
3712+
a|The use of `OPTIONAL` is redundant when the procedure calls a void procedure.
3713+
|Description
3714+
|The use of `OPTIONAL` is redundant as `CALL %s` is a void procedure.
3715+
|Category
3716+
m|GENERIC
3717+
|GQLSTATUS code
3718+
m|03N61
3719+
|Status description
3720+
a|info: redundant optional procedure. The use of `OPTIONAL` is redundant as `CALL %s` is a void procedure.
3721+
|Classification
3722+
m|GENERIC
3723+
|SeverityLevel
3724+
m|INFORMATION
3725+
|===
3726+
3727+
.Redundant use of `OPTIONAL` in a procedure call
3728+
[.tabbed-example]
3729+
=====
3730+
[.include-with-neo4j-code]
3731+
======
3732+
Query::
3733+
+
3734+
[source,cypher]
3735+
----
3736+
OPTIONAL CALL db.createLabel("A")
3737+
----
3738+
3739+
Description of the returned code::
3740+
The use of `OPTIONAL` is redundant as `CALL db.createLabel` is a void procedure.
3741+
3742+
Suggestions for improvement::
3743+
If the intended behavior of the query is to use a void procedure, the `OPTIONAL` keyword can be removed without impacting the query.
3744+
+
3745+
[source,cypher]
3746+
----
3747+
CALL db.createLabel("A")
3748+
----
3749+
======
3750+
[.include-with-GQLSTATUS-code]
3751+
======
3752+
Query::
3753+
+
3754+
[source,cypher]
3755+
----
3756+
OPTIONAL CALL db.createLabel("A")
3757+
----
3758+
Returned GQLSTATUS code::
3759+
03N61
3760+
3761+
Returned status description::
3762+
info: redundant optional procedure. The use of `OPTIONAL` is redundant as `CALL db.createLabel` is a void procedure.
3763+
3764+
Suggestions for improvement::
3765+
If the intended behavior of the query is to use a void procedure, the `OPTIONAL` keyword can be removed without impacting the query.
3766+
+
3767+
[source,cypher]
3768+
----
3769+
CALL db.createLabel("A")
3770+
----
3771+
======
3772+
=====
3773+
3774+
[#_neo_clientnotification_statement_redundantoptionalsubquery]
3775+
=== Redundant optional subquery
3776+
3777+
.Notification details
3778+
[cols="<1s,<4"]
3779+
|===
3780+
|Neo4j code
3781+
m|Neo.ClientNotification.Statement.RedundantOptionalSubquery
3782+
|Title
3783+
a|The use of `OPTIONAL` is redundant when `CALL` is a unit subquery.
3784+
|Description
3785+
|The use of `OPTIONAL` is redundant as `CALL` is a unit subquery.
3786+
|Category
3787+
m|GENERIC
3788+
|GQLSTATUS code
3789+
m|03N62
3790+
|Status description
3791+
a|info: redundant optional subquery. The use of `OPTIONAL` is redundant as `CALL` is a unit subquery.
3792+
|Classification
3793+
m|GENERIC
3794+
|SeverityLevel
3795+
m|INFORMATION
3796+
|===
3797+
3798+
.Redundant use of `OPTIONAL` in a `CALL` subquery
3799+
[.tabbed-example]
3800+
=====
3801+
[.include-with-neo4j-code]
3802+
======
3803+
Query::
3804+
+
3805+
[source,cypher]
3806+
----
3807+
UNWIND [1, 2, 3] AS x
3808+
OPTIONAL CALL (x) {
3809+
CREATE({i:x})
3810+
}
3811+
----
3812+
3813+
Description of the returned code::
3814+
Optional is redundant in the case of a unit subquery. The use of `OPTIONAL` on unit subqueries have no effect and can be removed.
3815+
3816+
Suggestions for improvement::
3817+
If the intended behavior of the query is for the subquery not to return any values, the `OPTIONAL` keyword can be removed without impacting the query.
3818+
+
3819+
[source,cypher]
3820+
----
3821+
UNWIND [1, 2, 3] AS x
3822+
CALL (x) {
3823+
CREATE({i:x})
3824+
}
3825+
----
3826+
======
3827+
[.include-with-GQLSTATUS-code]
3828+
======
3829+
Query::
3830+
+
3831+
[source,cypher]
3832+
----
3833+
UNWIND [1, 2, 3] AS x
3834+
OPTIONAL CALL (x) {
3835+
CREATE({i:x})
3836+
}
3837+
----
3838+
3839+
Returned GQLSTATUS code::
3840+
03N62
3841+
3842+
Description of the returned code::
3843+
info: redundant optional subquery. The use of `OPTIONAL` is redundant as `CALL` is a unit subquery.
3844+
3845+
Suggestions for improvement::
3846+
If the intended behavior of the query is for the subquery not to return any values, the `OPTIONAL` keyword can be removed without impacting the query.
3847+
+
3848+
[source,cypher]
3849+
----
3850+
UNWIND [1, 2, 3] AS x
3851+
CALL (x) {
3852+
CREATE({i:x})
3853+
}
3854+
----
3855+
======
3856+
=====
3857+
35473858
[#_neo_clientnotification_statement_parameternotprovided]
35483859
=== Parameter missing
35493860

@@ -3793,9 +4104,9 @@ Query::
37934104
MATCH ()-[r*]->()<-[r*]-() RETURN count(*) AS count
37944105
----
37954106
Description of the returned code::
3796-
A variable-length relationship variable is bound more than once, which leads to no results because relationships must not occur more than once in each result. (Relationship `r` was repeated)
3797-
4107+
A variable-length relationship variable is bound more than once, which leads to no results because relationships must not occur more than once in each result. (Relationship r was repeated)
37984108
======
4109+
37994110
[.include-with-GQLSTATUS-code]
38004111
======
38014112
Query::
@@ -3813,4 +4124,3 @@ warn: repeated relationship reference.
38134124
`r` is repeated in `()-[r*]->()<-[r*]-()`, which leads to no results.
38144125
======
38154126
=====
3816-

0 commit comments

Comments
 (0)