RaigorJiang opened a new pull request, #24396:
URL: https://github.com/apache/shardingsphere/pull/24396
Fixes #24053.
Changes proposed in this pull request:
- Support insert function of MySQL
Ref:
https://dev.mysql.com/doc/refman/8.0/en/string-functions.html#function_insert
### Before
```sql
mysql> SELECT INSERT (status, 4, 3, '***' ) AS 'status' FROM t_order LIMIT
10;
ERROR 12000 (42000): You have an error in your SQL syntax: SELECT INSERT (
status, 4, 3, '***' ) AS 'status'
FROM t_order LIMIT 10, no viable alternative at input 'SELECTINSERT' at line
1, position 7, near [@1,7:12='INSERT',<321>,1:7]
mysql>
```
### After
```sql
mysql> SELECT INSERT(status, 4, 3, '***') AS 'status' FROM t_order;
+------------+
| status |
+------------+
| 123***7890 |
| 123***7890 |
+------------+
2 rows in set (0.01 sec)
```
---
Before committing this PR, I'm sure that I have checked the following
options:
- [x] My code follows the [code of
conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/)
of this project.
- [x] I have self-reviewed the commit code.
- [x] I have (or in comment I request) added corresponding labels for the
pull request.
- [x] I have passed maven check locally : `./mvnw clean install -B -T1C
-Dmaven.javadoc.skip -Dmaven.jacoco.skip -e`.
- [ ] I have made corresponding changes to the documentation.
- [x] I have added corresponding unit tests for my changes.
--
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]