mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 08:02:02 +00:00
Merge branch 'readonly-settings-allow' of github.com:ClickHouse/ClickHouse into readonly-settings-allow
This commit is contained in:
commit
a960fdea89
@ -93,7 +93,7 @@ def test_alter():
|
||||
instance.query("GRANT SELECT ON mydb.mytable TO u1")
|
||||
instance.query("GRANT SELECT ON mydb.* TO rx WITH GRANT OPTION")
|
||||
instance.query(
|
||||
"ALTER SETTINGS PROFILE s1 SETTINGS max_memory_usage = 987654321 READONLY"
|
||||
"ALTER SETTINGS PROFILE s1 SETTINGS max_memory_usage = 987654321 CONST"
|
||||
)
|
||||
|
||||
def check():
|
||||
@ -124,7 +124,7 @@ def test_alter():
|
||||
)
|
||||
assert (
|
||||
instance.query("SHOW CREATE SETTINGS PROFILE s1")
|
||||
== "CREATE SETTINGS PROFILE s1 SETTINGS max_memory_usage = 987654321 READONLY\n"
|
||||
== "CREATE SETTINGS PROFILE s1 SETTINGS max_memory_usage = 987654321 CONST\n"
|
||||
)
|
||||
assert (
|
||||
instance.query("SHOW CREATE SETTINGS PROFILE s2")
|
||||
|
@ -58,9 +58,9 @@ CREATE USER u2_01292 SETTINGS PROFILE default
|
||||
CREATE USER u3_01292 SETTINGS max_memory_usage = 5000000
|
||||
CREATE USER u4_01292 SETTINGS max_memory_usage MIN 5000000
|
||||
CREATE USER u5_01292 SETTINGS max_memory_usage MAX 5000000
|
||||
CREATE USER u6_01292 SETTINGS max_memory_usage READONLY
|
||||
CREATE USER u6_01292 SETTINGS max_memory_usage CONST
|
||||
CREATE USER u7_01292 SETTINGS max_memory_usage WRITABLE
|
||||
CREATE USER u8_01292 SETTINGS max_memory_usage = 5000000 MIN 4000000 MAX 6000000 READONLY
|
||||
CREATE USER u8_01292 SETTINGS max_memory_usage = 5000000 MIN 4000000 MAX 6000000 CONST
|
||||
CREATE USER u9_01292 SETTINGS PROFILE default, max_memory_usage = 5000000 WRITABLE
|
||||
CREATE USER u1_01292 SETTINGS readonly = 1
|
||||
CREATE USER u2_01292 SETTINGS readonly = 1
|
||||
|
@ -122,9 +122,9 @@ CREATE USER u2_01292 SETTINGS PROFILE 'default';
|
||||
CREATE USER u3_01292 SETTINGS max_memory_usage=5000000;
|
||||
CREATE USER u4_01292 SETTINGS max_memory_usage MIN=5000000;
|
||||
CREATE USER u5_01292 SETTINGS max_memory_usage MAX=5000000;
|
||||
CREATE USER u6_01292 SETTINGS max_memory_usage READONLY;
|
||||
CREATE USER u6_01292 SETTINGS max_memory_usage CONST;
|
||||
CREATE USER u7_01292 SETTINGS max_memory_usage WRITABLE;
|
||||
CREATE USER u8_01292 SETTINGS max_memory_usage=5000000 MIN 4000000 MAX 6000000 READONLY;
|
||||
CREATE USER u8_01292 SETTINGS max_memory_usage=5000000 MIN 4000000 MAX 6000000 CONST;
|
||||
CREATE USER u9_01292 SETTINGS PROFILE 'default', max_memory_usage=5000000 WRITABLE;
|
||||
SHOW CREATE USER u1_01292;
|
||||
SHOW CREATE USER u2_01292;
|
||||
|
@ -15,9 +15,9 @@ CREATE ROLE r2_01293 SETTINGS PROFILE default
|
||||
CREATE ROLE r3_01293 SETTINGS max_memory_usage = 5000000
|
||||
CREATE ROLE r4_01293 SETTINGS max_memory_usage MIN 5000000
|
||||
CREATE ROLE r5_01293 SETTINGS max_memory_usage MAX 5000000
|
||||
CREATE ROLE r6_01293 SETTINGS max_memory_usage READONLY
|
||||
CREATE ROLE r6_01293 SETTINGS max_memory_usage CONST
|
||||
CREATE ROLE r7_01293 SETTINGS max_memory_usage WRITABLE
|
||||
CREATE ROLE r8_01293 SETTINGS max_memory_usage = 5000000 MIN 4000000 MAX 6000000 READONLY
|
||||
CREATE ROLE r8_01293 SETTINGS max_memory_usage = 5000000 MIN 4000000 MAX 6000000 CONST
|
||||
CREATE ROLE r9_01293 SETTINGS PROFILE default, max_memory_usage = 5000000 WRITABLE
|
||||
CREATE ROLE r1_01293 SETTINGS readonly = 1
|
||||
CREATE ROLE r2_01293 SETTINGS readonly = 1
|
||||
|
@ -31,9 +31,9 @@ CREATE ROLE r2_01293 SETTINGS PROFILE 'default';
|
||||
CREATE ROLE r3_01293 SETTINGS max_memory_usage=5000000;
|
||||
CREATE ROLE r4_01293 SETTINGS max_memory_usage MIN=5000000;
|
||||
CREATE ROLE r5_01293 SETTINGS max_memory_usage MAX=5000000;
|
||||
CREATE ROLE r6_01293 SETTINGS max_memory_usage READONLY;
|
||||
CREATE ROLE r6_01293 SETTINGS max_memory_usage CONST;
|
||||
CREATE ROLE r7_01293 SETTINGS max_memory_usage WRITABLE;
|
||||
CREATE ROLE r8_01293 SETTINGS max_memory_usage=5000000 MIN 4000000 MAX 6000000 READONLY;
|
||||
CREATE ROLE r8_01293 SETTINGS max_memory_usage=5000000 MIN 4000000 MAX 6000000 CONST;
|
||||
CREATE ROLE r9_01293 SETTINGS PROFILE 'default', max_memory_usage=5000000 WRITABLE;
|
||||
SHOW CREATE ROLE r1_01293;
|
||||
SHOW CREATE ROLE r2_01293;
|
||||
|
@ -11,9 +11,9 @@ CREATE SETTINGS PROFILE s2_01294 SETTINGS INHERIT default
|
||||
CREATE SETTINGS PROFILE s3_01294 SETTINGS max_memory_usage = 5000000
|
||||
CREATE SETTINGS PROFILE s4_01294 SETTINGS max_memory_usage MIN 5000000
|
||||
CREATE SETTINGS PROFILE s5_01294 SETTINGS max_memory_usage MAX 5000000
|
||||
CREATE SETTINGS PROFILE s6_01294 SETTINGS max_memory_usage READONLY
|
||||
CREATE SETTINGS PROFILE s6_01294 SETTINGS max_memory_usage CONST
|
||||
CREATE SETTINGS PROFILE s7_01294 SETTINGS max_memory_usage WRITABLE
|
||||
CREATE SETTINGS PROFILE s8_01294 SETTINGS max_memory_usage = 5000000 MIN 4000000 MAX 6000000 READONLY
|
||||
CREATE SETTINGS PROFILE s8_01294 SETTINGS max_memory_usage = 5000000 MIN 4000000 MAX 6000000 CONST
|
||||
CREATE SETTINGS PROFILE s9_01294 SETTINGS INHERIT default, max_memory_usage = 5000000 WRITABLE
|
||||
CREATE SETTINGS PROFILE s10_01294 SETTINGS INHERIT s1_01294, INHERIT s3_01294, INHERIT default, readonly = 0, max_memory_usage MAX 6000000
|
||||
CREATE SETTINGS PROFILE s1_01294 SETTINGS readonly = 0
|
||||
@ -47,11 +47,11 @@ CREATE SETTINGS PROFILE s3_01294 TO r1_01294
|
||||
CREATE SETTINGS PROFILE s4_01294 TO r1_01294
|
||||
-- readonly ambiguity
|
||||
CREATE SETTINGS PROFILE s1_01294 SETTINGS readonly = 1
|
||||
CREATE SETTINGS PROFILE s2_01294 SETTINGS readonly READONLY
|
||||
CREATE SETTINGS PROFILE s2_01294 SETTINGS readonly CONST
|
||||
CREATE SETTINGS PROFILE s3_01294 SETTINGS INHERIT readonly
|
||||
CREATE SETTINGS PROFILE s4_01294 SETTINGS INHERIT readonly, INHERIT readonly
|
||||
CREATE SETTINGS PROFILE s5_01294 SETTINGS INHERIT readonly, readonly = 1
|
||||
CREATE SETTINGS PROFILE s6_01294 SETTINGS INHERIT readonly, readonly READONLY
|
||||
CREATE SETTINGS PROFILE s6_01294 SETTINGS INHERIT readonly, readonly CONST
|
||||
-- system.settings_profiles
|
||||
s1_01294 local directory 0 0 [] []
|
||||
s2_01294 local directory 1 0 ['r1_01294'] []
|
||||
|
@ -25,9 +25,9 @@ CREATE PROFILE s2_01294 SETTINGS INHERIT 'default';
|
||||
CREATE PROFILE s3_01294 SETTINGS max_memory_usage=5000000;
|
||||
CREATE PROFILE s4_01294 SETTINGS max_memory_usage MIN=5000000;
|
||||
CREATE PROFILE s5_01294 SETTINGS max_memory_usage MAX=5000000;
|
||||
CREATE PROFILE s6_01294 SETTINGS max_memory_usage READONLY;
|
||||
CREATE PROFILE s6_01294 SETTINGS max_memory_usage CONST;
|
||||
CREATE PROFILE s7_01294 SETTINGS max_memory_usage WRITABLE;
|
||||
CREATE PROFILE s8_01294 SETTINGS max_memory_usage=5000000 MIN 4000000 MAX 6000000 READONLY;
|
||||
CREATE PROFILE s8_01294 SETTINGS max_memory_usage=5000000 MIN 4000000 MAX 6000000 CONST;
|
||||
CREATE PROFILE s9_01294 SETTINGS INHERIT 'default', max_memory_usage=5000000 WRITABLE;
|
||||
CREATE PROFILE s10_01294 SETTINGS INHERIT s1_01294, s3_01294, INHERIT default, readonly=0, max_memory_usage MAX 6000000;
|
||||
SHOW CREATE PROFILE s1_01294;
|
||||
@ -106,7 +106,7 @@ DROP PROFILE s1_01294, s2_01294, s3_01294, s4_01294, s5_01294, s6_01294;
|
||||
SELECT '-- system.settings_profiles';
|
||||
CREATE PROFILE s1_01294;
|
||||
CREATE PROFILE s2_01294 SETTINGS readonly=0 TO r1_01294;;
|
||||
CREATE PROFILE s3_01294 SETTINGS max_memory_usage=5000000 MIN 4000000 MAX 6000000 READONLY TO r1_01294;
|
||||
CREATE PROFILE s3_01294 SETTINGS max_memory_usage=5000000 MIN 4000000 MAX 6000000 CONST TO r1_01294;
|
||||
CREATE PROFILE s4_01294 SETTINGS max_memory_usage=5000000 TO r1_01294;
|
||||
CREATE PROFILE s5_01294 SETTINGS INHERIT default, readonly=0, max_memory_usage MAX 6000000 WRITABLE TO u1_01294;
|
||||
CREATE PROFILE s6_01294 TO ALL EXCEPT u1_01294, r1_01294;
|
||||
|
Loading…
Reference in New Issue
Block a user