mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
The existing syntax for CREATE SERVER CREATE [OR REPLACE] SERVER [IF NOT EXISTS] server_name FOREIGN DATA WRAPPER wrapper_name OPTIONS (option [, option] ...) option: { HOST character-literal | DATABASE character-literal | USER character-literal | PASSWORD character-literal | SOCKET character-literal | OWNER character-literal | PORT numeric-literal } With this change we have: option: { HOST character-literal | DATABASE character-literal | USER character-literal | PASSWORD character-literal | SOCKET character-literal | OWNER character-literal | PORT numeric-literal | PORT quoted-numerical-literal | identifier character-literal} We store these options as a JSON field in the mysql.servers system table. We retain the restriction that PORT needs to be a number, but also allow it to be a quoted number, so that SHOW CREATE SERVER can be used for dumping. Without an accompanied implementation of SHOW CREATE SERVER, some mysqldump tests will fail. Therefore this commit should be immediately followed by the one implementating SHOW CREATE SERVER, with testing covering both.
53 lines
2.3 KiB
Plaintext
53 lines
2.3 KiB
Plaintext
DROP DATABASE IF EXISTS db_datadict;
|
|
CREATE DATABASE db_datadict;
|
|
DROP USER testuser1@localhost;
|
|
CREATE USER testuser1@localhost;
|
|
GRANT SELECT ON db_datadict.* TO testuser1@localhost;
|
|
SELECT * FROM information_schema.table_constraints
|
|
WHERE table_schema = 'mysql'
|
|
ORDER BY table_schema,table_name,constraint_name;
|
|
CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE
|
|
def mysql PRIMARY mysql columns_priv PRIMARY KEY
|
|
def mysql PRIMARY mysql column_stats PRIMARY KEY
|
|
def mysql PRIMARY mysql db PRIMARY KEY
|
|
def mysql PRIMARY mysql event PRIMARY KEY
|
|
def mysql PRIMARY mysql func PRIMARY KEY
|
|
def mysql PRIMARY mysql global_priv PRIMARY KEY
|
|
def mysql Priv mysql global_priv CHECK
|
|
def mysql PRIMARY mysql gtid_slave_pos PRIMARY KEY
|
|
def mysql name mysql help_category UNIQUE
|
|
def mysql PRIMARY mysql help_category PRIMARY KEY
|
|
def mysql name mysql help_keyword UNIQUE
|
|
def mysql PRIMARY mysql help_keyword PRIMARY KEY
|
|
def mysql PRIMARY mysql help_relation PRIMARY KEY
|
|
def mysql name mysql help_topic UNIQUE
|
|
def mysql PRIMARY mysql help_topic PRIMARY KEY
|
|
def mysql PRIMARY mysql index_stats PRIMARY KEY
|
|
def mysql PRIMARY mysql innodb_index_stats PRIMARY KEY
|
|
def mysql PRIMARY mysql innodb_table_stats PRIMARY KEY
|
|
def mysql PRIMARY mysql plugin PRIMARY KEY
|
|
def mysql PRIMARY mysql proc PRIMARY KEY
|
|
def mysql PRIMARY mysql procs_priv PRIMARY KEY
|
|
def mysql PRIMARY mysql proxies_priv PRIMARY KEY
|
|
def mysql Host mysql roles_mapping UNIQUE
|
|
def mysql Options mysql servers CHECK
|
|
def mysql PRIMARY mysql servers PRIMARY KEY
|
|
def mysql PRIMARY mysql tables_priv PRIMARY KEY
|
|
def mysql PRIMARY mysql table_stats PRIMARY KEY
|
|
def mysql PRIMARY mysql time_zone PRIMARY KEY
|
|
def mysql PRIMARY mysql time_zone_leap_second PRIMARY KEY
|
|
def mysql PRIMARY mysql time_zone_name PRIMARY KEY
|
|
def mysql PRIMARY mysql time_zone_transition PRIMARY KEY
|
|
def mysql PRIMARY mysql time_zone_transition_type PRIMARY KEY
|
|
def mysql commit_id mysql transaction_registry UNIQUE
|
|
def mysql PRIMARY mysql transaction_registry PRIMARY KEY
|
|
connect testuser1,localhost,testuser1,,db_datadict;
|
|
SELECT * FROM information_schema.table_constraints
|
|
WHERE table_schema = 'mysql'
|
|
ORDER BY table_schema,table_name,constraint_name;
|
|
CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE
|
|
connection default;
|
|
disconnect testuser1;
|
|
DROP USER testuser1@localhost;
|
|
DROP DATABASE db_datadict;
|