mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 04:22:27 +01:00
de469a2f29
Similar to the tables SYS_FOREIGN and SYS_FOREIGN_COLS, the tables mysql.innodb_table_stats and mysql.innodb_index_stats are updated by the InnoDB internal SQL parser, which fails to enforce the size limits of the data. Due to this, it is possible for InnoDB to hang when there are persistent statistics defined on partitioned tables where the total length of table name, partition name and subpartition name exceeds the incorrectly defined limit VARCHAR(64). That column should have been defined as VARCHAR(199). btr_node_ptr_max_size(): Interpret the VARCHAR(64) as VARCHAR(199), to prevent a hang in the case that the upgrade script has not been run. dict_table_schema_check(): Ignore difference in the length of the table_name column. ha_innobase::max_supported_key_length(): For innodb_page_size=4k, return a larger value so that the table mysql.innodb_index_stats can be created. This could allow "impossible" tables to be created, such that it is not possible to insert anything into a secondary index when both the secondary key and the primary key are long, but this is the easiest and most consistent way. The Oracle fix would only ignore the maximum length violation for the two statistics tables. os_file_get_status_posix(), os_file_get_status_win32(): Handle ENAMETOOLONG as well. This patch is based on the following change in MySQL 5.7.23. Not all changes were applied, and our variant allows persistent statistics to work without hangs even if the table definitions were not upgraded. From fdbdce701ab8145ae234c9d401109dff4e4106cb Mon Sep 17 00:00:00 2001 From: Aditya A <aditya.a@oracle.com> Date: Thu, 17 May 2018 16:11:43 +0530 Subject: [PATCH] Bug #26390736 THE FIELD TABLE_NAME (VARCHAR(64)) FROM MYSQL.INNODB_TABLE_STATS CAN OVERFLOW. In mysql.innodb_index_stats and mysql.innodb_table_stats tables the table name column didn't take into consideration partition names which can be more than varchar(64). |
||
---|---|---|
.. | ||
bitdata | ||
cursors | ||
datadict | ||
include | ||
lib | ||
r | ||
storedproc | ||
t | ||
triggers | ||
views | ||
disabled.def | ||
README.txt |
2008-02-29 Matthias Leich ========================= 1. The testsuite "funcs_1" is mostly intended for additional (compared to the common regression tests stored in mysql-test/t) checks of features (VIEWS, INFORMATION_SCHEMA, STORED PROCEDURES,...) introduced with MySQL 5.0. 2. There were some extensions of this suite when new information_schema views were introduced. But in most cases the tests for these views were stored within the regression testsuite (mysql-test/t). INFORMATION_SCHEMA views introduced with MySQL 5.1 ================================================== ENGINES (partially tested here) EVENTS (partially tested here) FILES GLOBAL_STATUS GLOBAL_VARIABLES PARTITIONS PLUGINS PROCESSLIST (full tested here) PROFILING REFERENTIAL_CONSTRAINTS SESSION_STATUS SESSION_VARIABLES 3. Some hints for maintainers of this suite: - SHOW TABLES ... LIKE '<pattern>' does a case sensitive comparison between the tablename and the pattern. The names of the tables within the informationschema are in uppercase. So please use something like SHOW TABLES FOR information_schema LIKE 'TABLES' when you intend to get the same non empty result set on OS with and without case sensitive filesystems and default configuration. - The name of the data dictionary is 'information_schema' (lowercase). - Server on OS with filesystem with case sensitive filenames (= The files 'abc' and 'Abc' can coexist.) + default configuration Example of behaviour: DROP DATABASE information_schema; ERROR 42000: Access denied for user ... to database 'information_schema' DROP DATABASE INFORMATION_SCHEMA; ERROR 42000: Access denied for user ... to database 'INFORMATION_SCHEMA' - Try to unify results by --replace_result $engine_type <engine_to_be_tested> if we could expect that the results for storage engine variants of a test differ only in the engine names. This makes future maintenance easier. - Avoid the use of include/show_msg*.inc. They produce "SQL" noise which annoys during server debugging and can be easy replaced by "--echo ...".