strongduanmu commented on issue #12535:
URL:
https://github.com/apache/shardingsphere/issues/12535#issuecomment-979855565
After the PR is merged, the Hint algorithm can go to the kernel for
execution.
```
mysql> set sharding hint database_value = 1;
Query OK, 0 rows affected (0.01 sec)
mysql> select * from act_re_procdef where KEY_ = '44' and TENANT_ID_ = '33'
and VERSION_ = (select max(VERSION_) from act_re_procdef where KEY_ ='44' and
TENANT_ID_= '33');
+-----+------+----------+-------+------+----------+----------------+----------------+---------------------+--------------+---------------------+-------------------------+-------------------+------------+
| ID_ | REV_ | CATEGORY | NAME_ | KEY_ | VERSION_ | DEPLOYMENT_ID_ |
RESOURCE_NAME_ | DGRM_RESOURCE_NAME_ | DESCRIPTION_ | HAS_START_FORM_KEY_ |
HAS_GRAPHICAL_NOTATION_ | SUSPENSION_STATE_ | TENANT_ID_ |
+-----+------+----------+-------+------+----------+----------------+----------------+---------------------+--------------+---------------------+-------------------------+-------------------+------------+
| 11 | 22 | NULL | NULL | 44 | 11 | NULL | NULL
| NULL | NULL | NULL |
NULL | NULL | 33 |
+-----+------+----------+-------+------+----------+----------------+----------------+---------------------+--------------+---------------------+-------------------------+-------------------+------------+
1 row in set (4.02 sec)
```
Flowing is the sql show log:
```
[INFO ] 2021-11-26 18:21:51.064 [Connection-1-ThreadExecutor]
ShardingSphere-SQL - Logic SQL: select * from act_re_procdef where KEY_ = '44'
and TENANT_ID_ = '33' and VERSION_ = (select max(VERSION_) from act_re_procdef
where KEY_ ='44' and TENANT_ID_= '33')
[INFO ] 2021-11-26 18:21:51.072 [Connection-1-ThreadExecutor]
ShardingSphere-SQL - SQLStatement: MySQLSelectStatement(limit=Optional.empty,
lock=Optional.empty, window=Optional.empty)
[INFO ] 2021-11-26 18:21:51.072 [Connection-1-ThreadExecutor]
ShardingSphere-SQL - Actual SQL: ds_1 ::: select * from act_re_procdef where
KEY_ = '44' and TENANT_ID_ = '33' and VERSION_ = (select max(VERSION_) from
act_re_procdef where KEY_ ='44' and TENANT_ID_= '33')
```
--
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]