v.24.6New Feature

Add server settings to limit databases and tables on CREATE queries

Add server settings max_table_num_to_throw and max_database_num_to_throw to limit the number of databases or tables on CREATE queries. #64781 (Xu Jia).
Added new server settings max_table_num_to_throw and max_database_num_to_throw to limit the number of tables or databases allowed in CREATE queries.

Why it matters

These settings help prevent excessive creation of tables or databases in a single CREATE 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 settings max_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.