Skip to content

Commit cc1bbfb

Browse files
committed
Merge branch 'mysql-8.4' into mysql-trunk
Change-Id: I89bd2e05b05f61ac6cd98bd833c477411fee74ab
2 parents e700474 + 5d90b67 commit cc1bbfb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sql/rpl_async_conn_failover_add_source_udf.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ bool Rpl_async_conn_failover_add_source::add_source_init(UDF_INIT *init_id,
128128
return true;
129129
}
130130

131-
if (args->arg_type[2] != INT_RESULT) {
131+
if (args->arg_type[2] != INT_RESULT || args->args[2] == nullptr) {
132132
my_stpcpy(message, "Wrong arguments: You need to specify value for port.");
133133
return true;
134134
}
@@ -141,7 +141,8 @@ bool Rpl_async_conn_failover_add_source::add_source_init(UDF_INIT *init_id,
141141
}
142142

143143
if (args->arg_count == 5 &&
144-
(args->arg_type[4] != INT_RESULT || (*((long long *)args->args[4]) < 1) ||
144+
(args->arg_type[4] != INT_RESULT || args->args[4] == nullptr ||
145+
(*((long long *)args->args[4]) < 1) ||
145146
(*((long long *)args->args[4]) > 100))) {
146147
my_stpcpy(message,
147148
"Wrong arguments: The weight argument value should be integer "

0 commit comments

Comments
 (0)