Skip to content

Commit

Permalink
test navicat fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alihm committed Apr 3, 2024
1 parent 3b68733 commit 0b622f4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/sqlAnalyzer.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,12 @@ function cleanUP(sql) {
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 */';
// eslint-disable-next-line no-param-reassign
if (sql.startsWith("SHOW VARIABLES LIKE 'sql_mode'; SELECT COUNT(*) AS support_ndb FROM information_")) sql = sql.replace("SHOW VARIABLES LIKE 'sql_mode'; ", '');
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);
}
if (sql.startsWith('--')) {
// eslint-disable-next-line no-param-reassign
while (sql.startsWith('--') || sql.startsWith('\r\n') || sql.startsWith('\n')) sql = removeFirstLine(sql);
Expand Down

0 comments on commit 0b622f4

Please sign in to comment.