## X protocol always coverts resulset to utf8mb4 ## Preamble --source include/xplugin_preamble.inc --source include/xplugin_create_user.inc ## Test starts here --write_file $MYSQL_TMP_DIR/crud_resultset_charset.xpl -->title =Xproto resultset conversion (sql stmt) -->sql select * from xtest.city; -->endsql -->title =Xproto resultset conversion (crud/table stmt) Mysqlx.Crud.Find { collection { name: "city" schema: "xtest" } data_model: TABLE } -->recvresult -->title =Xproto resultset conversion (crud/doc stmt) Mysqlx.Crud.Find { collection { name: "city" schema: "xtest" } data_model: DOCUMENT projection { alias: "Name" source { type: IDENT identifier { name: "Name" } } } projection { alias: "District" source { type: IDENT identifier { name: "District" } } } } -->recvresult EOF CREATE SCHEMA xtest; CREATE TABLE xtest.city ( `Name` CHAR(35) NOT NULL DEFAULT '', `District` CHAR(20) NOT NULL DEFAULT '' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; INSERT INTO xtest.city VALUES (X'4B6F9A696365', X'56FD63686F646EE920536C6F76656E736B6F' ), (X'476F7468656E62757267205B47F67465626F72675D', X'576573742047F674616E6D61616E206CE46E' ), (X'4D616C6DF6', X'536BE56E65206CE46E' ), (X'55707073616C61', X'55707073616C61206CE46E' ), (X'4C696E6BF670696E67', X'456173742047F674616E6D61616E206CE46E' ), (X'56E473746572E573', X'56E473746D616E6C616E6473206CE46E' ), (X'D6726562726F', X'D6726562726F73206CE46E' ), (X'4E6F72726BF670696E67', X'456173742047F674616E6D61616E206CE46E' ), (X'48656C73696E67626F7267', X'536BE56E65206CE46E' ), (X'4AF66E6BF670696E67', X'4AF66E6BF670696E6773206CE46E' ), (X'556D65E5', X'56E473746572626F7474656E73206CE46E' ), (X'4C756E64', X'536BE56E65206CE46E' ), (X'426F72E573', X'576573742047F674616E6D61616E206CE46E' ), (X'53756E647376616C6C', X'56E4737465726E6F72726C616E6473206CE46E'), (X'47E4766C65', X'47E4766C65626F726773206CE46E' ); echo Classic resultset conversion; echo ============================; SELECT * FROM xtest.city; exec $MYSQLXTEST -ux_root --password='' --file=$MYSQL_TMP_DIR/crud_resultset_charset.xpl 2>&1; ## Cleanup DROP SCHEMA IF EXISTS xtest; --remove_file $MYSQL_TMP_DIR/crud_resultset_charset.xpl --source include/xplugin_drop_user.inc