v.21.6Improvement

Allow Empty String for MySQL Database Name to Use Default Database

Allow user to specify empty string instead of database name for MySQL storage. Default database will be used for queries. In previous versions it was working for SELECT queries and not support for INSERT was also added. This closes #19281. This can be useful working with Sphinx or other MySQL-compatible foreign databases. #23319 (alexey-milovidov).
Allows users to specify an empty string instead of a database name for MySQL storage, enabling the use of the default database for queries.

Why it matters

This feature addresses the limitation where previously only SELECT queries supported empty database names, and INSERT queries did not. It provides better compatibility and flexibility when working with MySQL-compatible foreign databases like Sphinx by simplifying query management when the default database should be used.

How to use it

When defining a MySQL foreign table, specify an empty string as the database name to make queries operate on the default database. This applies automatically to both SELECT and INSERT operations.