v.24.6New Feature
Add server settings to limit databases and tables on CREATE queries
Add server settingsmax_table_num_to_throwandmax_database_num_to_throwto limit the number of databases or tables onCREATEqueries. #64781 (Xu Jia).
Why it matters
These settings help prevent excessive creation of tables or databases in a singleCREATE operation, enhancing server stability and controlling resource usage by throwing an error when limits are exceeded.How to use it
Set the desired limits by configuring the server settingsmax_table_num_to_throw and max_database_num_to_throw in the server configuration files or via SET commands before running CREATE queries. When the number of tables or databases created exceeds these limits, the query will be rejected with an error.