forked from ClickHouse/ClickHouse
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
row_policy_template - test for asterisk table in a dedicated file
- Loading branch information
Showing
4 changed files
with
13 additions
and
12 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
tests/queries/0_stateless/02703_row_policies_for_asterisk.reference
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Policy for table `*` does not affect other tables in the database | ||
other 100 20 |
11 changes: 11 additions & 0 deletions
11
tests/queries/0_stateless/02703_row_policies_for_asterisk.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
-- Tags: no-parallel | ||
|
||
SELECT 'Policy for table `*` does not affect other tables in the database'; | ||
CREATE DATABASE 02703_db_asterisk; | ||
CREATE ROW POLICY 02703_asterisk ON 02703_db_asterisk.`*` USING x=1 AS permissive TO ALL; | ||
CREATE TABLE 02703_db_asterisk.`*` (x UInt8, y UInt8) ENGINE = MergeTree ORDER BY x AS SELECT 100, 20; | ||
CREATE TABLE 02703_db_asterisk.`other` (x UInt8, y UInt8) ENGINE = MergeTree ORDER BY x AS SELECT 100, 20; | ||
SELECT 'star', * FROM 02703_db_asterisk.`*`; | ||
SELECT 'other', * FROM 02703_db_asterisk.other; | ||
DROP ROW POLICY 02703_asterisk ON 02703_db_asterisk.`*`; | ||
DROP DATABASE 02703_db_asterisk; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters