mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 05:36:00 +00:00
mariadb version parsing
This commit is contained in:
@@ -171,6 +171,16 @@ const drivers = driverBases.map(driverBase => ({
|
||||
async getVersion(connection) {
|
||||
const { rows } = await this.query(connection, "show variables like 'version'");
|
||||
const version = rows[0].Value;
|
||||
if (version) {
|
||||
const m = version.match(/(.*)-MariaDB-/);
|
||||
if (m) {
|
||||
return {
|
||||
version,
|
||||
versionText: `MariaDB ${m[1]}`,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
version,
|
||||
versionText: `MySQL ${version}`,
|
||||
|
||||
Reference in New Issue
Block a user