Commit 677c44f0 authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-10775 System table in InnoDB format allowed in MariaDB could lead to crash

when opening a system table for a SELECT-like read, pretend
(for the sake of engines) it's SQLCOM_SELECT
parent e56a5392
alter table mysql.time_zone_name engine=InnoDB;
create table envois3 (starttime datetime) engine=InnoDB;
insert envois3 values ('2008-08-11 22:43:00');
select convert_tz(starttime,'UTC','Europe/Moscow') starttime from envois3;
starttime
2008-08-12 02:43:00
drop table envois3;
alter table mysql.time_zone_name engine=MyISAM;
--source include/have_innodb.inc
#
# MDEV-10775 System table in InnoDB format allowed in MariaDB could lead to crash
#
alter table mysql.time_zone_name engine=InnoDB;
create table envois3 (starttime datetime) engine=InnoDB;
insert envois3 values ('2008-08-11 22:43:00');
--source include/restart_mysqld.inc
select convert_tz(starttime,'UTC','Europe/Moscow') starttime from envois3;
drop table envois3;
alter table mysql.time_zone_name engine=MyISAM;
......@@ -9223,6 +9223,7 @@ open_system_tables_for_read(THD *thd, TABLE_LIST *table_list,
*/
lex->reset_n_backup_query_tables_list(&query_tables_list_backup);
thd->reset_n_backup_open_tables_state(backup);
thd->lex->sql_command= SQLCOM_SELECT;
if (open_and_lock_tables(thd, table_list, FALSE,
MYSQL_OPEN_IGNORE_FLUSH |
......
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