mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-34716 Allow arbitrary options in CREATE SERVER
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.
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
|
||||
|
||||
#include "slave.h" // for tables_ok(), rpl_filter
|
||||
#include "create_options.h"
|
||||
|
||||
class THD;
|
||||
typedef struct st_lex_server_options LEX_SERVER_OPTIONS;
|
||||
@@ -29,6 +30,7 @@ typedef struct st_federated_server
|
||||
long port;
|
||||
size_t server_name_length;
|
||||
const char *db, *scheme, *username, *password, *socket, *owner, *host, *sport;
|
||||
engine_option_value *option_list;
|
||||
} FOREIGN_SERVER;
|
||||
|
||||
/* cache handlers */
|
||||
|
Reference in New Issue
Block a user