Does TiDB support MySQL's event feature?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: Tidb支持MySQL的事件功能嘛

| username: TiDBer_57GSL9zB

[TiDB Usage Environment] Production Environment
[TiDB Version] v7.2.0
[Issue Encountered: I want to know if TiDB can create events to execute SQL at scheduled times. When I try to create two identical event SQLs, TiDB reports a syntax error: “You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 10 near ‘EVENT IF EXISTS `xxxxx’”]

| username: Kongdom | Original post link

Currently not supported
image

| username: 小龙虾爱大龙虾 | Original post link

Not supported

| username: Billmay表妹 | Original post link

You can look forward to it.

Check if 7.5 is compatible.

| username: TiDBer_57GSL9zB | Original post link

Thank you, bro.

| username: TiDBer_57GSL9zB | Original post link

Definitely looking forward to it!

| username: TiDBer_57GSL9zB | Original post link

Thanks, bro. Got it.

| username: 像风一样的男子 | Original post link

You can write a shell script to execute SQL at regular intervals, a roundabout way to achieve the goal.

| username: zhanggame1 | Original post link

This should be used with stored procedures, it would be more useful if both are supported together.

| username: TiDBer_小阿飞 | Original post link

Transactions are not supported.

| username: 江湖故人 | Original post link

TiDB still has a long way to go :smiley:
As an AP database, it at least needs to support stored procedures/custom functions/anonymous blocks/events/triggers.

| username: dba远航 | Original post link

It’s still more reliable to use system tasks to create scripts.

| username: Kongdom | Original post link

:handshake: :handshake: :handshake:

| username: 随缘天空 | Original post link

Stored procedures, user-defined functions, triggers, events, and some specific DDL statements are not supported.

| username: come_true | Original post link

Not supported

| username: xingzhenxiang | Original post link

You can also use the system crontab to complete the related scheduled triggers.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.