Bug #99796 Python multiprocessing not working
Submitted: 7 Jun 2020 12:07 Modified: 8 Jun 2020 12:32
Reporter: Jesper Wisborg Krogh Email Updates:
Status: Verified Impact on me:
None 
Category:Shell General / Core Client Severity:S2 (Serious)
Version:8.0.20 OS:Microsoft Windows
Assigned to: CPU Architecture:Any

[7 Jun 2020 12:07] Jesper Wisborg Krogh
Description:
If you try to use the multiprocessing module in Python mode in MySQL Shell, an error occurs when you try to start the processes:

py> proc.start()
C:\Program Files\MySQL\MySQL Shell 8.0\bin\mysqlsh.exe: unknown option -c

How to repeat:
py> import multiprocessing

py> def run_proc():
 ->     print(f'Hello World')
 ->

py> proc = multiprocessing.Process(target=run_proc)

py> proc.start()
C:\Program Files\MySQL\MySQL Shell 8.0\bin\mysqlsh.exe: unknown option -c

py> proc.join

py> proc.close()

Suggested fix:
If it is deemed impossible to support multiprocessing, at least remove the module, so it is clear that it is not supported.
[7 Jun 2020 12:07] Jesper Wisborg Krogh
The workaround is to use the threading module (and the queue module if you need queues) instead.
[8 Jun 2020 12:32] MySQL Verification Team
Dear Jesper,

Thank you for the report and feedback.

regards,
Umesh