MXS-2396 Reject use of masked var in variable definition

E.g.

   set @a = (SELECT fld FROM table);

will be rejected if 'fld' is a field that should be masked.
This commit is contained in:
Johan Wikman
2019-03-20 13:37:47 +02:00
parent eb0f3ebe81
commit 9b27d7f24b
3 changed files with 57 additions and 3 deletions

View File

@ -106,6 +106,10 @@ void run(TestConnections& test)
// This should NOT succeed as a function is used with a masked column
// in a binary prepared statement.
test_one_ps(test, "SELECT LENGTH(a), b FROM masking_auto_firewall", Expect::FAILURE);
// This should NOT succeed as a masked column is used in a statement
// defining a variable.
test_one(test, "set @a = (SELECT a, b FROM masking_auto_firewall)", Expect::FAILURE);
}
}