dble
dble copied to clipboard
druid wrong when execute related sql
-
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:
- 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
need reproduce after update druid @yexiaoli88
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
#788