Skip to content

Commit 2cd28e6

Browse files
GHMattiGHMatti
authored andcommitted
Update to 3.2.2
1 parent a99f739 commit 2cd28e6

File tree

4 files changed

+33
-23
lines changed

4 files changed

+33
-23
lines changed

mysql-async.js

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -612,9 +612,11 @@ function objectToString(o) {
612612

613613
try {
614614
var util = __webpack_require__(0);
615+
/* istanbul ignore next */
615616
if (typeof util.inherits !== 'function') throw '';
616617
module.exports = util.inherits;
617618
} catch (e) {
619+
/* istanbul ignore next */
618620
module.exports = __webpack_require__(76);
619621
}
620622

@@ -1376,7 +1378,8 @@ ConnectionConfig.parseUrl = function(url) {
13761378
"use strict";
13771379

13781380

1379-
if (!process.version ||
1381+
if (typeof process === 'undefined' ||
1382+
!process.version ||
13801383
process.version.indexOf('v0.') === 0 ||
13811384
process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {
13821385
module.exports = { nextTick: nextTick };
@@ -5233,8 +5236,8 @@ class MySQL {
52335236

52345237
this.pool.query('SELECT VERSION()', (error, result) => {
52355238
if (!error) {
5236-
const { versionPrefix, version } = formatVersion(result[0]['VERSION()']);
5237-
profiler.setVersion(`${versionPrefix}:${version}`);
5239+
const formattedVersion = formatVersion(result[0]['VERSION()']);
5240+
profiler.setVersion(formattedVersion);
52385241
logger.log('\x1b[32m[mysql-async]\x1b[0m Database server connection established.');
52395242
} else {
52405243
logger.error(`[ERROR] ${error.message}`);
@@ -14460,24 +14463,28 @@ module.exports = Array.isArray || function (arr) {
1446014463
if (typeof Object.create === 'function') {
1446114464
// implementation from standard node.js 'util' module
1446214465
module.exports = function inherits(ctor, superCtor) {
14463-
ctor.super_ = superCtor
14464-
ctor.prototype = Object.create(superCtor.prototype, {
14465-
constructor: {
14466-
value: ctor,
14467-
enumerable: false,
14468-
writable: true,
14469-
configurable: true
14470-
}
14471-
});
14466+
if (superCtor) {
14467+
ctor.super_ = superCtor
14468+
ctor.prototype = Object.create(superCtor.prototype, {
14469+
constructor: {
14470+
value: ctor,
14471+
enumerable: false,
14472+
writable: true,
14473+
configurable: true
14474+
}
14475+
})
14476+
}
1447214477
};
1447314478
} else {
1447414479
// old school shim for old browsers
1447514480
module.exports = function inherits(ctor, superCtor) {
14476-
ctor.super_ = superCtor
14477-
var TempCtor = function () {}
14478-
TempCtor.prototype = superCtor.prototype
14479-
ctor.prototype = new TempCtor()
14480-
ctor.prototype.constructor = ctor
14481+
if (superCtor) {
14482+
ctor.super_ = superCtor
14483+
var TempCtor = function () {}
14484+
TempCtor.prototype = superCtor.prototype
14485+
ctor.prototype = new TempCtor()
14486+
ctor.prototype.constructor = ctor
14487+
}
1448114488
}
1448214489
}
1448314490

@@ -15798,8 +15805,11 @@ class Profiler {
1579815805
}
1579915806
}
1580015807

15801-
setVersion(version) {
15802-
this.version = version;
15808+
setVersion({ versionPrefix, version }) {
15809+
if (version.startsWith('8.0.') && versionPrefix === 'MySQL') {
15810+
this.logger.error('[mysql-async] [Warning] It is recommended to run MySQL 5 or MariaDB with mysql-async. You may experience performance issues under load by using MySQL 8.');
15811+
}
15812+
this.version = `${versionPrefix}:${version}`;
1580315813
}
1580415814

1580515815
fillExecutionTimes(interval) {

src/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mysql-async",
3-
"version": "3.2.1",
3+
"version": "3.2.2",
44
"description": "fivem-mysql-async",
55
"private": true,
66
"scripts": {

ui/app.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ui/app.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)