radondb / radon

RadonDB is an open source, cloud-native MySQL database for building global, scalable cloud services
https://radondb.io/
GNU General Public License v3.0
1.8k stars 217 forks source link

[feature] support DO Statement #720

Closed hustjieke closed 3 years ago

hustjieke commented 3 years ago

MySQL 8.0 syntax:

DO expr [, expr] ...

refer:

DO executes the expressions but does not return any results. In most respects, DO is shorthand for SELECT expr, ..., but has the advantage that it is slightly faster when you do not care about the result.

For more information, see: https://dev.mysql.com/doc/refman/8.0/en/do.html

Example: This SELECT statement pauses, but also produces a result set:

mysql> SELECT SLEEP(5);
+----------+
| SLEEP(5) |
+----------+
|        0 |
+----------+
1 row in set (5.02 sec)

DO, on the other hand, pauses without producing a result set.:

mysql> DO SLEEP(5);
Query OK, 0 rows affected (4.99 sec)