Bug #95987 SET key_cache_* and key_buffer_* variables fails nondeterministically
| Submitted: | 25 Jun 2019 23:21 | Modified: | 26 Jun 2019 5:56 |
|---|---|---|---|
| Reporter: | Manuel Rigger | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: Options | Severity: | S3 (Non-critical) |
| Version: | 8.0.16, 5.7.26, 5.6.44 | OS: | Ubuntu |
| Assigned to: | CPU Architecture: | x86 |
[26 Jun 2019 5:56]
MySQL Verification Team
Hello Manuel Rigger, Thank you for the report. regards, Umesh
[26 Jun 2019 5:59]
MySQL Verification Team
This can be seen with - 5.6.44, 5.7.26, 8.0.16 bin/mysqlslap --delimiter=";" --query="SET GLOBAL key_cache_division_limit = 100; SHOW errors;" --concurrency=50 --iterations=200 bin/mysqlslap: Cannot run query SET GLOBAL key_cache_division_limit = 100 ERROR : Incorrect arguments to SET
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.046 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.
Description: SET GLOBAL and SET SESSION nondeterministically fails when setting variables such as key_cache_age_threshold, key_cache_block_size, key_cache_division_limit, and key_buffer_size. For example, this is some console output that I produced when setting key_cache_division_limit: mysql> SET GLOBAL key_cache_division_limit = 100; Query OK, 0 rows affected (0.00 sec) mysql> SET GLOBAL key_cache_division_limit = 100; ERROR 1210 (HY000): Incorrect arguments to SET mysql> SET GLOBAL key_cache_division_limit = 100; Query OK, 0 rows affected (0.00 sec) mysql> SET GLOBAL key_cache_division_limit = 100; Query OK, 0 rows affected (0.00 sec) mysql> SET GLOBAL key_cache_division_limit = 100; Query OK, 0 rows affected (0.00 sec) That one of the SET GLOBAL fails is unexpected. How to repeat: SET GLOBAL key_cache_division_limit = 100; -- unexpected: ERROR 1210 (HY000): Incorrect arguments to SET To conveniently trigger the bug, the following Java program can be executed: import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import java.sql.Statement; public class TriggerSetKeyCacheDivisionLimitBug { private static final String PASSWORD = ""; private static final String USER_NAME = ""; private static final String CONNECTION_STRING = ""; public static void main(String[] args) { while (true) { try (Connection con = DriverManager.getConnection(CONNECTION_STRING, USER_NAME, PASSWORD)) { try (Statement st = con.createStatement()) { // should also work with key_cache_age_threshold, key_cache_block_size, // key_cache_division_limit and key_buffer_size global variables st.execute("SET SESSION key_cache_division_limit = 100"); st.execute("SELECT 1;"); // if the bug cannot be reproduced, try DO SLEEP(1); instead } } catch (SQLException e1) { e1.printStackTrace(); } } } }