Details
-
Task
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
Description
MySQL/MariaDB uses the file DATADIR/dbname/db.opt to store
the database default character set and collation.
We could also store more per-database options in this file.
For example, a default storage engine would be convenient:
CREATE DATABASE db1 DEFAULT_STORAGE_ENGINE=InnoDB; |
CREATE DATABASE db2 DEFAULT_STORAGE_ENGINE=MyISAM; |
Almost all system variables that can have both global and session
scope could be set per-database.
Some useful examples:
- AUTOCOMMIT
- DATETIME_FORMAT
- DATE_FORMAT
- DEFAULT_WEEK_FORMAT
- DEFAULT_TMP_STORAGE_ENGINE
- LC_MESSAGES
- LOW_PRIORITY_UPDATES
- SQL_MODE
- TX_ISOLATION
Some global-only variables could also possibly be set per-database:
- FT_STOPWORD_FILE
- FT_QUERY_EXPANSION_LIMIT
- FT_MAX_WORD_LEN
- FT_BOOLEAN_SYNTAX
- FT_MIN_WORD_LEN
Attachments
Issue Links
- relates to
-
MDEV-307 Add functionality for database comments
- Closed