#
# Masking User
#
# See ../masking_rules.json

drop database if exists maskingdb;

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
