Bug busters

Verify if a variable references a Buffer [Node.js]


The Buffer class exposes a static method isBuffer(arg) which returns true if the argument to this function is a Buffer instance.

const buf = Buffer.from([25, 45, 90]);

console.log( Buffer.isBuffer(buf) ); 
// true


Node.js

PASSWORD function issue when migrating from MySQL less than 5.7.5

While trying to migrate my database from 5.7.37 to 8.0.12, I started experiencing the following error:

Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near

This was as a result of the PASSWORD function being removed from mysql versions greater than 5.7.5


mysqlsql