Some advice: Unable to parse file

Hi Community

  • which versions are you using: SonarQube Developer Edition Version 8.9.1 (build 44547)
  • what are you trying to achieve: Scann files .sql
  • what have you tried so far to achieve this: Change the suffix .sql from PL/SQL to T-SQL
    We use MySQL database
    When we tried to scann a file we have the following Warn:
WARN: Unable to parse file '/D:/"path to the file"/"filename".sql' : Parse error at line 17 column 25:

 7:
 8: /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
 9: /*!40101 SET NAMES utf8 */;
10: /*!50503 SET NAMES utf8mb4 */;
11: /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
12: /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
13: /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
14:
15:
16: -- Volcando estructura de base de datos para "filename"
17: DROP DATABASE IF EXISTS `filename`;
                                                       ^
18: CREATE DATABASE IF NOT EXISTS `filename` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
19: USE `filename`;
20:
21: -- Volcando estructura para tabla file.mdl_analytics_indicator_calc
22: DROP TABLE IF EXISTS `mdl_analytics_indicator_calc`;
23: CREATE TABLE IF NOT EXISTS `mdl_analytics_indicator_calc` (
24:   `id` bigint NOT NULL AUTO_INCREMENT,
25:   `starttime` bigint NOT NULL,
26:   `endtime` bigint NOT NULL,
27:   `contextid` bigint NOT NULL,

Thanks for your attention
Regards

Hi,

It looks like you’ve quoted these strings using backticks to quote these strings rather than quotes (` vs ’ or "). It seems that T-SQL doesn’t support backticks for this.

 
Ann