Skip to content

Commit a6612b2

Browse files
Add support for MySQL 8.0.42, 8.4.5, and 9.3.0 (#207)
1 parent c781258 commit a6612b2

File tree

3 files changed

+35
-24
lines changed

3 files changed

+35
-24
lines changed

docs/SUPPORTED_MYSQL_DOWNLOADS.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020

2121
*Architectures used can be overridden by the ```arch``` option provided your OS and system supports running applications that use those architectures.*
2222

23-
Linux, Windows, macOS x64: MySQL v5.7.19 - v9.2.0
23+
Linux, Windows, macOS x64: MySQL v5.7.19 - v9.3.0
2424

25-
Linux ARM64: MySQL v8.0.31 - v9.2.0
25+
Linux ARM64: MySQL v8.0.31 - v9.3.0
2626

27-
macOS ARM64: MySQL v8.0.26 - v9.2.0
27+
macOS ARM64: MySQL v8.0.26 - v9.3.0
2828

2929
Windows ARM64: N/A - Read about the ```arch``` option to run this package on your system
3030

@@ -46,7 +46,7 @@ macOS:
4646
| v8.0.28 - v8.0.31 | macOS 11 (Big Sur) |
4747
| v8.0.32 - v8.0.34 | macOS 12 (Monterey) |
4848
| v8.0.35 - v8.0.39 OR v8.1.0 - v8.4.2 OR v9.0.1 | macOS 13 (Ventura) |
49-
| v8.0.40 - v8.0.41 OR v8.4.3 - v8.4.4 OR v9.1.0 - v9.2.0 | macOS 14 (Sonoma) |
49+
| v8.0.40 - v8.0.42 OR v8.4.3 - v8.4.5 OR v9.1.0 - v9.3.0 | macOS 14 (Sonoma) |
5050

5151
## Operating System Maximum Version Requirements
5252

@@ -86,4 +86,4 @@ Ubuntu Linux:
8686

8787
Fedora Linux: ```libaio1``` package and ```tar``` package
8888

89-
*Document last updated in v1.9.0*
89+
*Document last updated in v1.10.0*

src/constants.ts

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { InternalServerOptions, OptionTypeChecks } from "../types";
2-
import { randomUUID } from "crypto";
32
import {normalize as normalizePath} from 'path'
43
import { tmpdir } from "os";
54
import { valid as validSemver, coerce as coerceSemver } from "semver";
@@ -124,25 +123,25 @@ export const DOWNLOADABLE_MYSQL_VERSIONS = [
124123

125124
'8.0.0', '8.0.1', '8.0.2', '8.0.3', '8.0.4',
126125

127-
'8.0.11', '8.0.12', '8.0.13', '8.0.14', '8.0.15', '8.0.16', '8.0.17', '8.0.18', '8.0.19', '8.0.20', '8.0.21', '8.0.22', '8.0.23', '8.0.24', '8.0.25', '8.0.26', '8.0.27', '8.0.28', '8.0.30', '8.0.31', '8.0.32', '8.0.33', '8.0.34', '8.0.35', '8.0.36', '8.0.37', '8.0.39', '8.0.40', '8.0.41',
126+
'8.0.11', '8.0.12', '8.0.13', '8.0.14', '8.0.15', '8.0.16', '8.0.17', '8.0.18', '8.0.19', '8.0.20', '8.0.21', '8.0.22', '8.0.23', '8.0.24', '8.0.25', '8.0.26', '8.0.27', '8.0.28', '8.0.30', '8.0.31', '8.0.32', '8.0.33', '8.0.34', '8.0.35', '8.0.36', '8.0.37', '8.0.39', '8.0.40', '8.0.41', '8.0.42',
128127

129128
'8.1.0', '8.2.0', '8.3.0',
130129

131-
'8.4.0', '8.4.2', '8.4.3', '8.4.4',
130+
'8.4.0', '8.4.2', '8.4.3', '8.4.4', '8.4.5',
132131

133-
'9.0.1', '9.1.0', '9.2.0'
132+
'9.0.1', '9.1.0', '9.2.0', '9.3.0'
134133
] as const;
135134
export const MYSQL_ARCH_SUPPORT = {
136135
darwin: {
137-
arm64: '8.0.26 - 9.2.0',
138-
x64: '5.7.19 - 9.2.0'
136+
arm64: '8.0.26 - 9.3.0',
137+
x64: '5.7.19 - 9.3.0'
139138
},
140139
linux: {
141-
arm64: '8.0.31 - 9.2.0',
142-
x64: '5.7.19 - 9.2.0'
140+
arm64: '8.0.31 - 9.3.0',
141+
x64: '5.7.19 - 9.3.0'
143142
},
144143
win32: {
145-
x64: '5.7.19 - 9.2.0'
144+
x64: '5.7.19 - 9.3.0'
146145
}
147146
} as const;
148147
export const MYSQL_MIN_OS_SUPPORT = {
@@ -162,7 +161,7 @@ export const MYSQL_MIN_OS_SUPPORT = {
162161
'8.0.28 - 8.0.31': '20.0.0',
163162
'8.0.32 - 8.0.34': '21.0.0',
164163
'8.0.35 - 8.0.39 || 8.1.0 - 8.4.2 || 9.0.1': '22.0.0',
165-
'8.0.40 - 8.0.41 || 8.4.3 - 8.4.4 || 9.1.0 - 9.2.0': '23.0.0'
164+
'8.0.40 - 8.0.42 || 8.4.3 - 8.4.5 || 9.1.0 - 9.3.0': '23.0.0'
166165
}
167166
} as const;
168167
export const DMR_MYSQL_VERSIONS = '8.0.0 - 8.0.2';
@@ -177,26 +176,37 @@ export const MYSQL_MACOS_VERSIONS_IN_FILENAME = {
177176
'8.0.30 - 8.0.31': 'macos12',
178177
'8.0.32 - 8.0.35 || 8.1.0 - 8.2.0': 'macos13',
179178
'8.0.36 - 8.0.40 || 8.3.0 - 8.4.3 || 9.0.1 - 9.1.0': 'macos14',
180-
'8.0.41 || 8.4.4 || 9.2.0': 'macos15'
179+
'8.0.41 - 8.0.42 || 8.4.4 - 8.4.5 || 9.2.0 - 9.3.0': 'macos15'
181180
} as const;
182181
export const MYSQL_LINUX_GLIBC_VERSIONS = {
183-
'5.7.19 - 8.0.20': '2.12',
184-
'8.0.21 - 9.2.0': '2.17'
182+
//8.0.42, 8.4.5, and 9.3.0 with glibc 2.28 does NOT have a minimal install version for x64 but it DOES have arm64 support.
183+
//8.0.42, 8.4.5, and 9.3.0 with glibc 2.17 DOES have a minimal install version for x64 but does NOT have arm64 support.
184+
//The new versions having these differences between the glibc versions has led to the glibc versions being different depending on CPU architecture for this package.
185+
//Neither glibc versions for the above MySQL versions have an arm64 minimal install.
186+
x64: {
187+
'5.7.19 - 8.0.20': '2.12',
188+
'8.0.21 - 9.3.0': '2.17'
189+
},
190+
arm64: {
191+
'5.7.19 - 8.0.20': '2.12',
192+
'8.0.21 - 8.0.41 || 8.1.0 - 8.4.4 || 9.0.1 - 9.2.0': '2.17',
193+
'8.0.42 || 8.4.5 || 9.3.0': '2.28'
194+
}
185195
} as const;
186196
export const MYSQL_LINUX_MINIMAL_INSTALL_AVAILABLE = {
187197
'5.7.19 - 8.0.15': 'no',
188198
'8.0.16 - 8.0.20': 'no-glibc-tag',
189-
'8.0.21 - 9.2.0': 'glibc-tag'
199+
'8.0.21 - 9.3.0': 'glibc-tag'
190200
} as const;
191-
export const MYSQL_LINUX_MINIMAL_INSTALL_AVAILABLE_ARM64 = '>=8.0.33'
201+
export const MYSQL_LINUX_MINIMAL_INSTALL_AVAILABLE_ARM64 = '8.0.33 - 8.0.41 || 8.1.0 - 8.4.4 || 9.0.1 - 9.2.0' //Not available for < 8.0.33 and 8.0.42, 8.4.5, and 9.3.0
192202
export const MYSQL_LINUX_FILE_EXTENSIONS = {
193203
x64: {
194204
'5.7.19 - 8.0.11': 'gz',
195-
'8.0.12 - 9.2.0': 'xz'
205+
'8.0.12 - 9.3.0': 'xz'
196206
},
197207
arm64: {
198208
'8.0.31 - 8.0.32': 'gz',
199-
'8.0.33 - 9.2.0': 'xz'
209+
'8.0.33 - 9.3.0': 'xz'
200210
}
201211
} as const;
202212
export const MYSQL_LINUX_MINIMAL_REBUILD_VERSIONS = '8.0.26';

src/libraries/Version.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,10 @@ export default function getBinaryURL(versionToGet: string = "x", currentArch: st
8989
const macOSVersionNameKey = MySQLmacOSVersionNameKeys.find(range => satisfies(selectedVersion, range))
9090
fileLocation = `${major(selectedVersion)}.${minor(selectedVersion)}/mysql-${selectedVersion}${isRC ? '-rc' : isDMR ? '-dmr' : ''}-${MYSQL_MACOS_VERSIONS_IN_FILENAME[macOSVersionNameKey]}-${currentArch === 'x64' ? 'x86_64' : 'arm64'}.tar.gz`
9191
} else if (currentOS === 'linux') {
92-
const glibcVersionKeys = Object.keys(MYSQL_LINUX_GLIBC_VERSIONS);
92+
const glibcObject = MYSQL_LINUX_GLIBC_VERSIONS[currentArch];
93+
const glibcVersionKeys = Object.keys(glibcObject);
9394
const glibcVersionKey = glibcVersionKeys.find(range => satisfies(selectedVersion, range))
94-
const glibcVersion = MYSQL_LINUX_GLIBC_VERSIONS[glibcVersionKey];
95+
const glibcVersion = glibcObject[glibcVersionKey];
9596

9697
const minimalInstallAvailableKeys = Object.keys(MYSQL_LINUX_MINIMAL_INSTALL_AVAILABLE);
9798
const minimalInstallAvailableKey = minimalInstallAvailableKeys.find(range => satisfies(selectedVersion, range))

0 commit comments

Comments
 (0)