New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix show subscriptions (#1.0-dev) #13599
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fix show subscriptions Approved by: @daviszhen, @iamlinjunhong, @heni02, @ouyuanning, @nnsgmsone
YANGGMM
requested review from
nnsgmsone,
ouyuanning,
aunjgr,
badboynt1,
iamlinjunhong,
daviszhen,
qingxinhome,
aressu1985 and
heni02
as code owners
December 19, 2023 08:08
为execute 语句增加 prepare sql和参数值。 **Case1 : execute ... using ...** execute 参数来自用户变量。 **输出格式: execute.... // prepare stmt1 from .... ; set var1 = val1 ; set var2 = val2 ;** 样例 ``` > CREATE TABLE numbers(pk INTEGER PRIMARY KEY, ui BIGINT UNSIGNED, si BIGINT); > INSERT INTO numbers VALUES (0, 0, -9223372036854775808), (1, 18446744073709551615, 9223372036854775807); > SET @si_min = -9223372036854775808; > SET @si_max = 9223372036854775807; > PREPARE s2 FROM 'SELECT * FROM numbers WHERE si=?'; Query OK, 0 rows affected (0.00 sec) > EXECUTE s2 USING @si_min; +------+------+----------------------+ | pk | ui | si | +------+------+----------------------+ | 0 | 0 | -9223372036854775808 | +------+------+----------------------+ 1 row in set (0.01 sec) > EXECUTE s2 USING @si_max; +------+----------------------+---------------------+ | pk | ui | si | +------+----------------------+---------------------+ | 1 | 18446744073709551615 | 9223372036854775807 | +------+----------------------+---------------------+ 1 row in set (0.01 sec) statement_info中的结果: mysql> select statement from system.statement_info where statement like '%EXECUTE%' \G *************************** 1. row *************************** statement: /* 1 queries */ EXECUTE s2 USING @si_min // SELECT * FROM numbers WHERE si=? ; SET @si_min = -9223372036854775808 *************************** 2. row *************************** statement: /* 1 queries */ EXECUTE s2 USING @si_max // SELECT * FROM numbers WHERE si=? ; SET @si_max = 9223372036854775807 ``` **Case2: COM_STMT_EXECUTE** 这类 execute的参数是通过二进制传输的。 **输出格式 execute.... // prepare stmt1 from .... ; param0 ; param1 ...** 样例 ``` statement_info中的结果: execute __mo_stmt_id_1 // prepare __mo_stmt_id_1 from insert into mo_task.sys_cron_task ( task_metadata_id, task_metadata_executor, task_metadata_context, task_metadata_option, cron_expr, next_time, trigger_times, create_at, update_at ) values (?, ?, ?, ?, ?, ?, ?, ?, ?) ; ETLMergeTask ; 2 ; ; {"Concurrency":1} ; 0 */5 * * * * ; 1702377600000 ; 0 ; 1702377597029 ; 1702377597029 ``` Approved by: @qingxinhome, @heni02
matrix-meow
added
size/M
Denotes a PR that changes [100,499] lines
and removed
size/S
Denotes a PR that changes [10,99] lines
labels
Dec 19, 2023
iamlinjunhong
approved these changes
Dec 20, 2023
qingxinhome
approved these changes
Dec 20, 2023
heni02
approved these changes
Dec 20, 2023
nnsgmsone
approved these changes
Dec 20, 2023
ouyuanning
approved these changes
Dec 20, 2023
sukki37
approved these changes
Dec 21, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fix show subscriptions
Approved by: @daviszhen, @iamlinjunhong, @heni02, @ouyuanning, @nnsgmsone
What type of PR is this?
Which issue(s) this PR fixes:
issue #13542
What this PR does / why we need it:
fix show subscriptions