-
-
Notifications
You must be signed in to change notification settings - Fork 521
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
Branch-qualified DSN gets different branch permissions #8623
Comments
The exact details are mentioned in the linked PR. There was a bug with where INSERT INTO t.dolt_branch_control (`database`, `branch`, `user`, `host`, `permissions`) VALUES ('t', 'task%', 'ttask', '%', 'admin'); was being considered a subset of the default entry, which is:
It's not a subset since |
I forgot that default permission! Actually I delete it before the test is run (unless it's a rule that cannot be seen in Here's some additional test setup and what DELETE FROM dolt_branch_namespace_control WHERE true;
DELETE FROM dolt_branch_control WHERE true;
DROP USER IF EXISTS 'tadmin'@'%';
DROP USER IF EXISTS 'ttask'@'%';
DROP DATABASE IF EXISTS t;
SELECT * FROM mysql.user;
Here's the result of CREATE DATABASE t;
CREATE USER 'ttask'@'%' IDENTIFIED BY 't';
GRANT ALL ON t.* TO 'ttask'@'%';
INSERT INTO t.dolt_branch_control (`database`, `branch`, `user`, `host`, `permissions`) VALUES ('t', 'task%', 'ttask', '%', 'admin');
USE t;
CALL DOLT_BRANCH('task_feature');
select * from dolt_branch_control;
I also forgot that the permission is added to But in that case I don't understand why I can connect as |
Thank you for that additional information! My initial testing seemed to point to that insertion failing, but this points to a potentially different issue that I need to investigate. |
I'm glad you provided that extra detail, as it uncovered another bug (and the actual one you were running into)! I put out another PR with the fix for that. |
Version: 1.43.19.
Setup:
Connect with "/t" in DSN:
Connect with "/t/task_feature" in DSN:
The text was updated successfully, but these errors were encountered: