Browse Source

Extended create_and_drop_role_invalid_user_table

Added extra check for default_role column.
pull/9/head
Vicentiu Ciorbaru 12 years ago
committed by Sergei Golubchik
parent
commit
a3550feb49
  1. 7
      mysql-test/suite/roles/create_and_drop_role_invalid_user_table.result
  2. 11
      mysql-test/suite/roles/create_and_drop_role_invalid_user_table.test

7
mysql-test/suite/roles/create_and_drop_role_invalid_user_table.result

@ -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;

11
mysql-test/suite/roles/create_and_drop_role_invalid_user_table.test

@ -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;

Loading…
Cancel
Save