I get a SQL error with Mydac version 10.1.2 when I execute a query with conditional comments in which there is a colon (:).
In this case, all conditional queries are not executed.
Originally, I had the problem when I executed the query from a dump file because of the following line :
/*!40103 SET TIME_ZONE='+00:00' */;
This is the beginning of the query:
Code: Select all
-- MySQL dump 10.13 Distrib 5.7.13, for Win64 (x86_64)
--
-- Host: localhost Database: test_didier
-- ------------------------------------------------------
-- Server version 5.7.13-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Current Database: `test_didier`
--
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test_didier` /*!40100 DEFAULT CHARACTER SET latin1 COLLATE latin1_bin */;
USE `test_didier`;
#42000You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; -- -- CREATE DATABASE `test_didier` ; ' at line 6
It is possible to reproduce the problem easily.
This request without (:) works:
Code: Select all
/*!40103 SET @TOTO='+0000' */;
SELECT @TOTO
Code: Select all
/*!40103 SET @TOTO='+00:00' */;
SELECT @TOTO
For information, mySQL version is 5.7.
How can I fix this error.
Thanks in advance and sorry for my bad english.