mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 09:02:00 +00:00
Merge pull request #68074 from ClickHouse/backport/24.3/67953
Backport #67953 to 24.3: Add an explicit error for `ALTER MODIFY SQL SECURITY` on non-view tables.
This commit is contained in:
commit
c6b1ccf544
@ -3108,6 +3108,10 @@ void MergeTreeData::checkAlterIsPossible(const AlterCommands & commands, Context
|
||||
throw Exception(ErrorCodes::NOT_IMPLEMENTED,
|
||||
"ALTER MODIFY REFRESH is not supported by MergeTree engines family");
|
||||
|
||||
if (command.type == AlterCommand::MODIFY_SQL_SECURITY)
|
||||
throw Exception(ErrorCodes::NOT_IMPLEMENTED,
|
||||
"ALTER MODIFY SQL SECURITY is not supported by MergeTree engines family");
|
||||
|
||||
if (command.type == AlterCommand::MODIFY_ORDER_BY && !is_custom_partitioned)
|
||||
{
|
||||
throw Exception(ErrorCodes::BAD_ARGUMENTS,
|
||||
|
@ -27,6 +27,7 @@ OK
|
||||
OK
|
||||
100
|
||||
100
|
||||
OK
|
||||
===== TestGrants =====
|
||||
OK
|
||||
OK
|
||||
|
@ -199,6 +199,8 @@ ${CLICKHOUSE_CLIENT} --user $user2 --query "INSERT INTO source SELECT * FROM gen
|
||||
${CLICKHOUSE_CLIENT} --query "SELECT count() FROM destination1"
|
||||
${CLICKHOUSE_CLIENT} --query "SELECT count() FROM destination2"
|
||||
|
||||
(( $(${CLICKHOUSE_CLIENT} --query "ALTER TABLE test_table MODIFY SQL SECURITY INVOKER" 2>&1 | grep -c "is not supported") >= 1 )) && echo "OK" || echo "UNEXPECTED"
|
||||
|
||||
echo "===== TestGrants ====="
|
||||
${CLICKHOUSE_CLIENT} --query "GRANT CREATE ON *.* TO $user1"
|
||||
${CLICKHOUSE_CLIENT} --query "GRANT SELECT ON $db.test_table TO $user1, $user2"
|
||||
|
Loading…
Reference in New Issue
Block a user