Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.4(EOL), 10.5, 10.6, 10.11, 11.0(EOL), 11.1(EOL), 11.2(EOL), 11.4, 11.5(EOL)
Description
For some character sets, SET NAMES <charset> is forbidden.
However, the client still allows \C <charset> without a complaint, and the next command causes a SIGSEGV.
--exec $MYSQL test -e '\C utf32 ; SELECT 1'
|
--echo # Success |
10.5 3d4174762563afcc2532e86c5a6c5686daa52fad |
Program terminated with signal SIGSEGV, Segmentation fault.
|
#0 0x000055609b217f79 in add_line (buffer=..., line=0x55609cb86408 "\\C utf32 ; SELECT 1", line_length=19, in_string=0x7fff6110f026 "", ml_comment=0x7fff6110f027, truncated=false) at /data/bld/10.5-debug/client/mysql.cc:2388
|
2388 if (my_isspace(charset_info,inchar) && (out == line) &&
|
 |
Thread 1 (Thread 0x7f23738a0740 (LWP 2705702)):
|
#0 0x000055609b217f79 in add_line (buffer=..., line=0x55609cb86408 "\\C utf32 ; SELECT 1", line_length=19, in_string=0x7fff6110f026 "", ml_comment=0x7fff6110f027, truncated=false) at /10.5/client/mysql.cc:2388
|
#1 0x000055609b2177c4 in read_and_execute (interactive=false) at /10.5/client/mysql.cc:2210
|
#2 0x000055609b216172 in main (argc=12, argv=0x55609cb86960) at /10.5/client/mysql.cc:1286
|
Reproducible with all existing versions, and (at least) with MySQL 8.0.35.