mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Add an explicit error for ALTER MODIFY SQL SECURITY
on non-view tables.
This commit is contained in:
parent
0aed98f3f0
commit
2a5a8f15f4
@ -3348,6 +3348,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