Files
MaxScale/maxscale-system-test/masking/masking_user/t/masking_user.test
Markus Mäkelä 52e8c08a61 Disable warnings when dropping databases
Dropping a database with DROP DATABASE ... IF NOT EXISTS will cause
warnings to be logged if it doesn't exist. The masking_user test was
missing the part that disables these warnings.
2018-05-17 09:34:01 +03:00

48 lines
1.9 KiB
Plaintext

#
# Masking User
#
# See ../masking_rules.json
--disable_warnings
drop database if exists maskingdb;
--enable_warnings
create database maskingdb;
use maskingdb;
#
# Each table contains a single column 'a' of a type subject
# to masking.
#
create table masking (a TEXT, b TEXT, c TEXT, d TEXT, e TEXT, f TEXT, g TEXT, h TEXT);
insert into masking values ("hello", "hello", "hello", "hello", "hello", "hello", "hello", "hello");
select * from masking;
# With the user skysql
#
# a: XXXXX, because the rule applies to everyone.
# b: XXXXX, because the rule specifically applies to the user 'skysql'
# c: hello, because the rule specifically applies to the user 'maxskysql'
# d: hello, because the rule specifically excludes the user 'skysql'
# e: XXXXX, because the rule applies to everyone except to the user 'maxskysql'
# f: XXXXX, because the rule applies to the user 'skysql' and 'maxskysql'
# g: hello, because the rule specifically does not apply to the users 'skysql' and 'maxskysql'
# h: XXXXX, because the rule specifically applies to the user 'skysql'
#
#a b c d e f g h
#XXXXX XXXXX hello hello XXXXX XXXXX hello XXXXX
# With the user maxskysql
#
# a: XXXXX, because the rule applies to everyone.
# b: hello, because the rule specifically applies to the user 'skysql'
# c: XXXXX, because the rule specifically applies to the user 'maxskysql'
# d: XXXXX, because the rule specifically excludes the user 'skysql'
# e: hello, because the rule applies to everyone except to the user 'maxskysql'
# f: XXXXX, because the rule applies to the user 'skysql' and 'maxskysql'
# g: hello, because the rule specifically does not apply to the users 'skysql' and 'maxskysql'
# h: XXXXX, because the rule specifically applies to the user 'skysql'
#
#a b c d e f g h
#XXXXX hello XXXXX XXXXX hello XXXXX hello hello