Skip to content

Commit

Permalink
test navicat client fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alihm committed Apr 3, 2024
1 parent 0b622f4 commit 086cb21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/sqlAnalyzer.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ function removeFirstLine(str) {
* @param {string} sql sql query
*/
function cleanUP(sql) {
log.debug(sql);
// eslint-disable-next-line no-param-reassign
if (sql.toLowerCase().startsWith('/*!40101 set character_set_client = utf8 */')) sql = '/*!40101 SET character_set_client = utf8mb4 */';
// eslint-disable-next-line no-param-reassign
if (sql.toLowerCase().startsWith('/*!40101 set names utf8 */')) sql = '/*!40101 SET NAMES utf8mb4 */';
if (sql.startsWith("SHOW VARIABLES LIKE 'sql_mode'; SELECT")) {
log.debug(sql);
// eslint-disable-next-line no-param-reassign
sql = sql.replace("SHOW VARIABLES LIKE 'sql_mode'; ", '');
log.debug(sql);
Expand Down

0 comments on commit 086cb21

Please sign in to comment.