Skip to content

Commit ede5697

Browse files
committed
Addendum 1 to WL#12542: reversed the order of checks. Initialized the
stray value RB#24808
1 parent d6cd400 commit ede5697

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

sql/protocol_classic.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2864,6 +2864,7 @@ bool Protocol_classic::parse_packet(union COM_DATA *data,
28642864
Prepared_statement *stmt =
28652865
m_thd->stmt_map.find(data->com_stmt_execute.stmt_id);
28662866
data->com_stmt_execute.parameter_count = 0;
2867+
data->com_stmt_execute.parameters = nullptr;
28672868

28682869
/*
28692870
If no statement found there's no need to generate error.

sql/server_component/mysql_query_attributes_imp.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class iterator {
6161
bool init(MYSQL_THD hthd, const char *name) {
6262
thd = hthd ? dynamic_cast<THD *>(hthd) : current_thd;
6363
if (!thd) return true;
64-
if (!thd->bind_parameter_values || !thd->bind_parameter_values_count)
64+
if (!thd->bind_parameter_values_count || !thd->bind_parameter_values)
6565
return true;
6666
/* set to first element*/
6767
ofs = 0;

0 commit comments

Comments
 (0)