Test 01294_create_settings_profile no longer changes settings of the default user.

This commit is contained in:
Vitaly Baranov 2021-04-05 13:28:39 +03:00
parent 2162a19d35
commit 278ad443e4
2 changed files with 12 additions and 5 deletions

View File

@ -38,8 +38,12 @@ CREATE SETTINGS PROFILE s2_01294 SETTINGS max_memory_usage = 5000000
CREATE SETTINGS PROFILE s3_01294 TO ALL
CREATE SETTINGS PROFILE s4_01294 TO ALL
CREATE SETTINGS PROFILE s1_01294 SETTINGS max_memory_usage = 6000000
CREATE SETTINGS PROFILE s2_01294 SETTINGS max_memory_usage = 6000000
CREATE SETTINGS PROFILE s3_01294 TO ALL
CREATE SETTINGS PROFILE s4_01294 TO ALL
CREATE SETTINGS PROFILE s1_01294 SETTINGS max_memory_usage = 6000000
CREATE SETTINGS PROFILE s2_01294 SETTINGS max_memory_usage = 6000000 TO r1_01294
CREATE SETTINGS PROFILE s3_01294 SETTINGS max_memory_usage = 6000000 TO r1_01294
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
@ -53,7 +57,8 @@ s1_01294 local directory 0 0 [] []
s2_01294 local directory 1 0 ['r1_01294'] []
s3_01294 local directory 1 0 ['r1_01294'] []
s4_01294 local directory 1 0 ['r1_01294'] []
s5_01294 local directory 3 1 [] ['r1_01294']
s5_01294 local directory 3 0 ['u1_01294'] []
s6_01294 local directory 0 1 [] ['r1_01294','u1_01294']
-- system.settings_profile_elements
s2_01294 \N \N 0 readonly 0 \N \N \N \N
s3_01294 \N \N 0 max_memory_usage 5000000 4000000 6000000 1 \N

View File

@ -82,7 +82,8 @@ SELECT '-- multiple profiles in one command';
CREATE PROFILE s1_01294, s2_01294 SETTINGS max_memory_usage=5000000;
CREATE PROFILE s3_01294, s4_01294 TO ALL;
SHOW CREATE PROFILE s1_01294, s2_01294, s3_01294, s4_01294;
ALTER PROFILE s1_01294, s2_01294, s3_01294 SETTINGS max_memory_usage=6000000;
ALTER PROFILE s1_01294, s2_01294 SETTINGS max_memory_usage=6000000;
SHOW CREATE PROFILE s1_01294, s2_01294, s3_01294, s4_01294;
ALTER PROFILE s2_01294, s3_01294, s4_01294 TO r1_01294;
SHOW CREATE PROFILE s1_01294, s2_01294, s3_01294, s4_01294;
DROP PROFILE s1_01294, s2_01294, s3_01294, s4_01294;
@ -107,12 +108,13 @@ 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 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 ALL EXCEPT 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;
SELECT name, storage, num_elements, apply_to_all, apply_to_list, apply_to_except FROM system.settings_profiles WHERE name LIKE 's%\_01294' ORDER BY name;
SELECT '-- system.settings_profile_elements';
SELECT * FROM system.settings_profile_elements WHERE profile_name LIKE 's%\_01294' ORDER BY profile_name, index;
DROP PROFILE s1_01294, s2_01294, s3_01294, s4_01294, s5_01294;
DROP PROFILE s1_01294, s2_01294, s3_01294, s4_01294, s5_01294, s6_01294;
DROP ROLE r1_01294;
DROP USER u1_01294;