Skip to content

Commit 141e44f

Browse files
authored
Merge pull request #1539 from Altinity/bump/antalya-26.1/26.1.4
Antalya 26.1: bump to 26.1.4
2 parents 50d2a70 + 585f70b commit 141e44f

File tree

121 files changed

+2167
-261
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+2167
-261
lines changed

ci/jobs/scripts/workflow_hooks/pr_body_check.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ def check_changelog_entry(category, pr_body: str) -> str:
6060
if not title or not body:
6161
print("WARNING: Failed to get PR title or body, read from environment")
6262
body = Info().pr_body
63+
labels = Info().pr_labels
64+
65+
if "release" in labels or "release-lts" in labels:
66+
print("NOTE: Release PR detected, skipping changelog entry check")
67+
sys.exit(0)
6368

6469
error, category = get_category(body)
6570
if error or not category:

ci/jobs/scripts/workflow_hooks/pr_labels_and_category.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,9 @@ def check_labels(category, info):
181181

182182
if __name__ == "__main__":
183183
info = Info()
184+
if Labels.RELEASE in info.pr_labels or Labels.RELEASE_LTS in info.pr_labels:
185+
print("NOTE: Release PR detected, skipping changelog category check")
186+
sys.exit(0)
184187
error, category = get_category(info.pr_body)
185188
if not category or error:
186189
print(f"ERROR: {error}")

cmake/autogenerated_versions.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
# NOTE: VERSION_REVISION has nothing common with DBMS_TCP_PROTOCOL_VERSION,
44
# only DBMS_TCP_PROTOCOL_VERSION should be incremented on protocol changes.
5-
SET(VERSION_REVISION 54508)
5+
SET(VERSION_REVISION 54509)
66
SET(VERSION_MAJOR 26)
77
SET(VERSION_MINOR 1)
8-
SET(VERSION_PATCH 3)
9-
SET(VERSION_GITHASH 53779390caa67a65a2368cdbb7533ed925608ba9)
10-
SET(VERSION_DESCRIBE v26.1.3.20001.altinityantalya)
11-
SET(VERSION_STRING 26.1.3.20001.altinityantalya)
8+
SET(VERSION_PATCH 4)
9+
SET(VERSION_GITHASH 5549f2acae95c6d627654f50e212a85d059a55f9)
10+
SET(VERSION_DESCRIBE v26.1.4.20001.altinityantalya)
11+
SET(VERSION_STRING 26.1.4.20001.altinityantalya)
1212
# end of autochange
1313

1414
SET(VERSION_TWEAK 20001)

src/Access/IAccessStorage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ std::optional<AuthResult> IAccessStorage::authenticateImpl(
547547
{
548548
if (auto user = tryRead<User>(*id))
549549
{
550-
AuthResult auth_result { .user_id = *id };
550+
AuthResult auth_result { .user_id = *id, .user_name = credentials.getUserName() };
551551
if (!isAddressAllowed(*user, address))
552552
throwAddressNotAllowed(address);
553553

src/Access/IAccessStorage.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ struct AuthResult
3333
/// Session settings received from authentication server (if any)
3434
SettingsChanges settings{};
3535
AuthenticationData authentication_data {};
36+
/// Username determined by the access storage during authentication,
37+
/// should be treated as the authenticated user name
38+
String user_name;
3639
};
3740

3841
/// Contains entities, i.e. instances of classes derived from IAccessEntity.

src/Access/LDAPAccessStorage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ std::optional<AuthResult> LDAPAccessStorage::authenticateImpl(
490490
}
491491

492492
if (id)
493-
return AuthResult{ .user_id = *id, .authentication_data = AuthenticationData(AuthenticationType::LDAP) };
493+
return AuthResult{ .user_id = *id, .authentication_data = AuthenticationData(AuthenticationType::LDAP), .user_name = credentials.getUserName() };
494494
return std::nullopt;
495495
}
496496

src/Access/TokenAccessStorage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ std::optional<AuthResult> TokenAccessStorage::authenticateImpl(
583583
}
584584

585585
if (id)
586-
return AuthResult{ .user_id = *id, .authentication_data = AuthenticationData(AuthenticationType::JWT) };
586+
return AuthResult{ .user_id = *id, .authentication_data = AuthenticationData(AuthenticationType::JWT), .user_name = credentials.getUserName() };
587587
return std::nullopt;
588588
}
589589

src/Analyzer/Passes/FunctionToSubcolumnsPass.cpp

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,18 @@ std::map<std::pair<TypeIndex, String>, NodeToSubcolumnTransformer> node_transfor
366366
NameAndTypePair column{ctx.column.name + ".null", std::make_shared<DataTypeUInt8>()};
367367
if (sourceHasColumn(ctx.column_source, column.name) || !canOptimizeToSubcolumn(ctx.column_source, column.name))
368368
return;
369+
370+
/// For nested Nullable types (e.g. Nullable(Tuple(... Nullable(T) ...))),
371+
/// the .null subcolumn in storage is Nullable(UInt8), not UInt8.
372+
/// Using it with a hardcoded UInt8 type causes a type mismatch at runtime.
373+
if (auto * table_node = ctx.column_source->as<TableNode>())
374+
{
375+
auto actual = table_node->getStorageSnapshot()->tryGetColumn(
376+
GetColumnsOptions(GetColumnsOptions::All).withRegularSubcolumns(), column.name);
377+
if (actual && actual->type->isNullable())
378+
return;
379+
}
380+
369381
node = std::make_shared<ColumnNode>(column, ctx.column_source);
370382
},
371383
},
@@ -377,6 +389,16 @@ std::map<std::pair<TypeIndex, String>, NodeToSubcolumnTransformer> node_transfor
377389
NameAndTypePair column{ctx.column.name + ".null", std::make_shared<DataTypeUInt8>()};
378390
if (sourceHasColumn(ctx.column_source, column.name) || !canOptimizeToSubcolumn(ctx.column_source, column.name))
379391
return;
392+
393+
/// Same guard as isNull above: nested Nullable .null subcolumn may itself be Nullable.
394+
if (auto * table_node = ctx.column_source->as<TableNode>())
395+
{
396+
auto actual = table_node->getStorageSnapshot()->tryGetColumn(
397+
GetColumnsOptions(GetColumnsOptions::All).withRegularSubcolumns(), column.name);
398+
if (actual && actual->type->isNullable())
399+
return;
400+
}
401+
380402
auto & function_arguments_nodes = function_node.getArguments().getNodes();
381403

382404
function_arguments_nodes = {std::make_shared<ColumnNode>(column, ctx.column_source)};

src/Analyzer/Passes/InverseDictionaryLookupPass.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515

1616
#include <Functions/FunctionsExternalDictionaries.h>
1717

18+
#include <Access/ContextAccess.h>
19+
#include <Access/Common/AccessType.h>
1820
#include <Core/Settings.h>
1921
#include <Common/typeid_cast.h>
2022

@@ -140,6 +142,12 @@ class InverseDictionaryLookupVisitor : public InDepthQueryTreeVisitorWithContext
140142
if (getSettings()[Setting::rewrite_in_to_join])
141143
return;
142144

145+
/// This rewrite turns `dictGet(...)` predicates into `IN (SELECT ... FROM dictionary(...))`.
146+
/// The `dictionary()` table function requires `CREATE TEMPORARY TABLE`; if that grant is missing,
147+
/// skip the optimization to avoid `ACCESS_DENIED`.
148+
if (!getContext()->getAccess()->isGranted(AccessType::CREATE_TEMPORARY_TABLE))
149+
return;
150+
143151
auto * node_function = node->as<FunctionNode>();
144152

145153
if (!node_function)

src/Columns/ColumnConst.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,12 @@ class ColumnConst final : public COWHelper<IColumnHelper<ColumnConst>, ColumnCon
122122
}
123123

124124
#if !defined(DEBUG_OR_SANITIZER_BUILD)
125-
void insertRangeFrom(const IColumn &, size_t /*start*/, size_t length) override
125+
void insertRangeFrom(const IColumn & src, size_t /*start*/, size_t length) override
126126
#else
127-
void doInsertRangeFrom(const IColumn &, size_t /*start*/, size_t length) override
127+
void doInsertRangeFrom(const IColumn & src, size_t /*start*/, size_t length) override
128128
#endif
129129
{
130+
chassert(!typeid_cast<const ColumnConst *>(&src) || data->compareAt(0, 0, *typeid_cast<const ColumnConst &>(src).data, -1) == 0);
130131
s += length;
131132
}
132133

0 commit comments

Comments
 (0)