mariadb/mysql-test/main/charset_client_win_utf8mb4.test
Vladislav Vaintroub fe10645eb7
Some checks failed
Build on Windows ARM64 / build (push) Has been cancelled
MDEV-26713 post-fix: don't run charset_client_win_utf8mb4.test in parallel mtr
chcp command affects console codepage, console is shared among all mtr
processes.
2025-05-27 10:24:58 +02:00

28 lines
915 B
Text

--source include/windows.inc
--source include/check_utf8_cli.inc
if(!`select $MTR_PARALLEL = 1`)
{
skip race condition with parallel tests;
}
--exec $MYSQL --default-character-set=auto -e "select @@character_set_client"
# Test that a user with old, non-UTF8 password can still connect
# by setting setting non-auto --default-character-set
# This is important for backward compatibility
# Emulate creating password in an interactive client session, with older clients
# which communicates with the server using with something like cp850
exec chcp 850 > NUL && echo CREATE USER 'u' IDENTIFIED by 'ü' | $MYSQL --default-character-set=cp850;
# Can't connect with UTF8
--error 1
exec $MYSQL --default-character-set=auto --user=u --password=ü -e "select 1" 2>&1;
# Can connect with tweaked --default-character-set
exec $MYSQL --default-character-set=cp850 --user=u --password=ü -e "select 2";
DROP user u;