diff --git a/contrib/dolphin/expected/test_set_charset.out b/contrib/dolphin/expected/test_set_charset.out index b7f15c87ffa476524089d8b35b105b9b26ebc836..b1729c907483d0ba83da6ae59ab28859a1153416 100644 --- a/contrib/dolphin/expected/test_set_charset.out +++ b/contrib/dolphin/expected/test_set_charset.out @@ -62,5 +62,12 @@ show client_encoding; UTF8 (1 row) +set names binary; +show client_encoding; + client_encoding +----------------- + SQL_ASCII +(1 row) + drop schema db_charset cascade; reset current_schema; diff --git a/contrib/dolphin/plugin_parser/gram.y b/contrib/dolphin/plugin_parser/gram.y index f78ff606bc26c4c0f608b8965b75dc0655538513..7c323ce19e8a0b1dec997444247012c22077d188 100644 --- a/contrib/dolphin/plugin_parser/gram.y +++ b/contrib/dolphin/plugin_parser/gram.y @@ -3590,6 +3590,7 @@ zone_value: opt_encoding: SCONST { $$ = $1; } + | BINARY { $$ = (char*)$1; } | normal_ident { $$ = $1; } | DEFAULT { $$ = NULL; } | /*EMPTY*/ { $$ = NULL; } diff --git a/contrib/dolphin/sql/test_set_charset.sql b/contrib/dolphin/sql/test_set_charset.sql index 98c3716c39404fcf390a6cc17166fcd6dcc50b58..6076005cba3f9140791fcf405a7ec128dba7eda4 100644 --- a/contrib/dolphin/sql/test_set_charset.sql +++ b/contrib/dolphin/sql/test_set_charset.sql @@ -18,5 +18,7 @@ set names 'gbk'; show client_encoding; set names default; show client_encoding; +set names binary; +show client_encoding; drop schema db_charset cascade; reset current_schema;