eclipseek opened a new issue #14974:
URL: https://github.com/apache/shardingsphere/issues/14974


   
   
   Please answer these questions before submitting your issue. Thanks!
   
   ### Which version of ShardingSphere did you use?
   shardingsphere-proxy-5.0.0 release
   
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
    ShardingSphere-Proxy
   
   ### Expected behavior
   when excute the select sql below, it should execute correctly.
   
   ### Actual behavior
   but actually return error:
   1235 - This version of ShardingSphere-Proxy doesn't yet support this SQL. 
'You have an error in your SQL syntax', Time: 0.007000s
   
   ### Reason analyze (If you can)
   Sql parse engine cannot pase _binary in where condition.
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule 
configuration, when exception occur etc.
   talbe create sql:
   `CREATE TABLE `t_test` (
     `id` int(11) NOT NULL AUTO_INCREMENT,
     `name` varchar(20) DEFAULT NULL,
     `school` varchar(100) DEFAULT NULL,
     `family` varchar(100) DEFAULT NULL,
     `col1` varchar(20) NOT NULL,
     `col2` varchar(20) NOT NULL,
     PRIMARY KEY (`id`)
   ) ENGINE=InnoDB AUTO_INCREMENT=69681239 DEFAULT CHARSET=utf8mb4`
   
   sql (which return error when execute):
   
   SELECT
        `id`,(
        SELECT
                1 AS isNeedDml 
        FROM
                (
                SELECT
                        id 
                FROM
                        `t_test` 
                WHERE
                        ((
                                        `id` > _binary '5701546' 
                                        ) 
                        OR ( ( `id` = _binary '5701546' ) )) 
                        AND ((
                                `id` < _binary '69654383' ) OR ( ( `id` = 
_binary '69654383' ) )) ORDER BY `id` ASC LIMIT 1000 ) t WHERE id > 0 
                LIMIT 1 
        ) AS isNeedDml 
   FROM
        `t_test` 
   WHERE
        ((
                        `id` > _binary '5701546' 
                        ) 
        OR ( ( `id` = _binary '5701546' ) )) 
        AND ((
                        `id` < _binary '69654383' 
                        ) 
        OR ( ( `id` = _binary '69654383' ) )) 
   ORDER BY
        `id` ASC 
        LIMIT 1 OFFSET 999
   // sql start --------------------
   
   
   
   ### Example codes for reproduce this issue (such as a github link).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to