Skip to content

Error when create procedure with hint #919

@FlyingMao

Description

@FlyingMao
  • dble version:
    5.6.29-dble-9.9.9.9-c7d9bfa336cc4dbc2d039e3387bfd80c180c5499-20190104110721
  • preconditions :
drop table if exists test_shard;
CREATE TABLE test_shard(`id` int(10) unsigned NOT NULL,`k` int(10) unsigned NOT NULL DEFAULT '0',`c` char(120),`pad` int(11) NOT NULL,PRIMARY KEY (`id`),UNIQUE KEY (`k`))DEFAULT CHARSET=UTF8;
insert into test_shard values(1,1,'id1',1),(2,2,'id2',2),(3,3,'id3',3),(4,4,'id4',4),(5,5,'id5',1),(6,6,'id6',2),(7,7,'id7',3),(8,8,'$id8$',4),(9,9,'test',3),(10,10,'中',3),(11,11,'i_',4),(12,12,'_g',5),(13,13,'y_u',6),(14,14,'20%',14),(15,15,'a_1',15),(16,16,16,-1),(0,0,0,0),(17,17,'new*\n*line',17),(18,18,'a',18);
insert into test_shard(id,k,pad) values(19,19,19);
  • configs:

schema.xml



rule.xml



server.xml



  • steps:
    step1. create procedure use hint in dble
 use mytest;
delimiter $$
/*!dble:sql=select * from test_shard where id =1*/CREATE PROCEDURE delete_matches(IN p_playerno INTEGER) BEGIN select * from test_shard; delete from test_shard; END$$
  • expect result:
    1. create procedure successed
  • real result:
    1.
mysql> /*!dble:sql=select * from test_shard where id =1*/CREATE PROCEDURE delete_matches(IN p_playerno INTEGER) BEGIN select * from test_shard; delete from test_shard; END$$
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

  • supplements:
    1.

/label ~BUG

Metadata

Metadata

Assignees

Labels

doc-itdiffer with mysql, and let it goprotocolresolveproblem has been fixed by developer

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions