Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Set for IN is not created yet' error with single value IN condition and row level security #6687

Closed
bgranvea opened this issue Aug 27, 2019 · 0 comments · Fixed by #8357
Closed
Assignees
Labels
bug Confirmed user-visible misbehaviour in official release st-accepted The issue is in our backlog, ready to take st-in-progress We are working on the issue currenlty

Comments

@bgranvea
Copy link
Contributor

Requests with "IN (single value)" criteria return an error if user has row level security restrictions.

Tested with version 19.13.3.26 (docker image)

How to reproduce:

  1. configure /etc/clickhouse-server/users.d/user.xml:
<?xml version="1.0"?>
<yandex>
    <users>
        <test>
            <profile>default</profile>
            <quota>default</quota>

            <networks replace="replace">
                <ip>::/0</ip>
            </networks>

            <password>test</password>

            <allow_databases>
                <database>default</database>
            </allow_databases>

            <databases>
                <default>
                    <test_in>
                        <filter>a = 'a'</filter>
                    </test_in>
                </default>
            </databases>
        </test>
    </users>
</yandex>
  1. create table:
create table test_in (a String,b String,c String) Engine=MergeTree order by (a,b);
insert into test_in values('a','b','c'),('aa','bb','cc');
  1. with user default:
select * from test_in where a in ('a') => works
select * from test_in where b in ('b') => works
select * from test_in where c in ('c') => works
  1. with user test:
select * from test_in where a in ('a') => error
select * from test_in where b in ('b') => error
select * from test_in where c in ('c') => works
select * from test_in where a in ('a','a') => works

Error is: 'Set for IN is not created yet.'

I cannot change the requests as they are automatically generated by Grafana.

@bgranvea bgranvea added the bug Confirmed user-visible misbehaviour in official release label Aug 27, 2019
@stale stale bot added the stale label Oct 20, 2019
@blinkov blinkov removed the stale label Oct 22, 2019
@ClickHouse ClickHouse deleted a comment from stale bot Nov 4, 2019
@alexey-milovidov alexey-milovidov added the st-accepted The issue is in our backlog, ready to take label Nov 4, 2019
@abyss7 abyss7 added st-in-progress We are working on the issue currenlty v19.13 labels Dec 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed user-visible misbehaviour in official release st-accepted The issue is in our backlog, ready to take st-in-progress We are working on the issue currenlty
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants