You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like the console logging in the code below (in connection_config.js) to be removed.
Also I would ask that this is never made into a thrown error (as is threatened).
if (validOptions[key] !== 1) {
// REVIEW: Should this be emitted somehow?
// eslint-disable-next-line no-console
console.error(
`Ignoring invalid configuration option passed to Connection: ${key}. This is currently a warning, but in future versions of MySQL2, an error will be thrown if you pass an invalid configuration option to a Connection`
);
}
My reasons are that some other libraries (e.g. loopback-connector-mysql) add 'harmless' extra (non MySql/MariaDB) properties to the object passed here (for other purposes) which leads to this error being logged (and the extra properties do not actually cause problems).
Additionally, having this check (and - more alarmingly - threatening to throw an error in future!) means that the code in mysql2 has to be sure to always keep an up-to-date list of options. Additionally it neglects that different versions of MySQL/MariaDB might in fact have a slightly different list of valid options.
My opinion is that the logging (and check of property name validity) should be removed.
The text was updated successfully, but these errors were encountered:
I would like the console logging in the code below (in connection_config.js) to be removed.
Also I would ask that this is never made into a thrown error (as is threatened).
My reasons are that some other libraries (e.g. loopback-connector-mysql) add 'harmless' extra (non MySql/MariaDB) properties to the object passed here (for other purposes) which leads to this error being logged (and the extra properties do not actually cause problems).
Additionally, having this check (and - more alarmingly - threatening to throw an error in future!) means that the code in mysql2 has to be sure to always keep an up-to-date list of options. Additionally it neglects that different versions of MySQL/MariaDB might in fact have a slightly different list of valid options.
My opinion is that the logging (and check of property name validity) should be removed.
The text was updated successfully, but these errors were encountered: