Skip to content

Commit ecfedae

Browse files
remove xEnabled ON option
1 parent fa2f524 commit ecfedae

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,17 +78,17 @@ npx mysql-memory-server@latest --version 8.4.x
7878
- `port: number`
7979
The port that the MySQL database is listening on
8080
- `xPort: number`
81-
The port that MySQLX is listening on. If MySQL X is turned off, or ```options.xEnabled``` is set to "ON" and the X Plugin fails to initialise, this value will be -1.
81+
The port that MySQLX is listening on. If ```options.xEnabled``` is set to "OFF", this value will be -1.
8282
- `dbName: string`
8383
The database that was created on database initialization
8484
- `username: string`
8585
The name of the user to use to login to the database
8686
- `socket: string`
8787
If on Windows, this is the name of the named pipe that MySQL is listening on. If not on Windows, this is the path to the socket that MySQL is listening on.
8888
- `xSocket: string`
89-
If on Windows, this is the name of the named pipe that the MySQL X Plugin is listening on. If not on Windows, this is the path that the MySQL X Plugin is listening on. If MySQL X is turned off, or ```options.xEnabled``` is set to "ON" and the X Plugin fails to initialise, this value will be an empty string.
89+
If on Windows, this is the name of the named pipe that the MySQL X Plugin is listening on. If not on Windows, this is the path that the MySQL X Plugin is listening on. If ```options.xEnabled``` is set to "OFF", this value will be an empty string.
9090
- `mysql: {version: string, versionIsInstalledOnSystem: boolean, xPluginIsEnabled: boolean}`
91-
An object with three properties. ```version``` is the version of MySQL used to create the database. ```versionIsInstalledOnSystem``` will be true if the MySQL version used is already installed on the system and false if the version had to be downloaded from MySQL's CDN. ```xPluginIsEnabled``` will be true if ```options.xEnabled``` is set to "FORCE", will be false if ```options.xEnabled``` is set to "OFF", and if ```options.xEnabled``` is set to "ON", this value will be true if the plugin initialised successfully, otherwise this value will be false.
91+
An object with three properties. ```version``` is the version of MySQL used to create the database. ```versionIsInstalledOnSystem``` will be true if the MySQL version used is already installed on the system and false if the version had to be downloaded from MySQL's CDN. ```xPluginIsEnabled``` will be true if ```options.xEnabled``` is set to "FORCE", and will be false if ```options.xEnabled``` is set to "OFF".
9292
- `stop: () => Promise<void>`
9393
The method to stop the database. The returned promise resolves when the database has successfully stopped.
9494

@@ -190,8 +190,8 @@ Default: process.arch
190190

191191
Description: The MySQL binary architecture to execute. MySQL does not offer server builds for Windows on ARM, so to get this package working on Windows on ARM, set the arch option to "x64" and Windows will emulate MySQL.
192192

193-
- `xEnabled: "OFF" | "ON" | "FORCE"`
193+
- `xEnabled: "OFF" | "FORCE"`
194194

195195
Default: "FORCE"
196196

197-
Description: This option follows the convention set out by the [MySQL Documentation](https://dev.mysql.com/doc/refman/en/plugin-loading.html). If set to "OFF", the MySQL X Plugin will not initialise. If set to "ON", the MySQL X Plugin will try to initialise, but if the initialisation process fails, the MySQL Server will continue the startup process with the plugin disabled. If set to "FORCE", the MySQL Server will not start up without a successful initialisation of the plugin. With this option set to "FORCE", the server will either start up with the plugin enabled, or the server will fail to start up.
197+
Description: This option follows the convention set out by the [MySQL Documentation](https://dev.mysql.com/doc/refman/en/plugin-loading.html). If set to "OFF", the MySQL X Plugin will not initialise. If set to "FORCE", the MySQL Server will not start up without a successful initialisation of the plugin, meaning that it's guaranteed the server will start up with MySQL X enabled. If the MySQL X initialisation fails, the server will not start up.

src/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export function getInternalEnvVariable(envVar: keyof typeof internalOptions): st
4242
}
4343

4444
const allowedArches = ['x64', 'arm64']
45-
const pluginActivationStates = ['OFF', 'ON', 'FORCE']
45+
const pluginActivationStates = ['OFF', 'FORCE']
4646
export const OPTION_TYPE_CHECKS: OptionTypeChecks = {
4747
version: {
4848
check: (opt: any) => opt === undefined || typeof opt === 'string' && validSemver(coerceSemver(opt)) !== null,

src/libraries/Executor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ class Executor {
229229

230230
if (options.xEnabled === 'FORCE' && !xStartedSuccessfully) {
231231
this.logger.error('Error file:', file)
232-
this.logger.error('MySQL X failed to start successfully and xEnabled is set to "FORCE". Error log is above this message. If this is happening continually and you can start the database without the X Plugin, you can set options.xEnabled to "ON" or "OFF" instead of "FORCE".')
232+
this.logger.error('MySQL X failed to start successfully and xEnabled is set to "FORCE". Error log is above this message. If this is happening continually and you can start the database without the X Plugin, you can set options.xEnabled to "OFF" instead of "FORCE".')
233233
const killed = await this.#killProcess(process)
234234
if (!killed) {
235235
this.logger.error('Failed to kill MySQL process after MySQL X failing to initialise.')

0 commit comments

Comments
 (0)