dble icon indicating copy to clipboard operation
dble copied to clipboard

druid wrong when execute related sql

Open yexiaoli88 opened this issue 6 years ago • 3 comments

  • dble version:version: 5.6.29-dble-9.9.9.9-8303bcf-20180821024605

  • configs:

rule.xml

<tableRule name="mod-long">
		<rule>
			<columns>id</columns>
			<algorithm>sharding</algorithm>
		</rule>
</tableRule>
<function name="sharding" class="Hash">
		<property name="partitionCount">4</property>
		<property name="partitionLength">1</property>
</function>

schema.xml

 <table name="a_test" primaryKey="id" dataNode="dn1,dn2,dn3,dn4" rule="mod-long" />
 <table name="test_global" dataNode="dn1,dn2,dn3,dn4" type="global"/>

  • steps:
  1. dble return wrong when executing following sqls
mysql> select * from test_no_shard where R_NAME=_latin1 b'1000001';
ERROR 1064 (HY000): sql syntax error, no terminated. IDENTIFIER
mysql> select * from test_no_shard where R_NAME=_utf8 0b1000001 COLLATE utf8_danish_ci;
ERROR 1064 (HY000): sql syntax error, no terminated. LITERAL_INT
mysql> select *,_latin1 b'1000001' from test_no_shard;
ERROR 1064 (HY000): sql syntax error, no terminated. LITERAL_CHARS
mysql> select * from a_test t use key(k_1) use index(pad_index) use index();
ERROR 1064 (HY000): sql syntax error, no terminated. USE
mysql> select * from a_test t ignore key(k_1) use index(pad_index) use index();
ERROR 1064 (HY000): sql syntax error, no terminated. USE
mysql> select * from a_test t ignore key(k_1) ignore index(pad_index) use index();
ERROR 1064 (HY000): sql syntax error, no terminated. IDENTIFIER
mysql> select * from a_test t force key(k_1) force index(pad_index);
ERROR 1064 (HY000): sql syntax error, no terminated. IDENTIFIER
mysql> select id,t_id,name,pad from test_global t use key(k_1) use index(pad_index) use index();
ERROR 1064 (HY000): sql syntax error, no terminated. USE
mysql> select id,t_id,name,pad from test_global t ignore key(k_1) use index(pad_index) use index();
ERROR 1064 (HY000): sql syntax error, no terminated. USE
mysql> select id,t_id,name,pad from test_global t ignore key(k_1) ignore index(pad_index) use index();
ERROR 1064 (HY000): sql syntax error, no terminated. IDENTIFIER
mysql> select id,t_id,name,pad from test_global t force key(k_1) force index(pad_index);
ERROR 1064 (HY000): sql syntax error, no terminated. IDENTIFIER
mysql> select * from a_test_no_shard t use key(k_1) use index(pad_index) use index();
ERROR 1064 (HY000): sql syntax error, no terminated. USE
mysql> select * from a_test_no_shard t ignore key(k_1) use index(pad_index) use index();
ERROR 1064 (HY000): sql syntax error, no terminated. USE
mysql> select * from a_test_no_shard t ignore key(k_1) ignore index(pad_index) use index();
ERROR 1064 (HY000): sql syntax error, no terminated. IDENTIFIER
mysql> select * from a_test_no_shard t force key(k_1) force index(pad_index);
ERROR 1064 (HY000): sql syntax error, no terminated. IDENTIFIER
mysql> select id,t_id,name,pad from a_test t use key(k_1) use index(pad_index) use index();
ERROR 1064 (HY000): sql syntax error, no terminated. USE
mysql> select id,t_id,name,pad from a_test t ignore key(k_1) use index(pad_index) use index();
ERROR 1064 (HY000): sql syntax error, no terminated. USE
mysql> select id,t_id,name,pad from a_test t ignore key(k_1) ignore index(pad_index) use index();
ERROR 1064 (HY000): sql syntax error, no terminated. IDENTIFIER
mysql> select id,t_id,name,pad from a_test t force key(k_1) force index(pad_index);
ERROR 1064 (HY000): sql syntax error, no terminated. IDENTIFIER
mysql> select id,t_id,name,pad from a_test t ignore key(k_1) force index(pad_index);
ERROR 1064 (HY000): sql syntax error, no terminated. IDENTIFIER
mysql> alter table t change c c national character varying(20);
ERROR 1064 (HY000): sql syntax error, no terminated. IDENTIFIER
mysql> CREATE INDEX inx_id ON aly_test (id) comment '测试';
ERROR 1064 (HY000): sql syntax error, no terminated. COMMENT
mysql> SELECT @abc123, @123abc, @row_format=1, @$ := @t1+@t2+@t3;
ERROR 1064 (HY000): sql syntax error, no terminated. COLONEQ

/label ~BUG

yexiaoli88 avatar Aug 21 '18 08:08 yexiaoli88

need reproduce after update druid @yexiaoli88

yanhuqing666 avatar Oct 25 '18 06:10 yanhuqing666

version :5.6.29-dble-9.9.9.9-6d0b936-20181101023043 still have bug:

mysql> select * from test_no_shard where R_NAME=_latin1 b'1000001';
ERROR 1064 (HY000): sql syntax error, no terminated. IDENTIFIER
mysql> select * from test_no_shard where R_NAME=_utf8 0b1000001 COLLATE utf8_danish_ci;
ERROR 1064 (HY000): sql syntax error, no terminated. LITERAL_INT
mysql> select *,_latin1 b'1000001' from test_no_shard;
ERROR 1064 (HY000): sql syntax error, no terminated. LITERAL_CHARS
mysql> select * from a_test t use key(k_1) use index(pad_index) use index();
ERROR 1064 (HY000): sql syntax error, no terminated. USE
mysql> select * from a_test t ignore key(k_1) use index(pad_index) use index();
ERROR 1064 (HY000): sql syntax error, no terminated. USE
mysql> select * from a_test t ignore key(k_1) ignore index(pad_index) use index();
ERROR 1064 (HY000): sql syntax error, no terminated. IDENTIFIER
mysql> select id,t_id,name,pad from test_global t use key(k_1) use index(pad_index) use index();
ERROR 1064 (HY000): sql syntax error, no terminated. USE
mysql> select id,t_id,name,pad from test_global t ignore key(k_1) use index(pad_index) use index();
ERROR 1064 (HY000): sql syntax error, no terminated. USE
mysql> select id,t_id,name,pad from test_global t ignore key(k_1) ignore index(pad_index) use index();
ERROR 1064 (HY000): sql syntax error, no terminated. IDENTIFIER
mysql> select * from a_test_no_shard t use key(k_1) use index(pad_index) use index();
ERROR 1064 (HY000): sql syntax error, no terminated. USE
mysql> select * from a_test_no_shard t ignore key(k_1) use index(pad_index) use index();
ERROR 1064 (HY000): sql syntax error, no terminated. USE
mysql> select * from a_test_no_shard t ignore key(k_1) ignore index(pad_index) use index();
ERROR 1064 (HY000): sql syntax error, no terminated. IDENTIFIER
mysql> select id,t_id,name,pad from a_test t use key(k_1) use index(pad_index) use index();
ERROR 1064 (HY000): sql syntax error, no terminated. USE
mysql> select id,t_id,name,pad from a_test t ignore key(k_1) use index(pad_index) use index();
ERROR 1064 (HY000): sql syntax error, no terminated. USE
mysql> select id,t_id,name,pad from a_test t ignore key(k_1) ignore index(pad_index) use index();
ERROR 1064 (HY000): sql syntax error, no terminated. IDENTIFIER
mysql> SELECT @abc123, @123abc, @row_format=1, @$ := @t1+@t2+@t3;
ERROR 1064 (HY000): sql syntax error, no terminated. COLONEQ

FlyingMao avatar Nov 01 '18 06:11 FlyingMao

#788

FlyingMao avatar Nov 01 '18 06:11 FlyingMao