Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Testing Windows bb with skip-name-resolve
- Loading branch information
Showing
3 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
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 @@ | ||
| --skip-name-resolve |
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,22 @@ | ||
| # Verify anonymous user on Windows is not 'Administrator' | ||
| # | ||
| # Test of anonymous user connection | ||
| -------------------------------------------------------------- | ||
| create role test_role; | ||
| grant test_role to ''@localhost; | ||
| connect con1,localhost,'',,,$MASTER_MYPORT; | ||
| SELECT CURRENT_ROLE; | ||
| CURRENT_ROLE | ||
| NULL | ||
| SET role test_role; | ||
| SELECT CURRENT_ROLE; | ||
| CURRENT_ROLE | ||
| test_role | ||
| SET role new_role; | ||
| ERROR OP000: Invalid role specification `new_role` | ||
| set default role test_role for ''@localhost; | ||
| ERROR 42000: You are using MariaDB as an anonymous user and anonymous users are not allowed to modify user settings | ||
| connection default; | ||
| disconnect con1; | ||
| REVOKE all privileges, grant option from ''@localhost; | ||
| drop role test_role; |
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,24 @@ | ||
| --echo # Verify anonymous user on Windows is not 'Administrator' | ||
| --echo # | ||
| --echo # Test of anonymous user connection | ||
| --echo -------------------------------------------------------------- | ||
| --source include/add_anonymous_users.inc | ||
|
|
||
| create role test_role; | ||
| grant test_role to ''@localhost; | ||
|
|
||
| connect(con1,localhost,'',,,$MASTER_MYPORT); | ||
| SELECT CURRENT_ROLE; | ||
| SET role test_role; | ||
| SELECT CURRENT_ROLE; | ||
| # user cannot set subset role, since it is not granted explicitly | ||
| --error ER_INVALID_ROLE | ||
| SET role new_role; | ||
| --error ER_PASSWORD_ANONYMOUS_USER | ||
| set default role test_role for ''@localhost; | ||
|
|
||
| connection default; | ||
| disconnect con1; | ||
| REVOKE all privileges, grant option from ''@localhost; | ||
| --source include/delete_anonymous_users.inc | ||
| drop role test_role; |