2019-11-27 10:29:03 +01:00
|
|
|
--echo #
|
|
|
|
--echo # MDEV-17088 Provide tools to encode/decode mysql-encoded file system names
|
|
|
|
--echo #
|
|
|
|
|
|
|
|
--character_set latin1
|
|
|
|
|
|
|
|
--echo # default encoding
|
|
|
|
--exec echo "t1" | $MARIADB_CONV
|
2019-12-03 14:21:25 +01:00
|
|
|
--exec echo "t1" | $MARIADB_CONV -f filename --delimiter="\r\n"
|
|
|
|
--exec echo "t1" | $MARIADB_CONV -t filename --delimiter="\r\n"
|
2019-11-27 10:29:03 +01:00
|
|
|
|
|
|
|
--echo # invalid option
|
|
|
|
--replace_regex /.*mariadb-conv.*: unknown/mariadb-conv: unknown/
|
|
|
|
--error 1
|
|
|
|
--exec echo "t1" | $MARIADB_CONV -f filename -r latin1 2>&1 > /dev/null
|
|
|
|
|
|
|
|
--echo # unknown "to" character set
|
|
|
|
--replace_regex /.*mariadb-conv.*: unknown/mariadb-conv: unknown/
|
|
|
|
--error 1
|
|
|
|
--exec echo "t1" | $MARIADB_CONV -f filename -t unknown-cs 2>&1 > /dev/null
|
|
|
|
|
|
|
|
--echo # unknown "from" character set
|
|
|
|
--replace_regex /.*mariadb-conv.*: unknown/mariadb-conv: unknown/
|
|
|
|
--error 1
|
|
|
|
--exec echo "t1" | $MARIADB_CONV -f unknown-cs -t latin1 2>&1 > /dev/null
|
2019-12-03 14:21:25 +01:00
|
|
|
|
|
|
|
--echo # Bad delimiter
|
|
|
|
--error 1
|
|
|
|
--exec echo "t1" | $MARIADB_CONV --delimiter="\x" 2>&1 > /dev/null
|
|
|
|
|
|
|
|
--echo # Conversion error
|
|
|
|
--error 1
|
|
|
|
--exec $MARIADB_CONV -f utf8 -t latin1 < $MYSQL_TEST_DIR/std_data/mariadb-conv/file01.utf8.txt 2>&1
|
|
|
|
--exec $MARIADB_CONV -f utf8 -t latin1 -c < $MYSQL_TEST_DIR/std_data/mariadb-conv/file01.utf8.txt 2>&1
|
|
|
|
|
|
|
|
--echo # Bad input character
|
|
|
|
--error 1
|
|
|
|
--exec $MARIADB_CONV -f utf8 -t latin1 < $MYSQL_TEST_DIR/std_data/mariadb-conv/file02.latin1.txt 2>&1
|
|
|
|
--exec $MARIADB_CONV -f utf8 -t latin1 -c < $MYSQL_TEST_DIR/std_data/mariadb-conv/file02.latin1.txt 2>&1
|