1+ #
2+ # MDEV-20257 Server crashes in Grant_table_base::init_read_record upon crash-upgrade
3+ #
14call mtr.add_suppression("mysql.user");
25# switching from mysql.global_priv to mysql.user
36flush tables;
@@ -7,3 +10,99 @@ Error 145 Got error '145 "Table was marked as crashed and should be repaired"' f
710Warning 1034 12544 clients are using or haven't closed the table properly
811Note 1034 Table is fixed
912# switching back from mysql.user to mysql.global_priv
13+ #
14+ # MDEV-28128 SIGSEGV in replace_column_table on GRANT
15+ #
16+ call mtr.add_suppression("The table is probably corrupted");
17+ create user a@localhost;
18+ rename table mysql.columns_priv to mysql.columns_priv_bak;
19+ create table mysql.columns_priv select * from mysql.columns_priv_bak;
20+ create table t (c int);
21+ grant update (c) on t to a@localhost;
22+ ERROR HY000: Cannot load from mysql.columns_priv. The table is probably corrupted
23+ drop table t;
24+ drop table mysql.columns_priv;
25+ rename table mysql.columns_priv_bak to mysql.columns_priv;
26+ drop user a@localhost;
27+ #
28+ # MDEV-23731 SIGSEGV in replace_user_table when changing mysql db tables
29+ #
30+ rename table mysql.global_priv to mysql.global_priv_bak;
31+ rename table mysql.user to mysql.user_bak;
32+ create table mysql.user (host char(100), user char(100)) engine=merge;
33+ alter user 'a' identified by '';
34+ ERROR HY000: Cannot load from mysql.user. The table is probably corrupted
35+ drop table mysql.user;
36+ rename table mysql.global_priv_bak to mysql.global_priv;
37+ rename table mysql.user_bak to mysql.user;
38+ #
39+ # MDEV-24206 SIGSEGV in replace_db_table on GRANT
40+ #
41+ rename table mysql.db to mysql.db_bak;
42+ create table mysql.db engine=memory select * from mysql.db_bak;
43+ grant select on mysql.* to 'a'@'a' identified by 'a';
44+ ERROR HY000: Cannot load from mysql.db. The table is probably corrupted
45+ drop table mysql.db;
46+ rename table mysql.db_bak to mysql.db;
47+ #
48+ # MDEV-24814 SIGSEGV in replace_table_table on GRANT
49+ #
50+ create user m@localhost;
51+ rename table mysql.tables_priv to mysql.tables_priv_bak;
52+ create table t (c int);
53+ create table mysql.tables_priv select * from mysql.tables_priv_bak;
54+ grant select on t to m@localhost;
55+ ERROR HY000: Cannot load from mysql.tables_priv. The table is probably corrupted
56+ drop table mysql.tables_priv;
57+ rename table mysql.tables_priv_bak to mysql.tables_priv;
58+ drop user m@localhost;
59+ drop table t;
60+ #
61+ # MDEV-27842 SIGSEGV in replace_routine_table on GRANT
62+ #
63+ create user a@b;
64+ set global log_bin_trust_function_creators=1;
65+ rename table mysql.procs_priv to mysql.procs_priv_bak;
66+ create table mysql.procs_priv (dummy int);
67+ create function f() returns int return (select 1 t);
68+ grant execute on function f to a@b;
69+ ERROR HY000: Cannot load from mysql.procs_priv. The table is probably corrupted
70+ drop table mysql.procs_priv;
71+ rename table mysql.procs_priv_bak to mysql.procs_priv;
72+ drop function f;
73+ drop user a@b;
74+ #
75+ # MDEV-27893 SIGSEGV in replace_proxies_priv_table on GRANT PROXY
76+ #
77+ rename table mysql.proxies_priv to mysql.proxies_priv_bak;
78+ create table mysql.proxies_priv select * from mysql.proxies_priv_bak;
79+ grant proxy on grant_plug to grant_plug_dest;
80+ ERROR HY000: Cannot load from mysql.proxies_priv. The table is probably corrupted
81+ drop table mysql.proxies_priv;
82+ rename table mysql.proxies_priv_bak to mysql.proxies_priv;
83+ #
84+ # MDEV-28773 SIGSEGV in TABLE::use_all_columns, replace_roles_mapping_table
85+ #
86+ rename table mysql.roles_mapping to mysql.roles_mapping_bak;
87+ create role r1;
88+ drop role r1;
89+ rename table mysql.roles_mapping_bak to mysql.roles_mapping;
90+ #
91+ # MDEV-35622 SEGV, ASAN use-after-poison when reading system table with less than expected number of columns
92+ #
93+ call mtr.add_suppression("mysql.servers");
94+ alter table mysql.servers drop column owner;
95+ insert into mysql.servers values(0,0,0,0,0,0,0,0,0);
96+ flush privileges;
97+ ERROR HY000: Cannot load from mysql.servers. The table is probably corrupted
98+ alter table mysql.servers add column Owner varchar(512) not null default '';
99+ #
100+ # MDEV-28482 SIGSEGV in get_access_value_from_val_int
101+ #
102+ create temporary table t1 select * from mysql.tables_priv;
103+ alter table mysql.tables_priv drop column timestamp;
104+ flush privileges;
105+ ERROR HY000: Cannot load from mysql.tables_priv. The table is probably corrupted
106+ alter table mysql.tables_priv add column Timestamp timestamp not null default now() on update now() after grantor;
107+ replace mysql.tables_priv select * from t1;
108+ # End of 10.11 tests
0 commit comments