mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
2c7b6214e7
- Load and convert the entire input file at once, rather than reading string-by-string using fgets(). This change makes it possible to convert from UCS2, UTF16, UTF32 data. - Adding the --delimiter command, to treat the specified characters as delimiters rather than data to convert. Useful in combination with `-f filename` or `-t filename`. The delimiter characters are not converted, they are copied from the input to the output as is. - Adding diagnostics with line number and position if: * an illegal input byte sequence was found * a character cannot be converted to the target character set
49 lines
1.1 KiB
Text
49 lines
1.1 KiB
Text
#
|
||
# MDEV-17088 Provide tools to encode/decode mysql-encoded file system names
|
||
#
|
||
SET NAMES cp932;
|
||
@6e2c@8a66@8cc7@6599
|
||
‘ªŽŽŽ‘—¿ŒÉ
|
||
@6e2c@8a66@8cc7@6599
|
||
‘ªŽŽŽ‘—¿
|
||
‘ªŽŽŽ‘—¿ŒÉ
|
||
@6e2c@8a66@8cc7@6599@5eab
|
||
# bulk convert with pipe
|
||
CREATE TABLE t1 (id SERIAL, a VARCHAR(64) CHARACTER SET cp932);
|
||
INSERT INTO t1 (a) VALUES ('‘ªŽŽŽ‘—¿'), ('‘ªŽŽŽ‘—¿2');
|
||
a
|
||
@6e2c@8a66@8cc7@6599
|
||
@6e2c@8a66@8cc7@65992
|
||
BINARY CONVERT(a USING filename)
|
||
@6e2c@8a66@8cc7@6599
|
||
@6e2c@8a66@8cc7@65992
|
||
‘ªŽŽŽ‘—¿
|
||
‘ªŽŽŽ‘—¿2
|
||
test/‘ªŽŽŽ‘—¿.frm
|
||
test/‘ªŽŽŽ‘—¿2.frm
|
||
test/‘ªŽŽŽ‘—¿.frm
|
||
test/‘ªŽŽŽ‘—¿2.frm
|
||
DROP TABLE t1;
|
||
# bulk convert with file
|
||
# --- Start of mariadb-conv for mysql-conv-test-cp932.txt ---
|
||
|
||
@6e2c@8a66@8cc7@6599
|
||
|
||
@6e2c@8a66@8cc7@65992
|
||
@6e2c@8a66@8cc7@65993
|
||
|
||
# --- End of mariadb-conv for mysql-conv-test-cp932.txt ---
|
||
# --- Start of mariadb-conv for mysql-conv-test-cp932.txt and mysql-conv-test-cp932-2.txt ---
|
||
|
||
@6e2c@8a66@8cc7@6599
|
||
|
||
@6e2c@8a66@8cc7@65992
|
||
@6e2c@8a66@8cc7@65993
|
||
|
||
|
||
@6e2c@8a66@8cc7@6599
|
||
|
||
@6e2c@8a66@8cc7@65992
|
||
@6e2c@8a66@8cc7@65993
|
||
|
||
# --- Start of mariadb-conv for mysql-conv-test-cp932.txt and mysql-conv-test-cp932-2.txt ---
|