summaryrefslogtreecommitdiff
path: root/sql/item_func.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r--sql/item_func.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc
index 659a214e9c2..7047c874c2a 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -3377,7 +3377,11 @@ longlong Item_func_release_lock::val_int()
}
else
{
+#ifdef EMBEDDED_LIBRARY
+ if (ull->locked && pthread_equal(current_thd->real_id,ull->thread))
+#else
if (ull->locked && pthread_equal(pthread_self(),ull->thread))
+#endif
{
result=1; // Release is ok
item_user_lock_release(ull);