Bug #103547 innodb_thread_concurrency=0, the suspended thread cannot enter the innodb engine
Submitted: 30 Apr 2021 17:29 Modified: 18 May 2021 13:16
Reporter: Mips Lee Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:5.6.5 OS:Linux
Assigned to: CPU Architecture:x86
Tags: innodb_thread_concurrency

[30 Apr 2021 17:29] Mips Lee
Description:
When I tested this variable, I found that: first set innodb_thread_concurrency from 0 to 1, then sessionA-thread successfully entered, and then sessionB-thread was blocked. This result is in line with expectations. But when I changed innodb_thread_concurrency back to 0, sessionB-thread was still blocked, so I tried to disconnect SessionA-Thread, but found that sessionB-thread was still blocked. But if I don't change innodb_thread_concurrency 1 ->0 and disconnect SessionA-Thread, sessionB-thread can successfully enter the innodb engine.

How to repeat:
##set global innodb_thread_concurrency = 0;
set global innodb_thread_concurrency = 1;

#Scene 1
session a   thread_a  entered the innodb_engine 
session b   thread_b blocked;
exit thread_a;
thread_b entered the innodb_engine;
expected.

#Scene 2
session a   thread_a  entered the innodb_engine 
session b   thread_b blocked;

session c : set global innodb_thread_concurrency = 0;

session b   thread_b still blocked! -- unexpected
exit thread_a;
session b   thread_b still still blocked --more unexpected
[18 May 2021 13:16] MySQL Verification Team
Hi Mr. Lee,

Thank you for your bug report.

However, this is not a bug.

Version 5.6 is not maintained any more. Upgrade to latest release of the version 5.7.