summaryrefslogtreecommitdiffstats
path: root/sql/debug.cc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 13:39:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 13:39:13 +0000
commit86fbb58c3ac0865482819c10a3e81f2eea001c36 (patch)
tree28c9e526ea739c6f9b89e36115e1e2698bddf981 /sql/debug.cc
parentReleasing progress-linux version 1:10.11.6-2~progress7.99u1. (diff)
downloadmariadb-86fbb58c3ac0865482819c10a3e81f2eea001c36.tar.xz
mariadb-86fbb58c3ac0865482819c10a3e81f2eea001c36.zip
Merging upstream version 1:10.11.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sql/debug.cc')
-rw-r--r--sql/debug.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/debug.cc b/sql/debug.cc
index a0e2340e..beb66775 100644
--- a/sql/debug.cc
+++ b/sql/debug.cc
@@ -40,7 +40,8 @@ static bool debug_decrement_counter(const LEX_CSTRING *name)
THD *thd= current_thd;
user_var_entry *entry= (user_var_entry*)
my_hash_search(&thd->user_vars, (uchar*) name->str, name->length);
- if (!entry || entry->type != INT_RESULT || ! entry->value)
+ if (!entry || !entry->value ||
+ entry->type_handler()->result_type() != INT_RESULT)
return 0;
(*(ulonglong*) entry->value)= (*(ulonglong*) entry->value)-1;
return !*(ulonglong*) entry->value;