Hi, Alexey! On Dec 06, Alexey Botchkov wrote:
revision-id: 78c093a042ccee6c7b8d11ab1b7e6069efb4af24 (mariadb-10.1.19-24-g78c093a) parent(s): 611f91605adce17df87acf96b5aede0b73d0fc12 committer: Alexey Botchkov timestamp: 2016-12-06 18:32:48 +0400 message:
MDEV-10435 crash with bad stat tables.
Functions from sql/statistics.cc don't seem to expect stat tables to fail or to have inadequate structure. Table open errors suppressed and some validity checks added.
diff --git a/sql/sql_statistics.cc b/sql/sql_statistics.cc index 27bc0fb..70d7d26 100644 --- a/sql/sql_statistics.cc +++ b/sql/sql_statistics.cc @@ -129,6 +129,137 @@ inline void init_table_list_for_single_stat_table(TABLE_LIST *tbl, }
+class Stat_table_intact : public Table_check_intact
grrr, I never understood why every user of Table_check_intact needs to create a new class. That's a lot of copy-pasting :(
+{ +public: + Stat_table_intact() {} +protected: + void report_error(uint code, const char *fmt, ...) {}
You have an empty report_error() method here. How do report errors about incorrect table definition? May be you should copy (ugh!) report_error from, say, Event_db_intact?
+};
Regards, Sergei Chief Architect MariaDB and security@mariadb.org