Commit a3550feb authored by Vicentiu Ciorbaru's avatar Vicentiu Ciorbaru Committed by Sergei Golubchik

Extended create_and_drop_role_invalid_user_table

Added extra check for default_role column.
parent 52989961
...@@ -9,6 +9,13 @@ ERROR HY000: Operation DROP ROLE failed for 'test_role' ...@@ -9,6 +9,13 @@ ERROR HY000: Operation DROP ROLE failed for 'test_role'
alter table user add column is_role enum('N', 'Y') default 'N' not null alter table user add column is_role enum('N', 'Y') default 'N' not null
COLLATE utf8_general_ci COLLATE utf8_general_ci
after password_expired; after password_expired;
create role test_role;
create user test_user@localhost;
grant test_role to test_user@localhost;
set default role test_role for root@localhost;
ERROR HY000: Column count of mysql.user is wrong. Expected 45, found 44. Created with MariaDB MYSQL_VERSION_ID, now running MYSQL_VERSION_ID. Please use mysql_upgrade to fix this error.
drop role test_role;
drop user test_user@localhost;
alter table user add column default_role char(80) binary default '' not null alter table user add column default_role char(80) binary default '' not null
COLLATE utf8_general_ci COLLATE utf8_general_ci
after is_role; after is_role;
......
...@@ -16,6 +16,17 @@ drop role test_role; ...@@ -16,6 +16,17 @@ drop role test_role;
alter table user add column is_role enum('N', 'Y') default 'N' not null alter table user add column is_role enum('N', 'Y') default 'N' not null
COLLATE utf8_general_ci COLLATE utf8_general_ci
after password_expired; after password_expired;
# Test default role column
create role test_role;
create user test_user@localhost;
grant test_role to test_user@localhost;
--replace_regex /10\d\d\d\d/MYSQL_VERSION_ID/
--error ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE
set default role test_role for root@localhost;
drop role test_role;
drop user test_user@localhost;
alter table user add column default_role char(80) binary default '' not null alter table user add column default_role char(80) binary default '' not null
COLLATE utf8_general_ci COLLATE utf8_general_ci
after is_role; after is_role;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment