⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.124
Server IP:
50.28.103.30
Server:
Linux host.jcukjv-lwsites.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
Server Software:
nginx/1.28.0
PHP Version:
8.3.12
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
www
/
server
/
mysql
/
mysql-test
/
r
/
View File Name :
ctype_gb18030_encoding_cn.result
SET NAMES gb18030; SET CHARACTER_SET_DATABASE = gb18030; Warnings: Warning 1681 Updating 'character_set_database' is deprecated. It will be made read-only in a future release. CREATE DATABASE `����`; CREATE DATABASE `��ݿ�`; SELECT schema_name, HEX(schema_name) FROM information_schema.schemata WHERE schema_name NOT IN ('mtr', 'sys'); schema_name HEX(schema_name) information_schema 696E666F726D6174696F6E5F736368656D61 ���� E4B8ADE69687 ��ݿ� E695B0E68DAEE5BA93 mysql 6D7973716C performance_schema 706572666F726D616E63655F736368656D61 test 74657374 USE `��ݿ�`; USE `����`; DROP DATABASE `��ݿ�`; DROP DATABASE `����`; USE test; 'Test for CREATE TABLE' CREATE TABLE `���` (`�ֶ�һ` CHAR(1)) DEFAULT CHARSET = gb18030; CREATE TABLE `ģʽ` (`����` CHAR(1)) DEFAULT CHARSET = gb18030; CREATE TABLE `�Jແ9�0` (`�Ё9�3�9�4` CHAR(1)) DEFAULT CHARSET = gb18030; CREATE TABLE IF NOT EXISTS `���`(`�ֶ�һ` CHAR(1)) DEFAULT CHARSET = gb18030; Warnings: Note 1050 Table '���' already exists CREATE TABLE IF NOT EXISTS `ģʽ` (`����` CHAR(1)) DEFAULT CHARSET = gb18030; Warnings: Note 1050 Table 'ģʽ' already exists CREATE TABLE IF NOT EXISTS `�Jແ9�0` (`�Ё9�3�9�4` CHAR(1)) DEFAULT CHARSET = gb18030; Warnings: Note 1050 Table '�Jແ9�0' already exists CREATE TABLE IF NOT EXISTS `�9�4�9�4�9�4` (`�9�3�9�3�9�3` CHAR(1)) DEFAULT CHARSET = gb18030; CREATE TEMPORARY TABLE `�9�6�9�7�9�8` (`�9�5�9�5�9�5` CHAR(1)) DEFAULT CHARSET = gb18030; DESC `���`; Field Type Null Key Default Extra �ֶ�һ char(1) YES NULL DESC `ģʽ`; Field Type Null Key Default Extra ���� char(1) YES NULL DESC `�Jແ9�0`; Field Type Null Key Default Extra �Ё9�3�9�4 char(1) YES NULL DESC `�9�4�9�4�9�4`; Field Type Null Key Default Extra �9�3�9�3�9�3 char(1) YES NULL DESC `�9�6�9�7�9�8`; Field Type Null Key Default Extra �9�5�9�5�9�5 char(1) YES NULL SHOW CREATE TABLE `���`; Table Create Table ��� CREATE TABLE `���` ( `�ֶ�һ` char(1) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=gb18030 SHOW CREATE TABLE `ģʽ`; Table Create Table ģʽ CREATE TABLE `ģʽ` ( `����` char(1) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=gb18030 SHOW CREATE TABLE `�Jແ9�0`; Table Create Table �Jແ9�0 CREATE TABLE `�Jແ9�0` ( `�Ё9�3�9�4` char(1) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=gb18030 SHOW CREATE TABLE `�9�4�9�4�9�4`; Table Create Table �9�4�9�4�9�4 CREATE TABLE `�9�4�9�4�9�4` ( `�9�3�9�3�9�3` char(1) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=gb18030 SHOW CREATE TABLE `�9�6�9�7�9�8`; Table Create Table �9�6�9�7�9�8 CREATE TEMPORARY TABLE `�9�6�9�7�9�8` ( `�9�5�9�5�9�5` char(1) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=gb18030 DROP TABLE `���`, `ģʽ`, `�Jແ9�0`, `�9�4�9�4�9�4`, `�9�6�9�7�9�8`; 'Test for ALTER TABLE' CREATE TABLE `���` (`�ֶ�һ` CHAR(5)) DEFAULT CHARSET = gb18030; CREATE TABLE `�Jແ9�0` (`�9�1�9�2�9�3` CHAR(5)) DEFAULT CHARSET = gb18030; INSERT INTO `���` VALUES ('һ����ĕ2�8'), ('���߰˾�ʮ'), ('�9�4�9�5�9�6�9�7�9�8'), ('�2�6�2�8�0�5�5�2�5�0'); INSERT INTO `�Jແ9�0` VALUES ('���3�6���F'), ('�h���h���h'), ('�9�2�9�3�9�6�9�7�9�9'); ALTER TABLE `���` ADD `���ֶ�һ` CHAR(1) FIRST; ALTER TABLE `���` ADD `���ֶζ�` CHAR(1) AFTER `�ֶ�һ`; ALTER TABLE `���` ADD `���ֶ��` CHAR(1); ALTER TABLE `���` ADD INDEX (`���ֶζ�`); ALTER TABLE `���` ADD PRIMARY KEY (`�ֶ�һ`); ALTER TABLE `���` ADD UNIQUE (`���ֶ��`); ALTER TABLE `���` CHANGE `���ֶζ�` `�3�2�3�2һ` CHAR(1); ALTER TABLE `���` MODIFY `���ֶ��` CHAR(6); SELECT * FROM `���`; ���ֶ�һ �ֶ�һ �3�2�3�2һ ���ֶ�� NULL �2�6�2�8�0�5�5�2�5�0 NULL NULL NULL ���߰˾�ʮ NULL NULL NULL �9�4�9�5�9�6�9�7�9�8 NULL NULL NULL һ����ĕ2�8 NULL NULL DESC `���`; Field Type Null Key Default Extra ���ֶ�һ char(1) YES NULL �ֶ�һ char(5) NO PRI NULL �3�2�3�2һ char(1) YES MUL NULL ���ֶ�� char(6) YES UNI NULL SHOW CREATE TABLE `���`; Table Create Table ��� CREATE TABLE `���` ( `���ֶ�һ` char(1) DEFAULT NULL, `�ֶ�һ` char(5) NOT NULL, `�3�2�3�2һ` char(1) DEFAULT NULL, `���ֶ��` char(6) DEFAULT NULL, PRIMARY KEY (`�ֶ�һ`), UNIQUE KEY `���ֶ��` (`���ֶ��`), KEY `���ֶζ�` (`�3�2�3�2һ`) ) ENGINE=InnoDB DEFAULT CHARSET=gb18030 ALTER TABLE `���` DROP INDEX `���ֶζ�`; ALTER TABLE `���` DROP PRIMARY KEY; ALTER TABLE `���` DROP INDEX `���ֶ��`; ALTER TABLE `���` DROP `�3�2�3�2һ`; ALTER TABLE `���` DROP `���ֶ�һ`; ALTER TABLE `���` DROP `���ֶ��`; SELECT * FROM `���`; �ֶ�һ �2�6�2�8�0�5�5�2�5�0 ���߰˾�ʮ �9�4�9�5�9�6�9�7�9�8 һ����ĕ2�8 DESC `���`; Field Type Null Key Default Extra �ֶ�һ char(5) NO NULL SHOW CREATE TABLE `���`; Table Create Table ��� CREATE TABLE `���` ( `�ֶ�һ` char(5) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=gb18030 DROP TABLE `���`, `�Jແ9�0`; 'Test for INSERT/UPDATE/DELETE' CREATE TABLE `��һ` (`�ֶ�һ` char(5)) DEFAULT CHARSET = gb18030; INSERT INTO `��һ` VALUES ('���5�3��5�2��'); SELECT INSERT(`�ֶ�һ`, 1, 1, '�9�9') FROM `��һ`; INSERT(`�ֶ�һ`, 1, 1, '�9�9') �9�9�5�3��5�2�� SELECT INSERT(`�ֶ�һ`, 1, 2, '�9�9') FROM `��һ`; INSERT(`�ֶ�һ`, 1, 2, '�9�9') �9�9��5�2�� SELECT INSERT(`�ֶ�һ`, 1, 3, '�9�9') FROM `��һ`; INSERT(`�ֶ�һ`, 1, 3, '�9�9') �9�9�5�2�� SELECT INSERT(`�ֶ�һ`, 1, 4, '�9�9') FROM `��һ`; INSERT(`�ֶ�һ`, 1, 4, '�9�9') �9�9�� SELECT INSERT(`�ֶ�һ`, 1, 5, '�9�9') FROM `��һ`; INSERT(`�ֶ�һ`, 1, 5, '�9�9') �9�9 SELECT INSERT(`�ֶ�һ`, 4, 1, '�5�4') FROM `��һ`; INSERT(`�ֶ�һ`, 4, 1, '?') ���5�3��5�4�� SELECT INSERT(`�ֶ�һ`, 4, 2, '�5�4') FROM `��һ`; INSERT(`�ֶ�һ`, 4, 2, '?') ���5�3��5�4 SELECT INSERT(`�ֶ�һ`, 5, 1, '�5�4') FROM `��һ`; INSERT(`�ֶ�һ`, 5, 1, '?') ���5�3��5�2�5�4 SELECT INSERT(`�ֶ�һ`, 1, 1, ' ') FROM `��һ`; INSERT(`�ֶ�һ`, 1, 1, ' ') �5�3��5�2�� SELECT INSERT(`�ֶ�һ`, 1, 2, ' ') FROM `��һ`; INSERT(`�ֶ�һ`, 1, 2, ' ') ��5�2�� SELECT INSERT(`�ֶ�һ`, 1, 3, ' ') FROM `��һ`; INSERT(`�ֶ�һ`, 1, 3, ' ') �5�2�� SELECT INSERT(`�ֶ�һ`, 1, 4, ' ') FROM `��һ`; INSERT(`�ֶ�һ`, 1, 4, ' ') �� SELECT INSERT(`�ֶ�һ`, 1, 5, ' ') FROM `��һ`; INSERT(`�ֶ�һ`, 1, 5, ' ') SELECT INSERT(`�ֶ�һ`, 4, 1, ' ') FROM `��һ`; INSERT(`�ֶ�һ`, 4, 1, ' ') ���5�3� �� SELECT INSERT(`�ֶ�һ`, 4, 2, ' ') FROM `��һ`; INSERT(`�ֶ�һ`, 4, 2, ' ') ���5�3� SELECT INSERT(`�ֶ�һ`, 5, 1, ' ') FROM `��һ`; INSERT(`�ֶ�һ`, 5, 1, ' ') ���5�3��5�2 SELECT INSERT(`�ֶ�һ`, 1, 1, '��') FROM `��һ`; INSERT(`�ֶ�һ`, 1, 1, '��') ���5�3��5�2�� SELECT INSERT(`�ֶ�һ`, 1, 2, '����') FROM `��һ`; INSERT(`�ֶ�һ`, 1, 2, '����') ������5�2�� SELECT INSERT(`�ֶ�һ`, 1, 3, '������') FROM `��һ`; INSERT(`�ֶ�һ`, 1, 3, '������') �������5�2�� SELECT INSERT(`�ֶ�һ`, 1, 4, '��������') FROM `��һ`; INSERT(`�ֶ�һ`, 1, 4, '��������') ���������� SELECT INSERT(`�ֶ�һ`, 1, 5, '����������') FROM `��һ`; INSERT(`�ֶ�һ`, 1, 5, '����������') ���������� SELECT INSERT(`�ֶ�һ`, 4, 1, '�2�8') FROM `��һ`; INSERT(`�ֶ�һ`, 4, 1, '?') ���5�3��2�8�� SELECT INSERT(`�ֶ�һ`, 4, 2, '�2�8�2�8') FROM `��һ`; INSERT(`�ֶ�һ`, 4, 2, '??') ���5�3��2�8�2�8 SELECT INSERT(`�ֶ�һ`, 5, 1, '�2�8') FROM `��һ`; INSERT(`�ֶ�һ`, 5, 1, '?') ���5�3��5�2�2�8 UPDATE `��һ` SET `�ֶ�һ` = ('�������2�8'); SELECT * FROM `��һ`; �ֶ�һ �������2�8 DELETE FROM `��һ` WHERE `�ֶ�һ` = '���5�3��5�2��'; SELECT * FROM `��һ`; �ֶ�һ �������2�8 DELETE FROM `��һ`; SELECT * FROM `��һ`; �ֶ�һ 'Test for CHAR, VARCHAR, TEXT' CREATE TABLE `��` (c CHAR(5), v VARCHAR(10), t TEXT) DEFAULT CHARSET = gb18030; INSERT INTO `��` VALUES ('�����5�2�5�0��', '�䳤�2�8�0�5�5�2�ַ����ֶ�', '�ı������5�2�5�3�5�4�ֶ�'); SELECT * FROM `��`; c v t �����5�2�5�0�� �䳤�2�8�0�5�5�2�ַ����ֶ� �ı������5�2�5�3�5�4�ֶ� TRUNCATE `��`; DROP TABLE `��һ`, `��`; 'Test for ENUM' CREATE TABLE `��` (e ENUM('��', '��', 'Ŀ', '��', '��'), INDEX(e)) DEFAULT CHARSET = gb18030; INSERT INTO `��` VALUES('��'), ('��'), ('Ŀ'), ('��'), ('��'); SELECT * FROM `��`; e �� �� Ŀ �� �� ALTER TABLE `��` ADD c CHAR(1) NOT NULL FIRST; SHOW CREATE TABLE `��`; Table Create Table �� CREATE TABLE `��` ( `c` char(1) NOT NULL, `e` enum('��','��','Ŀ','��','��') DEFAULT NULL, KEY `e` (`e`) ) ENGINE=InnoDB DEFAULT CHARSET=gb18030 DESC `��`; Field Type Null Key Default Extra c char(1) NO NULL e enum('��','��','Ŀ','��','��') YES MUL NULL DROP TABLE `��`; 'Test for WHERE/LIKE' CREATE TABLE `��һ` (c1 CHAR(20), INDEX(c1)) DEFAULT CHARSET = gb18030; INSERT INTO `��һ` VALUES ('�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9'); INSERT INTO `��һ` VALUES ('�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�0�2�0�9�0�8�0�3�6�4'); INSERT INTO `��һ` VALUES ('���9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9'); INSERT INTO `��һ` VALUES ('�9�9�9�9�9�9�9�9�9�9�0�0�0�2�0�3�0�4�0�2�9�9�0�6�9�9�0�8�0�3�9�9�0�9�9�9�9�9�9�9'); INSERT INTO `��һ` VALUES ('�9�9�0�4�0�5�0�6�0�7�0�0�0�0�0�2�0�9�0�3�0�1�0�8�0�4�9�9�9�9�9�9�9�9�9�9�9�9�9�9'); INSERT INTO `��һ` VALUES ('�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�0�5�0�6�0�7�0�8�0�9�0�0'); INSERT INTO `��һ` VALUES ('�0�1�0�2�0�3�0�4�0�5�0�7�0�8�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9'); INSERT INTO `��һ` VALUES (' !"#$%&\'()*+,-./'); INSERT INTO `��һ` VALUES ('0123456789:;<=>?'); INSERT INTO `��һ` VALUES ('@ABCDEFGHIJKLMNO'); INSERT INTO `��һ` VALUES ('PQRSTUVWXYZ[\\]^_'); INSERT INTO `��һ` VALUES ('abcdefghijklmno'); INSERT INTO `��һ` VALUES ('pqrstuvwxyz{|}~'); INSERT INTO `��һ` VALUES ('�9�9�0�9�0�8�0�2�0�0�0�9�0�5�0�8�0�1�0�3�0�1�0�3�0�5�0�9�0�5�0�7�0�1�0�7�0�6�0�9'); INSERT INTO `��һ` VALUES ('�0�8�0�2�0�8�0�5�0�0�9�9�0�3�0�5�0�9�0�7�0�1�0�1�0�0�0�3�0�2�0�6�0�2�0�7�0�0�0�5'); INSERT INTO `��һ` VALUES ('�0�6�0�8�0�1�0�5�0�3�0�1�0�4�0�2�0�5�0�7�0�6�0�0�0�8�0�7�0�1�0�8�0�9�0�5�0�9�0�7'); INSERT INTO `��һ` VALUES ('�0�1�0�3�0�7�0�5�0�1�0�9�0�3�0�2�0�5�0�4�0�8�0�8�0�2�0�7�0�4�0�0�0�5�0�0�0�2�0�1'); INSERT INTO `��һ` VALUES ('�0�9�0�6�0�6�0�0�0�8�0�1�0�5�0�3�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9'); INSERT INTO `��һ` VALUES ('�9�9�����0�1�0�9�0�0�����0�2�0�2�0�0�0�4�0�6�0�0�0�4�0�8�0�2�����0�5'); INSERT INTO `��һ` VALUES ('�����0�9���0�1�0�7�0�4�0�6�9�9�0�8�0�2�����0�7�0�6���9�9���0�1�0�6'); INSERT INTO `��һ` VALUES ('�0�7�0�9�0�2�0�6�0�4�����0�3�0�9�����0�2�0�0���0�2���0�1�0�6�0�0�0�8'); INSERT INTO `��һ` VALUES ('�0�2�0�4�0�8�0�6�0�2�0�0�������0�4�0�9���0�3���0�5�0�1�0�6������'); INSERT INTO `��һ` VALUES ('���0�7�0�5�0�7�0�9�0�2�0�6�0�4�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9'); INSERT INTO `��һ` VALUES ('�9�9�@�A�Bآ�E�G�J��حѾ�M�N��Q�T�U�Wر�Z'); INSERT INTO `��һ` VALUES ('�]ؿ�`�d��l�m�q�vء�����������ꁗ������'); INSERT INTO `��һ` VALUES ('��큣������݁���������������������'); INSERT INTO `��һ` VALUES ('�����āŁƁǁȁɁˁ́сҁԁՁցׁ���'); INSERT INTO `��һ` VALUES ('١Ӷ��Ё�������٫���ֶ�9�9�9�9�9�9�9�9�9�9'); INSERT INTO `��һ` VALUES ('�9�9�u�x�{�|����ؾ��������ػܱ������������'); INSERT INTO `��һ` VALUES ('�������@�B�����F�G���H�J�L���M�N�O�Y�[�\'); INSERT INTO `��һ` VALUES ('�]�^�`�c�d�n�o�s�t�u�v�w�y�{������������'); INSERT INTO `��һ` VALUES ('�����������������9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9'); INSERT INTO `��һ` VALUES ('�����������������2�6�2�8�0�5�5�2�5�0�5�1�5�2�5�3�5�4�5�3�5�4'); SELECT * FROM `��һ`; c1 !"#$%&'()*+,-./ 0123456789:;<=>? @ABCDEFGHIJKLMNO abcdefghijklmno PQRSTUVWXYZ[\]^_ pqrstuvwxyz{|}~ ���9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9 �����0�9���0�1�0�7�0�4�0�6�9�9�0�8�0�2�����0�7�0�6���9�9���0�1�0�6 �0�8�0�2�0�8�0�5�0�0�9�9�0�3�0�5�0�9�0�7�0�1�0�1�0�0�0�3�0�2�0�6�0�2�0�7�0�0�0�5 �0�6�0�8�0�1�0�5�0�3�0�1�0�4�0�2�0�5�0�7�0�6�0�0�0�8�0�7�0�1�0�8�0�9�0�5�0�9�0�7 �0�7�0�9�0�2�0�6�0�4�����0�3�0�9�����0�2�0�0���0�2���0�1�0�6�0�0�0�8 �0�1�0�3�0�7�0�5�0�1�0�9�0�3�0�2�0�5�0�4�0�8�0�8�0�2�0�7�0�4�0�0�0�5�0�0�0�2�0�1 �0�2�0�4�0�8�0�6�0�2�0�0�������0�4�0�9���0�3���0�5�0�1�0�6������ �0�9�0�6�0�6�0�0�0�8�0�1�0�5�0�3�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9 ���0�7�0�5�0�7�0�9�0�2�0�6�0�4�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9 �0�1�0�2�0�3�0�4�0�5�0�7�0�8�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9 �9�9�0�9�0�8�0�2�0�0�0�9�0�5�0�8�0�1�0�3�0�1�0�3�0�5�0�9�0�5�0�7�0�1�0�7�0�6�0�9 �9�9�����0�1�0�9�0�0�����0�2�0�2�0�0�0�4�0�6�0�0�0�4�0�8�0�2�����0�5 �9�9�0�4�0�5�0�6�0�7�0�0�0�0�0�2�0�9�0�3�0�1�0�8�0�4�9�9�9�9�9�9�9�9�9�9�9�9�9�9 �9�9�9�9�9�9�9�9�9�9�0�0�0�2�0�3�0�4�0�2�9�9�0�6�9�9�0�8�0�3�9�9�0�9�9�9�9�9�9�9 �9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�0�5�0�6�0�7�0�8�0�9�0�0 �9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�0�2�0�9�0�8�0�3�6�4 �9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9 �9�9�@�A�Bآ�E�G�J��حѾ�M�N��Q�T�U�Wر�Z �9�9�u�x�{�|����ؾ��������ػܱ������������ ��큣������݁��������������������� �����������������9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9 �����������������2�6�2�8�0�5�5�2�5�0�5�1�5�2�5�3�5�4�5�3�5�4 �����āŁƁǁȁɁˁ́сҁԁՁցׁ��� �������@�B�����F�G���H�J�L���M�N�O�Y�[�\ ١Ӷ��Ё�������٫���ֶ�9�9�9�9�9�9�9�9�9�9 �]�^�`�c�d�n�o�s�t�u�v�w�y�{������������ �]ؿ�`�d��l�m�q�vء�����������ꁗ������ SELECT * FROM `��һ` WHERE c1 LIKE ' %'; c1 !"#$%&'()*+,-./ SELECT * FROM `��һ` WHERE c1 LIKE '% %'; c1 !"#$%&'()*+,-./ SELECT * FROM `��һ` WHERE c1 LIKE '% '; c1 SELECT * FROM `��һ` WHERE c1 LIKE '��%'; c1 ��큣������݁��������������������� SELECT * FROM `��һ` WHERE c1 LIKE '%�q�v%'; c1 �]ؿ�`�d��l�m�q�vء�����������ꁗ������ SELECT * FROM `��һ` WHERE c1 LIKE '%��'; c1 �����āŁƁǁȁɁˁ́сҁԁՁցׁ��� SELECT * FROM `��һ` WHERE c1 LIKE '�������@�B�����F�G���H�J�L���M�N�O�Y�[�\%'; c1 �������@�B�����F�G���H�J�L���M�N�O�Y�[�\ SELECT * FROM `��һ` WHERE c1 LIKE '%�������@�B�����F�G���H�J�L���M�N�O�Y�[�\%'; c1 �������@�B�����F�G���H�J�L���M�N�O�Y�[�\ SELECT * FROM `��һ` WHERE c1 LIKE '%�������@�B�����F�G���H�J�L���M�N�O�Y�[�\'; c1 �������@�B�����F�G���H�J�L���M�N�O�Y�[�\ SELECT * FROM `��һ` WHERE c1 = '�0�6�0�8�0�1�0�5�0�3�0�1�0�4�0�2�0�5�0�7�0�6�0�0�0�8�0�7�0�1�0�8�0�9�0�5�0�9�0�7'; c1 �0�6�0�8�0�1�0�5�0�3�0�1�0�4�0�2�0�5�0�7�0�6�0�0�0�8�0�7�0�1�0�8�0�9�0�5�0�9�0�7 �0�7�0�9�0�2�0�6�0�4�����0�3�0�9�����0�2�0�0���0�2���0�1�0�6�0�0�0�8 SELECT * FROM `��һ` WHERE c1 = '�]ؿ�`�d��l�m�q�vء�����������ꁗ������'; c1 �]ؿ�`�d��l�m�q�vء�����������ꁗ������ SELECT * FROM `��һ` WHERE c1 = '�]�^�`�c�d�n�o�s�t�u�v�w�y�{������������'; c1 �]�^�`�c�d�n�o�s�t�u�v�w�y�{������������ SELECT * FROM `��һ` WHERE c1 = '�����������������2�6�2�8�0�5�5�2�5�0�5�1�5�2�5�3�5�4�5�3�5�4'; c1 �����������������2�6�2�8�0�5�5�2�5�0�5�1�5�2�5�3�5�4�5�3�5�4 'Test for CONVERT' SELECT c1, CONVERT(c1 USING gb18030) FROM `��һ`; c1 CONVERT(c1 USING gb18030) !"#$%&'()*+,-./ !"#$%&'()*+,-./ 0123456789:;<=>? 0123456789:;<=>? @ABCDEFGHIJKLMNO @ABCDEFGHIJKLMNO abcdefghijklmno abcdefghijklmno PQRSTUVWXYZ[\]^_ PQRSTUVWXYZ[\]^_ pqrstuvwxyz{|}~ pqrstuvwxyz{|}~ ���9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9 ���9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9 �����0�9���0�1�0�7�0�4�0�6�9�9�0�8�0�2�����0�7�0�6���9�9���0�1�0�6 �����0�9���0�1�0�7�0�4�0�6�9�9�0�8�0�2�����0�7�0�6���9�9���0�1�0�6 �0�8�0�2�0�8�0�5�0�0�9�9�0�3�0�5�0�9�0�7�0�1�0�1�0�0�0�3�0�2�0�6�0�2�0�7�0�0�0�5 �0�8�0�2�0�8�0�5�0�0�9�9�0�3�0�5�0�9�0�7�0�1�0�1�0�0�0�3�0�2�0�6�0�2�0�7�0�0�0�5 �0�6�0�8�0�1�0�5�0�3�0�1�0�4�0�2�0�5�0�7�0�6�0�0�0�8�0�7�0�1�0�8�0�9�0�5�0�9�0�7 �0�6�0�8�0�1�0�5�0�3�0�1�0�4�0�2�0�5�0�7�0�6�0�0�0�8�0�7�0�1�0�8�0�9�0�5�0�9�0�7 �0�7�0�9�0�2�0�6�0�4�����0�3�0�9�����0�2�0�0���0�2���0�1�0�6�0�0�0�8 �0�7�0�9�0�2�0�6�0�4�����0�3�0�9�����0�2�0�0���0�2���0�1�0�6�0�0�0�8 �0�1�0�3�0�7�0�5�0�1�0�9�0�3�0�2�0�5�0�4�0�8�0�8�0�2�0�7�0�4�0�0�0�5�0�0�0�2�0�1 �0�1�0�3�0�7�0�5�0�1�0�9�0�3�0�2�0�5�0�4�0�8�0�8�0�2�0�7�0�4�0�0�0�5�0�0�0�2�0�1 �0�2�0�4�0�8�0�6�0�2�0�0�������0�4�0�9���0�3���0�5�0�1�0�6������ �0�2�0�4�0�8�0�6�0�2�0�0�������0�4�0�9���0�3���0�5�0�1�0�6������ �0�9�0�6�0�6�0�0�0�8�0�1�0�5�0�3�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9 �0�9�0�6�0�6�0�0�0�8�0�1�0�5�0�3�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9 ���0�7�0�5�0�7�0�9�0�2�0�6�0�4�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9 ���0�7�0�5�0�7�0�9�0�2�0�6�0�4�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9 �0�1�0�2�0�3�0�4�0�5�0�7�0�8�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9 �0�1�0�2�0�3�0�4�0�5�0�7�0�8�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9 �9�9�0�9�0�8�0�2�0�0�0�9�0�5�0�8�0�1�0�3�0�1�0�3�0�5�0�9�0�5�0�7�0�1�0�7�0�6�0�9 �9�9�0�9�0�8�0�2�0�0�0�9�0�5�0�8�0�1�0�3�0�1�0�3�0�5�0�9�0�5�0�7�0�1�0�7�0�6�0�9 �9�9�����0�1�0�9�0�0�����0�2�0�2�0�0�0�4�0�6�0�0�0�4�0�8�0�2�����0�5 �9�9�����0�1�0�9�0�0�����0�2�0�2�0�0�0�4�0�6�0�0�0�4�0�8�0�2�����0�5 �9�9�0�4�0�5�0�6�0�7�0�0�0�0�0�2�0�9�0�3�0�1�0�8�0�4�9�9�9�9�9�9�9�9�9�9�9�9�9�9 �9�9�0�4�0�5�0�6�0�7�0�0�0�0�0�2�0�9�0�3�0�1�0�8�0�4�9�9�9�9�9�9�9�9�9�9�9�9�9�9 �9�9�9�9�9�9�9�9�9�9�0�0�0�2�0�3�0�4�0�2�9�9�0�6�9�9�0�8�0�3�9�9�0�9�9�9�9�9�9�9 �9�9�9�9�9�9�9�9�9�9�0�0�0�2�0�3�0�4�0�2�9�9�0�6�9�9�0�8�0�3�9�9�0�9�9�9�9�9�9�9 �9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�0�5�0�6�0�7�0�8�0�9�0�0 �9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�0�5�0�6�0�7�0�8�0�9�0�0 �9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�0�2�0�9�0�8�0�3�6�4 �9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�0�2�0�9�0�8�0�3�6�4 �9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9 �9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9 �9�9�@�A�Bآ�E�G�J��حѾ�M�N��Q�T�U�Wر�Z �9�9�@�A�Bآ�E�G�J��حѾ�M�N��Q�T�U�Wر�Z �9�9�u�x�{�|����ؾ��������ػܱ������������ �9�9�u�x�{�|����ؾ��������ػܱ������������ ��큣������݁��������������������� ��큣������݁��������������������� �����������������9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9 �����������������9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9 �����������������2�6�2�8�0�5�5�2�5�0�5�1�5�2�5�3�5�4�5�3�5�4 �����������������2�6�2�8�0�5�5�2�5�0�5�1�5�2�5�3�5�4�5�3�5�4 �����āŁƁǁȁɁˁ́сҁԁՁցׁ��� �����āŁƁǁȁɁˁ́сҁԁՁցׁ��� �������@�B�����F�G���H�J�L���M�N�O�Y�[�\ �������@�B�����F�G���H�J�L���M�N�O�Y�[�\ ١Ӷ��Ё�������٫���ֶ�9�9�9�9�9�9�9�9�9�9 ١Ӷ��Ё�������٫���ֶ�9�9�9�9�9�9�9�9�9�9 �]�^�`�c�d�n�o�s�t�u�v�w�y�{������������ �]�^�`�c�d�n�o�s�t�u�v�w�y�{������������ �]ؿ�`�d��l�m�q�vء�����������ꁗ������ �]ؿ�`�d��l�m�q�vء�����������ꁗ������ SELECT c1, CONVERT(c1 USING utf8mb4), CONVERT(CONVERT(c1 USING utf8mb4) USING gb18030) FROM `��һ`; c1 CONVERT(c1 USING utf8mb4) CONVERT(CONVERT(c1 USING utf8mb4) USING gb18030) !"#$%&'()*+,-./ !"#$%&'()*+,-./ !"#$%&'()*+,-./ 0123456789:;<=>? 0123456789:;<=>? 0123456789:;<=>? @ABCDEFGHIJKLMNO @ABCDEFGHIJKLMNO @ABCDEFGHIJKLMNO abcdefghijklmno abcdefghijklmno abcdefghijklmno PQRSTUVWXYZ[\]^_ PQRSTUVWXYZ[\]^_ PQRSTUVWXYZ[\]^_ pqrstuvwxyz{|}~ pqrstuvwxyz{|}~ pqrstuvwxyz{|}~ ���9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9 ���9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9 ���9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9 �����0�9���0�1�0�7�0�4�0�6�9�9�0�8�0�2�����0�7�0�6���9�9���0�1�0�6 �����0�9���0�1�0�7�0�4�0�6�9�9�0�8�0�2�����0�7�0�6���9�9���0�1�0�6 �����0�9���0�1�0�7�0�4�0�6�9�9�0�8�0�2�����0�7�0�6���9�9���0�1�0�6 �0�8�0�2�0�8�0�5�0�0�9�9�0�3�0�5�0�9�0�7�0�1�0�1�0�0�0�3�0�2�0�6�0�2�0�7�0�0�0�5 �0�8�0�2�0�8�0�5�0�0�9�9�0�3�0�5�0�9�0�7�0�1�0�1�0�0�0�3�0�2�0�6�0�2�0�7�0�0�0�5 �0�8�0�2�0�8�0�5�0�0�9�9�0�3�0�5�0�9�0�7�0�1�0�1�0�0�0�3�0�2�0�6�0�2�0�7�0�0�0�5 �0�6�0�8�0�1�0�5�0�3�0�1�0�4�0�2�0�5�0�7�0�6�0�0�0�8�0�7�0�1�0�8�0�9�0�5�0�9�0�7 �0�6�0�8�0�1�0�5�0�3�0�1�0�4�0�2�0�5�0�7�0�6�0�0�0�8�0�7�0�1�0�8�0�9�0�5�0�9�0�7 �0�6�0�8�0�1�0�5�0�3�0�1�0�4�0�2�0�5�0�7�0�6�0�0�0�8�0�7�0�1�0�8�0�9�0�5�0�9�0�7 �0�7�0�9�0�2�0�6�0�4�����0�3�0�9�����0�2�0�0���0�2���0�1�0�6�0�0�0�8 �0�7�0�9�0�2�0�6�0�4�����0�3�0�9�����0�2�0�0���0�2���0�1�0�6�0�0�0�8 �0�7�0�9�0�2�0�6�0�4�����0�3�0�9�����0�2�0�0���0�2���0�1�0�6�0�0�0�8 �0�1�0�3�0�7�0�5�0�1�0�9�0�3�0�2�0�5�0�4�0�8�0�8�0�2�0�7�0�4�0�0�0�5�0�0�0�2�0�1 �0�1�0�3�0�7�0�5�0�1�0�9�0�3�0�2�0�5�0�4�0�8�0�8�0�2�0�7�0�4�0�0�0�5�0�0�0�2�0�1 �0�1�0�3�0�7�0�5�0�1�0�9�0�3�0�2�0�5�0�4�0�8�0�8�0�2�0�7�0�4�0�0�0�5�0�0�0�2�0�1 �0�2�0�4�0�8�0�6�0�2�0�0�������0�4�0�9���0�3���0�5�0�1�0�6������ �0�2�0�4�0�8�0�6�0�2�0�0�������0�4�0�9���0�3���0�5�0�1�0�6������ �0�2�0�4�0�8�0�6�0�2�0�0�������0�4�0�9���0�3���0�5�0�1�0�6������ �0�9�0�6�0�6�0�0�0�8�0�1�0�5�0�3�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9 �0�9�0�6�0�6�0�0�0�8�0�1�0�5�0�3�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9 �0�9�0�6�0�6�0�0�0�8�0�1�0�5�0�3�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9 ���0�7�0�5�0�7�0�9�0�2�0�6�0�4�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9 ���0�7�0�5�0�7�0�9�0�2�0�6�0�4�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9 ���0�7�0�5�0�7�0�9�0�2�0�6�0�4�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9 �0�1�0�2�0�3�0�4�0�5�0�7�0�8�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9 �0�1�0�2�0�3�0�4�0�5�0�7�0�8�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9 �0�1�0�2�0�3�0�4�0�5�0�7�0�8�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9 �9�9�0�9�0�8�0�2�0�0�0�9�0�5�0�8�0�1�0�3�0�1�0�3�0�5�0�9�0�5�0�7�0�1�0�7�0�6�0�9 �9�9�0�9�0�8�0�2�0�0�0�9�0�5�0�8�0�1�0�3�0�1�0�3�0�5�0�9�0�5�0�7�0�1�0�7�0�6�0�9 �9�9�0�9�0�8�0�2�0�0�0�9�0�5�0�8�0�1�0�3�0�1�0�3�0�5�0�9�0�5�0�7�0�1�0�7�0�6�0�9 �9�9�����0�1�0�9�0�0�����0�2�0�2�0�0�0�4�0�6�0�0�0�4�0�8�0�2�����0�5 �9�9�����0�1�0�9�0�0�����0�2�0�2�0�0�0�4�0�6�0�0�0�4�0�8�0�2�����0�5 �9�9�����0�1�0�9�0�0�����0�2�0�2�0�0�0�4�0�6�0�0�0�4�0�8�0�2�����0�5 �9�9�0�4�0�5�0�6�0�7�0�0�0�0�0�2�0�9�0�3�0�1�0�8�0�4�9�9�9�9�9�9�9�9�9�9�9�9�9�9 �9�9�0�4�0�5�0�6�0�7�0�0�0�0�0�2�0�9�0�3�0�1�0�8�0�4�9�9�9�9�9�9�9�9�9�9�9�9�9�9 �9�9�0�4�0�5�0�6�0�7�0�0�0�0�0�2�0�9�0�3�0�1�0�8�0�4�9�9�9�9�9�9�9�9�9�9�9�9�9�9 �9�9�9�9�9�9�9�9�9�9�0�0�0�2�0�3�0�4�0�2�9�9�0�6�9�9�0�8�0�3�9�9�0�9�9�9�9�9�9�9 �9�9�9�9�9�9�9�9�9�9�0�0�0�2�0�3�0�4�0�2�9�9�0�6�9�9�0�8�0�3�9�9�0�9�9�9�9�9�9�9 �9�9�9�9�9�9�9�9�9�9�0�0�0�2�0�3�0�4�0�2�9�9�0�6�9�9�0�8�0�3�9�9�0�9�9�9�9�9�9�9 �9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�0�5�0�6�0�7�0�8�0�9�0�0 �9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�0�5�0�6�0�7�0�8�0�9�0�0 �9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�0�5�0�6�0�7�0�8�0�9�0�0 �9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�0�2�0�9�0�8�0�3�6�4 �9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�0�2�0�9�0�8�0�3�6�4 �9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�0�2�0�9�0�8�0�3�6�4 �9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9 �9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9 �9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9 �9�9�@�A�Bآ�E�G�J��حѾ�M�N��Q�T�U�Wر�Z �9�9�@�A�Bآ�E�G�J��حѾ�M�N��Q�T�U�Wر�Z �9�9�@�A�Bآ�E�G�J��حѾ�M�N��Q�T�U�Wر�Z �9�9�u�x�{�|����ؾ��������ػܱ������������ �9�9�u�x�{�|����ؾ��������ػܱ������������ �9�9�u�x�{�|����ؾ��������ػܱ������������ ��큣������݁��������������������� ��큣������݁��������������������� ��큣������݁��������������������� �����������������9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9 �����������������9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9 �����������������9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9�9 �����������������2�6�2�8�0�5�5�2�5�0�5�1�5�2�5�3�5�4�5�3�5�4 �����������������2�6�2�8�0�5�5�2�5�0�5�1�5�2�5�3�5�4�5�3�5�4 �����������������2�6�2�8�0�5�5�2�5�0�5�1�5�2�5�3�5�4�5�3�5�4 �����āŁƁǁȁɁˁ́сҁԁՁցׁ��� �����āŁƁǁȁɁˁ́сҁԁՁցׁ��� �����āŁƁǁȁɁˁ́сҁԁՁցׁ��� �������@�B�����F�G���H�J�L���M�N�O�Y�[�\ �������@�B�����F�G���H�J�L���M�N�O�Y�[�\ �������@�B�����F�G���H�J�L���M�N�O�Y�[�\ ١Ӷ��Ё�������٫���ֶ�9�9�9�9�9�9�9�9�9�9 ١Ӷ��Ё�������٫���ֶ�9�9�9�9�9�9�9�9�9�9 ١Ӷ��Ё�������٫���ֶ�9�9�9�9�9�9�9�9�9�9 �]�^�`�c�d�n�o�s�t�u�v�w�y�{������������ �]�^�`�c�d�n�o�s�t�u�v�w�y�{������������ �]�^�`�c�d�n�o�s�t�u�v�w�y�{������������ �]ؿ�`�d��l�m�q�vء�����������ꁗ������ �]ؿ�`�d��l�m�q�vء�����������ꁗ������ �]ؿ�`�d��l�m�q�vء�����������ꁗ������ DROP TABLE `��һ`; 'Test for sub-query' CREATE TABLE t1a (c CHAR(1) PRIMARY KEY) DEFAULT CHARSET = gb18030; CREATE TABLE t1b (c CHAR(1) PRIMARY KEY) DEFAULT CHARSET = gb18030; CREATE TABLE t2a (c CHAR(1) PRIMARY KEY) DEFAULT CHARSET = gb18030; CREATE TABLE t2b (c CHAR(1) PRIMARY KEY) DEFAULT CHARSET = gb18030; INSERT INTO t1a VALUES ('˫'), ('��'), ('�5�2'), ('�5�3'); INSERT INTO t1b VALUES ('˫'); INSERT INTO t2a VALUES ('�5�4'), ('�y'), ('�5�3'); INSERT INTO t2b VALUES ('�5�4'); SELECT c FROM t1a WHERE c IN (SELECT c FROM t1b); c ˫ SELECT c FROM t1a WHERE EXISTS (SELECT c FROM t1b WHERE t1a.c = t1b.c); c ˫ SELECT c FROM t1a WHERE NOT EXISTS (SELECT c FROM t1b WHERE t1a.c = t1b.c); c �5�2 �5�3 �� SELECT c FROM t2a WHERE c IN (SELECT c FROM t2b); c �5�4 SELECT c FROM t2a WHERE EXISTS (SELECT c FROM t2b WHERE t2a.c = t2b.c); c �5�4 SELECT c FROM t2a WHERE NOT EXISTS (SELECT c FROM t2b WHERE t2a.c = t2b.c); c �5�3 �y 'Test for JOIN' SELECT * FROM t1a JOIN t1b; c c �5�2 ˫ �5�3 ˫ ˫ ˫ �� ˫ SELECT * FROM t1a INNER JOIN t1b; c c �5�2 ˫ �5�3 ˫ ˫ ˫ �� ˫ SELECT * FROM t1a JOIN t1b USING (c); c ˫ SELECT * FROM t1a INNER JOIN t1b USING (c); c ˫ SELECT * FROM t1a CROSS JOIN t1b; c c �5�2 ˫ �5�3 ˫ ˫ ˫ �� ˫ SELECT * FROM t1a LEFT JOIN t1b USING (c); c �5�2 �5�3 ˫ �� SELECT * FROM t1a LEFT JOIN t1b ON (t1a.c = t1b.c); c c �5�2 NULL �5�3 NULL ˫ ˫ �� NULL SELECT * FROM t1b RIGHT JOIN t1a USING (c); c �5�2 �5�3 ˫ �� SELECT * FROM t1b RIGHT JOIN t1a ON (t1a.c = t1b.c); c c NULL �5�2 NULL �5�3 ˫ ˫ NULL �� SELECT * FROM t2a JOIN t2b; c c �5�3 �5�4 �5�4 �5�4 �y �5�4 SELECT * FROM t2a INNER JOIN t2b; c c �5�3 �5�4 �5�4 �5�4 �y �5�4 SELECT * FROM t2a JOIN t2b USING (c); c �5�4 SELECT * FROM t2a INNER JOIN t2b USING (c); c �5�4 SELECT * FROM t2a CROSS JOIN t2b; c c �5�3 �5�4 �5�4 �5�4 �y �5�4 SELECT * FROM t2a LEFT JOIN t2b USING (c); c �5�3 �5�4 �y SELECT * FROM t2a LEFT JOIN t2b ON (t2a.c = t2b.c); c c �5�3 NULL �5�4 �5�4 �y NULL SELECT * FROM t2b RIGHT JOIN t2a USING (c); c �5�3 �5�4 �y SELECT * FROM t2b RIGHT JOIN t2a ON (t2a.c = t2b.c); c c NULL �5�3 �5�4 �5�4 NULL �y DROP TABLE t1a, t1b, t2a, t2b; 'Test for string functions' CREATE TABLE `��һ` (c1 CHAR(20), INDEX(c1)) DEFAULT CHARSET = gb18030; INSERT INTO `��һ` VALUES ('12345678900987654321'), ('һ�������������Ҽ'), ('���߰�'), ('��ʮ'), ('��'), ('�5�0�5�1�5�2�5�3'); INSERT INTO `��һ` VALUES ('�3�1'), ('һ�3�1�����'), ('�2�8�0�5'); SELECT c1, LENGTH(c1) FROM `��һ`; c1 LENGTH(c1) 12345678900987654321 20 �2�8�0�5 8 �3�1 4 �� 2 ��ʮ 4 ���߰� 6 �5�0�5�1�5�2�5�3 16 һ�3�1����� 12 һ�������������Ҽ 20 SELECT c1, LPAD(c1, 20, '��') FROM `��һ`; c1 LPAD(c1, 20, '��') 12345678900987654321 12345678900987654321 �2�8�0�5 �����������������������������������Е2�8�0�5 �3�1 �������������������������������������Ђ3�1 �� �������������������������������������а� ��ʮ �����������������������������������о�ʮ ���߰� ������������������������������������߰� �5�0�5�1�5�2�5�3 �������������������������������Е5�0�5�1�5�2�5�3 һ�3�1����� ������������������������������һ�3�1����� һ�������������Ҽ ��������������������һ�������������Ҽ SELECT c1, RPAD(c1, 20, '�5�2') FROM `��һ`; c1 RPAD(c1, 20, '?') 12345678900987654321 12345678900987654321 �2�8�0�5 �2�8�0�5�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2 �3�1 �3�1�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2 �� �ٖ5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2 ��ʮ ��ʮ�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2 ���߰� ���߰˖5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2 �5�0�5�1�5�2�5�3 �5�0�5�1�5�2�5�3�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2 һ�3�1����� һ�3�1����Ė5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2 һ�������������Ҽ һ�������������Ҽ�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2�5�2 TRUNCATE `��һ`; INSERT INTO `��һ` VALUES ('һ�3�1���5�2��5�4��'); SELECT INSTR(c1, 'һ') FROM `��һ`; INSTR(c1, 'һ') 1 SELECT INSTR(c1, '��') FROM `��һ`; INSTR(c1, '��') 3 SELECT INSTR(c1, '�') FROM `��һ`; INSTR(c1, '�') 5 SELECT INSTR(c1, '��') FROM `��һ`; INSTR(c1, '��') 7 SELECT INSTR(c1, '�5�2') FROM `��һ`; INSTR(c1, '?') 4 SELECT INSTR(c1, '�5�4') FROM `��һ`; INSTR(c1, '?') 6 SELECT INSTR(c1, '�3�1') FROM `��һ`; INSTR(c1, '�3�1') 2 SELECT c1, LEFT(c1, 0) FROM `��һ`; c1 LEFT(c1, 0) һ�3�1���5�2��5�4�� SELECT c1, LEFT(c1, 1) FROM `��һ`; c1 LEFT(c1, 1) һ�3�1���5�2��5�4�� һ SELECT c1, LEFT(c1, 2) FROM `��һ`; c1 LEFT(c1, 2) һ�3�1���5�2��5�4�� һ�3�1 SELECT c1, LEFT(c1, 3) FROM `��һ`; c1 LEFT(c1, 3) һ�3�1���5�2��5�4�� һ�3�1�� SELECT c1, LEFT(c1, 4) FROM `��һ`; c1 LEFT(c1, 4) һ�3�1���5�2��5�4�� һ�3�1���5�2 SELECT c1, LEFT(c1, 5) FROM `��һ`; c1 LEFT(c1, 5) һ�3�1���5�2��5�4�� һ�3�1���5�2� SELECT c1, LEFT(c1, 6) FROM `��һ`; c1 LEFT(c1, 6) һ�3�1���5�2��5�4�� һ�3�1���5�2��5�4 SELECT c1, LEFT(c1, 7) FROM `��һ`; c1 LEFT(c1, 7) һ�3�1���5�2��5�4�� һ�3�1���5�2��5�4�� SELECT c1, RIGHT(c1, 0) FROM `��һ`; c1 RIGHT(c1, 0) һ�3�1���5�2��5�4�� SELECT c1, RIGHT(c1, 1) FROM `��һ`; c1 RIGHT(c1, 1) һ�3�1���5�2��5�4�� �� SELECT c1, RIGHT(c1, 2) FROM `��һ`; c1 RIGHT(c1, 2) һ�3�1���5�2��5�4�� �5�4�� SELECT c1, RIGHT(c1, 3) FROM `��һ`; c1 RIGHT(c1, 3) һ�3�1���5�2��5�4�� ��5�4�� SELECT c1, RIGHT(c1, 4) FROM `��һ`; c1 RIGHT(c1, 4) һ�3�1���5�2��5�4�� �5�2��5�4�� SELECT c1, RIGHT(c1, 5) FROM `��һ`; c1 RIGHT(c1, 5) һ�3�1���5�2��5�4�� ���5�2��5�4�� SELECT c1, RIGHT(c1, 6) FROM `��һ`; c1 RIGHT(c1, 6) һ�3�1���5�2��5�4�� �3�1���5�2��5�4�� SELECT c1, RIGHT(c1, 7) FROM `��һ`; c1 RIGHT(c1, 7) һ�3�1���5�2��5�4�� һ�3�1���5�2��5�4�� SELECT REPLACE(c1, 'һ', 'һһ') FROM `��һ`; REPLACE(c1, 'һ', 'һһ') һһ�3�1���5�2��5�4�� SELECT REPLACE(c1, '��', '����') FROM `��һ`; REPLACE(c1, '��', '����') һ�3�1���5�2��5�4���� SELECT REPLACE(c1, '�5�4', '�5�4�5�4') FROM `��һ`; REPLACE(c1, '?', '??') һ�3�1���5�2��5�4�5�4�� SELECT REPLACE(c1, '�5�2', '�5�2�5�2') FROM `��һ`; REPLACE(c1, '?', '??') һ�3�1���5�2�5�2��5�4�� TRUNCATE `��һ`; INSERT INTO `��һ` VALUES ('һ�3�1���5�2��5�3'); INSERT INTO `��һ` VALUES ('һ�3�1���5�2��5�3�5�2'); INSERT INTO `��һ` VALUES ('һ�3�1���5�2��5�3�5�2�5�2'); INSERT INTO `��һ` VALUES ('һ�3�1���5�2��5�3�5�2�5�2�5�2'); INSERT INTO `��һ` VALUES ('�5�2һ�3�1���5�2��5�3'); INSERT INTO `��һ` VALUES ('�5�2�5�2һ�3�1���5�2��5�3'); INSERT INTO `��һ` VALUES ('�5�2�5�2�5�2һ�3�1���5�2��5�3'); INSERT INTO `��һ` VALUES (' һ�3�1���5�2��5�3 '); SELECT c1, TRIM(TRAILING '�5�2' FROM c1) FROM `��һ`; c1 TRIM(TRAILING '?' FROM c1) һ�3�1���5�2��5�3 һ�3�1���5�2��5�3 �5�2�5�2�5�2һ�3�1���5�2��5�3 �5�2�5�2�5�2һ�3�1���5�2��5�3 �5�2�5�2һ�3�1���5�2��5�3 �5�2�5�2һ�3�1���5�2��5�3 �5�2һ�3�1���5�2��5�3 �5�2һ�3�1���5�2��5�3 һ�3�1���5�2��5�3 һ�3�1���5�2��5�3 һ�3�1���5�2��5�3�5�2 һ�3�1���5�2��5�3 һ�3�1���5�2��5�3�5�2�5�2 һ�3�1���5�2��5�3 һ�3�1���5�2��5�3�5�2�5�2�5�2 һ�3�1���5�2��5�3 SELECT c1, TRIM(LEADING '�5�2' FROM c1) FROM `��һ`; c1 TRIM(LEADING '?' FROM c1) һ�3�1���5�2��5�3 һ�3�1���5�2��5�3 �5�2�5�2�5�2һ�3�1���5�2��5�3 һ�3�1���5�2��5�3 �5�2�5�2һ�3�1���5�2��5�3 һ�3�1���5�2��5�3 �5�2һ�3�1���5�2��5�3 һ�3�1���5�2��5�3 һ�3�1���5�2��5�3 һ�3�1���5�2��5�3 һ�3�1���5�2��5�3�5�2 һ�3�1���5�2��5�3�5�2 һ�3�1���5�2��5�3�5�2�5�2 һ�3�1���5�2��5�3�5�2�5�2 һ�3�1���5�2��5�3�5�2�5�2�5�2 һ�3�1���5�2��5�3�5�2�5�2�5�2 SELECT c1, TRIM(BOTH '�5�2' FROM c1) FROM `��һ`; c1 TRIM(BOTH '?' FROM c1) һ�3�1���5�2��5�3 һ�3�1���5�2��5�3 �5�2�5�2�5�2һ�3�1���5�2��5�3 һ�3�1���5�2��5�3 �5�2�5�2һ�3�1���5�2��5�3 һ�3�1���5�2��5�3 �5�2һ�3�1���5�2��5�3 һ�3�1���5�2��5�3 һ�3�1���5�2��5�3 һ�3�1���5�2��5�3 һ�3�1���5�2��5�3�5�2 һ�3�1���5�2��5�3 һ�3�1���5�2��5�3�5�2�5�2 һ�3�1���5�2��5�3 һ�3�1���5�2��5�3�5�2�5�2�5�2 һ�3�1���5�2��5�3 SELECT c1, TRIM(c1) FROM `��һ`; c1 TRIM(c1) һ�3�1���5�2��5�3 һ�3�1���5�2��5�3 �5�2�5�2�5�2һ�3�1���5�2��5�3 �5�2�5�2�5�2һ�3�1���5�2��5�3 �5�2�5�2һ�3�1���5�2��5�3 �5�2�5�2һ�3�1���5�2��5�3 �5�2һ�3�1���5�2��5�3 �5�2һ�3�1���5�2��5�3 һ�3�1���5�2��5�3 һ�3�1���5�2��5�3 һ�3�1���5�2��5�3�5�2 һ�3�1���5�2��5�3�5�2 һ�3�1���5�2��5�3�5�2�5�2 һ�3�1���5�2��5�3�5�2�5�2 һ�3�1���5�2��5�3�5�2�5�2�5�2 һ�3�1���5�2��5�3�5�2�5�2�5�2 SELECT REVERSE(c1) FROM `��һ`; REVERSE(c1) �5�3��5�2���3�1һ �5�3��5�2���3�1һ�5�2�5�2�5�2 �5�3��5�2���3�1һ�5�2�5�2 �5�3��5�2���3�1һ�5�2 �5�3��5�2���3�1һ �5�2�5�3��5�2���3�1һ �5�2�5�2�5�3��5�2���3�1һ �5�2�5�2�5�2�5�3��5�2���3�1һ TRUNCATE `��һ`; DROP TABLE `��һ`; 'Test for 'GROUP BY'' CREATE TABLE t1 (c VARCHAR(10)) DEFAULT CHARSET = gb18030; INSERT INTO t1 VALUES ('������'), ('��'), ('�E�X'), ('����P��'), ('��'), ('�5�4'), ('�E�X'); SELECT c, COUNT(c) FROM t1 GROUP BY c; c COUNT(c) �E�X 2 �5�4 1 ����P�� 1 �� 1 �� 1 ������ 1 DROP TABLE t1; 'Test for PS' CREATE TABLE t1 (c1 CHAR(3)) DEFAULT CHARSET = gb18030; CREATE TABLE t2 (c1 CHAR(3)) DEFAULT CHARSET = gb18030; CREATE TABLE t3 (`�3�2` CHAR(1), `�9�5` CHAR(1), `��` CHAR(1)) DEFAULT CHARSET = gb18030; CREATE TABLE t4 (c1 CHAR(3)) DEFAULT CHARSET = gb18030; INSERT INTO t1 VALUES ('xxx'); INSERT INTO t2 VALUES ('�5�0�9�8��'); INSERT INTO t3 VALUES ('x', 'x', 'x'), ('x', 'x', 'x'), ('y', 'y', 'y'), ('y', 'y', 'y'), ('z', 'z', 'z'), ('z', 'z', 'z'); INSERT INTO t4 VALUES ('�5�0'), ('�9�8'), ('��'); PREPARE stmt1 FROM 'SELECT ? FROM t3'; PREPARE stmt2 FROM 'SELECT * FROM t3 ORDER BY ?'; PREPARE stmt3 FROM 'SELECT COUNT(*) FROM t3 GROUP BY ?'; PREPARE stmt4 FROM 'SELECT CHAR_LENGTH(?)'; PREPARE stmt5 FROM 'SELECT CHARSET(?)'; PREPARE stmt6 FROM 'SELECT INSERT(c1,1,1,?) FROM t1'; PREPARE stmt7 FROM 'SELECT INSTR(c1,?) FROM t2'; PREPARE stmt8 FROM 'SELECT LOCATE(?,c1) FROM t2'; PREPARE stmt9 FROM 'SELECT LPAD(c1,9,?) FROM t1'; PREPARE stmt10 FROM 'SELECT REPLACE(c1,?,\'x\') FROM t2'; PREPARE stmt11 FROM 'SELECT REPLACE(c1,\'x\',?) FROM t1'; PREPARE stmt12 FROM 'SELECT RPAD(c1,9,?) FROM t1'; PREPARE stmt13 FROM 'UPDATE t4 SET c1=\'x\' WHERE c1=?'; PREPARE stmt14 FROM 'UPDATE t4 SET c1=? WHERE c1=\'x\''; SET @arg = '�5�0'; EXECUTE stmt1 USING @arg; ? �5�0 �5�0 �5�0 �5�0 �5�0 �5�0 EXECUTE stmt2 USING @arg; �3�2 �9�5 �� x x x x x x y y y y y y z z z z z z EXECUTE stmt3 USING @arg; COUNT(*) 6 EXECUTE stmt4 USING @arg; CHAR_LENGTH(?) 1 EXECUTE stmt5 USING @arg; CHARSET(?) gb18030 EXECUTE stmt6 USING @arg; INSERT(c1,1,1,?) �5�0xx EXECUTE stmt7 USING @arg; INSTR(c1,?) 1 EXECUTE stmt8 USING @arg; LOCATE(?,c1) 1 EXECUTE stmt9 USING @arg; LPAD(c1,9,?) �5�0�5�0�5�0�5�0�5�0�5�0xxx EXECUTE stmt10 USING @arg; REPLACE(c1,?,'x') x�9�8�� EXECUTE stmt11 USING @arg; REPLACE(c1,'x',?) �5�0�5�0�5�0 EXECUTE stmt12 USING @arg; RPAD(c1,9,?) xxx�5�0�5�0�5�0�5�0�5�0�5�0 EXECUTE stmt13 USING @arg; SELECT * FROM t4; c1 x �9�8 �� EXECUTE stmt14 USING @arg; SELECT * FROM t4; c1 �5�0 �9�8 �� SET @arg = '�9�8'; EXECUTE stmt1 USING @arg; ? �9�8 �9�8 �9�8 �9�8 �9�8 �9�8 EXECUTE stmt2 USING @arg; �3�2 �9�5 �� x x x x x x y y y y y y z z z z z z EXECUTE stmt3 USING @arg; COUNT(*) 6 EXECUTE stmt4 USING @arg; CHAR_LENGTH(?) 1 EXECUTE stmt5 USING @arg; CHARSET(?) gb18030 EXECUTE stmt6 USING @arg; INSERT(c1,1,1,?) �9�8xx EXECUTE stmt7 USING @arg; INSTR(c1,?) 2 EXECUTE stmt8 USING @arg; LOCATE(?,c1) 2 EXECUTE stmt9 USING @arg; LPAD(c1,9,?) �9�8�9�8�9�8�9�8�9�8�9�8xxx EXECUTE stmt10 USING @arg; REPLACE(c1,?,'x') �5�0x�� EXECUTE stmt11 USING @arg; REPLACE(c1,'x',?) �9�8�9�8�9�8 EXECUTE stmt12 USING @arg; RPAD(c1,9,?) xxx�9�8�9�8�9�8�9�8�9�8�9�8 EXECUTE stmt13 USING @arg; SELECT * FROM t4; c1 �5�0 x �� EXECUTE stmt14 USING @arg; SELECT * FROM t4; c1 �5�0 �9�8 �� SET @arg = '��'; EXECUTE stmt1 USING @arg; ? �� �� �� �� �� �� EXECUTE stmt2 USING @arg; �3�2 �9�5 �� x x x x x x y y y y y y z z z z z z EXECUTE stmt3 USING @arg; COUNT(*) 6 EXECUTE stmt4 USING @arg; CHAR_LENGTH(?) 1 EXECUTE stmt5 USING @arg; CHARSET(?) gb18030 EXECUTE stmt6 USING @arg; INSERT(c1,1,1,?) ��xx EXECUTE stmt7 USING @arg; INSTR(c1,?) 3 EXECUTE stmt8 USING @arg; LOCATE(?,c1) 3 EXECUTE stmt9 USING @arg; LPAD(c1,9,?) �������xxx EXECUTE stmt10 USING @arg; REPLACE(c1,?,'x') �5�0�9�8x EXECUTE stmt11 USING @arg; REPLACE(c1,'x',?) ���� EXECUTE stmt12 USING @arg; RPAD(c1,9,?) xxx������� EXECUTE stmt13 USING @arg; SELECT * FROM t4; c1 �5�0 �9�8 x EXECUTE stmt14 USING @arg; SELECT * FROM t4; c1 �5�0 �9�8 �� DEALLOCATE PREPARE stmt1; DEALLOCATE PREPARE stmt2; DEALLOCATE PREPARE stmt3; DEALLOCATE PREPARE stmt4; DEALLOCATE PREPARE stmt5; DEALLOCATE PREPARE stmt6; DEALLOCATE PREPARE stmt7; DEALLOCATE PREPARE stmt8; DEALLOCATE PREPARE stmt9; DEALLOCATE PREPARE stmt10; DEALLOCATE PREPARE stmt11; DEALLOCATE PREPARE stmt12; DEALLOCATE PREPARE stmt13; DEALLOCATE PREPARE stmt14; DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; DROP TABLE t4; 'Test for INTO OUTFILE/INFILE' CREATE TABLE `���һ` (id INT PRIMARY KEY, c CHAR(5), b BINARY(50), v VARBINARY(100)) DEFAULT CHARSET = gb18030; INSERT INTO `���һ` VALUES(1, 'ab�5�6�\��', '12�\3�\345', '�ַ��5�6�\��'), (2, '�\�2�6�2�8�\', '�\�\�\�\5C', '�9�2�9�3�9�6�9�7�9�9'), (3, '�0�5�5�2�5�0', '�2�6�2�8�0�5�5�2�5�0', '�5�1�5�2�5�3�5�4'); SELECT * FROM `���һ`; id c b v 1 ab�5�6�\�� 12�\3�\345 �ַ��5�6�\�� 2 �\�2�6�2�8�\ �\�\�\�\5C �9�2�9�3�9�6�9�7�9�9 3 �0�5�5�2�5�0 �2�6�2�8�0�5�5�2�5�0 �5�1�5�2�5�3�5�4 SELECT * INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/gb18030_encoding.txt' FROM `���һ`;; SELECT LOAD_FILE('MYSQLTEST_VARDIR/tmp/gb18030_encoding.txt');; LOAD_FILE('MYSQLTEST_VARDIR/tmp/gb18030_encoding.txt') 1 ab�5�6�\�� 12\�\\3\�\\345\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 �ַ��5�6\�\\�� 2 �\�2�6�2�8�\ \�\\\�\\\�\\\�\\5C\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 �9�2�9�3�9�6�9�7�9�9 3 �0�5�5�2�5�0 �2�6�2�8�0�5�5�2�5�0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 �5�1�5�2�5�3�5�4 CREATE TABLE `���` LIKE `���һ`;; LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/gb18030_encoding.txt' INTO TABLE `���` CHARACTER SET gb18030;; SELECT COUNT(*) AS `Expect 3` FROM `���һ`, `���` WHERE `���һ`.id = `���`.id;; Expect 3 3 SELECT COUNT(*) AS `Expect 0` FROM `���һ`, `���` WHERE `���һ`.id = `���`.id AND (`���һ`.c <> `���`.c OR `���һ`.b <> `���`.b OR `���һ`.v <> `���`.v);; Expect 0 0 DROP TABLE `���`; SELECT * INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/gb18030_encoding.txt' FIELDS TERMINATED BY '5C' ENCLOSED BY '"' FROM `���һ`;; SELECT LOAD_FILE('MYSQLTEST_VARDIR/tmp/gb18030_encoding.txt');; LOAD_FILE('MYSQLTEST_VARDIR/tmp/gb18030_encoding.txt') "1"5C"ab�5�6�\��"5C"12\�\\3\�\\345\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"5C"�ַ��5�6\�\\��" "2"5C"�\�2�6�2�8�\"5C"\�\\\�\\\�\\\�\\5C\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"5C"�9�2�9�3�9�6�9�7�9�9" "3"5C"�0�5�5�2�5�0"5C"�2�6�2�8�0�5�5�2�5�0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"5C"�5�1�5�2�5�3�5�4" CREATE TABLE `���` LIKE `���һ`;; LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/gb18030_encoding.txt' INTO TABLE `���` CHARACTER SET gb18030 FIELDS TERMINATED BY '5C' ENCLOSED BY '"';; SELECT COUNT(*) AS `Expect 3` FROM `���һ`, `���` WHERE `���һ`.id = `���`.id;; Expect 3 3 SELECT COUNT(*) AS `Expect 0` FROM `���һ`, `���` WHERE `���һ`.id = `���`.id AND (`���һ`.c <> `���`.c OR `���һ`.b <> `���`.b OR `���һ`.v <> `���`.v);; Expect 0 0 DROP TABLE `���`; SELECT * INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/gb18030_encoding.txt' FIELDS TERMINATED BY '5C' ENCLOSED BY '0' LINES TERMINATED BY '1' FROM `���һ`;; SELECT LOAD_FILE('MYSQLTEST_VARDIR/tmp/gb18030_encoding.txt');; LOAD_FILE('MYSQLTEST_VARDIR/tmp/gb18030_encoding.txt') 0\105C0ab�5�6�\��05C0\12\�\\3\�\\345\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\005C0�ַ��5�6\�\\��010205C0�\�2�6�2�8�\05C0\�\\\�\\\�\\\�\\5C\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\005C0�9�2�9�3�9�6�9�7�9�9010305C0�0�5�5�2�5�005C0�2�6�2�8\�0\�\5�5�2\�\5\�0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\005C0\�\5\�\1�5�2�5�3�5�401 CREATE TABLE `���` LIKE `���һ`;; LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/gb18030_encoding.txt' INTO TABLE `���` CHARACTER SET gb18030 FIELDS TERMINATED BY '5C' ENCLOSED BY '0' LINES TERMINATED BY '1';; SELECT COUNT(*) AS `Expect 3` FROM `���һ`, `���` WHERE `���һ`.id = `���`.id;; Expect 3 3 SELECT COUNT(*) AS `Expect 0` FROM `���һ`, `���` WHERE `���һ`.id = `���`.id AND (`���һ`.c <> `���`.c OR `���һ`.b <> `���`.b OR `���һ`.v <> `���`.v);; Expect 0 0 DROP TABLE `���`; SELECT * INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/gb18030_encoding.txt' FIELDS TERMINATED BY 'd' FROM `���һ`;; SELECT LOAD_FILE('MYSQLTEST_VARDIR/tmp/gb18030_encoding.txt');; LOAD_FILE('MYSQLTEST_VARDIR/tmp/gb18030_encoding.txt') 1dab�5�6�\��d12\�\\3\�\\345\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0d�ַ��5�6\�\\�� 2d�\�2�6�2�8�\d\�\\\�\\\�\\\�\\5C\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0d�9�2�9�3�9�6�9�7�9�9 3d�0�5�5�2�5�0d�2�6�2�8�0�5�5�2�5�0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0d�5�1�5�2�5�3�5�4 CREATE TABLE `���` LIKE `���һ`;; LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/gb18030_encoding.txt' INTO TABLE `���` CHARACTER SET gb18030 FIELDS TERMINATED BY 'd';; SELECT COUNT(*) AS `Expect 3` FROM `���һ`, `���` WHERE `���һ`.id = `���`.id;; Expect 3 3 SELECT COUNT(*) AS `Expect 0` FROM `���һ`, `���` WHERE `���һ`.id = `���`.id AND (`���һ`.c <> `���`.c OR `���һ`.b <> `���`.b OR `���һ`.v <> `���`.v);; Expect 0 0 DROP TABLE `���`, `���һ`;